void cshift(double *data, int nx, int ny, int axis, int direction) {
  int x, y;
  double b;
  if (axis == 0 && direction == 1) {
    for (y = 0; y != ny; y++) {
      b = *(data + y);
      for (x = 0; x != nx - 1; x++) {
        *(data + y + ny * x) = *(data + y + ny * (x + 1));
      }
      *(data + y + ny * x) = b;
    }
  }
  if (axis == 0 && direction == -1) {
    for (y = 0; y != ny; y++) {
      b = *(data + y + ny * (nx - 1));
      for (x = nx - 1; x >= 0; x--) {
        *(data + y + ny * (x + 1)) = *(data + y + ny * x);
      }
      *(data + y) = b;
    }
  }
  if (axis == 1 && direction == 1) {
    for (x = 0; x < nx; x++) {
      b = *(data + x * ny);
      for (y = 0; y != ny; y++) {
        *(data + y + ny * x) = *(data + y + 1 + ny * x);
      }
      *(data + y - 1 + ny * x) = b;
    }
  }
  if (axis == 1 && direction == -1) {
    for (x = 0; x < nx; x++) {
      b = *(data + ny - 1 + ny * x);
      for (y = ny - 2; y >= 0; y--) {
        *(data + y + 1 + ny * x) = *(data + y + ny * x);
      }
      *(data + x * ny) = b;
    }
  }
}


