#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 overlap(float, int, int, int, float, float, float, float, int, int, int,
            float, float, float);
float kinetic(float alpha1, int l1, int m1, int n1, float xa, float ya,
              float za, float alpha2, int l2, int m2, int n2, float xb,
              float yb, float zb) {
  float term0, term1, term2;
  term0 =
      alpha2 * (2 * (l2 + m2 + n2) + 3) *
      overlap(alpha1, l1, m1, n1, xa, ya, za, alpha2, l2, m2, n2, xb, yb, zb);
  term1 = -2 * alpha2 * alpha2 *
          (overlap(alpha1, l1, m1, n1, xa, ya, za, alpha2, l2 + 2, m2, n2, xb,
                   yb, zb) +
           overlap(alpha1, l1, m1, n1, xa, ya, za, alpha2, l2, m2 + 2, n2, xb,
                   yb, zb) +
           overlap(alpha1, l1, m1, n1, xa, ya, za, alpha2, l2, m2, n2 + 2, xb,
                   yb, zb));
  term2 = -0.5 * (((l2 < 2) ? 0
                            : l2 * (l2 - 1) *
                                  overlap(alpha1, l1, m1, n1, xa, ya, za,
                                          alpha2, l2 - 2, m2, n2, xb, yb, zb)) +
                  ((m2 < 2) ? 0
                            : m2 * (m2 - 1) *
                                  overlap(alpha1, l1, m1, n1, xa, ya, za,
                                          alpha2, l2, m2 - 2, n2, xb, yb, zb)) +
                  ((n2 < 2) ? 0
                            : n2 * (n2 - 1) *
                                  overlap(alpha1, l1, m1, n1, xa, ya, za,
                                          alpha2, l2, m2, n2 - 2, xb, yb, zb)));
  return term0 + term1 + term2;
}


