#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 */
double _logsumexp_sort_kahan_inplace(double *, int);
extern void _wham_normalize(int n_therm_states, int n_conf_states,
                            double *scratch_M, double *therm_energies,
                            double *conf_energies) {
  int K, i;
  double f0;
  for (i = 0; i < n_conf_states; ++i)
    scratch_M[i] = -conf_energies[i];
  f0 = -_logsumexp_sort_kahan_inplace(scratch_M, n_conf_states);
  for (i = 0; i < n_conf_states; ++i)
    conf_energies[i] -= f0;
  for (K = 0; K < n_therm_states; ++K)
    therm_energies[K] -= f0;
}


x86 assembly (clang, -O0):
<_wham_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    117c <_wham_normalize+0x6c>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1131 <_wham_normalize+0x21>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <_logsumexp_sort_kahan_inplace@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e0 <_wham_normalize+0xd0>
movsd  -0x30(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ab <_wham_normalize+0x9b>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121c <_wham_normalize+0x10c>
movsd  -0x30(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11e7 <_wham_normalize+0xd7>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wham_normalize>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%rbx
mov    %esi,%r15d
mov    %edi,%r14d
test   %esi,%esi
jle    11fd <_wham_normalize+0xed>
mov    %r8,%rbp
mov    %r15d,%r12d
cmp    $0x4,%r15d
jb     1156 <_wham_normalize+0x46>
lea    0x0(,%r12,8),%rax
add    %rbp,%rax
cmp    %rdx,%rax
jbe    120d <_wham_normalize+0xfd>
lea    (%rdx,%r12,8),%rax
cmp    %rbp,%rax
jbe    120d <_wham_normalize+0xfd>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r12,%rcx
mov    %r12,%rsi
and    $0x3,%rsi
je     1199 <_wham_normalize+0x89>
movapd 0xe8e(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rdx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    1180 <_wham_normalize+0x70>
cmp    $0x3,%rcx
jb     12bf <_wham_normalize+0x1af>
movapd 0xe55(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rdx,%rax,8)
movsd  0x8(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x8(%rdx,%rax,8)
movsd  0x10(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x10(%rdx,%rax,8)
movsd  0x18(%rbp,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x18(%rdx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r12
jne    11b0 <_wham_normalize+0xa0>
jmp    12bf <_wham_normalize+0x1af>
mov    %rdx,%rdi
mov    %r15d,%esi
call   1030 <_logsumexp_sort_kahan_inplace@plt>
jmp    13a9 <_wham_normalize+0x299>
mov    %r12d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rcx,%rcx
je     14aa <_wham_normalize+0x39a>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
movapd 0xdc4(%rip),%xmm0
nopl   0x0(%rax)
movupd 0x0(%rbp,%rcx,8),%xmm1
movupd 0x10(%rbp,%rcx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,(%rdx,%rcx,8)
movupd %xmm2,0x10(%rdx,%rcx,8)
movupd 0x20(%rbp,%rcx,8),%xmm1
movupd 0x30(%rbp,%rcx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rdx,%rcx,8)
movupd %xmm2,0x30(%rdx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rdi
jne    1240 <_wham_normalize+0x130>
test   $0x1,%sil
je     12b6 <_wham_normalize+0x1a6>
movupd 0x0(%rbp,%rcx,8),%xmm0
movupd 0x10(%rbp,%rcx,8),%xmm1
movapd 0xd5d(%rip),%xmm2
xorpd  %xmm2,%xmm0
xorpd  %xmm2,%xmm1
movupd %xmm0,(%rdx,%rcx,8)
movupd %xmm1,0x10(%rdx,%rcx,8)
cmp    %r12,%rax
jne    1158 <_wham_normalize+0x48>
mov    %rdx,%rdi
mov    %r15d,%esi
call   1030 <_logsumexp_sort_kahan_inplace@plt>
test   %r15d,%r15d
jle    13a9 <_wham_normalize+0x299>
cmp    $0x4,%r15d
jae    12e0 <_wham_normalize+0x1d0>
xor    %eax,%eax
jmp    1390 <_wham_normalize+0x280>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     149a <_wham_normalize+0x38a>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nop
movupd 0x0(%rbp,%rcx,8),%xmm2
movupd 0x10(%rbp,%rcx,8),%xmm3
movupd 0x20(%rbp,%rcx,8),%xmm4
movupd 0x30(%rbp,%rcx,8),%xmm5
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rcx,8)
movupd %xmm3,0x10(%rbp,%rcx,8)
addpd  %xmm1,%xmm4
addpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbp,%rcx,8)
movupd %xmm5,0x30(%rbp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1310 <_wham_normalize+0x200>
test   $0x1,%dl
je     137f <_wham_normalize+0x26f>
movupd 0x0(%rbp,%rcx,8),%xmm2
movupd 0x10(%rbp,%rcx,8),%xmm3
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rcx,8)
movupd %xmm3,0x10(%rbp,%rcx,8)
cmp    %r12,%rax
je     13a9 <_wham_normalize+0x299>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%rbp,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1390 <_wham_normalize+0x280>
test   %r14d,%r14d
jle    1487 <_wham_normalize+0x377>
mov    %r14d,%eax
cmp    $0x4,%r14d
jae    13c2 <_wham_normalize+0x2b2>
xor    %ecx,%ecx
jmp    1470 <_wham_normalize+0x360>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     1490 <_wham_normalize+0x380>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
movupd 0x20(%rbx,%rdx,8),%xmm4
movupd 0x30(%rbx,%rdx,8),%xmm5
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
addpd  %xmm1,%xmm4
addpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbx,%rdx,8)
movupd %xmm5,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    13f0 <_wham_normalize+0x2e0>
test   $0x1,%sil
je     145c <_wham_normalize+0x34c>
movupd (%rbx,%rdx,8),%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm3
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
je     1487 <_wham_normalize+0x377>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1470 <_wham_normalize+0x360>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    143e <_wham_normalize+0x32e>
jmp    145c <_wham_normalize+0x34c>
xor    %ecx,%ecx
test   $0x1,%dl
jne    135f <_wham_normalize+0x24f>
jmp    137f <_wham_normalize+0x26f>
xor    %ecx,%ecx
test   $0x1,%sil
jne    128f <_wham_normalize+0x17f>
jmp    12b6 <_wham_normalize+0x1a6>

LLVM IR (-O0):
define void @_wham_normalize(i32 %0, i32 %1, double* %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
store i32 %0, i32* %6
store i32 %1, i32* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
store i32 0, i32* %12
br label %14
14: ; preds = %29, %5
%15 = load i32, i32* %12
%16 = load i32, i32* %7
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %32
18: ; preds = %14
%19 = load double*, double** %10
%20 = load i32, i32* %12
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %19, i64 %21
%23 = load double, double* %22
%24 = fneg double %23
%25 = load double*, double** %8
%26 = load i32, i32* %12
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %25, i64 %27
store double %24, double* %28
br label %29
29: ; preds = %18
%30 = load i32, i32* %12
%31 = add nsw i32 %30, 1
store i32 %31, i32* %12
br label %14
32: ; preds = %14
%33 = load double*, double** %8
%34 = load i32, i32* %7
%35 = call double @_logsumexp_sort_kahan_inplace(double* %33, i32 %34)
%36 = fneg double %35
store double %36, double* %13
store i32 0, i32* %12
br label %37
37: ; preds = %49, %32
%38 = load i32, i32* %12
%39 = load i32, i32* %7
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %52
41: ; preds = %37
%42 = load double, double* %13
%43 = load double*, double** %10
%44 = load i32, i32* %12
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %43, i64 %45
%47 = load double, double* %46
%48 = fsub double %47, %42
store double %48, double* %46
br label %49
49: ; preds = %41
%50 = load i32, i32* %12
%51 = add nsw i32 %50, 1
store i32 %51, i32* %12
br label %37
52: ; preds = %37
store i32 0, i32* %11
br label %53
53: ; preds = %65, %52
%54 = load i32, i32* %11
%55 = load i32, i32* %6
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %68
57: ; preds = %53
%58 = load double, double* %13
%59 = load double*, double** %9
%60 = load i32, i32* %11
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = fsub double %63, %58
store double %64, double* %62
br label %65
65: ; preds = %57
%66 = load i32, i32* %11
%67 = add nsw i32 %66, 1
store i32 %67, i32* %11
br label %53
68: ; preds = %53
ret void
}

LLVM IR (-O2):
define void @_wham_normalize(i32 %0, i32 %1, double* %2, double* nocapture %3, double* nocapture %4) {
%6 = icmp sgt i32 %1, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call double @_logsumexp_sort_kahan_inplace(double* %2, i32 %1)
br label %181
9: ; preds = %5
%10 = zext i32 %1 to i64
%11 = icmp ult i32 %1, 4
br i1 %11, label %76, label %12
12: ; preds = %9
%13 = getelementptr double, double* %2, i64 %10
%14 = getelementptr double, double* %4, i64 %10
%15 = icmp ugt double* %14, %2
%16 = icmp ugt double* %13, %4
%17 = and i1 %15, %16
br i1 %17, label %76, label %18
18: ; preds = %12
%19 = and i64 %10, 4294967292
%20 = add nsw i64 %19, -4
%21 = lshr exact i64 %20, 2
%22 = add nuw nsw i64 %21, 1
%23 = and i64 %22, 1
%24 = icmp eq i64 %20, 0
br i1 %24, label %58, label %25
25: ; preds = %18
%26 = and i64 %22, 9223372036854775806
br label %27
27: ; preds = %27, %25
%28 = phi i64 [ 0, %25 ], [ %55, %27 ]
%29 = phi i64 [ 0, %25 ], [ %56, %27 ]
%30 = getelementptr inbounds double, double* %4, i64 %28
%31 = bitcast double* %30 to <2 x double>*
%32 = load <2 x double>, <2 x double>* %31
%33 = getelementptr inbounds double, double* %30, i64 2
%34 = bitcast double* %33 to <2 x double>*
%35 = load <2 x double>, <2 x double>* %34
%36 = fneg <2 x double> %32
%37 = fneg <2 x double> %35
%38 = getelementptr inbounds double, double* %2, i64 %28
%39 = bitcast double* %38 to <2 x double>*
store <2 x double> %36, <2 x double>* %39
%40 = getelementptr inbounds double, double* %38, i64 2
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> %37, <2 x double>* %41
%42 = or i64 %28, 4
%43 = getelementptr inbounds double, double* %4, i64 %42
%44 = bitcast double* %43 to <2 x double>*
%45 = load <2 x double>, <2 x double>* %44
%46 = getelementptr inbounds double, double* %43, i64 2
%47 = bitcast double* %46 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = fneg <2 x double> %45
%50 = fneg <2 x double> %48
%51 = getelementptr inbounds double, double* %2, i64 %42
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> %49, <2 x double>* %52
%53 = getelementptr inbounds double, double* %51, i64 2
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> %50, <2 x double>* %54
%55 = add nuw i64 %28, 8
%56 = add i64 %29, 2
%57 = icmp eq i64 %56, %26
br i1 %57, label %58, label %27
58: ; preds = %27, %18
%59 = phi i64 [ 0, %18 ], [ %55, %27 ]
%60 = icmp eq i64 %23, 0
br i1 %60, label %74, label %61
61: ; preds = %58
%62 = getelementptr inbounds double, double* %4, i64 %59
%63 = bitcast double* %62 to <2 x double>*
%64 = load <2 x double>, <2 x double>* %63
%65 = getelementptr inbounds double, double* %62, i64 2
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = fneg <2 x double> %64
%69 = fneg <2 x double> %67
%70 = getelementptr inbounds double, double* %2, i64 %59
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> %68, <2 x double>* %71
%72 = getelementptr inbounds double, double* %70, i64 2
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> %69, <2 x double>* %73
br label %74
74: ; preds = %58, %61
%75 = icmp eq i64 %19, %10
br i1 %75, label %118, label %76
76: ; preds = %12, %9, %74
%77 = phi i64 [ 0, %12 ], [ 0, %9 ], [ %19, %74 ]
%78 = xor i64 %77, -1
%79 = add nsw i64 %78, %10
%80 = and i64 %10, 3
%81 = icmp eq i64 %80, 0
br i1 %81, label %92, label %82
82: ; preds = %76, %82
%83 = phi i64 [ %89, %82 ], [ %77, %76 ]
%84 = phi i64 [ %90, %82 ], [ 0, %76 ]
%85 = getelementptr inbounds double, double* %4, i64 %83
%86 = load double, double* %85
%87 = fneg double %86
%88 = getelementptr inbounds double, double* %2, i64 %83
store double %87, double* %88
%89 = add nuw nsw i64 %83, 1
%90 = add i64 %84, 1
%91 = icmp eq i64 %90, %80
br i1 %91, label %92, label %82
92: ; preds = %82, %76
%93 = phi i64 [ %77, %76 ], [ %89, %82 ]
%94 = icmp ult i64 %79, 3
br i1 %94, label %118, label %95
95: ; preds = %92, %95
%96 = phi i64 [ %116, %95 ], [ %93, %92 ]
%97 = getelementptr inbounds double, double* %4, i64 %96
%98 = load double, double* %97
%99 = fneg double %98
%100 = getelementptr inbounds double, double* %2, i64 %96
store double %99, double* %100
%101 = add nuw nsw i64 %96, 1
%102 = getelementptr inbounds double, double* %4, i64 %101
%103 = load double, double* %102
%104 = fneg double %103
%105 = getelementptr inbounds double, double* %2, i64 %101
store double %104, double* %105
%106 = add nuw nsw i64 %96, 2
%107 = getelementptr inbounds double, double* %4, i64 %106
%108 = load double, double* %107
%109 = fneg double %108
%110 = getelementptr inbounds double, double* %2, i64 %106
store double %109, double* %110
%111 = add nuw nsw i64 %96, 3
%112 = getelementptr inbounds double, double* %4, i64 %111
%113 = load double, double* %112
%114 = fneg double %113
%115 = getelementptr inbounds double, double* %2, i64 %111
store double %114, double* %115
%116 = add nuw nsw i64 %96, 4
%117 = icmp eq i64 %116, %10
br i1 %117, label %118, label %95
118: ; preds = %92, %95, %74
%119 = tail call double @_logsumexp_sort_kahan_inplace(double* %2, i32 %1)
br i1 %6, label %120, label %181
120: ; preds = %118
%121 = zext i32 %1 to i64
%122 = icmp ult i32 %1, 4
br i1 %122, label %179, label %123
123: ; preds = %120
%124 = and i64 %10, 4294967292
%125 = insertelement <2 x double> poison, double %119, i64 0
%126 = shufflevector <2 x double> %125, <2 x double> poison, <2 x i32> zeroinitializer
%127 = insertelement <2 x double> poison, double %119, i64 0
%128 = shufflevector <2 x double> %127, <2 x double> poison, <2 x i32> zeroinitializer
%129 = add nsw i64 %124, -4
%130 = lshr exact i64 %129, 2
%131 = add nuw nsw i64 %130, 1
%132 = and i64 %131, 1
%133 = icmp eq i64 %129, 0
br i1 %133, label %163, label %134
134: ; preds = %123
%135 = and i64 %131, 9223372036854775806
br label %136
136: ; preds = %136, %134
%137 = phi i64 [ 0, %134 ], [ %160, %136 ]
%138 = phi i64 [ 0, %134 ], [ %161, %136 ]
%139 = getelementptr inbounds double, double* %4, i64 %137
%140 = bitcast double* %139 to <2 x double>*
%141 = load <2 x double>, <2 x double>* %140
%142 = getelementptr inbounds double, double* %139, i64 2
%143 = bitcast double* %142 to <2 x double>*
%144 = load <2 x double>, <2 x double>* %143
%145 = fadd <2 x double> %126, %141
%146 = fadd <2 x double> %128, %144
%147 = bitcast double* %139 to <2 x double>*
store <2 x double> %145, <2 x double>* %147
%148 = bitcast double* %142 to <2 x double>*
store <2 x double> %146, <2 x double>* %148
%149 = or i64 %137, 4
%150 = getelementptr inbounds double, double* %4, i64 %149
%151 = bitcast double* %150 to <2 x double>*
%152 = load <2 x double>, <2 x double>* %151
%153 = getelementptr inbounds double, double* %150, i64 2
%154 = bitcast double* %153 to <2 x double>*
%155 = load <2 x double>, <2 x double>* %154
%156 = fadd <2 x double> %126, %152
%157 = fadd <2 x double> %128, %155
%158 = bitcast double* %150 to <2 x double>*
store <2 x double> %156, <2 x double>* %158
%159 = bitcast double* %153 to <2 x double>*
store <2 x double> %157, <2 x double>* %159
%160 = add nuw i64 %137, 8
%161 = add i64 %138, 2
%162 = icmp eq i64 %161, %135
br i1 %162, label %163, label %136
163: ; preds = %136, %123
%164 = phi i64 [ 0, %123 ], [ %160, %136 ]
%165 = icmp eq i64 %132, 0
br i1 %165, label %177, label %166
166: ; preds = %163
%167 = getelementptr inbounds double, double* %4, i64 %164
%168 = bitcast double* %167 to <2 x double>*
%169 = load <2 x double>, <2 x double>* %168
%170 = getelementptr inbounds double, double* %167, i64 2
%171 = bitcast double* %170 to <2 x double>*
%172 = load <2 x double>, <2 x double>* %171
%173 = fadd <2 x double> %126, %169
%174 = fadd <2 x double> %128, %172
%175 = bitcast double* %167 to <2 x double>*
store <2 x double> %173, <2 x double>* %175
%176 = bitcast double* %170 to <2 x double>*
store <2 x double> %174, <2 x double>* %176
br label %177
177: ; preds = %163, %166
%178 = icmp eq i64 %124, %10
br i1 %178, label %181, label %179
179: ; preds = %120, %177
%180 = phi i64 [ 0, %120 ], [ %124, %177 ]
br label %245
181: ; preds = %245, %177, %7, %118
%182 = phi double [ %8, %7 ], [ %119, %118 ], [ %119, %177 ], [ %119, %245 ]
%183 = icmp sgt i32 %0, 0
br i1 %183, label %184, label %259
184: ; preds = %181
%185 = zext i32 %0 to i64
%186 = icmp ult i32 %0, 4
br i1 %186, label %243, label %187
187: ; preds = %184
%188 = and i64 %185, 4294967292
%189 = insertelement <2 x double> poison, double %182, i64 0
%190 = shufflevector <2 x double> %189, <2 x double> poison, <2 x i32> zeroinitializer
%191 = insertelement <2 x double> poison, double %182, i64 0
%192 = shufflevector <2 x double> %191, <2 x double> poison, <2 x i32> zeroinitializer
%193 = add nsw i64 %188, -4
%194 = lshr exact i64 %193, 2
%195 = add nuw nsw i64 %194, 1
%196 = and i64 %195, 1
%197 = icmp eq i64 %193, 0
br i1 %197, label %227, label %198
198: ; preds = %187
%199 = and i64 %195, 9223372036854775806
br label %200
200: ; preds = %200, %198
%201 = phi i64 [ 0, %198 ], [ %224, %200 ]
%202 = phi i64 [ 0, %198 ], [ %225, %200 ]
%203 = getelementptr inbounds double, double* %3, i64 %201
%204 = bitcast double* %203 to <2 x double>*
%205 = load <2 x double>, <2 x double>* %204
%206 = getelementptr inbounds double, double* %203, i64 2
%207 = bitcast double* %206 to <2 x double>*
%208 = load <2 x double>, <2 x double>* %207
%209 = fadd <2 x double> %190, %205
%210 = fadd <2 x double> %192, %208
%211 = bitcast double* %203 to <2 x double>*
store <2 x double> %209, <2 x double>* %211
%212 = bitcast double* %206 to <2 x double>*
store <2 x double> %210, <2 x double>* %212
%213 = or i64 %201, 4
%214 = getelementptr inbounds double, double* %3, i64 %213
%215 = bitcast double* %214 to <2 x double>*
%216 = load <2 x double>, <2 x double>* %215
%217 = getelementptr inbounds double, double* %214, i64 2
%218 = bitcast double* %217 to <2 x double>*
%219 = load <2 x double>, <2 x double>* %218
%220 = fadd <2 x double> %190, %216
%221 = fadd <2 x double> %192, %219
%222 = bitcast double* %214 to <2 x double>*
store <2 x double> %220, <2 x double>* %222
%223 = bitcast double* %217 to <2 x double>*
store <2 x double> %221, <2 x double>* %223
%224 = add nuw i64 %201, 8
%225 = add i64 %202, 2
%226 = icmp eq i64 %225, %199
br i1 %226, label %227, label %200
227: ; preds = %200, %187
%228 = phi i64 [ 0, %187 ], [ %224, %200 ]
%229 = icmp eq i64 %196, 0
br i1 %229, label %241, label %230
230: ; preds = %227
%231 = getelementptr inbounds double, double* %3, i64 %228
%232 = bitcast double* %231 to <2 x double>*
%233 = load <2 x double>, <2 x double>* %232
%234 = getelementptr inbounds double, double* %231, i64 2
%235 = bitcast double* %234 to <2 x double>*
%236 = load <2 x double>, <2 x double>* %235
%237 = fadd <2 x double> %190, %233
%238 = fadd <2 x double> %192, %236
%239 = bitcast double* %231 to <2 x double>*
store <2 x double> %237, <2 x double>* %239
%240 = bitcast double* %234 to <2 x double>*
store <2 x double> %238, <2 x double>* %240
br label %241
241: ; preds = %227, %230
%242 = icmp eq i64 %188, %185
br i1 %242, label %259, label %243
243: ; preds = %184, %241
%244 = phi i64 [ 0, %184 ], [ %188, %241 ]
br label %252
245: ; preds = %179, %245
%246 = phi i64 [ %250, %245 ], [ %180, %179 ]
%247 = getelementptr inbounds double, double* %4, i64 %246
%248 = load double, double* %247
%249 = fadd double %119, %248
store double %249, double* %247
%250 = add nuw nsw i64 %246, 1
%251 = icmp eq i64 %250, %121
br i1 %251, label %181, label %245
252: ; preds = %243, %252
%253 = phi i64 [ %257, %252 ], [ %244, %243 ]
%254 = getelementptr inbounds double, double* %3, i64 %253
%255 = load double, double* %254
%256 = fadd double %182, %255
store double %256, double* %254
%257 = add nuw nsw i64 %253, 1
%258 = icmp eq i64 %257, %185
br i1 %258, label %259, label %252
259: ; preds = %252, %241, %181
ret void
}