#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 */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
double fabs(double const);
int ti_natr_start(double const *);
int ti_natr(int size, double const *const *inputs, double const *options,
            double *const *outputs) {
  const double *high = inputs[0];
  const double *low = inputs[1];
  const double *close = inputs[2];
  const int period = (int)options[0];
  double *output = outputs[0];
  if (period < 1)
    return 1;
  if (size <= ti_natr_start(options))
    return 0;
  const double per = 1.0 / ((double)period);
  double sum = 0;
  double truerange;
  sum += high[0] - low[0];
  int i;
  for (i = 1; i < period; ++i) {
    do {
      const double l = low[i];
      const double h = high[i];
      const double c = close[i - 1];
      const double ych = fabs(h - c);
      const double ycl = fabs(l - c);
      double v = h - l;
      if (ych > v)
        v = ych;
      if (ycl > v)
        v = ycl;
      truerange = v;
    } while (0);
    sum += truerange;
  }
  double val = sum / period;
  *output++ = 100 * (val) / close[period - 1];
  for (i = period; i < size; ++i) {
    do {
      const double l = low[i];
      const double h = high[i];
      const double c = close[i - 1];
      const double ych = fabs(h - c);
      const double ycl = fabs(l - c);
      double v = h - l;
      if (ych > v)
        v = ych;
      if (ycl > v)
        v = ycl;
      truerange = v;
    } while (0);
    val = (truerange - val) * per + val;
    *output++ = 100 * (val) / close[i];
  }
  assert(output - outputs[0] == size - ti_natr_start(options));
  return 0;
}


