#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 */
float point_nearest_line(float *, float *, float *, float *);
int /*<<< orphan*/ vis5d_get_sizePRIME(int, int *, int *, int *, int *, int *,
                                       int *);
int /*<<< orphan*/ vis5d_gridPRIME_to_xyzPRIME(int, int /*<<< orphan*/,
                                               int /*<<< orphan*/, float, float,
                                               float, float *, float *,
                                               float *);
int /*<<< orphan*/ vis5d_unproject(int, float, float, float *, float *);
int /*<<< orphan*/ vis5d_xyzPRIME_to_gridPRIME(int, int /*<<< orphan*/,
                                               int /*<<< orphan*/, float, float,
                                               float, float *, float *,
                                               float *);
int move_hclip(int index, int num, int curx, int cury, float *level,
               int corner) {
  int Nr, Nc, Nl, LowLev, MaxNlVar, WindNl, WindLow;
  float cx, cy;
  float a[3], da[3];
  float b[3], db[3];
  float t;
  float topl, botl, aa[3];
  float r, c;
  float maxlevel, minlevel;
  vis5d_get_sizePRIME(index, &Nr, &Nc, &Nl, &LowLev, &WindNl, &WindLow);
  maxlevel = (float)(Nl - 1 + LowLev);
  minlevel = (float)LowLev;
  cx = (float)curx;
  cy = (float)cury;
  vis5d_unproject(index, cx, cy, b, db);
  switch (corner) {
  case 0:
    r = 0.0;
    c = (float)(Nc - 1);
    break;
  case 1:
    r = (float)(Nr - 1);
    c = (float)(Nc - 1);
    break;
  case 2:
    r = (float)(Nr - 1);
    c = 0.0;
    break;
  case 3:
    r = 0.0;
    c = 0.0;
    break;
  }
  topl = maxlevel;
  botl = minlevel;
  vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, r, c, botl, &a[0], &a[1], &a[2]);
  vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, r, c, topl, &aa[0], &aa[1], &aa[2]);
  da[0] = aa[0] - a[0];
  da[1] = aa[1] - a[1];
  da[2] = aa[2] - a[2];
  t = point_nearest_line(a, da, b, db);
  if (t == 0.0) {
    return 0;
  } else {
    float x, y, z, row, col;
    x = a[0] + t * da[0];
    y = a[1] + t * da[1];
    z = a[2] + t * da[2];
    vis5d_xyzPRIME_to_gridPRIME(index, 0, 0, x, y, z, &row, &col, level);
    return 1;
  }
}


