#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*/ memcpy(int **, int **, int);
int /*<<< orphan*/ stable_sqrt_sort_merge_left_with_x_buf(int **, int, int,
                                                          int);
int /*<<< orphan*/ stable_sqrt_sort_smart_merge_with_x_buf(int **, int *, int *,
                                                           int, int);
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    117e <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x4e>
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
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    1274 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x144>
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),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    -0x38(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x30(%rbp)
jmp    1258 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x128>
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
call   1040 <stable_sqrt_sort_smart_merge_with_x_buf@plt>
jmp    125d <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x12d>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    11a9 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x79>
mov    -0x38(%rbp),%eax
sub    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,0x10(%rbp)
je     131b <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1eb>
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),%rax
shl    $0x3,%rax
mov    %eax,%edx
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
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),%rax
shl    $0x3,%rax
mov    %eax,%edx
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,%ebx
mov    0x70(%rsp),%r13d
test   %ecx,%ecx
je     1243 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x113>
mov    %rdi,%rbp
mov    %rdx,0x10(%rsp)
mov    %r8d,0x8(%rsp)
xor    %eax,%eax
cmp    %esi,(%rdi)
setge  %al
mov    %eax,0xc(%rsp)
mov    %r8d,%edx
mov    %r8d,%r14d
cmp    $0x2,%ecx
mov    %r8,0x18(%rsp)
jl     1271 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x141>
mov    %r13d,0x20(%rsp)
mov    %ebx,0x24(%rsp)
movslq %r8d,%rdx
mov    %ecx,%ecx
add    $0xfffffffffffffffe,%rcx
mov    %rcx,0x28(%rsp)
shl    $0x3,%rdx
mov    %rdx,0x30(%rsp)
lea    (%r8,%r8,1),%r14d
xor    %r13d,%r13d
mov    0x10(%rsp),%rdi
mov    %r8d,%edx
nopl   0x0(%rax)
xor    %ebx,%ebx
mov    %esi,%r15d
mov    %rbp,%r12
cmp    %esi,0x4(%rbp,%r13,4)
setge  %bl
movslq %edx,%rcx
shl    $0x3,%rcx
mov    0x30(%rsp),%rsi
lea    (%rdi,%rsi,1),%rbp
mov    %rbp,%rsi
sub    %rcx,%rsi
cmp    %ebx,%eax
jne    1200 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0xd0>
sub    %rcx,%rdi
shl    $0x3,%edx
call   1050 <memcpy@plt>
mov    0x18(%rsp),%r8
mov    %r8d,0x8(%rsp)
jmp    121f <stable_sqrt_sort_merge_buffers_left_with_x_buf+0xef>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %r8d,%ecx
mov    0x18(%rsp),%r8
call   1040 <stable_sqrt_sort_smart_merge_with_x_buf@plt>
mov    0x18(%rsp),%r8
mov    0x8(%rsp),%edx
cmp    %r13,0x28(%rsp)
je     1268 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x138>
mov    0xc(%rsp),%eax
add    $0x1,%r13
add    %r8d,%r14d
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12,%rbp
jmp    11b0 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x80>
imul   %r8d,%ebx
neg    %r8d
mov    %rdx,%rdi
mov    %ebx,%esi
mov    %r13d,%edx
mov    %r8d,%ecx
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    0x24(%rsp),%ebx
mov    0x20(%rsp),%r13d
mov    %r14d,%eax
sub    %edx,%eax
test   %r13d,%r13d
je     12b9 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x189>
cmpl   $0x0,0xc(%rsp)
je     12db <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1ab>
cltq
mov    0x10(%rsp),%r15
lea    (%r15,%rax,8),%rsi
movslq %r8d,%rax
shl    $0x3,%rax
mov    %rsi,%rdi
sub    %rax,%rdi
shl    $0x3,%edx
call   1050 <memcpy@plt>
mov    0x18(%rsp),%r8
imul   %r8d,%ebx
mov    %ebx,0x8(%rsp)
movl   $0x0,0xc(%rsp)
jmp    12ed <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1bd>
cltq
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
movslq %r8d,%rax
shl    $0x3,%rax
mov    %rsi,%rdi
sub    %rax,%rdi
shl    $0x3,%edx
call   1050 <memcpy@plt>
jmp    1304 <stable_sqrt_sort_merge_buffers_left_with_x_buf+0x1d4>
imul   %r8d,%ebx
add    %edx,%ebx
mov    %ebx,0x8(%rsp)
mov    %eax,%r14d
mov    0x10(%rsp),%r15
movslq %r14d,%rax
lea    (%r15,%rax,8),%rdi
neg    %r8d
mov    %ebx,%esi
mov    %r13d,%edx
mov    %r8d,%ecx
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 @stable_sqrt_sort_merge_left_with_x_buf(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 = load i32**, i32*** %10
%74 = load i32, i32* %16
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32*, i32** %73, i64 %75
%77 = load i32, i32* %17
%78 = sext i32 %77 to i64
%79 = mul i64 %78, 8
%80 = trunc i64 %79 to i32
%81 = call i32 @memcpy(i32** %72, i32** %76, i32 %80)
%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 @stable_sqrt_sort_smart_merge_with_x_buf(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 = load i32**, i32*** %10
%118 = load i32, i32* %16
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i32*, i32** %117, i64 %119
%121 = load i32, i32* %17
%122 = sext i32 %121 to i64
%123 = mul i64 %122, 8
%124 = trunc i64 %123 to i32
%125 = call i32 @memcpy(i32** %116, i32** %120, i32 %124)
%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 @stable_sqrt_sort_merge_left_with_x_buf(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 = load i32**, i32*** %10
%156 = load i32, i32* %16
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i32*, i32** %155, i64 %157
%159 = load i32, i32* %17
%160 = sext i32 %159 to i64
%161 = mul i64 %160, 8
%162 = trunc i64 %161 to i32
%163 = call i32 @memcpy(i32** %154, i32** %158, i32 %162)
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 @stable_sqrt_sort_merge_left_with_x_buf(i32** %2, i32 %14, i32 %6, i32 %15)
br label %87
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 %52
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 = %50, %22
%27 = phi i32 [ %20, %22 ], [ %51, %50 ]
%28 = phi i32 [ %4, %22 ], [ %49, %50 ]
%29 = phi i64 [ 1, %22 ], [ %46, %50 ]
%30 = phi i32 [ %4, %22 ], [ %47, %50 ]
%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 %43
39: ; preds = %26
%40 = getelementptr inbounds i32*, i32** %38, i64 %24
%41 = shl i32 %28, 3
%42 = call i32 @memcpy(i32** %40, i32** %38, i32 %41)
store i32 %4, i32* %8
br label %45
43: ; preds = %26
%44 = call i32 @stable_sqrt_sort_smart_merge_with_x_buf(i32** %38, i32* %8, i32* %9, i32 %4, i32 %4)
br label %45
45: ; preds = %39, %43
%46 = add nuw nsw i64 %29, 1
%47 = add nsw i32 %30, %4
%48 = icmp eq i64 %46, %25
%49 = load i32, i32* %8
br i1 %48, label %52, label %50
50: ; preds = %45
%51 = load i32, i32* %9
br label %26
52: ; preds = %45, %17
%53 = phi i32 [ %4, %17 ], [ %49, %45 ]
%54 = phi i32 [ %4, %17 ], [ %47, %45 ]
%55 = sub nsw i32 %54, %53
%56 = icmp eq i32 %6, 0
br i1 %56, label %79, label %57
57: ; preds = %52
%58 = load i32, i32* %9
%59 = icmp eq i32 %58, 0
br i1 %59, label %69, label %60
60: ; preds = %57
%61 = sext i32 %55 to i64
%62 = getelementptr inbounds i32*, i32** %2, i64 %61
%63 = sext i32 %4 to i64
%64 = sub nsw i64 0, %63
%65 = getelementptr inbounds i32*, i32** %62, i64 %64
%66 = shl i32 %53, 3
%67 = call i32 @memcpy(i32** %65, i32** %62, i32 %66)
%68 = mul nsw i32 %5, %4
store i32 %68, i32* %8
store i32 0, i32* %9
br label %72
69: ; preds = %57
%70 = mul nsw i32 %5, %4
%71 = add nsw i32 %53, %70
store i32 %71, i32* %8
br label %72
72: ; preds = %69, %60
%73 = phi i32 [ %68, %60 ], [ %71, %69 ]
%74 = phi i32 [ %54, %60 ], [ %55, %69 ]
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32*, i32** %2, i64 %75
%77 = sub nsw i32 0, %4
%78 = call i32 @stable_sqrt_sort_merge_left_with_x_buf(i32** %76, i32 %73, i32 %6, i32 %77)
br label %87
79: ; preds = %52
%80 = sext i32 %55 to i64
%81 = getelementptr inbounds i32*, i32** %2, i64 %80
%82 = sext i32 %4 to i64
%83 = sub nsw i64 0, %82
%84 = getelementptr inbounds i32*, i32** %81, i64 %83
%85 = shl i32 %53, 3
%86 = call i32 @memcpy(i32** %84, i32** %81, i32 %85)
br label %87
87: ; preds = %72, %79, %13
ret void
}