#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*/ free(float *);
float *mallocf(int);
void gradient3Dx_float(float *I, int *sizeI, float *Ix) {
  int x, y, z;
  int xp, xn, yp, yn;
  int i;
  int indexn, indexc, indexp;
  float *Irow, *Islices;
  int nSlice;
  int offsetz, offset_slice;
  int slice_select = 0;
  int slice_select_p1 = 0;
  int slice_select_p2 = 0;
  const float smoothfilter[3] = {0.187500f, 0.625000f, 0.187500f};
  const float derivafilter[3] = {-0.5f, 0.0f, 0.5f};
  nSlice = sizeI[0] * sizeI[1];
  Islices = mallocf(4 * nSlice);
  Irow = mallocf(sizeI[0]);
  for (z = 0; z < sizeI[2]; z++) {
    offsetz = nSlice * z;
    offset_slice = nSlice * slice_select;
    for (y = 0; y < sizeI[1]; y++) {
      yn = ((y - 1) > (0) ? (y - 1) : (0));
      yp = ((y + 1) < (sizeI[1] - 1) ? (y + 1) : (sizeI[1] - 1));
      indexn = yn * sizeI[0] + offsetz;
      indexc = y * sizeI[0] + offsetz;
      indexp = yp * sizeI[0] + offsetz;
      for (x = 0; x < sizeI[0]; x++) {
        Irow[x] = smoothfilter[0] * I[indexn + x];
        Irow[x] += smoothfilter[1] * I[indexc + x];
        Irow[x] += smoothfilter[2] * I[indexp + x];
      }
      indexc = y * sizeI[0] + offset_slice;
      for (x = 0; x < sizeI[0]; x++) {
        xn = ((x - 1) > (0) ? (x - 1) : (0));
        xp = ((x + 1) < (sizeI[0] - 1) ? (x + 1) : (sizeI[0] - 1));
        Islices[indexc + x] = derivafilter[0] * Irow[xn] +
                              derivafilter[1] * Irow[x] +
                              derivafilter[2] * Irow[xp];
      }
    }
    if (z == 1) {
      indexn = slice_select_p1 * nSlice;
      indexc = slice_select_p1 * nSlice;
      indexp = slice_select * nSlice;
      for (i = 0; i < nSlice; i++) {
        Ix[i] = smoothfilter[0] * Islices[i + indexn] +
                smoothfilter[1] * Islices[i + indexc] +
                smoothfilter[2] * Islices[i + indexp];
      }
    } else if (z > 1) {
      indexn = slice_select_p2 * nSlice;
      indexc = slice_select_p1 * nSlice;
      indexp = slice_select * nSlice;
      offsetz = nSlice * (z - 1);
      for (i = 0; i < nSlice; i++) {
        Ix[offsetz + i] = smoothfilter[0] * Islices[i + indexn] +
                          smoothfilter[1] * Islices[i + indexc] +
                          smoothfilter[2] * Islices[i + indexp];
      }
    }
    if (z == (sizeI[2] - 1)) {
      indexn = slice_select_p1 * nSlice;
      indexc = slice_select * nSlice;
      indexp = slice_select * nSlice;
      offsetz = nSlice * z;
      for (i = 0; i < nSlice; i++) {
        Ix[offsetz + i] = smoothfilter[0] * Islices[i + indexn] +
                          smoothfilter[1] * Islices[i + indexc] +
                          smoothfilter[2] * Islices[i + indexp];
      }
    }
    slice_select_p2 = slice_select_p1;
    slice_select_p1 = slice_select;
    slice_select++;
    if (slice_select > 3) {
      slice_select = 0;
    }
  }
  free(Irow);
  free(Islices);
}