x86 assembly (clang, -O0):
<move_hclip>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    %rsp,%rax
lea    -0x40(%rbp),%rcx
mov    %rcx,(%rax)
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x34(%rbp),%r8
lea    -0x3c(%rbp),%r9
call   1050 <vis5d_get_sizePRIME@plt>
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%eax
mov    %eax,%ecx
mov    %edx,%eax
lea    -0x1(%rax,%rcx,1),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
cvtsi2ssl -0x34(%rbp),%xmm0
movss  %xmm0,-0xa0(%rbp)
ff
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%edi
movss  -0x44(%rbp),%xmm0
movss  -0x48(%rbp),%xmm1
lea    -0x6c(%rbp),%rsi
lea    -0x78(%rbp),%rdx
call   1040 <vis5d_unproject@plt>
mov    -0x24(%rbp),%eax
mov    %rax,-0xc0(%rbp)
sub    $0x3,%rax
ja     1298 <move_hclip+0x148>
mov    -0xc0(%rbp),%rax
lea    0xdf4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xorps  %xmm0,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
jmp    1298 <move_hclip+0x148>
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
jmp    1298 <move_hclip+0x148>
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
jmp    1298 <move_hclip+0x148>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  -0x9c(%rbp),%xmm0
ff
movss  %xmm0,-0x80(%rbp)
movss  -0xa0(%rbp),%xmm0
ff
movss  %xmm0,-0x84(%rbp)
ff
mov    -0x8(%rbp),%edi
movss  -0x94(%rbp),%xmm0
ff
movss  -0x98(%rbp),%xmm1
ff
movss  -0x84(%rbp),%xmm2
ff
lea    -0x54(%rbp),%rcx
lea    -0x54(%rbp),%r8
add    $0x4,%r8
lea    -0x54(%rbp),%r9
add    $0x8,%r9
xor    %edx,%edx
mov    %edx,%esi
call   1060 <vis5d_gridPRIME_to_xyzPRIME@plt>
mov    -0x8(%rbp),%edi
movss  -0x94(%rbp),%xmm0
ff
movss  -0x98(%rbp),%xmm1
ff
movss  -0x80(%rbp),%xmm2
lea    -0x90(%rbp),%rcx
lea    -0x90(%rbp),%r8
add    $0x4,%r8
lea    -0x90(%rbp),%r9
add    $0x8,%r9
xor    %edx,%edx
mov    %edx,%esi
call   1060 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  -0x90(%rbp),%xmm0
ff
subss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x8c(%rbp),%xmm0
ff
subss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x88(%rbp),%xmm0
ff
subss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x58(%rbp)
lea    -0x54(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x6c(%rbp),%rdx
lea    -0x78(%rbp),%rcx
call   1030 <point_nearest_line@plt>
movss  %xmm0,-0x7c(%rbp)
movss  -0x7c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13a3 <move_hclip+0x253>
jp     13a3 <move_hclip+0x253>
movl   $0x0,-0x4(%rbp)
jmp    143d <move_hclip+0x2ed>
movss  -0x54(%rbp),%xmm1
movss  -0x7c(%rbp),%xmm0
movss  -0x60(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xa4(%rbp)
ff
movss  -0x50(%rbp),%xmm1
movss  -0x7c(%rbp),%xmm0
movss  -0x5c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xa8(%rbp)
ff
movss  -0x4c(%rbp),%xmm1
movss  -0x7c(%rbp),%xmm0
movss  -0x58(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xac(%rbp)
ff
mov    -0x8(%rbp),%edi
movss  -0xa4(%rbp),%xmm0
ff
movss  -0xa8(%rbp),%xmm1
ff
movss  -0xac(%rbp),%xmm2
ff
mov    -0x20(%rbp),%r9
xor    %edx,%edx
lea    -0xb0(%rbp),%rcx
lea    -0xb4(%rbp),%r8
mov    %edx,%esi
call   1070 <vis5d_xyzPRIME_to_gridPRIME@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_hclip>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %r9d,%ebx
mov    %r8,%r14
mov    %ecx,%r15d
mov    %edx,%ebp
mov    %edi,%r12d
lea    0x60(%rsp),%rax
mov    %rax,(%rsp)
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x54(%rsp),%rcx
lea    0x50(%rsp),%r8
lea    0x64(%rsp),%r9
call   1050 <vis5d_get_sizePRIME@plt>
mov    0x54(%rsp),%eax
mov    0x50(%rsp),%ecx
add    %ecx,%eax
add    $0xffffffff,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  %xmm0,0x3c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
cvtsi2ss %r15d,%xmm1
lea    0x74(%rsp),%rsi
lea    0x68(%rsp),%rdx
mov    %r12d,%edi
call   1040 <vis5d_unproject@plt>
xorps  %xmm0,%xmm0
cmp    $0x2,%ebx
je     11e9 <move_hclip+0x99>
cmp    $0x1,%ebx
je     11fc <move_hclip+0xac>
test   %ebx,%ebx
jne    11f7 <move_hclip+0xa7>
jmp    120a <move_hclip+0xba>
mov    0x24(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
xorps  %xmm1,%xmm1
jmp    1218 <move_hclip+0xc8>
mov    0x24(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    0x20(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
lea    0x18(%rsp),%r8
lea    0x1c(%rsp),%r9
xor    %ebx,%ebx
lea    0x14(%rsp),%r15
mov    %r12d,%edi
xor    %esi,%esi
xor    %edx,%edx
movss  %xmm0,0x38(%rsp)
movss  %xmm1,0x34(%rsp)
movss  0x3c(%rsp),%xmm2
mov    %r15,%rcx
call   1060 <vis5d_gridPRIME_to_xyzPRIME@plt>
lea    0x48(%rsp),%r8
lea    0x4c(%rsp),%r9
lea    0x44(%rsp),%rcx
mov    %r12d,%edi
xor    %esi,%esi
xor    %edx,%edx
movss  0x38(%rsp),%xmm0
movss  0x34(%rsp),%xmm1
movss  0x40(%rsp),%xmm2
call   1060 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  0x44(%rsp),%xmm0
movss  0x48(%rsp),%xmm1
subss  0x14(%rsp),%xmm0
movss  %xmm0,0x28(%rsp)
subss  0x18(%rsp),%xmm1
movss  %xmm1,0x2c(%rsp)
movss  0x4c(%rsp),%xmm0
subss  0x1c(%rsp),%xmm0
movss  %xmm0,0x30(%rsp)
lea    0x28(%rsp),%rsi
lea    0x74(%rsp),%rdx
lea    0x68(%rsp),%rcx
mov    %r15,%rdi
call   1030 <point_nearest_line@plt>
movaps %xmm0,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jne    12d1 <move_hclip+0x181>
jnp    131b <move_hclip+0x1cb>
movss  0x28(%rsp),%xmm0
mulss  %xmm2,%xmm0
addss  0x14(%rsp),%xmm0
movss  0x2c(%rsp),%xmm1
mulss  %xmm2,%xmm1
addss  0x18(%rsp),%xmm1
mulss  0x30(%rsp),%xmm2
addss  0x1c(%rsp),%xmm2
lea    0x5c(%rsp),%rcx
lea    0x58(%rsp),%r8
mov    %r12d,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %r14,%r9
call   1070 <vis5d_xyzPRIME_to_gridPRIME@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @move_hclip(i32 %0, i32 %1, i32 %2, i32 %3, float* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [3 x float]
%14 = alloca [3 x float]
%15 = alloca [3 x float]
%16 = alloca [3 x float]
%17 = alloca [3 x float]
%18 = alloca float
%19 = alloca float
%20 = bitcast i32* %7 to i8*
%21 = bitcast i32* %8 to i8*
%22 = bitcast i32* %9 to i8*
%23 = bitcast i32* %10 to i8*
%24 = bitcast i32* %11 to i8*
%25 = bitcast i32* %12 to i8*
%26 = bitcast [3 x float]* %13 to i8*
%27 = bitcast [3 x float]* %14 to i8*
%28 = bitcast [3 x float]* %15 to i8*
%29 = bitcast [3 x float]* %16 to i8*
%30 = bitcast [3 x float]* %17 to i8*
%31 = call i32 @vis5d_get_sizePRIME(i32 %0, i32* %7, i32* %8, i32* %9, i32* %10, i32* %11, i32* %12)
%32 = load i32, i32* %9
%33 = add nsw i32 %32, -1
%34 = load i32, i32* %10
%35 = add nsw i32 %33, %34
%36 = sitofp i32 %35 to float
%37 = sitofp i32 %34 to float
%38 = sitofp i32 %2 to float
%39 = sitofp i32 %3 to float
%40 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 0, i64 0
%41 = getelementptr inbounds [3 x float], [3 x float]* %16, i64 0, i64 0
%42 = call i32 @vis5d_unproject(i32 %0, float %38, float %39, float* %40, float* %41)
switch i32 %5, label %58 [
i32 0, label %43
i32 1, label %47
i32 2, label %54
]
43: ; preds = %6
%44 = load i32, i32* %8
%45 = add nsw i32 %44, -1
%46 = sitofp i32 %45 to float
br label %58
47: ; preds = %6
%48 = load i32, i32* %7
%49 = add nsw i32 %48, -1
%50 = sitofp i32 %49 to float
%51 = load i32, i32* %8
%52 = add nsw i32 %51, -1
%53 = sitofp i32 %52 to float
br label %58
54: ; preds = %6
%55 = load i32, i32* %7
%56 = add nsw i32 %55, -1
%57 = sitofp i32 %56 to float
br label %58
58: ; preds = %6, %54, %47, %43
%59 = phi float [ 0.000000e+00, %54 ], [ %53, %47 ], [ %46, %43 ], [ 0.000000e+00, %6 ]
%60 = phi float [ %57, %54 ], [ %50, %47 ], [ 0.000000e+00, %43 ], [ 0.000000e+00, %6 ]
%61 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 0
%62 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 1
%63 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 2
%64 = call i32 @vis5d_gridPRIME_to_xyzPRIME(i32 %0, i32 0, i32 0, float %60, float %59, float %37, float* %61, float* %62, float* %63)
%65 = getelementptr inbounds [3 x float], [3 x float]* %17, i64 0, i64 0
%66 = getelementptr inbounds [3 x float], [3 x float]* %17, i64 0, i64 1
%67 = getelementptr inbounds [3 x float], [3 x float]* %17, i64 0, i64 2
%68 = call i32 @vis5d_gridPRIME_to_xyzPRIME(i32 %0, i32 0, i32 0, float %60, float %59, float %36, float* %65, float* %66, float* %67)
%69 = load float, float* %65
%70 = load float, float* %61
%71 = fsub float %69, %70
%72 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 0
store float %71, float* %72
%73 = load float, float* %66
%74 = load float, float* %62
%75 = fsub float %73, %74
%76 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 1
store float %75, float* %76
%77 = load float, float* %67
%78 = load float, float* %63
%79 = fsub float %77, %78
%80 = getelementptr inbounds [3 x float], [3 x float]* %14, i64 0, i64 2
store float %79, float* %80
%81 = call float @point_nearest_line(float* %61, float* %72, float* %40, float* %41)
%82 = fcmp oeq float %81, 0.000000e+00
br i1 %82, label %96, label %83
83: ; preds = %58
%84 = bitcast float* %18 to i8*
%85 = bitcast float* %19 to i8*
%86 = load float, float* %61
%87 = load float, float* %72
%88 = call float @llvm.fmuladd.f32(float %81, float %87, float %86)
%89 = load float, float* %62
%90 = load float, float* %76
%91 = call float @llvm.fmuladd.f32(float %81, float %90, float %89)
%92 = load float, float* %63
%93 = load float, float* %80
%94 = call float @llvm.fmuladd.f32(float %81, float %93, float %92)
%95 = call i32 @vis5d_xyzPRIME_to_gridPRIME(i32 %0, i32 0, i32 0, float %88, float %91, float %94, float* %18, float* %19, float* %4)
br label %96
96: ; preds = %58, %83
%97 = phi i32 [ 1, %83 ], [ 0, %58 ]
ret i32 %97
}