x86 assembly (clang, -O0):
<kinetic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
movss  %xmm2,-0x18(%rbp)
movss  %xmm3,-0x1c(%rbp)
movss  %xmm4,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movss  %xmm5,-0x30(%rbp)
movss  %xmm6,-0x34(%rbp)
movss  %xmm7,-0x38(%rbp)
movss  -0x20(%rbp),%xmm0
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
shl    $0x1,%eax
add    $0x3,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
movss  -0x54(%rbp),%xmm0
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xe2d(%rip),%xmm0
mulss  -0x20(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
mov    %eax,-0x50(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
add    $0x2,%r8d
mov    -0x2c(%rbp),%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
add    $0x2,%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
movss  -0x4c(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
add    %ecx,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    12ea <kinetic+0x1da>
xor    %eax,%eax
mov    %eax,-0x58(%rbp)
jmp    1348 <kinetic+0x238>
mov    -0x24(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x5c(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
sub    $0x2,%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x2,-0x28(%rbp)
jge    1362 <kinetic+0x252>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    13c1 <kinetic+0x2b1>
mov    -0x28(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x68(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
sub    $0x2,%r8d
mov    -0x2c(%rbp),%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ecx
mov    -0x68(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x64(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x6c(%rbp)
cmpl   $0x2,-0x2c(%rbp)
jge    13e0 <kinetic+0x2d0>
xor    %eax,%eax
mov    %eax,-0x70(%rbp)
jmp    143f <kinetic+0x32f>
mov    -0x2c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x74(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
movss  -0x1c(%rbp),%xmm3
movss  -0x20(%rbp),%xmm4
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
sub    $0x2,%r9d
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
movss  -0x38(%rbp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x70(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xbb5(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x3c(%rbp),%xmm0
addss  -0x40(%rbp),%xmm0
addss  -0x44(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kinetic>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movss  %xmm7,0x20(%rsp)
movss  %xmm6,0x1c(%rsp)
movss  %xmm5,0x18(%rsp)
mov    %r9d,%r14d
mov    %r8d,%r13d
mov    %ecx,%r15d
movaps %xmm4,0x30(%rsp)
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
mov    %edi,0x24(%rsp)
movss  %xmm0,0x8(%rsp)
call   1030 <overlap@plt>
mov    %eax,0x54(%rsp)
lea    0x2(%r15),%ecx
movss  0x8(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r13d,%r8d
mov    %r14d,%r9d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
mov    %eax,0x50(%rsp)
lea    0x2(%r13),%r8d
movss  0x8(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r15d,%ecx
mov    %r14d,%r9d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
mov    %eax,0x4c(%rsp)
lea    0x2(%r14),%r9d
movss  0x8(%rsp),%xmm0
mov    %ebx,%edi
mov    %ebp,0x28(%rsp)
mov    %ebp,%esi
mov    %r12d,0x2c(%rsp)
mov    %r12d,%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r15d,%ecx
mov    %r13d,%r8d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
mov    %eax,0x48(%rsp)
xor    %ebp,%ebp
mov    $0x0,%ebx
cmp    $0x2,%r15d
jl     12b3 <kinetic+0x1a3>
lea    -0x1(%r15),%r12d
imul   %r15d,%r12d
lea    -0x2(%r15),%ecx
movss  0x8(%rsp),%xmm0
mov    0x24(%rsp),%edi
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r13d,%r8d
mov    %r14d,%r9d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ebx
imul   %r12d,%ebx
cmp    $0x2,%r13d
jl     1311 <kinetic+0x201>
lea    -0x1(%r13),%r12d
imul   %r13d,%r12d
lea    -0x2(%r13),%r8d
movss  0x8(%rsp),%xmm0
mov    0x24(%rsp),%edi
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r15d,%ecx
mov    %r14d,%r9d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
mov    %eax,%ebp
imul   %r12d,%ebp
xor    %eax,%eax
cmp    $0x2,%r14d
jl     136f <kinetic+0x25f>
lea    -0x1(%r14),%r12d
imul   %r14d,%r12d
lea    -0x2(%r14),%r9d
movss  0x8(%rsp),%xmm0
mov    0x24(%rsp),%edi
mov    0x28(%rsp),%esi
mov    0x2c(%rsp),%edx
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
mov    %r15d,%ecx
mov    %r13d,%r8d
movss  0x18(%rsp),%xmm5
movss  0x1c(%rsp),%xmm6
movss  0x20(%rsp),%xmm7
call   1030 <overlap@plt>
imul   %r12d,%eax
add    %ebx,%ebp
add    %eax,%ebp
movaps 0x30(%rsp),%xmm2
movaps %xmm2,%xmm0
addss  %xmm2,%xmm0
mov    0x4c(%rsp),%ecx
add    0x50(%rsp),%ecx
add    0x48(%rsp),%ecx
add    %r15d,%r13d
add    %r14d,%r13d
lea    0x3(%r13,%r13,1),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
unpcklps %xmm0,%xmm1
shufps $0x0,%xmm2,%xmm2
mulps  %xmm1,%xmm2
movd   %ecx,%xmm0
movd   0x54(%rsp),%xmm1
punpckldq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
mulsd  0xc39(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
mulps  %xmm2,%xmm0
movaps %xmm0,%xmm2
shufps $0x55,%xmm0,%xmm2
subss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define float @kinetic(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %9, i32 %10, float %11, float %12, float %13) {
%15 = alloca float
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca float
%27 = alloca float
%28 = alloca float
%29 = alloca float
%30 = alloca float
%31 = alloca float
store float %0, float* %15
store i32 %1, i32* %16
store i32 %2, i32* %17
store i32 %3, i32* %18
store float %4, float* %19
store float %5, float* %20
store float %6, float* %21
store float %7, float* %22
store i32 %8, i32* %23
store i32 %9, i32* %24
store i32 %10, i32* %25
store float %11, float* %26
store float %12, float* %27
store float %13, float* %28
%32 = load float, float* %22
%33 = load i32, i32* %23
%34 = load i32, i32* %24
%35 = add nsw i32 %33, %34
%36 = load i32, i32* %25
%37 = add nsw i32 %35, %36
%38 = mul nsw i32 2, %37
%39 = add nsw i32 %38, 3
%40 = sitofp i32 %39 to float
%41 = fmul float %32, %40
%42 = load float, float* %15
%43 = load i32, i32* %16
%44 = load i32, i32* %17
%45 = load i32, i32* %18
%46 = load float, float* %19
%47 = load float, float* %20
%48 = load float, float* %21
%49 = load float, float* %22
%50 = load i32, i32* %23
%51 = load i32, i32* %24
%52 = load i32, i32* %25
%53 = load float, float* %26
%54 = load float, float* %27
%55 = load float, float* %28
%56 = call i32 @overlap(float %42, i32 %43, i32 %44, i32 %45, float %46, float %47, float %48, float %49, i32 %50, i32 %51, i32 %52, float %53, float %54, float %55)
%57 = sitofp i32 %56 to float
%58 = fmul float %41, %57
store float %58, float* %29
%59 = load float, float* %22
%60 = fmul float -2.000000e+00, %59
%61 = load float, float* %22
%62 = fmul float %60, %61
%63 = load float, float* %15
%64 = load i32, i32* %16
%65 = load i32, i32* %17
%66 = load i32, i32* %18
%67 = load float, float* %19
%68 = load float, float* %20
%69 = load float, float* %21
%70 = load float, float* %22
%71 = load i32, i32* %23
%72 = add nsw i32 %71, 2
%73 = load i32, i32* %24
%74 = load i32, i32* %25
%75 = load float, float* %26
%76 = load float, float* %27
%77 = load float, float* %28
%78 = call i32 @overlap(float %63, i32 %64, i32 %65, i32 %66, float %67, float %68, float %69, float %70, i32 %72, i32 %73, i32 %74, float %75, float %76, float %77)
%79 = load float, float* %15
%80 = load i32, i32* %16
%81 = load i32, i32* %17
%82 = load i32, i32* %18
%83 = load float, float* %19
%84 = load float, float* %20
%85 = load float, float* %21
%86 = load float, float* %22
%87 = load i32, i32* %23
%88 = load i32, i32* %24
%89 = add nsw i32 %88, 2
%90 = load i32, i32* %25
%91 = load float, float* %26
%92 = load float, float* %27
%93 = load float, float* %28
%94 = call i32 @overlap(float %79, i32 %80, i32 %81, i32 %82, float %83, float %84, float %85, float %86, i32 %87, i32 %89, i32 %90, float %91, float %92, float %93)
%95 = add nsw i32 %78, %94
%96 = load float, float* %15
%97 = load i32, i32* %16
%98 = load i32, i32* %17
%99 = load i32, i32* %18
%100 = load float, float* %19
%101 = load float, float* %20
%102 = load float, float* %21
%103 = load float, float* %22
%104 = load i32, i32* %23
%105 = load i32, i32* %24
%106 = load i32, i32* %25
%107 = add nsw i32 %106, 2
%108 = load float, float* %26
%109 = load float, float* %27
%110 = load float, float* %28
%111 = call i32 @overlap(float %96, i32 %97, i32 %98, i32 %99, float %100, float %101, float %102, float %103, i32 %104, i32 %105, i32 %107, float %108, float %109, float %110)
%112 = add nsw i32 %95, %111
%113 = sitofp i32 %112 to float
%114 = fmul float %62, %113
store float %114, float* %30
%115 = load i32, i32* %23
%116 = icmp slt i32 %115, 2
br i1 %116, label %117, label %118
117: ; preds = %14
br label %140
118: ; preds = %14
%119 = load i32, i32* %23
%120 = load i32, i32* %23
%121 = sub nsw i32 %120, 1
%122 = mul nsw i32 %119, %121
%123 = load float, float* %15
%124 = load i32, i32* %16
%125 = load i32, i32* %17
%126 = load i32, i32* %18
%127 = load float, float* %19
%128 = load float, float* %20
%129 = load float, float* %21
%130 = load float, float* %22
%131 = load i32, i32* %23
%132 = sub nsw i32 %131, 2
%133 = load i32, i32* %24
%134 = load i32, i32* %25
%135 = load float, float* %26
%136 = load float, float* %27
%137 = load float, float* %28
%138 = call i32 @overlap(float %123, i32 %124, i32 %125, i32 %126, float %127, float %128, float %129, float %130, i32 %132, i32 %133, i32 %134, float %135, float %136, float %137)
%139 = mul nsw i32 %122, %138
br label %140
140: ; preds = %118, %117
%141 = phi i32 [ 0, %117 ], [ %139, %118 ]
%142 = load i32, i32* %24
%143 = icmp slt i32 %142, 2
br i1 %143, label %144, label %145
144: ; preds = %140
br label %167
145: ; preds = %140
%146 = load i32, i32* %24
%147 = load i32, i32* %24
%148 = sub nsw i32 %147, 1
%149 = mul nsw i32 %146, %148
%150 = load float, float* %15
%151 = load i32, i32* %16
%152 = load i32, i32* %17
%153 = load i32, i32* %18
%154 = load float, float* %19
%155 = load float, float* %20
%156 = load float, float* %21
%157 = load float, float* %22
%158 = load i32, i32* %23
%159 = load i32, i32* %24
%160 = sub nsw i32 %159, 2
%161 = load i32, i32* %25
%162 = load float, float* %26
%163 = load float, float* %27
%164 = load float, float* %28
%165 = call i32 @overlap(float %150, i32 %151, i32 %152, i32 %153, float %154, float %155, float %156, float %157, i32 %158, i32 %160, i32 %161, float %162, float %163, float %164)
%166 = mul nsw i32 %149, %165
br label %167
167: ; preds = %145, %144
%168 = phi i32 [ 0, %144 ], [ %166, %145 ]
%169 = add nsw i32 %141, %168
%170 = load i32, i32* %25
%171 = icmp slt i32 %170, 2
br i1 %171, label %172, label %173
172: ; preds = %167
br label %195
173: ; preds = %167
%174 = load i32, i32* %25
%175 = load i32, i32* %25
%176 = sub nsw i32 %175, 1
%177 = mul nsw i32 %174, %176
%178 = load float, float* %15
%179 = load i32, i32* %16
%180 = load i32, i32* %17
%181 = load i32, i32* %18
%182 = load float, float* %19
%183 = load float, float* %20
%184 = load float, float* %21
%185 = load float, float* %22
%186 = load i32, i32* %23
%187 = load i32, i32* %24
%188 = load i32, i32* %25
%189 = sub nsw i32 %188, 2
%190 = load float, float* %26
%191 = load float, float* %27
%192 = load float, float* %28
%193 = call i32 @overlap(float %178, i32 %179, i32 %180, i32 %181, float %182, float %183, float %184, float %185, i32 %186, i32 %187, i32 %189, float %190, float %191, float %192)
%194 = mul nsw i32 %177, %193
br label %195
195: ; preds = %173, %172
%196 = phi i32 [ 0, %172 ], [ %194, %173 ]
%197 = add nsw i32 %169, %196
%198 = sitofp i32 %197 to double
%199 = fmul double -5.000000e-01, %198
%200 = fptrunc double %199 to float
store float %200, float* %31
%201 = load float, float* %29
%202 = load float, float* %30
%203 = fadd float %201, %202
%204 = load float, float* %31
%205 = fadd float %203, %204
ret float %205
}

LLVM IR (-O2):
define float @kinetic(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %9, i32 %10, float %11, float %12, float %13) {
%15 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %9, i32 %10, float %11, float %12, float %13)
%16 = add nsw i32 %8, 2
%17 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %16, i32 %9, i32 %10, float %11, float %12, float %13)
%18 = add nsw i32 %9, 2
%19 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %18, i32 %10, float %11, float %12, float %13)
%20 = add nsw i32 %10, 2
%21 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %9, i32 %20, float %11, float %12, float %13)
%22 = icmp slt i32 %8, 2
br i1 %22, label %29, label %23
23: ; preds = %14
%24 = add nsw i32 %8, -1
%25 = mul nsw i32 %24, %8
%26 = add nsw i32 %8, -2
%27 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %26, i32 %9, i32 %10, float %11, float %12, float %13)
%28 = mul nsw i32 %25, %27
br label %29
29: ; preds = %14, %23
%30 = phi i32 [ %28, %23 ], [ 0, %14 ]
%31 = icmp slt i32 %9, 2
br i1 %31, label %38, label %32
32: ; preds = %29
%33 = add nsw i32 %9, -1
%34 = mul nsw i32 %33, %9
%35 = add nsw i32 %9, -2
%36 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %35, i32 %10, float %11, float %12, float %13)
%37 = mul nsw i32 %34, %36
br label %38
38: ; preds = %29, %32
%39 = phi i32 [ %37, %32 ], [ 0, %29 ]
%40 = icmp slt i32 %10, 2
br i1 %40, label %47, label %41
41: ; preds = %38
%42 = add nsw i32 %10, -1
%43 = mul nsw i32 %42, %10
%44 = add nsw i32 %10, -2
%45 = tail call i32 @overlap(float %0, i32 %1, i32 %2, i32 %3, float %4, float %5, float %6, float %7, i32 %8, i32 %9, i32 %44, float %11, float %12, float %13)
%46 = mul nsw i32 %43, %45
br label %47
47: ; preds = %38, %41
%48 = phi i32 [ %46, %41 ], [ 0, %38 ]
%49 = add nsw i32 %39, %30
%50 = fmul float %7, 2.000000e+00
%51 = add nsw i32 %19, %17
%52 = add nsw i32 %51, %21
%53 = add nsw i32 %9, %8
%54 = add nsw i32 %53, %10
%55 = shl nsw i32 %54, 1
%56 = add nsw i32 %55, 3
%57 = sitofp i32 %56 to float
%58 = insertelement <2 x float> poison, float %57, i64 0
%59 = insertelement <2 x float> %58, float %50, i64 1
%60 = insertelement <2 x float> poison, float %7, i64 0
%61 = shufflevector <2 x float> %60, <2 x float> poison, <2 x i32> zeroinitializer
%62 = fmul <2 x float> %59, %61
%63 = insertelement <2 x i32> poison, i32 %15, i64 0
%64 = insertelement <2 x i32> %63, i32 %52, i64 1
%65 = sitofp <2 x i32> %64 to <2 x float>
%66 = fmul <2 x float> %62, %65
%67 = add nsw i32 %49, %48
%68 = sitofp i32 %67 to double
%69 = fmul double %68, -5.000000e-01
%70 = fptrunc double %69 to float
%71 = shufflevector <2 x float> %66, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%72 = fsub <2 x float> %66, %71
%73 = extractelement <2 x float> %72, i64 0
%74 = fadd float %73, %70
ret float %74
}