void stable_sqrt_sort_merge_buffers_left_with_x_buf(int *keys, int midkey,
                                                    int **arr, int nblock,
                                                    int lblock, int nblock2,
                                                    int llast) {
  int l, prest, lrest, frest, pidx, cidx, fnext;
  if (nblock == 0) {
    l = nblock2 * lblock;
    stable_sqrt_sort_merge_left_with_x_buf(arr, l, llast, -lblock);
    return;
  }
  lrest = lblock;
  frest = keys[0] < midkey ? 0 : 1;
  pidx = lblock;
  for (cidx = 1; cidx < nblock; cidx++, pidx += lblock) {
    prest = pidx - lrest;
    fnext = keys[cidx] < midkey ? 0 : 1;
    if (fnext == frest) {
      memcpy((arr + prest - lblock), (arr + prest), (lrest) * sizeof(int *));
      prest = pidx;
      lrest = lblock;
    } else {
      stable_sqrt_sort_smart_merge_with_x_buf(arr + prest, &lrest, &frest,
                                              lblock, lblock);
    }
  }
  prest = pidx - lrest;
  if (llast) {
    if (frest) {
      memcpy((arr + prest - lblock), (arr + prest), (lrest) * sizeof(int *));
      prest = pidx;
      lrest = lblock * nblock2;
      frest = 0;
    } else {
      lrest += lblock * nblock2;
    }
    stable_sqrt_sort_merge_left_with_x_buf(arr + prest, lrest, llast, -lblock);
  } else {
    memcpy((arr + prest - lblock), (arr + prest), (lrest) * sizeof(int *));
  }
}