x86 assembly (clang, -O0):
<ti_natr>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
cmpl   $0x1,-0x3c(%rbp)
jge    1189 <ti_natr+0x69>
movl   $0x1,-0x4(%rbp)
jmp    151f <ti_natr+0x3ff>
mov    -0x8(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ti_natr_start@plt>
mov    %eax,%ecx
mov    -0xd4(%rbp),%eax
cmp    %ecx,%eax
jg     11b7 <ti_natr+0x97>
movl   $0x0,-0x4(%rbp)
jmp    151f <ti_natr+0x3ff>
cvtsi2sdl -0x3c(%rbp),%xmm1
movsd  0xe3c(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
subsd  (%rax),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1304 <ti_natr+0x1e4>
jmp    1207 <ti_natr+0xe7>
mov    -0x30(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
movaps 0xdbd(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
movaps 0xda0(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    12b4 <ti_natr+0x194>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jbe    12da <ti_natr+0x1ba>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11f6 <ti_natr+0xd6>
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xce6(%rip),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14c9 <ti_natr+0x3a9>
jmp    1366 <ti_natr+0x246>
mov    -0x30(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x38(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0xb8(%rbp),%xmm0
ff
movaps 0xc4f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0xb8(%rbp),%xmm0
ff
movaps 0xc2c(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd -0xd0(%rbp),%xmm0
ff
jbe    142e <ti_natr+0x30e>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
ucomisd -0xd0(%rbp),%xmm0
ff
jbe    1454 <ti_natr+0x334>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
subsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xb75(%rip),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movslq -0x64(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x48(%rbp)
movsd  %xmm0,(%rax)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1355 <ti_natr+0x235>
mov    -0x48(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
mov    %rax,-0xe0(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xe4(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ti_natr_start@plt>
mov    -0xe4(%rbp),%ecx
mov    %eax,%edx
mov    -0xe0(%rbp),%rax
sub    %edx,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_natr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
cvttsd2si (%rdx),%ebx
test   %ebx,%ebx
jle    12c0 <ti_natr+0x1a0>
mov    %edi,%r13d
mov    (%rsi),%r14
mov    0x8(%rsi),%r12
mov    0x10(%rsi),%r15
mov    (%rcx),%rbp
mov    %rdx,%rdi
mov    %rdx,0x10(%rsp)
mov    %rcx,0x8(%rsp)
call   1030 <ti_natr_start@plt>
xor    %ecx,%ecx
cmp    %r13d,%eax
jge    12c5 <ti_natr+0x1a5>
mov    0x8(%rsp),%r9
mov    0x10(%rsp),%rdi
cvtsi2sd %ebx,%xmm1
movsd  (%r14),%xmm2
subsd  (%r12),%xmm2
xorpd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
cmp    $0x2,%ebx
jb     11e1 <ti_natr+0xc1>
mov    %ebx,%eax
add    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
movapd 0xe72(%rip),%xmm2
xchg   %ax,%ax
movsd  0x8(%r12,%rcx,8),%xmm3
movsd  0x8(%r14,%rcx,8),%xmm4
movsd  (%r15,%rcx,8),%xmm5
movapd %xmm4,%xmm6
subsd  %xmm5,%xmm6
andpd  %xmm2,%xmm6
subsd  %xmm3,%xmm4
subsd  %xmm5,%xmm3
andpd  %xmm2,%xmm3
maxsd  %xmm4,%xmm6
maxsd  %xmm6,%xmm3
addsd  %xmm3,%xmm0
add    $0x1,%rcx
cmp    %rcx,%rax
jne    11a0 <ti_natr+0x80>
divsd  %xmm1,%xmm0
movsd  0xe1b(%rip),%xmm2
mulsd  %xmm0,%xmm2
lea    -0x1(%rbx),%eax
divsd  (%r15,%rax,8),%xmm2
movsd  %xmm2,0x0(%rbp)
add    $0x8,%rbp
cmp    %r13d,%ebx
jge    129c <ti_natr+0x17c>
movsd  0xdec(%rip),%xmm2
divsd  %xmm1,%xmm2
movslq %ebx,%rbx
movslq %r13d,%rax
lea    (%r12,%rbx,8),%rcx
lea    (%r14,%rbx,8),%rdx
lea    (%r15,%rbx,8),%rsi
sub    %rbx,%rax
xor    %ebx,%ebx
movapd 0xdd9(%rip),%xmm1
movsd  0xdc9(%rip),%xmm3
nop
movsd  (%rcx,%rbx,1),%xmm4
movsd  (%rdx,%rbx,1),%xmm5
movsd  -0x8(%rsi,%rbx,1),%xmm6
movapd %xmm5,%xmm7
subsd  %xmm6,%xmm7
andpd  %xmm1,%xmm7
subsd  %xmm4,%xmm5
subsd  %xmm6,%xmm4
andpd  %xmm1,%xmm4
maxsd  %xmm5,%xmm7
maxsd  %xmm7,%xmm4
subsd  %xmm0,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm4,%xmm0
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm4
divsd  (%rsi,%rbx,1),%xmm4
movsd  %xmm4,0x0(%rbp,%rbx,1)
add    $0x8,%rbx
add    $0xffffffffffffffff,%rax
jne    1240 <ti_natr+0x120>
add    %rbx,%rbp
sub    (%r9),%rbp
sar    $0x3,%rbp
call   1030 <ti_natr_start@plt>
sub    %eax,%r13d
movslq %r13d,%rax
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   1040 <assert@plt>
xor    %ecx,%ecx
jmp    12c5 <ti_natr+0x1a5>
mov    $0x1,%ecx
mov    %ecx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ti_natr(i32 %0, double** %1, double* %2, double** %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double**
%8 = alloca double*
%9 = alloca double**
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca double*
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
store i32 %0, i32* %6
store double** %1, double*** %7
store double* %2, double** %8
store double** %3, double*** %9
%32 = load double**, double*** %7
%33 = getelementptr inbounds double*, double** %32, i64 0
%34 = load double*, double** %33
store double* %34, double** %10
%35 = load double**, double*** %7
%36 = getelementptr inbounds double*, double** %35, i64 1
%37 = load double*, double** %36
store double* %37, double** %11
%38 = load double**, double*** %7
%39 = getelementptr inbounds double*, double** %38, i64 2
%40 = load double*, double** %39
store double* %40, double** %12
%41 = load double*, double** %8
%42 = getelementptr inbounds double, double* %41, i64 0
%43 = load double, double* %42
%44 = fptosi double %43 to i32
store i32 %44, i32* %13
%45 = load double**, double*** %9
%46 = getelementptr inbounds double*, double** %45, i64 0
%47 = load double*, double** %46
store double* %47, double** %14
%48 = load i32, i32* %13
%49 = icmp slt i32 %48, 1
br i1 %49, label %50, label %51
50: ; preds = %4
store i32 1, i32* %5
br label %223
51: ; preds = %4
%52 = load i32, i32* %6
%53 = load double*, double** %8
%54 = call i32 @ti_natr_start(double* %53)
%55 = icmp sle i32 %52, %54
br i1 %55, label %56, label %57
56: ; preds = %51
store i32 0, i32* %5
br label %223
57: ; preds = %51
%58 = load i32, i32* %13
%59 = sitofp i32 %58 to double
%60 = fdiv double 1.000000e+00, %59
store double %60, double* %15
store double 0.000000e+00, double* %16
%61 = load double*, double** %10
%62 = getelementptr inbounds double, double* %61, i64 0
%63 = load double, double* %62
%64 = load double*, double** %11
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = fsub double %63, %66
%68 = load double, double* %16
%69 = fadd double %68, %67
store double %69, double* %16
store i32 1, i32* %18
br label %70
70: ; preds = %120, %57
%71 = load i32, i32* %18
%72 = load i32, i32* %13
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %123
74: ; preds = %70
br label %75
75: ; preds = %74
%76 = load double*, double** %11
%77 = load i32, i32* %18
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
%80 = load double, double* %79
store double %80, double* %19
%81 = load double*, double** %10
%82 = load i32, i32* %18
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
store double %85, double* %20
%86 = load double*, double** %12
%87 = load i32, i32* %18
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double, double* %86, i64 %89
%91 = load double, double* %90
store double %91, double* %21
%92 = load double, double* %20
%93 = load double, double* %21
%94 = fsub double %92, %93
%95 = call double @llvm.fabs.f64(double %94)
store double %95, double* %22
%96 = load double, double* %19
%97 = load double, double* %21
%98 = fsub double %96, %97
%99 = call double @llvm.fabs.f64(double %98)
store double %99, double* %23
%100 = load double, double* %20
%101 = load double, double* %19
%102 = fsub double %100, %101
store double %102, double* %24
%103 = load double, double* %22
%104 = load double, double* %24
%105 = fcmp ogt double %103, %104
br i1 %105, label %106, label %108
106: ; preds = %75
%107 = load double, double* %22
store double %107, double* %24
br label %108
108: ; preds = %106, %75
%109 = load double, double* %23
%110 = load double, double* %24
%111 = fcmp ogt double %109, %110
br i1 %111, label %112, label %114
112: ; preds = %108
%113 = load double, double* %23
store double %113, double* %24
br label %114
114: ; preds = %112, %108
%115 = load double, double* %24
store double %115, double* %17
br label %116
116: ; preds = %114
%117 = load double, double* %17
%118 = load double, double* %16
%119 = fadd double %118, %117
store double %119, double* %16
br label %120
120: ; preds = %116
%121 = load i32, i32* %18
%122 = add nsw i32 %121, 1
store i32 %122, i32* %18
br label %70
123: ; preds = %70
%124 = load double, double* %16
%125 = load i32, i32* %13
%126 = sitofp i32 %125 to double
%127 = fdiv double %124, %126
store double %127, double* %25
%128 = load double, double* %25
%129 = fmul double 1.000000e+02, %128
%130 = load double*, double** %12
%131 = load i32, i32* %13
%132 = sub nsw i32 %131, 1
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %130, i64 %133
%135 = load double, double* %134
%136 = fdiv double %129, %135
%137 = load double*, double** %14
%138 = getelementptr inbounds double, double* %137, i32 1
store double* %138, double** %14
store double %136, double* %137
%139 = load i32, i32* %13
store i32 %139, i32* %18
br label %140
140: ; preds = %203, %123
%141 = load i32, i32* %18
%142 = load i32, i32* %6
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %206
144: ; preds = %140
br label %145
145: ; preds = %144
%146 = load double*, double** %11
%147 = load i32, i32* %18
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
%150 = load double, double* %149
store double %150, double* %26
%151 = load double*, double** %10
%152 = load i32, i32* %18
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
store double %155, double* %27
%156 = load double*, double** %12
%157 = load i32, i32* %18
%158 = sub nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %156, i64 %159
%161 = load double, double* %160
store double %161, double* %28
%162 = load double, double* %27
%163 = load double, double* %28
%164 = fsub double %162, %163
%165 = call double @llvm.fabs.f64(double %164)
store double %165, double* %29
%166 = load double, double* %26
%167 = load double, double* %28
%168 = fsub double %166, %167
%169 = call double @llvm.fabs.f64(double %168)
store double %169, double* %30
%170 = load double, double* %27
%171 = load double, double* %26
%172 = fsub double %170, %171
store double %172, double* %31
%173 = load double, double* %29
%174 = load double, double* %31
%175 = fcmp ogt double %173, %174
br i1 %175, label %176, label %178
176: ; preds = %145
%177 = load double, double* %29
store double %177, double* %31
br label %178
178: ; preds = %176, %145
%179 = load double, double* %30
%180 = load double, double* %31
%181 = fcmp ogt double %179, %180
br i1 %181, label %182, label %184
182: ; preds = %178
%183 = load double, double* %30
store double %183, double* %31
br label %184
184: ; preds = %182, %178
%185 = load double, double* %31
store double %185, double* %17
br label %186
186: ; preds = %184
%187 = load double, double* %17
%188 = load double, double* %25
%189 = fsub double %187, %188
%190 = load double, double* %15
%191 = load double, double* %25
%192 = call double @llvm.fmuladd.f64(double %189, double %190, double %191)
store double %192, double* %25
%193 = load double, double* %25
%194 = fmul double 1.000000e+02, %193
%195 = load double*, double** %12
%196 = load i32, i32* %18
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %195, i64 %197
%199 = load double, double* %198
%200 = fdiv double %194, %199
%201 = load double*, double** %14
%202 = getelementptr inbounds double, double* %201, i32 1
store double* %202, double** %14
store double %200, double* %201
br label %203
203: ; preds = %186
%204 = load i32, i32* %18
%205 = add nsw i32 %204, 1
store i32 %205, i32* %18
br label %140
206: ; preds = %140
%207 = load double*, double** %14
%208 = load double**, double*** %9
%209 = getelementptr inbounds double*, double** %208, i64 0
%210 = load double*, double** %209
%211 = ptrtoint double* %207 to i64
%212 = ptrtoint double* %210 to i64
%213 = sub i64 %211, %212
%214 = sdiv exact i64 %213, 8
%215 = load i32, i32* %6
%216 = load double*, double** %8
%217 = call i32 @ti_natr_start(double* %216)
%218 = sub nsw i32 %215, %217
%219 = sext i32 %218 to i64
%220 = icmp eq i64 %214, %219
%221 = zext i1 %220 to i32
%222 = call i32 @assert(i32 %221)
store i32 0, i32* %5
br label %223
223: ; preds = %206, %56, %50
%224 = load i32, i32* %5
ret i32 %224
}

LLVM IR (-O2):
define i32 @ti_natr(i32 %0, double** nocapture %1, double* %2, double** nocapture %3) {
%5 = load double*, double** %1
%6 = getelementptr inbounds double*, double** %1, i64 1
%7 = load double*, double** %6
%8 = getelementptr inbounds double*, double** %1, i64 2
%9 = load double*, double** %8
%10 = load double, double* %2
%11 = fptosi double %10 to i32
%12 = load double*, double** %3
%13 = icmp slt i32 %11, 1
br i1 %13, label %105, label %14
14: ; preds = %4
%15 = tail call i32 @ti_natr_start(double* %2)
%16 = icmp slt i32 %15, %0
br i1 %16, label %17, label %105
17: ; preds = %14
%18 = sitofp i32 %11 to double
%19 = fdiv double 1.000000e+00, %18
%20 = load double, double* %5
%21 = load double, double* %7
%22 = fsub double %20, %21
%23 = fadd double %22, 0.000000e+00
%24 = icmp ugt i32 %11, 1
br i1 %24, label %25, label %49
25: ; preds = %17
%26 = zext i32 %11 to i64
br label %27
27: ; preds = %25, %27
%28 = phi i64 [ 1, %25 ], [ %47, %27 ]
%29 = phi double [ %23, %25 ], [ %46, %27 ]
%30 = getelementptr inbounds double, double* %7, i64 %28
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %5, i64 %28
%33 = load double, double* %32
%34 = add nsw i64 %28, -1
%35 = getelementptr inbounds double, double* %9, i64 %34
%36 = load double, double* %35
%37 = fsub double %33, %36
%38 = tail call double @llvm.fabs.f64(double %37)
%39 = fsub double %31, %36
%40 = tail call double @llvm.fabs.f64(double %39)
%41 = fsub double %33, %31
%42 = fcmp ogt double %38, %41
%43 = select i1 %42, double %38, double %41
%44 = fcmp ogt double %40, %43
%45 = select i1 %44, double %40, double %43
%46 = fadd double %29, %45
%47 = add nuw nsw i64 %28, 1
%48 = icmp eq i64 %47, %26
br i1 %48, label %49, label %27
49: ; preds = %27, %17
%50 = phi double [ %23, %17 ], [ %46, %27 ]
%51 = fdiv double %50, %18
%52 = fmul double %51, 1.000000e+02
%53 = add nsw i32 %11, -1
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds double, double* %9, i64 %54
%56 = load double, double* %55
%57 = fdiv double %52, %56
store double %57, double* %12
%58 = getelementptr inbounds double, double* %12, i64 1
%59 = icmp slt i32 %11, %0
br i1 %59, label %60, label %92
60: ; preds = %49
%61 = sext i32 %11 to i64
%62 = sext i32 %0 to i64
br label %63
63: ; preds = %60, %63
%64 = phi i64 [ %61, %60 ], [ %89, %63 ]
%65 = phi double* [ %58, %60 ], [ %90, %63 ]
%66 = phi double [ %51, %60 ], [ %84, %63 ]
%67 = getelementptr inbounds double, double* %7, i64 %64
%68 = load double, double* %67
%69 = getelementptr inbounds double, double* %5, i64 %64
%70 = load double, double* %69
%71 = add nsw i64 %64, -1
%72 = getelementptr inbounds double, double* %9, i64 %71
%73 = load double, double* %72
%74 = fsub double %70, %73
%75 = tail call double @llvm.fabs.f64(double %74)
%76 = fsub double %68, %73
%77 = tail call double @llvm.fabs.f64(double %76)
%78 = fsub double %70, %68
%79 = fcmp ogt double %75, %78
%80 = select i1 %79, double %75, double %78
%81 = fcmp ogt double %77, %80
%82 = select i1 %81, double %77, double %80
%83 = fsub double %82, %66
%84 = tail call double @llvm.fmuladd.f64(double %83, double %19, double %66)
%85 = fmul double %84, 1.000000e+02
%86 = getelementptr inbounds double, double* %9, i64 %64
%87 = load double, double* %86
%88 = fdiv double %85, %87
store double %88, double* %65
%89 = add nsw i64 %64, 1
%90 = getelementptr inbounds double, double* %65, i64 1
%91 = icmp eq i64 %89, %62
br i1 %91, label %92, label %63
92: ; preds = %63, %49
%93 = phi double* [ %58, %49 ], [ %90, %63 ]
%94 = load double*, double** %3
%95 = ptrtoint double* %93 to i64
%96 = ptrtoint double* %94 to i64
%97 = sub i64 %95, %96
%98 = ashr exact i64 %97, 3
%99 = tail call i32 @ti_natr_start(double* %2)
%100 = sub nsw i32 %0, %99
%101 = sext i32 %100 to i64
%102 = icmp eq i64 %98, %101
%103 = zext i1 %102 to i32
%104 = tail call i32 @assert(i32 %103)
br label %105
105: ; preds = %14, %4, %92
%106 = phi i32 [ 0, %92 ], [ 1, %4 ], [ 0, %14 ]
ret i32 %106
}