void directions(double pyElev[], double pyZ[], int pyNgbs[][20],
                double pyEdge[][20], double pyDist[][20], int pyGIDs[],
                int pyBase[], int pyRcv[], double pyMaxh[], double pyMaxDep[],
                int pylocalNb, int pyglobalNb) {
  int i;
  for (i = 0; i < pyglobalNb; i++) {
    pyBase[i] = -1;
    pyRcv[i] = -1;
    pyMaxh[i] = 1.e6;
    pyMaxDep[i] = 0.;
  }
  int k;
  for (k = 0; k < pylocalNb; k++) {
    int gid = pyGIDs[k];
    int lowestID = gid;
    double diffH = 1.e6;
    double diffD = 0.;
    int p;
    for (p = 0; p < 20; p++) {
      int ngbid = pyNgbs[gid][p];
      if (ngbid < 0) {
        break;
      }
      if (pyElev[ngbid] < pyElev[lowestID]) {
        lowestID = ngbid;
      }
      double dh = pyZ[ngbid] - pyZ[gid];
      if (dh >= 0. && dh < diffH) {
        diffH = dh;
      }
      if (dh > diffD) {
        diffD = dh;
      }
    }
    pyRcv[gid] = lowestID;
    if (gid == pyRcv[gid]) {
      pyBase[gid] = gid;
    }
    if (diffH > 9.99e5) {
      diffH = 0.;
    }
    pyMaxh[gid] = diffH;
    pyMaxDep[gid] = diffD;
  }
}


