#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 */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
double atof(char *);
scalar_t__ clock();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ ipr_load_pgm(unsigned char **, char *);
int /*<<< orphan*/ ipr_save_pgm(unsigned char **, char *);
double pow(double, double);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  unsigned char src_image[256][256];
  unsigned char dst_image[256][256];
  int x, y, i;
  double gamma;
  clock_t start1, end1;
  if (argc != 4) {
    fprintf(stderr, "Usage: %s source destination\n", argv[0]);
    exit(1);
  }
  ipr_load_pgm(src_image, argv[1]);
  gamma = atof(argv[2]);
  printf("%f\n", gamma);
  double gm = 1.0 / gamma;
  start1 = clock();
  for (y = 0; y < 256; y++) {
    for (x = 0; x < 256; x++) {
      dst_image[y][x] = pow(((double)src_image[y][x] / 255.0), gm) * 255.0;
    }
  }
  end1 = clock();
  printf("Calculation:%.2f[ms]\n", (double)(end1 - start1) / CLOCKS_PER_SEC);
  int lut[256];
  for (i = 0; i < 256; i++) {
    lut[i] = pow(((double)i / 255.0), gm) * 255.0;
  }
  start1 = clock();
  for (y = 0; y < 256; y++) {
    for (x = 0; x < 256; x++) {
      dst_image[y][x] = lut[src_image[y][x]];
    }
  }
  end1 = clock();
  ipr_save_pgm(dst_image, argv[3]);
  printf("LUT use:%.2f[ms]\n", (double)(end1 - start1) / CLOCKS_PER_SEC);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20450,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11c9 <main+0x49>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe56(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    -0x10010(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <ipr_load_pgm@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atof@plt>
movsd  %xmm0,-0x20028(%rbp)
ff
movsd  -0x20028(%rbp),%xmm0
ff
lea    0xe2d(%rip),%rdi
call   1060 <printf@plt>
movsd  0xdf2(%rip),%xmm0
divsd  -0x20028(%rbp),%xmm0
ff
movsd  %xmm0,-0x20040(%rbp)
ff
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x20030(%rbp)
movl   $0x0,-0x20018(%rbp)
cmpl   $0x100,-0x20018(%rbp)
jge    1301 <main+0x181>
movl   $0x0,-0x20014(%rbp)
cmpl   $0x100,-0x20014(%rbp)
jge    12e8 <main+0x168>
movslq -0x20018(%rbp),%rax
shl    $0x8,%rax
lea    -0x10010(%rbp,%rax,1),%rcx
ff
movslq -0x20014(%rbp),%rax
movzbl (%rax,%rcx,1),%eax
cvtsi2sd %eax,%xmm0
movsd  0xd7e(%rip),%xmm1
movsd  %xmm1,-0x20448(%rbp)
ff
divsd  %xmm1,%xmm0
movsd  -0x20040(%rbp),%xmm1
ff
call   1090 <pow@plt>
movsd  -0x20448(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %al,%dl
movslq -0x20018(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x20014(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20014(%rbp)
jmp    1250 <main+0xd0>
jmp    12ed <main+0x16d>
mov    -0x20018(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20018(%rbp)
jmp    1236 <main+0xb6>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x20038(%rbp)
mov    -0x20038(%rbp),%rax
sub    -0x20030(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2cbf(%rip),%rax
divsd  (%rax),%xmm0
lea    0xcfe(%rip),%rdi
call   1060 <printf@plt>
movl   $0x0,-0x2001c(%rbp)
cmpl   $0x100,-0x2001c(%rbp)
jge    13a6 <main+0x226>
cvtsi2sdl -0x2001c(%rbp),%xmm0
ff
movsd  0xca5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x20040(%rbp),%xmm1
ff
call   1090 <pow@plt>
movsd  0xc8c(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
movslq -0x2001c(%rbp),%rax
mov    %ecx,-0x20440(%rbp,%rax,4)
mov    -0x2001c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2001c(%rbp)
jmp    1343 <main+0x1c3>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x20030(%rbp)
movl   $0x0,-0x20018(%rbp)
cmpl   $0x100,-0x20018(%rbp)
jge    145d <main+0x2dd>
movl   $0x0,-0x20014(%rbp)
cmpl   $0x100,-0x20014(%rbp)
jge    1444 <main+0x2c4>
movslq -0x20018(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x20014(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x20440(%rbp,%rax,4),%eax
mov    %al,%dl
movslq -0x20018(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x20014(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20014(%rbp)
jmp    13d8 <main+0x258>
jmp    1449 <main+0x2c9>
mov    -0x20018(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20018(%rbp)
jmp    13be <main+0x23e>
mov    $0x0,%al
call   1050 <clock@plt>
mov    %rax,-0x20038(%rbp)
lea    -0x20010(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
call   1080 <ipr_save_pgm@plt>
mov    -0x20038(%rbp),%rax
sub    -0x20030(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2b4f(%rip),%rax
divsd  (%rax),%xmm0
lea    0xba4(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x20450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20418,%rsp
mov    %rsi,%r14
cmp    $0x4,%edi
jne    13bd <main+0x23d>
mov    0x8(%r14),%rsi
lea    0x10410(%rsp),%r13
mov    %r13,%rdi
call   1030 <ipr_load_pgm@plt>
mov    0x10(%r14),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x8(%rsp)
lea    0xe67(%rip),%rdi
call   1060 <printf@plt>
movsd  0xe2c(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %r12d,%r12d
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r15
lea    0x410(%rsp),%rbx
movsd  0xe0b(%rip),%xmm1
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x0(%r13,%rbp,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
call   1090 <pow@plt>
movsd  0xdd4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %al,(%rbx,%rbp,1)
add    $0x1,%rbp
cmp    $0x100,%rbp
jne    1210 <main+0x90>
add    $0x1,%r12
add    $0x100,%r13
add    $0x100,%rbx
cmp    $0x100,%r12
jne    1200 <main+0x80>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clock@plt>
sub    %r15,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x2d66(%rip),%r12
divsd  (%r12),%xmm0
lea    0xda3(%rip),%rdi
call   1060 <printf@plt>
movsd  0xd6c(%rip),%xmm1
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
call   1090 <pow@plt>
mulsd  0xd4a(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x10(%rsp,%rbx,4)
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0xd30(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1090 <pow@plt>
movsd  0xd1d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x14(%rsp,%rbx,4)
add    $0x2,%rbx
cmp    $0x100,%rbx
jne    12a0 <main+0x120>
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%r15
lea    0x10411(%rsp),%rax
lea    0x411(%rsp),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl -0x1(%rax,%rdx,1),%esi
movzbl 0x10(%rsp,%rsi,4),%ebx
mov    %bl,-0x1(%rcx,%rdx,1)
movzbl (%rax,%rdx,1),%esi
movzbl 0x10(%rsp,%rsi,4),%ebx
mov    %bl,(%rcx,%rdx,1)
add    $0x2,%rdx
cmp    $0x100,%rdx
jne    1330 <main+0x1b0>
add    $0x1,%rbp
add    $0x100,%rax
add    $0x100,%rcx
cmp    $0x100,%rbp
jne    1320 <main+0x1a0>
xor    %eax,%eax
call   1050 <clock@plt>
mov    %rax,%rbx
mov    0x18(%r14),%rsi
lea    0x410(%rsp),%rdi
call   1080 <ipr_save_pgm@plt>
sub    %r15,%rbx
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
divsd  (%r12),%xmm0
lea    0xca4(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x20418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c14(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xc40(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: %s source destination\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@.str.2 = [22 x i8] c"Calculation:%.2f[ms]\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.3 = [18 x i8] c"LUT use:%.2f[ms]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [256 x [256 x i8]]
%7 = alloca [256 x [256 x i8]]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca i64
%13 = alloca i64
%14 = alloca double
%15 = alloca [256 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 4
br i1 %17, label %18, label %25
18: ; preds = %2
%19 = load i32, i32* @stderr
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = call i32 @exit(i32 1)
unreachable
25: ; preds = %2
%26 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 0
%27 = bitcast [256 x i8]* %26 to i8**
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = load i8*, i8** %29
%31 = call i32 @ipr_load_pgm(i8** %27, i8* %30)
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 2
%34 = load i8*, i8** %33
%35 = call double @atof(i8* %34)
store double %35, double* %11
%36 = load double, double* %11
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %36)
%38 = load double, double* %11
%39 = fdiv double 1.000000e+00, %38
store double %39, double* %14
%40 = call i64 (...) @clock()
store i64 %40, i64* %12
store i32 0, i32* %9
br label %41
41: ; preds = %72, %25
%42 = load i32, i32* %9
%43 = icmp slt i32 %42, 256
br i1 %43, label %44, label %75
44: ; preds = %41
store i32 0, i32* %8
br label %45
45: ; preds = %68, %44
%46 = load i32, i32* %8
%47 = icmp slt i32 %46, 256
br i1 %47, label %48, label %71
48: ; preds = %45
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 %50
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %51, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = uitofp i8 %55 to double
%57 = fdiv double %56, 2.550000e+02
%58 = load double, double* %14
%59 = call double @pow(double %57, double %58)
%60 = fmul double %59, 2.550000e+02
%61 = fptoui double %60 to i8
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 %63
%65 = load i32, i32* %8
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [256 x i8], [256 x i8]* %64, i64 0, i64 %66
store i8 %61, i8* %67
br label %68
68: ; preds = %48
%69 = load i32, i32* %8
%70 = add nsw i32 %69, 1
store i32 %70, i32* %8
br label %45
71: ; preds = %45
br label %72
72: ; preds = %71
%73 = load i32, i32* %9
%74 = add nsw i32 %73, 1
store i32 %74, i32* %9
br label %41
75: ; preds = %41
%76 = call i64 (...) @clock()
store i64 %76, i64* %13
%77 = load i64, i64* %13
%78 = load i64, i64* %12
%79 = sub nsw i64 %77, %78
%80 = sitofp i64 %79 to double
%81 = load double, double* @CLOCKS_PER_SEC
%82 = fdiv double %80, %81
%83 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %82)
store i32 0, i32* %10
br label %84
84: ; preds = %98, %75
%85 = load i32, i32* %10
%86 = icmp slt i32 %85, 256
br i1 %86, label %87, label %101
87: ; preds = %84
%88 = load i32, i32* %10
%89 = sitofp i32 %88 to double
%90 = fdiv double %89, 2.550000e+02
%91 = load double, double* %14
%92 = call double @pow(double %90, double %91)
%93 = fmul double %92, 2.550000e+02
%94 = fptosi double %93 to i32
%95 = load i32, i32* %10
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [256 x i32], [256 x i32]* %15, i64 0, i64 %96
store i32 %94, i32* %97
br label %98
98: ; preds = %87
%99 = load i32, i32* %10
%100 = add nsw i32 %99, 1
store i32 %100, i32* %10
br label %84
101: ; preds = %84
%102 = call i64 (...) @clock()
store i64 %102, i64* %12
store i32 0, i32* %9
br label %103
103: ; preds = %132, %101
%104 = load i32, i32* %9
%105 = icmp slt i32 %104, 256
br i1 %105, label %106, label %135
106: ; preds = %103
store i32 0, i32* %8
br label %107
107: ; preds = %128, %106
%108 = load i32, i32* %8
%109 = icmp slt i32 %108, 256
br i1 %109, label %110, label %131
110: ; preds = %107
%111 = load i32, i32* %9
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 %112
%114 = load i32, i32* %8
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [256 x i8], [256 x i8]* %113, i64 0, i64 %115
%117 = load i8, i8* %116
%118 = zext i8 %117 to i64
%119 = getelementptr inbounds [256 x i32], [256 x i32]* %15, i64 0, i64 %118
%120 = load i32, i32* %119
%121 = trunc i32 %120 to i8
%122 = load i32, i32* %9
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 %123
%125 = load i32, i32* %8
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [256 x i8], [256 x i8]* %124, i64 0, i64 %126
store i8 %121, i8* %127
br label %128
128: ; preds = %110
%129 = load i32, i32* %8
%130 = add nsw i32 %129, 1
store i32 %130, i32* %8
br label %107
131: ; preds = %107
br label %132
132: ; preds = %131
%133 = load i32, i32* %9
%134 = add nsw i32 %133, 1
store i32 %134, i32* %9
br label %103
135: ; preds = %103
%136 = call i64 (...) @clock()
store i64 %136, i64* %13
%137 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 0
%138 = bitcast [256 x i8]* %137 to i8**
%139 = load i8**, i8*** %5
%140 = getelementptr inbounds i8*, i8** %139, i64 3
%141 = load i8*, i8** %140
%142 = call i32 @ipr_save_pgm(i8** %138, i8* %141)
%143 = load i64, i64* %13
%144 = load i64, i64* %12
%145 = sub nsw i64 %143, %144
%146 = sitofp i64 %145 to double
%147 = load double, double* @CLOCKS_PER_SEC
%148 = fdiv double %146, %147
%149 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %148)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: %s source destination\0A\00"
@.str.1 = [4 x i8] c"%f\0A\00"
@.str.2 = [22 x i8] c"Calculation:%.2f[ms]\0A\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.3 = [18 x i8] c"LUT use:%.2f[ms]\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [256 x [256 x i8]]
%4 = alloca [256 x [256 x i8]]
%5 = alloca [256 x i32]
%6 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 0, i64 0
%7 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 0, i64 0
%8 = icmp eq i32 %0, 4
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %2
%15 = bitcast [256 x [256 x i8]]* %3 to i8**
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @ipr_load_pgm(i8** %15, i8* %17)
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = call double @atof(i8* %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %21)
%23 = fdiv double 1.000000e+00, %21
%24 = call i64 (...) @clock()
br label %25
25: ; preds = %14, %39
%26 = phi i64 [ 0, %14 ], [ %40, %39 ]
br label %27
27: ; preds = %25, %27
%28 = phi i64 [ 0, %25 ], [ %37, %27 ]
%29 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %26, i64 %28
%30 = load i8, i8* %29
%31 = uitofp i8 %30 to double
%32 = fdiv double %31, 2.550000e+02
%33 = call double @pow(double %32, double %23)
%34 = fmul double %33, 2.550000e+02
%35 = fptoui double %34 to i8
%36 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %26, i64 %28
store i8 %35, i8* %36
%37 = add nuw nsw i64 %28, 1
%38 = icmp eq i64 %37, 256
br i1 %38, label %39, label %27
39: ; preds = %27
%40 = add nuw nsw i64 %26, 1
%41 = icmp eq i64 %40, 256
br i1 %41, label %42, label %25
42: ; preds = %39
%43 = call i64 (...) @clock()
%44 = sub nsw i64 %43, %24
%45 = sitofp i64 %44 to double
%46 = load double, double* @CLOCKS_PER_SEC
%47 = fdiv double %45, %46
%48 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double %47)
%49 = bitcast [256 x i32]* %5 to i8*
br label %50
50: ; preds = %50, %42
%51 = phi i64 [ 0, %42 ], [ %67, %50 ]
%52 = trunc i64 %51 to i32
%53 = sitofp i32 %52 to double
%54 = fdiv double %53, 2.550000e+02
%55 = call double @pow(double %54, double %23)
%56 = fmul double %55, 2.550000e+02
%57 = fptosi double %56 to i32
%58 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %51
store i32 %57, i32* %58
%59 = or i64 %51, 1
%60 = trunc i64 %59 to i32
%61 = sitofp i32 %60 to double
%62 = fdiv double %61, 2.550000e+02
%63 = call double @pow(double %62, double %23)
%64 = fmul double %63, 2.550000e+02
%65 = fptosi double %64 to i32
%66 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %59
store i32 %65, i32* %66
%67 = add nuw nsw i64 %51, 2
%68 = icmp eq i64 %67, 256
br i1 %68, label %69, label %50
69: ; preds = %50
%70 = call i64 (...) @clock()
br label %71
71: ; preds = %69, %92
%72 = phi i64 [ 0, %69 ], [ %93, %92 ]
br label %73
73: ; preds = %73, %71
%74 = phi i64 [ 0, %71 ], [ %90, %73 ]
%75 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %72, i64 %74
%76 = load i8, i8* %75
%77 = zext i8 %76 to i64
%78 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = trunc i32 %79 to i8
%81 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %72, i64 %74
store i8 %80, i8* %81
%82 = or i64 %74, 1
%83 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %72, i64 %82
%84 = load i8, i8* %83
%85 = zext i8 %84 to i64
%86 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = trunc i32 %87 to i8
%89 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %72, i64 %82
store i8 %88, i8* %89
%90 = add nuw nsw i64 %74, 2
%91 = icmp eq i64 %90, 256
br i1 %91, label %92, label %73
92: ; preds = %73
%93 = add nuw nsw i64 %72, 1
%94 = icmp eq i64 %93, 256
br i1 %94, label %95, label %71
95: ; preds = %92
%96 = call i64 (...) @clock()
%97 = bitcast [256 x [256 x i8]]* %4 to i8**
%98 = getelementptr inbounds i8*, i8** %1, i64 3
%99 = load i8*, i8** %98
%100 = call i32 @ipr_save_pgm(i8** %97, i8* %99)
%101 = sub nsw i64 %96, %70
%102 = sitofp i64 %101 to double
%103 = load double, double* @CLOCKS_PER_SEC
%104 = fdiv double %102, %103
%105 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), double %104)
ret i32 0
}