#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int abs(float);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, long, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void *malloc(int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *, int *);
char *strtok(char *, char *);
int main() {
  FILE *image_data = fopen("output_image", "r");
  fseek(image_data, 0L, SEEK_END);
  long numbytes = ftell(image_data);
  char *buffer = malloc(sizeof(char) * numbytes);
  fseek(image_data, 0L, SEEK_SET);
  fread(buffer, sizeof(char), numbytes, image_data);
  fclose(image_data);
  FILE *input_data = fopen("csv_data", "r");
  fseek(input_data, 0L, SEEK_END);
  numbytes = ftell(input_data);
  char *buffer2 = malloc(sizeof(char) * numbytes);
  fseek(input_data, 0L, SEEK_SET);
  fread(buffer2, sizeof(char), numbytes, image_data);
  fclose(image_data);
  int *radius = malloc(sizeof(int) * 1024);
  int *x = malloc(sizeof(int) * 1024);
  int *y = malloc(sizeof(int) * 1024);
  int linecount = 0;
  char *line = strtok(buffer2, "\n");
  while (line != NULL) {
    int a, b, c;
    sscanf(line, "%d %d %d", &a, &b, &c);
    radius[linecount] = a;
    x[linecount] = b;
    y[linecount] = c;
    linecount++;
    line = strtok(NULL, "\n");
  }
  int width = 2668;
  int height = 1494;
  int i, j, k;
  float *lightness_map = malloc(sizeof(float) * width * height);
  for (i = 0; i < height; i++) {
    for (j = 0; j < width; j++) {
      float lightness = 0.0f;
      for (k = 0; k < linecount; k++) {
        float dx = x[k] - j;
        float dy = y[k] - i;
        float glow_radius = radius[k] / 11.0;
        if (dx != 0 || dy != 0) {
          if (dx * dx + dy * dy < 10000000000000.0f) {
            float per = glow_radius / (abs(dx * dx) + abs(dy * dy) + 300);
            lightness += per;
          }
        }
      }
      if (lightness > 1.0f)
        lightness = 1.0f;
      if (lightness < 0.3f)
        lightness = 0.3f;
      lightness_map[i * width + j] = lightness;
    }
  }
  float lightness;
  for (i = 0; i < height; i++) {
    for (j = 0; j < width; j++) {
      lightness = lightness_map[i * width + j];
      unsigned char b, c;
      unsigned char a = buffer[4 * (i * width + j)];
      a *= lightness;
      buffer[4 * (i * width + j)] = a;
      b = buffer[4 * (i * width + j) + 1];
      b *= lightness;
      buffer[4 * (i * width + j) + 1] = b;
      c = buffer[4 * (i * width + j) + 2];
      c *= lightness;
      buffer[4 * (i * width + j) + 2] = c;
    }
  }
  FILE *out = fopen("output_pixel_data", "w");
  fwrite(buffer, sizeof(char), 4 * width * height, out);
  fclose(out);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe5f(%rip),%rdi
lea    0xe65(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e14(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1060 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2dce(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
lea    0xdec(%rip),%rdi
lea    0xde3(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2d92(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x28(%rbp),%rdi
call   1060 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2d4c(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1090 <fseek@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
mov    -0x10(%rbp),%rdi
call   1050 <fclose@plt>
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xd3e(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x0,-0x58(%rbp)
je     136e <main+0x1ce>
mov    -0x58(%rbp),%rdi
lea    0xd21(%rip),%rsi
lea    -0x5c(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x64(%rbp),%r8
call   1080 <sscanf@plt>
mov    -0x5c(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x60(%rbp),%edx
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x64(%rbp),%edx
mov    -0x48(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xcd0(%rip),%rsi
call   10b0 <strtok@plt>
mov    %rax,-0x58(%rbp)
jmp    12fb <main+0x15b>
movl   $0xa6c,-0x68(%rbp)
movl   $0x5d6,-0x6c(%rbp)
movslq -0x68(%rbp),%rax
shl    $0x2,%rax
movslq -0x6c(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    15ca <main+0x42a>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    15b7 <main+0x417>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movl   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    153d <main+0x39d>
mov    -0x40(%rbp),%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    -0x74(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x88(%rbp)
ff
mov    -0x48(%rbp),%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    -0x70(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
mov    -0x38(%rbp),%rax
movslq -0x78(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  0xbec(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    146d <main+0x2cd>
jp     146d <main+0x2cd>
movss  -0x8c(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    146d <main+0x2cd>
jp     146d <main+0x2cd>
jmp    152a <main+0x38a>
movss  -0x88(%rbp),%xmm1
ff
movss  -0x88(%rbp),%xmm2
ff
movss  -0x8c(%rbp),%xmm0
ff
mulss  -0x8c(%rbp),%xmm0
ff
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xb6b(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1525 <main+0x385>
movss  -0x90(%rbp),%xmm0
ff
movss  %xmm0,-0xb0(%rbp)
ff
movss  -0x88(%rbp),%xmm0
ff
mulss  -0x88(%rbp),%xmm0
ff
call   1040 <abs@plt>
mov    %eax,-0xac(%rbp)
movss  -0x8c(%rbp),%xmm0
ff
mulss  -0x8c(%rbp),%xmm0
ff
call   1040 <abs@plt>
movss  -0xb0(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0xac(%rbp),%eax
add    %ecx,%eax
add    $0x12c,%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  -0x94(%rbp),%xmm0
ff
addss  -0x84(%rbp),%xmm0
ff
movss  %xmm0,-0x84(%rbp)
ff
jmp    152a <main+0x38a>
jmp    152f <main+0x38f>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    13cf <main+0x22f>
movss  -0x84(%rbp),%xmm0
ff
movss  0xab3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1566 <main+0x3c6>
movss  0xaa2(%rip),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  0xa96(%rip),%xmm0
ucomiss -0x84(%rbp),%xmm0
jbe    158b <main+0x3eb>
movss  0xa81(%rip),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x84(%rbp),%xmm0
ff
mov    -0x80(%rbp),%rax
mov    -0x70(%rbp),%ecx
imul   -0x68(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    13b1 <main+0x211>
jmp    15bc <main+0x41c>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    139e <main+0x1fe>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    175b <main+0x5bb>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1748 <main+0x5a8>
mov    -0x80(%rbp),%rax
mov    -0x70(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   %edx,%ecx
mov    -0x74(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
mov    -0x20(%rbp),%rax
mov    -0x70(%rbp),%ecx
mov    -0x68(%rbp),%edx
imul   %edx,%ecx
mov    -0x74(%rbp),%edx
add    %edx,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x9b(%rbp)
movss  -0x98(%rbp),%xmm1
ff
movzbl -0x9b(%rbp),%eax
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,-0x9b(%rbp)
mov    -0x9b(%rbp),%dl
mov    -0x20(%rbp),%rax
mov    -0x70(%rbp),%ecx
mov    -0x68(%rbp),%esi
imul   %esi,%ecx
mov    -0x74(%rbp),%esi
add    %esi,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rcx
mov    -0x70(%rbp),%eax
mov    -0x68(%rbp),%edx
imul   %edx,%eax
mov    -0x74(%rbp),%edx
add    %edx,%eax
shl    $0x2,%eax
cltq
mov    0x1(%rax,%rcx,1),%al
mov    %al,-0x99(%rbp)
movss  -0x98(%rbp),%xmm1
ff
movzbl -0x99(%rbp),%eax
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,-0x99(%rbp)
mov    -0x99(%rbp),%dl
mov    -0x20(%rbp),%rcx
mov    -0x70(%rbp),%eax
mov    -0x68(%rbp),%esi
imul   %esi,%eax
mov    -0x74(%rbp),%esi
add    %esi,%eax
shl    $0x2,%eax
cltq
mov    %dl,0x1(%rax,%rcx,1)
mov    -0x20(%rbp),%rcx
mov    -0x70(%rbp),%eax
mov    -0x68(%rbp),%edx
imul   %edx,%eax
mov    -0x74(%rbp),%edx
add    %edx,%eax
shl    $0x2,%eax
cltq
mov    0x2(%rax,%rcx,1),%al
mov    %al,-0x9a(%rbp)
movss  -0x98(%rbp),%xmm1
movzbl -0x9a(%rbp),%eax
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,-0x9a(%rbp)
mov    -0x9a(%rbp),%dl
mov    -0x20(%rbp),%rax
mov    -0x70(%rbp),%ecx
imul   -0x68(%rbp),%ecx
add    -0x74(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    15e4 <main+0x444>
jmp    174d <main+0x5ad>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    15d1 <main+0x431>
lea    0x8d9(%rip),%rdi
lea    0x8e4(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x68(%rbp),%edx
shl    $0x2,%edx
imul   -0x6c(%rbp),%edx
mov    -0xa8(%rbp),%rcx
mov    $0x1,%esi
call   10c0 <fwrite@plt>
mov    -0xa8(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xe5f(%rip),%rdi
lea    0xe65(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r14
mov    0x2e1d(%rip),%r13
mov    0x0(%r13),%edx
xor    %ebx,%ebx
mov    %rax,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %r14,%rdi
call   1060 <ftell@plt>
mov    %rax,%rbp
mov    %ebp,%edi
call   1070 <malloc@plt>
mov    %rax,%r15
mov    0x2de1(%rip),%r12
mov    (%r12),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %r15,0x28(%rsp)
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbp,%rdx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
lea    0xdf7(%rip),%rdi
lea    0xdee(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbp
mov    0x0(%r13),%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %rbp,%rdi
call   1060 <ftell@plt>
mov    %rax,%r15
mov    %r15d,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    (%r12),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    $0x1000,%edi
call   1070 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0xd74(%rip),%rsi
mov    %r13,%rdi
call   10b0 <strtok@plt>
test   %rax,%rax
je     1327 <main+0x187>
xor    %ebx,%ebx
lea    0x1c(%rsp),%r13
lea    0xd59(%rip),%r15
mov    0x8(%rsp),%r12
nopl   0x0(%rax,%rax,1)
mov    %rax,%rdi
lea    0xd44(%rip),%rsi
lea    0x24(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %r13,%r8
call   1080 <sscanf@plt>
mov    0x24(%rsp),%eax
mov    %eax,0x0(%rbp,%rbx,4)
mov    0x20(%rsp),%eax
mov    %eax,(%r14,%rbx,4)
mov    0x1c(%rsp),%eax
mov    %eax,(%r12,%rbx,4)
add    $0x1,%rbx
xor    %edi,%edi
mov    %r15,%rsi
call   10b0 <strtok@plt>
test   %rax,%rax
jne    12e0 <main+0x140>
mov    $0xf34920,%edi
call   1070 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %ebx,%r15d
xor    %ebx,%ebx
movsd  0xcbd(%rip),%xmm3
movss  0xcbd(%rip),%xmm4
mov    0x8(%rsp),%r8
mov    %r14,0x40(%rsp)
jmp    1371 <main+0x1d1>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0x5d6,%rbx
je     149b <main+0x2fb>
imul   $0xa6c,%rbx,%rax
mov    %rax,0x38(%rsp)
xor    %r13d,%r13d
jmp    13c7 <main+0x227>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  0xc74(%rip),%xmm0
minss  %xmm5,%xmm0
movss  0xc6c(%rip),%xmm1
maxss  %xmm0,%xmm1
mov    0x38(%rsp),%rax
add    %r13,%rax
mov    0x30(%rsp),%rcx
movss  %xmm1,(%rcx,%rax,4)
add    $0x1,%r13
cmp    $0xa6c,%r13
je     1360 <main+0x1c0>
xorps  %xmm5,%xmm5
test   %r15,%r15
je     1390 <main+0x1f0>
xor    %r12d,%r12d
jmp    13e9 <main+0x249>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r12
cmp    %r12,%r15
je     1390 <main+0x1f0>
mov    (%r14,%r12,4),%eax
sub    %r13d,%eax
mov    (%r8,%r12,4),%ecx
sub    %ebx,%ecx
xorps  %xmm1,%xmm1
cvtsi2sdl 0x0(%rbp,%r12,4),%xmm1
divsd  %xmm3,%xmm1
mov    %eax,%edx
or     %ecx,%edx
je     13e0 <main+0x240>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
xorps  %xmm6,%xmm6
cvtsi2ss %ecx,%xmm6
mulss  %xmm6,%xmm6
mulss  %xmm0,%xmm0
movaps %xmm0,%xmm2
addss  %xmm6,%xmm2
ucomiss %xmm2,%xmm4
jbe    13e0 <main+0x240>
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x14(%rsp)
movss  %xmm5,0x18(%rsp)
movss  %xmm6,0x10(%rsp)
call   1040 <abs@plt>
mov    %rbp,%r14
mov    %eax,%ebp
movss  0x10(%rsp),%xmm0
call   1040 <abs@plt>
movss  0x18(%rsp),%xmm5
movss  0xba3(%rip),%xmm4
movsd  0xb93(%rip),%xmm3
mov    0x8(%rsp),%r8
lea    0x12c(%rbp,%rax,1),%eax
mov    %r14,%rbp
mov    0x40(%rsp),%r14
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x14(%rsp),%xmm1
divss  %xmm0,%xmm1
addss  %xmm1,%xmm5
jmp    13e0 <main+0x240>
mov    0x28(%rsp),%rbp
mov    %rbp,%rax
add    $0x2,%rax
xor    %edi,%edi
nopl   0x0(%rax)
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  (%rcx,%rdx,4),%xmm0
movzbl -0x2(%rax,%rdx,4),%esi
xorps  %xmm1,%xmm1
cvtsi2ss %esi,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    %sil,-0x2(%rax,%rdx,4)
movzbl -0x1(%rax,%rdx,4),%esi
xorps  %xmm1,%xmm1
cvtsi2ss %esi,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    %sil,-0x1(%rax,%rdx,4)
movzbl (%rax,%rdx,4),%esi
xorps  %xmm1,%xmm1
cvtsi2ss %esi,%xmm1
mulss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    %sil,(%rax,%rdx,4)
add    $0x1,%rdx
cmp    $0xa6c,%rdx
jne    14c0 <main+0x320>
add    $0x1,%rdi
add    $0x29b0,%rax
add    $0x29b0,%rcx
cmp    $0x5d6,%rdi
jne    14b0 <main+0x310>
lea    0xaf7(%rip),%rdi
lea    0xb02(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
mov    $0x1,%esi
mov    $0xf34920,%edx
mov    %rax,%rcx
call   10c0 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"output_image\00"
@.str.1 = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [9 x i8] c"csv_data\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [9 x i8] c"%d %d %d\00"
@.str.5 = [18 x i8] c"output_pixel_data\00"
@.str.6 = [2 x i8] c"w\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca float*
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
%25 = alloca float
%26 = alloca float
%27 = alloca i8
%28 = alloca i8
%29 = alloca i8
%30 = alloca i32*
store i32 0, i32* %1
%31 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %31, i32** %2
%32 = load i32*, i32** %2
%33 = load i32, i32* @SEEK_END
%34 = call i32 @fseek(i32* %32, i64 0, i32 %33)
%35 = load i32*, i32** %2
%36 = call i64 @ftell(i32* %35)
store i64 %36, i64* %3
%37 = load i64, i64* %3
%38 = mul i64 1, %37
%39 = trunc i64 %38 to i32
%40 = call i8* @malloc(i32 %39)
store i8* %40, i8** %4
%41 = load i32*, i32** %2
%42 = load i32, i32* @SEEK_SET
%43 = call i32 @fseek(i32* %41, i64 0, i32 %42)
%44 = load i8*, i8** %4
%45 = load i64, i64* %3
%46 = load i32*, i32** %2
%47 = call i32 @fread(i8* %44, i32 1, i64 %45, i32* %46)
%48 = load i32*, i32** %2
%49 = call i32 @fclose(i32* %48)
%50 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %50, i32** %5
%51 = load i32*, i32** %5
%52 = load i32, i32* @SEEK_END
%53 = call i32 @fseek(i32* %51, i64 0, i32 %52)
%54 = load i32*, i32** %5
%55 = call i64 @ftell(i32* %54)
store i64 %55, i64* %3
%56 = load i64, i64* %3
%57 = mul i64 1, %56
%58 = trunc i64 %57 to i32
%59 = call i8* @malloc(i32 %58)
store i8* %59, i8** %6
%60 = load i32*, i32** %5
%61 = load i32, i32* @SEEK_SET
%62 = call i32 @fseek(i32* %60, i64 0, i32 %61)
%63 = load i8*, i8** %6
%64 = load i64, i64* %3
%65 = load i32*, i32** %2
%66 = call i32 @fread(i8* %63, i32 1, i64 %64, i32* %65)
%67 = load i32*, i32** %2
%68 = call i32 @fclose(i32* %67)
%69 = call i8* @malloc(i32 4096)
%70 = bitcast i8* %69 to i32*
store i32* %70, i32** %7
%71 = call i8* @malloc(i32 4096)
%72 = bitcast i8* %71 to i32*
store i32* %72, i32** %8
%73 = call i8* @malloc(i32 4096)
%74 = bitcast i8* %73 to i32*
store i32* %74, i32** %9
store i32 0, i32* %10
%75 = load i8*, i8** %6
%76 = call i8* @strtok(i8* %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %76, i8** %11
br label %77
77: ; preds = %80, %0
%78 = load i8*, i8** %11
%79 = icmp ne i8* %78, null
br i1 %79, label %80, label %101
80: ; preds = %77
%81 = load i8*, i8** %11
%82 = call i32 @sscanf(i8* %81, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %12, i32* %13, i32* %14)
%83 = load i32, i32* %12
%84 = load i32*, i32** %7
%85 = load i32, i32* %10
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i32, i32* %84, i64 %86
store i32 %83, i32* %87
%88 = load i32, i32* %13
%89 = load i32*, i32** %8
%90 = load i32, i32* %10
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i32, i32* %89, i64 %91
store i32 %88, i32* %92
%93 = load i32, i32* %14
%94 = load i32*, i32** %9
%95 = load i32, i32* %10
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
store i32 %93, i32* %97
%98 = load i32, i32* %10
%99 = add nsw i32 %98, 1
store i32 %99, i32* %10
%100 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %100, i8** %11
br label %77
101: ; preds = %77
store i32 2668, i32* %15
store i32 1494, i32* %16
%102 = load i32, i32* %15
%103 = sext i32 %102 to i64
%104 = mul i64 4, %103
%105 = load i32, i32* %16
%106 = sext i32 %105 to i64
%107 = mul i64 %104, %106
%108 = trunc i64 %107 to i32
%109 = call i8* @malloc(i32 %108)
%110 = bitcast i8* %109 to float*
store float* %110, float** %20
store i32 0, i32* %17
br label %111
111: ; preds = %207, %101
%112 = load i32, i32* %17
%113 = load i32, i32* %16
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %210
115: ; preds = %111
store i32 0, i32* %18
br label %116
116: ; preds = %203, %115
%117 = load i32, i32* %18
%118 = load i32, i32* %15
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %206
120: ; preds = %116
store float 0.000000e+00, float* %21
store i32 0, i32* %19
br label %121
121: ; preds = %182, %120
%122 = load i32, i32* %19
%123 = load i32, i32* %10
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %185
125: ; preds = %121
%126 = load i32*, i32** %8
%127 = load i32, i32* %19
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
%130 = load i32, i32* %129
%131 = load i32, i32* %18
%132 = sub nsw i32 %130, %131
%133 = sitofp i32 %132 to float
store float %133, float* %22
%134 = load i32*, i32** %9
%135 = load i32, i32* %19
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i32, i32* %134, i64 %136
%138 = load i32, i32* %137
%139 = load i32, i32* %17
%140 = sub nsw i32 %138, %139
%141 = sitofp i32 %140 to float
store float %141, float* %23
%142 = load i32*, i32** %7
%143 = load i32, i32* %19
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds i32, i32* %142, i64 %144
%146 = load i32, i32* %145
%147 = sitofp i32 %146 to double
%148 = fdiv double %147, 1.100000e+01
%149 = fptrunc double %148 to float
store float %149, float* %24
%150 = load float, float* %22
%151 = fcmp une float %150, 0.000000e+00
br i1 %151, label %155, label %152
152: ; preds = %125
%153 = load float, float* %23
%154 = fcmp une float %153, 0.000000e+00
br i1 %154, label %155, label %181
155: ; preds = %152, %125
%156 = load float, float* %22
%157 = load float, float* %22
%158 = load float, float* %23
%159 = load float, float* %23
%160 = fmul float %158, %159
%161 = call float @llvm.fmuladd.f32(float %156, float %157, float %160)
%162 = fcmp olt float %161, 0x42A2309CE0000000
br i1 %162, label %163, label %180
163: ; preds = %155
%164 = load float, float* %24
%165 = load float, float* %22
%166 = load float, float* %22
%167 = fmul float %165, %166
%168 = call i32 @abs(float %167)
%169 = load float, float* %23
%170 = load float, float* %23
%171 = fmul float %169, %170
%172 = call i32 @abs(float %171)
%173 = add nsw i32 %168, %172
%174 = add nsw i32 %173, 300
%175 = sitofp i32 %174 to float
%176 = fdiv float %164, %175
store float %176, float* %25
%177 = load float, float* %25
%178 = load float, float* %21
%179 = fadd float %178, %177
store float %179, float* %21
br label %180
180: ; preds = %163, %155
br label %181
181: ; preds = %180, %152
br label %182
182: ; preds = %181
%183 = load i32, i32* %19
%184 = add nsw i32 %183, 1
store i32 %184, i32* %19
br label %121
185: ; preds = %121
%186 = load float, float* %21
%187 = fcmp ogt float %186, 1.000000e+00
br i1 %187, label %188, label %189
188: ; preds = %185
store float 1.000000e+00, float* %21
br label %189
189: ; preds = %188, %185
%190 = load float, float* %21
%191 = fcmp olt float %190, 0x3FD3333340000000
br i1 %191, label %192, label %193
192: ; preds = %189
store float 0x3FD3333340000000, float* %21
br label %193
193: ; preds = %192, %189
%194 = load float, float* %21
%195 = load float*, float** %20
%196 = load i32, i32* %17
%197 = load i32, i32* %15
%198 = mul nsw i32 %196, %197
%199 = load i32, i32* %18
%200 = add nsw i32 %198, %199
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds float, float* %195, i64 %201
store float %194, float* %202
br label %203
203: ; preds = %193
%204 = load i32, i32* %18
%205 = add nsw i32 %204, 1
store i32 %205, i32* %18
br label %116
206: ; preds = %116
br label %207
207: ; preds = %206
%208 = load i32, i32* %17
%209 = add nsw i32 %208, 1
store i32 %209, i32* %17
br label %111
210: ; preds = %111
store i32 0, i32* %17
br label %211
211: ; preds = %313, %210
%212 = load i32, i32* %17
%213 = load i32, i32* %16
%214 = icmp slt i32 %212, %213
br i1 %214, label %215, label %316
215: ; preds = %211
store i32 0, i32* %18
br label %216
216: ; preds = %309, %215
%217 = load i32, i32* %18
%218 = load i32, i32* %15
%219 = icmp slt i32 %217, %218
br i1 %219, label %220, label %312
220: ; preds = %216
%221 = load float*, float** %20
%222 = load i32, i32* %17
%223 = load i32, i32* %15
%224 = mul nsw i32 %222, %223
%225 = load i32, i32* %18
%226 = add nsw i32 %224, %225
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds float, float* %221, i64 %227
%229 = load float, float* %228
store float %229, float* %26
%230 = load i8*, i8** %4
%231 = load i32, i32* %17
%232 = load i32, i32* %15
%233 = mul nsw i32 %231, %232
%234 = load i32, i32* %18
%235 = add nsw i32 %233, %234
%236 = mul nsw i32 4, %235
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds i8, i8* %230, i64 %237
%239 = load i8, i8* %238
store i8 %239, i8* %29
%240 = load float, float* %26
%241 = load i8, i8* %29
%242 = uitofp i8 %241 to float
%243 = fmul float %242, %240
%244 = fptoui float %243 to i8
store i8 %244, i8* %29
%245 = load i8, i8* %29
%246 = load i8*, i8** %4
%247 = load i32, i32* %17
%248 = load i32, i32* %15
%249 = mul nsw i32 %247, %248
%250 = load i32, i32* %18
%251 = add nsw i32 %249, %250
%252 = mul nsw i32 4, %251
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds i8, i8* %246, i64 %253
store i8 %245, i8* %254
%255 = load i8*, i8** %4
%256 = load i32, i32* %17
%257 = load i32, i32* %15
%258 = mul nsw i32 %256, %257
%259 = load i32, i32* %18
%260 = add nsw i32 %258, %259
%261 = mul nsw i32 4, %260
%262 = add nsw i32 %261, 1
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds i8, i8* %255, i64 %263
%265 = load i8, i8* %264
store i8 %265, i8* %27
%266 = load float, float* %26
%267 = load i8, i8* %27
%268 = uitofp i8 %267 to float
%269 = fmul float %268, %266
%270 = fptoui float %269 to i8
store i8 %270, i8* %27
%271 = load i8, i8* %27
%272 = load i8*, i8** %4
%273 = load i32, i32* %17
%274 = load i32, i32* %15
%275 = mul nsw i32 %273, %274
%276 = load i32, i32* %18
%277 = add nsw i32 %275, %276
%278 = mul nsw i32 4, %277
%279 = add nsw i32 %278, 1
%280 = sext i32 %279 to i64
%281 = getelementptr inbounds i8, i8* %272, i64 %280
store i8 %271, i8* %281
%282 = load i8*, i8** %4
%283 = load i32, i32* %17
%284 = load i32, i32* %15
%285 = mul nsw i32 %283, %284
%286 = load i32, i32* %18
%287 = add nsw i32 %285, %286
%288 = mul nsw i32 4, %287
%289 = add nsw i32 %288, 2
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds i8, i8* %282, i64 %290
%292 = load i8, i8* %291
store i8 %292, i8* %28
%293 = load float, float* %26
%294 = load i8, i8* %28
%295 = uitofp i8 %294 to float
%296 = fmul float %295, %293
%297 = fptoui float %296 to i8
store i8 %297, i8* %28
%298 = load i8, i8* %28
%299 = load i8*, i8** %4
%300 = load i32, i32* %17
%301 = load i32, i32* %15
%302 = mul nsw i32 %300, %301
%303 = load i32, i32* %18
%304 = add nsw i32 %302, %303
%305 = mul nsw i32 4, %304
%306 = add nsw i32 %305, 2
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds i8, i8* %299, i64 %307
store i8 %298, i8* %308
br label %309
309: ; preds = %220
%310 = load i32, i32* %18
%311 = add nsw i32 %310, 1
store i32 %311, i32* %18
br label %216
312: ; preds = %216
br label %313
313: ; preds = %312
%314 = load i32, i32* %17
%315 = add nsw i32 %314, 1
store i32 %315, i32* %17
br label %211
316: ; preds = %211
%317 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %317, i32** %30
%318 = load i8*, i8** %4
%319 = load i32, i32* %15
%320 = mul nsw i32 4, %319
%321 = load i32, i32* %16
%322 = mul nsw i32 %320, %321
%323 = load i32*, i32** %30
%324 = call i32 @fwrite(i8* %318, i32 1, i32 %322, i32* %323)
%325 = load i32*, i32** %30
%326 = call i32 @fclose(i32* %325)
%327 = load i32, i32* %1
ret i32 %327
}

LLVM IR (-O2):
@.str = [13 x i8] c"output_image\00"
@.str.1 = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.2 = [9 x i8] c"csv_data\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [9 x i8] c"%d %d %d\00"
@.str.5 = [18 x i8] c"output_pixel_data\00"
@.str.6 = [2 x i8] c"w\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32* %4, i64 0, i32 %5)
%7 = tail call i64 @ftell(i32* %4)
%8 = trunc i64 %7 to i32
%9 = tail call i8* @malloc(i32 %8)
%10 = load i32, i32* @SEEK_SET
%11 = tail call i32 @fseek(i32* %4, i64 0, i32 %10)
%12 = tail call i32 @fread(i8* %9, i32 1, i64 %7, i32* %4)
%13 = tail call i32 @fclose(i32* %4)
%14 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* @SEEK_END
%16 = tail call i32 @fseek(i32* %14, i64 0, i32 %15)
%17 = tail call i64 @ftell(i32* %14)
%18 = trunc i64 %17 to i32
%19 = tail call i8* @malloc(i32 %18)
%20 = load i32, i32* @SEEK_SET
%21 = tail call i32 @fseek(i32* %14, i64 0, i32 %20)
%22 = tail call i32 @fread(i8* %19, i32 1, i64 %17, i32* %4)
%23 = tail call i32 @fclose(i32* %4)
%24 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%25 = bitcast i8* %24 to i32*
%26 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%27 = bitcast i8* %26 to i32*
%28 = tail call dereferenceable_or_null(4096) i8* @malloc(i32 4096)
%29 = bitcast i8* %28 to i32*
%30 = tail call i8* @strtok(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%31 = icmp eq i8* %30, null
br i1 %31, label %51, label %32
32: ; preds = %0
%33 = bitcast i32* %1 to i8*
%34 = bitcast i32* %2 to i8*
%35 = bitcast i32* %3 to i8*
br label %36
36: ; preds = %32, %36
%37 = phi i64 [ 0, %32 ], [ %46, %36 ]
%38 = phi i8* [ %30, %32 ], [ %47, %36 ]
%39 = call i32 @sscanf(i8* %38, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%40 = load i32, i32* %1
%41 = getelementptr inbounds i32, i32* %25, i64 %37
store i32 %40, i32* %41
%42 = load i32, i32* %2
%43 = getelementptr inbounds i32, i32* %27, i64 %37
store i32 %42, i32* %43
%44 = load i32, i32* %3
%45 = getelementptr inbounds i32, i32* %29, i64 %37
store i32 %44, i32* %45
%46 = add nuw i64 %37, 1
%47 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%48 = icmp eq i8* %47, null
br i1 %48, label %49, label %36
49: ; preds = %36
%50 = trunc i64 %46 to i32
br label %51
51: ; preds = %49, %0
%52 = phi i32 [ 0, %0 ], [ %50, %49 ]
%53 = call dereferenceable_or_null(15943968) i8* @malloc(i32 15943968)
%54 = bitcast i8* %53 to float*
%55 = icmp eq i32 %52, 0
%56 = zext i32 %52 to i64
br label %57
57: ; preds = %51, %111
%58 = phi i64 [ 0, %51 ], [ %112, %111 ]
%59 = mul nuw nsw i64 %58, 2668
%60 = trunc i64 %58 to i32
br label %61
61: ; preds = %57, %101
%62 = phi i64 [ 0, %57 ], [ %109, %101 ]
br i1 %55, label %101, label %63
63: ; preds = %61
%64 = trunc i64 %62 to i32
br label %65
65: ; preds = %63, %97
%66 = phi i64 [ 0, %63 ], [ %99, %97 ]
%67 = phi float [ 0.000000e+00, %63 ], [ %98, %97 ]
%68 = getelementptr inbounds i32, i32* %27, i64 %66
%69 = load i32, i32* %68
%70 = sub nsw i32 %69, %64
%71 = sitofp i32 %70 to float
%72 = getelementptr inbounds i32, i32* %29, i64 %66
%73 = load i32, i32* %72
%74 = sub nsw i32 %73, %60
%75 = getelementptr inbounds i32, i32* %25, i64 %66
%76 = load i32, i32* %75
%77 = sitofp i32 %76 to double
%78 = fdiv double %77, 1.100000e+01
%79 = fptrunc double %78 to float
%80 = icmp ne i32 %70, 0
%81 = icmp ne i32 %74, 0
%82 = select i1 %80, i1 true, i1 %81
br i1 %82, label %83, label %97
83: ; preds = %65
%84 = sitofp i32 %74 to float
%85 = fmul float %84, %84
%86 = call float @llvm.fmuladd.f32(float %71, float %71, float %85)
%87 = fcmp olt float %86, 0x42A2309CE0000000
br i1 %87, label %88, label %97
88: ; preds = %83
%89 = fmul float %71, %71
%90 = call i32 @abs(float %89)
%91 = call i32 @abs(float %85)
%92 = add i32 %90, 300
%93 = add i32 %92, %91
%94 = sitofp i32 %93 to float
%95 = fdiv float %79, %94
%96 = fadd float %67, %95
br label %97
97: ; preds = %83, %88, %65
%98 = phi float [ %96, %88 ], [ %67, %83 ], [ %67, %65 ]
%99 = add nuw nsw i64 %66, 1
%100 = icmp eq i64 %99, %56
br i1 %100, label %101, label %65
101: ; preds = %97, %61
%102 = phi float [ 0.000000e+00, %61 ], [ %98, %97 ]
%103 = fcmp ogt float %102, 1.000000e+00
%104 = select i1 %103, float 1.000000e+00, float %102
%105 = fcmp olt float %104, 0x3FD3333340000000
%106 = select i1 %105, float 0x3FD3333340000000, float %104
%107 = add nuw nsw i64 %62, %59
%108 = getelementptr inbounds float, float* %54, i64 %107
store float %106, float* %108
%109 = add nuw nsw i64 %62, 1
%110 = icmp eq i64 %109, 2668
br i1 %110, label %111, label %61
111: ; preds = %101
%112 = add nuw nsw i64 %58, 1
%113 = icmp eq i64 %112, 1494
br i1 %113, label %114, label %57
114: ; preds = %111, %142
%115 = phi i64 [ %143, %142 ], [ 0, %111 ]
%116 = mul nuw nsw i64 %115, 2668
br label %117
117: ; preds = %114, %117
%118 = phi i64 [ 0, %114 ], [ %140, %117 ]
%119 = add nuw nsw i64 %118, %116
%120 = getelementptr inbounds float, float* %54, i64 %119
%121 = load float, float* %120
%122 = shl nsw i64 %119, 2
%123 = getelementptr inbounds i8, i8* %9, i64 %122
%124 = load i8, i8* %123
%125 = uitofp i8 %124 to float
%126 = fmul float %121, %125
%127 = fptoui float %126 to i8
store i8 %127, i8* %123
%128 = or i64 %122, 1
%129 = getelementptr inbounds i8, i8* %9, i64 %128
%130 = load i8, i8* %129
%131 = uitofp i8 %130 to float
%132 = fmul float %121, %131
%133 = fptoui float %132 to i8
store i8 %133, i8* %129
%134 = or i64 %122, 2
%135 = getelementptr inbounds i8, i8* %9, i64 %134
%136 = load i8, i8* %135
%137 = uitofp i8 %136 to float
%138 = fmul float %121, %137
%139 = fptoui float %138 to i8
store i8 %139, i8* %135
%140 = add nuw nsw i64 %118, 1
%141 = icmp eq i64 %140, 2668
br i1 %141, label %142, label %117
142: ; preds = %117
%143 = add nuw nsw i64 %115, 1
%144 = icmp eq i64 %143, 1494
br i1 %144, label %145, label %114
145: ; preds = %142
%146 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%147 = call i32 @fwrite(i8* %9, i32 1, i32 15943968, i32* %146)
%148 = call i32 @fclose(i32* %146)
ret i32 0
}