void SortRowsDouble(int P, int N, double **list, double **sorted, int *p_list) {
  int p, n;
  double *col, *col_sort;
  int *idx, *p_list_temp;
  idx = (int *)malloc(P * sizeof(int));
  col = (double *)malloc(P * sizeof(double));
  col_sort = (double *)malloc(P * sizeof(double));
  p_list_temp = (int *)malloc(P * sizeof(int));
  for (p = 0; p < P; p++)
    p_list[p] = p;
  for (n = N - 1; n >= 0; n--) {
    for (p = 0; p < P; p++)
      col[p] = list[p_list[p]][n];
    SortDouble(P, col, col_sort, idx);
    for (p = 0; p < P; p++)
      p_list_temp[p] = p_list[idx[p]];
    for (p = 0; p < P; p++)
      p_list[p] = p_list_temp[p];
  }
  for (p = 0; p < P; p++)
    for (n = 0; n < N; n++)
      sorted[p][n] = list[p_list[p]][n];
  free(idx);
  free(col);
  free(col_sort);
  free(p_list_temp);
}


x86 assembly (clang, -O0):
<SortRowsDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x4(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11bd <SortRowsDouble+0x8d>
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1195 <SortRowsDouble+0x65>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x28(%rbp)
jl     12ba <SortRowsDouble+0x18a>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121b <SortRowsDouble+0xeb>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x24(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d7 <SortRowsDouble+0xa7>
mov    -0x4(%rbp),%edi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    $0x0,%al
call   1050 <SortDouble@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1270 <SortRowsDouble+0x140>
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq -0x24(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1238 <SortRowsDouble+0x108>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12a7 <SortRowsDouble+0x177>
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1277 <SortRowsDouble+0x147>
jmp    12ac <SortRowsDouble+0x17c>
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    11c6 <SortRowsDouble+0x96>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1333 <SortRowsDouble+0x203>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1320 <SortRowsDouble+0x1f0>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq -0x24(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12d4 <SortRowsDouble+0x1a4>
jmp    1325 <SortRowsDouble+0x1f5>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12c1 <SortRowsDouble+0x191>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SortRowsDouble>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,%rbx
mov    %rcx,0x50(%rsp)
mov    %rdx,%r15
mov    %esi,0xc(%rsp)
mov    %edi,%r13d
movslq %edi,%r12
lea    0x0(,%r12,4),%rdi
mov    %rdi,0x38(%rsp)
call   1050 <malloc@plt>
mov    %rax,0x10(%rsp)
lea    0x0(,%r12,8),%r14
mov    %r14,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    %r14,%rdi
call   1050 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    0x38(%rsp),%rdi
call   1050 <malloc@plt>
mov    %r13d,%edi
mov    %rax,0x18(%rsp)
mov    %r13d,%ecx
test   %r12d,%r12d
jle    132c <SortRowsDouble+0x1ec>
cmp    $0x8,%edi
jae    11c4 <SortRowsDouble+0x84>
xor    %eax,%eax
jmp    1320 <SortRowsDouble+0x1e0>
mov    %ecx,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%r8d
and    $0x3,%r8d
cmp    $0x18,%rsi
jae    11f4 <SortRowsDouble+0xb4>
movdqa 0xe13(%rip),%xmm0
xor    %esi,%esi
jmp    12c8 <SortRowsDouble+0x188>
and    $0xfffffffffffffffc,%rdx
movdqa 0xe00(%rip),%xmm0
xor    %esi,%esi
movdqa 0xe05(%rip),%xmm8
movdqa 0xe0c(%rip),%xmm9
movdqa 0xe13(%rip),%xmm10
movdqa 0xe1b(%rip),%xmm4
movdqa 0xe23(%rip),%xmm5
movdqa 0xe2b(%rip),%xmm6
movdqa 0xe33(%rip),%xmm7
movdqa 0xe3b(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
movdqa %xmm0,%xmm2
paddd  %xmm8,%xmm2
movdqu %xmm0,(%rbx,%rsi,4)
movdqu %xmm2,0x10(%rbx,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm10,%xmm3
movdqu %xmm2,0x20(%rbx,%rsi,4)
movdqu %xmm3,0x30(%rbx,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm5,%xmm3
movdqu %xmm2,0x40(%rbx,%rsi,4)
movdqu %xmm3,0x50(%rbx,%rsi,4)
movdqa %xmm0,%xmm2
paddd  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddd  %xmm7,%xmm3
movdqu %xmm2,0x60(%rbx,%rsi,4)
movdqu %xmm3,0x70(%rbx,%rsi,4)
add    $0x20,%rsi
paddd  %xmm1,%xmm0
add    $0xfffffffffffffffc,%rdx
jne    1250 <SortRowsDouble+0x110>
test   %r8,%r8
je     1310 <SortRowsDouble+0x1d0>
lea    (%rbx,%rsi,4),%rdx
add    $0x10,%rdx
shl    $0x5,%r8
xor    %esi,%esi
movdqa 0xd2d(%rip),%xmm1
movdqa 0xd35(%rip),%xmm2
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm0,-0x10(%rdx,%rsi,1)
movdqu %xmm3,(%rdx,%rsi,1)
paddd  %xmm2,%xmm0
add    $0x20,%rsi
cmp    %rsi,%r8
jne    12f0 <SortRowsDouble+0x1b0>
cmp    %rcx,%rax
je     132c <SortRowsDouble+0x1ec>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,(%rbx,%rax,4)
add    $0x1,%rax
cmp    %rax,%rcx
jne    1320 <SortRowsDouble+0x1e0>
mov    %rcx,0x28(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,%ecx
test   %eax,%eax
mov    %rcx,0x30(%rsp)
jle    1532 <SortRowsDouble+0x3f2>
mov    0x28(%rsp),%r14
lea    0x0(,%r14,4),%rax
mov    %rax,0x48(%rsp)
lea    -0x1(%r14),%rax
mov    %rax,0x40(%rsp)
mov    %r14d,%r12d
and    $0x3,%r12d
and    $0xfffffffc,%r14d
mov    %rcx,%r13
mov    %edi,0x8(%rsp)
jmp    13a9 <SortRowsDouble+0x269>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rsi
mov    0x20(%rsp),%rdx
mov    0x10(%rsp),%rcx
xor    %eax,%eax
call   1060 <SortDouble@plt>
mov    0x8(%rsp),%edi
cmpq   $0x2,0x38(%rsp)
mov    0x30(%rsp),%rcx
jl     1532 <SortRowsDouble+0x3f2>
mov    %r13,%rax
add    $0xffffffffffffffff,%r13
test   %edi,%edi
mov    %rax,0x38(%rsp)
jle    1380 <SortRowsDouble+0x240>
cmpq   $0x3,0x40(%rsp)
jae    13d0 <SortRowsDouble+0x290>
xor    %eax,%eax
mov    0x10(%rsp),%rcx
jmp    143c <SortRowsDouble+0x2fc>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
mov    0x10(%rsp),%rcx
nopw   0x0(%rax,%rax,1)
movslq (%rbx,%rax,4),%rdx
mov    (%r15,%rdx,8),%rdx
movsd  (%rdx,%r13,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movslq 0x4(%rbx,%rax,4),%rdx
mov    (%r15,%rdx,8),%rdx
movsd  (%rdx,%r13,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rax,8)
movslq 0x8(%rbx,%rax,4),%rdx
mov    (%r15,%rdx,8),%rdx
movsd  (%rdx,%r13,8),%xmm0
movsd  %xmm0,0x10(%rbp,%rax,8)
movslq 0xc(%rbx,%rax,4),%rdx
mov    (%r15,%rdx,8),%rdx
movq   (%rdx,%r13,8),%xmm0
movq   %xmm0,0x18(%rbp,%rax,8)
add    $0x4,%rax
cmp    %rax,%r14
jne    13e0 <SortRowsDouble+0x2a0>
mov    %rbp,%r8
test   %r12,%r12
je     146d <SortRowsDouble+0x32d>
lea    (%r8,%rax,8),%rbp
lea    (%rbx,%rax,4),%rax
xor    %edx,%edx
xchg   %ax,%ax
movslq (%rax,%rdx,4),%rsi
mov    (%r15,%rsi,8),%rsi
movq   (%rsi,%r13,8),%xmm0
movq   %xmm0,0x0(%rbp,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    1450 <SortRowsDouble+0x310>
mov    %r8,%rbp
mov    %r8,%rsi
mov    0x20(%rsp),%rdx
xor    %eax,%eax
call   1060 <SortDouble@plt>
mov    0x8(%rsp),%edi
test   %edi,%edi
jle    1398 <SortRowsDouble+0x258>
cmpq   $0x3,0x40(%rsp)
jae    149c <SortRowsDouble+0x35c>
xor    %eax,%eax
mov    0x10(%rsp),%rdx
jmp    14e7 <SortRowsDouble+0x3a7>
xor    %eax,%eax
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movslq (%rdx,%rax,4),%rcx
mov    (%rbx,%rcx,4),%ecx
mov    %ecx,(%rsi,%rax,4)
movslq 0x4(%rdx,%rax,4),%rcx
mov    (%rbx,%rcx,4),%ecx
mov    %ecx,0x4(%rsi,%rax,4)
movslq 0x8(%rdx,%rax,4),%rcx
mov    (%rbx,%rcx,4),%ecx
mov    %ecx,0x8(%rsi,%rax,4)
movslq 0xc(%rdx,%rax,4),%rcx
mov    (%rbx,%rcx,4),%ecx
mov    %ecx,0xc(%rsi,%rax,4)
add    $0x4,%rax
cmp    %rax,%r14
jne    14b0 <SortRowsDouble+0x370>
testb  $0x3,0x28(%rsp)
je     1513 <SortRowsDouble+0x3d3>
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,4),%rcx
lea    (%rdx,%rax,4),%rax
xor    %edx,%edx
nopl   (%rax)
movslq (%rax,%rdx,4),%rsi
mov    (%rbx,%rsi,4),%esi
mov    %esi,(%rcx,%rdx,4)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    1500 <SortRowsDouble+0x3c0>
test   %edi,%edi
jle    1398 <SortRowsDouble+0x258>
mov    %rbx,%rdi
mov    0x18(%rsp),%rsi
mov    0x48(%rsp),%rdx
call   1040 <memcpy@plt>
jmp    1394 <SortRowsDouble+0x254>
test   %edi,%edi
jle    171c <SortRowsDouble+0x5dc>
mov    %ecx,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r8
mov    %r8,%r10
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10d,%r9d
and    $0x3,%r9d
and    $0xfffffffffffffffc,%r10
mov    %ecx,%r14d
and    $0x3,%r14d
mov    %r9,%r12
shl    $0x5,%r12
xor    %r13d,%r13d
jmp    157f <SortRowsDouble+0x43f>
xchg   %ax,%ax
add    $0x1,%r13
cmp    0x28(%rsp),%r13
je     171c <SortRowsDouble+0x5dc>
cmpl   $0x0,0xc(%rsp)
jle    1570 <SortRowsDouble+0x430>
movslq (%rbx,%r13,4),%rax
mov    (%r15,%rax,8),%rdx
mov    0x50(%rsp),%rax
mov    (%rax,%r13,8),%rax
cmpl   $0x4,0xc(%rsp)
jae    15b0 <SortRowsDouble+0x470>
xor    %edi,%edi
jmp    1690 <SortRowsDouble+0x550>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rcx,%rsi
lea    (%rdx,%rcx,8),%rcx
cmp    %rcx,%rax
jae    15cf <SortRowsDouble+0x48f>
lea    (%rax,%rsi,8),%rcx
cmp    %rcx,%rdx
jae    15cf <SortRowsDouble+0x48f>
xor    %edi,%edi
mov    %rsi,%rcx
jmp    1690 <SortRowsDouble+0x550>
cmp    $0xc,%r8
jae    15d9 <SortRowsDouble+0x499>
xor    %edi,%edi
jmp    163c <SortRowsDouble+0x4fc>
mov    %r10,%rsi
xor    %edi,%edi
xchg   %ax,%ax
movups (%rdx,%rdi,8),%xmm0
movups 0x10(%rdx,%rdi,8),%xmm1
movups %xmm0,(%rax,%rdi,8)
movups %xmm1,0x10(%rax,%rdi,8)
movups 0x20(%rdx,%rdi,8),%xmm0
movups 0x30(%rdx,%rdi,8),%xmm1
movups %xmm0,0x20(%rax,%rdi,8)
movups %xmm1,0x30(%rax,%rdi,8)
movups 0x40(%rdx,%rdi,8),%xmm0
movups 0x50(%rdx,%rdi,8),%xmm1
movups %xmm0,0x40(%rax,%rdi,8)
movups %xmm1,0x50(%rax,%rdi,8)
movdqu 0x60(%rdx,%rdi,8),%xmm0
movdqu 0x70(%rdx,%rdi,8),%xmm1
movdqu %xmm0,0x60(%rax,%rdi,8)
movdqu %xmm1,0x70(%rax,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    15e0 <SortRowsDouble+0x4a0>
test   %r9,%r9
je     167f <SortRowsDouble+0x53f>
lea    (%rax,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%rdx,%rdi,8),%rcx
add    $0x10,%rcx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqu -0x10(%rcx,%rdi,1),%xmm0
movdqu (%rcx,%rdi,1),%xmm1
movdqu %xmm0,-0x10(%rsi,%rdi,1)
movdqu %xmm1,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%r12
jne    1660 <SortRowsDouble+0x520>
mov    %r11,%rdi
mov    0x30(%rsp),%rcx
cmp    %rcx,%r11
je     1570 <SortRowsDouble+0x430>
mov    %rdi,%rsi
not    %rsi
add    %rcx,%rsi
test   %r14,%r14
je     16c4 <SortRowsDouble+0x584>
mov    %r14,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   (%rdx,%rdi,8),%xmm0
movq   %xmm0,(%rax,%rdi,8)
add    $0x1,%rdi
add    $0xffffffffffffffff,%rcx
jne    16b0 <SortRowsDouble+0x570>
cmp    $0x3,%rsi
mov    0x30(%rsp),%rcx
jb     1570 <SortRowsDouble+0x430>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rdx,%rdi,8),%xmm0
movsd  %xmm0,(%rax,%rdi,8)
movsd  0x8(%rdx,%rdi,8),%xmm0
movsd  %xmm0,0x8(%rax,%rdi,8)
movsd  0x10(%rdx,%rdi,8),%xmm0
movsd  %xmm0,0x10(%rax,%rdi,8)
movq   0x18(%rdx,%rdi,8),%xmm0
movq   %xmm0,0x18(%rax,%rdi,8)
add    $0x4,%rdi
cmp    %rdi,%rcx
jne    16e0 <SortRowsDouble+0x5a0>
jmp    1570 <SortRowsDouble+0x430>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @SortRowsDouble(i32 %0, i32 %1, double** %2, double** %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double**
%9 = alloca double**
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32*
%16 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store double** %2, double*** %8
store double** %3, double*** %9
store i32* %4, i32** %10
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = mul i64 %18, 4
%20 = call i8* @malloc(i64 %19)
%21 = bitcast i8* %20 to i32*
store i32* %21, i32** %15
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 8
%25 = call i8* @malloc(i64 %24)
%26 = bitcast i8* %25 to double*
store double* %26, double** %13
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = mul i64 %28, 8
%30 = call i8* @malloc(i64 %29)
%31 = bitcast i8* %30 to double*
store double* %31, double** %14
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 4
%35 = call i8* @malloc(i64 %34)
%36 = bitcast i8* %35 to i32*
store i32* %36, i32** %16
store i32 0, i32* %11
br label %37
37: ; preds = %47, %5
%38 = load i32, i32* %11
%39 = load i32, i32* %6
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %50
41: ; preds = %37
%42 = load i32, i32* %11
%43 = load i32*, i32** %10
%44 = load i32, i32* %11
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %43, i64 %45
store i32 %42, i32* %46
br label %47
47: ; preds = %41
%48 = load i32, i32* %11
%49 = add nsw i32 %48, 1
store i32 %49, i32* %11
br label %37
50: ; preds = %37
%51 = load i32, i32* %7
%52 = sub nsw i32 %51, 1
store i32 %52, i32* %12
br label %53
53: ; preds = %128, %50
%54 = load i32, i32* %12
%55 = icmp sge i32 %54, 0
br i1 %55, label %56, label %131
56: ; preds = %53
store i32 0, i32* %11
br label %57
57: ; preds = %79, %56
%58 = load i32, i32* %11
%59 = load i32, i32* %6
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %82
61: ; preds = %57
%62 = load double**, double*** %8
%63 = load i32*, i32** %10
%64 = load i32, i32* %11
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %63, i64 %65
%67 = load i32, i32* %66
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double*, double** %62, i64 %68
%70 = load double*, double** %69
%71 = load i32, i32* %12
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
%74 = load double, double* %73
%75 = load double*, double** %13
%76 = load i32, i32* %11
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
store double %74, double* %78
br label %79
79: ; preds = %61
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %57
82: ; preds = %57
%83 = load i32, i32* %6
%84 = load double*, double** %13
%85 = load double*, double** %14
%86 = load i32*, i32** %15
%87 = call i32 (i32, double*, double*, i32*, ...) bitcast (i32 (...)* @SortDouble to i32 (i32, double*, double*, i32*, ...)*)(i32 %83, double* %84, double* %85, i32* %86)
store i32 0, i32* %11
br label %88
88: ; preds = %106, %82
%89 = load i32, i32* %11
%90 = load i32, i32* %6
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %109
92: ; preds = %88
%93 = load i32*, i32** %10
%94 = load i32*, i32** %15
%95 = load i32, i32* %11
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i32, i32* %94, i64 %96
%98 = load i32, i32* %97
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %93, i64 %99
%101 = load i32, i32* %100
%102 = load i32*, i32** %16
%103 = load i32, i32* %11
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %102, i64 %104
store i32 %101, i32* %105
br label %106
106: ; preds = %92
%107 = load i32, i32* %11
%108 = add nsw i32 %107, 1
store i32 %108, i32* %11
br label %88
109: ; preds = %88
store i32 0, i32* %11
br label %110
110: ; preds = %124, %109
%111 = load i32, i32* %11
%112 = load i32, i32* %6
%113 = icmp slt i32 %111, %112
br i1 %113, label %114, label %127
114: ; preds = %110
%115 = load i32*, i32** %16
%116 = load i32, i32* %11
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i32, i32* %115, i64 %117
%119 = load i32, i32* %118
%120 = load i32*, i32** %10
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i32, i32* %120, i64 %122
store i32 %119, i32* %123
br label %124
124: ; preds = %114
%125 = load i32, i32* %11
%126 = add nsw i32 %125, 1
store i32 %126, i32* %11
br label %110
127: ; preds = %110
br label %128
128: ; preds = %127
%129 = load i32, i32* %12
%130 = add nsw i32 %129, -1
store i32 %130, i32* %12
br label %53
131: ; preds = %53
store i32 0, i32* %11
br label %132
132: ; preds = %167, %131
%133 = load i32, i32* %11
%134 = load i32, i32* %6
%135 = icmp slt i32 %133, %134
br i1 %135, label %136, label %170
136: ; preds = %132
store i32 0, i32* %12
br label %137
137: ; preds = %163, %136
%138 = load i32, i32* %12
%139 = load i32, i32* %7
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %166
141: ; preds = %137
%142 = load double**, double*** %8
%143 = load i32*, i32** %10
%144 = load i32, i32* %11
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds i32, i32* %143, i64 %145
%147 = load i32, i32* %146
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double*, double** %142, i64 %148
%150 = load double*, double** %149
%151 = load i32, i32* %12
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %150, i64 %152
%154 = load double, double* %153
%155 = load double**, double*** %9
%156 = load i32, i32* %11
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double*, double** %155, i64 %157
%159 = load double*, double** %158
%160 = load i32, i32* %12
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %159, i64 %161
store double %154, double* %162
br label %163
163: ; preds = %141
%164 = load i32, i32* %12
%165 = add nsw i32 %164, 1
store i32 %165, i32* %12
br label %137
166: ; preds = %137
br label %167
167: ; preds = %166
%168 = load i32, i32* %11
%169 = add nsw i32 %168, 1
store i32 %169, i32* %11
br label %132
170: ; preds = %132
%171 = load i32*, i32** %15
%172 = bitcast i32* %171 to i8*
%173 = load double*, double** %13
%174 = bitcast double* %173 to i8*
%175 = load double*, double** %14
%176 = bitcast double* %175 to i8*
%177 = load i32*, i32** %16
%178 = bitcast i32* %177 to i8*
ret void
}

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