#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 EOF;
char *char_alloc(int);
int /*<<< orphan*/ check_scan(int, int, char *, int /*<<< orphan*/ *);
double *double_alloc(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
int /*<<< orphan*/ free(void *);
int fscanf(int /*<<< orphan*/ *, char *, double *);
int /*<<< orphan*/ make_table(char *, char *);
int /*<<< orphan*/ *openfile_rt(char *, int *);
int /*<<< orphan*/ stderr;
void trav_time_init(int nh, int nd, double h, double *dv, double *tv,
                    int *ierror) {
  int i, j, nl, flag, co;
  double *depths, *tmp, h1, h2, t1, t2;
  char *file;
  FILE *P_ttfile;
  tmp = double_alloc((nh + 1) * (nd + 1));
  depths = double_alloc(nh);
  file = char_alloc(256);
  make_table("WPHASE_HOME", file);
  P_ttfile = openfile_rt(file, &nl);
  i = 0;
  while ((flag = fscanf(P_ttfile, "%lf", &tmp[i++])) != EOF)
    check_scan(1, flag, file, P_ttfile);
  fclose(P_ttfile);
  for (i = 1; i < nh; i++) {
    if ((h >= tmp[i]) && (h <= tmp[i + 1])) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    if (*ierror == 1) {
      fprintf(stderr, "Error: depth: %f out of range\n", h);
      exit(1);
    }
    fprintf(stderr, "WARNING : depth: %f out of range; extrapolating ... \n",
            h);
    *ierror = 1;
    i--;
  }
  j = i;
  h1 = tmp[j];
  h2 = tmp[j + 1];
  co = 0;
  for (i = 0; i < nd; i++) {
    co += nh + 1;
    dv[i] = tmp[co];
    t1 = tmp[co + j];
    t2 = tmp[co + j + 1];
    tv[i] = t1 + (t2 - t1) * (h - h1) / (h2 - h1);
  }
  free((void *)depths);
  free((void *)file);
  free((void *)tmp);
}


x86 assembly (clang, -O0):
<trav_time_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%eax
add    $0x1,%eax
imul   %eax,%edi
call   10a0 <double_alloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x4(%rbp),%edi
call   10a0 <double_alloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x100,%edi
call   1060 <char_alloc@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rsi
lea    0xe01(%rip),%rdi
call   1050 <make_table@plt>
mov    -0x78(%rbp),%rdi
lea    -0x34(%rbp),%rsi
call   1080 <openfile_rt@plt>
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x80(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
cltq
shl    $0x3,%rax
add    %rax,%rdx
lea    0xdcd(%rip),%rsi
call   1070 <fscanf@plt>
mov    %eax,-0x38(%rbp)
mov    0x2d9a(%rip),%rcx
cmp    (%rcx),%eax
je     1270 <trav_time_init+0xd0>
mov    -0x38(%rbp),%esi
mov    -0x78(%rbp),%rdx
mov    -0x80(%rbp),%rcx
mov    $0x1,%edi
call   10b0 <check_scan@plt>
jmp    121c <trav_time_init+0x7c>
mov    -0x80(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12e4 <trav_time_init+0x144>
movsd  -0x10(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     12d1 <trav_time_init+0x131>
movsd  -0x10(%rbp),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     12d1 <trav_time_init+0x131>
movl   $0x0,-0x38(%rbp)
jmp    12e4 <trav_time_init+0x144>
jmp    12d6 <trav_time_init+0x136>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1280 <trav_time_init+0xe0>
cmpl   $0x0,-0x38(%rbp)
je     134c <trav_time_init+0x1ac>
mov    -0x28(%rbp),%rax
cmpl   $0x1,(%rax)
jne    131f <trav_time_init+0x17f>
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
lea    0xd00(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>
mov    0x2cb2(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
lea    0xcfb(%rip),%rsi
call   1090 <fprintf@plt>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1436 <trav_time_init+0x296>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
subsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
subsd  -0x58(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1389 <trav_time_init+0x1e9>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trav_time_init>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8,0x28(%rsp)
mov    %rcx,(%rsp)
mov    %rdx,0x38(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %edi,%ebx
lea    0x1(%rbx),%eax
mov    %rsi,0x30(%rsp)
lea    0x1(%rsi),%edi
imul   %eax,%edi
call   10a0 <double_alloc@plt>
mov    %rax,%r13
mov    %rbx,0x8(%rsp)
mov    %ebx,%edi
call   10a0 <double_alloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x100,%edi
call   1060 <char_alloc@plt>
mov    %rax,%rbx
lea    0xe01(%rip),%rdi
mov    %rax,%rsi
call   1050 <make_table@plt>
lea    0x44(%rsp),%rsi
mov    %rbx,%r15
mov    %rbx,%rdi
call   1080 <openfile_rt@plt>
mov    %rax,%r12
lea    0xdeb(%rip),%rsi
mov    %rax,%rdi
mov    %r13,%rdx
call   1070 <fscanf@plt>
mov    %eax,%ebp
mov    0x2db3(%rip),%rbx
cmp    (%rbx),%eax
je     126e <trav_time_init+0xce>
lea    0x8(%r13),%r14
nopl   (%rax)
mov    $0x1,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r12,%rcx
call   10b0 <check_scan@plt>
mov    %r12,%rdi
lea    0xdb0(%rip),%rsi
mov    %r14,%rdx
call   1070 <fscanf@plt>
mov    %eax,%ebp
add    $0x8,%r14
cmp    (%rbx),%eax
jne    1240 <trav_time_init+0xa0>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    $0x1,%ebx
mov    0x8(%rsp),%rcx
cmp    $0x2,%ecx
movsd  0x10(%rsp),%xmm0
mov    0x38(%rsp),%r14
mov    0x30(%rsp),%r12
mov    0x28(%rsp),%rdx
jl     12d3 <trav_time_init+0x133>
mov    %ecx,%eax
mov    $0x1,%ebx
jmp    12b9 <trav_time_init+0x119>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%rax
je     12d1 <trav_time_init+0x131>
ucomisd 0x0(%r13,%rbx,8),%xmm0
jb     12b0 <trav_time_init+0x110>
movsd  0x8(%r13,%rbx,8),%xmm1
ucomisd %xmm0,%xmm1
jb     12b0 <trav_time_init+0x110>
jmp    1322 <trav_time_init+0x182>
mov    %ecx,%ebx
test   %ebp,%ebp
je     1322 <trav_time_init+0x182>
mov    %r15,0x18(%rsp)
cmpl   $0x1,(%rdx)
mov    0x2cf2(%rip),%rax
mov    (%rax),%edi
mov    (%rsp),%rbp
je     13c3 <trav_time_init+0x223>
mov    %rdx,%r15
lea    0xd33(%rip),%rsi
call   1090 <fprintf@plt>
movsd  0x10(%rsp),%xmm0
movl   $0x1,(%r15)
add    $0xffffffff,%ebx
mov    0x8(%rsp),%rcx
mov    0x18(%rsp),%r15
test   %r12d,%r12d
jg     132b <trav_time_init+0x18b>
jmp    139a <trav_time_init+0x1fa>
mov    (%rsp),%rbp
test   %r12d,%r12d
jle    139a <trav_time_init+0x1fa>
movslq %ebx,%rsi
movsd  0x0(%r13,%rsi,8),%xmm1
movsd  0x8(%r13,%rsi,8),%xmm3
subsd  %xmm1,%xmm0
subsd  %xmm1,%xmm3
movslq %ecx,%rax
lea    0x1(%rax),%rcx
mov    %r12d,%edx
lea    0x10(,%rsi,8),%rsi
add    %r13,%rsi
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movsd  0x8(%r13,%rax,8),%xmm1
movsd  %xmm1,(%r14,%rdi,8)
movsd  -0x8(%rsi,%rax,8),%xmm1
movsd  (%rsi,%rax,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x0(%rbp,%rdi,8)
add    $0x1,%rdi
add    %rcx,%rax
cmp    %rdi,%rdx
jne    1360 <trav_time_init+0x1c0>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc46(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x1,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"WPHASE_HOME\00"
@.str.1 = [4 x i8] c"%lf\00"
@EOF = global i32 0
@stderr = global i32 0
@.str.2 = [31 x i8] c"Error: depth: %f out of range\0A\00"
@.str.3 = [54 x i8] c"WARNING : depth: %f out of range; extrapolating ... \0A\00"
define void @trav_time_init(i32 %0, i32 %1, double %2, double* %3, double* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double*
%19 = alloca double*
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca i8*
%25 = alloca i32*
store i32 %0, i32* %7
store i32 %1, i32* %8
store double %2, double* %9
store double* %3, double** %10
store double* %4, double** %11
store i32* %5, i32** %12
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
%30 = mul nsw i32 %27, %29
%31 = call double* @double_alloc(i32 %30)
store double* %31, double** %19
%32 = load i32, i32* %7
%33 = call double* @double_alloc(i32 %32)
store double* %33, double** %18
%34 = call i8* @char_alloc(i32 256)
store i8* %34, i8** %24
%35 = load i8*, i8** %24
%36 = call i32 @make_table(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %35)
%37 = load i8*, i8** %24
%38 = call i32* @openfile_rt(i8* %37, i32* %15)
store i32* %38, i32** %25
store i32 0, i32* %13
br label %39
39: ; preds = %49, %6
%40 = load i32*, i32** %25
%41 = load double*, double** %19
%42 = load i32, i32* %13
%43 = add nsw i32 %42, 1
store i32 %43, i32* %13
%44 = sext i32 %42 to i64
%45 = getelementptr inbounds double, double* %41, i64 %44
%46 = call i32 @fscanf(i32* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %45)
store i32 %46, i32* %16
%47 = load i32, i32* @EOF
%48 = icmp ne i32 %46, %47
br i1 %48, label %49, label %54
49: ; preds = %39
%50 = load i32, i32* %16
%51 = load i8*, i8** %24
%52 = load i32*, i32** %25
%53 = call i32 @check_scan(i32 1, i32 %50, i8* %51, i32* %52)
br label %39
54: ; preds = %39
%55 = load i32*, i32** %25
%56 = call i32 @fclose(i32* %55)
store i32 1, i32* %13
br label %57
57: ; preds = %80, %54
%58 = load i32, i32* %13
%59 = load i32, i32* %7
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %83
61: ; preds = %57
%62 = load double, double* %9
%63 = load double*, double** %19
%64 = load i32, i32* %13
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = fcmp oge double %62, %67
br i1 %68, label %69, label %79
69: ; preds = %61
%70 = load double, double* %9
%71 = load double*, double** %19
%72 = load i32, i32* %13
%73 = add nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %71, i64 %74
%76 = load double, double* %75
%77 = fcmp ole double %70, %76
br i1 %77, label %78, label %79
78: ; preds = %69
store i32 0, i32* %16
br label %83
79: ; preds = %69, %61
br label %80
80: ; preds = %79
%81 = load i32, i32* %13
%82 = add nsw i32 %81, 1
store i32 %82, i32* %13
br label %57
83: ; preds = %78, %57
%84 = load i32, i32* %16
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %102
86: ; preds = %83
%87 = load i32*, i32** %12
%88 = load i32, i32* %87
%89 = icmp eq i32 %88, 1
br i1 %89, label %90, label %95
90: ; preds = %86
%91 = load i32, i32* @stderr
%92 = load double, double* %9
%93 = call i32 @fprintf(i32 %91, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %92)
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %86
%96 = load i32, i32* @stderr
%97 = load double, double* %9
%98 = call i32 @fprintf(i32 %96, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), double %97)
%99 = load i32*, i32** %12
store i32 1, i32* %99
%100 = load i32, i32* %13
%101 = add nsw i32 %100, -1
store i32 %101, i32* %13
br label %102
102: ; preds = %95, %83
%103 = load i32, i32* %13
store i32 %103, i32* %14
%104 = load double*, double** %19
%105 = load i32, i32* %14
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %104, i64 %106
%108 = load double, double* %107
store double %108, double* %20
%109 = load double*, double** %19
%110 = load i32, i32* %14
%111 = add nsw i32 %110, 1
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %109, i64 %112
%114 = load double, double* %113
store double %114, double* %21
store i32 0, i32* %17
store i32 0, i32* %13
br label %115
115: ; preds = %165, %102
%116 = load i32, i32* %13
%117 = load i32, i32* %8
%118 = icmp slt i32 %116, %117
br i1 %118, label %119, label %168
119: ; preds = %115
%120 = load i32, i32* %7
%121 = add nsw i32 %120, 1
%122 = load i32, i32* %17
%123 = add nsw i32 %122, %121
store i32 %123, i32* %17
%124 = load double*, double** %19
%125 = load i32, i32* %17
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
%128 = load double, double* %127
%129 = load double*, double** %10
%130 = load i32, i32* %13
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %129, i64 %131
store double %128, double* %132
%133 = load double*, double** %19
%134 = load i32, i32* %17
%135 = load i32, i32* %14
%136 = add nsw i32 %134, %135
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %133, i64 %137
%139 = load double, double* %138
store double %139, double* %22
%140 = load double*, double** %19
%141 = load i32, i32* %17
%142 = load i32, i32* %14
%143 = add nsw i32 %141, %142
%144 = add nsw i32 %143, 1
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %140, i64 %145
%147 = load double, double* %146
store double %147, double* %23
%148 = load double, double* %22
%149 = load double, double* %23
%150 = load double, double* %22
%151 = fsub double %149, %150
%152 = load double, double* %9
%153 = load double, double* %20
%154 = fsub double %152, %153
%155 = fmul double %151, %154
%156 = load double, double* %21
%157 = load double, double* %20
%158 = fsub double %156, %157
%159 = fdiv double %155, %158
%160 = fadd double %148, %159
%161 = load double*, double** %11
%162 = load i32, i32* %13
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
store double %160, double* %164
br label %165
165: ; preds = %119
%166 = load i32, i32* %13
%167 = add nsw i32 %166, 1
store i32 %167, i32* %13
br label %115
168: ; preds = %115
%169 = load double*, double** %18
%170 = bitcast double* %169 to i8*
%171 = call i32 @free(i8* %170)
%172 = load i8*, i8** %24
%173 = call i32 @free(i8* %172)
%174 = load double*, double** %19
%175 = bitcast double* %174 to i8*
%176 = call i32 @free(i8* %175)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"WPHASE_HOME\00"
@.str.1 = [4 x i8] c"%lf\00"
@EOF = global i32 0
@stderr = global i32 0
@.str.2 = [31 x i8] c"Error: depth: %f out of range\0A\00"
@.str.3 = [54 x i8] c"WARNING : depth: %f out of range; extrapolating ... \0A\00"
define void @trav_time_init(i32 %0, i32 %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, i32* nocapture %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = add nsw i32 %0, 1
%10 = add nsw i32 %1, 1
%11 = mul nsw i32 %10, %9
%12 = tail call double* @double_alloc(i32 %11)
%13 = tail call double* @double_alloc(i32 %0)
%14 = tail call i8* @char_alloc(i32 256)
%15 = tail call i32 @make_table(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i32* @openfile_rt(i8* %14, i32* %7)
%17 = call i32 @fscanf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %12)
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %29, label %20
20: ; preds = %6, %20
%21 = phi i64 [ %23, %20 ], [ 0, %6 ]
%22 = phi i32 [ %26, %20 ], [ %17, %6 ]
%23 = add nuw i64 %21, 1
%24 = call i32 @check_scan(i32 1, i32 %22, i8* %14, i32* %16)
%25 = getelementptr inbounds double, double* %12, i64 %23
%26 = call i32 @fscanf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %25)
%27 = load i32, i32* @EOF
%28 = icmp eq i32 %26, %27
br i1 %28, label %29, label %20
29: ; preds = %20, %6
%30 = phi i32 [ %17, %6 ], [ %26, %20 ]
%31 = call i32 @fclose(i32* %16)
%32 = icmp sgt i32 %0, 1
br i1 %32, label %33, label %47
33: ; preds = %29
%34 = zext i32 %0 to i64
br label %35
35: ; preds = %33, %45
%36 = phi i64 [ 1, %33 ], [ %40, %45 ]
%37 = getelementptr inbounds double, double* %12, i64 %36
%38 = load double, double* %37
%39 = fcmp ugt double %38, %2
%40 = add nuw nsw i64 %36, 1
br i1 %39, label %45, label %41
41: ; preds = %35
%42 = getelementptr inbounds double, double* %12, i64 %40
%43 = load double, double* %42
%44 = fcmp ult double %43, %2
br i1 %44, label %45, label %60
45: ; preds = %35, %41
%46 = icmp eq i64 %40, %34
br i1 %46, label %47, label %35
47: ; preds = %45, %29
%48 = phi i32 [ 1, %29 ], [ %0, %45 ]
%49 = icmp eq i32 %30, 0
br i1 %49, label %62, label %50
50: ; preds = %47
%51 = load i32, i32* %5
%52 = icmp eq i32 %51, 1
%53 = load i32, i32* @stderr
br i1 %52, label %54, label %57
54: ; preds = %50
%55 = call i32 @fprintf(i32 %53, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), double %2)
%56 = call i32 @exit(i32 1)
unreachable
57: ; preds = %50
%58 = call i32 @fprintf(i32 %53, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0), double %2)
store i32 1, i32* %5
%59 = add nsw i32 %48, -1
br label %62
60: ; preds = %41
%61 = trunc i64 %36 to i32
br label %62
62: ; preds = %60, %57, %47
%63 = phi i32 [ %59, %57 ], [ %48, %47 ], [ %61, %60 ]
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %12, i64 %64
%66 = load double, double* %65
%67 = icmp sgt i32 %1, 0
br i1 %67, label %68, label %98
68: ; preds = %62
%69 = add nsw i32 %63, 1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %12, i64 %70
%72 = load double, double* %71
%73 = fsub double %2, %66
%74 = fsub double %72, %66
%75 = sext i32 %0 to i64
%76 = add nsw i64 %75, 1
%77 = zext i32 %1 to i64
br label %78
78: ; preds = %68, %78
%79 = phi i64 [ 0, %68 ], [ %81, %78 ]
%80 = phi i64 [ 0, %68 ], [ %96, %78 ]
%81 = add nsw i64 %79, %76
%82 = getelementptr inbounds double, double* %12, i64 %81
%83 = load double, double* %82
%84 = getelementptr inbounds double, double* %3, i64 %80
store double %83, double* %84
%85 = add nsw i64 %81, %64
%86 = getelementptr inbounds double, double* %12, i64 %85
%87 = load double, double* %86
%88 = add nsw i64 %85, 1
%89 = getelementptr inbounds double, double* %12, i64 %88
%90 = load double, double* %89
%91 = fsub double %90, %87
%92 = fmul double %73, %91
%93 = fdiv double %92, %74
%94 = fadd double %87, %93
%95 = getelementptr inbounds double, double* %4, i64 %80
store double %94, double* %95
%96 = add nuw nsw i64 %80, 1
%97 = icmp eq i64 %96, %77
br i1 %97, label %98, label %78
98: ; preds = %78, %62
%99 = bitcast double* %13 to i8*
%100 = call i32 @free(i8* %99)
%101 = call i32 @free(i8* %14)
%102 = bitcast double* %12 to i8*
%103 = call i32 @free(i8* %102)
ret void
}