x86 assembly (clang, -O0):
<gradient3Dx_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x7c(%rbp)
mov    0xeab(%rip),%eax
mov    %eax,-0x74(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xea0(%rip),%eax
mov    %eax,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
imul   0x4(%rcx),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%edi
shl    $0x2,%edi
call   1040 <mallocf@plt>
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <mallocf@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    0x8(%rcx),%eax
jge    16d1 <gradient3Dx_float+0x5b1>
mov    -0x5c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
imul   -0x68(%rbp),%eax
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    0x4(%rcx),%eax
jge    1455 <gradient3Dx_float+0x335>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jle    1208 <gradient3Dx_float+0xe8>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1215 <gradient3Dx_float+0xf5>
xor    %eax,%eax
mov    %eax,-0x8c(%rbp)
jmp    1215 <gradient3Dx_float+0xf5>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1247 <gradient3Dx_float+0x127>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    1257 <gradient3Dx_float+0x137>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
add    -0x60(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    133a <gradient3Dx_float+0x21a>
movss  -0x7c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movss  -0x78(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
movss  -0x74(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1297 <gradient3Dx_float+0x177>
mov    -0x20(%rbp),%eax
mov    -0x10(%rbp),%rcx
imul   (%rcx),%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1442 <gradient3Dx_float+0x322>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jle    1380 <gradient3Dx_float+0x260>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    138d <gradient3Dx_float+0x26d>
xor    %eax,%eax
mov    %eax,-0x94(%rbp)
jmp    138d <gradient3Dx_float+0x26d>
mov    -0x94(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13be <gradient3Dx_float+0x29e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    13cd <gradient3Dx_float+0x2ad>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
mov    %eax,-0x28(%rbp)
movss  -0x88(%rbp),%xmm1
ff
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x84(%rbp),%xmm0
ff
mov    -0x50(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x80(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x28(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1351 <gradient3Dx_float+0x231>
jmp    1447 <gradient3Dx_float+0x327>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11d8 <gradient3Dx_float+0xb8>
cmpl   $0x1,-0x24(%rbp)
jne    1505 <gradient3Dx_float+0x3e5>
mov    -0x6c(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x6c(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1500 <gradient3Dx_float+0x3e0>
movss  -0x7c(%rbp),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x78(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x74(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x44(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1484 <gradient3Dx_float+0x364>
jmp    15ce <gradient3Dx_float+0x4ae>
cmpl   $0x1,-0x24(%rbp)
jle    15c9 <gradient3Dx_float+0x4a9>
mov    -0x70(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x6c(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    15c4 <gradient3Dx_float+0x4a4>
movss  -0x7c(%rbp),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x78(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x74(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x44(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1543 <gradient3Dx_float+0x423>
jmp    15c9 <gradient3Dx_float+0x4a9>
jmp    15ce <gradient3Dx_float+0x4ae>
mov    -0x24(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1698 <gradient3Dx_float+0x578>
mov    -0x6c(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x68(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x5c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x60(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1693 <gradient3Dx_float+0x573>
movss  -0x7c(%rbp),%xmm1
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x78(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
mulss  (%rax,%rcx,4),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x74(%rbp),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x44(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x60(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1612 <gradient3Dx_float+0x4f2>
jmp    1698 <gradient3Dx_float+0x578>
mov    -0x6c(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x3,-0x68(%rbp)
jle    16be <gradient3Dx_float+0x59e>
movl   $0x0,-0x68(%rbp)
jmp    16c3 <gradient3Dx_float+0x5a3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ad <gradient3Dx_float+0x8d>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gradient3Dx_float>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
movslq (%rsi),%rax
movslq 0x4(%rsi),%r12
imul   %rax,%r12
lea    0x0(,%r12,4),%edi
call   1040 <mallocf@plt>
mov    %rax,0x10(%rsp)
mov    0x0(%rbp),%edi
call   1040 <mallocf@plt>
mov    %rbp,0xa8(%rsp)
mov    0x8(%rbp),%ecx
mov    %rcx,0xb0(%rsp)
test   %ecx,%ecx
jle    1cdf <gradient3Dx_float+0xbbf>
mov    0xa8(%rsp),%rcx
mov    0x4(%rcx),%ecx
mov    %rcx,0xc0(%rsp)
movslq %ecx,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,0x120(%rsp)
test   %r12d,%r12d
setle  0x7(%rsp)
mov    0xb0(%rsp),%rcx
add    $0xffffffff,%ecx
mov    %rcx,0xe8(%rsp)
mov    %r12d,%r14d
mov    0x10(%rsp),%rcx
lea    (%rcx,%r14,4),%rdx
mov    %rdx,0x58(%rsp)
mov    %r14,%rdx
sub    %r12,%rdx
mov    %rdx,0xd8(%rsp)
lea    (%r15,%r14,4),%rdx
mov    %rdx,0xd0(%rsp)
mov    %r14d,%edx
and    $0xfffffff8,%edx
mov    %rdx,0x90(%rsp)
mov    %r14,%rdx
neg    %rdx
mov    %rdx,0xa0(%rsp)
mov    %r14d,%edx
and    $0xfffffffc,%edx
mov    %rdx,0xc8(%rsp)
lea    0x10(%rcx),%rdx
mov    %rdx,0x88(%rsp)
add    $0x4,%rcx
mov    %rcx,0x98(%rsp)
lea    0x0(,%r12,4),%rcx
mov    %r15,%rsi
mov    %rcx,0xe0(%rsp)
sub    %rcx,%rsi
movss  0xdde(%rip),%xmm0
movss  0xdda(%rip),%xmm1
xorps  %xmm10,%xmm10
movss  0xdd1(%rip),%xmm11
movss  0xdcc(%rip),%xmm12
movaps 0xd98(%rip),%xmm9
movaps 0xda0(%rip),%xmm8
lea    0x10(%r15),%rcx
mov    %rcx,0xb8(%rsp)
lea    0x4(%r15),%r10
mov    $0x1,%r8d
xor    %ecx,%ecx
mov    %rcx,0x38(%rsp)
xor    %edi,%edi
xor    %r13d,%r13d
xor    %ebp,%ebp
xor    %ecx,%ecx
mov    %r15,0x48(%rsp)
mov    %r12,0x40(%rsp)
mov    %r14,0x28(%rsp)
jmp    1300 <gradient3Dx_float+0x1e0>
nopw   0x0(%rax,%rax,1)
mov    0xf0(%rsp),%rcx
cmp    $0x3,%ecx
mov    %ecx,%ebp
lea    0x1(%rcx),%ecx
mov    $0x0,%edx
cmovge %edx,%ecx
add    $0x1,%rdi
add    %r14,0x38(%rsp)
mov    0xe0(%rsp),%rdx
mov    0x50(%rsp),%rsi
add    %rdx,%rsi
add    %rdx,0xb8(%rsp)
add    %rdx,%r10
cmp    0xb0(%rsp),%rdi
mov    $0x1,%r8d
je     1cdf <gradient3Dx_float+0xbbf>
mov    %r13d,0x84(%rsp)
mov    %ebp,0x34(%rsp)
mov    %rdi,0x8(%rsp)
mov    %r10,0x60(%rsp)
mov    %rsi,0x50(%rsp)
mov    %rcx,0xf0(%rsp)
imul   %r12d,%ecx
mov    %ecx,0x1c(%rsp)
cmpl   $0x0,0xc0(%rsp)
jle    16b0 <gradient3Dx_float+0x590>
mov    0x8(%rsp),%rcx
imul   0x28(%rsp),%rcx
mov    %rcx,0x20(%rsp)
mov    0xa8(%rsp),%rcx
mov    (%rcx),%edi
movslq %edi,%rsi
lea    -0x1(%rsi),%r14
movslq 0x1c(%rsp),%rcx
lea    -0x1(%rdi),%r13
lea    (%rax,%rdi,4),%rdx
mov    %rdx,0x108(%rsp)
lea    (%rbx,%rdi,4),%rdx
mov    %rdx,0x100(%rsp)
mov    %esi,%edx
and    $0xfffffffc,%edx
mov    %rdx,0xf8(%rsp)
mov    0x10(%rsp),%rdx
lea    (%rdx,%rcx,4),%r10
shl    $0x2,%rsi
mov    %rsi,0x70(%rsp)
mov    %rdi,%r9
neg    %r9
mov    0x38(%rsp),%r12
xor    %r11d,%r11d
mov    %r13,0x118(%rsp)
jmp    13db <gradient3Dx_float+0x2bb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %rdi,%r12
add    0x70(%rsp),%r10
mov    0x78(%rsp),%r11
cmp    0xc0(%rsp),%r11
je     16b0 <gradient3Dx_float+0x590>
cmp    $0x2,%r11
mov    $0x1,%r15d
cmovae %r11,%r15
lea    0x1(%r11),%rcx
mov    0x120(%rsp),%rsi
cmp    %rsi,%rcx
mov    %rcx,0x78(%rsp)
cmovl  %ecx,%esi
test   %edi,%edi
jle    13c0 <gradient3Dx_float+0x2a0>
add    $0xffffffff,%r15d
imul   %edi,%r15d
mov    0x38(%rsp),%rcx
lea    (%rcx,%r15,1),%ebp
imul   %edi,%esi
cmp    $0x4,%edi
jae    1430 <gradient3Dx_float+0x310>
xor    %r13d,%r13d
jmp    15b0 <gradient3Dx_float+0x490>
cs nopw 0x0(%rax,%rax,1)
nop
add    0x20(%rsp),%r15d
lea    (%r15,%r13,1),%ecx
cmp    %r15d,%ecx
jl     141d <gradient3Dx_float+0x2fd>
mov    %r13,%r8
shr    $0x20,%r8
jne    15a7 <gradient3Dx_float+0x487>
imul   %edi,%r11d
mov    0x20(%rsp),%rcx
lea    (%rcx,%r11,1),%edx
lea    (%rdx,%r13,1),%ecx
cmp    %edx,%ecx
jl     15a7 <gradient3Dx_float+0x487>
test   %r8,%r8
jne    15a7 <gradient3Dx_float+0x487>
mov    0x20(%rsp),%rcx
lea    (%rsi,%rcx,1),%edx
lea    (%rdx,%r13,1),%ecx
cmp    %edx,%ecx
jl     15a7 <gradient3Dx_float+0x487>
mov    $0x0,%r13d
test   %r8,%r8
mov    $0x1,%r8d
jne    15b0 <gradient3Dx_float+0x490>
add    0x20(%rsp),%r11d
movslq %r11d,%r8
lea    (%rbx,%r8,4),%rcx
mov    %rcx,0x68(%rsp)
mov    0x100(%rsp),%rcx
lea    (%rcx,%r8,4),%r11
movslq %r15d,%r8
mov    %rdx,%r15
lea    (%rbx,%r8,4),%rdx
mov    %rdx,0x110(%rsp)
lea    (%rcx,%r8,4),%r13
movslq %r15d,%rdx
lea    (%rbx,%rdx,4),%r15
lea    (%rcx,%rdx,4),%rdx
cmp    %rdx,%rax
setb   %r8b
mov    0x108(%rsp),%rcx
cmp    %rcx,%r15
setb   %r15b
cmp    %r11,%rax
setb   %dl
cmp    %rcx,0x68(%rsp)
setb   0x68(%rsp)
cmp    %r13,%rax
setb   %r11b
cmp    %rcx,0x110(%rsp)
setb   %cl
test   %r15b,%r8b
jne    15a7 <gradient3Dx_float+0x487>
and    0x68(%rsp),%dl
jne    15a7 <gradient3Dx_float+0x487>
mov    $0x0,%r13d
and    %cl,%r11b
mov    $0x1,%r8d
jne    15b0 <gradient3Dx_float+0x490>
mov    0x38(%rsp),%rcx
lea    (%rcx,%rsi,1),%r8d
xor    %edx,%edx
mov    0xf8(%rsp),%r11
nopw   0x0(%rax,%rax,1)
lea    (%rdx,%rbp,1),%ecx
movslq %ecx,%rcx
movups (%rbx,%rcx,4),%xmm7
mulps  %xmm9,%xmm7
movups %xmm7,(%rax,%rdx,4)
lea    (%r12,%rdx,1),%ecx
movslq %ecx,%rcx
movups (%rbx,%rcx,4),%xmm6
mulps  %xmm8,%xmm6
addps  %xmm7,%xmm6
movups %xmm6,(%rax,%rdx,4)
lea    (%r8,%rdx,1),%ecx
movslq %ecx,%rcx
movups (%rbx,%rcx,4),%xmm7
mulps  %xmm9,%xmm7
addps  %xmm6,%xmm7
movups %xmm7,(%rax,%rdx,4)
add    $0x4,%rdx
cmp    %rdx,%r11
jne    1550 <gradient3Dx_float+0x430>
mov    %r11,%r13
cmp    %rdi,%r11
mov    $0x1,%r8d
jne    15b0 <gradient3Dx_float+0x490>
jmp    1614 <gradient3Dx_float+0x4f4>
xor    %r13d,%r13d
mov    $0x1,%r8d
add    0x38(%rsp),%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x0(%rbp,%r13,1),%ecx
movslq %ecx,%rcx
movss  (%rbx,%rcx,4),%xmm6
mulss  %xmm0,%xmm6
movss  %xmm6,(%rax,%r13,4)
lea    (%r12,%r13,1),%ecx
movslq %ecx,%rcx
movss  (%rbx,%rcx,4),%xmm7
mulss  %xmm1,%xmm7
addss  %xmm6,%xmm7
movss  %xmm7,(%rax,%r13,4)
lea    (%rsi,%r13,1),%ecx
movslq %ecx,%rcx
movss  (%rbx,%rcx,4),%xmm6
mulss  %xmm0,%xmm6
addss  %xmm7,%xmm6
movss  %xmm6,(%rax,%r13,4)
add    $0x1,%r13
cmp    %r13,%rdi
jne    15c0 <gradient3Dx_float+0x4a0>
test   %edi,%edi
movabs $0xffffffff00000000,%rbp
ff ff ff
mov    0x118(%rsp),%r13
jle    13c0 <gradient3Dx_float+0x2a0>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
cmove  %r8,%rdx
cmp    %r14,%rcx
mov    %r14d,%esi
cmovl  %ecx,%esi
shl    $0x20,%rdx
add    %rbp,%rdx
sar    $0x1e,%rdx
movss  -0x4(%rax,%rcx,4),%xmm6
mulss  %xmm10,%xmm6
movss  (%rax,%rdx,1),%xmm7
mulss  %xmm11,%xmm7
addss  %xmm6,%xmm7
movslq %esi,%rdx
movss  (%rax,%rdx,4),%xmm6
mulss  %xmm12,%xmm6
addss  %xmm7,%xmm6
movss  %xmm6,-0x4(%r10,%rcx,4)
lea    (%r9,%rcx,1),%rdx
add    $0x1,%rdx
add    $0x1,%rcx
cmp    $0x1,%rdx
jne    1640 <gradient3Dx_float+0x520>
jmp    13c0 <gradient3Dx_float+0x2a0>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
mov    %rdi,%r11
mov    0x40(%rsp),%r12
imul   %r12,%r11
test   %edi,%edi
mov    0x48(%rsp),%r15
mov    0x28(%rsp),%r14
mov    0x50(%rsp),%r8
je     1ac0 <gradient3Dx_float+0x9a0>
cmp    $0x1,%edi
jne    1710 <gradient3Dx_float+0x5f0>
test   %r12d,%r12d
jle    1ac0 <gradient3Dx_float+0x9a0>
mov    0x34(%rsp),%ecx
imul   %r12d,%ecx
movslq %ecx,%r8
movslq 0x1c(%rsp),%r10
cmp    $0x8,%r12d
jae    1752 <gradient3Dx_float+0x632>
xor    %ebp,%ebp
jmp    195b <gradient3Dx_float+0x83b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %r12d,%r12d
jle    1ac0 <gradient3Dx_float+0x9a0>
mov    0x34(%rsp),%ecx
imul   %r12d,%ecx
mov    0x84(%rsp),%edx
imul   %r12d,%edx
movslq %edx,%r9
movslq %ecx,%r10
movslq 0x1c(%rsp),%rbp
cmp    $0x4,%r12d
mov    %r10,0x78(%rsp)
mov    %rbp,0x70(%rsp)
jae    1842 <gradient3Dx_float+0x722>
xor    %ebp,%ebp
jmp    1a62 <gradient3Dx_float+0x942>
mov    0x10(%rsp),%rbp
lea    0x0(,%r10,4),%rcx
add    %rbp,%rcx
mov    0x58(%rsp),%rdi
lea    (%rdi,%r10,4),%rdx
lea    (%rdi,%r8,4),%rdi
cmp    %r15,%rdx
seta   %r9b
mov    0xd0(%rsp),%rsi
cmp    %rsi,%rcx
setb   %dl
cmp    %r15,%rdi
seta   %cl
lea    0x0(,%r8,4),%rdi
add    %rbp,%rdi
cmp    %rsi,%rdi
setb   %dil
test   %dl,%r9b
jne    1954 <gradient3Dx_float+0x834>
mov    $0x0,%ebp
and    %dil,%cl
mov    0x8(%rsp),%rdi
jne    195b <gradient3Dx_float+0x83b>
mov    0x88(%rsp),%rdx
lea    (%rdx,%r8,4),%rcx
lea    (%rdx,%r10,4),%rbp
xor    %edx,%edx
mov    0x90(%rsp),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups -0x10(%rcx,%rdx,4),%xmm6
movups (%rcx,%rdx,4),%xmm7
movaps %xmm6,%xmm5
mulps  %xmm8,%xmm5
movaps %xmm7,%xmm2
mulps  %xmm8,%xmm2
mulps  %xmm9,%xmm6
addps  %xmm5,%xmm6
mulps  %xmm9,%xmm7
addps  %xmm2,%xmm7
movups -0x10(%rbp,%rdx,4),%xmm2
movups 0x0(%rbp,%rdx,4),%xmm5
mulps  %xmm9,%xmm2
addps  %xmm6,%xmm2
mulps  %xmm9,%xmm5
addps  %xmm7,%xmm5
movups %xmm2,(%r15,%rdx,4)
movups %xmm5,0x10(%r15,%rdx,4)
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    17e0 <gradient3Dx_float+0x6c0>
mov    %rsi,%rbp
cmp    %r14,%rsi
jne    195b <gradient3Dx_float+0x83b>
jmp    1ac0 <gradient3Dx_float+0x9a0>
mov    %r11,%rcx
sub    %r12,%rcx
mov    0xd8(%rsp),%rdx
add    %r11,%rdx
lea    (%r15,%rcx,4),%rsi
lea    (%r15,%rdx,4),%rdi
mov    0x10(%rsp),%r8
mov    %rbp,%rcx
lea    (%r8,%rbp,4),%r13
mov    0x58(%rsp),%rbp
lea    0x0(%rbp,%rcx,4),%rcx
lea    (%r8,%r10,4),%rdx
lea    0x0(,%r10,4),%r14
add    %rbp,%r14
lea    0x0(,%r9,4),%r12
add    %rbp,%r12
cmp    %rcx,%rsi
setb   %cl
cmp    %rdi,%r13
setb   %r15b
cmp    %r14,%rsi
setb   %bpl
cmp    %rdi,%rdx
setb   %r14b
cmp    %r12,%rsi
mov    %r9,0x20(%rsp)
lea    (%r8,%r9,4),%rsi
setb   %r12b
cmp    %rdi,%rsi
setb   %r9b
test   %r15b,%cl
jne    1a2f <gradient3Dx_float+0x90f>
and    %r14b,%bpl
mov    0x50(%rsp),%r8
mov    0x8(%rsp),%rdi
jne    1a4c <gradient3Dx_float+0x92c>
mov    $0x0,%ebp
and    %r9b,%r12b
mov    0x48(%rsp),%r15
mov    0x40(%rsp),%r12
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r9
jne    1a62 <gradient3Dx_float+0x942>
xor    %edi,%edi
mov    0xc8(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nop
movups (%rsi,%rdi,4),%xmm2
movups (%rdx,%rdi,4),%xmm5
mulps  %xmm8,%xmm5
mulps  %xmm9,%xmm2
addps  %xmm5,%xmm2
movups 0x0(%r13,%rdi,4),%xmm5
mulps  %xmm9,%xmm5
addps  %xmm2,%xmm5
movups %xmm5,(%r8,%rdi,4)
add    $0x4,%rdi
cmp    %rdi,%rcx
jne    1910 <gradient3Dx_float+0x7f0>
mov    %rcx,%rbp
cmp    %r14,%rcx
mov    0x8(%rsp),%rdi
jne    1a62 <gradient3Dx_float+0x942>
jmp    1ac0 <gradient3Dx_float+0x9a0>
xor    %ebp,%ebp
mov    0x8(%rsp),%rdi
mov    %rbp,%rcx
test   $0x1,%r14b
je     19a0 <gradient3Dx_float+0x880>
lea    (%r8,%rbp,1),%rcx
mov    0x10(%rsp),%rdx
movss  (%rdx,%rcx,4),%xmm2
movaps %xmm2,%xmm5
mulss  %xmm1,%xmm5
mulss  %xmm0,%xmm2
addss  %xmm5,%xmm2
lea    0x0(%rbp,%r10,1),%rcx
movss  (%rdx,%rcx,4),%xmm5
mulss  %xmm0,%xmm5
addss  %xmm2,%xmm5
movss  %xmm5,(%r15,%rbp,4)
mov    %rbp,%rcx
or     $0x1,%rcx
not    %rbp
cmp    0xa0(%rsp),%rbp
je     1ac0 <gradient3Dx_float+0x9a0>
mov    0x98(%rsp),%rdx
lea    (%rdx,%r10,4),%rsi
lea    (%rdx,%r8,4),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movss  -0x4(%rdx,%rcx,4),%xmm2
movaps %xmm2,%xmm5
mulss  %xmm1,%xmm5
mulss  %xmm0,%xmm2
addss  %xmm5,%xmm2
movss  -0x4(%rsi,%rcx,4),%xmm5
mulss  %xmm0,%xmm5
addss  %xmm2,%xmm5
movss  %xmm5,(%r15,%rcx,4)
movss  (%rdx,%rcx,4),%xmm2
movaps %xmm2,%xmm5
mulss  %xmm1,%xmm5
mulss  %xmm0,%xmm2
addss  %xmm5,%xmm2
movss  (%rsi,%rcx,4),%xmm5
mulss  %xmm0,%xmm5
addss  %xmm2,%xmm5
movss  %xmm5,0x4(%r15,%rcx,4)
add    $0x2,%rcx
cmp    %rcx,%r14
jne    19d0 <gradient3Dx_float+0x8b0>
jmp    1ac0 <gradient3Dx_float+0x9a0>
xor    %ebp,%ebp
mov    0x48(%rsp),%r15
mov    0x40(%rsp),%r12
mov    0x28(%rsp),%r14
mov    0x50(%rsp),%r8
mov    0x8(%rsp),%rdi
jmp    1a5d <gradient3Dx_float+0x93d>
xor    %ebp,%ebp
mov    0x48(%rsp),%r15
mov    0x40(%rsp),%r12
mov    0x28(%rsp),%r14
mov    0x20(%rsp),%r9
mov    0x10(%rsp),%rsi
mov    0x70(%rsp),%rcx
lea    (%rsi,%rcx,4),%rcx
mov    0x78(%rsp),%rdx
lea    (%rsi,%rdx,4),%rdx
lea    (%rsi,%r9,4),%rsi
nopl   (%rax)
movss  (%rdx,%rbp,4),%xmm2
mulss  %xmm1,%xmm2
movss  (%rsi,%rbp,4),%xmm5
mulss  %xmm0,%xmm5
addss  %xmm2,%xmm5
movss  (%rcx,%rbp,4),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm5,%xmm2
movss  %xmm2,(%r8,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1a80 <gradient3Dx_float+0x960>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    0xe8(%rsp),%rdi
setne  %cl
or     0x7(%rsp),%cl
mov    0x60(%rsp),%r10
mov    0x34(%rsp),%r13d
jne    12b0 <gradient3Dx_float+0x190>
mov    %r13d,%ecx
imul   %r12d,%ecx
movslq %ecx,%r8
movslq 0x1c(%rsp),%r9
cmp    $0x8,%r12d
jae    1b00 <gradient3Dx_float+0x9e0>
xor    %ebp,%ebp
jmp    1c10 <gradient3Dx_float+0xaf0>
nopl   0x0(%rax,%rax,1)
lea    (%r11,%r14,1),%rcx
lea    (%r15,%r11,4),%rdx
lea    (%r15,%rcx,4),%rdi
mov    0x10(%rsp),%rsi
lea    (%rsi,%r9,4),%r14
mov    0x58(%rsp),%rcx
lea    (%rcx,%r9,4),%rbp
lea    (%rsi,%r8,4),%r10
lea    (%rcx,%r8,4),%rsi
cmp    %rbp,%rdx
setb   %bpl
cmp    %rdi,%r14
setb   %r14b
cmp    %rsi,%rdx
setb   %cl
cmp    %rdi,%r10
setb   %dl
test   %r14b,%bpl
jne    1bf2 <gradient3Dx_float+0xad2>
mov    $0x0,%ebp
and    %dl,%cl
mov    0x28(%rsp),%r14
mov    0x60(%rsp),%r10
mov    0x8(%rsp),%rdi
jne    1c10 <gradient3Dx_float+0xaf0>
mov    0x88(%rsp),%rdx
lea    (%rdx,%r8,4),%rcx
lea    (%rdx,%r9,4),%rbp
xor    %edi,%edi
mov    0x90(%rsp),%rdx
mov    0xb8(%rsp),%rsi
nopw   0x0(%rax,%rax,1)
movups -0x10(%rcx,%rdi,4),%xmm2
movups (%rcx,%rdi,4),%xmm5
movups -0x10(%rbp,%rdi,4),%xmm6
movups 0x0(%rbp,%rdi,4),%xmm7
movaps %xmm6,%xmm3
mulps  %xmm8,%xmm3
movaps %xmm7,%xmm4
mulps  %xmm8,%xmm4
mulps  %xmm9,%xmm2
addps  %xmm3,%xmm2
mulps  %xmm9,%xmm5
addps  %xmm4,%xmm5
mulps  %xmm9,%xmm6
addps  %xmm2,%xmm6
mulps  %xmm9,%xmm7
addps  %xmm5,%xmm7
movups %xmm6,-0x10(%rsi,%rdi,4)
movups %xmm7,(%rsi,%rdi,4)
add    $0x8,%rdi
cmp    %rdi,%rdx
jne    1b90 <gradient3Dx_float+0xa70>
mov    %rdx,%rbp
cmp    %r14,%rdx
mov    0x8(%rsp),%rdi
je     12b0 <gradient3Dx_float+0x190>
jmp    1c10 <gradient3Dx_float+0xaf0>
xor    %ebp,%ebp
mov    0x28(%rsp),%r14
mov    0x60(%rsp),%r10
mov    0x8(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rcx
test   $0x1,%r14b
je     1c57 <gradient3Dx_float+0xb37>
lea    (%r8,%rbp,1),%rcx
lea    (%r9,%rbp,1),%rdx
mov    0x10(%rsp),%rsi
movss  (%rsi,%rdx,4),%xmm2
movaps %xmm2,%xmm3
mulss  %xmm1,%xmm3
movss  (%rsi,%rcx,4),%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm0,%xmm2
addss  %xmm4,%xmm2
add    %rbp,%r11
movss  %xmm2,(%r15,%r11,4)
mov    %rbp,%rcx
or     $0x1,%rcx
not    %rbp
cmp    0xa0(%rsp),%rbp
je     12b0 <gradient3Dx_float+0x190>
mov    0x98(%rsp),%rdx
lea    (%rdx,%r9,4),%rsi
lea    (%rdx,%r8,4),%rdx
nopl   0x0(%rax,%rax,1)
movss  -0x4(%rsi,%rcx,4),%xmm2
movaps %xmm2,%xmm3
mulss  %xmm1,%xmm3
movss  -0x4(%rdx,%rcx,4),%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm0,%xmm2
addss  %xmm4,%xmm2
movss  %xmm2,-0x4(%r10,%rcx,4)
movss  (%rsi,%rcx,4),%xmm2
movaps %xmm2,%xmm3
mulss  %xmm1,%xmm3
movss  (%rdx,%rcx,4),%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
mulss  %xmm0,%xmm2
addss  %xmm4,%xmm2
movss  %xmm2,(%r10,%rcx,4)
add    $0x2,%rcx
cmp    %rcx,%r14
jne    1c80 <gradient3Dx_float+0xb60>
jmp    12b0 <gradient3Dx_float+0x190>
mov    %rax,%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@__const.gradient3Dx_float.smoothfilter = [3 x float] [float 1.875000e-01, float 6.250000e-01, float 1.875000e-01]
@__const.gradient3Dx_float.derivafilter = [3 x float] [float -5.000000e-01, float 0.000000e+00, float 5.000000e-01]
define void @gradient3Dx_float(float* %0, i32* %1, float* %2) {
%4 = alloca float*
%5 = alloca i32*
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca float*
%19 = alloca float*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca [3 x float]
%27 = alloca [3 x float]
store float* %0, float** %4
store i32* %1, i32** %5
store float* %2, float** %6
store i32 0, i32* %23
store i32 0, i32* %24
store i32 0, i32* %25
%28 = bitcast [3 x float]* %26 to i8*
%29 = bitcast [3 x float]* %27 to i8*
%30 = load i32*, i32** %5
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = load i32, i32* %31
%33 = load i32*, i32** %5
%34 = getelementptr inbounds i32, i32* %33, i64 1
%35 = load i32, i32* %34
%36 = mul nsw i32 %32, %35
store i32 %36, i32* %20
%37 = load i32, i32* %20
%38 = mul nsw i32 4, %37
%39 = call float* @mallocf(i32 %38)
store float* %39, float** %19
%40 = load i32*, i32** %5
%41 = getelementptr inbounds i32, i32* %40, i64 0
%42 = load i32, i32* %41
%43 = call float* @mallocf(i32 %42)
store float* %43, float** %18
store i32 0, i32* %9
br label %44
44: ; preds = %436, %3
%45 = load i32, i32* %9
%46 = load i32*, i32** %5
%47 = getelementptr inbounds i32, i32* %46, i64 2
%48 = load i32, i32* %47
%49 = icmp slt i32 %45, %48
br i1 %49, label %50, label %439
50: ; preds = %44
%51 = load i32, i32* %20
%52 = load i32, i32* %9
%53 = mul nsw i32 %51, %52
store i32 %53, i32* %21
%54 = load i32, i32* %20
%55 = load i32, i32* %23
%56 = mul nsw i32 %54, %55
store i32 %56, i32* %22
store i32 0, i32* %8
br label %57
57: ; preds = %240, %50
%58 = load i32, i32* %8
%59 = load i32*, i32** %5
%60 = getelementptr inbounds i32, i32* %59, i64 1
%61 = load i32, i32* %60
%62 = icmp slt i32 %58, %61
br i1 %62, label %63, label %243
63: ; preds = %57
%64 = load i32, i32* %8
%65 = sub nsw i32 %64, 1
%66 = icmp sgt i32 %65, 0
br i1 %66, label %67, label %70
67: ; preds = %63
%68 = load i32, i32* %8
%69 = sub nsw i32 %68, 1
br label %71
70: ; preds = %63
br label %71
71: ; preds = %70, %67
%72 = phi i32 [ %69, %67 ], [ 0, %70 ]
store i32 %72, i32* %13
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
%75 = load i32*, i32** %5
%76 = getelementptr inbounds i32, i32* %75, i64 1
%77 = load i32, i32* %76
%78 = sub nsw i32 %77, 1
%79 = icmp slt i32 %74, %78
br i1 %79, label %80, label %83
80: ; preds = %71
%81 = load i32, i32* %8
%82 = add nsw i32 %81, 1
br label %88
83: ; preds = %71
%84 = load i32*, i32** %5
%85 = getelementptr inbounds i32, i32* %84, i64 1
%86 = load i32, i32* %85
%87 = sub nsw i32 %86, 1
br label %88
88: ; preds = %83, %80
%89 = phi i32 [ %82, %80 ], [ %87, %83 ]
store i32 %89, i32* %12
%90 = load i32, i32* %13
%91 = load i32*, i32** %5
%92 = getelementptr inbounds i32, i32* %91, i64 0
%93 = load i32, i32* %92
%94 = mul nsw i32 %90, %93
%95 = load i32, i32* %21
%96 = add nsw i32 %94, %95
store i32 %96, i32* %15
%97 = load i32, i32* %8
%98 = load i32*, i32** %5
%99 = getelementptr inbounds i32, i32* %98, i64 0
%100 = load i32, i32* %99
%101 = mul nsw i32 %97, %100
%102 = load i32, i32* %21
%103 = add nsw i32 %101, %102
store i32 %103, i32* %16
%104 = load i32, i32* %12
%105 = load i32*, i32** %5
%106 = getelementptr inbounds i32, i32* %105, i64 0
%107 = load i32, i32* %106
%108 = mul nsw i32 %104, %107
%109 = load i32, i32* %21
%110 = add nsw i32 %108, %109
store i32 %110, i32* %17
store i32 0, i32* %7
br label %111
111: ; preds = %162, %88
%112 = load i32, i32* %7
%113 = load i32*, i32** %5
%114 = getelementptr inbounds i32, i32* %113, i64 0
%115 = load i32, i32* %114
%116 = icmp slt i32 %112, %115
br i1 %116, label %117, label %165
117: ; preds = %111
%118 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 0
%119 = load float, float* %118
%120 = load float*, float** %4
%121 = load i32, i32* %15
%122 = load i32, i32* %7
%123 = add nsw i32 %121, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds float, float* %120, i64 %124
%126 = load float, float* %125
%127 = fmul float %119, %126
%128 = load float*, float** %18
%129 = load i32, i32* %7
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds float, float* %128, i64 %130
store float %127, float* %131
%132 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 1
%133 = load float, float* %132
%134 = load float*, float** %4
%135 = load i32, i32* %16
%136 = load i32, i32* %7
%137 = add nsw i32 %135, %136
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds float, float* %134, i64 %138
%140 = load float, float* %139
%141 = load float*, float** %18
%142 = load i32, i32* %7
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds float, float* %141, i64 %143
%145 = load float, float* %144
%146 = call float @llvm.fmuladd.f32(float %133, float %140, float %145)
store float %146, float* %144
%147 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 2
%148 = load float, float* %147
%149 = load float*, float** %4
%150 = load i32, i32* %17
%151 = load i32, i32* %7
%152 = add nsw i32 %150, %151
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds float, float* %149, i64 %153
%155 = load float, float* %154
%156 = load float*, float** %18
%157 = load i32, i32* %7
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds float, float* %156, i64 %158
%160 = load float, float* %159
%161 = call float @llvm.fmuladd.f32(float %148, float %155, float %160)
store float %161, float* %159
br label %162
162: ; preds = %117
%163 = load i32, i32* %7
%164 = add nsw i32 %163, 1
store i32 %164, i32* %7
br label %111
165: ; preds = %111
%166 = load i32, i32* %8
%167 = load i32*, i32** %5
%168 = getelementptr inbounds i32, i32* %167, i64 0
%169 = load i32, i32* %168
%170 = mul nsw i32 %166, %169
%171 = load i32, i32* %22
%172 = add nsw i32 %170, %171
store i32 %172, i32* %16
store i32 0, i32* %7
br label %173
173: ; preds = %236, %165
%174 = load i32, i32* %7
%175 = load i32*, i32** %5
%176 = getelementptr inbounds i32, i32* %175, i64 0
%177 = load i32, i32* %176
%178 = icmp slt i32 %174, %177
br i1 %178, label %179, label %239
179: ; preds = %173
%180 = load i32, i32* %7
%181 = sub nsw i32 %180, 1
%182 = icmp sgt i32 %181, 0
br i1 %182, label %183, label %186
183: ; preds = %179
%184 = load i32, i32* %7
%185 = sub nsw i32 %184, 1
br label %187
186: ; preds = %179
br label %187
187: ; preds = %186, %183
%188 = phi i32 [ %185, %183 ], [ 0, %186 ]
store i32 %188, i32* %11
%189 = load i32, i32* %7
%190 = add nsw i32 %189, 1
%191 = load i32*, i32** %5
%192 = getelementptr inbounds i32, i32* %191, i64 0
%193 = load i32, i32* %192
%194 = sub nsw i32 %193, 1
%195 = icmp slt i32 %190, %194
br i1 %195, label %196, label %199
196: ; preds = %187
%197 = load i32, i32* %7
%198 = add nsw i32 %197, 1
br label %204
199: ; preds = %187
%200 = load i32*, i32** %5
%201 = getelementptr inbounds i32, i32* %200, i64 0
%202 = load i32, i32* %201
%203 = sub nsw i32 %202, 1
br label %204
204: ; preds = %199, %196
%205 = phi i32 [ %198, %196 ], [ %203, %199 ]
store i32 %205, i32* %10
%206 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 0, i64 0
%207 = load float, float* %206
%208 = load float*, float** %18
%209 = load i32, i32* %11
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds float, float* %208, i64 %210
%212 = load float, float* %211
%213 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 0, i64 1
%214 = load float, float* %213
%215 = load float*, float** %18
%216 = load i32, i32* %7
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds float, float* %215, i64 %217
%219 = load float, float* %218
%220 = fmul float %214, %219
%221 = call float @llvm.fmuladd.f32(float %207, float %212, float %220)
%222 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 0, i64 2
%223 = load float, float* %222
%224 = load float*, float** %18
%225 = load i32, i32* %10
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds float, float* %224, i64 %226
%228 = load float, float* %227
%229 = call float @llvm.fmuladd.f32(float %223, float %228, float %221)
%230 = load float*, float** %19
%231 = load i32, i32* %16
%232 = load i32, i32* %7
%233 = add nsw i32 %231, %232
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds float, float* %230, i64 %234
store float %229, float* %235
br label %236
236: ; preds = %204
%237 = load i32, i32* %7
%238 = add nsw i32 %237, 1
store i32 %238, i32* %7
br label %173
239: ; preds = %173
br label %240
240: ; preds = %239
%241 = load i32, i32* %8
%242 = add nsw i32 %241, 1
store i32 %242, i32* %8
br label %57
243: ; preds = %57
%244 = load i32, i32* %9
%245 = icmp eq i32 %244, 1
br i1 %245, label %246, label %299
246: ; preds = %243
%247 = load i32, i32* %24
%248 = load i32, i32* %20
%249 = mul nsw i32 %247, %248
store i32 %249, i32* %15
%250 = load i32, i32* %24
%251 = load i32, i32* %20
%252 = mul nsw i32 %250, %251
store i32 %252, i32* %16
%253 = load i32, i32* %23
%254 = load i32, i32* %20
%255 = mul nsw i32 %253, %254
store i32 %255, i32* %17
store i32 0, i32* %14
br label %256
256: ; preds = %295, %246
%257 = load i32, i32* %14
%258 = load i32, i32* %20
%259 = icmp slt i32 %257, %258
br i1 %259, label %260, label %298
260: ; preds = %256
%261 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 0
%262 = load float, float* %261
%263 = load float*, float** %19
%264 = load i32, i32* %14
%265 = load i32, i32* %15
%266 = add nsw i32 %264, %265
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds float, float* %263, i64 %267
%269 = load float, float* %268
%270 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 1
%271 = load float, float* %270
%272 = load float*, float** %19
%273 = load i32, i32* %14
%274 = load i32, i32* %16
%275 = add nsw i32 %273, %274
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds float, float* %272, i64 %276
%278 = load float, float* %277
%279 = fmul float %271, %278
%280 = call float @llvm.fmuladd.f32(float %262, float %269, float %279)
%281 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 2
%282 = load float, float* %281
%283 = load float*, float** %19
%284 = load i32, i32* %14
%285 = load i32, i32* %17
%286 = add nsw i32 %284, %285
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds float, float* %283, i64 %287
%289 = load float, float* %288
%290 = call float @llvm.fmuladd.f32(float %282, float %289, float %280)
%291 = load float*, float** %6
%292 = load i32, i32* %14
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds float, float* %291, i64 %293
store float %290, float* %294
br label %295
295: ; preds = %260
%296 = load i32, i32* %14
%297 = add nsw i32 %296, 1
store i32 %297, i32* %14
br label %256
298: ; preds = %256
br label %362
299: ; preds = %243
%300 = load i32, i32* %9
%301 = icmp sgt i32 %300, 1
br i1 %301, label %302, label %361
302: ; preds = %299
%303 = load i32, i32* %25
%304 = load i32, i32* %20
%305 = mul nsw i32 %303, %304
store i32 %305, i32* %15
%306 = load i32, i32* %24
%307 = load i32, i32* %20
%308 = mul nsw i32 %306, %307
store i32 %308, i32* %16
%309 = load i32, i32* %23
%310 = load i32, i32* %20
%311 = mul nsw i32 %309, %310
store i32 %311, i32* %17
%312 = load i32, i32* %20
%313 = load i32, i32* %9
%314 = sub nsw i32 %313, 1
%315 = mul nsw i32 %312, %314
store i32 %315, i32* %21
store i32 0, i32* %14
br label %316
316: ; preds = %357, %302
%317 = load i32, i32* %14
%318 = load i32, i32* %20
%319 = icmp slt i32 %317, %318
br i1 %319, label %320, label %360
320: ; preds = %316
%321 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 0
%322 = load float, float* %321
%323 = load float*, float** %19
%324 = load i32, i32* %14
%325 = load i32, i32* %15
%326 = add nsw i32 %324, %325
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds float, float* %323, i64 %327
%329 = load float, float* %328
%330 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 1
%331 = load float, float* %330
%332 = load float*, float** %19
%333 = load i32, i32* %14
%334 = load i32, i32* %16
%335 = add nsw i32 %333, %334
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds float, float* %332, i64 %336
%338 = load float, float* %337
%339 = fmul float %331, %338
%340 = call float @llvm.fmuladd.f32(float %322, float %329, float %339)
%341 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 2
%342 = load float, float* %341
%343 = load float*, float** %19
%344 = load i32, i32* %14
%345 = load i32, i32* %17
%346 = add nsw i32 %344, %345
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds float, float* %343, i64 %347
%349 = load float, float* %348
%350 = call float @llvm.fmuladd.f32(float %342, float %349, float %340)
%351 = load float*, float** %6
%352 = load i32, i32* %21
%353 = load i32, i32* %14
%354 = add nsw i32 %352, %353
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds float, float* %351, i64 %355
store float %350, float* %356
br label %357
357: ; preds = %320
%358 = load i32, i32* %14
%359 = add nsw i32 %358, 1
store i32 %359, i32* %14
br label %316
360: ; preds = %316
br label %361
361: ; preds = %360, %299
br label %362
362: ; preds = %361, %298
%363 = load i32, i32* %9
%364 = load i32*, i32** %5
%365 = getelementptr inbounds i32, i32* %364, i64 2
%366 = load i32, i32* %365
%367 = sub nsw i32 %366, 1
%368 = icmp eq i32 %363, %367
br i1 %368, label %369, label %427
369: ; preds = %362
%370 = load i32, i32* %24
%371 = load i32, i32* %20
%372 = mul nsw i32 %370, %371
store i32 %372, i32* %15
%373 = load i32, i32* %23
%374 = load i32, i32* %20
%375 = mul nsw i32 %373, %374
store i32 %375, i32* %16
%376 = load i32, i32* %23
%377 = load i32, i32* %20
%378 = mul nsw i32 %376, %377
store i32 %378, i32* %17
%379 = load i32, i32* %20
%380 = load i32, i32* %9
%381 = mul nsw i32 %379, %380
store i32 %381, i32* %21
store i32 0, i32* %14
br label %382
382: ; preds = %423, %369
%383 = load i32, i32* %14
%384 = load i32, i32* %20
%385 = icmp slt i32 %383, %384
br i1 %385, label %386, label %426
386: ; preds = %382
%387 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 0
%388 = load float, float* %387
%389 = load float*, float** %19
%390 = load i32, i32* %14
%391 = load i32, i32* %15
%392 = add nsw i32 %390, %391
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds float, float* %389, i64 %393
%395 = load float, float* %394
%396 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 1
%397 = load float, float* %396
%398 = load float*, float** %19
%399 = load i32, i32* %14
%400 = load i32, i32* %16
%401 = add nsw i32 %399, %400
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds float, float* %398, i64 %402
%404 = load float, float* %403
%405 = fmul float %397, %404
%406 = call float @llvm.fmuladd.f32(float %388, float %395, float %405)
%407 = getelementptr inbounds [3 x float], [3 x float]* %26, i64 0, i64 2
%408 = load float, float* %407
%409 = load float*, float** %19
%410 = load i32, i32* %14
%411 = load i32, i32* %17
%412 = add nsw i32 %410, %411
%413 = sext i32 %412 to i64
%414 = getelementptr inbounds float, float* %409, i64 %413
%415 = load float, float* %414
%416 = call float @llvm.fmuladd.f32(float %408, float %415, float %406)
%417 = load float*, float** %6
%418 = load i32, i32* %21
%419 = load i32, i32* %14
%420 = add nsw i32 %418, %419
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds float, float* %417, i64 %421
store float %416, float* %422
br label %423
423: ; preds = %386
%424 = load i32, i32* %14
%425 = add nsw i32 %424, 1
store i32 %425, i32* %14
br label %382
426: ; preds = %382
br label %427
427: ; preds = %426, %362
%428 = load i32, i32* %24
store i32 %428, i32* %25
%429 = load i32, i32* %23
store i32 %429, i32* %24
%430 = load i32, i32* %23
%431 = add nsw i32 %430, 1
store i32 %431, i32* %23
%432 = load i32, i32* %23
%433 = icmp sgt i32 %432, 3
br i1 %433, label %434, label %435
434: ; preds = %427
store i32 0, i32* %23
br label %435
435: ; preds = %434, %427
br label %436
436: ; preds = %435
%437 = load i32, i32* %9
%438 = add nsw i32 %437, 1
store i32 %438, i32* %9
br label %44
439: ; preds = %44
%440 = load float*, float** %18
%441 = call i32 @free(float* %440)
%442 = load float*, float** %19
%443 = call i32 @free(float* %442)
ret void
}

LLVM IR (-O2):
define void @gradient3Dx_float(float* nocapture %0, i32* nocapture %1, float* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, %4
%8 = shl nsw i32 %7, 2
%9 = tail call float* @mallocf(i32 %8)
%10 = load i32, i32* %1
%11 = tail call float* @mallocf(i32 %10)
%12 = getelementptr inbounds i32, i32* %1, i64 2
%13 = load i32, i32* %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %507
15: ; preds = %3
%16 = load i32, i32* %5
%17 = icmp sgt i32 %16, 0
%18 = add nsw i32 %16, -1
%19 = icmp sgt i32 %7, 0
%20 = add nsw i32 %13, -1
%21 = sext i32 %18 to i64
%22 = sext i32 %7 to i64
%23 = zext i32 %20 to i64
%24 = zext i32 %13 to i64
%25 = zext i32 %16 to i64
%26 = zext i32 %7 to i64
%27 = zext i32 %7 to i64
%28 = zext i32 %7 to i64
%29 = getelementptr float, float* %9, i64 %26
%30 = getelementptr float, float* %9, i64 %26
%31 = sub nsw i64 %26, %22
%32 = getelementptr float, float* %9, i64 %26
%33 = getelementptr float, float* %9, i64 %26
%34 = getelementptr float, float* %9, i64 %26
%35 = getelementptr float, float* %2, i64 %26
%36 = getelementptr float, float* %9, i64 %26
%37 = getelementptr float, float* %9, i64 %26
%38 = icmp ult i32 %7, 8
%39 = and i64 %26, 4294967288
%40 = icmp eq i64 %39, %26
%41 = and i64 %26, 1
%42 = icmp eq i64 %41, 0
%43 = sub nsw i64 0, %26
%44 = icmp ult i32 %7, 4
%45 = and i64 %26, 4294967292
%46 = icmp eq i64 %45, %26
%47 = xor i1 %19, true
%48 = icmp ult i32 %7, 8
%49 = and i64 %26, 4294967288
%50 = icmp eq i64 %49, %26
%51 = and i64 %26, 1
%52 = icmp eq i64 %51, 0
%53 = sub nsw i64 0, %26
br label %54
54: ; preds = %15, %501
%55 = phi i64 [ 0, %15 ], [ %505, %501 ]
%56 = phi i32 [ 0, %15 ], [ %57, %501 ]
%57 = phi i32 [ 0, %15 ], [ %58, %501 ]
%58 = phi i32 [ 0, %15 ], [ %504, %501 ]
%59 = mul i64 %55, %26
%60 = trunc i64 %59 to i32
%61 = mul i64 %55, %26
%62 = trunc i64 %61 to i32
%63 = mul i64 %55, %22
%64 = sub i64 %63, %22
%65 = getelementptr float, float* %2, i64 %64
%66 = add i64 %31, %63
%67 = getelementptr float, float* %2, i64 %66
%68 = mul i64 %55, %22
%69 = getelementptr float, float* %2, i64 %68
%70 = add i64 %68, %26
%71 = getelementptr float, float* %2, i64 %70
%72 = mul nsw i64 %55, %22
%73 = mul nsw i32 %58, %7
br i1 %17, label %74, label %245
74: ; preds = %54
%75 = load i32, i32* %1
%76 = icmp sgt i32 %75, 0
%77 = add nsw i32 %75, -1
%78 = sext i32 %77 to i64
%79 = sext i32 %75 to i64
%80 = sext i32 %73 to i64
%81 = zext i32 %75 to i64
%82 = trunc i64 %72 to i32
%83 = zext i32 %75 to i64
%84 = add nsw i64 %81, -1
%85 = getelementptr float, float* %11, i64 %81
%86 = getelementptr float, float* %0, i64 %81
%87 = getelementptr float, float* %0, i64 %81
%88 = getelementptr float, float* %0, i64 %81
%89 = icmp ult i32 %75, 4
%90 = trunc i64 %84 to i32
%91 = icmp ugt i64 %84, 4294967295
%92 = trunc i64 %84 to i32
%93 = icmp ugt i64 %84, 4294967295
%94 = trunc i64 %84 to i32
%95 = icmp ugt i64 %84, 4294967295
%96 = and i64 %81, 4294967292
%97 = icmp eq i64 %96, %81
br label %100
98: ; preds = %221, %100, %219
%99 = icmp eq i64 %128, %25
br i1 %99, label %245, label %100
100: ; preds = %74, %98
%101 = phi i64 [ 0, %74 ], [ %128, %98 ]
%102 = mul i64 %101, %81
%103 = add i64 %59, %102
%104 = shl i64 %103, 32
%105 = ashr exact i64 %104, 32
%106 = getelementptr float, float* %0, i64 %105
%107 = getelementptr float, float* %87, i64 %105
%108 = call i64 @llvm.umax.i64(i64 %101, i64 1)
%109 = trunc i64 %108 to i32
%110 = add nsw i32 %109, -1
%111 = mul i32 %75, %110
%112 = add i32 %111, %60
%113 = sext i32 %112 to i64
%114 = getelementptr float, float* %0, i64 %113
%115 = getelementptr float, float* %88, i64 %113
%116 = call i64 @llvm.umax.i64(i64 %101, i64 1)
%117 = trunc i64 %116 to i32
%118 = add nsw i32 %117, -1
%119 = mul i32 %75, %118
%120 = add i32 %119, %62
%121 = mul i64 %101, %81
%122 = add i64 %61, %121
%123 = trunc i64 %122 to i32
%124 = icmp ugt i64 %101, 1
%125 = select i1 %124, i64 %101, i64 1
%126 = trunc i64 %125 to i32
%127 = add nsw i32 %126, -1
%128 = add nuw nsw i64 %101, 1
%129 = icmp slt i64 %128, %21
%130 = trunc i64 %128 to i32
%131 = select i1 %129, i32 %130, i32 %18
%132 = mul nsw i32 %75, %127
%133 = mul nsw i64 %101, %79
%134 = mul i32 %75, %131
br i1 %76, label %135, label %98
135: ; preds = %100
%136 = trunc i64 %133 to i32
br i1 %89, label %195, label %137
137: ; preds = %135
%138 = add i32 %120, %90
%139 = icmp slt i32 %138, %120
%140 = or i1 %139, %91
%141 = add i32 %123, %92
%142 = icmp slt i32 %141, %123
%143 = or i1 %142, %93
%144 = add i32 %134, %62
%145 = add i32 %144, %94
%146 = icmp slt i32 %145, %144
%147 = or i1 %146, %95
%148 = or i1 %140, %143
%149 = or i1 %148, %147
br i1 %149, label %195, label %150
150: ; preds = %137
%151 = add i32 %134, %60
%152 = sext i32 %151 to i64
%153 = getelementptr float, float* %0, i64 %152
%154 = getelementptr float, float* %86, i64 %152
%155 = icmp ult float* %11, %154
%156 = icmp ult float* %153, %85
%157 = and i1 %155, %156
%158 = icmp ult float* %11, %107
%159 = icmp ult float* %106, %85
%160 = and i1 %158, %159
%161 = or i1 %157, %160
%162 = icmp ult float* %11, %115
%163 = icmp ult float* %114, %85
%164 = and i1 %162, %163
%165 = or i1 %161, %164
br i1 %165, label %195, label %166
166: ; preds = %150, %166
%167 = phi i64 [ %192, %166 ], [ 0, %150 ]
%168 = trunc i64 %167 to i32
%169 = add i32 %168, %82
%170 = add i32 %169, %132
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds float, float* %0, i64 %171
%173 = bitcast float* %172 to <4 x float>*
%174 = load <4 x float>, <4 x float>* %173
%175 = fmul <4 x float> %174, <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>
%176 = getelementptr inbounds float, float* %11, i64 %167
%177 = bitcast float* %176 to <4 x float>*
store <4 x float> %175, <4 x float>* %177
%178 = add i32 %169, %136
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds float, float* %0, i64 %179
%181 = bitcast float* %180 to <4 x float>*
%182 = load <4 x float>, <4 x float>* %181
%183 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %182, <4 x float> <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>, <4 x float> %175)
%184 = bitcast float* %176 to <4 x float>*
store <4 x float> %183, <4 x float>* %184
%185 = add i32 %169, %134
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds float, float* %0, i64 %186
%188 = bitcast float* %187 to <4 x float>*
%189 = load <4 x float>, <4 x float>* %188
%190 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %189, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %183)
%191 = bitcast float* %176 to <4 x float>*
store <4 x float> %190, <4 x float>* %191
%192 = add nuw i64 %167, 4
%193 = icmp eq i64 %192, %96
br i1 %193, label %194, label %166
194: ; preds = %166
br i1 %97, label %219, label %195
195: ; preds = %150, %137, %135, %194
%196 = phi i64 [ 0, %150 ], [ 0, %137 ], [ 0, %135 ], [ %96, %194 ]
br label %197
197: ; preds = %195, %197
%198 = phi i64 [ %217, %197 ], [ %196, %195 ]
%199 = trunc i64 %198 to i32
%200 = add i32 %199, %82
%201 = add i32 %200, %132
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds float, float* %0, i64 %202
%204 = load float, float* %203
%205 = fmul float %204, 1.875000e-01
%206 = getelementptr inbounds float, float* %11, i64 %198
store float %205, float* %206
%207 = add i32 %200, %136
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds float, float* %0, i64 %208
%210 = load float, float* %209
%211 = tail call float @llvm.fmuladd.f32(float %210, float 6.250000e-01, float %205)
store float %211, float* %206
%212 = add i32 %200, %134
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds float, float* %0, i64 %213
%215 = load float, float* %214
%216 = tail call float @llvm.fmuladd.f32(float %215, float 1.875000e-01, float %211)
store float %216, float* %206
%217 = add nuw nsw i64 %198, 1
%218 = icmp eq i64 %217, %81
br i1 %218, label %219, label %197
219: ; preds = %197, %194
%220 = add nsw i64 %133, %80
br i1 %76, label %221, label %98
221: ; preds = %219, %221
%222 = phi i64 [ %225, %221 ], [ 0, %219 ]
%223 = icmp ugt i64 %222, 1
%224 = select i1 %223, i64 %222, i64 1
%225 = add nuw nsw i64 %222, 1
%226 = icmp slt i64 %225, %78
%227 = trunc i64 %225 to i32
%228 = select i1 %226, i32 %227, i32 %77
%229 = shl i64 %224, 32
%230 = add i64 %229, -4294967296
%231 = ashr exact i64 %230, 32
%232 = getelementptr inbounds float, float* %11, i64 %231
%233 = load float, float* %232
%234 = getelementptr inbounds float, float* %11, i64 %222
%235 = load float, float* %234
%236 = fmul float %235, 0.000000e+00
%237 = tail call float @llvm.fmuladd.f32(float %233, float -5.000000e-01, float %236)
%238 = sext i32 %228 to i64
%239 = getelementptr inbounds float, float* %11, i64 %238
%240 = load float, float* %239
%241 = tail call float @llvm.fmuladd.f32(float %240, float 5.000000e-01, float %237)
%242 = add nsw i64 %220, %222
%243 = getelementptr inbounds float, float* %9, i64 %242
store float %241, float* %243
%244 = icmp eq i64 %225, %83
br i1 %244, label %98, label %221
245: ; preds = %98, %54
%246 = trunc i64 %55 to i32
switch i32 %246, label %336 [
i32 1, label %247
i32 0, label %406
]
247: ; preds = %245
br i1 %19, label %248, label %406
248: ; preds = %247
%249 = mul nsw i32 %57, %7
%250 = sext i32 %249 to i64
%251 = sext i32 %73 to i64
br i1 %38, label %293, label %252
252: ; preds = %248
%253 = getelementptr float, float* %9, i64 %251
%254 = getelementptr float, float* %36, i64 %251
%255 = getelementptr float, float* %9, i64 %250
%256 = getelementptr float, float* %37, i64 %250
%257 = icmp ugt float* %254, %2
%258 = icmp ult float* %253, %35
%259 = and i1 %257, %258
%260 = icmp ugt float* %256, %2
%261 = icmp ult float* %255, %35
%262 = and i1 %260, %261
%263 = or i1 %259, %262
br i1 %263, label %293, label %264
264: ; preds = %252, %264
%265 = phi i64 [ %290, %264 ], [ 0, %252 ]
%266 = add nsw i64 %265, %250
%267 = getelementptr inbounds float, float* %9, i64 %266
%268 = bitcast float* %267 to <4 x float>*
%269 = load <4 x float>, <4 x float>* %268
%270 = getelementptr inbounds float, float* %267, i64 4
%271 = bitcast float* %270 to <4 x float>*
%272 = load <4 x float>, <4 x float>* %271
%273 = fmul <4 x float> %269, <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>
%274 = fmul <4 x float> %272, <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>
%275 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %269, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %273)
%276 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %272, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %274)
%277 = add nsw i64 %265, %251
%278 = getelementptr inbounds float, float* %9, i64 %277
%279 = bitcast float* %278 to <4 x float>*
%280 = load <4 x float>, <4 x float>* %279
%281 = getelementptr inbounds float, float* %278, i64 4
%282 = bitcast float* %281 to <4 x float>*
%283 = load <4 x float>, <4 x float>* %282
%284 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %280, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %275)
%285 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %283, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %276)
%286 = getelementptr inbounds float, float* %2, i64 %265
%287 = bitcast float* %286 to <4 x float>*
store <4 x float> %284, <4 x float>* %287
%288 = getelementptr inbounds float, float* %286, i64 4
%289 = bitcast float* %288 to <4 x float>*
store <4 x float> %285, <4 x float>* %289
%290 = add nuw i64 %265, 8
%291 = icmp eq i64 %290, %39
br i1 %291, label %292, label %264
292: ; preds = %264
br i1 %40, label %406, label %293
293: ; preds = %252, %248, %292
%294 = phi i64 [ 0, %252 ], [ 0, %248 ], [ %39, %292 ]
%295 = xor i64 %294, -1
br i1 %42, label %308, label %296
296: ; preds = %293
%297 = add nsw i64 %294, %250
%298 = getelementptr inbounds float, float* %9, i64 %297
%299 = load float, float* %298
%300 = fmul float %299, 6.250000e-01
%301 = tail call float @llvm.fmuladd.f32(float %299, float 1.875000e-01, float %300)
%302 = add nsw i64 %294, %251
%303 = getelementptr inbounds float, float* %9, i64 %302
%304 = load float, float* %303
%305 = tail call float @llvm.fmuladd.f32(float %304, float 1.875000e-01, float %301)
%306 = getelementptr inbounds float, float* %2, i64 %294
store float %305, float* %306
%307 = or i64 %294, 1
br label %308
308: ; preds = %296, %293
%309 = phi i64 [ %294, %293 ], [ %307, %296 ]
%310 = icmp eq i64 %295, %43
br i1 %310, label %406, label %311
311: ; preds = %308, %311
%312 = phi i64 [ %334, %311 ], [ %309, %308 ]
%313 = add nsw i64 %312, %250
%314 = getelementptr inbounds float, float* %9, i64 %313
%315 = load float, float* %314
%316 = fmul float %315, 6.250000e-01
%317 = tail call float @llvm.fmuladd.f32(float %315, float 1.875000e-01, float %316)
%318 = add nsw i64 %312, %251
%319 = getelementptr inbounds float, float* %9, i64 %318
%320 = load float, float* %319
%321 = tail call float @llvm.fmuladd.f32(float %320, float 1.875000e-01, float %317)
%322 = getelementptr inbounds float, float* %2, i64 %312
store float %321, float* %322
%323 = add nuw nsw i64 %312, 1
%324 = add nsw i64 %323, %250
%325 = getelementptr inbounds float, float* %9, i64 %324
%326 = load float, float* %325
%327 = fmul float %326, 6.250000e-01
%328 = tail call float @llvm.fmuladd.f32(float %326, float 1.875000e-01, float %327)
%329 = add nsw i64 %323, %251
%330 = getelementptr inbounds float, float* %9, i64 %329
%331 = load float, float* %330
%332 = tail call float @llvm.fmuladd.f32(float %331, float 1.875000e-01, float %328)
%333 = getelementptr inbounds float, float* %2, i64 %323
store float %332, float* %333
%334 = add nuw nsw i64 %312, 2
%335 = icmp eq i64 %334, %26
br i1 %335, label %406, label %311
336: ; preds = %245
%337 = add nsw i64 %55, -1
%338 = mul nsw i64 %337, %22
br i1 %19, label %339, label %406
339: ; preds = %336
%340 = mul nsw i32 %57, %7
%341 = mul nsw i32 %56, %7
%342 = sext i32 %341 to i64
%343 = sext i32 %340 to i64
%344 = sext i32 %73 to i64
br i1 %44, label %386, label %345
345: ; preds = %339
%346 = getelementptr float, float* %9, i64 %344
%347 = getelementptr float, float* %32, i64 %344
%348 = getelementptr float, float* %9, i64 %343
%349 = getelementptr float, float* %33, i64 %343
%350 = getelementptr float, float* %9, i64 %342
%351 = getelementptr float, float* %34, i64 %342
%352 = icmp ult float* %65, %347
%353 = icmp ult float* %346, %67
%354 = and i1 %352, %353
%355 = icmp ult float* %65, %349
%356 = icmp ult float* %348, %67
%357 = and i1 %355, %356
%358 = or i1 %354, %357
%359 = icmp ult float* %65, %351
%360 = icmp ult float* %350, %67
%361 = and i1 %359, %360
%362 = or i1 %358, %361
br i1 %362, label %386, label %363
363: ; preds = %345, %363
%364 = phi i64 [ %383, %363 ], [ 0, %345 ]
%365 = add nsw i64 %364, %342
%366 = getelementptr inbounds float, float* %9, i64 %365
%367 = bitcast float* %366 to <4 x float>*
%368 = load <4 x float>, <4 x float>* %367
%369 = add nsw i64 %364, %343
%370 = getelementptr inbounds float, float* %9, i64 %369
%371 = bitcast float* %370 to <4 x float>*
%372 = load <4 x float>, <4 x float>* %371
%373 = fmul <4 x float> %372, <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>
%374 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %368, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %373)
%375 = add nsw i64 %364, %344
%376 = getelementptr inbounds float, float* %9, i64 %375
%377 = bitcast float* %376 to <4 x float>*
%378 = load <4 x float>, <4 x float>* %377
%379 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %378, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %374)
%380 = add nsw i64 %364, %338
%381 = getelementptr inbounds float, float* %2, i64 %380
%382 = bitcast float* %381 to <4 x float>*
store <4 x float> %379, <4 x float>* %382
%383 = add nuw i64 %364, 4
%384 = icmp eq i64 %383, %45
br i1 %384, label %385, label %363
385: ; preds = %363
br i1 %46, label %406, label %386
386: ; preds = %345, %339, %385
%387 = phi i64 [ 0, %345 ], [ 0, %339 ], [ %45, %385 ]
br label %388
388: ; preds = %386, %388
%389 = phi i64 [ %404, %388 ], [ %387, %386 ]
%390 = add nsw i64 %389, %342
%391 = getelementptr inbounds float, float* %9, i64 %390
%392 = load float, float* %391
%393 = add nsw i64 %389, %343
%394 = getelementptr inbounds float, float* %9, i64 %393
%395 = load float, float* %394
%396 = fmul float %395, 6.250000e-01
%397 = tail call float @llvm.fmuladd.f32(float %392, float 1.875000e-01, float %396)
%398 = add nsw i64 %389, %344
%399 = getelementptr inbounds float, float* %9, i64 %398
%400 = load float, float* %399
%401 = tail call float @llvm.fmuladd.f32(float %400, float 1.875000e-01, float %397)
%402 = add nsw i64 %389, %338
%403 = getelementptr inbounds float, float* %2, i64 %402
store float %401, float* %403
%404 = add nuw nsw i64 %389, 1
%405 = icmp eq i64 %404, %27
br i1 %405, label %406, label %388
406: ; preds = %308, %311, %388, %292, %385, %247, %336, %245
%407 = icmp ne i64 %55, %23
%408 = select i1 %407, i1 true, i1 %47
br i1 %408, label %501, label %409
409: ; preds = %406
%410 = mul nsw i32 %57, %7
%411 = sext i32 %410 to i64
%412 = sext i32 %73 to i64
br i1 %48, label %455, label %413
413: ; preds = %409
%414 = getelementptr float, float* %9, i64 %412
%415 = getelementptr float, float* %29, i64 %412
%416 = getelementptr float, float* %9, i64 %411
%417 = getelementptr float, float* %30, i64 %411
%418 = icmp ult float* %69, %415
%419 = icmp ult float* %414, %71
%420 = and i1 %418, %419
%421 = icmp ult float* %69, %417
%422 = icmp ult float* %416, %71
%423 = and i1 %421, %422
%424 = or i1 %420, %423
br i1 %424, label %455, label %425
425: ; preds = %413, %425
%426 = phi i64 [ %452, %425 ], [ 0, %413 ]
%427 = add nsw i64 %426, %411
%428 = getelementptr inbounds float, float* %9, i64 %427
%429 = bitcast float* %428 to <4 x float>*
%430 = load <4 x float>, <4 x float>* %429
%431 = getelementptr inbounds float, float* %428, i64 4
%432 = bitcast float* %431 to <4 x float>*
%433 = load <4 x float>, <4 x float>* %432
%434 = add nsw i64 %426, %412
%435 = getelementptr inbounds float, float* %9, i64 %434
%436 = bitcast float* %435 to <4 x float>*
%437 = load <4 x float>, <4 x float>* %436
%438 = getelementptr inbounds float, float* %435, i64 4
%439 = bitcast float* %438 to <4 x float>*
%440 = load <4 x float>, <4 x float>* %439
%441 = fmul <4 x float> %437, <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>
%442 = fmul <4 x float> %440, <float 6.250000e-01, float 6.250000e-01, float 6.250000e-01, float 6.250000e-01>
%443 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %430, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %441)
%444 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %433, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %442)
%445 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %437, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %443)
%446 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %440, <4 x float> <float 1.875000e-01, float 1.875000e-01, float 1.875000e-01, float 1.875000e-01>, <4 x float> %444)
%447 = add nsw i64 %426, %72
%448 = getelementptr inbounds float, float* %2, i64 %447
%449 = bitcast float* %448 to <4 x float>*
store <4 x float> %445, <4 x float>* %449
%450 = getelementptr inbounds float, float* %448, i64 4
%451 = bitcast float* %450 to <4 x float>*
store <4 x float> %446, <4 x float>* %451
%452 = add nuw i64 %426, 8
%453 = icmp eq i64 %452, %49
br i1 %453, label %454, label %425
454: ; preds = %425
br i1 %50, label %501, label %455
455: ; preds = %413, %409, %454
%456 = phi i64 [ 0, %413 ], [ 0, %409 ], [ %49, %454 ]
%457 = xor i64 %456, -1
br i1 %52, label %471, label %458
458: ; preds = %455
%459 = add nsw i64 %456, %411
%460 = getelementptr inbounds float, float* %9, i64 %459
%461 = load float, float* %460
%462 = add nsw i64 %456, %412
%463 = getelementptr inbounds float, float* %9, i64 %462
%464 = load float, float* %463
%465 = fmul float %464, 6.250000e-01
%466 = tail call float @llvm.fmuladd.f32(float %461, float 1.875000e-01, float %465)
%467 = tail call float @llvm.fmuladd.f32(float %464, float 1.875000e-01, float %466)
%468 = add nsw i64 %456, %72
%469 = getelementptr inbounds float, float* %2, i64 %468
store float %467, float* %469
%470 = or i64 %456, 1
br label %471
471: ; preds = %458, %455
%472 = phi i64 [ %456, %455 ], [ %470, %458 ]
%473 = icmp eq i64 %457, %53
br i1 %473, label %501, label %474
474: ; preds = %471, %474
%475 = phi i64 [ %499, %474 ], [ %472, %471 ]
%476 = add nsw i64 %475, %411
%477 = getelementptr inbounds float, float* %9, i64 %476
%478 = load float, float* %477
%479 = add nsw i64 %475, %412
%480 = getelementptr inbounds float, float* %9, i64 %479
%481 = load float, float* %480
%482 = fmul float %481, 6.250000e-01
%483 = tail call float @llvm.fmuladd.f32(float %478, float 1.875000e-01, float %482)
%484 = tail call float @llvm.fmuladd.f32(float %481, float 1.875000e-01, float %483)
%485 = add nsw i64 %475, %72
%486 = getelementptr inbounds float, float* %2, i64 %485
store float %484, float* %486
%487 = add nuw nsw i64 %475, 1
%488 = add nsw i64 %487, %411
%489 = getelementptr inbounds float, float* %9, i64 %488
%490 = load float, float* %489
%491 = add nsw i64 %487, %412
%492 = getelementptr inbounds float, float* %9, i64 %491
%493 = load float, float* %492
%494 = fmul float %493, 6.250000e-01
%495 = tail call float @llvm.fmuladd.f32(float %490, float 1.875000e-01, float %494)
%496 = tail call float @llvm.fmuladd.f32(float %493, float 1.875000e-01, float %495)
%497 = add nsw i64 %487, %72
%498 = getelementptr inbounds float, float* %2, i64 %497
store float %496, float* %498
%499 = add nuw nsw i64 %475, 2
%500 = icmp eq i64 %499, %28
br i1 %500, label %501, label %474
501: ; preds = %471, %474, %454, %406
%502 = add nsw i32 %58, 1
%503 = icmp sgt i32 %58, 2
%504 = select i1 %503, i32 0, i32 %502
%505 = add nuw nsw i64 %55, 1
%506 = icmp eq i64 %505, %24
br i1 %506, label %507, label %54
507: ; preds = %501, %3
%508 = tail call i32 @free(float* %11)
%509 = tail call i32 @free(float* %9)
ret void
}