#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float calc_power_r(float, float);
float calc_resistance(int, char, float *);
int e_resistance(float, float *);
int /*<<< orphan*/ free(float *);
char getchar();
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int component_count;
  int i, antal;
  float effekt, volt;
  char circuit_type = ' ';
  float resistors[3];
  float *val_pekare = &resistors[0];
  float *component_array;
  printf("Electrotest 2015 HT - linUM at UMU\n");
  printf("Ange spänningskälla (V): ");
  scanf("%f", &volt);
  do {
    printf("Ange koppling [s|p]: ");
    getchar();
    circuit_type = getchar();
    switch (circuit_type) {
    case 's':
      printf("<Seriellkoppling>\n");
      break;
    case 'p':
      printf("<Parallellkoppling>\n");
      break;
    default:
      break;
    }
  } while (circuit_type != 'p' && circuit_type != 's');
  printf("Ange antal komponenter: ");
  scanf("%d", &component_count);
  component_array = (float *)malloc(sizeof(float) * component_count);
  for (i = 0; i < component_count; i++) {
    printf("Ange resistans för komponent %d: ", i + 1);
    scanf("%f", &component_array[i]);
  }
  float totRes =
      calc_resistance(component_count, circuit_type, component_array);
  printf("\nErsättningsresistans: %f Ohm\n", totRes);
  effekt = calc_power_r(volt, totRes);
  printf("Effekten är: %f Watt\n", effekt);
  printf("Ersättningsresistanser i E12-serien kopplade i serie: ");
  for (antal = e_resistance(totRes, &resistors[0]); antal > 0; antal--) {
    printf("%1.0f", *val_pekare++);
    if (antal > 1)
      printf(", ");
  }
  printf("\n");
  free(component_array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x20,-0x19(%rbp)
lea    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe82(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
lea    0xe73(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x41(%rbp)
call   1070 <printf@plt>
mov    -0x41(%rbp),%al
call   1080 <getchar@plt>
mov    -0x41(%rbp),%al
call   1080 <getchar@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
mov    %eax,-0x40(%rbp)
sub    $0x70,%eax
je     1226 <main+0xa6>
jmp    1202 <main+0x82>
mov    -0x40(%rbp),%eax
sub    $0x73,%eax
jne    1239 <main+0xb9>
jmp    1213 <main+0x93>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    123e <main+0xbe>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    123e <main+0xbe>
jmp    123e <main+0xbe>
jmp    1243 <main+0xc3>
movsbl -0x19(%rbp),%ecx
xor    %eax,%eax
cmp    $0x70,%ecx
mov    %al,-0x42(%rbp)
je     1262 <main+0xe2>
movsbl -0x19(%rbp),%eax
cmp    $0x73,%eax
setne  %al
mov    %al,-0x42(%rbp)
mov    -0x42(%rbp),%al
test   $0x1,%al
jne    11c9 <main+0x49>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe18(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   10a0 <scanf@plt>
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1090 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12f2 <main+0x172>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x38(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   10a0 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12a7 <main+0x127>
mov    -0x8(%rbp),%edi
mov    -0x19(%rbp),%al
mov    -0x38(%rbp),%rdx
movsbl %al,%esi
call   1050 <calc_resistance@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xda7(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  -0x3c(%rbp),%xmm1
call   1060 <calc_power_r@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd9c(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0xda5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movss  -0x3c(%rbp),%xmm0
lea    -0x28(%rbp),%rdi
call   1040 <e_resistance@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    13c4 <main+0x244>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x30(%rbp)
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd9d(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
cmpl   $0x1,-0x10(%rbp)
jle    13b1 <main+0x231>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    13b6 <main+0x236>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    136a <main+0x1ea>
lea    0xc9f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf37(%rip),%rdi
call   1050 <puts@plt>
lea    0xe3f(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xe4d(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
lea    0xe3d(%rip),%r14
lea    0xf3a(%rip),%rbp
lea    0xf1f(%rip),%r15
mov    %r14,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
xor    %eax,%eax
call   10a0 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%r13d
mov    %rbp,%rdi
cmp    $0x73,%r13d
je     1220 <main+0x80>
cmp    $0x70,%r13d
jne    1225 <main+0x85>
mov    %r15,%rdi
call   1050 <puts@plt>
cmp    $0x73,%bl
je     122f <main+0x8f>
cmp    $0x70,%bl
jne    11f0 <main+0x50>
lea    0xdff(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xe0a(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
mov    (%rsp),%edi
test   %edi,%edi
jle    12aa <main+0x10a>
lea    0xde7(%rip),%r15
lea    0xdab(%rip),%r12
mov    %r14,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10c0 <scanf@plt>
movslq (%rsp),%rdi
add    $0x4,%rbx
cmp    %rdi,%rbp
jl     1280 <main+0xe0>
mov    %r13d,%esi
mov    %r14,%rdx
call   1070 <calc_resistance@plt>
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xdae(%rip),%rdi
mov    $0x1,%al
call   1090 <printf@plt>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1080 <calc_power_r@plt>
cvtss2sd %xmm0,%xmm0
lea    0xdab(%rip),%rdi
mov    $0x1,%al
call   1090 <printf@plt>
lea    0xdb4(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xc(%rsp),%rdi
movss  0x4(%rsp),%xmm0
call   1060 <e_resistance@plt>
test   %eax,%eax
jle    1376 <main+0x1d6>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdbe(%rip),%rdi
mov    $0x1,%al
call   1090 <printf@plt>
cmp    $0x1,%ebx
je     1376 <main+0x1d6>
mov    %ebx,%ebx
mov    $0x1,%ebp
lea    0xdaa(%rip),%r15
lea    0xd9d(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
movss  0xc(%rsp,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1090 <printf@plt>
add    $0x1,%rbp
cmp    %ebp,%ebx
jne    1350 <main+0x1b0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Electrotest 2015 HT - linUM at UMU\0A\00"
@.str.1 = [28 x i8] c"Ange sp\C3\A4nningsk\C3\A4lla (V): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [22 x i8] c"Ange koppling [s|p]: \00"
@.str.4 = [19 x i8] c"<Seriellkoppling>\0A\00"
@.str.5 = [21 x i8] c"<Parallellkoppling>\0A\00"
@.str.6 = [25 x i8] c"Ange antal komponenter: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [35 x i8] c"Ange resistans f\C3\B6r komponent %d: \00"
@.str.9 = [32 x i8] c"\0AErs\C3\A4ttningsresistans: %f Ohm\0A\00"
@.str.10 = [23 x i8] c"Effekten \C3\A4r: %f Watt\0A\00"
@.str.11 = [56 x i8] c"Ers\C3\A4ttningsresistanser i E12-serien kopplade i serie: \00"
@.str.12 = [6 x i8] c"%1.0f\00"
@.str.13 = [3 x i8] c", \00"
@.str.14 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca i8
%8 = alloca [3 x float]
%9 = alloca float*
%10 = alloca float*
%11 = alloca float
store i32 0, i32* %1
store i8 32, i8* %7
%12 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
store float* %12, float** %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %6)
br label %16
16: ; preds = %36, %0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%18 = call signext i8 (...) @getchar()
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %7
%20 = load i8, i8* %7
%21 = sext i8 %20 to i32
switch i32 %21, label %26 [
i32 115, label %22
i32 112, label %24
]
22: ; preds = %16
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %27
24: ; preds = %16
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %27
26: ; preds = %16
br label %27
27: ; preds = %26, %24, %22
br label %28
28: ; preds = %27
%29 = load i8, i8* %7
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 112
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i8, i8* %7
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 115
br label %36
36: ; preds = %32, %28
%37 = phi i1 [ false, %28 ], [ %35, %32 ]
br i1 %37, label %16, label %38
38: ; preds = %36
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = mul i64 4, %42
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to float*
store float* %46, float** %10
store i32 0, i32* %3
br label %47
47: ; preds = %60, %38
%48 = load i32, i32* %3
%49 = load i32, i32* %2
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %63
51: ; preds = %47
%52 = load i32, i32* %3
%53 = add nsw i32 %52, 1
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %53)
%55 = load float*, float** %10
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds float, float* %55, i64 %57
%59 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %58)
br label %60
60: ; preds = %51
%61 = load i32, i32* %3
%62 = add nsw i32 %61, 1
store i32 %62, i32* %3
br label %47
63: ; preds = %47
%64 = load i32, i32* %2
%65 = load i8, i8* %7
%66 = load float*, float** %10
%67 = call float @calc_resistance(i32 %64, i8 signext %65, float* %66)
store float %67, float* %11
%68 = load float, float* %11
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), double %69)
%71 = load float, float* %6
%72 = load float, float* %11
%73 = call float @calc_power_r(float %71, float %72)
store float %73, float* %5
%74 = load float, float* %5
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0))
%78 = load float, float* %11
%79 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%80 = call i32 @e_resistance(float %78, float* %79)
store i32 %80, i32* %4
br label %81
81: ; preds = %95, %63
%82 = load i32, i32* %4
%83 = icmp sgt i32 %82, 0
br i1 %83, label %84, label %98
84: ; preds = %81
%85 = load float*, float** %9
%86 = getelementptr inbounds float, float* %85, i32 1
store float* %86, float** %9
%87 = load float, float* %85
%88 = fpext float %87 to double
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), double %88)
%90 = load i32, i32* %4
%91 = icmp sgt i32 %90, 1
br i1 %91, label %92, label %94
92: ; preds = %84
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %94
94: ; preds = %92, %84
br label %95
95: ; preds = %94
%96 = load i32, i32* %4
%97 = add nsw i32 %96, -1
store i32 %97, i32* %4
br label %81
98: ; preds = %81
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%100 = load float*, float** %10
%101 = call i32 @free(float* %100)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"Ange sp\C3\A4nningsk\C3\A4lla (V): \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [22 x i8] c"Ange koppling [s|p]: \00"
@.str.6 = [25 x i8] c"Ange antal komponenter: \00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [35 x i8] c"Ange resistans f\C3\B6r komponent %d: \00"
@.str.9 = [32 x i8] c"\0AErs\C3\A4ttningsresistans: %f Ohm\0A\00"
@.str.10 = [23 x i8] c"Effekten \C3\A4r: %f Watt\0A\00"
@.str.11 = [56 x i8] c"Ers\C3\A4ttningsresistanser i E12-serien kopplade i serie: \00"
@.str.12 = [6 x i8] c"%1.0f\00"
@.str.13 = [3 x i8] c", \00"
@str = [35 x i8] c"Electrotest 2015 HT - linUM at UMU\00"
@str.15 = [20 x i8] c"<Parallellkoppling>\00"
@str.16 = [18 x i8] c"<Seriellkoppling>\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [3 x float]
%4 = bitcast i32* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast [3 x float]* %3 to i8*
%7 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
br label %11
11: ; preds = %20, %0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%13 = call signext i8 (...) @getchar()
%14 = call signext i8 (...) @getchar()
%15 = sext i8 %14 to i32
switch i32 %15, label %20 [
i32 115, label %17
i32 112, label %16
]
16: ; preds = %11
br label %17
17: ; preds = %11, %16
%18 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.16, i64 0, i64 0), %11 ]
%19 = call i32 @puts(i8* dereferenceable(1) %18)
br label %20
20: ; preds = %17, %11
switch i8 %14, label %11 [
i8 115, label %21
i8 112, label %21
]
21: ; preds = %20, %20
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %1)
%24 = load i32, i32* %1
%25 = shl i32 %24, 2
%26 = call i64 @malloc(i32 %25)
%27 = inttoptr i64 %26 to float*
%28 = load i32, i32* %1
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %40
30: ; preds = %21, %30
%31 = phi i64 [ %32, %30 ], [ 0, %21 ]
%32 = add nuw nsw i64 %31, 1
%33 = trunc i64 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds float, float* %27, i64 %31
%36 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %35)
%37 = load i32, i32* %1
%38 = sext i32 %37 to i64
%39 = icmp slt i64 %32, %38
br i1 %39, label %30, label %40
40: ; preds = %30, %21
%41 = phi i32 [ %28, %21 ], [ %37, %30 ]
%42 = call float @calc_resistance(i32 %41, i8 signext %14, float* %27)
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), double %43)
%45 = load float, float* %2
%46 = call float @calc_power_r(float %45, float %42)
%47 = fpext float %46 to double
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double %47)
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.11, i64 0, i64 0))
%50 = call i32 @e_resistance(float %42, float* %7)
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %67
52: ; preds = %40
%53 = load float, float* %7
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), double %54)
%56 = icmp eq i32 %50, 1
br i1 %56, label %67, label %57
57: ; preds = %52, %57
%58 = phi i32 [ %62, %57 ], [ %50, %52 ]
%59 = phi float* [ %60, %57 ], [ %7, %52 ]
%60 = getelementptr inbounds float, float* %59, i64 1
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
%62 = add nsw i32 %58, -1
%63 = load float, float* %60
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), double %64)
%66 = icmp eq i32 %62, 1
br i1 %66, label %67, label %57
67: ; preds = %57, %52, %40
%68 = call i32 @putchar(i32 10)
%69 = call i32 @free(float* %27)
ret i32 0
}