void layer_resize_forward(const int A, const int B, const double *input,
                          double *output) {
  for (int i = 0; i < B; i++) {
    output[i] = 0.0;
  }
  if (A < B) {
    int j = 0;
    while (j < B) {
      for (int i = 0; i < A && j < B; ++i, ++j) {
        output[j] = input[i];
      }
    }
  } else {
    for (int i = 0; i < B; ++i) {
      output[i] = input[i];
    }
  }
}


x86 assembly (clang, -O0):
<layer_resize_forward>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <layer_resize_forward+0x43>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <layer_resize_forward+0x19>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d1 <layer_resize_forward+0xd1>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11cc <layer_resize_forward+0xcc>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
xor    %eax,%eax
cmp    -0x4(%rbp),%ecx
mov    %al,-0x29(%rbp)
jge    1186 <layer_resize_forward+0x86>
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    1196 <layer_resize_forward+0x96>
jmp    11c7 <layer_resize_forward+0xc7>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1169 <layer_resize_forward+0x69>
jmp    1156 <layer_resize_forward+0x56>
jmp    1211 <layer_resize_forward+0x111>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    120c <layer_resize_forward+0x10c>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11d8 <layer_resize_forward+0xd8>
jmp    1211 <layer_resize_forward+0x111>
pop    %rbp
ret

