#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 */
double fabs(double);
int construct_array_with_main_lobe(double *array_in, int *npts_in,
                                   double *array_out) {
  int amplitudeloc(double *array, int len, int *max_amp_loc, double *amplitude,
                   int flag);
  int npts_peak_min, npts_peak_max, npts_peak;
  double peak_max, peak_min, value_peak;
  int count, flag;
  double cut_min = 0.1;
  double cut_max = 1.0;
  double array_tmp[*npts_in];
  amplitudeloc(array_in, *npts_in, &npts_peak_max, &peak_max, 1);
  if (value_peak == 0)
    value_peak = 1;
  npts_peak = npts_peak_max;
  value_peak = peak_max;
  for (count = 0; count < *npts_in; count++) {
    array_tmp[count] = array_in[count] / value_peak;
  }
  if (npts_peak == 0)
    npts_peak = 1;
  int ONSET = 0;
  int ENDSET = *npts_in - 1;
  for (count = npts_peak - 1; count > 0; count--) {
    if (fabs(array_tmp[count]) < cut_min) {
      ONSET = count;
      break;
    }
  }
  for (count = npts_peak - 1; count < *npts_in - 1; count++) {
    if (fabs(array_tmp[count]) < cut_min) {
      ENDSET = count;
      break;
    }
  }
  for (count = 0; count < *npts_in; count++) {
    if (count <= ONSET || count >= ENDSET)
      array_out[count] = 0;
    else {
      array_out[count] = value_peak / fabs(value_peak) *
                         (array_tmp[count] - cut_min) / (1 - cut_min);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<construct_array_with_main_lobe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movabs $0x3fb999999999999a,%rax
99 b9 3f
mov    %rax,-0x50(%rbp)
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x60(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x78(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
lea    -0x30(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <amplitudeloc@plt>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11af <construct_array_with_main_lobe+0x9f>
jp     11af <construct_array_with_main_lobe+0x9f>
movsd  0xe56(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1202 <construct_array_with_main_lobe+0xf2>
mov    -0x78(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
divsd  -0x40(%rbp),%xmm0
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11c6 <construct_array_with_main_lobe+0xb6>
cmpl   $0x0,-0x24(%rbp)
jne    1213 <construct_array_with_main_lobe+0x103>
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x70(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jle    127e <construct_array_with_main_lobe+0x16e>
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xdc3(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    126b <construct_array_with_main_lobe+0x15b>
mov    -0x44(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    127e <construct_array_with_main_lobe+0x16e>
jmp    1270 <construct_array_with_main_lobe+0x160>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    122f <construct_array_with_main_lobe+0x11f>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12e0 <construct_array_with_main_lobe+0x1d0>
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd61(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12cd <construct_array_with_main_lobe+0x1bd>
mov    -0x44(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    12e0 <construct_array_with_main_lobe+0x1d0>
jmp    12d2 <construct_array_with_main_lobe+0x1c2>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1287 <construct_array_with_main_lobe+0x177>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1383 <construct_array_with_main_lobe+0x273>
mov    -0x44(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jle    130e <construct_array_with_main_lobe+0x1fe>
mov    -0x44(%rbp),%eax
cmp    -0x70(%rbp),%eax
jl     1323 <construct_array_with_main_lobe+0x213>
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1370 <construct_array_with_main_lobe+0x260>
mov    -0x78(%rbp),%rax
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movaps 0xcd8(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xca6(%rip),%xmm1
subsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1375 <construct_array_with_main_lobe+0x265>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12e7 <construct_array_with_main_lobe+0x1d7>
mov    -0x60(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_array_with_main_lobe>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    (%rsi),%eax
mov    %rsp,%r13
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    (%rsi),%esi
lea    -0x2c(%rbp),%rdx
lea    -0x38(%rbp),%rcx
mov    $0x1,%r8d
call   1030 <amplitudeloc@plt>
mov    -0x2c(%rbp),%ecx
movsd  -0x38(%rbp),%xmm0
mov    (%r15),%r8d
test   %r8d,%r8d
jle    1219 <construct_array_with_main_lobe+0x109>
cmp    $0x1,%r8d
jne    117a <construct_array_with_main_lobe+0x6a>
xor    %edx,%edx
jmp    1200 <construct_array_with_main_lobe+0xf0>
mov    %r8d,%edx
and    $0xfffffffe,%edx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x2(%rdx),%rax
mov    %rax,%rsi
shr    %rsi
add    $0x1,%rsi
test   %rax,%rax
je     132d <construct_array_with_main_lobe+0x21d>
mov    %rsi,%rax
and    $0xfffffffffffffffe,%rax
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd (%rbx,%rdi,8),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0x0(%r13,%rdi,8)
movupd 0x10(%rbx,%rdi,8),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0x10(%r13,%rdi,8)
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rax
jne    11b0 <construct_array_with_main_lobe+0xa0>
test   $0x1,%sil
je     11f1 <construct_array_with_main_lobe+0xe1>
movupd (%rbx,%rdi,8),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,0x0(%r13,%rdi,8)
cmp    %r8,%rdx
je     1219 <construct_array_with_main_lobe+0x109>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rdx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1200 <construct_array_with_main_lobe+0xf0>
lea    -0x1(%r8),%edx
xor    %esi,%esi
sub    $0x1,%ecx
cmovb  %esi,%ecx
test   %ecx,%ecx
jle    1260 <construct_array_with_main_lobe+0x150>
mov    %ecx,%esi
movapd 0xdcd(%rip),%xmm1
movsd  0xdd5(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rsi,8),%xmm3
andpd  %xmm1,%xmm3
ucomisd %xmm3,%xmm2
ja     1260 <construct_array_with_main_lobe+0x150>
lea    -0x1(%rsi),%rax
cmp    $0x1,%rsi
mov    %rax,%rsi
jg     1240 <construct_array_with_main_lobe+0x130>
xor    %esi,%esi
cmp    %edx,%ecx
jge    12b0 <construct_array_with_main_lobe+0x1a0>
movslq %ecx,%rax
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
mov    %r8d,%eax
neg    %eax
movapd 0xd81(%rip),%xmm1
movsd  0xd89(%rip),%xmm2
nopw   0x0(%rax,%rax,1)
movsd  (%rdi),%xmm3
andpd  %xmm1,%xmm3
ucomisd %xmm3,%xmm2
ja     1312 <construct_array_with_main_lobe+0x202>
add    $0x8,%rdi
lea    (%rax,%rcx,1),%ebx
add    $0x1,%ebx
add    $0x1,%ecx
cmp    $0xffffffff,%ebx
jne    1290 <construct_array_with_main_lobe+0x180>
test   %r8d,%r8d
jle    1319 <construct_array_with_main_lobe+0x209>
movapd 0xd43(%rip),%xmm1
andpd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
movslq %edx,%rcx
movslq %esi,%rdx
xor    %esi,%esi
movsd  0xd43(%rip),%xmm1
movsd  0xd43(%rip),%xmm2
jmp    12ef <construct_array_with_main_lobe+0x1df>
nop
movsd  %xmm3,(%r14,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%r8
je     1319 <construct_array_with_main_lobe+0x209>
xorpd  %xmm3,%xmm3
cmp    %rdx,%rsi
jle    12e0 <construct_array_with_main_lobe+0x1d0>
cmp    %rcx,%rsi
jge    12e0 <construct_array_with_main_lobe+0x1d0>
movsd  0x0(%r13,%rsi,8),%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
divsd  %xmm2,%xmm3
jmp    12e0 <construct_array_with_main_lobe+0x1d0>
mov    %ecx,%edx
test   %r8d,%r8d
jg     12b5 <construct_array_with_main_lobe+0x1a5>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
test   $0x1,%sil
jne    11e1 <construct_array_with_main_lobe+0xd1>
jmp    11f1 <construct_array_with_main_lobe+0xe1>

LLVM IR (-O0):
define i32 @construct_array_with_main_lobe(double* %0, i32* %1, double* %2) {
%4 = alloca double*
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i32
%20 = alloca i32
store double* %0, double** %4
store i32* %1, i32** %5
store double* %2, double** %6
store double 1.000000e-01, double* %15
store double 1.000000e+00, double* %16
%21 = load i32*, i32** %5
%22 = load i32, i32* %21
%23 = zext i32 %22 to i64
%24 = call i8* @llvm.stacksave()
store i8* %24, i8** %17
%25 = alloca double, i64 %23
store i64 %23, i64* %18
%26 = load double*, double** %4
%27 = load i32*, i32** %5
%28 = load i32, i32* %27
%29 = call i32 @amplitudeloc(double* %26, i32 %28, i32* %8, double* %10, i32 1)
%30 = load double, double* %12
%31 = fcmp oeq double %30, 0.000000e+00
br i1 %31, label %32, label %33
32: ; preds = %3
store double 1.000000e+00, double* %12
br label %33
33: ; preds = %32, %3
%34 = load i32, i32* %8
store i32 %34, i32* %9
%35 = load double, double* %10
store double %35, double* %12
store i32 0, i32* %13
br label %36
36: ; preds = %52, %33
%37 = load i32, i32* %13
%38 = load i32*, i32** %5
%39 = load i32, i32* %38
%40 = icmp slt i32 %37, %39
br i1 %40, label %41, label %55
41: ; preds = %36
%42 = load double*, double** %4
%43 = load i32, i32* %13
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
%46 = load double, double* %45
%47 = load double, double* %12
%48 = fdiv double %46, %47
%49 = load i32, i32* %13
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %25, i64 %50
store double %48, double* %51
br label %52
52: ; preds = %41
%53 = load i32, i32* %13
%54 = add nsw i32 %53, 1
store i32 %54, i32* %13
br label %36
55: ; preds = %36
%56 = load i32, i32* %9
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %55
store i32 1, i32* %9
br label %59
59: ; preds = %58, %55
store i32 0, i32* %19
%60 = load i32*, i32** %5
%61 = load i32, i32* %60
%62 = sub nsw i32 %61, 1
store i32 %62, i32* %20
%63 = load i32, i32* %9
%64 = sub nsw i32 %63, 1
store i32 %64, i32* %13
br label %65
65: ; preds = %79, %59
%66 = load i32, i32* %13
%67 = icmp sgt i32 %66, 0
br i1 %67, label %68, label %82
68: ; preds = %65
%69 = load i32, i32* %13
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %25, i64 %70
%72 = load double, double* %71
%73 = call double @llvm.fabs.f64(double %72)
%74 = load double, double* %15
%75 = fcmp olt double %73, %74
br i1 %75, label %76, label %78
76: ; preds = %68
%77 = load i32, i32* %13
store i32 %77, i32* %19
br label %82
78: ; preds = %68
br label %79
79: ; preds = %78
%80 = load i32, i32* %13
%81 = add nsw i32 %80, -1
store i32 %81, i32* %13
br label %65
82: ; preds = %76, %65
%83 = load i32, i32* %9
%84 = sub nsw i32 %83, 1
store i32 %84, i32* %13
br label %85
85: ; preds = %102, %82
%86 = load i32, i32* %13
%87 = load i32*, i32** %5
%88 = load i32, i32* %87
%89 = sub nsw i32 %88, 1
%90 = icmp slt i32 %86, %89
br i1 %90, label %91, label %105
91: ; preds = %85
%92 = load i32, i32* %13
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %25, i64 %93
%95 = load double, double* %94
%96 = call double @llvm.fabs.f64(double %95)
%97 = load double, double* %15
%98 = fcmp olt double %96, %97
br i1 %98, label %99, label %101
99: ; preds = %91
%100 = load i32, i32* %13
store i32 %100, i32* %20
br label %105
101: ; preds = %91
br label %102
102: ; preds = %101
%103 = load i32, i32* %13
%104 = add nsw i32 %103, 1
store i32 %104, i32* %13
br label %85
105: ; preds = %99, %85
store i32 0, i32* %13
br label %106
106: ; preds = %144, %105
%107 = load i32, i32* %13
%108 = load i32*, i32** %5
%109 = load i32, i32* %108
%110 = icmp slt i32 %107, %109
br i1 %110, label %111, label %147
111: ; preds = %106
%112 = load i32, i32* %13
%113 = load i32, i32* %19
%114 = icmp sle i32 %112, %113
br i1 %114, label %119, label %115
115: ; preds = %111
%116 = load i32, i32* %13
%117 = load i32, i32* %20
%118 = icmp sge i32 %116, %117
br i1 %118, label %119, label %124
119: ; preds = %115, %111
%120 = load double*, double** %6
%121 = load i32, i32* %13
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
store double 0.000000e+00, double* %123
br label %143
124: ; preds = %115
%125 = load double, double* %12
%126 = load double, double* %12
%127 = call double @llvm.fabs.f64(double %126)
%128 = fdiv double %125, %127
%129 = load i32, i32* %13
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %25, i64 %130
%132 = load double, double* %131
%133 = load double, double* %15
%134 = fsub double %132, %133
%135 = fmul double %128, %134
%136 = load double, double* %15
%137 = fsub double 1.000000e+00, %136
%138 = fdiv double %135, %137
%139 = load double*, double** %6
%140 = load i32, i32* %13
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %139, i64 %141
store double %138, double* %142
br label %143
143: ; preds = %124, %119
br label %144
144: ; preds = %143
%145 = load i32, i32* %13
%146 = add nsw i32 %145, 1
store i32 %146, i32* %13
br label %106
147: ; preds = %106
%148 = load i8*, i8** %17
ret i32 0
}

LLVM IR (-O2):
define i32 @construct_array_with_main_lobe(double* %0, i32* nocapture %1, double* nocapture writeonly %2) {
%4 = alloca i32
%5 = alloca double
%6 = bitcast i32* %4 to i8*
%7 = bitcast double* %5 to i8*
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = tail call i8* @llvm.stacksave()
%11 = alloca double, i64 %9
%12 = load i32, i32* %1
%13 = call i32 @amplitudeloc(double* %0, i32 %12, i32* %4, double* %5, i32 1)
%14 = load i32, i32* %4
%15 = load double, double* %5
%16 = load i32, i32* %1
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %73
18: ; preds = %3
%19 = zext i32 %16 to i64
%20 = icmp eq i32 %16, 1
br i1 %20, label %63, label %21
21: ; preds = %18
%22 = and i64 %19, 4294967294
%23 = insertelement <2 x double> poison, double %15, i64 0
%24 = shufflevector <2 x double> %23, <2 x double> poison, <2 x i32> zeroinitializer
%25 = add nsw i64 %22, -2
%26 = lshr exact i64 %25, 1
%27 = add nuw i64 %26, 1
%28 = and i64 %27, 1
%29 = icmp eq i64 %25, 0
br i1 %29, label %51, label %30
30: ; preds = %21
%31 = and i64 %27, -2
br label %32
32: ; preds = %32, %30
%33 = phi i64 [ 0, %30 ], [ %48, %32 ]
%34 = phi i64 [ 0, %30 ], [ %49, %32 ]
%35 = getelementptr inbounds double, double* %0, i64 %33
%36 = bitcast double* %35 to <2 x double>*
%37 = load <2 x double>, <2 x double>* %36
%38 = fdiv <2 x double> %37, %24
%39 = getelementptr inbounds double, double* %11, i64 %33
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> %38, <2 x double>* %40
%41 = or i64 %33, 2
%42 = getelementptr inbounds double, double* %0, i64 %41
%43 = bitcast double* %42 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = fdiv <2 x double> %44, %24
%46 = getelementptr inbounds double, double* %11, i64 %41
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> %45, <2 x double>* %47
%48 = add nuw i64 %33, 4
%49 = add nuw i64 %34, 2
%50 = icmp eq i64 %49, %31
br i1 %50, label %51, label %32
51: ; preds = %32, %21
%52 = phi i64 [ 0, %21 ], [ %48, %32 ]
%53 = icmp eq i64 %28, 0
br i1 %53, label %61, label %54
54: ; preds = %51
%55 = getelementptr inbounds double, double* %0, i64 %52
%56 = bitcast double* %55 to <2 x double>*
%57 = load <2 x double>, <2 x double>* %56
%58 = fdiv <2 x double> %57, %24
%59 = getelementptr inbounds double, double* %11, i64 %52
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %58, <2 x double>* %60
br label %61
61: ; preds = %51, %54
%62 = icmp eq i64 %22, %19
br i1 %62, label %73, label %63
63: ; preds = %18, %61
%64 = phi i64 [ 0, %18 ], [ %22, %61 ]
br label %65
65: ; preds = %63, %65
%66 = phi i64 [ %71, %65 ], [ %64, %63 ]
%67 = getelementptr inbounds double, double* %0, i64 %66
%68 = load double, double* %67
%69 = fdiv double %68, %15
%70 = getelementptr inbounds double, double* %11, i64 %66
store double %69, double* %70
%71 = add nuw nsw i64 %66, 1
%72 = icmp eq i64 %71, %19
br i1 %72, label %73, label %65
73: ; preds = %65, %61, %3
%74 = icmp eq i32 %14, 0
%75 = add i32 %16, -1
%76 = add nsw i32 %14, -1
%77 = select i1 %74, i32 0, i32 %76
%78 = icmp sgt i32 %77, 0
br i1 %78, label %79, label %90
79: ; preds = %73
%80 = zext i32 %77 to i64
br label %81
81: ; preds = %79, %87
%82 = phi i64 [ %80, %79 ], [ %88, %87 ]
%83 = getelementptr inbounds double, double* %11, i64 %82
%84 = load double, double* %83
%85 = call double @llvm.fabs.f64(double %84)
%86 = fcmp olt double %85, 1.000000e-01
br i1 %86, label %90, label %87
87: ; preds = %81
%88 = add nsw i64 %82, -1
%89 = icmp sgt i64 %82, 1
br i1 %89, label %81, label %90
90: ; preds = %87, %81, %73
%91 = phi i64 [ 0, %73 ], [ %82, %81 ], [ 0, %87 ]
%92 = icmp slt i32 %77, %75
br i1 %92, label %93, label %107
93: ; preds = %90
%94 = sext i32 %77 to i64
br label %95
95: ; preds = %93, %101
%96 = phi i64 [ %94, %93 ], [ %102, %101 ]
%97 = getelementptr inbounds double, double* %11, i64 %96
%98 = load double, double* %97
%99 = call double @llvm.fabs.f64(double %98)
%100 = fcmp olt double %99, 1.000000e-01
br i1 %100, label %105, label %101
101: ; preds = %95
%102 = add nsw i64 %96, 1
%103 = trunc i64 %102 to i32
%104 = icmp eq i32 %75, %103
br i1 %104, label %107, label %95
105: ; preds = %95
%106 = trunc i64 %96 to i32
br label %107
107: ; preds = %101, %105, %90
%108 = phi i32 [ %75, %90 ], [ %106, %105 ], [ %75, %101 ]
br i1 %17, label %109, label %132
109: ; preds = %107
%110 = call double @llvm.fabs.f64(double %15)
%111 = fdiv double %15, %110
%112 = sext i32 %108 to i64
%113 = shl i64 %91, 32
%114 = ashr exact i64 %113, 32
%115 = zext i32 %16 to i64
br label %116
116: ; preds = %109, %127
%117 = phi i64 [ 0, %109 ], [ %130, %127 ]
%118 = icmp sgt i64 %117, %114
%119 = icmp slt i64 %117, %112
%120 = select i1 %118, i1 %119, i1 false
br i1 %120, label %121, label %127
121: ; preds = %116
%122 = getelementptr inbounds double, double* %11, i64 %117
%123 = load double, double* %122
%124 = fadd double %123, -1.000000e-01
%125 = fmul double %111, %124
%126 = fdiv double %125, 9.000000e-01
br label %127
127: ; preds = %116, %121
%128 = phi double [ %126, %121 ], [ 0.000000e+00, %116 ]
%129 = getelementptr inbounds double, double* %2, i64 %117
store double %128, double* %129
%130 = add nuw nsw i64 %117, 1
%131 = icmp eq i64 %130, %115
br i1 %131, label %132, label %116
132: ; preds = %127, %107
ret i32 0
}