#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ matrixsort(double *, int *, int *, int *, int *, int *);
scalar_t__ u_calloc(int, int, char *, int, char *);
void transpose(double *au, int *jq, int *irow, int *dim, double *au_t,
               int *jq_t, int *irow_t) {
  int i, j, k, nzs_t = jq[*dim] - 1, *mast1 = NULL;
  mast1 =
      (int *)u_calloc((nzs_t), sizeof(int),
                      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                      "outputs/2022-01-22/02-19-57/repos/prool/ccx_prool/refs/"
                      "heads/master/CalculiX/ccx_2.16/src/transpose.c",
                      42, "mast1");
  for (j = 0; j < nzs_t; j++) {
    au_t[j] = au[j];
  }
  for (j = 0; j < *dim; j++) {
    for (i = jq[j] - 1; i < jq[j + 1] - 1; i++) {
      mast1[i] = irow[i];
      irow_t[i] = j + 1;
    }
  }
  matrixsort(au_t, mast1, irow_t, jq_t, &nzs_t, dim);
  free(mast1);
  return;
}


x86 assembly (clang, -O0):
<transpose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
mov    %eax,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x40(%rbp),%edi
mov    $0x4,%esi
lea    0xe81(%rip),%rdx
mov    $0x2a,%ecx
lea    0xf13(%rip),%r8
call   1050 <u_calloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    11cf <transpose+0x9f>
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    119b <transpose+0x6b>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    125c <transpose+0x12c>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x38(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1249 <transpose+0x119>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%edx
add    $0x1,%edx
mov    0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f6 <transpose+0xc6>
jmp    124e <transpose+0x11e>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11d6 <transpose+0xa6>
mov    -0x28(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x20(%rbp),%r9
lea    -0x40(%rbp),%r8
call   1040 <matrixsort@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transpose>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,0x18(%rsp)
mov    %r8,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rcx,0x20(%rsp)
movslq (%rcx),%rax
mov    (%rsi,%rax,4),%eax
mov    %rax,0x10(%rsp)
lea    -0x1(%rax),%r15d
mov    %r15d,0xc(%rsp)
lea    0xe91(%rip),%rdx
lea    0xf28(%rip),%r8
mov    %r15d,%edi
mov    $0x4,%esi
mov    $0x2a,%ecx
call   1050 <u_calloc@plt>
mov    %rax,%rbp
cmpl   $0x2,0x10(%rsp)
jl     1314 <transpose+0x1e4>
mov    %r15d,%eax
cmp    $0x4,%r15d
jb     11b9 <transpose+0x89>
lea    (%r14,%rax,8),%rcx
cmp    %r12,%rcx
jbe    1234 <transpose+0x104>
lea    (%r12,%rax,8),%rcx
cmp    %r14,%rcx
jbe    1234 <transpose+0x104>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     11e6 <transpose+0xb6>
nopl   (%rax)
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    11d0 <transpose+0xa0>
cmp    $0x3,%rdx
jb     1314 <transpose+0x1e4>
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%r12,%rcx,8)
movsd  0x8(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r12,%rcx,8)
movsd  0x10(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r12,%rcx,8)
movsd  0x18(%r14,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r12,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    11f0 <transpose+0xc0>
jmp    1314 <transpose+0x1e4>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x3,%r8d
cmp    $0xc,%rdx
jae    1259 <transpose+0x129>
xor    %edi,%edi
jmp    12c8 <transpose+0x198>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nop
movups (%r14,%rdi,8),%xmm0
movups 0x10(%r14,%rdi,8),%xmm1
movups %xmm0,(%r12,%rdi,8)
movups %xmm1,0x10(%r12,%rdi,8)
movups 0x20(%r14,%rdi,8),%xmm0
movups 0x30(%r14,%rdi,8),%xmm1
movups %xmm0,0x20(%r12,%rdi,8)
movups %xmm1,0x30(%r12,%rdi,8)
movups 0x40(%r14,%rdi,8),%xmm0
movups 0x50(%r14,%rdi,8),%xmm1
movups %xmm0,0x40(%r12,%rdi,8)
movups %xmm1,0x50(%r12,%rdi,8)
movups 0x60(%r14,%rdi,8),%xmm0
movups 0x70(%r14,%rdi,8),%xmm1
movups %xmm0,0x60(%r12,%rdi,8)
movups %xmm1,0x70(%r12,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1260 <transpose+0x130>
test   %r8,%r8
je     130b <transpose+0x1db>
lea    (%r12,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%r14,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%r8
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rdi,%rdx,1),%xmm0
movups (%rdi,%rdx,1),%xmm1
movups %xmm0,-0x10(%rsi,%rdx,1)
movups %xmm1,(%rsi,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%r8
jne    12f0 <transpose+0x1c0>
cmp    %rax,%rcx
jne    11bb <transpose+0x8b>
mov    0x60(%rsp),%rdx
mov    0x20(%rsp),%r9
mov    (%r9),%r8d
test   %r8d,%r8d
jle    1372 <transpose+0x242>
mov    (%rbx),%esi
xor    %eax,%eax
jmp    133a <transpose+0x20a>
nopl   0x0(%rax)
movslq %r8d,%rcx
mov    %edi,%esi
cmp    %rcx,%rax
jge    1372 <transpose+0x242>
mov    0x4(%rbx,%rax,4),%edi
add    $0x1,%rax
cmp    %edi,%esi
jge    1330 <transpose+0x200>
add    $0xffffffff,%esi
movslq %esi,%rcx
nopl   0x0(%rax)
mov    0x0(%r13,%rcx,4),%esi
mov    %esi,0x0(%rbp,%rcx,4)
mov    %eax,(%rdx,%rcx,4)
add    $0x1,%rcx
movslq (%rbx,%rax,4),%rdi
lea    -0x1(%rdi),%rsi
cmp    %rsi,%rcx
jl     1350 <transpose+0x220>
mov    (%r9),%r8d
jmp    1330 <transpose+0x200>
lea    0xc(%rsp),%r8
mov    %r12,%rdi
mov    %rbp,%rsi
mov    0x18(%rsp),%rcx
call   1040 <matrixsort@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/prool/ccx_prool/refs/heads/master/CalculiX/ccx_2.16/src/transpose.c\00"
@.str.1 = [6 x i8] c"mast1\00"
define void @transpose(double* %0, i32* %1, i32* %2, i32* %3, double* %4, i32* %5, i32* %6) {
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca double*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32*
store double* %0, double** %8
store i32* %1, i32** %9
store i32* %2, i32** %10
store i32* %3, i32** %11
store double* %4, double** %12
store i32* %5, i32** %13
store i32* %6, i32** %14
%20 = load i32*, i32** %9
%21 = load i32*, i32** %11
%22 = load i32, i32* %21
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %20, i64 %23
%25 = load i32, i32* %24
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %18
store i32* null, i32** %19
%27 = load i32, i32* %18
%28 = call i64 @u_calloc(i32 %27, i32 4, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%29 = inttoptr i64 %28 to i32*
store i32* %29, i32** %19
store i32 0, i32* %16
br label %30
30: ; preds = %44, %7
%31 = load i32, i32* %16
%32 = load i32, i32* %18
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %47
34: ; preds = %30
%35 = load double*, double** %8
%36 = load i32, i32* %16
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %35, i64 %37
%39 = load double, double* %38
%40 = load double*, double** %12
%41 = load i32, i32* %16
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
store double %39, double* %43
br label %44
44: ; preds = %34
%45 = load i32, i32* %16
%46 = add nsw i32 %45, 1
store i32 %46, i32* %16
br label %30
47: ; preds = %30
store i32 0, i32* %16
br label %48
48: ; preds = %90, %47
%49 = load i32, i32* %16
%50 = load i32*, i32** %11
%51 = load i32, i32* %50
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %93
53: ; preds = %48
%54 = load i32*, i32** %9
%55 = load i32, i32* %16
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %54, i64 %56
%58 = load i32, i32* %57
%59 = sub nsw i32 %58, 1
store i32 %59, i32* %15
br label %60
60: ; preds = %86, %53
%61 = load i32, i32* %15
%62 = load i32*, i32** %9
%63 = load i32, i32* %16
%64 = add nsw i32 %63, 1
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i32, i32* %62, i64 %65
%67 = load i32, i32* %66
%68 = sub nsw i32 %67, 1
%69 = icmp slt i32 %61, %68
br i1 %69, label %70, label %89
70: ; preds = %60
%71 = load i32*, i32** %10
%72 = load i32, i32* %15
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %71, i64 %73
%75 = load i32, i32* %74
%76 = load i32*, i32** %19
%77 = load i32, i32* %15
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32, i32* %76, i64 %78
store i32 %75, i32* %79
%80 = load i32, i32* %16
%81 = add nsw i32 %80, 1
%82 = load i32*, i32** %14
%83 = load i32, i32* %15
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32, i32* %82, i64 %84
store i32 %81, i32* %85
br label %86
86: ; preds = %70
%87 = load i32, i32* %15
%88 = add nsw i32 %87, 1
store i32 %88, i32* %15
br label %60
89: ; preds = %60
br label %90
90: ; preds = %89
%91 = load i32, i32* %16
%92 = add nsw i32 %91, 1
store i32 %92, i32* %16
br label %48
93: ; preds = %48
%94 = load double*, double** %12
%95 = load i32*, i32** %19
%96 = load i32*, i32** %14
%97 = load i32*, i32** %13
%98 = load i32*, i32** %11
%99 = call i32 @matrixsort(double* %94, i32* %95, i32* %96, i32* %97, i32* %18, i32* %98)
%100 = load i32*, i32** %19
%101 = call i32 @free(i32* %100)
ret void
}

LLVM IR (-O2):
@.str = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/prool/ccx_prool/refs/heads/master/CalculiX/ccx_2.16/src/transpose.c\00"
@.str.1 = [6 x i8] c"mast1\00"
define void @transpose(double* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* %3, double* %4, i32* %5, i32* %6) {
%8 = alloca i32
%9 = bitcast i32* %8 to i8*
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %1, i64 %11
%13 = load i32, i32* %12
%14 = add nsw i32 %13, -1
store i32 %14, i32* %8
%15 = tail call i64 @u_calloc(i32 %14, i32 4, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str, i64 0, i64 0), i32 42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%16 = inttoptr i64 %15 to i32*
%17 = icmp sgt i32 %13, 1
br i1 %17, label %18, label %124
18: ; preds = %7
%19 = zext i32 %14 to i64
%20 = icmp ult i32 %14, 4
br i1 %20, label %106, label %21
21: ; preds = %18
%22 = getelementptr double, double* %4, i64 %19
%23 = getelementptr double, double* %0, i64 %19
%24 = icmp ugt double* %23, %4
%25 = icmp ugt double* %22, %0
%26 = and i1 %24, %25
br i1 %26, label %106, label %27
27: ; preds = %21
%28 = and i64 %19, 4294967292
%29 = add nsw i64 %28, -4
%30 = lshr exact i64 %29, 2
%31 = add nuw nsw i64 %30, 1
%32 = and i64 %31, 3
%33 = icmp ult i64 %29, 12
br i1 %33, label %85, label %34
34: ; preds = %27
%35 = and i64 %31, 9223372036854775804
br label %36
36: ; preds = %36, %34
%37 = phi i64 [ 0, %34 ], [ %82, %36 ]
%38 = phi i64 [ 0, %34 ], [ %83, %36 ]
%39 = getelementptr inbounds double, double* %0, i64 %37
%40 = bitcast double* %39 to <2 x double>*
%41 = load <2 x double>, <2 x double>* %40
%42 = getelementptr inbounds double, double* %39, i64 2
%43 = bitcast double* %42 to <2 x double>*
%44 = load <2 x double>, <2 x double>* %43
%45 = getelementptr inbounds double, double* %4, i64 %37
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> %41, <2 x double>* %46
%47 = getelementptr inbounds double, double* %45, i64 2
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> %44, <2 x double>* %48
%49 = or i64 %37, 4
%50 = getelementptr inbounds double, double* %0, i64 %49
%51 = bitcast double* %50 to <2 x double>*
%52 = load <2 x double>, <2 x double>* %51
%53 = getelementptr inbounds double, double* %50, i64 2
%54 = bitcast double* %53 to <2 x double>*
%55 = load <2 x double>, <2 x double>* %54
%56 = getelementptr inbounds double, double* %4, i64 %49
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> %52, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %55, <2 x double>* %59
%60 = or i64 %37, 8
%61 = getelementptr inbounds double, double* %0, i64 %60
%62 = bitcast double* %61 to <2 x double>*
%63 = load <2 x double>, <2 x double>* %62
%64 = getelementptr inbounds double, double* %61, i64 2
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = getelementptr inbounds double, double* %4, i64 %60
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> %63, <2 x double>* %68
%69 = getelementptr inbounds double, double* %67, i64 2
%70 = bitcast double* %69 to <2 x double>*
store <2 x double> %66, <2 x double>* %70
%71 = or i64 %37, 12
%72 = getelementptr inbounds double, double* %0, i64 %71
%73 = bitcast double* %72 to <2 x double>*
%74 = load <2 x double>, <2 x double>* %73
%75 = getelementptr inbounds double, double* %72, i64 2
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = getelementptr inbounds double, double* %4, i64 %71
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> %74, <2 x double>* %79
%80 = getelementptr inbounds double, double* %78, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %77, <2 x double>* %81
%82 = add nuw i64 %37, 16
%83 = add nuw i64 %38, 4
%84 = icmp eq i64 %83, %35
br i1 %84, label %85, label %36
85: ; preds = %36, %27
%86 = phi i64 [ 0, %27 ], [ %82, %36 ]
%87 = icmp eq i64 %32, 0
br i1 %87, label %104, label %88
88: ; preds = %85, %88
%89 = phi i64 [ %101, %88 ], [ %86, %85 ]
%90 = phi i64 [ %102, %88 ], [ 0, %85 ]
%91 = getelementptr inbounds double, double* %0, i64 %89
%92 = bitcast double* %91 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = getelementptr inbounds double, double* %91, i64 2
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = getelementptr inbounds double, double* %4, i64 %89
%98 = bitcast double* %97 to <2 x double>*
store <2 x double> %93, <2 x double>* %98
%99 = getelementptr inbounds double, double* %97, i64 2
%100 = bitcast double* %99 to <2 x double>*
store <2 x double> %96, <2 x double>* %100
%101 = add nuw i64 %89, 4
%102 = add i64 %90, 1
%103 = icmp eq i64 %102, %32
br i1 %103, label %104, label %88
104: ; preds = %88, %85
%105 = icmp eq i64 %28, %19
br i1 %105, label %124, label %106
106: ; preds = %21, %18, %104
%107 = phi i64 [ 0, %21 ], [ 0, %18 ], [ %28, %104 ]
%108 = xor i64 %107, -1
%109 = add nsw i64 %108, %19
%110 = and i64 %19, 3
%111 = icmp eq i64 %110, 0
br i1 %111, label %121, label %112
112: ; preds = %106, %112
%113 = phi i64 [ %118, %112 ], [ %107, %106 ]
%114 = phi i64 [ %119, %112 ], [ 0, %106 ]
%115 = getelementptr inbounds double, double* %0, i64 %113
%116 = load double, double* %115
%117 = getelementptr inbounds double, double* %4, i64 %113
store double %116, double* %117
%118 = add nuw nsw i64 %113, 1
%119 = add i64 %114, 1
%120 = icmp eq i64 %119, %110
br i1 %120, label %121, label %112
121: ; preds = %112, %106
%122 = phi i64 [ %107, %106 ], [ %118, %112 ]
%123 = icmp ult i64 %109, 3
br i1 %123, label %124, label %129
124: ; preds = %121, %129, %104, %7
%125 = load i32, i32* %3
%126 = icmp sgt i32 %125, 0
br i1 %126, label %127, label %178
127: ; preds = %124
%128 = load i32, i32* %1
br label %155
129: ; preds = %121, %129
%130 = phi i64 [ %146, %129 ], [ %122, %121 ]
%131 = getelementptr inbounds double, double* %0, i64 %130
%132 = load double, double* %131
%133 = getelementptr inbounds double, double* %4, i64 %130
store double %132, double* %133
%134 = add nuw nsw i64 %130, 1
%135 = getelementptr inbounds double, double* %0, i64 %134
%136 = load double, double* %135
%137 = getelementptr inbounds double, double* %4, i64 %134
store double %136, double* %137
%138 = add nuw nsw i64 %130, 2
%139 = getelementptr inbounds double, double* %0, i64 %138
%140 = load double, double* %139
%141 = getelementptr inbounds double, double* %4, i64 %138
store double %140, double* %141
%142 = add nuw nsw i64 %130, 3
%143 = getelementptr inbounds double, double* %0, i64 %142
%144 = load double, double* %143
%145 = getelementptr inbounds double, double* %4, i64 %142
store double %144, double* %145
%146 = add nuw nsw i64 %130, 4
%147 = icmp eq i64 %146, %19
br i1 %147, label %124, label %129
148: ; preds = %167
%149 = load i32, i32* %3
br label %150
150: ; preds = %148, %155
%151 = phi i32 [ %149, %148 ], [ %156, %155 ]
%152 = phi i32 [ %174, %148 ], [ %161, %155 ]
%153 = sext i32 %151 to i64
%154 = icmp slt i64 %159, %153
br i1 %154, label %155, label %178
155: ; preds = %127, %150
%156 = phi i32 [ %125, %127 ], [ %151, %150 ]
%157 = phi i32 [ %128, %127 ], [ %152, %150 ]
%158 = phi i64 [ 0, %127 ], [ %159, %150 ]
%159 = add nuw nsw i64 %158, 1
%160 = getelementptr inbounds i32, i32* %1, i64 %159
%161 = load i32, i32* %160
%162 = icmp slt i32 %157, %161
br i1 %162, label %163, label %150
163: ; preds = %155
%164 = add i32 %157, -1
%165 = sext i32 %164 to i64
%166 = trunc i64 %159 to i32
br label %167
167: ; preds = %163, %167
%168 = phi i64 [ %165, %163 ], [ %173, %167 ]
%169 = getelementptr inbounds i32, i32* %2, i64 %168
%170 = load i32, i32* %169
%171 = getelementptr inbounds i32, i32* %16, i64 %168
store i32 %170, i32* %171
%172 = getelementptr inbounds i32, i32* %6, i64 %168
store i32 %166, i32* %172
%173 = add nsw i64 %168, 1
%174 = load i32, i32* %160
%175 = add nsw i32 %174, -1
%176 = sext i32 %175 to i64
%177 = icmp slt i64 %173, %176
br i1 %177, label %167, label %148
178: ; preds = %150, %124
%179 = call i32 @matrixsort(double* %4, i32* %16, i32* %6, i32* %5, i32* %8, i32* %3)
%180 = call i32 @free(i32* %16)
ret void
}