#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 */
scalar_t__ check_malloc(int);
int /*<<< orphan*/ endpar();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float, ...);
char *getflt(float *, char *);
int /*<<< orphan*/ getpar(char *, char *, float *);
int /*<<< orphan*/ mstpar(char *, char *, ...);
int /*<<< orphan*/ setpar(int, char **);
char *skipval(int, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ sscanf(char *, char *, float *, float *, float *, float *,
                          float *, float *, char *);
int /*<<< orphan*/ *stderr;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ uncert(int, int, float *, float *, float *, float *, float *,
                          float *);
main(int ac, char **av) {
  FILE *fpr, *fpw, *fopfile();
  float *per, *resid, vs30, cdst, xcos, ycos, tmin, tmax;
  float *bias, *sigma, *sigma0, *cl90m, *cl90p;
  int nstat, nper, nval, i;
  float min_cdst = -1e+15;
  float max_cdst = 1e+15;
  float min_vs30 = -1e+15;
  float max_vs30 = 1e+15;
  float min_xcos = -1e+15;
  float max_xcos = 1e+15;
  float min_ycos = -1e+15;
  float max_ycos = 1e+15;
  char residfile[256], fileroot[256], comp[16], rdcomp[16];
  char *sptr, string[2048];
  setpar(ac, av);
  mstpar("residfile", "s", residfile);
  mstpar("fileroot", "s", fileroot);
  mstpar("comp", "s", comp);
  mstpar("nstat", "d", &nstat);
  mstpar("nper", "d", &nper);
  getpar("min_cdst", "f", &min_cdst);
  getpar("max_cdst", "f", &max_cdst);
  getpar("min_vs30", "f", &min_vs30);
  getpar("max_vs30", "f", &max_vs30);
  getpar("min_xcos", "f", &min_xcos);
  getpar("max_xcos", "f", &max_xcos);
  getpar("min_ycos", "f", &min_ycos);
  getpar("max_ycos", "f", &max_ycos);
  endpar();
  per = (float *)check_malloc(nper * sizeof(float));
  bias = (float *)check_malloc(nper * sizeof(float));
  sigma = (float *)check_malloc(nper * sizeof(float));
  sigma0 = (float *)check_malloc(nper * sizeof(float));
  cl90m = (float *)check_malloc(nper * sizeof(float));
  cl90p = (float *)check_malloc(nper * sizeof(float));
  resid = (float *)check_malloc(nstat * nper * sizeof(float));
  fpr = fopfile(residfile, "r");
  fgets(string, 2048, fpr);
  sptr = skipval(13, string);
  for (i = 0; i < nper; i++)
    sptr = getflt(&per[i], sptr);
  nval = 0;
  while (fgets(string, 2048, fpr) != NULL) {
    sscanf(string, "%*s %*f %*s %*f %*f %*d %f %f %f %f %f %f %s", &vs30, &cdst,
           &xcos, &ycos, &tmin, &tmax, rdcomp);
    if ((vs30 >= min_vs30 && vs30 <= max_vs30) &&
        (cdst >= min_cdst && cdst <= max_cdst) &&
        (xcos >= min_xcos && xcos <= max_xcos) &&
        (ycos >= min_ycos && ycos <= max_ycos) && (strcmp(rdcomp, comp) == 0)) {
      sptr = skipval(13, string);
      for (i = 0; i < nper; i++)
        sptr = getflt(&resid[i + nval * nper], sptr);
      nval++;
    }
    if (nval > nstat) {
      fprintf(stderr, "(nval= %d) > (nstat= %d), exiting...\n", nval, nstat);
      exit(-1);
    }
  }
  fclose(fpr);
  fprintf(stderr, "nval= %d\n", nval);
  uncert(nval, nper, resid, bias, sigma, sigma0, cl90m, cl90p);
  sprintf(string, "%s.bias", fileroot);
  fpw = fopfile(string, "w");
  for (i = 0; i < nper; i++)
    fprintf(fpw, "%13.5e %13.5e\n", per[i], bias[i]);
  fclose(fpw);
  sprintf(string, "%s.sigma", fileroot);
  fpw = fopfile(string, "w");
  for (i = 0; i < nper; i++)
    fprintf(fpw, "%13.5e %13.5e\n", per[i], sigma[i]);
  fclose(fpw);
  sprintf(string, "%s.sigma0", fileroot);
  fpw = fopfile(string, "w");
  for (i = 0; i < nper; i++)
    fprintf(fpw, "%13.5e %13.5e\n", per[i], sigma0[i]);
  fclose(fpw);
  sprintf(string, "%s.m90", fileroot);
  fpw = fopfile(string, "w");
  for (i = 0; i < nper; i++)
    fprintf(fpw, "%13.5e %13.5e\n", per[i], cl90m[i]);
  fclose(fpw);
  sprintf(string, "%s.p90", fileroot);
  fpw = fopfile(string, "w");
  for (i = 0; i < nper; i++)
    fprintf(fpw, "%13.5e %13.5e\n", per[i], cl90p[i]);
  fclose(fpw);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xaf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xde3(%rip),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  0xdcf(%rip),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
movss  0xdc3(%rip),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  0xdaf(%rip),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  0xda3(%rip),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  0xd8f(%rip),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  0xd83(%rip),%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
movss  0xd6f(%rip),%xmm0
movss  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <setpar@plt>
lea    -0x1a0(%rbp),%rdx
lea    0xd55(%rip),%rdi
lea    0xde8(%rip),%rsi
mov    $0x0,%al
call   1040 <mstpar@plt>
lea    -0x2a0(%rbp),%rdx
lea    0xd43(%rip),%rdi
lea    0xdcc(%rip),%rsi
mov    $0x0,%al
call   1040 <mstpar@plt>
lea    -0x2b0(%rbp),%rdx
lea    0xd30(%rip),%rdi
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1040 <mstpar@plt>
lea    0xd20(%rip),%rdi
lea    0xd1f(%rip),%rsi
lea    -0x74(%rbp),%rdx
mov    $0x0,%al
call   1040 <mstpar@plt>
lea    0xd0f(%rip),%rdi
lea    0xd06(%rip),%rsi
lea    -0x78(%rbp),%rdx
mov    $0x0,%al
call   1040 <mstpar@plt>
lea    0xcfb(%rip),%rdi
lea    0xcfd(%rip),%rsi
lea    -0x84(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xcec(%rip),%rdi
lea    0xce3(%rip),%rsi
lea    -0x88(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xcdb(%rip),%rdi
lea    0xcc9(%rip),%rsi
lea    -0x8c(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xcca(%rip),%rdi
lea    0xcaf(%rip),%rsi
lea    -0x90(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xcb9(%rip),%rdi
lea    0xc95(%rip),%rsi
lea    -0x94(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xca8(%rip),%rdi
lea    0xc7b(%rip),%rsi
lea    -0x98(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xc97(%rip),%rdi
lea    0xc61(%rip),%rsi
lea    -0x9c(%rbp),%rdx
call   10d0 <getpar@plt>
lea    0xc86(%rip),%rdi
lea    0xc47(%rip),%rsi
lea    -0xa0(%rbp),%rdx
call   10d0 <getpar@plt>
mov    $0x0,%al
call   10f0 <endpar@plt>
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x28(%rbp)
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x68(%rbp)
movslq -0x78(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x74(%rbp),%eax
imul   -0x78(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   10b0 <check_malloc@plt>
mov    %rax,-0x30(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    0xb91(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x18(%rbp)
lea    -0xad0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1060 <fgets@plt>
lea    -0xad0(%rbp),%rsi
mov    $0xd,%edi
call   10e0 <skipval@plt>
mov    %rax,-0x2c8(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1515 <main+0x315>
mov    -0x28(%rbp),%rdi
movslq -0x80(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x2c8(%rbp),%rsi
call   10a0 <getflt@plt>
mov    %rax,-0x2c8(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    14d9 <main+0x2d9>
movl   $0x0,-0x7c(%rbp)
lea    -0xad0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     16e1 <main+0x4e1>
lea    -0xad0(%rbp),%rdi
lea    -0x2c0(%rbp),%rax
lea    0xb27(%rip),%rsi
lea    -0x34(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x3c(%rbp),%r8
lea    -0x40(%rbp),%r9
lea    -0x44(%rbp),%r11
lea    -0x48(%rbp),%r10
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   10c0 <sscanf@plt>
movss  -0x34(%rbp),%xmm0
ucomiss -0x8c(%rbp),%xmm0
jb     16a6 <main+0x4a6>
movss  -0x34(%rbp),%xmm1
movss  -0x90(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jb     16a6 <main+0x4a6>
movss  -0x38(%rbp),%xmm0
ucomiss -0x84(%rbp),%xmm0
jb     16a6 <main+0x4a6>
movss  -0x38(%rbp),%xmm1
movss  -0x88(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jb     16a6 <main+0x4a6>
movss  -0x3c(%rbp),%xmm0
ucomiss -0x94(%rbp),%xmm0
jb     16a6 <main+0x4a6>
movss  -0x3c(%rbp),%xmm1
movss  -0x98(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jb     16a6 <main+0x4a6>
movss  -0x40(%rbp),%xmm0
ucomiss -0x9c(%rbp),%xmm0
jb     16a6 <main+0x4a6>
movss  -0x40(%rbp),%xmm1
movss  -0xa0(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jb     16a6 <main+0x4a6>
lea    -0x2c0(%rbp),%rdi
lea    -0x2b0(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    16a6 <main+0x4a6>
lea    -0xad0(%rbp),%rsi
mov    $0xd,%edi
call   10e0 <skipval@plt>
mov    %rax,-0x2c8(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    169d <main+0x49d>
mov    -0x30(%rbp),%rdi
mov    -0x80(%rbp),%eax
mov    -0x7c(%rbp),%ecx
imul   -0x78(%rbp),%ecx
add    %ecx,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x2c8(%rbp),%rsi
call   10a0 <getflt@plt>
mov    %rax,-0x2c8(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1657 <main+0x457>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jle    16dc <main+0x4dc>
mov    0x2927(%rip),%rax
mov    (%rax),%rdi
cvtsi2ssl -0x7c(%rbp),%xmm0
mov    -0x74(%rbp),%edx
lea    0x9d9(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0xffffffff,%edi
call   1110 <exit@plt>
jmp    151c <main+0x31c>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
mov    0x28ef(%rip),%rax
mov    (%rax),%rdi
cvtsi2ssl -0x7c(%rbp),%xmm0
lea    0x9ca(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    -0x7c(%rbp),%edi
mov    -0x78(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%r8
mov    -0x60(%rbp),%r9
mov    -0x68(%rbp),%r10
mov    -0x70(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1080 <uncert@plt>
lea    -0xad0(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0x98c(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0xad0(%rbp),%rdi
lea    0x981(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    17b7 <main+0x5b7>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x93c(%rip),%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    176d <main+0x56d>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0xad0(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0x918(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0xad0(%rbp),%rdi
lea    0x8f4(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1844 <main+0x644>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x8af(%rip),%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    17fa <main+0x5fa>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0xad0(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0x894(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0xad0(%rbp),%rdi
lea    0x867(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    18d1 <main+0x6d1>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x822(%rip),%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1887 <main+0x687>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0xad0(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0x811(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0xad0(%rbp),%rdi
lea    0x7da(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    195e <main+0x75e>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x68(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x795(%rip),%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1914 <main+0x714>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0xad0(%rbp),%rdi
lea    -0x2a0(%rbp),%rdx
lea    0x78b(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0xad0(%rbp),%rdi
lea    0x74d(%rip),%rsi
mov    $0x0,%al
call   1120 <fopfile@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    19eb <main+0x7eb>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x80(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0x708(%rip),%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    19a1 <main+0x7a1>
mov    -0x20(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0xaf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa98,%rsp
movl   $0xd8635fa9,0x20(%rsp)
d8
movl   $0x58635fa9,0x1c(%rsp)
58
movl   $0xd8635fa9,0x18(%rsp)
d8
movl   $0x58635fa9,0x14(%rsp)
58
movl   $0xd8635fa9,0x10(%rsp)
d8
movl   $0x58635fa9,0xc(%rsp)
58
movl   $0xd8635fa9,0x8(%rsp)
d8
movl   $0x58635fa9,0x4(%rsp)
58
call   1030 <setpar@plt>
lea    0xda3(%rip),%rdi
lea    0xe36(%rip),%rbx
xor    %r13d,%r13d
lea    0x190(%rsp),%r12
mov    %rbx,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <mstpar@plt>
lea    0xd87(%rip),%rdi
lea    0x90(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <mstpar@plt>
lea    0xd77(%rip),%rdi
lea    0x80(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <mstpar@plt>
lea    0xd63(%rip),%rdi
lea    0xd62(%rip),%rbx
lea    0x24(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <mstpar@plt>
lea    0xd4e(%rip),%rdi
mov    %rsp,%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <mstpar@plt>
lea    0xd3f(%rip),%rdi
lea    0xd41(%rip),%rbx
lea    0x20(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xd2f(%rip),%rdi
lea    0x1c(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xd24(%rip),%rdi
lea    0x18(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xd19(%rip),%rdi
lea    0x14(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xd0e(%rip),%rdi
lea    0x10(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xd03(%rip),%rdi
lea    0xc(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xcf8(%rip),%rdi
lea    0x8(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
lea    0xced(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    %rbx,%rsi
call   10d0 <getpar@plt>
xor    %eax,%eax
call   10f0 <endpar@plt>
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,%r15
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x58(%rsp)
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x60(%rsp)
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x28(%rsp)
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x48(%rsp)
mov    (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x50(%rsp)
mov    0x24(%rsp),%edi
imul   (%rsp),%edi
shl    $0x2,%edi
call   10b0 <check_malloc@plt>
mov    %rax,0x40(%rsp)
lea    0xc1c(%rip),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%r12
lea    0x290(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x800,%esi
mov    %rax,%rdx
call   1060 <fgets@plt>
mov    $0xd,%edi
mov    %rbx,%rsi
call   10e0 <skipval@plt>
cmpl   $0x0,(%rsp)
jle    146c <main+0x26c>
xor    %ebp,%ebp
mov    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %rax,%rsi
call   10a0 <getflt@plt>
add    $0x1,%rbp
movslq (%rsp),%rcx
add    $0x4,%rbx
cmp    %rcx,%rbp
jl     1450 <main+0x250>
lea    0x290(%rsp),%rbp
lea    0x70(%rsp),%rbx
mov    0x28(%rsp),%r14
jmp    149d <main+0x29d>
add    $0x1,%r13d
mov    0x28(%rsp),%r14
lea    0x70(%rsp),%rbx
xchg   %ax,%ax
mov    0x24(%rsp),%edx
cmp    %edx,%r13d
jg     18b6 <main+0x6b6>
mov    %rbp,%rdi
mov    $0x800,%esi
mov    %r12,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     15d6 <main+0x3d6>
sub    $0x8,%rsp
mov    %rbp,%rdi
lea    0xbab(%rip),%rsi
lea    0x44(%rsp),%rdx
lea    0x40(%rsp),%rcx
lea    0x3c(%rsp),%r8
lea    0x38(%rsp),%r9
push   %rbx
lea    0x78(%rsp),%rax
push   %rax
lea    0x84(%rsp),%rax
push   %rax
call   10c0 <sscanf@plt>
add    $0x20,%rsp
movss  0x3c(%rsp),%xmm0
ucomiss 0x18(%rsp),%xmm0
jb     1490 <main+0x290>
movss  0x14(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1490 <main+0x290>
movss  0x38(%rsp),%xmm0
ucomiss 0x20(%rsp),%xmm0
jb     1490 <main+0x290>
movss  0x1c(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1490 <main+0x290>
movss  0x34(%rsp),%xmm0
ucomiss 0x10(%rsp),%xmm0
jb     1490 <main+0x290>
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1490 <main+0x290>
movss  0x30(%rsp),%xmm0
ucomiss 0x8(%rsp),%xmm0
jb     1490 <main+0x290>
movss  0x4(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1490 <main+0x290>
mov    %rbx,%rdi
lea    0x80(%rsp),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1490 <main+0x290>
mov    $0xd,%edi
mov    %rbp,%rsi
call   10e0 <skipval@plt>
mov    (%rsp),%ecx
test   %ecx,%ecx
mov    0x40(%rsp),%r14
jle    1480 <main+0x280>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %r13d,%ecx
movslq %ecx,%rcx
add    %rbx,%rcx
lea    (%r14,%rcx,4),%rdi
mov    %rax,%rsi
call   10a0 <getflt@plt>
mov    (%rsp),%ecx
add    $0x1,%rbx
cmp    %ecx,%ebx
jl     15b0 <main+0x3b0>
jmp    1480 <main+0x280>
mov    %r12,%rdi
call   1050 <fclose@plt>
mov    0x29fb(%rip),%rax
mov    (%rax),%rdi
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
lea    0xacb(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    (%rsp),%esi
mov    %r13d,%edi
mov    0x40(%rsp),%rdx
mov    0x58(%rsp),%r13
mov    %r13,%rcx
mov    0x60(%rsp),%r12
mov    %r12,%r8
mov    %r14,%r9
push   0x50(%rsp)
push   0x50(%rsp)
call   1080 <uncert@plt>
add    $0x10,%rsp
lea    0xa98(%rip),%rsi
lea    0x290(%rsp),%rbx
lea    0x90(%rsp),%rdx
mov    %rbx,%rdi
call   1100 <sprintf@plt>
lea    0xa81(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%rbp
cmpl   $0x0,(%rsp)
jle    169b <main+0x49b>
xor    %ebx,%ebx
lea    0xa67(%rip),%r14
nop
movss  (%r15,%rbx,4),%xmm0
movss  0x0(%r13,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     1670 <main+0x470>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0xa3b(%rip),%rsi
lea    0x290(%rsp),%rbx
lea    0x90(%rsp),%rdx
mov    %rbx,%rdi
call   1100 <sprintf@plt>
lea    0xa0b(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%rbp
cmpl   $0x0,(%rsp)
jle    171a <main+0x51a>
xor    %ebx,%ebx
lea    0x9f1(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
movss  (%r15,%rbx,4),%xmm0
movss  (%r12,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     16f0 <main+0x4f0>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0x9c5(%rip),%rsi
lea    0x290(%rsp),%rbx
lea    0x90(%rsp),%rdx
mov    %rbx,%rdi
call   1100 <sprintf@plt>
lea    0x98c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%rbp
cmpl   $0x0,(%rsp)
mov    0x28(%rsp),%r12
jle    179a <main+0x59a>
xor    %ebx,%ebx
lea    0x96d(%rip),%r14
nopl   0x0(%rax)
movss  (%r15,%rbx,4),%xmm0
movss  (%r12,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     1770 <main+0x570>
mov    %rbp,%rdi
call   1050 <fclose@plt>
lea    0x94f(%rip),%rsi
lea    0x290(%rsp),%rbx
lea    0x90(%rsp),%rdx
mov    %rbx,%rdi
call   1100 <sprintf@plt>
lea    0x90c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%r12
cmpl   $0x0,(%rsp)
mov    0x48(%rsp),%rbp
jle    181a <main+0x61a>
xor    %ebx,%ebx
lea    0x8ed(%rip),%r14
nopl   0x0(%rax)
movss  (%r15,%rbx,4),%xmm0
movss  0x0(%rbp,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     17f0 <main+0x5f0>
mov    %r12,%rdi
call   1050 <fclose@plt>
lea    0x8d6(%rip),%rsi
lea    0x290(%rsp),%rbx
lea    0x90(%rsp),%rdx
mov    %rbx,%rdi
call   1100 <sprintf@plt>
lea    0x88c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1120 <fopfile@plt>
mov    %rax,%r12
cmpl   $0x0,(%rsp)
mov    0x50(%rsp),%rbp
jle    189a <main+0x69a>
xor    %ebx,%ebx
lea    0x86d(%rip),%r14
nopl   0x0(%rax)
movss  (%r15,%rbx,4),%xmm0
movss  0x0(%rbp,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x2,%al
call   1090 <fprintf@plt>
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jl     1870 <main+0x670>
mov    %r12,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0xa98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2723(%rip),%rax
mov    (%rax),%rdi
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
lea    0x7cd(%rip),%rsi
mov    $0x1,%al
call   1090 <fprintf@plt>
mov    $0xffffffff,%edi
call   1110 <exit@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"residfile\00"
@.str.1 = [2 x i8] c"s\00"
@.str.2 = [9 x i8] c"fileroot\00"
@.str.3 = [5 x i8] c"comp\00"
@.str.4 = [6 x i8] c"nstat\00"
@.str.5 = [2 x i8] c"d\00"
@.str.6 = [5 x i8] c"nper\00"
@.str.7 = [9 x i8] c"min_cdst\00"
@.str.8 = [2 x i8] c"f\00"
@.str.9 = [9 x i8] c"max_cdst\00"
@.str.10 = [9 x i8] c"min_vs30\00"
@.str.11 = [9 x i8] c"max_vs30\00"
@.str.12 = [9 x i8] c"min_xcos\00"
@.str.13 = [9 x i8] c"max_xcos\00"
@.str.14 = [9 x i8] c"min_ycos\00"
@.str.15 = [9 x i8] c"max_ycos\00"
@.str.16 = [2 x i8] c"r\00"
@.str.17 = [45 x i8] c"%*s %*f %*s %*f %*f %*d %f %f %f %f %f %f %s\00"
@stderr = global i32* null
@.str.18 = [38 x i8] c"(nval= %d) > (nstat= %d), exiting...\0A\00"
@.str.19 = [10 x i8] c"nval= %d\0A\00"
@.str.20 = [8 x i8] c"%s.bias\00"
@.str.21 = [2 x i8] c"w\00"
@.str.22 = [15 x i8] c"%13.5e %13.5e\0A\00"
@.str.23 = [9 x i8] c"%s.sigma\00"
@.str.24 = [10 x i8] c"%s.sigma0\00"
@.str.25 = [7 x i8] c"%s.m90\00"
@.str.26 = [7 x i8] c"%s.p90\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca [256 x i8]
%20 = alloca [256 x i8]
%21 = alloca [16 x i8]
%22 = alloca [16 x i8]
%23 = alloca [2048 x i8]
%24 = bitcast float* %3 to i8*
%25 = bitcast float* %4 to i8*
%26 = bitcast float* %5 to i8*
%27 = bitcast float* %6 to i8*
%28 = bitcast float* %7 to i8*
%29 = bitcast float* %8 to i8*
%30 = bitcast i32* %9 to i8*
%31 = bitcast i32* %10 to i8*
%32 = bitcast float* %11 to i8*
store float 0xC30C6BF520000000, float* %11
%33 = bitcast float* %12 to i8*
store float 0x430C6BF520000000, float* %12
%34 = bitcast float* %13 to i8*
store float 0xC30C6BF520000000, float* %13
%35 = bitcast float* %14 to i8*
store float 0x430C6BF520000000, float* %14
%36 = bitcast float* %15 to i8*
store float 0xC30C6BF520000000, float* %15
%37 = bitcast float* %16 to i8*
store float 0x430C6BF520000000, float* %16
%38 = bitcast float* %17 to i8*
store float 0xC30C6BF520000000, float* %17
%39 = bitcast float* %18 to i8*
store float 0x430C6BF520000000, float* %18
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %19, i64 0, i64 0
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %20, i64 0, i64 0
%42 = getelementptr inbounds [16 x i8], [16 x i8]* %21, i64 0, i64 0
%43 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%44 = getelementptr inbounds [2048 x i8], [2048 x i8]* %23, i64 0, i64 0
%45 = tail call i32 @setpar(i32 %0, i8** %1)
%46 = call i32 (i8*, i8*, ...) @mstpar(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %40)
%47 = call i32 (i8*, i8*, ...) @mstpar(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), i8* %41)
%48 = call i32 (i8*, i8*, ...) @mstpar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %42)
%49 = call i32 (i8*, i8*, ...) @mstpar(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32* %9)
%50 = call i32 (i8*, i8*, ...) @mstpar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32* %10)
%51 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %11)
%52 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %12)
%53 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %13)
%54 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %14)
%55 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %15)
%56 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %16)
%57 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %17)
%58 = call i32 @getpar(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), float* %18)
%59 = call i32 (...) @endpar()
%60 = load i32, i32* %10
%61 = shl i32 %60, 2
%62 = call i64 @check_malloc(i32 %61)
%63 = inttoptr i64 %62 to float*
%64 = load i32, i32* %10
%65 = shl i32 %64, 2
%66 = call i64 @check_malloc(i32 %65)
%67 = inttoptr i64 %66 to float*
%68 = load i32, i32* %10
%69 = shl i32 %68, 2
%70 = call i64 @check_malloc(i32 %69)
%71 = inttoptr i64 %70 to float*
%72 = load i32, i32* %10
%73 = shl i32 %72, 2
%74 = call i64 @check_malloc(i32 %73)
%75 = inttoptr i64 %74 to float*
%76 = load i32, i32* %10
%77 = shl i32 %76, 2
%78 = call i64 @check_malloc(i32 %77)
%79 = inttoptr i64 %78 to float*
%80 = load i32, i32* %10
%81 = shl i32 %80, 2
%82 = call i64 @check_malloc(i32 %81)
%83 = inttoptr i64 %82 to float*
%84 = load i32, i32* %9
%85 = load i32, i32* %10
%86 = shl i32 %84, 2
%87 = mul i32 %86, %85
%88 = call i64 @check_malloc(i32 %87)
%89 = inttoptr i64 %88 to float*
%90 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
%91 = call i32* @fgets(i8* %44, i32 2048, i32* %90)
%92 = call i8* @skipval(i32 13, i8* %44)
%93 = load i32, i32* %10
%94 = icmp sgt i32 %93, 0
br i1 %94, label %95, label %104
95: ; preds = %2, %95
%96 = phi i64 [ %100, %95 ], [ 0, %2 ]
%97 = phi i8* [ %99, %95 ], [ %92, %2 ]
%98 = getelementptr inbounds float, float* %63, i64 %96
%99 = call i8* @getflt(float* %98, i8* %97)
%100 = add nuw nsw i64 %96, 1
%101 = load i32, i32* %10
%102 = sext i32 %101 to i64
%103 = icmp slt i64 %100, %102
br i1 %103, label %95, label %104
104: ; preds = %95, %2
br label %105
105: ; preds = %104, %159
%106 = phi i32 [ %160, %159 ], [ 0, %104 ]
%107 = call i32* @fgets(i8* %44, i32 2048, i32* %90)
%108 = icmp eq i32* %107, null
br i1 %108, label %168, label %109
109: ; preds = %105
%110 = call i32 @sscanf(i8* %44, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0), float* %3, float* %4, float* %5, float* %6, float* %7, float* %8, i8* %43)
%111 = load float, float* %3
%112 = load float, float* %13
%113 = fcmp ult float %111, %112
%114 = load float, float* %14
%115 = fcmp ugt float %111, %114
%116 = select i1 %113, i1 true, i1 %115
br i1 %116, label %159, label %117
117: ; preds = %109
%118 = load float, float* %4
%119 = load float, float* %11
%120 = fcmp ult float %118, %119
%121 = load float, float* %12
%122 = fcmp ugt float %118, %121
%123 = select i1 %120, i1 true, i1 %122
br i1 %123, label %159, label %124
124: ; preds = %117
%125 = load float, float* %5
%126 = load float, float* %15
%127 = fcmp ult float %125, %126
%128 = load float, float* %16
%129 = fcmp ugt float %125, %128
%130 = select i1 %127, i1 true, i1 %129
br i1 %130, label %159, label %131
131: ; preds = %124
%132 = load float, float* %6
%133 = load float, float* %17
%134 = fcmp ult float %132, %133
%135 = load float, float* %18
%136 = fcmp ugt float %132, %135
%137 = select i1 %134, i1 true, i1 %136
br i1 %137, label %159, label %138
138: ; preds = %131
%139 = call i64 @strcmp(i8* %43, i8* %42)
%140 = icmp eq i64 %139, 0
br i1 %140, label %141, label %159
141: ; preds = %138
%142 = call i8* @skipval(i32 13, i8* %44)
%143 = load i32, i32* %10
%144 = icmp sgt i32 %143, 0
br i1 %144, label %145, label %157
145: ; preds = %141, %145
%146 = phi i32 [ %155, %145 ], [ %143, %141 ]
%147 = phi i8* [ %153, %145 ], [ %142, %141 ]
%148 = phi i32 [ %154, %145 ], [ 0, %141 ]
%149 = mul nsw i32 %146, %106
%150 = add nsw i32 %149, %148
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds float, float* %89, i64 %151
%153 = call i8* @getflt(float* %152, i8* %147)
%154 = add nuw nsw i32 %148, 1
%155 = load i32, i32* %10
%156 = icmp slt i32 %154, %155
br i1 %156, label %145, label %157
157: ; preds = %145, %141
%158 = add nsw i32 %106, 1
br label %159
159: ; preds = %157, %138, %131, %124, %117, %109
%160 = phi i32 [ %158, %157 ], [ %106, %138 ], [ %106, %131 ], [ %106, %124 ], [ %106, %117 ], [ %106, %109 ]
%161 = load i32, i32* %9
%162 = icmp sgt i32 %160, %161
br i1 %162, label %163, label %105
163: ; preds = %159
%164 = load i32*, i32** @stderr
%165 = sitofp i32 %160 to float
%166 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0), float %165, i32 %161)
%167 = call i32 @exit(i32 -1)
unreachable
168: ; preds = %105
%169 = call i32 @fclose(i32* %90)
%170 = load i32*, i32** @stderr
%171 = sitofp i32 %106 to float
%172 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), float %171)
%173 = load i32, i32* %10
%174 = call i32 @uncert(i32 %106, i32 %173, float* %89, float* %67, float* %71, float* %75, float* %79, float* %83)
%175 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8* %41)
%176 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%177 = load i32, i32* %10
%178 = icmp sgt i32 %177, 0
br i1 %178, label %179, label %191
179: ; preds = %168, %179
%180 = phi i64 [ %187, %179 ], [ 0, %168 ]
%181 = getelementptr inbounds float, float* %63, i64 %180
%182 = load float, float* %181
%183 = getelementptr inbounds float, float* %67, i64 %180
%184 = load float, float* %183
%185 = fpext float %184 to double
%186 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %176, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), float %182, double %185)
%187 = add nuw nsw i64 %180, 1
%188 = load i32, i32* %10
%189 = sext i32 %188 to i64
%190 = icmp slt i64 %187, %189
br i1 %190, label %179, label %191
191: ; preds = %179, %168
%192 = call i32 @fclose(i32* %176)
%193 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.23, i64 0, i64 0), i8* %41)
%194 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%195 = load i32, i32* %10
%196 = icmp sgt i32 %195, 0
br i1 %196, label %197, label %209
197: ; preds = %191, %197
%198 = phi i64 [ %205, %197 ], [ 0, %191 ]
%199 = getelementptr inbounds float, float* %63, i64 %198
%200 = load float, float* %199
%201 = getelementptr inbounds float, float* %71, i64 %198
%202 = load float, float* %201
%203 = fpext float %202 to double
%204 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %194, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), float %200, double %203)
%205 = add nuw nsw i64 %198, 1
%206 = load i32, i32* %10
%207 = sext i32 %206 to i64
%208 = icmp slt i64 %205, %207
br i1 %208, label %197, label %209
209: ; preds = %197, %191
%210 = call i32 @fclose(i32* %194)
%211 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.24, i64 0, i64 0), i8* %41)
%212 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%213 = load i32, i32* %10
%214 = icmp sgt i32 %213, 0
br i1 %214, label %215, label %227
215: ; preds = %209, %215
%216 = phi i64 [ %223, %215 ], [ 0, %209 ]
%217 = getelementptr inbounds float, float* %63, i64 %216
%218 = load float, float* %217
%219 = getelementptr inbounds float, float* %75, i64 %216
%220 = load float, float* %219
%221 = fpext float %220 to double
%222 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %212, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), float %218, double %221)
%223 = add nuw nsw i64 %216, 1
%224 = load i32, i32* %10
%225 = sext i32 %224 to i64
%226 = icmp slt i64 %223, %225
br i1 %226, label %215, label %227
227: ; preds = %215, %209
%228 = call i32 @fclose(i32* %212)
%229 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.25, i64 0, i64 0), i8* %41)
%230 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%231 = load i32, i32* %10
%232 = icmp sgt i32 %231, 0
br i1 %232, label %233, label %245
233: ; preds = %227, %233
%234 = phi i64 [ %241, %233 ], [ 0, %227 ]
%235 = getelementptr inbounds float, float* %63, i64 %234
%236 = load float, float* %235
%237 = getelementptr inbounds float, float* %79, i64 %234
%238 = load float, float* %237
%239 = fpext float %238 to double
%240 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %230, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), float %236, double %239)
%241 = add nuw nsw i64 %234, 1
%242 = load i32, i32* %10
%243 = sext i32 %242 to i64
%244 = icmp slt i64 %241, %243
br i1 %244, label %233, label %245
245: ; preds = %233, %227
%246 = call i32 @fclose(i32* %230)
%247 = call i32 @sprintf(i8* %44, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.26, i64 0, i64 0), i8* %41)
%248 = call i32* (i8*, i8*, ...) bitcast (i32* (...)* @fopfile to i32* (i8*, i8*, ...)*)(i8* %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i64 0, i64 0))
%249 = load i32, i32* %10
%250 = icmp sgt i32 %249, 0
br i1 %250, label %251, label %263
251: ; preds = %245, %251
%252 = phi i64 [ %259, %251 ], [ 0, %245 ]
%253 = getelementptr inbounds float, float* %63, i64 %252
%254 = load float, float* %253
%255 = getelementptr inbounds float, float* %83, i64 %252
%256 = load float, float* %255
%257 = fpext float %256 to double
%258 = call i32 (i32*, i8*, float, ...) @fprintf(i32* %248, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), float %254, double %257)
%259 = add nuw nsw i64 %252, 1
%260 = load i32, i32* %10
%261 = sext i32 %260 to i64
%262 = icmp slt i64 %259, %261
br i1 %262, label %251, label %263
263: ; preds = %251, %245
%264 = call i32 @fclose(i32* %248)
ret i32 0
}