x86 assembly (clang, -O0):
<directions>:
push   %rbp
mov    %rsp,%rbp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x38(%rbp),%eax
jge    1196 <directions+0x96>
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1139 <directions+0x39>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    1332 <directions+0x232>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
movsd  0xe3b(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0x14,-0x54(%rbp)
jge    12b1 <directions+0x1b1>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x0,-0x58(%rbp)
jge    120b <directions+0x10b>
jmp    12b1 <directions+0x1b1>
mov    -0x8(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1235 <directions+0x135>
mov    -0x58(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1284 <directions+0x184>
movsd  -0x60(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1284 <directions+0x184>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    129e <directions+0x19e>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    12a3 <directions+0x1a3>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11d9 <directions+0xd9>
mov    -0x40(%rbp),%edx
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
mov    0x18(%rbp),%rcx
movslq -0x3c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    12e1 <directions+0x1e1>
mov    -0x3c(%rbp),%edx
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movsd  -0x48(%rbp),%xmm0
movsd  0xd1a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1300 <directions+0x200>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    119d <directions+0x9d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<directions>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    0x60(%rsp),%eax
mov    0x58(%rsp),%r11d
mov    0x50(%rsp),%r15
mov    0x48(%rsp),%r12
mov    0x40(%rsp),%r8
mov    0x38(%rsp),%rbp
test   %eax,%eax
jle    12fe <directions+0x1fe>
mov    %eax,%r14d
cmp    $0x4,%eax
jae    11d9 <directions+0xd9>
xor    %ebx,%ebx
mov    %rbx,%rax
not    %rax
test   $0x1,%r14b
je     1173 <directions+0x73>
movl   $0xffffffff,0x0(%rbp,%rbx,4)
ff
movl   $0xffffffff,(%r8,%rbx,4)
ff
movabs $0x412e848000000000,%rcx
84 2e 41
mov    %rcx,(%r12,%rbx,8)
movq   $0x0,(%r15,%rbx,8)
or     $0x1,%rbx
add    %r14,%rax
je     12fe <directions+0x1fe>
movabs $0x412e848000000000,%rax
84 2e 41
cs nopw 0x0(%rax,%rax,1)
movl   $0xffffffff,0x0(%rbp,%rbx,4)
ff
movl   $0xffffffff,(%r8,%rbx,4)
ff
mov    %rax,(%r12,%rbx,8)
movq   $0x0,(%r15,%rbx,8)
movl   $0xffffffff,0x4(%rbp,%rbx,4)
ff
movl   $0xffffffff,0x4(%r8,%rbx,4)
ff ff
mov    %rax,0x8(%r12,%rbx,8)
movq   $0x0,0x8(%r15,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%r14
jne    1190 <directions+0x90>
jmp    12fe <directions+0x1fe>
lea    0x0(,%r14,4),%rax
add    %rbp,%rax
lea    (%r8,%r14,4),%rcx
lea    (%r12,%r14,8),%r10
cmp    %rbp,%rcx
seta   %r13b
lea    (%r15,%r14,8),%rbx
cmp    %r8,%rax
seta   %cl
cmp    %r12,%rbx
seta   %al
cmp    %r15,%r10
seta   %r10b
xor    %ebx,%ebx
test   %cl,%r13b
jne    1410 <directions+0x310>
and    %r10b,%al
mov    0x38(%rsp),%rbp
jne    113d <directions+0x3d>
mov    %r14d,%ebx
and    $0xfffffffc,%ebx
lea    -0x4(%rbx),%rax
mov    %rax,%r10
shr    $0x2,%r10
add    $0x1,%r10
test   %rax,%rax
je     141a <directions+0x31a>
mov    %r10,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %eax,%eax
pcmpeqd %xmm0,%xmm0
movapd 0xdaa(%rip),%xmm1
xorpd  %xmm2,%xmm2
nopw   0x0(%rax,%rax,1)
movdqu %xmm0,0x0(%rbp,%rax,4)
movdqu %xmm0,(%r8,%rax,4)
movupd %xmm1,(%r12,%rax,8)
movupd %xmm1,0x10(%r12,%rax,8)
movupd %xmm2,(%r15,%rax,8)
movupd %xmm2,0x10(%r15,%rax,8)
movdqu %xmm0,0x10(%rbp,%rax,4)
movdqu %xmm0,0x10(%r8,%rax,4)
movupd %xmm1,0x20(%r12,%rax,8)
movupd %xmm1,0x30(%r12,%rax,8)
movupd %xmm2,0x20(%r15,%rax,8)
movupd %xmm2,0x30(%r15,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1260 <directions+0x160>
test   $0x1,%r10b
je     12f5 <directions+0x1f5>
pcmpeqd %xmm0,%xmm0
movdqu %xmm0,0x0(%rbp,%rax,4)
movdqu %xmm0,(%r8,%rax,4)
movdqa 0xd29(%rip),%xmm0
movdqu %xmm0,(%r12,%rax,8)
movdqu %xmm0,0x10(%r12,%rax,8)
pxor   %xmm0,%xmm0
movdqu %xmm0,(%r15,%rax,8)
movdqu %xmm0,0x10(%r15,%rax,8)
cmp    %r14,%rbx
jne    113d <directions+0x3d>
test   %r11d,%r11d
jle    1405 <directions+0x305>
mov    %r11d,%r11d
xor    %r14d,%r14d
movsd  0xcfb(%rip),%xmm0
movsd  0xcfb(%rip),%xmm1
jmp    1346 <directions+0x246>
nop
movapd %xmm1,%xmm2
cmpltsd %xmm4,%xmm2
andnpd %xmm4,%xmm2
movlpd %xmm2,(%r12,%r13,8)
movsd  %xmm3,(%r15,%r13,8)
add    $0x1,%r14
cmp    %r11,%r14
je     1405 <directions+0x305>
mov    (%r9,%r14,4),%ebp
movslq %ebp,%r13
lea    0x0(,%r13,4),%rbx
add    %r13,%rbx
shl    $0x4,%rbx
add    %rdx,%rbx
xor    %eax,%eax
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm5
jmp    13b1 <directions+0x2b1>
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%r10,8),%xmm3
subsd  (%rsi,%r13,8),%xmm3
movapd %xmm3,%xmm6
minsd  %xmm5,%xmm6
xorpd  %xmm4,%xmm4
cmplesd %xmm3,%xmm4
andpd  %xmm4,%xmm6
andnpd %xmm5,%xmm4
orpd   %xmm6,%xmm4
maxsd  %xmm2,%xmm3
add    $0x1,%rax
movapd %xmm3,%xmm2
movapd %xmm4,%xmm5
mov    %ecx,%ebp
cmp    $0x14,%rax
je     13ea <directions+0x2ea>
mov    (%rbx,%rax,4),%r10d
test   %r10d,%r10d
js     13e0 <directions+0x2e0>
movslq %ebp,%rcx
movsd  (%rdi,%rcx,8),%xmm3
ucomisd (%rdi,%r10,8),%xmm3
mov    %r10d,%ecx
ja     1370 <directions+0x270>
mov    %ebp,%ecx
jmp    1370 <directions+0x270>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebp,%ecx
movapd %xmm5,%xmm4
movapd %xmm2,%xmm3
mov    %ecx,(%r8,%r13,4)
cmp    %ecx,%r13d
jne    1320 <directions+0x220>
mov    0x38(%rsp),%rax
mov    %r13d,(%rax,%r13,4)
jmp    1320 <directions+0x220>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x38(%rsp),%rbp
jmp    113d <directions+0x3d>
xor    %eax,%eax
test   $0x1,%r10b
jne    12bf <directions+0x1bf>
jmp    12f5 <directions+0x1f5>

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

LLVM IR (-O2):
define void @directions(double* nocapture %0, double* nocapture %1, [20 x i32]* nocapture %2, [20 x double]* nocapture readnone %3, [20 x double]* nocapture readnone %4, i32* nocapture %5, i32* nocapture writeonly %6, i32* nocapture writeonly %7, double* nocapture writeonly %8, double* nocapture writeonly %9, i32 %10, i32 %11) {
%13 = icmp sgt i32 %11, 0
br i1 %13, label %14, label %114
14: ; preds = %12
%15 = zext i32 %11 to i64
%16 = icmp ult i32 %11, 4
br i1 %16, label %99, label %17
17: ; preds = %14
%18 = getelementptr i32, i32* %6, i64 %15
%19 = getelementptr i32, i32* %7, i64 %15
%20 = getelementptr double, double* %8, i64 %15
%21 = getelementptr double, double* %9, i64 %15
%22 = icmp ugt i32* %19, %6
%23 = icmp ugt i32* %18, %7
%24 = and i1 %22, %23
%25 = icmp ugt double* %21, %8
%26 = icmp ugt double* %20, %9
%27 = and i1 %25, %26
%28 = or i1 %24, %27
br i1 %28, label %99, label %29
29: ; preds = %17
%30 = and i64 %15, 4294967292
%31 = add nsw i64 %30, -4
%32 = lshr exact i64 %31, 2
%33 = add nuw nsw i64 %32, 1
%34 = and i64 %33, 1
%35 = icmp eq i64 %31, 0
br i1 %35, label %77, label %36
36: ; preds = %29
%37 = and i64 %33, 9223372036854775806
br label %38
38: ; preds = %38, %36
%39 = phi i64 [ 0, %36 ], [ %74, %38 ]
%40 = phi i64 [ 0, %36 ], [ %75, %38 ]
%41 = getelementptr inbounds i32, i32* %6, i64 %39
%42 = bitcast i32* %41 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %42
%43 = getelementptr inbounds i32, i32* %41, i64 2
%44 = bitcast i32* %43 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %44
%45 = getelementptr inbounds i32, i32* %7, i64 %39
%46 = bitcast i32* %45 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %46
%47 = getelementptr inbounds i32, i32* %45, i64 2
%48 = bitcast i32* %47 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %48
%49 = getelementptr inbounds double, double* %8, i64 %39
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %50
%51 = getelementptr inbounds double, double* %49, i64 2
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %52
%53 = getelementptr inbounds double, double* %9, i64 %39
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %54
%55 = getelementptr inbounds double, double* %53, i64 2
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %56
%57 = or i64 %39, 4
%58 = getelementptr inbounds i32, i32* %6, i64 %57
%59 = bitcast i32* %58 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %59
%60 = getelementptr inbounds i32, i32* %58, i64 2
%61 = bitcast i32* %60 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %61
%62 = getelementptr inbounds i32, i32* %7, i64 %57
%63 = bitcast i32* %62 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %63
%64 = getelementptr inbounds i32, i32* %62, i64 2
%65 = bitcast i32* %64 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %65
%66 = getelementptr inbounds double, double* %8, i64 %57
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %69
%70 = getelementptr inbounds double, double* %9, i64 %57
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %71
%72 = getelementptr inbounds double, double* %70, i64 2
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %73
%74 = add nuw i64 %39, 8
%75 = add i64 %40, 2
%76 = icmp eq i64 %75, %37
br i1 %76, label %77, label %38
77: ; preds = %38, %29
%78 = phi i64 [ 0, %29 ], [ %74, %38 ]
%79 = icmp eq i64 %34, 0
br i1 %79, label %97, label %80
80: ; preds = %77
%81 = getelementptr inbounds i32, i32* %6, i64 %78
%82 = bitcast i32* %81 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %82
%83 = getelementptr inbounds i32, i32* %81, i64 2
%84 = bitcast i32* %83 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %84
%85 = getelementptr inbounds i32, i32* %7, i64 %78
%86 = bitcast i32* %85 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %86
%87 = getelementptr inbounds i32, i32* %85, i64 2
%88 = bitcast i32* %87 to <2 x i32>*
store <2 x i32> <i32 -1, i32 -1>, <2 x i32>* %88
%89 = getelementptr inbounds double, double* %8, i64 %78
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %90
%91 = getelementptr inbounds double, double* %89, i64 2
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> <double 1.000000e+06, double 1.000000e+06>, <2 x double>* %92
%93 = getelementptr inbounds double, double* %9, i64 %78
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %94
%95 = getelementptr inbounds double, double* %93, i64 2
%96 = bitcast double* %95 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %96
br label %97
97: ; preds = %77, %80
%98 = icmp eq i64 %30, %15
br i1 %98, label %114, label %99
99: ; preds = %17, %14, %97
%100 = phi i64 [ 0, %17 ], [ 0, %14 ], [ %30, %97 ]
%101 = xor i64 %100, -1
%102 = and i64 %15, 1
%103 = icmp eq i64 %102, 0
br i1 %103, label %110, label %104
104: ; preds = %99
%105 = getelementptr inbounds i32, i32* %6, i64 %100
store i32 -1, i32* %105
%106 = getelementptr inbounds i32, i32* %7, i64 %100
store i32 -1, i32* %106
%107 = getelementptr inbounds double, double* %8, i64 %100
store double 1.000000e+06, double* %107
%108 = getelementptr inbounds double, double* %9, i64 %100
store double 0.000000e+00, double* %108
%109 = or i64 %100, 1
br label %110
110: ; preds = %104, %99
%111 = phi i64 [ %100, %99 ], [ %109, %104 ]
%112 = sub nsw i64 0, %15
%113 = icmp eq i64 %101, %112
br i1 %113, label %114, label %118
114: ; preds = %110, %118, %97, %12
%115 = icmp sgt i32 %10, 0
br i1 %115, label %116, label %181
116: ; preds = %114
%117 = zext i32 %10 to i64
br label %131
118: ; preds = %110, %118
%119 = phi i64 [ %129, %118 ], [ %111, %110 ]
%120 = getelementptr inbounds i32, i32* %6, i64 %119
store i32 -1, i32* %120
%121 = getelementptr inbounds i32, i32* %7, i64 %119
store i32 -1, i32* %121
%122 = getelementptr inbounds double, double* %8, i64 %119
store double 1.000000e+06, double* %122
%123 = getelementptr inbounds double, double* %9, i64 %119
store double 0.000000e+00, double* %123
%124 = add nuw nsw i64 %119, 1
%125 = getelementptr inbounds i32, i32* %6, i64 %124
store i32 -1, i32* %125
%126 = getelementptr inbounds i32, i32* %7, i64 %124
store i32 -1, i32* %126
%127 = getelementptr inbounds double, double* %8, i64 %124
store double 1.000000e+06, double* %127
%128 = getelementptr inbounds double, double* %9, i64 %124
store double 0.000000e+00, double* %128
%129 = add nuw nsw i64 %119, 2
%130 = icmp eq i64 %129, %15
br i1 %130, label %114, label %118
131: ; preds = %116, %174
%132 = phi i64 [ 0, %116 ], [ %179, %174 ]
%133 = getelementptr inbounds i32, i32* %5, i64 %132
%134 = load i32, i32* %133
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %1, i64 %135
br label %137
137: ; preds = %131, %145
%138 = phi i64 [ 0, %131 ], [ %164, %145 ]
%139 = phi double [ 0.000000e+00, %131 ], [ %163, %145 ]
%140 = phi double [ 1.000000e+06, %131 ], [ %161, %145 ]
%141 = phi i32 [ %134, %131 ], [ %153, %145 ]
%142 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 %135, i64 %138
%143 = load i32, i32* %142
%144 = icmp slt i32 %143, 0
br i1 %144, label %166, label %145
145: ; preds = %137
%146 = zext i32 %143 to i64
%147 = getelementptr inbounds double, double* %0, i64 %146
%148 = load double, double* %147
%149 = sext i32 %141 to i64
%150 = getelementptr inbounds double, double* %0, i64 %149
%151 = load double, double* %150
%152 = fcmp olt double %148, %151
%153 = select i1 %152, i32 %143, i32 %141
%154 = getelementptr inbounds double, double* %1, i64 %146
%155 = load double, double* %154
%156 = load double, double* %136
%157 = fsub double %155, %156
%158 = fcmp oge double %157, 0.000000e+00
%159 = fcmp olt double %157, %140
%160 = select i1 %158, i1 %159, i1 false
%161 = select i1 %160, double %157, double %140
%162 = fcmp ogt double %157, %139
%163 = select i1 %162, double %157, double %139
%164 = add nuw nsw i64 %138, 1
%165 = icmp eq i64 %164, 20
br i1 %165, label %166, label %137
166: ; preds = %137, %145
%167 = phi i32 [ %141, %137 ], [ %153, %145 ]
%168 = phi double [ %140, %137 ], [ %161, %145 ]
%169 = phi double [ %139, %137 ], [ %163, %145 ]
%170 = getelementptr inbounds i32, i32* %7, i64 %135
store i32 %167, i32* %170
%171 = icmp eq i32 %134, %167
br i1 %171, label %172, label %174
172: ; preds = %166
%173 = getelementptr inbounds i32, i32* %6, i64 %135
store i32 %134, i32* %173
br label %174
174: ; preds = %172, %166
%175 = fcmp ogt double %168, 9.990000e+05
%176 = select i1 %175, double 0.000000e+00, double %168
%177 = getelementptr inbounds double, double* %8, i64 %135
store double %176, double* %177
%178 = getelementptr inbounds double, double* %9, i64 %135
store double %169, double* %178
%179 = add nuw nsw i64 %132, 1
%180 = icmp eq i64 %179, %117
br i1 %180, label %181, label %131
181: ; preds = %174, %114
ret void
}