#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 _dtram_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 (K = 0; K < n_therm_states; ++K)
    therm_energies[K] -= f0;
  for (i = 0; i < n_conf_states; ++i)
    conf_energies[i] -= f0;
}


x86 assembly (clang, -O0):
<_dtram_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 <_dtram_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 <_dtram_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,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11e0 <_dtram_normalize+0xd0>
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    11ab <_dtram_normalize+0x9b>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    121c <_dtram_normalize+0x10c>
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    11e7 <_dtram_normalize+0xd7>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dtram_normalize>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %esi,%r14d
mov    %edi,%r15d
mov    %esi,%r12d
test   %esi,%esi
jle    129d <_dtram_normalize+0x18d>
cmp    $0x4,%r14d
jb     114f <_dtram_normalize+0x3f>
lea    (%rbx,%r12,8),%rax
cmp    %rdx,%rax
jbe    11ec <_dtram_normalize+0xdc>
lea    (%rdx,%r12,8),%rax
cmp    %rbx,%rax
jbe    11ec <_dtram_normalize+0xdc>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r12,%rcx
mov    %r12,%rsi
and    $0x3,%rsi
je     1188 <_dtram_normalize+0x78>
movapd 0xe95(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rdx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rsi
jne    1170 <_dtram_normalize+0x60>
cmp    $0x3,%rcx
jb     129d <_dtram_normalize+0x18d>
movapd 0xe66(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,(%rdx,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x8(%rdx,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x10(%rdx,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
movlpd %xmm1,0x18(%rdx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r12
jne    11a0 <_dtram_normalize+0x90>
jmp    129d <_dtram_normalize+0x18d>
mov    %r12d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rcx,%rcx
je     147a <_dtram_normalize+0x36a>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
movapd 0xde5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movupd (%rbx,%rcx,8),%xmm1
movupd 0x10(%rbx,%rcx,8),%xmm2
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm2
movupd %xmm1,(%rdx,%rcx,8)
movupd %xmm2,0x10(%rdx,%rcx,8)
movupd 0x20(%rbx,%rcx,8),%xmm1
movupd 0x30(%rbx,%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    1220 <_dtram_normalize+0x110>
test   $0x1,%sil
je     1294 <_dtram_normalize+0x184>
movupd (%rbx,%rcx,8),%xmm0
movupd 0x10(%rbx,%rcx,8),%xmm1
movapd 0xd7f(%rip),%xmm2
xorpd  %xmm2,%xmm0
xorpd  %xmm2,%xmm1
movupd %xmm0,(%rdx,%rcx,8)
movupd %xmm1,0x10(%rdx,%rcx,8)
cmp    %r12,%rax
jne    1151 <_dtram_normalize+0x41>
mov    %rdx,%rdi
mov    %r14d,%esi
call   1030 <_logsumexp_sort_kahan_inplace@plt>
test   %r15d,%r15d
jle    1389 <_dtram_normalize+0x279>
mov    %r15d,%eax
cmp    $0x4,%r15d
jae    12c1 <_dtram_normalize+0x1b1>
xor    %ecx,%ecx
jmp    1370 <_dtram_normalize+0x260>
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     1460 <_dtram_normalize+0x350>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nop
movupd 0x0(%rbp,%rdx,8),%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm3
movupd 0x20(%rbp,%rdx,8),%xmm4
movupd 0x30(%rbp,%rdx,8),%xmm5
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
addpd  %xmm1,%xmm4
addpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbp,%rdx,8)
movupd %xmm5,0x30(%rbp,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    12f0 <_dtram_normalize+0x1e0>
test   $0x1,%sil
je     1360 <_dtram_normalize+0x250>
movupd 0x0(%rbp,%rdx,8),%xmm2
movupd 0x10(%rbp,%rdx,8),%xmm3
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm3,0x10(%rbp,%rdx,8)
cmp    %rax,%rcx
je     1389 <_dtram_normalize+0x279>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x0(%rbp,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1370 <_dtram_normalize+0x260>
test   %r14d,%r14d
jle    1457 <_dtram_normalize+0x347>
cmp    $0x4,%r14d
jae    139f <_dtram_normalize+0x28f>
xor    %eax,%eax
jmp    1440 <_dtram_normalize+0x330>
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     1471 <_dtram_normalize+0x361>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
xchg   %ax,%ax
movupd (%rbx,%rcx,8),%xmm2
movupd 0x10(%rbx,%rcx,8),%xmm3
movupd 0x20(%rbx,%rcx,8),%xmm4
movupd 0x30(%rbx,%rcx,8),%xmm5
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm3,0x10(%rbx,%rcx,8)
addpd  %xmm1,%xmm4
addpd  %xmm1,%xmm5
movupd %xmm4,0x20(%rbx,%rcx,8)
movupd %xmm5,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    13d0 <_dtram_normalize+0x2c0>
test   $0x1,%dl
je     143b <_dtram_normalize+0x32b>
movupd (%rbx,%rcx,8),%xmm2
movupd 0x10(%rbx,%rcx,8),%xmm3
addpd  %xmm1,%xmm2
addpd  %xmm1,%xmm3
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm3,0x10(%rbx,%rcx,8)
cmp    %r12,%rax
je     1457 <_dtram_normalize+0x347>
movsd  (%rbx,%rax,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1440 <_dtram_normalize+0x330>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    1340 <_dtram_normalize+0x230>
jmp    1360 <_dtram_normalize+0x250>
xor    %ecx,%ecx
test   $0x1,%dl
jne    141d <_dtram_normalize+0x30d>
jmp    143b <_dtram_normalize+0x32b>
xor    %ecx,%ecx
test   $0x1,%sil
jne    126e <_dtram_normalize+0x15e>
jmp    1294 <_dtram_normalize+0x184>

LLVM IR (-O0):
define void @_dtram_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* %11
br label %37
37: ; preds = %49, %32
%38 = load i32, i32* %11
%39 = load i32, i32* %6
%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** %9
%44 = load i32, i32* %11
%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* %11
%51 = add nsw i32 %50, 1
store i32 %51, i32* %11
br label %37
52: ; preds = %37
store i32 0, i32* %12
br label %53
53: ; preds = %65, %52
%54 = load i32, i32* %12
%55 = load i32, i32* %7
%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** %10
%60 = load i32, i32* %12
%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* %12
%67 = add nsw i32 %66, 1
store i32 %67, i32* %12
br label %53
68: ; preds = %53
ret void
}

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