x86 assembly (clang, -O2):
<layer_resize_forward>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %esi,%esi
jle    14b4 <layer_resize_forward+0x3a4>
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r12d
mov    %edi,%eax
mov    %esi,%r13d
lea    0x0(,%r13,8),%rdx
xor    %ebp,%ebp
mov    %rcx,%rdi
xor    %esi,%esi
mov    %eax,0xc(%rsp)
call   1030 <memset@plt>
mov    0xc(%rsp),%r10d
cmp    %r12d,%r10d
jge    134c <layer_resize_forward+0x23c>
movslq %r10d,%rcx
movslq %r12d,%rdx
lea    0x8(%r14),%rax
mov    %rax,0x30(%rsp)
lea    -0x1(%rcx),%r15
lea    0x8(%rbx),%r11
lea    0x70(%r14),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rbx),%rax
mov    %rax,0x20(%rsp)
lea    0x10(%r14),%rax
mov    %rax,0x18(%rsp)
mov    $0x1,%r13d
mov    %r11,0x28(%rsp)
jmp    11a9 <layer_resize_forward+0x99>
nopl   0x0(%rax)
cmp    %r12d,%ebp
jge    14b4 <layer_resize_forward+0x3a4>
test   %r10d,%r10d
jle    11a0 <layer_resize_forward+0x90>
cmp    %r12d,%ebp
jge    11a0 <layer_resize_forward+0x90>
movslq %ebp,%rbp
mov    %rbp,%rsi
not    %rsi
add    %rdx,%rsi
cmp    %r15,%rsi
mov    %r15,%r9
cmovb  %rsi,%r9
add    $0x1,%r9
test   %r15,%r15
cmove  %r13,%r9
cmp    $0x4,%r9
jb     1206 <layer_resize_forward+0xf6>
cmp    %r15,%rsi
cmovae %r15,%rsi
test   %r15,%r15
lea    (%r14,%rbp,8),%rax
cmove  %r15,%rsi
lea    (%r11,%rsi,8),%rdi
cmp    %rdi,%rax
jae    1238 <layer_resize_forward+0x128>
add    %rbp,%rsi
mov    0x30(%rsp),%rax
lea    (%rax,%rsi,8),%rax
cmp    %rbx,%rax
jbe    1238 <layer_resize_forward+0x128>
xor    %r8d,%r8d
add    $0x1,%r8
nopl   (%rax)
movsd  -0x8(%rbx,%r8,8),%xmm0
movsd  %xmm0,(%r14,%rbp,8)
add    $0x1,%rbp
cmp    %rcx,%r8
jge    11a0 <layer_resize_forward+0x90>
add    $0x1,%r8
cmp    %rdx,%rbp
jl     1210 <layer_resize_forward+0x100>
jmp    11a0 <layer_resize_forward+0x90>
mov    %r9,%r8
and    $0xfffffffffffffffc,%r8
lea    -0x4(%r8),%rax
mov    %rax,%r10
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10d,%r11d
and    $0x3,%r11d
cmp    $0xc,%rax
jae    1263 <layer_resize_forward+0x153>
xor    %r13d,%r13d
jmp    12e8 <layer_resize_forward+0x1d8>
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%r10
mov    0x10(%rsp),%rax
lea    (%rax,%rbp,8),%rsi
xor    %r13d,%r13d
nopl   0x0(%rax)
movups (%rbx,%r13,8),%xmm0
movups 0x10(%rbx,%r13,8),%xmm1
movups %xmm0,-0x70(%rsi,%r13,8)
movups %xmm1,-0x60(%rsi,%r13,8)
movups 0x20(%rbx,%r13,8),%xmm0
movups 0x30(%rbx,%r13,8),%xmm1
movups %xmm0,-0x50(%rsi,%r13,8)
movups %xmm1,-0x40(%rsi,%r13,8)
movups 0x40(%rbx,%r13,8),%xmm0
movups 0x50(%rbx,%r13,8),%xmm1
movups %xmm0,-0x30(%rsi,%r13,8)
movups %xmm1,-0x20(%rsi,%r13,8)
movups 0x60(%rbx,%r13,8),%xmm0
movups 0x70(%rbx,%r13,8),%xmm1
movups %xmm0,-0x10(%rsi,%r13,8)
movups %xmm1,(%rsi,%r13,8)
add    $0x10,%r13
add    $0xfffffffffffffffc,%r10
jne    1280 <layer_resize_forward+0x170>
test   %r11,%r11
je     132b <layer_resize_forward+0x21b>
mov    0x20(%rsp),%rax
lea    (%rax,%r13,8),%rsi
add    %rbp,%r13
mov    0x18(%rsp),%rax
lea    (%rax,%r13,8),%rax
shl    $0x5,%r11
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rax,%rdi,1)
movups %xmm1,(%rax,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%r11
jne    1310 <layer_resize_forward+0x200>
add    %r8,%rbp
cmp    %r8,%r9
mov    0xc(%rsp),%r10d
mov    0x28(%rsp),%r11
mov    $0x1,%r13d
je     11a0 <layer_resize_forward+0x90>
jmp    1209 <layer_resize_forward+0xf9>
cmp    $0x4,%r12d
jb     136c <layer_resize_forward+0x25c>
lea    (%rbx,%r13,8),%rax
cmp    %r14,%rax
jbe    13e0 <layer_resize_forward+0x2d0>
lea    (%r14,%r13,8),%rax
cmp    %rbx,%rax
jbe    13e0 <layer_resize_forward+0x2d0>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r13,%rcx
mov    %r13,%rdx
and    $0x3,%rdx
je     1395 <layer_resize_forward+0x285>
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1380 <layer_resize_forward+0x270>
cmp    $0x3,%rcx
jb     14b4 <layer_resize_forward+0x3a4>
nop
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r13
jne    13a0 <layer_resize_forward+0x290>
jmp    14b4 <layer_resize_forward+0x3a4>
mov    %r13d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    1404 <layer_resize_forward+0x2f4>
xor    %esi,%esi
jmp    1470 <layer_resize_forward+0x360>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movups (%rbx,%rsi,8),%xmm0
movups 0x10(%rbx,%rsi,8),%xmm1
movups %xmm0,(%r14,%rsi,8)
movups %xmm1,0x10(%r14,%rsi,8)
movups 0x20(%rbx,%rsi,8),%xmm0
movups 0x30(%rbx,%rsi,8),%xmm1
movups %xmm0,0x20(%r14,%rsi,8)
movups %xmm1,0x30(%r14,%rsi,8)
movups 0x40(%rbx,%rsi,8),%xmm0
movups 0x50(%rbx,%rsi,8),%xmm1
movups %xmm0,0x40(%r14,%rsi,8)
movups %xmm1,0x50(%r14,%rsi,8)
movups 0x60(%rbx,%rsi,8),%xmm0
movups 0x70(%rbx,%rsi,8),%xmm1
movups %xmm0,0x60(%r14,%rsi,8)
movups %xmm1,0x70(%r14,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1410 <layer_resize_forward+0x300>
test   %rcx,%rcx
je     14ab <layer_resize_forward+0x39b>
lea    (%r14,%rsi,8),%rdx
add    $0x10,%rdx
lea    (%rbx,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1490 <layer_resize_forward+0x380>
cmp    %r13,%rax
jne    136e <layer_resize_forward+0x25e>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @layer_resize_forward(i32 %0, i32 %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %13
13: ; preds = %22, %4
%14 = load i32, i32* %9
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %25
17: ; preds = %13
%18 = load double*, double** %8
%19 = load i32, i32* %9
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
store double 0.000000e+00, double* %21
br label %22
22: ; preds = %17
%23 = load i32, i32* %9
%24 = add nsw i32 %23, 1
store i32 %24, i32* %9
br label %13
25: ; preds = %13
%26 = load i32, i32* %5
%27 = load i32, i32* %6
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %62
29: ; preds = %25
store i32 0, i32* %10
br label %30
30: ; preds = %60, %29
%31 = load i32, i32* %10
%32 = load i32, i32* %6
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %61
34: ; preds = %30
store i32 0, i32* %11
br label %35
35: ; preds = %55, %34
%36 = load i32, i32* %11
%37 = load i32, i32* %5
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = load i32, i32* %10
%41 = load i32, i32* %6
%42 = icmp slt i32 %40, %41
br label %43
43: ; preds = %39, %35
%44 = phi i1 [ false, %35 ], [ %42, %39 ]
br i1 %44, label %45, label %60
45: ; preds = %43
%46 = load double*, double** %7
%47 = load i32, i32* %11
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %46, i64 %48
%50 = load double, double* %49
%51 = load double*, double** %8
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
store double %50, double* %54
br label %55
55: ; preds = %45
%56 = load i32, i32* %11
%57 = add nsw i32 %56, 1
store i32 %57, i32* %11
%58 = load i32, i32* %10
%59 = add nsw i32 %58, 1
store i32 %59, i32* %10
br label %35
60: ; preds = %43
br label %30
61: ; preds = %30
br label %81
62: ; preds = %25
store i32 0, i32* %12
br label %63
63: ; preds = %77, %62
%64 = load i32, i32* %12
%65 = load i32, i32* %6
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %80
67: ; preds = %63
%68 = load double*, double** %7
%69 = load i32, i32* %12
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
%72 = load double, double* %71
%73 = load double*, double** %8
%74 = load i32, i32* %12
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %73, i64 %75
store double %72, double* %76
br label %77
77: ; preds = %67
%78 = load i32, i32* %12
%79 = add nsw i32 %78, 1
store i32 %79, i32* %12
br label %63
80: ; preds = %63
br label %81
81: ; preds = %80, %61
ret void
}

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