#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int);
int /*<<< orphan*/ fread(unsigned char **, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(unsigned char **, int, int, int /*<<< orphan*/ *);
int pow(double, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
char *strtok(char *, char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  unsigned char image[256][256];
  unsigned char image_w[256][256];
  int histgram[256] = {0};
  int mode;
  char *fn;
  FILE *fp;
  if (argc < 2) {
    printf("don't read filename\n");
    return 0;
  } else if (argc > 2) {
    printf("many arguments\n");
    return 0;
  } else {
    fp = fopen(argv[1], "rb");
    fread(image, sizeof(unsigned char), 256 * 256, fp);
    fclose(fp);
    fn = strtok(argv[1], ".");
    int sum = 0;
    for (int i = 0; i < 256; i++) {
      for (int j = 0; j < 256; j++) {
        histgram[image[i][j]]++;
        sum += image[i][j];
      }
    }
    double ave = sum / (256 * 256);
    double ave1, ave2;
    double max = 0.0;
    for (int i = 0; i < 256; i++) {
      int cnt1 = 0;
      int cnt2 = 0;
      long data = 0;
      double brkup1 = 0.0;
      double brkup2 = 0.0;
      double tmp = 0;
      for (int j = 0; j < i; j++) {
        cnt1 += histgram[j];
        data += histgram[j] * j;
      }
      if (cnt1 != 0) {
        ave1 = (double)data / (double)cnt1;
        for (int j = 0; j < i; j++) {
          brkup1 += pow((j - ave1), 2) * histgram[j];
        }
        brkup1 /= (double)cnt1;
      }
      data = 0;
      for (int j = i; j < 256; j++) {
        cnt2 += histgram[j];
        data += histgram[j] * j;
      }
      if (cnt2 != 0) {
        ave2 = (double)data / (double)cnt2;
        for (int j = i; j < 256; j++) {
          brkup2 += pow((j - ave2), 2) * histgram[j];
        }
        brkup2 /= (double)cnt2;
      }
      double class1 = (cnt1 * brkup1 + cnt2 * brkup2);
      double class2 = cnt1 * pow((ave1 - ave), 2) + cnt2 * pow((ave2 - ave), 2);
      tmp = class2 / class1;
      if (max < tmp) {
        max = tmp;
        mode = i;
      }
    }
    printf("閾値 = %d\n", mode);
    int newhist[256];
    for (int i = 0; i < 256; i++) {
      if (i < mode) {
        newhist[0]++;
      } else {
        newhist[255]++;
      }
    }
    for (int i = 0; i < 256; i++) {
      for (int j = 0; j < 256; j++) {
        if (image[i][j] > mode) {
          image_w[i][j] = 255;
        } else {
          image_w[i][j] = 0;
        }
      }
    }
    if (strcmp(fn, "girl") == 0) {
      fp = fopen("plot_ex2girl.dat", "wb");
    } else {
      fp = fopen("plot_ex2ei.dat", "wb");
    }
    for (int i = 0; i < 256; i++) {
      fprintf(fp, "%3d %3d\n", i, newhist[i]);
    }
    fclose(fp);
    if (strcmp(fn, "girl") == 0) {
      fp = fopen("girlex2_binary.dat", "wb");
    } else {
      fp = fopen("eiex2_binary.dat", "wb");
    }
    fwrite(image_w, sizeof(unsigned char), 256 * 256, fp);
    fclose(fp);
    if (strcmp(fn, "girl") == 0) {
      system("zsh ex2_girl.sh");
    } else {
      system("zsh ex2_ei.sh");
    }
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x208d0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
cmpl   $0x2,-0x8(%rbp)
jge    1200 <main+0x50>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    19f6 <main+0x846>
cmpl   $0x2,-0x8(%rbp)
jle    1224 <main+0x74>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    19f6 <main+0x846>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf2(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20428(%rbp)
lea    -0x10010(%rbp),%rdi
mov    -0x20428(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10000,%edx
call   1030 <fread@plt>
mov    -0x20428(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdb1(%rip),%rsi
call   10c0 <strtok@plt>
mov    %rax,-0x20420(%rbp)
movl   $0x0,-0x2042c(%rbp)
movl   $0x0,-0x20430(%rbp)
cmpl   $0x100,-0x20430(%rbp)
jge    134b <main+0x19b>
movl   $0x0,-0x20434(%rbp)
cmpl   $0x100,-0x20434(%rbp)
jge    1332 <main+0x182>
movslq -0x20430(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x20434(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x20410(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x20410(%rbp,%rax,4)
movslq -0x20430(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x20434(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
add    -0x2042c(%rbp),%eax
mov    %eax,-0x2042c(%rbp)
mov    -0x20434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20434(%rbp)
jmp    12b1 <main+0x101>
jmp    1337 <main+0x187>
mov    -0x20430(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20430(%rbp)
jmp    1297 <main+0xe7>
mov    -0x2042c(%rbp),%eax
mov    $0x10000,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20440(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20458(%rbp)
ff
movl   $0x0,-0x2045c(%rbp)
cmpl   $0x100,-0x2045c(%rbp)
jge    172c <main+0x57c>
movl   $0x0,-0x20460(%rbp)
movl   $0x0,-0x20464(%rbp)
movq   $0x0,-0x20470(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20478(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20480(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20488(%rbp)
ff
movl   $0x0,-0x2048c(%rbp)
mov    -0x2048c(%rbp),%eax
cmp    -0x2045c(%rbp),%eax
jge    1439 <main+0x289>
movslq -0x2048c(%rbp),%rax
mov    -0x20410(%rbp,%rax,4),%eax
add    -0x20460(%rbp),%eax
mov    %eax,-0x20460(%rbp)
movslq -0x2048c(%rbp),%rax
mov    -0x20410(%rbp,%rax,4),%eax
imul   -0x2048c(%rbp),%eax
cltq
add    -0x20470(%rbp),%rax
mov    %rax,-0x20470(%rbp)
mov    -0x2048c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2048c(%rbp)
jmp    13d4 <main+0x224>
cmpl   $0x0,-0x20460(%rbp)
je     14ec <main+0x33c>
cvtsi2sdq -0x20470(%rbp),%xmm0
fd ff
cvtsi2sdl -0x20460(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20448(%rbp)
ff
movl   $0x0,-0x20490(%rbp)
mov    -0x20490(%rbp),%eax
cmp    -0x2045c(%rbp),%eax
jge    14d0 <main+0x320>
cvtsi2sdl -0x20490(%rbp),%xmm0
ff
subsd  -0x20448(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10b0 <pow@plt>
movslq -0x20490(%rbp),%rcx
imul   -0x20410(%rbp,%rcx,4),%eax
ff
cvtsi2sd %eax,%xmm0
addsd  -0x20478(%rbp),%xmm0
ff
movsd  %xmm0,-0x20478(%rbp)
ff
mov    -0x20490(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20490(%rbp)
jmp    146d <main+0x2bd>
cvtsi2sdl -0x20460(%rbp),%xmm1
ff
movsd  -0x20478(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20478(%rbp)
ff
movq   $0x0,-0x20470(%rbp)
mov    -0x2045c(%rbp),%eax
mov    %eax,-0x20494(%rbp)
cmpl   $0x100,-0x20494(%rbp)
jge    1566 <main+0x3b6>
movslq -0x20494(%rbp),%rax
mov    -0x20410(%rbp,%rax,4),%eax
add    -0x20464(%rbp),%eax
mov    %eax,-0x20464(%rbp)
movslq -0x20494(%rbp),%rax
mov    -0x20410(%rbp,%rax,4),%eax
imul   -0x20494(%rbp),%eax
cltq
add    -0x20470(%rbp),%rax
mov    %rax,-0x20470(%rbp)
mov    -0x20494(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20494(%rbp)
jmp    1503 <main+0x353>
cmpl   $0x0,-0x20464(%rbp)
je     1619 <main+0x469>
cvtsi2sdq -0x20470(%rbp),%xmm0
fd ff
cvtsi2sdl -0x20464(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20450(%rbp)
ff
mov    -0x2045c(%rbp),%eax
mov    %eax,-0x20498(%rbp)
cmpl   $0x100,-0x20498(%rbp)
jge    15fd <main+0x44d>
cvtsi2sdl -0x20498(%rbp),%xmm0
ff
subsd  -0x20450(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10b0 <pow@plt>
movslq -0x20498(%rbp),%rcx
imul   -0x20410(%rbp,%rcx,4),%eax
ff
cvtsi2sd %eax,%xmm0
addsd  -0x20480(%rbp),%xmm0
ff
movsd  %xmm0,-0x20480(%rbp)
ff
mov    -0x20498(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20498(%rbp)
jmp    159c <main+0x3ec>
cvtsi2sdl -0x20464(%rbp),%xmm1
ff
movsd  -0x20480(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20480(%rbp)
ff
cvtsi2sdl -0x20460(%rbp),%xmm0
ff
movsd  -0x20478(%rbp),%xmm2
ff
cvtsi2sdl -0x20464(%rbp),%xmm1
ff
mulsd  -0x20480(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x204a0(%rbp)
ff
mov    -0x20460(%rbp),%eax
mov    %eax,-0x208cc(%rbp)
movsd  -0x20448(%rbp),%xmm0
ff
subsd  -0x20440(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10b0 <pow@plt>
mov    %eax,%ecx
mov    -0x208cc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x208c4(%rbp)
mov    -0x20464(%rbp),%eax
mov    %eax,-0x208c8(%rbp)
movsd  -0x20450(%rbp),%xmm0
ff
subsd  -0x20440(%rbp),%xmm0
ff
mov    $0x2,%edi
call   10b0 <pow@plt>
mov    -0x208c8(%rbp),%ecx
mov    %eax,%edx
mov    -0x208c4(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x204a8(%rbp)
ff
movsd  -0x204a8(%rbp),%xmm0
ff
divsd  -0x204a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x20488(%rbp)
ff
movsd  -0x20458(%rbp),%xmm1
ff
movsd  -0x20488(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1713 <main+0x563>
movsd  -0x20488(%rbp),%xmm0
ff
movsd  %xmm0,-0x20458(%rbp)
ff
mov    -0x2045c(%rbp),%eax
mov    %eax,-0x20414(%rbp)
jmp    1718 <main+0x568>
mov    -0x2045c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2045c(%rbp)
jmp    137a <main+0x1ca>
mov    -0x20414(%rbp),%esi
lea    0x8f1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x208b4(%rbp)
cmpl   $0x100,-0x208b4(%rbp)
jge    17a8 <main+0x5f8>
mov    -0x208b4(%rbp),%eax
cmp    -0x20414(%rbp),%eax
jge    1780 <main+0x5d0>
mov    -0x208b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208b0(%rbp)
jmp    178f <main+0x5df>
mov    -0x204b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204b4(%rbp)
jmp    1794 <main+0x5e4>
mov    -0x208b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208b4(%rbp)
jmp    174a <main+0x59a>
movl   $0x0,-0x208b8(%rbp)
cmpl   $0x100,-0x208b8(%rbp)
jge    187f <main+0x6cf>
movl   $0x0,-0x208bc(%rbp)
cmpl   $0x100,-0x208bc(%rbp)
jge    1866 <main+0x6b6>
movslq -0x208b8(%rbp),%rcx
lea    -0x10010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x208bc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    -0x20414(%rbp),%eax
jle    182d <main+0x67d>
movslq -0x208b8(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x208bc(%rbp),%rcx
movb   $0xff,(%rax,%rcx,1)
jmp    184d <main+0x69d>
movslq -0x208b8(%rbp),%rcx
lea    -0x20010(%rbp),%rax
shl    $0x8,%rcx
add    %rcx,%rax
movslq -0x208bc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1852 <main+0x6a2>
mov    -0x208bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208bc(%rbp)
jmp    17cc <main+0x61c>
jmp    186b <main+0x6bb>
mov    -0x208b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208b8(%rbp)
jmp    17b2 <main+0x602>
mov    -0x20420(%rbp),%rdi
lea    0x7aa(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    18bb <main+0x70b>
lea    0x799(%rip),%rdi
lea    0x7a3(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20428(%rbp)
jmp    18d5 <main+0x725>
lea    0x78e(%rip),%rdi
lea    0x784(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20428(%rbp)
movl   $0x0,-0x208c0(%rbp)
cmpl   $0x100,-0x208c0(%rbp)
jge    192a <main+0x77a>
mov    -0x20428(%rbp),%rdi
mov    -0x208c0(%rbp),%edx
movslq -0x208c0(%rbp),%rax
mov    -0x208b0(%rbp,%rax,4),%ecx
lea    0x74e(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x208c0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x208c0(%rbp)
jmp    18df <main+0x72f>
mov    -0x20428(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20420(%rbp),%rdi
lea    0x6f3(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1972 <main+0x7c2>
lea    0x70e(%rip),%rdi
lea    0x6ec(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20428(%rbp)
jmp    198c <main+0x7dc>
lea    0x702(%rip),%rdi
lea    0x6cd(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x20428(%rbp)
lea    -0x20010(%rbp),%rdi
mov    -0x20428(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10000,%edx
call   10d0 <fwrite@plt>
mov    -0x20428(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x20420(%rbp),%rdi
lea    0x674(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    19e3 <main+0x833>
lea    0x6b3(%rip),%rdi
call   1050 <system@plt>
jmp    19ef <main+0x83f>
lea    0x6b2(%rip),%rdi
call   1050 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x208d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20858,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x50(%rsp),%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1080 <memset@plt>
cmp    $0x1,%ebp
jg     11f8 <main+0x38>
lea    0x1f21(%rip),%rdi
jmp    1a72 <main+0x8b2>
cmp    $0x2,%ebp
jne    1a6b <main+0x8ab>
mov    0x8(%rbx),%rdi
lea    0x1e74(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbp
lea    0x850(%rsp),%rdi
mov    $0x1,%esi
mov    $0x10000,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    0x8(%rbx),%rdi
lea    0x1e42(%rip),%rsi
call   10d0 <strtok@plt>
lea    0x851(%rsp),%rcx
xor    %edx,%edx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl -0x1(%rcx,%rsi,1),%edi
addl   $0x1,0x50(%rsp,%rdi,4)
movzbl (%rcx,%rsi,1),%ebp
addl   $0x1,0x50(%rsp,%rbp,4)
add    %edi,%ebx
add    %ebp,%ebx
add    $0x2,%rsi
cmp    $0x100,%rsi
jne    1270 <main+0xb0>
add    $0x1,%rdx
add    $0x100,%rcx
cmp    $0x100,%rdx
jne    1260 <main+0xa0>
mov    %rax,0x48(%rsp)
lea    0xffff(%rbx),%ecx
test   %ebx,%ebx
cmovns %ebx,%ecx
sar    $0x10,%ecx
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x38(%rsp)
lea    0x58(%rsp),%r13
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x30(%rsp)
mov    $0x100,%ebp
xor    %r14d,%r14d
movdqa 0x1d2b(%rip),%xmm10
movdqa 0x1d32(%rip),%xmm11
movdqa 0x1d39(%rip),%xmm12
movdqa 0x1d40(%rip),%xmm13
jmp    13de <main+0x21e>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x18(%rsp),%xmm1
divsd  %xmm1,%xmm2
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm12
xorps  %xmm3,%xmm3
cvtsi2sd %r15d,%xmm3
mulsd  %xmm2,%xmm1
mulsd  %xmm12,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x8(%rsp)
subsd  0x38(%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
mov    %eax,%ebx
imul   %r15d,%ebx
movsd  0x20(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   %r12d,%eax
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
ucomisd %xmm1,%xmm0
maxsd  %xmm1,%xmm0
mov    0x2c(%rsp),%ebx
cmova  %r14d,%ebx
add    $0x1,%r14
mov    0x40(%rsp),%rbp
add    $0xffffffffffffffff,%rbp
add    $0x4,%r13
movsd  %xmm0,0x30(%rsp)
cmp    $0x100,%r14
movdqa 0x1c53(%rip),%xmm10
movdqa 0x1c5a(%rip),%xmm11
movdqa 0x1c61(%rip),%xmm12
movdqa 0x1c68(%rip),%xmm13
je     1a7c <main+0x8bc>
mov    $0x100,%edi
sub    %r14,%rdi
test   %r14,%r14
mov    %rbp,0x40(%rsp)
mov    %ebx,0x2c(%rsp)
je     1410 <main+0x250>
cmp    $0x4,%r14
jae    1430 <main+0x270>
xor    %eax,%eax
xor    %ecx,%ecx
xor    %r15d,%r15d
movsd  (%rsp),%xmm0
jmp    1660 <main+0x4a0>
nopl   0x0(%rax,%rax,1)
xor    %r15d,%r15d
pxor   %xmm12,%xmm12
movsd  (%rsp),%xmm0
jmp    17f4 <main+0x634>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rax
movabs $0x7ffffffffffffffc,%rcx
ff ff 7f
and    %rcx,%rax
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1a41 <main+0x881>
mov    %r14,%rsi
and    $0xfffffffffffffffc,%rsi
add    $0xfffffffffffffffc,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
and    $0xfffffffffffffffe,%rsi
pxor   %xmm8,%xmm8
pxor   %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm3,%xmm3
pxor   %xmm9,%xmm9
movdqa 0x1b75(%rip),%xmm4
nopl   0x0(%rax,%rax,1)
movdqa %xmm4,%xmm7
paddd  %xmm10,%xmm7
movq   0x50(%rsp,%rdx,4),%xmm5
movq   0x58(%rsp,%rdx,4),%xmm6
paddd  %xmm5,%xmm8
paddd  %xmm6,%xmm9
pshufd $0xf5,%xmm5,%xmm0
pmuludq %xmm4,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pshufd $0xf5,%xmm4,%xmm2
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm5
pshufd $0xf5,%xmm6,%xmm0
pmuludq %xmm7,%xmm6
pshufd $0xe8,%xmm6,%xmm6
pshufd $0xf5,%xmm7,%xmm2
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm6
pxor   %xmm0,%xmm0
pcmpgtd %xmm5,%xmm0
punpckldq %xmm0,%xmm5
paddq  %xmm1,%xmm5
pxor   %xmm0,%xmm0
pcmpgtd %xmm6,%xmm0
punpckldq %xmm0,%xmm6
paddq  %xmm3,%xmm6
movdqa %xmm4,%xmm0
paddd  %xmm11,%xmm0
movdqa %xmm4,%xmm2
paddd  %xmm12,%xmm2
movq   0x60(%rsp,%rdx,4),%xmm1
movq   0x68(%rsp,%rdx,4),%xmm3
paddd  %xmm1,%xmm8
paddd  %xmm3,%xmm9
pshufd $0xf5,%xmm1,%xmm7
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm7,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm1
pshufd $0xf5,%xmm3,%xmm0
pmuludq %xmm2,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pshufd $0xf5,%xmm2,%xmm2
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm3
pxor   %xmm0,%xmm0
pcmpgtd %xmm1,%xmm0
punpckldq %xmm0,%xmm1
paddq  %xmm5,%xmm1
pxor   %xmm0,%xmm0
pcmpgtd %xmm3,%xmm0
punpckldq %xmm0,%xmm3
paddq  %xmm6,%xmm3
add    $0x8,%rdx
paddd  %xmm13,%xmm4
add    $0xfffffffffffffffe,%rsi
jne    1490 <main+0x2d0>
test   $0x1,%cl
je     162e <main+0x46e>
movdqa %xmm4,%xmm0
paddd  %xmm10,%xmm0
movq   0x50(%rsp,%rdx,4),%xmm2
movq   0x58(%rsp,%rdx,4),%xmm5
paddd  %xmm2,%xmm8
paddd  %xmm5,%xmm9
pshufd $0xf5,%xmm2,%xmm6
pmuludq %xmm4,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pshufd $0xf5,%xmm4,%xmm4
pmuludq %xmm6,%xmm4
pshufd $0xe8,%xmm4,%xmm4
punpckldq %xmm4,%xmm2
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm4,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm5
pxor   %xmm0,%xmm0
pcmpgtd %xmm2,%xmm0
punpckldq %xmm0,%xmm2
paddq  %xmm2,%xmm1
pxor   %xmm0,%xmm0
pcmpgtd %xmm5,%xmm0
punpckldq %xmm0,%xmm5
paddq  %xmm5,%xmm3
paddq  %xmm3,%xmm1
paddd  %xmm9,%xmm8
pshufd $0x55,%xmm8,%xmm0
paddd  %xmm8,%xmm0
movd   %xmm0,%r15d
pshufd $0xee,%xmm1,%xmm0
paddq  %xmm1,%xmm0
movq   %xmm0,%rcx
cmp    %rax,%r14
movsd  (%rsp),%xmm0
je     167b <main+0x4bb>
nop
mov    0x50(%rsp,%rax,4),%edx
add    %edx,%r15d
mov    %eax,%esi
imul   %edx,%esi
movslq %esi,%rdx
add    %rdx,%rcx
add    $0x1,%rax
cmp    %rax,%r14
jne    1660 <main+0x4a0>
test   %r15d,%r15d
je     16c0 <main+0x500>
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
divsd  %xmm1,%xmm0
test   %r14,%r14
je     16cd <main+0x50d>
cmp    $0x1,%r14
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x18(%rsp)
jne    16d7 <main+0x517>
pxor   %xmm12,%xmm12
xor    %ebx,%ebx
test   $0x1,%r14b
jne    1797 <main+0x5d7>
jmp    17ef <main+0x62f>
xor    %r15d,%r15d
pxor   %xmm12,%xmm12
jmp    17f4 <main+0x634>
pxor   %xmm12,%xmm12
jmp    17ef <main+0x62f>
mov    %rdi,%r12
movabs $0x7ffffffffffffffc,%rbp
ff ff 7f
add    $0x2,%rbp
and    %r14,%rbp
pxor   %xmm12,%xmm12
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movq   %xmm12,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
subsd  (%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   0x50(%rsp,%rbx,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  (%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   0x54(%rsp,%rbx,4),%eax
xorps  %xmm12,%xmm12
cvtsi2sd %eax,%xmm12
addsd  0x8(%rsp),%xmm12
add    $0x2,%rbx
cmp    %rbp,%rbx
jne    1700 <main+0x540>
mov    0x40(%rsp),%rbp
movdqa 0x1896(%rip),%xmm10
movdqa 0x189d(%rip),%xmm11
movsd  (%rsp),%xmm0
mov    %r12,%rdi
movsd  0x18(%rsp),%xmm1
test   $0x1,%r14b
je     17ef <main+0x62f>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
subsd  (%rsp),%xmm0
mov    %rdi,%r12
mov    $0x2,%edi
movsd  %xmm12,0x10(%rsp)
call   10c0 <pow@plt>
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm12
mov    %r12,%rdi
movdqa 0x1850(%rip),%xmm11
movdqa 0x1837(%rip),%xmm10
imul   0x50(%rsp,%rbx,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm12
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm12
cmp    $0x4,%rdi
movsd  %xmm0,(%rsp)
jae    1810 <main+0x650>
xor    %edx,%edx
mov    %r14,%rax
xor    %r12d,%r12d
jmp    1920 <main+0x760>
nopl   0x0(%rax)
mov    %rbp,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdi,%rcx
and    $0xfffffffffffffffc,%rcx
lea    (%r14,%rcx,1),%rax
movd   %r14d,%xmm0
pshufd $0x50,%xmm0,%xmm2
paddd  0x17cc(%rip),%xmm2
pxor   %xmm3,%xmm3
pxor   %xmm8,%xmm8
xor    %esi,%esi
pxor   %xmm9,%xmm9
pxor   %xmm4,%xmm4
nopl   0x0(%rax,%rax,1)
movdqa %xmm2,%xmm5
paddd  %xmm10,%xmm5
movq   -0x8(%r13,%rsi,4),%xmm6
movq   0x0(%r13,%rsi,4),%xmm7
paddd  %xmm6,%xmm3
paddd  %xmm7,%xmm4
pshufd $0xf5,%xmm6,%xmm0
pmuludq %xmm2,%xmm6
pshufd $0xe8,%xmm6,%xmm6
pshufd $0xf5,%xmm2,%xmm1
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm0
punpckldq %xmm0,%xmm6
pshufd $0xf5,%xmm7,%xmm0
pmuludq %xmm5,%xmm7
pshufd $0xe8,%xmm7,%xmm1
pshufd $0xf5,%xmm5,%xmm5
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm0
punpckldq %xmm0,%xmm1
pxor   %xmm0,%xmm0
pcmpgtd %xmm6,%xmm0
punpckldq %xmm0,%xmm6
paddq  %xmm6,%xmm8
pxor   %xmm0,%xmm0
pcmpgtd %xmm1,%xmm0
punpckldq %xmm0,%xmm1
paddq  %xmm1,%xmm9
add    $0x4,%rsi
paddd  %xmm11,%xmm2
cmp    %rsi,%rdx
jne    1850 <main+0x690>
paddd  %xmm3,%xmm4
pshufd $0x55,%xmm4,%xmm0
paddd  %xmm4,%xmm0
movd   %xmm0,%r12d
paddq  %xmm8,%xmm9
pshufd $0xee,%xmm9,%xmm0
paddq  %xmm9,%xmm0
movq   %xmm0,%rdx
cmp    %rcx,%rdi
movsd  (%rsp),%xmm0
je     193e <main+0x77e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x50(%rsp,%rax,4),%ecx
add    %ecx,%r12d
mov    %eax,%esi
imul   %ecx,%esi
movslq %esi,%rcx
add    %rcx,%rdx
add    $0x1,%rax
cmp    $0x100,%rax
jne    1920 <main+0x760>
test   %r12d,%r12d
je     1a30 <main+0x870>
movsd  %xmm12,0x10(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %rdx,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x18(%rsp)
divsd  %xmm0,%xmm1
pxor   %xmm2,%xmm2
mov    %r14,%rbx
test   $0x1,%r14b
movsd  %xmm1,0x20(%rsp)
je     19a2 <main+0x7e2>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
subsd  %xmm1,%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   0x50(%rsp,%r14,4),%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
lea    0x1(%r14),%rbx
cmp    $0xff,%r14
je     1310 <main+0x150>
nop
movq   %xmm2,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
subsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   0x50(%rsp,%rbx,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
subsd  0x20(%rsp),%xmm0
mov    $0x2,%edi
call   10c0 <pow@plt>
imul   0x54(%rsp,%rbx,4),%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
addsd  0x8(%rsp),%xmm2
add    $0x2,%rbx
cmp    $0x100,%rbx
jne    19b0 <main+0x7f0>
jmp    1310 <main+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
pxor   %xmm2,%xmm2
jmp    1326 <main+0x166>
pxor   %xmm8,%xmm8
pxor   %xmm1,%xmm1
xor    %edx,%edx
pxor   %xmm3,%xmm3
pxor   %xmm9,%xmm9
movdqa 0x15a3(%rip),%xmm4
test   $0x1,%cl
jne    15af <main+0x3ef>
jmp    162e <main+0x46e>
lea    0x1693(%rip),%rdi
call   1030 <puts@plt>
jmp    2246 <main+0x1086>
lea    0x1602(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
movd   %ebx,%xmm0
pshufd $0x0,%xmm0,%xmm11
movdqa 0x15b2(%rip),%xmm7
pxor   %xmm5,%xmm5
mov    $0x100,%eax
movdqa 0x15b0(%rip),%xmm8
pcmpeqd %xmm10,%xmm10
movdqa 0x15b2(%rip),%xmm9
xorpd  %xmm2,%xmm2
pxor   %xmm4,%xmm4
pxor   %xmm6,%xmm6
nopw   0x0(%rax,%rax,1)
movdqa %xmm7,%xmm3
paddd  %xmm8,%xmm3
movdqa %xmm11,%xmm0
pcmpgtd %xmm7,%xmm0
movdqa %xmm11,%xmm1
pcmpgtd %xmm3,%xmm1
psubd  %xmm0,%xmm5
psubd  %xmm1,%xmm2
paddd  %xmm0,%xmm4
psubd  %xmm10,%xmm4
paddd  %xmm1,%xmm6
psubd  %xmm10,%xmm6
paddd  %xmm9,%xmm7
add    $0xfffffff8,%eax
jne    1ad0 <main+0x910>
paddd  %xmm4,%xmm6
pshufd $0xee,%xmm6,%xmm0
paddd  %xmm6,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
paddd  %xmm5,%xmm2
pshufd $0xee,%xmm2,%xmm0
paddd  %xmm2,%xmm0
pshufd $0x55,%xmm0,%xmm2
paddd  %xmm0,%xmm2
movd   %xmm2,%r15d
movd   %xmm1,0x84c(%rsp)
movd   %xmm2,0x450(%rsp)
xor    %eax,%eax
pxor   %xmm10,%xmm10
mov    0x48(%rsp),%r14
xchg   %ax,%ax
movdqa 0x850(%rsp,%rax,1),%xmm4
movdqa 0x860(%rsp,%rax,1),%xmm0
movdqa 0x870(%rsp,%rax,1),%xmm9
movdqa 0x880(%rsp,%rax,1),%xmm8
movdqa %xmm4,%xmm2
punpcklbw %xmm10,%xmm2
movdqa %xmm2,%xmm3
punpcklwd %xmm10,%xmm3
punpckhwd %xmm10,%xmm2
punpckhbw %xmm10,%xmm4
movdqa %xmm4,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm4
movdqa %xmm0,%xmm7
punpcklbw %xmm10,%xmm7
movdqa %xmm7,%xmm6
punpcklwd %xmm10,%xmm6
punpckhwd %xmm10,%xmm7
punpckhbw %xmm10,%xmm0
movdqa %xmm0,%xmm5
punpcklwd %xmm10,%xmm5
punpckhwd %xmm10,%xmm0
pcmpgtd %xmm11,%xmm4
pcmpgtd %xmm11,%xmm1
packssdw %xmm4,%xmm1
pcmpgtd %xmm11,%xmm2
pcmpgtd %xmm11,%xmm3
packssdw %xmm2,%xmm3
packsswb %xmm1,%xmm3
pcmpgtd %xmm11,%xmm0
pcmpgtd %xmm11,%xmm5
packssdw %xmm0,%xmm5
pcmpgtd %xmm11,%xmm7
pcmpgtd %xmm11,%xmm6
packssdw %xmm7,%xmm6
packsswb %xmm5,%xmm6
movdqa %xmm3,0x10850(%rsp,%rax,1)
movdqa %xmm6,0x10860(%rsp,%rax,1)
movdqa %xmm9,%xmm2
punpcklbw %xmm10,%xmm2
movdqa %xmm2,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm2
punpckhbw %xmm10,%xmm9
movdqa %xmm9,%xmm0
punpcklwd %xmm10,%xmm0
punpckhwd %xmm10,%xmm9
movdqa %xmm8,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm5
punpcklwd %xmm10,%xmm5
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm8
movdqa %xmm8,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm8
pcmpgtd %xmm11,%xmm9
pcmpgtd %xmm11,%xmm0
packssdw %xmm9,%xmm0
pcmpgtd %xmm11,%xmm2
pcmpgtd %xmm11,%xmm4
packssdw %xmm2,%xmm4
packsswb %xmm0,%xmm4
pcmpgtd %xmm11,%xmm8
pcmpgtd %xmm11,%xmm1
packssdw %xmm8,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm5
packssdw %xmm6,%xmm5
packsswb %xmm1,%xmm5
movdqa %xmm4,0x10870(%rsp,%rax,1)
movdqa %xmm5,0x10880(%rsp,%rax,1)
movdqa 0x890(%rsp,%rax,1),%xmm0
movdqa 0x8a0(%rsp,%rax,1),%xmm3
movdqa %xmm0,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm2
punpcklwd %xmm10,%xmm2
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm0
movdqa %xmm0,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm0
movdqa %xmm3,%xmm5
punpcklbw %xmm10,%xmm5
movdqa %xmm5,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm5
punpckhbw %xmm10,%xmm3
movdqa %xmm3,%xmm7
punpcklwd %xmm10,%xmm7
punpckhwd %xmm10,%xmm3
pcmpgtd %xmm11,%xmm0
pcmpgtd %xmm11,%xmm1
packssdw %xmm0,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm2
packssdw %xmm6,%xmm2
packsswb %xmm1,%xmm2
pcmpgtd %xmm11,%xmm3
pcmpgtd %xmm11,%xmm7
packssdw %xmm3,%xmm7
pcmpgtd %xmm11,%xmm5
pcmpgtd %xmm11,%xmm4
packssdw %xmm5,%xmm4
packsswb %xmm7,%xmm4
movdqa %xmm2,0x10890(%rsp,%rax,1)
movdqa %xmm4,0x108a0(%rsp,%rax,1)
movdqa 0x8b0(%rsp,%rax,1),%xmm0
movdqa 0x8c0(%rsp,%rax,1),%xmm3
movdqa %xmm0,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm2
punpcklwd %xmm10,%xmm2
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm0
movdqa %xmm0,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm0
movdqa %xmm3,%xmm5
punpcklbw %xmm10,%xmm5
movdqa %xmm5,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm5
punpckhbw %xmm10,%xmm3
movdqa %xmm3,%xmm7
punpcklwd %xmm10,%xmm7
punpckhwd %xmm10,%xmm3
pcmpgtd %xmm11,%xmm0
pcmpgtd %xmm11,%xmm1
packssdw %xmm0,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm2
packssdw %xmm6,%xmm2
packsswb %xmm1,%xmm2
pcmpgtd %xmm11,%xmm3
pcmpgtd %xmm11,%xmm7
packssdw %xmm3,%xmm7
pcmpgtd %xmm11,%xmm5
pcmpgtd %xmm11,%xmm4
packssdw %xmm5,%xmm4
packsswb %xmm7,%xmm4
movdqa %xmm2,0x108b0(%rsp,%rax,1)
movdqa %xmm4,0x108c0(%rsp,%rax,1)
movdqa 0x8d0(%rsp,%rax,1),%xmm0
movdqa 0x8e0(%rsp,%rax,1),%xmm3
movdqa %xmm0,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm2
punpcklwd %xmm10,%xmm2
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm0
movdqa %xmm0,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm0
movdqa %xmm3,%xmm5
punpcklbw %xmm10,%xmm5
movdqa %xmm5,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm5
punpckhbw %xmm10,%xmm3
movdqa %xmm3,%xmm7
punpcklwd %xmm10,%xmm7
punpckhwd %xmm10,%xmm3
pcmpgtd %xmm11,%xmm0
pcmpgtd %xmm11,%xmm1
packssdw %xmm0,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm2
packssdw %xmm6,%xmm2
packsswb %xmm1,%xmm2
pcmpgtd %xmm11,%xmm3
pcmpgtd %xmm11,%xmm7
packssdw %xmm3,%xmm7
pcmpgtd %xmm11,%xmm5
pcmpgtd %xmm11,%xmm4
packssdw %xmm5,%xmm4
packsswb %xmm7,%xmm4
movdqa %xmm2,0x108d0(%rsp,%rax,1)
movdqa %xmm4,0x108e0(%rsp,%rax,1)
movdqa 0x8f0(%rsp,%rax,1),%xmm4
movdqa 0x900(%rsp,%rax,1),%xmm5
movdqa 0x910(%rsp,%rax,1),%xmm9
movdqa 0x920(%rsp,%rax,1),%xmm8
movdqa %xmm4,%xmm2
punpcklbw %xmm10,%xmm2
movdqa %xmm2,%xmm3
punpcklwd %xmm10,%xmm3
punpckhwd %xmm10,%xmm2
punpckhbw %xmm10,%xmm4
movdqa %xmm4,%xmm0
punpcklwd %xmm10,%xmm0
punpckhwd %xmm10,%xmm4
movdqa %xmm5,%xmm7
punpcklbw %xmm10,%xmm7
movdqa %xmm7,%xmm6
punpcklwd %xmm10,%xmm6
punpckhwd %xmm10,%xmm7
punpckhbw %xmm10,%xmm5
movdqa %xmm5,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm5
pcmpgtd %xmm11,%xmm4
pcmpgtd %xmm11,%xmm0
packssdw %xmm4,%xmm0
pcmpgtd %xmm11,%xmm2
pcmpgtd %xmm11,%xmm3
packssdw %xmm2,%xmm3
packsswb %xmm0,%xmm3
pcmpgtd %xmm11,%xmm5
pcmpgtd %xmm11,%xmm1
packssdw %xmm5,%xmm1
pcmpgtd %xmm11,%xmm7
pcmpgtd %xmm11,%xmm6
packssdw %xmm7,%xmm6
packsswb %xmm1,%xmm6
movdqa %xmm3,0x108f0(%rsp,%rax,1)
movdqa %xmm6,0x10900(%rsp,%rax,1)
movdqa %xmm9,%xmm2
punpcklbw %xmm10,%xmm2
movdqa %xmm2,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm2
punpckhbw %xmm10,%xmm9
movdqa %xmm9,%xmm0
punpcklwd %xmm10,%xmm0
punpckhwd %xmm10,%xmm9
movdqa %xmm8,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm5
punpcklwd %xmm10,%xmm5
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm8
movdqa %xmm8,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm8
pcmpgtd %xmm11,%xmm9
pcmpgtd %xmm11,%xmm0
packssdw %xmm9,%xmm0
pcmpgtd %xmm11,%xmm2
pcmpgtd %xmm11,%xmm4
packssdw %xmm2,%xmm4
packsswb %xmm0,%xmm4
pcmpgtd %xmm11,%xmm8
pcmpgtd %xmm11,%xmm1
packssdw %xmm8,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm5
packssdw %xmm6,%xmm5
packsswb %xmm1,%xmm5
movdqa %xmm4,0x10910(%rsp,%rax,1)
movdqa %xmm5,0x10920(%rsp,%rax,1)
movdqa 0x930(%rsp,%rax,1),%xmm0
movdqa 0x940(%rsp,%rax,1),%xmm3
movdqa %xmm0,%xmm6
punpcklbw %xmm10,%xmm6
movdqa %xmm6,%xmm2
punpcklwd %xmm10,%xmm2
punpckhwd %xmm10,%xmm6
punpckhbw %xmm10,%xmm0
movdqa %xmm0,%xmm1
punpcklwd %xmm10,%xmm1
punpckhwd %xmm10,%xmm0
movdqa %xmm3,%xmm5
punpcklbw %xmm10,%xmm5
movdqa %xmm5,%xmm4
punpcklwd %xmm10,%xmm4
punpckhwd %xmm10,%xmm5
punpckhbw %xmm10,%xmm3
movdqa %xmm3,%xmm7
punpcklwd %xmm10,%xmm7
punpckhwd %xmm10,%xmm3
pcmpgtd %xmm11,%xmm0
pcmpgtd %xmm11,%xmm1
packssdw %xmm0,%xmm1
pcmpgtd %xmm11,%xmm6
pcmpgtd %xmm11,%xmm2
packssdw %xmm6,%xmm2
packsswb %xmm1,%xmm2
pcmpgtd %xmm11,%xmm3
pcmpgtd %xmm11,%xmm7
packssdw %xmm3,%xmm7
pcmpgtd %xmm11,%xmm5
pcmpgtd %xmm11,%xmm4
packssdw %xmm5,%xmm4
packsswb %xmm7,%xmm4
movdqa %xmm2,0x10930(%rsp,%rax,1)
movdqa %xmm4,0x10940(%rsp,%rax,1)
add    $0x100,%rax
cmp    $0x10000,%rax
jne    1b60 <main+0x9a0>
lea    0xf49(%rip),%rsi
mov    %r14,%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
lea    0xf3c(%rip),%rax
lea    0xf49(%rip),%rdi
cmove  %rax,%rdi
lea    0xf3b(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xf3e(%rip),%r12
mov    %rax,%rdi
mov    %r12,%rsi
xor    %edx,%edx
mov    %r15d,%ecx
call   10a0 <fprintf@plt>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x450(%rsp,%rbp,4),%ecx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   10a0 <fprintf@plt>
add    $0x1,%rbp
cmp    $0x100,%rbp
jne    21a0 <main+0xfe0>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xec2(%rip),%rbp
mov    %r14,%rdi
mov    %rbp,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
lea    0xede(%rip),%rax
lea    0xeea(%rip),%rdi
cmove  %rax,%rdi
lea    0xeb1(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0x10850(%rsp),%rdi
mov    $0x1,%esi
mov    $0x10000,%edx
mov    %rax,%rcx
call   10e0 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
lea    0xeb1(%rip),%rax
lea    0xeba(%rip),%rdi
cmove  %rax,%rdi
call   1060 <system@plt>
xor    %eax,%eax
add    $0x20858,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"don't read filename\0A\00"
@.str.1 = [16 x i8] c"many arguments\0A\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [13 x i8] c"\E9\96\BE\E5\80\A4 = %d\0A\00"
@.str.5 = [5 x i8] c"girl\00"
@.str.6 = [17 x i8] c"plot_ex2girl.dat\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [15 x i8] c"plot_ex2ei.dat\00"
@.str.9 = [9 x i8] c"%3d %3d\0A\00"
@.str.10 = [19 x i8] c"girlex2_binary.dat\00"
@.str.11 = [17 x i8] c"eiex2_binary.dat\00"
@.str.12 = [16 x i8] c"zsh ex2_girl.sh\00"
@.str.13 = [14 x i8] c"zsh ex2_ei.sh\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 [256 x i32]
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i64
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca double
%31 = alloca double
%32 = alloca [256 x i32]
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%37 = bitcast [256 x i32]* %8 to i8*
%38 = load i32, i32* %4
%39 = icmp slt i32 %38, 2
br i1 %39, label %40, label %42
40: ; preds = %2
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %370
42: ; preds = %2
%43 = load i32, i32* %4
%44 = icmp sgt i32 %43, 2
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %370
47: ; preds = %42
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 1
%50 = load i8*, i8** %49
%51 = call i32* @fopen(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %51, i32** %11
%52 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 0
%53 = bitcast [256 x i8]* %52 to i8**
%54 = load i32*, i32** %11
%55 = call i32 @fread(i8** %53, i32 1, i32 65536, i32* %54)
%56 = load i32*, i32** %11
%57 = call i32 @fclose(i32* %56)
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = load i8*, i8** %59
%61 = call i8* @strtok(i8* %60, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i8* %61, i8** %10
store i32 0, i32* %12
store i32 0, i32* %13
br label %62
62: ; preds = %95, %47
%63 = load i32, i32* %13
%64 = icmp slt i32 %63, 256
br i1 %64, label %65, label %98
65: ; preds = %62
store i32 0, i32* %14
br label %66
66: ; preds = %91, %65
%67 = load i32, i32* %14
%68 = icmp slt i32 %67, 256
br i1 %68, label %69, label %94
69: ; preds = %66
%70 = load i32, i32* %13
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 %71
%73 = load i32, i32* %14
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [256 x i8], [256 x i8]* %72, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = zext i8 %76 to i64
%78 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = add nsw i32 %79, 1
store i32 %80, i32* %78
%81 = load i32, i32* %13
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 %82
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [256 x i8], [256 x i8]* %83, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = load i32, i32* %12
%90 = add nsw i32 %89, %88
store i32 %90, i32* %12
br label %91
91: ; preds = %69
%92 = load i32, i32* %14
%93 = add nsw i32 %92, 1
store i32 %93, i32* %14
br label %66
94: ; preds = %66
br label %95
95: ; preds = %94
%96 = load i32, i32* %13
%97 = add nsw i32 %96, 1
store i32 %97, i32* %13
br label %62
98: ; preds = %62
%99 = load i32, i32* %12
%100 = sdiv i32 %99, 65536
%101 = sitofp i32 %100 to double
store double %101, double* %15
store double 0.000000e+00, double* %18
store i32 0, i32* %19
br label %102
102: ; preds = %256, %98
%103 = load i32, i32* %19
%104 = icmp slt i32 %103, 256
br i1 %104, label %105, label %259
105: ; preds = %102
store i32 0, i32* %20
store i32 0, i32* %21
store i64 0, i64* %22
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
store i32 0, i32* %26
br label %106
106: ; preds = %126, %105
%107 = load i32, i32* %26
%108 = load i32, i32* %19
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %129
110: ; preds = %106
%111 = load i32, i32* %26
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %112
%114 = load i32, i32* %113
%115 = load i32, i32* %20
%116 = add nsw i32 %115, %114
store i32 %116, i32* %20
%117 = load i32, i32* %26
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %118
%120 = load i32, i32* %119
%121 = load i32, i32* %26
%122 = mul nsw i32 %120, %121
%123 = sext i32 %122 to i64
%124 = load i64, i64* %22
%125 = add nsw i64 %124, %123
store i64 %125, i64* %22
br label %126
126: ; preds = %110
%127 = load i32, i32* %26
%128 = add nsw i32 %127, 1
store i32 %128, i32* %26
br label %106
129: ; preds = %106
%130 = load i32, i32* %20
%131 = icmp ne i32 %130, 0
br i1 %131, label %132, label %164
132: ; preds = %129
%133 = load i64, i64* %22
%134 = sitofp i64 %133 to double
%135 = load i32, i32* %20
%136 = sitofp i32 %135 to double
%137 = fdiv double %134, %136
store double %137, double* %16
store i32 0, i32* %27
br label %138
138: ; preds = %156, %132
%139 = load i32, i32* %27
%140 = load i32, i32* %19
%141 = icmp slt i32 %139, %140
br i1 %141, label %142, label %159
142: ; preds = %138
%143 = load i32, i32* %27
%144 = sitofp i32 %143 to double
%145 = load double, double* %16
%146 = fsub double %144, %145
%147 = call i32 @pow(double %146, i32 2)
%148 = load i32, i32* %27
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %149
%151 = load i32, i32* %150
%152 = mul nsw i32 %147, %151
%153 = sitofp i32 %152 to double
%154 = load double, double* %23
%155 = fadd double %154, %153
store double %155, double* %23
br label %156
156: ; preds = %142
%157 = load i32, i32* %27
%158 = add nsw i32 %157, 1
store i32 %158, i32* %27
br label %138
159: ; preds = %138
%160 = load i32, i32* %20
%161 = sitofp i32 %160 to double
%162 = load double, double* %23
%163 = fdiv double %162, %161
store double %163, double* %23
br label %164
164: ; preds = %159, %129
store i64 0, i64* %22
%165 = load i32, i32* %19
store i32 %165, i32* %28
br label %166
166: ; preds = %185, %164
%167 = load i32, i32* %28
%168 = icmp slt i32 %167, 256
br i1 %168, label %169, label %188
169: ; preds = %166
%170 = load i32, i32* %28
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %171
%173 = load i32, i32* %172
%174 = load i32, i32* %21
%175 = add nsw i32 %174, %173
store i32 %175, i32* %21
%176 = load i32, i32* %28
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %177
%179 = load i32, i32* %178
%180 = load i32, i32* %28
%181 = mul nsw i32 %179, %180
%182 = sext i32 %181 to i64
%183 = load i64, i64* %22
%184 = add nsw i64 %183, %182
store i64 %184, i64* %22
br label %185
185: ; preds = %169
%186 = load i32, i32* %28
%187 = add nsw i32 %186, 1
store i32 %187, i32* %28
br label %166
188: ; preds = %166
%189 = load i32, i32* %21
%190 = icmp ne i32 %189, 0
br i1 %190, label %191, label %223
191: ; preds = %188
%192 = load i64, i64* %22
%193 = sitofp i64 %192 to double
%194 = load i32, i32* %21
%195 = sitofp i32 %194 to double
%196 = fdiv double %193, %195
store double %196, double* %17
%197 = load i32, i32* %19
store i32 %197, i32* %29
br label %198
198: ; preds = %215, %191
%199 = load i32, i32* %29
%200 = icmp slt i32 %199, 256
br i1 %200, label %201, label %218
201: ; preds = %198
%202 = load i32, i32* %29
%203 = sitofp i32 %202 to double
%204 = load double, double* %17
%205 = fsub double %203, %204
%206 = call i32 @pow(double %205, i32 2)
%207 = load i32, i32* %29
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds [256 x i32], [256 x i32]* %8, i64 0, i64 %208
%210 = load i32, i32* %209
%211 = mul nsw i32 %206, %210
%212 = sitofp i32 %211 to double
%213 = load double, double* %24
%214 = fadd double %213, %212
store double %214, double* %24
br label %215
215: ; preds = %201
%216 = load i32, i32* %29
%217 = add nsw i32 %216, 1
store i32 %217, i32* %29
br label %198
218: ; preds = %198
%219 = load i32, i32* %21
%220 = sitofp i32 %219 to double
%221 = load double, double* %24
%222 = fdiv double %221, %220
store double %222, double* %24
br label %223
223: ; preds = %218, %188
%224 = load i32, i32* %20
%225 = sitofp i32 %224 to double
%226 = load double, double* %23
%227 = load i32, i32* %21
%228 = sitofp i32 %227 to double
%229 = load double, double* %24
%230 = fmul double %228, %229
%231 = call double @llvm.fmuladd.f64(double %225, double %226, double %230)
store double %231, double* %30
%232 = load i32, i32* %20
%233 = load double, double* %16
%234 = load double, double* %15
%235 = fsub double %233, %234
%236 = call i32 @pow(double %235, i32 2)
%237 = mul nsw i32 %232, %236
%238 = load i32, i32* %21
%239 = load double, double* %17
%240 = load double, double* %15
%241 = fsub double %239, %240
%242 = call i32 @pow(double %241, i32 2)
%243 = mul nsw i32 %238, %242
%244 = add nsw i32 %237, %243
%245 = sitofp i32 %244 to double
store double %245, double* %31
%246 = load double, double* %31
%247 = load double, double* %30
%248 = fdiv double %246, %247
store double %248, double* %25
%249 = load double, double* %18
%250 = load double, double* %25
%251 = fcmp olt double %249, %250
br i1 %251, label %252, label %255
252: ; preds = %223
%253 = load double, double* %25
store double %253, double* %18
%254 = load i32, i32* %19
store i32 %254, i32* %9
br label %255
255: ; preds = %252, %223
br label %256
256: ; preds = %255
%257 = load i32, i32* %19
%258 = add nsw i32 %257, 1
store i32 %258, i32* %19
br label %102
259: ; preds = %102
%260 = load i32, i32* %9
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %260)
store i32 0, i32* %33
br label %262
262: ; preds = %278, %259
%263 = load i32, i32* %33
%264 = icmp slt i32 %263, 256
br i1 %264, label %265, label %281
265: ; preds = %262
%266 = load i32, i32* %33
%267 = load i32, i32* %9
%268 = icmp slt i32 %266, %267
br i1 %268, label %269, label %273
269: ; preds = %265
%270 = getelementptr inbounds [256 x i32], [256 x i32]* %32, i64 0, i64 0
%271 = load i32, i32* %270
%272 = add nsw i32 %271, 1
store i32 %272, i32* %270
br label %277
273: ; preds = %265
%274 = getelementptr inbounds [256 x i32], [256 x i32]* %32, i64 0, i64 255
%275 = load i32, i32* %274
%276 = add nsw i32 %275, 1
store i32 %276, i32* %274
br label %277
277: ; preds = %273, %269
br label %278
278: ; preds = %277
%279 = load i32, i32* %33
%280 = add nsw i32 %279, 1
store i32 %280, i32* %33
br label %262
281: ; preds = %262
store i32 0, i32* %34
br label %282
282: ; preds = %319, %281
%283 = load i32, i32* %34
%284 = icmp slt i32 %283, 256
br i1 %284, label %285, label %322
285: ; preds = %282
store i32 0, i32* %35
br label %286
286: ; preds = %315, %285
%287 = load i32, i32* %35
%288 = icmp slt i32 %287, 256
br i1 %288, label %289, label %318
289: ; preds = %286
%290 = load i32, i32* %34
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %6, i64 0, i64 %291
%293 = load i32, i32* %35
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [256 x i8], [256 x i8]* %292, i64 0, i64 %294
%296 = load i8, i8* %295
%297 = zext i8 %296 to i32
%298 = load i32, i32* %9
%299 = icmp sgt i32 %297, %298
br i1 %299, label %300, label %307
300: ; preds = %289
%301 = load i32, i32* %34
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 %302
%304 = load i32, i32* %35
%305 = sext i32 %304 to i64
%306 = getelementptr inbounds [256 x i8], [256 x i8]* %303, i64 0, i64 %305
store i8 -1, i8* %306
br label %314
307: ; preds = %289
%308 = load i32, i32* %34
%309 = sext i32 %308 to i64
%310 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 %309
%311 = load i32, i32* %35
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds [256 x i8], [256 x i8]* %310, i64 0, i64 %312
store i8 0, i8* %313
br label %314
314: ; preds = %307, %300
br label %315
315: ; preds = %314
%316 = load i32, i32* %35
%317 = add nsw i32 %316, 1
store i32 %317, i32* %35
br label %286
318: ; preds = %286
br label %319
319: ; preds = %318
%320 = load i32, i32* %34
%321 = add nsw i32 %320, 1
store i32 %321, i32* %34
br label %282
322: ; preds = %282
%323 = load i8*, i8** %10
%324 = call i64 @strcmp(i8* %323, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%325 = icmp eq i64 %324, 0
br i1 %325, label %326, label %328
326: ; preds = %322
%327 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %327, i32** %11
br label %330
328: ; preds = %322
%329 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %329, i32** %11
br label %330
330: ; preds = %328, %326
store i32 0, i32* %36
br label %331
331: ; preds = %342, %330
%332 = load i32, i32* %36
%333 = icmp slt i32 %332, 256
br i1 %333, label %334, label %345
334: ; preds = %331
%335 = load i32*, i32** %11
%336 = load i32, i32* %36
%337 = load i32, i32* %36
%338 = sext i32 %337 to i64
%339 = getelementptr inbounds [256 x i32], [256 x i32]* %32, i64 0, i64 %338
%340 = load i32, i32* %339
%341 = call i32 @fprintf(i32* %335, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %336, i32 %340)
br label %342
342: ; preds = %334
%343 = load i32, i32* %36
%344 = add nsw i32 %343, 1
store i32 %344, i32* %36
br label %331
345: ; preds = %331
%346 = load i32*, i32** %11
%347 = call i32 @fclose(i32* %346)
%348 = load i8*, i8** %10
%349 = call i64 @strcmp(i8* %348, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%350 = icmp eq i64 %349, 0
br i1 %350, label %351, label %353
351: ; preds = %345
%352 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %352, i32** %11
br label %355
353: ; preds = %345
%354 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
store i32* %354, i32** %11
br label %355
355: ; preds = %353, %351
%356 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %7, i64 0, i64 0
%357 = bitcast [256 x i8]* %356 to i8**
%358 = load i32*, i32** %11
%359 = call i32 @fwrite(i8** %357, i32 1, i32 65536, i32* %358)
%360 = load i32*, i32** %11
%361 = call i32 @fclose(i32* %360)
%362 = load i8*, i8** %10
%363 = call i64 @strcmp(i8* %362, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%364 = icmp eq i64 %363, 0
br i1 %364, label %365, label %367
365: ; preds = %355
%366 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
br label %369
367: ; preds = %355
%368 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
br label %369
369: ; preds = %367, %365
store i32 0, i32* %3
br label %370
370: ; preds = %369, %45, %40
%371 = load i32, i32* %3
ret i32 %371
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [13 x i8] c"\E9\96\BE\E5\80\A4 = %d\0A\00"
@.str.5 = [5 x i8] c"girl\00"
@.str.6 = [17 x i8] c"plot_ex2girl.dat\00"
@.str.7 = [3 x i8] c"wb\00"
@.str.8 = [15 x i8] c"plot_ex2ei.dat\00"
@.str.9 = [9 x i8] c"%3d %3d\0A\00"
@.str.10 = [19 x i8] c"girlex2_binary.dat\00"
@.str.11 = [17 x i8] c"eiex2_binary.dat\00"
@.str.12 = [16 x i8] c"zsh ex2_girl.sh\00"
@.str.13 = [14 x i8] c"zsh ex2_ei.sh\00"
@str = [15 x i8] c"many arguments\00"
@str.14 = [20 x i8] c"don't read filename\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 = alloca [256 x i32]
%7 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 0, i64 0
%8 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 0, i64 0
%9 = bitcast [256 x i32]* %5 to i8*
%10 = icmp slt i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.14, i64 0, i64 0))
br label %570
13: ; preds = %2
%14 = icmp eq i32 %0, 2
br i1 %14, label %17, label %15
15: ; preds = %13
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %570
17: ; preds = %13
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32* @fopen(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = bitcast [256 x [256 x i8]]* %3 to i8**
%22 = call i32 @fread(i8** %21, i32 1, i32 65536, i32* %20)
%23 = tail call i32 @fclose(i32* %20)
%24 = load i8*, i8** %18
%25 = tail call i8* @strtok(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %26
26: ; preds = %17, %32
%27 = phi i64 [ 0, %17 ], [ %33, %32 ]
%28 = phi i32 [ 0, %17 ], [ %54, %32 ]
br label %35
29: ; preds = %32
%30 = sdiv i32 %54, 65536
%31 = sitofp i32 %30 to double
br label %57
32: ; preds = %35
%33 = add nuw nsw i64 %27, 1
%34 = icmp eq i64 %33, 256
br i1 %34, label %29, label %26
35: ; preds = %35, %26
%36 = phi i64 [ 0, %26 ], [ %55, %35 ]
%37 = phi i32 [ %28, %26 ], [ %54, %35 ]
%38 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %27, i64 %36
%39 = load i8, i8* %38
%40 = zext i8 %39 to i64
%41 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = add nsw i32 %42, 1
store i32 %43, i32* %41
%44 = zext i8 %39 to i32
%45 = add nsw i32 %37, %44
%46 = or i64 %36, 1
%47 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %27, i64 %46
%48 = load i8, i8* %47
%49 = zext i8 %48 to i64
%50 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = add nsw i32 %51, 1
store i32 %52, i32* %50
%53 = zext i8 %48 to i32
%54 = add nsw i32 %45, %53
%55 = add nuw nsw i64 %36, 2
%56 = icmp eq i64 %55, 256
br i1 %56, label %32, label %35
57: ; preds = %29, %389
%58 = phi i64 [ 0, %29 ], [ %409, %389 ]
%59 = phi i32 [ undef, %29 ], [ %408, %389 ]
%60 = phi double [ 0.000000e+00, %29 ], [ %406, %389 ]
%61 = phi double [ undef, %29 ], [ %391, %389 ]
%62 = phi double [ undef, %29 ], [ %276, %389 ]
%63 = and i64 %58, 9223372036854775804
%64 = add nsw i64 %63, -4
%65 = lshr exact i64 %64, 2
%66 = add nuw nsw i64 %65, 1
%67 = sub nsw i64 256, %58
%68 = icmp eq i64 %58, 0
br i1 %68, label %274, label %69
69: ; preds = %57
%70 = icmp ult i64 %58, 4
br i1 %70, label %159, label %71
71: ; preds = %69
%72 = and i64 %58, 9223372036854775804
%73 = and i64 %66, 1
%74 = icmp eq i64 %64, 0
br i1 %74, label %121, label %75
75: ; preds = %71
%76 = and i64 %66, 9223372036854775806
br label %77
77: ; preds = %77, %75
%78 = phi i64 [ 0, %75 ], [ %117, %77 ]
%79 = phi <2 x i64> [ zeroinitializer, %75 ], [ %115, %77 ]
%80 = phi <2 x i64> [ zeroinitializer, %75 ], [ %116, %77 ]
%81 = phi <2 x i32> [ zeroinitializer, %75 ], [ %109, %77 ]
%82 = phi <2 x i32> [ zeroinitializer, %75 ], [ %110, %77 ]
%83 = phi <2 x i32> [ <i32 0, i32 1>, %75 ], [ %118, %77 ]
%84 = phi i64 [ 0, %75 ], [ %119, %77 ]
%85 = add <2 x i32> %83, <i32 2, i32 2>
%86 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %78
%87 = bitcast i32* %86 to <2 x i32>*
%88 = load <2 x i32>, <2 x i32>* %87
%89 = getelementptr inbounds i32, i32* %86, i64 2
%90 = bitcast i32* %89 to <2 x i32>*
%91 = load <2 x i32>, <2 x i32>* %90
%92 = add <2 x i32> %88, %81
%93 = add <2 x i32> %91, %82
%94 = mul nsw <2 x i32> %88, %83
%95 = mul nsw <2 x i32> %91, %85
%96 = sext <2 x i32> %94 to <2 x i64>
%97 = sext <2 x i32> %95 to <2 x i64>
%98 = add <2 x i64> %79, %96
%99 = add <2 x i64> %80, %97
%100 = or i64 %78, 4
%101 = add <2 x i32> %83, <i32 4, i32 4>
%102 = add <2 x i32> %83, <i32 6, i32 6>
%103 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %100
%104 = bitcast i32* %103 to <2 x i32>*
%105 = load <2 x i32>, <2 x i32>* %104
%106 = getelementptr inbounds i32, i32* %103, i64 2
%107 = bitcast i32* %106 to <2 x i32>*
%108 = load <2 x i32>, <2 x i32>* %107
%109 = add <2 x i32> %105, %92
%110 = add <2 x i32> %108, %93
%111 = mul nsw <2 x i32> %105, %101
%112 = mul nsw <2 x i32> %108, %102
%113 = sext <2 x i32> %111 to <2 x i64>
%114 = sext <2 x i32> %112 to <2 x i64>
%115 = add <2 x i64> %98, %113
%116 = add <2 x i64> %99, %114
%117 = add nuw i64 %78, 8
%118 = add <2 x i32> %83, <i32 8, i32 8>
%119 = add i64 %84, 2
%120 = icmp eq i64 %119, %76
br i1 %120, label %121, label %77
121: ; preds = %77, %71
%122 = phi <2 x i32> [ undef, %71 ], [ %109, %77 ]
%123 = phi <2 x i32> [ undef, %71 ], [ %110, %77 ]
%124 = phi <2 x i64> [ undef, %71 ], [ %115, %77 ]
%125 = phi <2 x i64> [ undef, %71 ], [ %116, %77 ]
%126 = phi i64 [ 0, %71 ], [ %117, %77 ]
%127 = phi <2 x i64> [ zeroinitializer, %71 ], [ %115, %77 ]
%128 = phi <2 x i64> [ zeroinitializer, %71 ], [ %116, %77 ]
%129 = phi <2 x i32> [ zeroinitializer, %71 ], [ %109, %77 ]
%130 = phi <2 x i32> [ zeroinitializer, %71 ], [ %110, %77 ]
%131 = phi <2 x i32> [ <i32 0, i32 1>, %71 ], [ %118, %77 ]
%132 = icmp eq i64 %73, 0
br i1 %132, label %149, label %133
133: ; preds = %121
%134 = add <2 x i32> %131, <i32 2, i32 2>
%135 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %126
%136 = bitcast i32* %135 to <2 x i32>*
%137 = load <2 x i32>, <2 x i32>* %136
%138 = getelementptr inbounds i32, i32* %135, i64 2
%139 = bitcast i32* %138 to <2 x i32>*
%140 = load <2 x i32>, <2 x i32>* %139
%141 = add <2 x i32> %137, %129
%142 = add <2 x i32> %140, %130
%143 = mul nsw <2 x i32> %137, %131
%144 = mul nsw <2 x i32> %140, %134
%145 = sext <2 x i32> %143 to <2 x i64>
%146 = sext <2 x i32> %144 to <2 x i64>
%147 = add <2 x i64> %127, %145
%148 = add <2 x i64> %128, %146
br label %149
149: ; preds = %121, %133
%150 = phi <2 x i32> [ %122, %121 ], [ %141, %133 ]
%151 = phi <2 x i32> [ %123, %121 ], [ %142, %133 ]
%152 = phi <2 x i64> [ %124, %121 ], [ %147, %133 ]
%153 = phi <2 x i64> [ %125, %121 ], [ %148, %133 ]
%154 = add <2 x i32> %151, %150
%155 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %154)
%156 = add <2 x i64> %153, %152
%157 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %156)
%158 = icmp eq i64 %58, %72
br i1 %158, label %204, label %159
159: ; preds = %69, %149
%160 = phi i64 [ 0, %69 ], [ %72, %149 ]
%161 = phi i64 [ 0, %69 ], [ %157, %149 ]
%162 = phi i32 [ 0, %69 ], [ %155, %149 ]
br label %208
163: ; preds = %389
%164 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %408)
%165 = bitcast [256 x i32]* %6 to i8*
%166 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 255
%167 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 0
%168 = insertelement <4 x i32> poison, i32 %408, i64 0
%169 = shufflevector <4 x i32> %168, <4 x i32> poison, <4 x i32> zeroinitializer
%170 = insertelement <4 x i32> poison, i32 %408, i64 0
%171 = shufflevector <4 x i32> %170, <4 x i32> poison, <4 x i32> zeroinitializer
br label %172
172: ; preds = %172, %163
%173 = phi i32 [ 0, %163 ], [ %192, %172 ]
%174 = phi <4 x i32> [ <i32 undef, i32 0, i32 0, i32 0>, %163 ], [ %184, %172 ]
%175 = phi <4 x i32> [ zeroinitializer, %163 ], [ %185, %172 ]
%176 = phi <4 x i32> [ <i32 undef, i32 0, i32 0, i32 0>, %163 ], [ %190, %172 ]
%177 = phi <4 x i32> [ zeroinitializer, %163 ], [ %191, %172 ]
%178 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %163 ], [ %193, %172 ]
%179 = add <4 x i32> %178, <i32 4, i32 4, i32 4, i32 4>
%180 = icmp slt <4 x i32> %178, %169
%181 = icmp slt <4 x i32> %179, %171
%182 = zext <4 x i1> %180 to <4 x i32>
%183 = zext <4 x i1> %181 to <4 x i32>
%184 = add <4 x i32> %174, %182
%185 = add <4 x i32> %175, %183
%186 = xor <4 x i1> %180, <i1 true, i1 true, i1 true, i1 true>
%187 = xor <4 x i1> %181, <i1 true, i1 true, i1 true, i1 true>
%188 = zext <4 x i1> %186 to <4 x i32>
%189 = zext <4 x i1> %187 to <4 x i32>
%190 = add <4 x i32> %176, %188
%191 = add <4 x i32> %177, %189
%192 = add nuw i32 %173, 8
%193 = add <4 x i32> %178, <i32 8, i32 8, i32 8, i32 8>
%194 = icmp eq i32 %192, 256
br i1 %194, label %195, label %172
195: ; preds = %172
%196 = add <4 x i32> %191, %190
%197 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %196)
%198 = add <4 x i32> %185, %184
%199 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %198)
store i32 %197, i32* %166
store i32 %199, i32* %167
%200 = insertelement <16 x i32> poison, i32 %408, i64 0
%201 = shufflevector <16 x i32> %200, <16 x i32> poison, <16 x i32> zeroinitializer
%202 = insertelement <16 x i32> poison, i32 %408, i64 0
%203 = shufflevector <16 x i32> %202, <16 x i32> poison, <16 x i32> zeroinitializer
br label %411
204: ; preds = %208, %149
%205 = phi i32 [ %155, %149 ], [ %214, %208 ]
%206 = phi i64 [ %157, %149 ], [ %218, %208 ]
%207 = icmp eq i32 %205, 0
br i1 %207, label %274, label %221
208: ; preds = %159, %208
%209 = phi i64 [ %219, %208 ], [ %160, %159 ]
%210 = phi i64 [ %218, %208 ], [ %161, %159 ]
%211 = phi i32 [ %214, %208 ], [ %162, %159 ]
%212 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %209
%213 = load i32, i32* %212
%214 = add nsw i32 %213, %211
%215 = trunc i64 %209 to i32
%216 = mul nsw i32 %213, %215
%217 = sext i32 %216 to i64
%218 = add nsw i64 %210, %217
%219 = add nuw nsw i64 %209, 1
%220 = icmp eq i64 %219, %58
br i1 %220, label %204, label %208
221: ; preds = %204
%222 = sitofp i64 %206 to double
%223 = sitofp i32 %205 to double
%224 = fdiv double %222, %223
br i1 %68, label %245, label %225
225: ; preds = %221
%226 = and i64 %58, 1
%227 = icmp eq i64 %58, 1
br i1 %227, label %230, label %228
228: ; preds = %225
%229 = and i64 %58, 9223372036854775806
br label %248
230: ; preds = %248, %225
%231 = phi double [ undef, %225 ], [ %270, %248 ]
%232 = phi i64 [ 0, %225 ], [ %271, %248 ]
%233 = phi double [ 0.000000e+00, %225 ], [ %270, %248 ]
%234 = icmp eq i64 %226, 0
br i1 %234, label %245, label %235
235: ; preds = %230
%236 = trunc i64 %232 to i32
%237 = sitofp i32 %236 to double
%238 = fsub double %237, %224
%239 = tail call i32 @pow(double %238, i32 2)
%240 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %232
%241 = load i32, i32* %240
%242 = mul nsw i32 %241, %239
%243 = sitofp i32 %242 to double
%244 = fadd double %233, %243
br label %245
245: ; preds = %235, %230, %221
%246 = phi double [ 0.000000e+00, %221 ], [ %231, %230 ], [ %244, %235 ]
%247 = fdiv double %246, %223
br label %274
248: ; preds = %248, %228
%249 = phi i64 [ 0, %228 ], [ %271, %248 ]
%250 = phi double [ 0.000000e+00, %228 ], [ %270, %248 ]
%251 = phi i64 [ 0, %228 ], [ %272, %248 ]
%252 = trunc i64 %249 to i32
%253 = sitofp i32 %252 to double
%254 = fsub double %253, %224
%255 = tail call i32 @pow(double %254, i32 2)
%256 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %249
%257 = load i32, i32* %256
%258 = mul nsw i32 %257, %255
%259 = sitofp i32 %258 to double
%260 = fadd double %250, %259
%261 = or i64 %249, 1
%262 = trunc i64 %261 to i32
%263 = sitofp i32 %262 to double
%264 = fsub double %263, %224
%265 = tail call i32 @pow(double %264, i32 2)
%266 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %261
%267 = load i32, i32* %266
%268 = mul nsw i32 %267, %265
%269 = sitofp i32 %268 to double
%270 = fadd double %260, %269
%271 = add nuw nsw i64 %249, 2
%272 = add i64 %251, 2
%273 = icmp eq i64 %272, %229
br i1 %273, label %230, label %248
274: ; preds = %57, %204, %245
%275 = phi i32 [ %205, %245 ], [ 0, %204 ], [ 0, %57 ]
%276 = phi double [ %224, %245 ], [ %62, %204 ], [ %62, %57 ]
%277 = phi double [ %247, %245 ], [ 0.000000e+00, %204 ], [ 0.000000e+00, %57 ]
%278 = icmp ult i64 %67, 4
br i1 %278, label %318, label %279
279: ; preds = %274
%280 = and i64 %67, -4
%281 = add i64 %58, %280
%282 = trunc i64 %58 to i32
%283 = insertelement <2 x i32> poison, i32 %282, i64 0
%284 = shufflevector <2 x i32> %283, <2 x i32> poison, <2 x i32> zeroinitializer
%285 = add <2 x i32> %284, <i32 0, i32 1>
br label %286
286: ; preds = %286, %279
%287 = phi i64 [ 0, %279 ], [ %309, %286 ]
%288 = phi <2 x i64> [ zeroinitializer, %279 ], [ %307, %286 ]
%289 = phi <2 x i64> [ zeroinitializer, %279 ], [ %308, %286 ]
%290 = phi <2 x i32> [ zeroinitializer, %279 ], [ %301, %286 ]
%291 = phi <2 x i32> [ zeroinitializer, %279 ], [ %302, %286 ]
%292 = phi <2 x i32> [ %285, %279 ], [ %310, %286 ]
%293 = add i64 %58, %287
%294 = add <2 x i32> %292, <i32 2, i32 2>
%295 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %293
%296 = bitcast i32* %295 to <2 x i32>*
%297 = load <2 x i32>, <2 x i32>* %296
%298 = getelementptr inbounds i32, i32* %295, i64 2
%299 = bitcast i32* %298 to <2 x i32>*
%300 = load <2 x i32>, <2 x i32>* %299
%301 = add <2 x i32> %297, %290
%302 = add <2 x i32> %300, %291
%303 = mul nsw <2 x i32> %297, %292
%304 = mul nsw <2 x i32> %300, %294
%305 = sext <2 x i32> %303 to <2 x i64>
%306 = sext <2 x i32> %304 to <2 x i64>
%307 = add <2 x i64> %288, %305
%308 = add <2 x i64> %289, %306
%309 = add nuw i64 %287, 4
%310 = add <2 x i32> %292, <i32 4, i32 4>
%311 = icmp eq i64 %309, %280
br i1 %311, label %312, label %286
312: ; preds = %286
%313 = add <2 x i32> %302, %301
%314 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %313)
%315 = add <2 x i64> %308, %307
%316 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %315)
%317 = icmp eq i64 %67, %280
br i1 %317, label %322, label %318
318: ; preds = %274, %312
%319 = phi i64 [ %58, %274 ], [ %281, %312 ]
%320 = phi i64 [ 0, %274 ], [ %316, %312 ]
%321 = phi i32 [ 0, %274 ], [ %314, %312 ]
br label %328
322: ; preds = %328, %312
%323 = phi i32 [ %314, %312 ], [ %334, %328 ]
%324 = phi i64 [ %316, %312 ], [ %338, %328 ]
%325 = icmp eq i32 %323, 0
br i1 %325, label %326, label %341
326: ; preds = %322
%327 = sitofp i32 %323 to double
br label %389
328: ; preds = %318, %328
%329 = phi i64 [ %339, %328 ], [ %319, %318 ]
%330 = phi i64 [ %338, %328 ], [ %320, %318 ]
%331 = phi i32 [ %334, %328 ], [ %321, %318 ]
%332 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %329
%333 = load i32, i32* %332
%334 = add nsw i32 %333, %331
%335 = trunc i64 %329 to i32
%336 = mul nsw i32 %333, %335
%337 = sext i32 %336 to i64
%338 = add nsw i64 %330, %337
%339 = add nuw nsw i64 %329, 1
%340 = icmp eq i64 %339, 256
br i1 %340, label %322, label %328
341: ; preds = %322
%342 = sitofp i64 %324 to double
%343 = sitofp i32 %323 to double
%344 = fdiv double %342, %343
%345 = and i64 %58, 1
%346 = icmp eq i64 %345, 0
br i1 %346, label %357, label %347
347: ; preds = %341
%348 = trunc i64 %58 to i32
%349 = sitofp i32 %348 to double
%350 = fsub double %349, %344
%351 = tail call i32 @pow(double %350, i32 2)
%352 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %58
%353 = load i32, i32* %352
%354 = mul nsw i32 %353, %351
%355 = sitofp i32 %354 to double
%356 = add nuw nsw i64 %58, 1
br label %357
357: ; preds = %347, %341
%358 = phi double [ undef, %341 ], [ %355, %347 ]
%359 = phi i64 [ %58, %341 ], [ %356, %347 ]
%360 = phi double [ 0.000000e+00, %341 ], [ %355, %347 ]
%361 = icmp eq i64 %58, 255
br i1 %361, label %362, label %365
362: ; preds = %365, %357
%363 = phi double [ %358, %357 ], [ %386, %365 ]
%364 = fdiv double %363, %343
br label %389
365: ; preds = %357, %365
%366 = phi i64 [ %387, %365 ], [ %359, %357 ]
%367 = phi double [ %386, %365 ], [ %360, %357 ]
%368 = trunc i64 %366 to i32
%369 = sitofp i32 %368 to double
%370 = fsub double %369, %344
%371 = tail call i32 @pow(double %370, i32 2)
%372 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %366
%373 = load i32, i32* %372
%374 = mul nsw i32 %373, %371
%375 = sitofp i32 %374 to double
%376 = fadd double %367, %375
%377 = add nuw nsw i64 %366, 1
%378 = trunc i64 %377 to i32
%379 = sitofp i32 %378 to double
%380 = fsub double %379, %344
%381 = tail call i32 @pow(double %380, i32 2)
%382 = getelementptr inbounds [256 x i32], [256 x i32]* %5, i64 0, i64 %377
%383 = load i32, i32* %382
%384 = mul nsw i32 %383, %381
%385 = sitofp i32 %384 to double
%386 = fadd double %376, %385
%387 = add nuw nsw i64 %366, 2
%388 = icmp eq i64 %387, 256
br i1 %388, label %362, label %365
389: ; preds = %326, %362
%390 = phi double [ %327, %326 ], [ %343, %362 ]
%391 = phi double [ %61, %326 ], [ %344, %362 ]
%392 = phi double [ 0.000000e+00, %326 ], [ %364, %362 ]
%393 = sitofp i32 %275 to double
%394 = fmul double %392, %390
%395 = tail call double @llvm.fmuladd.f64(double %393, double %277, double %394)
%396 = fsub double %276, %31
%397 = tail call i32 @pow(double %396, i32 2)
%398 = mul nsw i32 %397, %275
%399 = fsub double %391, %31
%400 = tail call i32 @pow(double %399, i32 2)
%401 = mul nsw i32 %400, %323
%402 = add nsw i32 %401, %398
%403 = sitofp i32 %402 to double
%404 = fdiv double %403, %395
%405 = fcmp olt double %60, %404
%406 = select i1 %405, double %404, double %60
%407 = trunc i64 %58 to i32
%408 = select i1 %405, i32 %407, i32 %59
%409 = add nuw nsw i64 %58, 1
%410 = icmp eq i64 %409, 256
br i1 %410, label %163, label %57
411: ; preds = %195, %411
%412 = phi i64 [ 0, %195 ], [ %541, %411 ]
%413 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 0
%414 = bitcast i8* %413 to <16 x i8>*
%415 = load <16 x i8>, <16 x i8>* %414
%416 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 16
%417 = bitcast i8* %416 to <16 x i8>*
%418 = load <16 x i8>, <16 x i8>* %417
%419 = zext <16 x i8> %415 to <16 x i32>
%420 = zext <16 x i8> %418 to <16 x i32>
%421 = icmp slt <16 x i32> %201, %419
%422 = icmp slt <16 x i32> %203, %420
%423 = sext <16 x i1> %421 to <16 x i8>
%424 = sext <16 x i1> %422 to <16 x i8>
%425 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 0
%426 = bitcast i8* %425 to <16 x i8>*
store <16 x i8> %423, <16 x i8>* %426
%427 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 16
%428 = bitcast i8* %427 to <16 x i8>*
store <16 x i8> %424, <16 x i8>* %428
%429 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 32
%430 = bitcast i8* %429 to <16 x i8>*
%431 = load <16 x i8>, <16 x i8>* %430
%432 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 48
%433 = bitcast i8* %432 to <16 x i8>*
%434 = load <16 x i8>, <16 x i8>* %433
%435 = zext <16 x i8> %431 to <16 x i32>
%436 = zext <16 x i8> %434 to <16 x i32>
%437 = icmp slt <16 x i32> %201, %435
%438 = icmp slt <16 x i32> %203, %436
%439 = sext <16 x i1> %437 to <16 x i8>
%440 = sext <16 x i1> %438 to <16 x i8>
%441 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 32
%442 = bitcast i8* %441 to <16 x i8>*
store <16 x i8> %439, <16 x i8>* %442
%443 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 48
%444 = bitcast i8* %443 to <16 x i8>*
store <16 x i8> %440, <16 x i8>* %444
%445 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 64
%446 = bitcast i8* %445 to <16 x i8>*
%447 = load <16 x i8>, <16 x i8>* %446
%448 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 80
%449 = bitcast i8* %448 to <16 x i8>*
%450 = load <16 x i8>, <16 x i8>* %449
%451 = zext <16 x i8> %447 to <16 x i32>
%452 = zext <16 x i8> %450 to <16 x i32>
%453 = icmp slt <16 x i32> %201, %451
%454 = icmp slt <16 x i32> %203, %452
%455 = sext <16 x i1> %453 to <16 x i8>
%456 = sext <16 x i1> %454 to <16 x i8>
%457 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 64
%458 = bitcast i8* %457 to <16 x i8>*
store <16 x i8> %455, <16 x i8>* %458
%459 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 80
%460 = bitcast i8* %459 to <16 x i8>*
store <16 x i8> %456, <16 x i8>* %460
%461 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 96
%462 = bitcast i8* %461 to <16 x i8>*
%463 = load <16 x i8>, <16 x i8>* %462
%464 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 112
%465 = bitcast i8* %464 to <16 x i8>*
%466 = load <16 x i8>, <16 x i8>* %465
%467 = zext <16 x i8> %463 to <16 x i32>
%468 = zext <16 x i8> %466 to <16 x i32>
%469 = icmp slt <16 x i32> %201, %467
%470 = icmp slt <16 x i32> %203, %468
%471 = sext <16 x i1> %469 to <16 x i8>
%472 = sext <16 x i1> %470 to <16 x i8>
%473 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 96
%474 = bitcast i8* %473 to <16 x i8>*
store <16 x i8> %471, <16 x i8>* %474
%475 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 112
%476 = bitcast i8* %475 to <16 x i8>*
store <16 x i8> %472, <16 x i8>* %476
%477 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 128
%478 = bitcast i8* %477 to <16 x i8>*
%479 = load <16 x i8>, <16 x i8>* %478
%480 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 144
%481 = bitcast i8* %480 to <16 x i8>*
%482 = load <16 x i8>, <16 x i8>* %481
%483 = zext <16 x i8> %479 to <16 x i32>
%484 = zext <16 x i8> %482 to <16 x i32>
%485 = icmp slt <16 x i32> %201, %483
%486 = icmp slt <16 x i32> %203, %484
%487 = sext <16 x i1> %485 to <16 x i8>
%488 = sext <16 x i1> %486 to <16 x i8>
%489 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 128
%490 = bitcast i8* %489 to <16 x i8>*
store <16 x i8> %487, <16 x i8>* %490
%491 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 144
%492 = bitcast i8* %491 to <16 x i8>*
store <16 x i8> %488, <16 x i8>* %492
%493 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 160
%494 = bitcast i8* %493 to <16 x i8>*
%495 = load <16 x i8>, <16 x i8>* %494
%496 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 176
%497 = bitcast i8* %496 to <16 x i8>*
%498 = load <16 x i8>, <16 x i8>* %497
%499 = zext <16 x i8> %495 to <16 x i32>
%500 = zext <16 x i8> %498 to <16 x i32>
%501 = icmp slt <16 x i32> %201, %499
%502 = icmp slt <16 x i32> %203, %500
%503 = sext <16 x i1> %501 to <16 x i8>
%504 = sext <16 x i1> %502 to <16 x i8>
%505 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 160
%506 = bitcast i8* %505 to <16 x i8>*
store <16 x i8> %503, <16 x i8>* %506
%507 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 176
%508 = bitcast i8* %507 to <16 x i8>*
store <16 x i8> %504, <16 x i8>* %508
%509 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 192
%510 = bitcast i8* %509 to <16 x i8>*
%511 = load <16 x i8>, <16 x i8>* %510
%512 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 208
%513 = bitcast i8* %512 to <16 x i8>*
%514 = load <16 x i8>, <16 x i8>* %513
%515 = zext <16 x i8> %511 to <16 x i32>
%516 = zext <16 x i8> %514 to <16 x i32>
%517 = icmp slt <16 x i32> %201, %515
%518 = icmp slt <16 x i32> %203, %516
%519 = sext <16 x i1> %517 to <16 x i8>
%520 = sext <16 x i1> %518 to <16 x i8>
%521 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 192
%522 = bitcast i8* %521 to <16 x i8>*
store <16 x i8> %519, <16 x i8>* %522
%523 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 208
%524 = bitcast i8* %523 to <16 x i8>*
store <16 x i8> %520, <16 x i8>* %524
%525 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 224
%526 = bitcast i8* %525 to <16 x i8>*
%527 = load <16 x i8>, <16 x i8>* %526
%528 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %3, i64 0, i64 %412, i64 240
%529 = bitcast i8* %528 to <16 x i8>*
%530 = load <16 x i8>, <16 x i8>* %529
%531 = zext <16 x i8> %527 to <16 x i32>
%532 = zext <16 x i8> %530 to <16 x i32>
%533 = icmp slt <16 x i32> %201, %531
%534 = icmp slt <16 x i32> %203, %532
%535 = sext <16 x i1> %533 to <16 x i8>
%536 = sext <16 x i1> %534 to <16 x i8>
%537 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 224
%538 = bitcast i8* %537 to <16 x i8>*
store <16 x i8> %535, <16 x i8>* %538
%539 = getelementptr inbounds [256 x [256 x i8]], [256 x [256 x i8]]* %4, i64 0, i64 %412, i64 240
%540 = bitcast i8* %539 to <16 x i8>*
store <16 x i8> %536, <16 x i8>* %540
%541 = add nuw nsw i64 %412, 1
%542 = icmp eq i64 %541, 256
br i1 %542, label %543, label %411
543: ; preds = %411
%544 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%545 = icmp eq i64 %544, 0
%546 = select i1 %545, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0)
%547 = tail call i32* @fopen(i8* %546, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%548 = tail call i32 @fprintf(i32* %547, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 0, i32 %199)
br label %562
549: ; preds = %562
%550 = tail call i32 @fclose(i32* %547)
%551 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%552 = icmp eq i64 %551, 0
%553 = select i1 %552, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0)
%554 = tail call i32* @fopen(i8* %553, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%555 = bitcast [256 x [256 x i8]]* %4 to i8**
%556 = call i32 @fwrite(i8** %555, i32 1, i32 65536, i32* %554)
%557 = tail call i32 @fclose(i32* %554)
%558 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%559 = icmp eq i64 %558, 0
%560 = select i1 %559, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0)
%561 = tail call i32 @system(i8* %560)
br label %570
562: ; preds = %543, %562
%563 = phi i64 [ 1, %543 ], [ %568, %562 ]
%564 = getelementptr inbounds [256 x i32], [256 x i32]* %6, i64 0, i64 %563
%565 = load i32, i32* %564
%566 = trunc i64 %563 to i32
%567 = tail call i32 @fprintf(i32* %547, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %566, i32 %565)
%568 = add nuw nsw i64 %563, 1
%569 = icmp eq i64 %568, 256
br i1 %569, label %549, label %562
570: ; preds = %549, %15, %11
ret i32 0
}