x86 assembly (clang, -O0):
<stable_sqrt_sort_merge_buffers_left_with_x_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1180 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x50>
mov    -0x24(%rbp),%eax
imul   -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    0x10(%rbp),%edx
xor    %ecx,%ecx
sub    -0x20(%rbp),%ecx
mov    $0x0,%al
call   1030 <stable_sqrt_sort_merge_left_with_x_buf@plt>
jmp    1358 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x228>
mov    -0x20(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1276 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x146>
mov    -0x38(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0xc(%rbp),%esi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %esi,%edx
cmovl  %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x34(%rbp),%eax
jne    1235 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x105>
mov    -0x18(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x20(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x30(%rbp),%rdx
shl    $0x3,%rdx
call   1050 <memcpy@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    125a <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x12a>
mov    -0x18(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1040 <stable_sqrt_sort_smart_merge_with_x_buf@plt>
jmp    125f <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x12f>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    11ab <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x7b>
mov    -0x38(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,0x10(%rbp)
je     131d <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1ed>
cmpl   $0x0,-0x34(%rbp)
je     12ea <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1ba>
mov    -0x18(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x20(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x30(%rbp),%rdx
shl    $0x3,%rdx
call   1050 <memcpy@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    12f7 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1c7>
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x30(%rbp),%esi
mov    0x10(%rbp),%edx
xor    %ecx,%ecx
sub    -0x20(%rbp),%ecx
mov    $0x0,%al
call   1030 <stable_sqrt_sort_merge_left_with_x_buf@plt>
jmp    1358 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x228>
mov    -0x18(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
movslq -0x20(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x30(%rbp),%rdx
shl    $0x3,%rdx
call   1050 <memcpy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stable_sqrt_sort_merge_buffers_left_with_x_buf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,%ebp
mov    %rdx,%r15
mov    0x70(%rsp),%r13d
test   %ecx,%ecx
je     123f <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x10f>
mov    %r8d,0x4(%rsp)
xor    %ebx,%ebx
cmp    %esi,(%rdi)
setge  %bl
mov    %ebx,0x8(%rsp)
mov    %r8d,%eax
mov    %r8d,%r12d
cmp    $0x2,%ecx
mov    %r8,0x10(%rsp)
jl     1279 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x149>
mov    %r13d,0x18(%rsp)
mov    %ebp,0x1c(%rsp)
movslq %r8d,%rax
mov    %ecx,%ecx
add    $0xfffffffffffffffe,%rcx
mov    %rcx,0x30(%rsp)
lea    (%r15,%rax,8),%r13
shl    $0x3,%rax
mov    %rax,0x28(%rsp)
lea    (%r8,%r8,1),%eax
mov    %eax,0xc(%rsp)
mov    %r15,0x20(%rsp)
mov    %r15,%rbp
xor    %r15d,%r15d
mov    %r8d,%eax
nop
xor    %ecx,%ecx
mov    %esi,%r12d
mov    %rdi,%r14
cmp    %esi,0x4(%rdi,%r15,4)
setge  %cl
movslq %eax,%rdx
shl    $0x3,%rdx
mov    %r13,%rsi
sub    %rdx,%rsi
cmp    %ecx,%ebx
jne    11f0 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0xc0>
mov    %rbp,%rdi
sub    %rdx,%rdi
call   1050 <memcpy@plt>
mov    0x10(%rsp),%r8
mov    %r8d,0x4(%rsp)
jmp    1211 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0xe1>
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rdi
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r8d,%ecx
mov    0x10(%rsp),%r8
xor    %eax,%eax
call   1040 <stable_sqrt_sort_smart_merge_with_x_buf@plt>
mov    0x10(%rsp),%r8
mov    0x4(%rsp),%eax
cmp    %r15,0x30(%rsp)
je     1266 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x136>
mov    0x8(%rsp),%ebx
add    $0x1,%r15
mov    0x28(%rsp),%rcx
add    %rcx,%r13
add    %rcx,%rbp
add    %r8d,0xc(%rsp)
mov    %r12d,%esi
mov    %r14,%rdi
jmp    11b0 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x80>
imul   %r8d,%ebp
neg    %r8d
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r8d,%ecx
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <stable_sqrt_sort_merge_left_with_x_buf@plt>
mov    0x1c(%rsp),%ebp
mov    0x18(%rsp),%r13d
mov    0x20(%rsp),%r15
mov    0xc(%rsp),%r12d
mov    %r12d,%ecx
sub    %eax,%ecx
test   %r13d,%r13d
je     12c1 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x191>
cmpl   $0x0,0x8(%rsp)
je     12e3 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1b3>
movslq %ecx,%rcx
lea    (%r15,%rcx,8),%rsi
movslq %r8d,%rcx
shl    $0x3,%rcx
mov    %rsi,%rdi
sub    %rcx,%rdi
movslq %eax,%rdx
shl    $0x3,%rdx
call   1050 <memcpy@plt>
mov    0x10(%rsp),%r8
imul   %r8d,%ebp
mov    %ebp,0x4(%rsp)
movl   $0x0,0x8(%rsp)
jmp    12f0 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1c0>
movslq %ecx,%rcx
lea    (%r15,%rcx,8),%rsi
movslq %r8d,%rcx
shl    $0x3,%rcx
mov    %rsi,%rdi
sub    %rcx,%rdi
movslq %eax,%rdx
shl    $0x3,%rdx
call   1050 <memcpy@plt>
jmp    1309 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1d9>
imul   %r8d,%ebp
add    %eax,%ebp
mov    %ebp,0x4(%rsp)
mov    %ecx,%r12d
movslq %r12d,%rax
lea    (%r15,%rax,8),%rdi
neg    %r8d
mov    %ebp,%esi
mov    %r13d,%edx
mov    %r8d,%ecx
xor    %eax,%eax
call   1030 <stable_sqrt_sort_merge_left_with_x_buf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @stable_sqrt_sort_merge_buffers_left_with_x_buf(i32* nocapture %0, i32 %1, i32** %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = bitcast i32* %8 to i8*
%11 = bitcast i32* %9 to i8*
%12 = icmp eq i32 %3, 0
br i1 %12, label %13, label %17
13: ; preds = %7
%14 = mul nsw i32 %5, %4
%15 = sub nsw i32 0, %4
%16 = tail call i32 (i32**, i32, i32, i32, ...) bitcast (i32 (...)* @stable_sqrt_sort_merge_left_with_x_buf to i32 (i32**, i32, i32, i32, ...)*)(i32** %2, i32 %14, i32 %6, i32 %15)
br label %93
17: ; preds = %7
store i32 %4, i32* %8
%18 = load i32, i32* %0
%19 = icmp sge i32 %18, %1
%20 = zext i1 %19 to i32
store i32 %20, i32* %9
%21 = icmp sgt i32 %3, 1
br i1 %21, label %22, label %54
22: ; preds = %17
%23 = sext i32 %4 to i64
%24 = sub nsw i64 0, %23
%25 = zext i32 %3 to i64
br label %26
26: ; preds = %52, %22
%27 = phi i32 [ %20, %22 ], [ %53, %52 ]
%28 = phi i32 [ %4, %22 ], [ %51, %52 ]
%29 = phi i64 [ 1, %22 ], [ %48, %52 ]
%30 = phi i32 [ %4, %22 ], [ %49, %52 ]
%31 = sub nsw i32 %30, %28
%32 = getelementptr inbounds i32, i32* %0, i64 %29
%33 = load i32, i32* %32
%34 = icmp sge i32 %33, %1
%35 = zext i1 %34 to i32
%36 = icmp eq i32 %27, %35
%37 = sext i32 %31 to i64
%38 = getelementptr inbounds i32*, i32** %2, i64 %37
br i1 %36, label %39, label %45
39: ; preds = %26
%40 = getelementptr inbounds i32*, i32** %38, i64 %24
%41 = bitcast i32** %40 to i8*
%42 = bitcast i32** %38 to i8*
%43 = sext i32 %28 to i64
%44 = shl nsw i64 %43, 3
store i32 %4, i32* %8
br label %47
45: ; preds = %26
%46 = call i32 (i32**, i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @stable_sqrt_sort_smart_merge_with_x_buf to i32 (i32**, i32*, i32*, i32, i32, ...)*)(i32** %38, i32* %8, i32* %9, i32 %4, i32 %4)
br label %47
47: ; preds = %39, %45
%48 = add nuw nsw i64 %29, 1
%49 = add nsw i32 %30, %4
%50 = icmp eq i64 %48, %25
%51 = load i32, i32* %8
br i1 %50, label %54, label %52
52: ; preds = %47
%53 = load i32, i32* %9
br label %26
54: ; preds = %47, %17
%55 = phi i32 [ %4, %17 ], [ %51, %47 ]
%56 = phi i32 [ %4, %17 ], [ %49, %47 ]
%57 = sub nsw i32 %56, %55
%58 = icmp eq i32 %6, 0
br i1 %58, label %83, label %59
59: ; preds = %54
%60 = load i32, i32* %9
%61 = icmp eq i32 %60, 0
br i1 %61, label %73, label %62
62: ; preds = %59
%63 = sext i32 %57 to i64
%64 = getelementptr inbounds i32*, i32** %2, i64 %63
%65 = sext i32 %4 to i64
%66 = sub nsw i64 0, %65
%67 = getelementptr inbounds i32*, i32** %64, i64 %66
%68 = bitcast i32** %67 to i8*
%69 = bitcast i32** %64 to i8*
%70 = sext i32 %55 to i64
%71 = shl nsw i64 %70, 3
%72 = mul nsw i32 %5, %4
store i32 %72, i32* %8
store i32 0, i32* %9
br label %76
73: ; preds = %59
%74 = mul nsw i32 %5, %4
%75 = add nsw i32 %55, %74
store i32 %75, i32* %8
br label %76
76: ; preds = %73, %62
%77 = phi i32 [ %72, %62 ], [ %75, %73 ]
%78 = phi i32 [ %56, %62 ], [ %57, %73 ]
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i32*, i32** %2, i64 %79
%81 = sub nsw i32 0, %4
%82 = call i32 (i32**, i32, i32, i32, ...) bitcast (i32 (...)* @stable_sqrt_sort_merge_left_with_x_buf to i32 (i32**, i32, i32, i32, ...)*)(i32** %80, i32 %77, i32 %6, i32 %81)
br label %93
83: ; preds = %54
%84 = sext i32 %57 to i64
%85 = getelementptr inbounds i32*, i32** %2, i64 %84
%86 = sext i32 %4 to i64
%87 = sub nsw i64 0, %86
%88 = getelementptr inbounds i32*, i32** %85, i64 %87
%89 = bitcast i32** %88 to i8*
%90 = bitcast i32** %85 to i8*
%91 = sext i32 %55 to i64
%92 = shl nsw i64 %91, 3
br label %93
93: ; preds = %76, %83, %13
ret void
}