x86 assembly (clang, -O0):
<cshift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    11eb <cshift+0xeb>
cmpl   $0x1,-0x18(%rbp)
jne    11eb <cshift+0xeb>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     11e6 <cshift+0xe6>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     11b5 <cshift+0xb5>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <cshift+0x55>
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1130 <cshift+0x30>
jmp    11eb <cshift+0xeb>
cmpl   $0x0,-0x14(%rbp)
jne    12c1 <cshift+0x1c1>
cmpl   $0xffffffff,-0x18(%rbp)
jne    12c1 <cshift+0x1c1>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     12bc <cshift+0x1bc>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     129c <cshift+0x19c>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1243 <cshift+0x143>
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1206 <cshift+0x106>
jmp    12c1 <cshift+0x1c1>
cmpl   $0x1,-0x14(%rbp)
jne    1395 <cshift+0x295>
cmpl   $0x1,-0x18(%rbp)
jne    1395 <cshift+0x295>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1390 <cshift+0x290>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     135e <cshift+0x25e>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1307 <cshift+0x207>
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,-0x8(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12dc <cshift+0x1dc>
jmp    1395 <cshift+0x295>
cmpl   $0x1,-0x14(%rbp)
jne    1469 <cshift+0x369>
cmpl   $0xffffffff,-0x18(%rbp)
jne    1469 <cshift+0x369>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1464 <cshift+0x364>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  -0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jl     143e <cshift+0x33e>
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,0x8(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    13e9 <cshift+0x2e9>
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13b0 <cshift+0x2b0>
jmp    1469 <cshift+0x369>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cshift>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r8d,-0x4c(%rsp)
mov    %rsi,-0x28(%rsp)
movslq %edx,%rax
mov    %rax,-0x48(%rsp)
mov    %rdx,-0x20(%rsp)
mov    %edx,%eax
mov    %rax,-0x8(%rsp)
mov    %ecx,-0x34(%rsp)
test   %ecx,%ecx
mov    %rdi,-0x40(%rsp)
jne    1278 <cshift+0x178>
cmpl   $0x1,-0x4c(%rsp)
jne    1278 <cshift+0x178>
cmpl   $0x0,-0x20(%rsp)
je     1278 <cshift+0x178>
mov    -0x28(%rsp),%rax
lea    -0x1(%rax),%r11d
mov    %r11d,%eax
imul   -0x20(%rsp),%eax
movslq %eax,%r8
lea    -0x1(%r11),%rax
mov    %rax,-0x30(%rsp)
mov    %r11d,%r12d
and    $0x3,%r12d
mov    %r11d,%r9d
and    $0xfffffffc,%r9d
mov    -0x48(%rsp),%rax
mov    %rax,%r15
shl    $0x4,%r15
mov    %rax,%rcx
shl    $0x5,%rcx
lea    0x0(,%rax,8),%r10
lea    (%r10,%r10,2),%rax
xor    %r13d,%r13d
mov    %rdi,%r14
jmp    11d2 <cshift+0xd2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    -0x40(%rsp),%rdi
lea    (%rdi,%r13,8),%rdx
movsd  %xmm0,(%rdx,%r8,8)
add    $0x1,%r13
add    $0x8,%r14
cmp    -0x8(%rsp),%r13
je     1278 <cshift+0x178>
movsd  (%rdi,%r13,8),%xmm0
test   %r11d,%r11d
je     11b0 <cshift+0xb0>
cmpq   $0x3,-0x30(%rsp)
jae    11f0 <cshift+0xf0>
xor    %esi,%esi
jmp    1235 <cshift+0x135>
nopl   0x0(%rax)
mov    %r14,%rdx
xor    %esi,%esi
mov    -0x48(%rsp),%rdi
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rdi,8),%xmm1
movsd  %xmm1,(%rdx)
movsd  (%rdx,%r15,1),%xmm1
movsd  %xmm1,(%rdx,%rdi,8)
movsd  (%rdx,%rax,1),%xmm1
movsd  %xmm1,(%rdx,%r15,1)
add    $0x4,%rsi
movsd  (%rdx,%rcx,1),%xmm1
movsd  %xmm1,(%rdx,%rax,1)
add    %rcx,%rdx
cmp    %rsi,%r9
jne    1200 <cshift+0x100>
test   %r12,%r12
je     11b0 <cshift+0xb0>
mov    %r10,%rdx
imul   %rsi,%rdx
add    $0x1,%rsi
imul   %r10,%rsi
mov    %r12,%rbp
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%rsi,1),%xmm1
movsd  %xmm1,(%rbx,%rdx,1)
add    %r10,%rbx
add    $0xffffffffffffffff,%rbp
jne    1260 <cshift+0x160>
jmp    11b0 <cshift+0xb0>
cmpl   $0x0,-0x34(%rsp)
jne    13fa <cshift+0x2fa>
cmpl   $0xffffffff,-0x4c(%rsp)
jne    13fa <cshift+0x2fa>
cmpl   $0x0,-0x20(%rsp)
je     13fa <cshift+0x2fa>
mov    -0x28(%rsp),%rcx
lea    -0x1(%rcx),%eax
imul   -0x20(%rsp),%eax
cltq
mov    %rax,-0x10(%rsp)
movslq %ecx,%rsi
lea    -0x1(%rsi),%rbp
and    $0x3,%ecx
mov    -0x48(%rsp),%rdx
mov    %rdx,%rax
mov    %rsi,-0x30(%rsp)
imul   %rsi,%rax
mov    -0x40(%rsp),%r9
lea    (%r9,%rax,8),%rdi
lea    0x0(,%rdx,8),%rsi
mov    %rbp,-0x18(%rsp)
mov    %rbp,%rax
imul   %rdx,%rax
lea    (%r9,%rax,8),%rbx
mov    %rdx,%rax
shl    $0x5,%rax
neg    %rax
xor    %r12d,%r12d
jmp    1320 <cshift+0x220>
nopl   0x0(%rax,%rax,1)
movsd  %xmm0,(%r15)
add    $0x1,%r12
add    $0x8,%rdi
add    $0x8,%rbx
add    $0x8,%r9
cmp    -0x8(%rsp),%r12
je     13fa <cshift+0x2fa>
mov    -0x40(%rsp),%rdx
lea    (%rdx,%r12,8),%rbp
mov    -0x10(%rsp),%rdx
mov    %rbp,%r15
movsd  0x0(%rbp,%rdx,8),%xmm0
cmpl   $0x0,-0x28(%rsp)
jle    1300 <cshift+0x200>
mov    -0x30(%rsp),%r11
test   %rcx,%rcx
je     136e <cshift+0x26e>
xor    %ebp,%ebp
xor    %edx,%edx
nopl   0x0(%rax)
movsd  (%rbx,%rbp,1),%xmm1
movsd  %xmm1,(%rdi,%rbp,1)
add    $0x1,%rdx
sub    %rsi,%rbp
cmp    %rdx,%rcx
jne    1350 <cshift+0x250>
mov    -0x30(%rsp),%r11
sub    %rdx,%r11
cmpq   $0x3,-0x18(%rsp)
jb     1300 <cshift+0x200>
lea    0x4(%r11),%r14
lea    -0x4(%r11),%rdx
imul   %rsi,%rdx
lea    -0x3(%r11),%r8
imul   %rsi,%r8
lea    -0x2(%r11),%r10
imul   %rsi,%r10
mov    %rsi,%rbp
imul   %r11,%rbp
add    $0xffffffffffffffff,%r11
imul   %rsi,%r11
mov    %r9,%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0x0(%r13,%r11,1),%xmm1
movsd  %xmm1,0x0(%r13,%rbp,1)
movsd  0x0(%r13,%r10,1),%xmm1
movsd  %xmm1,0x0(%r13,%r11,1)
movsd  0x0(%r13,%r8,1),%xmm1
movsd  %xmm1,0x0(%r13,%r10,1)
movsd  0x0(%r13,%rdx,1),%xmm1
movsd  %xmm1,0x0(%r13,%r8,1)
add    $0xfffffffffffffffc,%r14
add    %rax,%r13
cmp    $0x4,%r14
jg     13b0 <cshift+0x2b0>
jmp    1300 <cshift+0x200>
mov    -0x28(%rsp),%r14d
cmpl   $0x1,-0x34(%rsp)
mov    -0x20(%rsp),%r10
mov    -0x40(%rsp),%rsi
mov    -0x8(%rsp),%rbp
jne    15a9 <cshift+0x4a9>
cmpl   $0x1,-0x4c(%rsp)
jne    15a9 <cshift+0x4a9>
cmpl   $0x0,-0x28(%rsp)
jle    15a9 <cshift+0x4a9>
lea    (%rsi,%rbp,8),%r11
add    $0xfffffffffffffff8,%r11
mov    %ebp,%r13d
and    $0xfffffffc,%r13d
lea    -0x4(%r13),%rax
mov    %rax,-0x30(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %eax,%r12d
and    $0x3,%r12d
and    $0xfffffffffffffffc,%rax
mov    %rax,-0x18(%rsp)
lea    0x78(%rsi),%rbx
mov    -0x48(%rsp),%rax
lea    0x0(,%rax,8),%r9
mov    %r12,-0x10(%rsp)
shl    $0x5,%r12
lea    0x18(%rsi),%r8
xor    %ecx,%ecx
mov    %rsi,%rdi
jmp    14ac <cshift+0x3ac>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  %xmm0,(%r11,%rax,8)
add    $0x1,%rcx
add    %r9,%rbx
add    %r9,%r8
add    %r9,%rdi
cmp    %r14,%rcx
je     15a9 <cshift+0x4a9>
mov    %rcx,%rax
imul   -0x48(%rsp),%rax
movsd  (%rsi,%rax,8),%xmm0
test   %r10d,%r10d
je     1490 <cshift+0x390>
cmp    $0x4,%r10d
jae    14d0 <cshift+0x3d0>
xor    %edx,%edx
jmp    1590 <cshift+0x490>
nopl   0x0(%rax)
cmpq   $0xc,-0x30(%rsp)
jae    14dc <cshift+0x3dc>
xor    %edx,%edx
jmp    1549 <cshift+0x449>
mov    -0x18(%rsp),%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x70(%rbx,%rdx,8),%xmm1
movups -0x60(%rbx,%rdx,8),%xmm2
movups -0x50(%rbx,%rdx,8),%xmm3
movups -0x40(%rbx,%rdx,8),%xmm4
movups %xmm1,-0x78(%rbx,%rdx,8)
movups %xmm2,-0x68(%rbx,%rdx,8)
movups %xmm3,-0x58(%rbx,%rdx,8)
movups %xmm4,-0x48(%rbx,%rdx,8)
movups -0x30(%rbx,%rdx,8),%xmm1
movups -0x20(%rbx,%rdx,8),%xmm2
movups %xmm1,-0x38(%rbx,%rdx,8)
movups %xmm2,-0x28(%rbx,%rdx,8)
movups -0x10(%rbx,%rdx,8),%xmm1
movups (%rbx,%rdx,8),%xmm2
movups %xmm1,-0x18(%rbx,%rdx,8)
movups %xmm2,-0x8(%rbx,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%rsi
jne    14f0 <cshift+0x3f0>
cmpq   $0x0,-0x10(%rsp)
je     157c <cshift+0x47c>
lea    (%r8,%rdx,8),%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movups -0x10(%rdx,%rsi,1),%xmm1
movups (%rdx,%rsi,1),%xmm2
movups %xmm1,-0x18(%rdx,%rsi,1)
movups %xmm2,-0x8(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r12
jne    1560 <cshift+0x460>
mov    %r13,%rdx
cmp    %rbp,%r13
mov    -0x40(%rsp),%rsi
je     1490 <cshift+0x390>
nopl   (%rax)
movsd  0x8(%rdi,%rdx,8),%xmm1
movsd  %xmm1,(%rdi,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rbp
jne    1590 <cshift+0x490>
jmp    1490 <cshift+0x390>
cmpl   $0x1,-0x34(%rsp)
jne    1680 <cshift+0x580>
cmpl   $0xffffffff,-0x4c(%rsp)
jne    1680 <cshift+0x580>
cmpl   $0x0,-0x28(%rsp)
jle    1680 <cshift+0x580>
mov    -0x40(%rsp),%rax
mov    -0x48(%rsp),%rcx
lea    (%rax,%rcx,8),%r9
add    $0xfffffffffffffff8,%r9
lea    -0x2(%r10),%r11d
lea    -0x1(%r10),%r8d
and    $0x3,%r8d
lea    0x8(%rax),%rdi
lea    0x0(,%rcx,8),%rbp
lea    -0x18(%rax),%rbx
xor    %esi,%esi
jmp    1619 <cshift+0x519>
nopl   0x0(%rax)
mov    -0x40(%rsp),%rcx
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%rsi
add    %rbp,%rdi
add    %rbp,%rbx
cmp    %r14,%rsi
je     1680 <cshift+0x580>
mov    %rsi,%rax
imul   -0x48(%rsp),%rax
movsd  (%r9,%rax,8),%xmm0
cmp    $0x2,%r10d
jl     1600 <cshift+0x500>
mov    %r11,%rcx
test   %r8,%r8
je     1655 <cshift+0x555>
mov    %r8,%rdx
mov    %r11,%rcx
nopl   0x0(%rax)
movsd  -0x8(%rdi,%rcx,8),%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
add    $0xffffffffffffffff,%rcx
add    $0xffffffffffffffff,%rdx
jne    1640 <cshift+0x540>
cmp    $0x3,%r11d
jb     1600 <cshift+0x500>
add    $0x4,%rcx
nop
movups -0x20(%rbx,%rcx,8),%xmm1
movups -0x10(%rbx,%rcx,8),%xmm2
movups %xmm2,-0x8(%rbx,%rcx,8)
movups %xmm1,-0x18(%rbx,%rcx,8)
add    $0xfffffffffffffffc,%rcx
cmp    $0x3,%rcx
jg     1660 <cshift+0x560>
jmp    1600 <cshift+0x500>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @cshift(double* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %3, 0
%7 = icmp eq i32 %4, 1
%8 = and i1 %6, %7
%9 = icmp ne i32 %2, 0
%10 = and i1 %8, %9
br i1 %10, label %11, label %75
11: ; preds = %5
%12 = add nsw i32 %1, -1
%13 = icmp eq i32 %12, 0
%14 = sext i32 %2 to i64
%15 = zext i32 %12 to i64
%16 = zext i32 %2 to i64
%17 = mul nsw i32 %12, %2
%18 = sext i32 %17 to i64
%19 = add nsw i64 %15, -1
%20 = and i64 %15, 3
%21 = icmp ult i64 %19, 3
%22 = and i64 %15, 4294967292
%23 = icmp eq i64 %20, 0
br label %24
24: ; preds = %11, %71
%25 = phi i64 [ 0, %11 ], [ %73, %71 ]
%26 = getelementptr inbounds double, double* %0, i64 %25
%27 = load double, double* %26
br i1 %13, label %71, label %28
28: ; preds = %24
br i1 %21, label %58, label %29
29: ; preds = %28, %29
%30 = phi i64 [ %50, %29 ], [ 0, %28 ]
%31 = phi i64 [ %56, %29 ], [ 0, %28 ]
%32 = or i64 %30, 1
%33 = mul nsw i64 %32, %14
%34 = getelementptr inbounds double, double* %26, i64 %33
%35 = load double, double* %34
%36 = mul nsw i64 %30, %14
%37 = getelementptr inbounds double, double* %26, i64 %36
store double %35, double* %37
%38 = or i64 %30, 2
%39 = mul nsw i64 %38, %14
%40 = getelementptr inbounds double, double* %26, i64 %39
%41 = load double, double* %40
%42 = mul nsw i64 %32, %14
%43 = getelementptr inbounds double, double* %26, i64 %42
store double %41, double* %43
%44 = or i64 %30, 3
%45 = mul nsw i64 %44, %14
%46 = getelementptr inbounds double, double* %26, i64 %45
%47 = load double, double* %46
%48 = mul nsw i64 %38, %14
%49 = getelementptr inbounds double, double* %26, i64 %48
store double %47, double* %49
%50 = add nuw nsw i64 %30, 4
%51 = mul nsw i64 %50, %14
%52 = getelementptr inbounds double, double* %26, i64 %51
%53 = load double, double* %52
%54 = mul nsw i64 %44, %14
%55 = getelementptr inbounds double, double* %26, i64 %54
store double %53, double* %55
%56 = add i64 %31, 4
%57 = icmp eq i64 %56, %22
br i1 %57, label %58, label %29
58: ; preds = %29, %28
%59 = phi i64 [ 0, %28 ], [ %50, %29 ]
br i1 %23, label %71, label %60
60: ; preds = %58, %60
%61 = phi i64 [ %63, %60 ], [ %59, %58 ]
%62 = phi i64 [ %69, %60 ], [ 0, %58 ]
%63 = add nuw nsw i64 %61, 1
%64 = mul nsw i64 %63, %14
%65 = getelementptr inbounds double, double* %26, i64 %64
%66 = load double, double* %65
%67 = mul nsw i64 %61, %14
%68 = getelementptr inbounds double, double* %26, i64 %67
store double %66, double* %68
%69 = add i64 %62, 1
%70 = icmp eq i64 %69, %20
br i1 %70, label %71, label %60
71: ; preds = %58, %60, %24
%72 = getelementptr inbounds double, double* %26, i64 %18
store double %27, double* %72
%73 = add nuw nsw i64 %25, 1
%74 = icmp eq i64 %73, %16
br i1 %74, label %75, label %24
75: ; preds = %71, %5
%76 = icmp eq i32 %4, -1
%77 = and i1 %6, %76
%78 = and i1 %77, %9
br i1 %78, label %79, label %140
79: ; preds = %75
%80 = add nsw i32 %1, -1
%81 = mul nsw i32 %80, %2
%82 = sext i32 %81 to i64
%83 = icmp sgt i32 %1, 0
%84 = sext i32 %1 to i64
%85 = sext i32 %2 to i64
%86 = zext i32 %2 to i64
%87 = add nsw i64 %84, -1
%88 = and i64 %84, 3
%89 = icmp eq i64 %88, 0
%90 = icmp ult i64 %87, 3
br label %91
91: ; preds = %79, %137
%92 = phi i64 [ 0, %79 ], [ %138, %137 ]
%93 = getelementptr inbounds double, double* %0, i64 %92
%94 = getelementptr inbounds double, double* %93, i64 %82
%95 = load double, double* %94
br i1 %83, label %96, label %137
96: ; preds = %91
br i1 %89, label %108, label %97
97: ; preds = %96, %97
%98 = phi i64 [ %100, %97 ], [ %84, %96 ]
%99 = phi i64 [ %106, %97 ], [ 0, %96 ]
%100 = add nsw i64 %98, -1
%101 = mul nsw i64 %100, %85
%102 = getelementptr inbounds double, double* %93, i64 %101
%103 = load double, double* %102
%104 = mul nsw i64 %98, %85
%105 = getelementptr inbounds double, double* %93, i64 %104
store double %103, double* %105
%106 = add i64 %99, 1
%107 = icmp eq i64 %106, %88
br i1 %107, label %108, label %97
108: ; preds = %97, %96
%109 = phi i64 [ %84, %96 ], [ %100, %97 ]
br i1 %90, label %137, label %110
110: ; preds = %108, %110
%111 = phi i64 [ %130, %110 ], [ %109, %108 ]
%112 = add nsw i64 %111, -1
%113 = mul nsw i64 %112, %85
%114 = getelementptr inbounds double, double* %93, i64 %113
%115 = load double, double* %114
%116 = mul nsw i64 %111, %85
%117 = getelementptr inbounds double, double* %93, i64 %116
store double %115, double* %117
%118 = add nsw i64 %111, -2
%119 = mul nsw i64 %118, %85
%120 = getelementptr inbounds double, double* %93, i64 %119
%121 = load double, double* %120
%122 = mul nsw i64 %112, %85
%123 = getelementptr inbounds double, double* %93, i64 %122
store double %121, double* %123
%124 = add nsw i64 %111, -3
%125 = mul nsw i64 %124, %85
%126 = getelementptr inbounds double, double* %93, i64 %125
%127 = load double, double* %126
%128 = mul nsw i64 %118, %85
%129 = getelementptr inbounds double, double* %93, i64 %128
store double %127, double* %129
%130 = add nsw i64 %111, -4
%131 = mul nsw i64 %130, %85
%132 = getelementptr inbounds double, double* %93, i64 %131
%133 = load double, double* %132
%134 = mul nsw i64 %124, %85
%135 = getelementptr inbounds double, double* %93, i64 %134
store double %133, double* %135
%136 = icmp sgt i64 %111, 4
br i1 %136, label %110, label %137
137: ; preds = %108, %110, %91
store double %95, double* %93
%138 = add nuw nsw i64 %92, 1
%139 = icmp eq i64 %138, %86
br i1 %139, label %140, label %91
140: ; preds = %137, %75
%141 = icmp eq i32 %3, 1
%142 = and i1 %141, %7
%143 = icmp sgt i32 %1, 0
%144 = and i1 %142, %143
br i1 %144, label %145, label %264
145: ; preds = %140
%146 = icmp eq i32 %2, 0
%147 = zext i32 %2 to i64
%148 = sext i32 %2 to i64
%149 = zext i32 %1 to i64
%150 = zext i32 %2 to i64
%151 = getelementptr inbounds double, double* %0, i64 -1
%152 = getelementptr inbounds double, double* %151, i64 %150
%153 = and i64 %147, 4294967292
%154 = add nsw i64 %153, -4
%155 = lshr exact i64 %154, 2
%156 = add nuw nsw i64 %155, 1
%157 = icmp ult i32 %2, 4
%158 = and i64 %147, 4294967292
%159 = and i64 %156, 3
%160 = icmp ult i64 %154, 12
%161 = and i64 %156, 9223372036854775804
%162 = icmp eq i64 %159, 0
%163 = icmp eq i64 %158, %147
br label %164
164: ; preds = %145, %260
%165 = phi i64 [ 0, %145 ], [ %262, %260 ]
%166 = mul nsw i64 %165, %148
%167 = getelementptr inbounds double, double* %0, i64 %166
%168 = load double, double* %167
br i1 %146, label %260, label %169
169: ; preds = %164
br i1 %157, label %249, label %170
170: ; preds = %169
br i1 %160, label %228, label %171
171: ; preds = %170, %171
%172 = phi i64 [ %225, %171 ], [ 0, %170 ]
%173 = phi i64 [ %226, %171 ], [ 0, %170 ]
%174 = getelementptr inbounds double, double* %0, i64 %172
%175 = getelementptr inbounds double, double* %174, i64 1
%176 = getelementptr inbounds double, double* %175, i64 %166
%177 = bitcast double* %176 to <2 x double>*
%178 = load <2 x double>, <2 x double>* %177
%179 = getelementptr inbounds double, double* %176, i64 2
%180 = bitcast double* %179 to <2 x double>*
%181 = load <2 x double>, <2 x double>* %180
%182 = getelementptr inbounds double, double* %174, i64 %166
%183 = bitcast double* %182 to <2 x double>*
store <2 x double> %178, <2 x double>* %183
%184 = getelementptr inbounds double, double* %182, i64 2
%185 = bitcast double* %184 to <2 x double>*
store <2 x double> %181, <2 x double>* %185
%186 = or i64 %172, 4
%187 = getelementptr inbounds double, double* %0, i64 %186
%188 = getelementptr inbounds double, double* %187, i64 1
%189 = getelementptr inbounds double, double* %188, i64 %166
%190 = bitcast double* %189 to <2 x double>*
%191 = load <2 x double>, <2 x double>* %190
%192 = getelementptr inbounds double, double* %189, i64 2
%193 = bitcast double* %192 to <2 x double>*
%194 = load <2 x double>, <2 x double>* %193
%195 = getelementptr inbounds double, double* %187, i64 %166
%196 = bitcast double* %195 to <2 x double>*
store <2 x double> %191, <2 x double>* %196
%197 = getelementptr inbounds double, double* %195, i64 2
%198 = bitcast double* %197 to <2 x double>*
store <2 x double> %194, <2 x double>* %198
%199 = or i64 %172, 8
%200 = getelementptr inbounds double, double* %0, i64 %199
%201 = getelementptr inbounds double, double* %200, i64 1
%202 = getelementptr inbounds double, double* %201, i64 %166
%203 = bitcast double* %202 to <2 x double>*
%204 = load <2 x double>, <2 x double>* %203
%205 = getelementptr inbounds double, double* %202, i64 2
%206 = bitcast double* %205 to <2 x double>*
%207 = load <2 x double>, <2 x double>* %206
%208 = getelementptr inbounds double, double* %200, i64 %166
%209 = bitcast double* %208 to <2 x double>*
store <2 x double> %204, <2 x double>* %209
%210 = getelementptr inbounds double, double* %208, i64 2
%211 = bitcast double* %210 to <2 x double>*
store <2 x double> %207, <2 x double>* %211
%212 = or i64 %172, 12
%213 = getelementptr inbounds double, double* %0, i64 %212
%214 = getelementptr inbounds double, double* %213, i64 1
%215 = getelementptr inbounds double, double* %214, i64 %166
%216 = bitcast double* %215 to <2 x double>*
%217 = load <2 x double>, <2 x double>* %216
%218 = getelementptr inbounds double, double* %215, i64 2
%219 = bitcast double* %218 to <2 x double>*
%220 = load <2 x double>, <2 x double>* %219
%221 = getelementptr inbounds double, double* %213, i64 %166
%222 = bitcast double* %221 to <2 x double>*
store <2 x double> %217, <2 x double>* %222
%223 = getelementptr inbounds double, double* %221, i64 2
%224 = bitcast double* %223 to <2 x double>*
store <2 x double> %220, <2 x double>* %224
%225 = add nuw i64 %172, 16
%226 = add nuw i64 %173, 4
%227 = icmp eq i64 %226, %161
br i1 %227, label %228, label %171
228: ; preds = %171, %170
%229 = phi i64 [ 0, %170 ], [ %225, %171 ]
br i1 %162, label %248, label %230
230: ; preds = %228, %230
%231 = phi i64 [ %245, %230 ], [ %229, %228 ]
%232 = phi i64 [ %246, %230 ], [ 0, %228 ]
%233 = getelementptr inbounds double, double* %0, i64 %231
%234 = getelementptr inbounds double, double* %233, i64 1
%235 = getelementptr inbounds double, double* %234, i64 %166
%236 = bitcast double* %235 to <2 x double>*
%237 = load <2 x double>, <2 x double>* %236
%238 = getelementptr inbounds double, double* %235, i64 2
%239 = bitcast double* %238 to <2 x double>*
%240 = load <2 x double>, <2 x double>* %239
%241 = getelementptr inbounds double, double* %233, i64 %166
%242 = bitcast double* %241 to <2 x double>*
store <2 x double> %237, <2 x double>* %242
%243 = getelementptr inbounds double, double* %241, i64 2
%244 = bitcast double* %243 to <2 x double>*
store <2 x double> %240, <2 x double>* %244
%245 = add nuw i64 %231, 4
%246 = add i64 %232, 1
%247 = icmp eq i64 %246, %159
br i1 %247, label %248, label %230
248: ; preds = %230, %228
br i1 %163, label %260, label %249
249: ; preds = %169, %248
%250 = phi i64 [ 0, %169 ], [ %158, %248 ]
br label %251
251: ; preds = %249, %251
%252 = phi i64 [ %258, %251 ], [ %250, %249 ]
%253 = getelementptr inbounds double, double* %0, i64 %252
%254 = getelementptr inbounds double, double* %253, i64 1
%255 = getelementptr inbounds double, double* %254, i64 %166
%256 = load double, double* %255
%257 = getelementptr inbounds double, double* %253, i64 %166
store double %256, double* %257
%258 = add nuw nsw i64 %252, 1
%259 = icmp eq i64 %258, %147
br i1 %259, label %260, label %251
260: ; preds = %251, %248, %164
%261 = getelementptr inbounds double, double* %152, i64 %166
store double %168, double* %261
%262 = add nuw nsw i64 %165, 1
%263 = icmp eq i64 %262, %149
br i1 %263, label %264, label %164
264: ; preds = %260, %140
%265 = and i1 %141, %76
%266 = and i1 %265, %143
br i1 %266, label %267, label %330
267: ; preds = %264
%268 = sext i32 %2 to i64
%269 = getelementptr inbounds double, double* %0, i64 %268
%270 = getelementptr inbounds double, double* %269, i64 -1
%271 = add i32 %2, -2
%272 = icmp sgt i32 %2, 1
%273 = zext i32 %271 to i64
%274 = zext i32 %1 to i64
%275 = add nuw nsw i64 %273, 1
%276 = and i64 %275, 3
%277 = icmp eq i64 %276, 0
%278 = icmp ult i32 %271, 3
br label %279
279: ; preds = %267, %326
%280 = phi i64 [ 0, %267 ], [ %328, %326 ]
%281 = mul nsw i64 %280, %268
%282 = getelementptr inbounds double, double* %270, i64 %281
%283 = load double, double* %282
br i1 %272, label %284, label %326
284: ; preds = %279
br i1 %277, label %296, label %285
285: ; preds = %284, %285
%286 = phi i64 [ %293, %285 ], [ %273, %284 ]
%287 = phi i64 [ %294, %285 ], [ 0, %284 ]
%288 = getelementptr inbounds double, double* %0, i64 %286
%289 = getelementptr inbounds double, double* %288, i64 %281
%290 = load double, double* %289
%291 = getelementptr inbounds double, double* %288, i64 1
%292 = getelementptr inbounds double, double* %291, i64 %281
store double %290, double* %292
%293 = add nsw i64 %286, -1
%294 = add i64 %287, 1
%295 = icmp eq i64 %294, %276
br i1 %295, label %296, label %285
296: ; preds = %285, %284
%297 = phi i64 [ %273, %284 ], [ %293, %285 ]
br i1 %278, label %326, label %298
298: ; preds = %296
%299 = getelementptr inbounds double, double* %0, i64 %281
%300 = getelementptr inbounds double, double* %0, i64 %281
br label %301
301: ; preds = %301, %298
%302 = phi i64 [ %297, %298 ], [ %324, %301 ]
%303 = getelementptr inbounds double, double* %0, i64 %302
%304 = getelementptr inbounds double, double* %303, i64 %281
%305 = load double, double* %304
%306 = getelementptr inbounds double, double* %303, i64 1
%307 = getelementptr inbounds double, double* %306, i64 %281
store double %305, double* %307
%308 = add nsw i64 %302, -1
%309 = getelementptr inbounds double, double* %299, i64 %308
%310 = load double, double* %309
%311 = getelementptr inbounds double, double* %300, i64 %302
store double %310, double* %311
%312 = add nsw i64 %302, -2
%313 = getelementptr inbounds double, double* %0, i64 %312
%314 = getelementptr inbounds double, double* %313, i64 %281
%315 = load double, double* %314
%316 = getelementptr inbounds double, double* %313, i64 1
%317 = getelementptr inbounds double, double* %316, i64 %281
store double %315, double* %317
%318 = add nsw i64 %302, -3
%319 = getelementptr inbounds double, double* %0, i64 %318
%320 = getelementptr inbounds double, double* %319, i64 %281
%321 = load double, double* %320
%322 = getelementptr inbounds double, double* %319, i64 1
%323 = getelementptr inbounds double, double* %322, i64 %281
store double %321, double* %323
%324 = add nsw i64 %302, -4
%325 = icmp sgt i64 %302, 3
br i1 %325, label %301, label %326
326: ; preds = %296, %301, %279
%327 = getelementptr inbounds double, double* %0, i64 %281
store double %283, double* %327
%328 = add nuw nsw i64 %280, 1
%329 = icmp eq i64 %328, %274
br i1 %329, label %330, label %279
330: ; preds = %326, %264
ret void
}