#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 sqrtf(float);
void neuralops_batchnorm2d_bwd_input(size_t batch_sz, size_t width,
                                     size_t height, size_t chan,
                                     const float *in_buf, const float *mean,
                                     const float *mean_grad, const float *var,
                                     const float *var_grad,
                                     const float *out_grad, float *in_grad,
                                     float epsilon) {
  size_t p = 0;
  for (size_t idx = 0; idx < batch_sz; idx += 1) {
    for (size_t a = 0; a < chan; a += 1) {
      float m = mean[a];
      float v = var[a];
      float dm = mean_grad[a];
      float cm = 1.0f / ((float)(width * height * batch_sz));
      float rs = 1.0f / sqrtf(v + epsilon);
      float dv = var_grad[a];
      float cv = 2.0f / ((float)(width * height * batch_sz - 1));
      for (size_t y = 0; y < height; y += 1) {
        for (size_t x = 0; x < width; x += 1) {
          in_grad[p] = out_grad[p] * rs + dm * cm + dv * cv * (in_buf[p] - m);
          p += 1;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<neuralops_batchnorm2d_bwd_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x30(%rbp),%rax
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)
movss  %xmm0,-0x34(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    13bf <neuralops_batchnorm2d_bwd_input+0x2af>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    13a9 <neuralops_batchnorm2d_bwd_input+0x299>
mov    -0x30(%rbp),%rax
mov    -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x54(%rbp)
mov    0x18(%rbp),%rax
mov    -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rax
mov    -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x88(%rbp)
ff
test   %rax,%rax
movss  %xmm0,-0x84(%rbp)
ff
js     120f <neuralops_batchnorm2d_bwd_input+0xff>
movss  -0x88(%rbp),%xmm0
ff
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x84(%rbp),%xmm1
ff
movss  0xde5(%rip),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x58(%rbp),%xmm0
movss  -0x34(%rbp),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x94(%rbp),%xmm0
ff
divss  %xmm1,%xmm0
movss  %xmm0,-0x64(%rbp)
mov    0x20(%rbp),%rax
mov    -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    -0x8(%rbp),%rcx
imul   %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x90(%rbp)
ff
test   %rax,%rax
movss  %xmm0,-0x8c(%rbp)
ff
js     12c6 <neuralops_batchnorm2d_bwd_input+0x1b6>
movss  -0x90(%rbp),%xmm0
ff
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x8c(%rbp),%xmm1
ff
movss  0xd2a(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x6c(%rbp)
movq   $0x0,-0x78(%rbp)
mov    -0x78(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1393 <neuralops_batchnorm2d_bwd_input+0x283>
movq   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    137d <neuralops_batchnorm2d_bwd_input+0x26d>
mov    0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movss  -0x64(%rbp),%xmm2
movss  -0x5c(%rbp),%xmm0
mulss  -0x60(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x68(%rbp),%xmm0
mulss  -0x6c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
subss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x80(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
jmp    12fd <neuralops_batchnorm2d_bwd_input+0x1ed>
jmp    1382 <neuralops_batchnorm2d_bwd_input+0x272>
mov    -0x78(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
jmp    12e7 <neuralops_batchnorm2d_bwd_input+0x1d7>
jmp    1398 <neuralops_batchnorm2d_bwd_input+0x288>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1172 <neuralops_batchnorm2d_bwd_input+0x62>
jmp    13ae <neuralops_batchnorm2d_bwd_input+0x29e>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    115c <neuralops_batchnorm2d_bwd_input+0x4c>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<neuralops_batchnorm2d_bwd_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,0x38(%rsp)
mov    %rdi,0x18(%rsp)
test   %rdi,%rdi
je     1506 <neuralops_batchnorm2d_bwd_input+0x3f6>
movaps %xmm0,%xmm10
mov    %r8,%r15
mov    %rsi,%rax
imul   0x18(%rsp),%rax
imul   %rdx,%rax
test   %rax,%rax
js     1157 <neuralops_batchnorm2d_bwd_input+0x47>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
jmp    1171 <neuralops_batchnorm2d_bwd_input+0x61>
mov    %rax,%rbp
shr    %rbp
mov    %eax,%edi
and    $0x1,%edi
or     %rbp,%rdi
xorps  %xmm0,%xmm0
cvtsi2ss %rdi,%xmm0
addss  %xmm0,%xmm0
mov    0xe0(%rsp),%r11
mov    0xd8(%rsp),%r14
add    $0xffffffffffffffff,%rax
js     118e <neuralops_batchnorm2d_bwd_input+0x7e>
cvtsi2ss %rax,%xmm1
jmp    11a3 <neuralops_batchnorm2d_bwd_input+0x93>
mov    %rax,%rdi
shr    %rdi
and    $0x1,%eax
or     %rdi,%rax
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm1
movss  0xe55(%rip),%xmm2
divss  %xmm0,%xmm2
movss  %xmm2,0x14(%rsp)
movss  0xe47(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
lea    (%r11,%rsi,4),%rax
lea    (%r14,%rsi,4),%rdi
lea    (%r15,%rsi,4),%rbp
cmp    %r11,%rdi
seta   %dil
cmp    %r14,%rax
seta   %bl
and    %dil,%bl
cmp    %r11,%rbp
seta   %dil
cmp    %r15,%rax
seta   %al
and    %dil,%al
or     %bl,%al
mov    %al,0xb(%rsp)
mov    %rsi,%r13
and    $0xfffffffffffffff8,%r13
mov    %rsi,%rax
neg    %rax
mov    %rax,0x58(%rsp)
lea    0x10(%r14),%rax
mov    %rax,0x50(%rsp)
lea    0x10(%r15),%rax
mov    %rax,0x48(%rsp)
lea    0x10(%r11),%rax
mov    %rax,0x40(%rsp)
xor    %r12d,%r12d
xorps  %xmm11,%xmm11
xor    %eax,%eax
mov    %rax,0x20(%rsp)
movss  %xmm10,0xc(%rsp)
mov    %rcx,0x30(%rsp)
mov    %rsi,0x28(%rsp)
jmp    1272 <neuralops_batchnorm2d_bwd_input+0x162>
nopw   0x0(%rax,%rax,1)
mov    %r12,%rax
mov    0x20(%rsp),%rdi
add    $0x1,%rdi
mov    %rax,%r12
mov    %rdi,%rax
mov    %rdi,0x20(%rsp)
cmp    0x18(%rsp),%rdi
je     1506 <neuralops_batchnorm2d_bwd_input+0x3f6>
test   %rcx,%rcx
je     1250 <neuralops_batchnorm2d_bwd_input+0x140>
xor    %edi,%edi
jmp    1295 <neuralops_batchnorm2d_bwd_input+0x185>
nopl   0x0(%rax,%rax,1)
mov    %rdi,%r9
mov    %r12,%rax
mov    %r9,%rdi
add    $0x1,%rdi
mov    %rax,%r12
cmp    %rcx,%rdi
je     1253 <neuralops_batchnorm2d_bwd_input+0x143>
mov    0x38(%rsp),%rax
movss  (%rax,%rdi,4),%xmm12
mov    0xc0(%rsp),%rax
movss  (%rax,%rdi,4),%xmm13
mov    0xc8(%rsp),%rax
movss  (%rax,%rdi,4),%xmm0
addss  %xmm10,%xmm0
ucomiss %xmm11,%xmm0
jb     12e0 <neuralops_batchnorm2d_bwd_input+0x1d0>
sqrtss %xmm0,%xmm0
test   %rdx,%rdx
jne    132f <neuralops_batchnorm2d_bwd_input+0x21f>
jmp    1280 <neuralops_batchnorm2d_bwd_input+0x170>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdx,%rbx
mov    %rdi,%rbp
movaps %xmm12,0x70(%rsp)
movaps %xmm13,0x60(%rsp)
call   1030 <sqrtf@plt>
movaps 0x60(%rsp),%xmm13
movaps 0x70(%rsp),%xmm12
mov    %rbp,%rdi
xorps  %xmm11,%xmm11
mov    0xe0(%rsp),%r11
mov    0x28(%rsp),%rsi
mov    %rbx,%rdx
mov    0x30(%rsp),%rcx
movss  0xc(%rsp),%xmm10
test   %rdx,%rdx
je     1280 <neuralops_batchnorm2d_bwd_input+0x170>
movss  0xcc8(%rip),%xmm8
divss  %xmm0,%xmm8
mulss  0x14(%rsp),%xmm13
mov    0xd0(%rsp),%rax
mov    %rdi,%r9
movss  (%rax,%rdi,4),%xmm9
mulss  0x10(%rsp),%xmm9
movaps %xmm8,%xmm2
shufps $0x0,%xmm8,%xmm2
movaps %xmm13,%xmm3
shufps $0x0,%xmm13,%xmm3
movaps %xmm12,%xmm4
shufps $0x0,%xmm12,%xmm4
movaps %xmm9,%xmm5
shufps $0x0,%xmm9,%xmm5
xor    %r8d,%r8d
jmp    13a3 <neuralops_batchnorm2d_bwd_input+0x293>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12,%rax
add    $0x1,%r8
mov    %rax,%r12
cmp    %rdx,%r8
je     1286 <neuralops_batchnorm2d_bwd_input+0x176>
test   %rsi,%rsi
je     1390 <neuralops_batchnorm2d_bwd_input+0x280>
cmp    $0x8,%rsi
setb   %al
or     0xb(%rsp),%al
je     13c0 <neuralops_batchnorm2d_bwd_input+0x2b0>
xor    %edi,%edi
mov    %r12,%rax
jmp    1440 <neuralops_batchnorm2d_bwd_input+0x330>
nop
lea    (%r12,%r13,1),%rax
mov    0x50(%rsp),%rdi
lea    (%rdi,%r12,4),%r10
mov    0x48(%rsp),%rdi
lea    (%rdi,%r12,4),%rbx
mov    0x40(%rsp),%rdi
lea    (%rdi,%r12,4),%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups -0x10(%r10,%rbp,4),%xmm6
movups (%r10,%rbp,4),%xmm7
mulps  %xmm2,%xmm6
addps  %xmm3,%xmm6
mulps  %xmm2,%xmm7
addps  %xmm3,%xmm7
movups -0x10(%rbx,%rbp,4),%xmm1
movups (%rbx,%rbp,4),%xmm0
subps  %xmm4,%xmm1
subps  %xmm4,%xmm0
mulps  %xmm5,%xmm1
addps  %xmm6,%xmm1
mulps  %xmm5,%xmm0
addps  %xmm7,%xmm0
movups %xmm1,-0x10(%rdi,%rbp,4)
movups %xmm0,(%rdi,%rbp,4)
add    $0x8,%rbp
cmp    %rbp,%r13
jne    13f0 <neuralops_batchnorm2d_bwd_input+0x2e0>
mov    %r13,%rdi
cmp    %rsi,%r13
je     1393 <neuralops_batchnorm2d_bwd_input+0x283>
test   $0x1,%sil
jne    1450 <neuralops_batchnorm2d_bwd_input+0x340>
mov    %rdi,%rbp
jmp    1485 <neuralops_batchnorm2d_bwd_input+0x375>
nopl   0x0(%rax,%rax,1)
movss  (%r14,%rax,4),%xmm0
mulss  %xmm8,%xmm0
addss  %xmm13,%xmm0
movss  (%r15,%rax,4),%xmm1
subss  %xmm12,%xmm1
mulss  %xmm9,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%r11,%rax,4)
add    $0x1,%rax
mov    %rdi,%rbp
or     $0x1,%rbp
not    %rdi
cmp    0x58(%rsp),%rdi
je     1393 <neuralops_batchnorm2d_bwd_input+0x283>
mov    %rsi,%rdi
sub    %rbp,%rdi
nopl   0x0(%rax)
movss  (%r14,%rax,4),%xmm0
mulss  %xmm8,%xmm0
addss  %xmm13,%xmm0
movss  (%r15,%rax,4),%xmm1
subss  %xmm12,%xmm1
mulss  %xmm9,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%r11,%rax,4)
movss  0x4(%r14,%rax,4),%xmm0
mulss  %xmm8,%xmm0
addss  %xmm13,%xmm0
movss  0x4(%r15,%rax,4),%xmm1
subss  %xmm12,%xmm1
mulss  %xmm9,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%r11,%rax,4)
add    $0x2,%rax
add    $0xfffffffffffffffe,%rdi
jne    14a0 <neuralops_batchnorm2d_bwd_input+0x390>
jmp    1393 <neuralops_batchnorm2d_bwd_input+0x283>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @neuralops_batchnorm2d_bwd_input(i64 %0, i64 %1, i64 %2, i64 %3, float* %4, float* %5, float* %6, float* %7, float* %8, float* %9, float* %10, float %11) {
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca float*
%18 = alloca float*
%19 = alloca float*
%20 = alloca float*
%21 = alloca float*
%22 = alloca float*
%23 = alloca float*
%24 = alloca float
%25 = alloca i64
%26 = alloca i64
%27 = alloca i64
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
%32 = alloca float
%33 = alloca float
%34 = alloca float
%35 = alloca i64
%36 = alloca i64
store i64 %0, i64* %13
store i64 %1, i64* %14
store i64 %2, i64* %15
store i64 %3, i64* %16
store float* %4, float** %17
store float* %5, float** %18
store float* %6, float** %19
store float* %7, float** %20
store float* %8, float** %21
store float* %9, float** %22
store float* %10, float** %23
store float %11, float* %24
store i64 0, i64* %25
store i64 0, i64* %26
br label %37
37: ; preds = %129, %12
%38 = load i64, i64* %26
%39 = load i64, i64* %13
%40 = icmp ult i64 %38, %39
br i1 %40, label %41, label %132
41: ; preds = %37
store i64 0, i64* %27
br label %42
42: ; preds = %125, %41
%43 = load i64, i64* %27
%44 = load i64, i64* %16
%45 = icmp ult i64 %43, %44
br i1 %45, label %46, label %128
46: ; preds = %42
%47 = load float*, float** %18
%48 = load i64, i64* %27
%49 = getelementptr inbounds float, float* %47, i64 %48
%50 = load float, float* %49
store float %50, float* %28
%51 = load float*, float** %20
%52 = load i64, i64* %27
%53 = getelementptr inbounds float, float* %51, i64 %52
%54 = load float, float* %53
store float %54, float* %29
%55 = load float*, float** %19
%56 = load i64, i64* %27
%57 = getelementptr inbounds float, float* %55, i64 %56
%58 = load float, float* %57
store float %58, float* %30
%59 = load i64, i64* %14
%60 = load i64, i64* %15
%61 = mul i64 %59, %60
%62 = load i64, i64* %13
%63 = mul i64 %61, %62
%64 = uitofp i64 %63 to float
%65 = fdiv float 1.000000e+00, %64
store float %65, float* %31
%66 = load float, float* %29
%67 = load float, float* %24
%68 = fadd float %66, %67
%69 = call float @sqrtf(float %68)
%70 = fdiv float 1.000000e+00, %69
store float %70, float* %32
%71 = load float*, float** %21
%72 = load i64, i64* %27
%73 = getelementptr inbounds float, float* %71, i64 %72
%74 = load float, float* %73
store float %74, float* %33
%75 = load i64, i64* %14
%76 = load i64, i64* %15
%77 = mul i64 %75, %76
%78 = load i64, i64* %13
%79 = mul i64 %77, %78
%80 = sub i64 %79, 1
%81 = uitofp i64 %80 to float
%82 = fdiv float 2.000000e+00, %81
store float %82, float* %34
store i64 0, i64* %35
br label %83
83: ; preds = %121, %46
%84 = load i64, i64* %35
%85 = load i64, i64* %15
%86 = icmp ult i64 %84, %85
br i1 %86, label %87, label %124
87: ; preds = %83
store i64 0, i64* %36
br label %88
88: ; preds = %117, %87
%89 = load i64, i64* %36
%90 = load i64, i64* %14
%91 = icmp ult i64 %89, %90
br i1 %91, label %92, label %120
92: ; preds = %88
%93 = load float*, float** %22
%94 = load i64, i64* %25
%95 = getelementptr inbounds float, float* %93, i64 %94
%96 = load float, float* %95
%97 = load float, float* %32
%98 = load float, float* %30
%99 = load float, float* %31
%100 = fmul float %98, %99
%101 = call float @llvm.fmuladd.f32(float %96, float %97, float %100)
%102 = load float, float* %33
%103 = load float, float* %34
%104 = fmul float %102, %103
%105 = load float*, float** %17
%106 = load i64, i64* %25
%107 = getelementptr inbounds float, float* %105, i64 %106
%108 = load float, float* %107
%109 = load float, float* %28
%110 = fsub float %108, %109
%111 = call float @llvm.fmuladd.f32(float %104, float %110, float %101)
%112 = load float*, float** %23
%113 = load i64, i64* %25
%114 = getelementptr inbounds float, float* %112, i64 %113
store float %111, float* %114
%115 = load i64, i64* %25
%116 = add i64 %115, 1
store i64 %116, i64* %25
br label %117
117: ; preds = %92
%118 = load i64, i64* %36
%119 = add i64 %118, 1
store i64 %119, i64* %36
br label %88
120: ; preds = %88
br label %121
121: ; preds = %120
%122 = load i64, i64* %35
%123 = add i64 %122, 1
store i64 %123, i64* %35
br label %83
124: ; preds = %83
br label %125
125: ; preds = %124
%126 = load i64, i64* %27
%127 = add i64 %126, 1
store i64 %127, i64* %27
br label %42
128: ; preds = %42
br label %129
129: ; preds = %128
%130 = load i64, i64* %26
%131 = add i64 %130, 1
store i64 %131, i64* %26
br label %37
132: ; preds = %37
ret void
}

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