user: What is the c source code of the assembly code below?

```asm
<stable_sqrt_sort_build_blocks>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  mov    $0x1,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0x18(%rsp)
  mov    %edx,0x1c(%rsp)
  cmp    $0x1,%esi
  jle    L145
  nopw   0x0(%rax,%rax,1)
L26:
  mov    -0x8(%rcx,%rax,8),%rsi
  mov    (%rcx,%rax,8),%rdx
  mov    (%rdx),%edi
  cmp    %edi,(%rsi)
  setg   %sil
  movzbl %sil,%esi
  lea    -0x1(%rsi,%rax,1),%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,8),%rdx
  mov    %rdx,-0x18(%rcx,%rax,8)
  mov    %eax,%edx
  sub    %esi,%edx
  movslq %edx,%rdx
  mov    (%rcx,%rdx,8),%rdx
  mov    %rdx,-0x10(%rcx,%rax,8)
  add    $0x2,%rax
  cmp    %eax,0x18(%rsp)
  jg     L26
L145:
  testb  $0x1,0x18(%rsp)
  je     L65
  movslq 0x18(%rsp),%rax
  shl    $0x3,%rax
  mov    -0x8(%rcx,%rax,1),%rdx
  mov    %rdx,-0x18(%rcx,%rax,1)
L65:
  lea    -0x10(%rcx),%rax
  cmpl   $0x2,0x1c(%rsp)
  mov    %rax,0x10(%rsp)
  jle    L113
  mov    $0x2,%ebx
  nopw   0x0(%rax,%rax,1)
L75:
  mov    0x18(%rsp),%eax
  mov    %ebx,%r12d
  add    %ebx,%ebx
  sub    %ebx,%eax
  mov    %eax,0xc(%rsp)
  js     L95
  mov    %r12d,%r14d
  movslq %ebx,%rbp
  mov    0x10(%rsp),%r13
  xor    %r15d,%r15d
  neg    %r14d
  shl    $0x3,%rbp
  nopw   0x0(%rax,%rax,1)
L7:
  mov    %r13,%rdi
  mov    %r14d,%ecx
  mov    %r12d,%edx
  mov    %r12d,%esi
  xor    %eax,%eax
  add    %ebx,%r15d
  add    %rbp,%r13
  call   <stable_sqrt_sort_merge_left_with_x_buf@plt>
  cmp    %r15d,0xc(%rsp)
  jge    L7
  mov    0x18(%rsp),%edx
  sub    %r15d,%edx
L115:
  cmp    %edx,%r12d
  jge    L136
  mov    0x10(%rsp),%rax
  mov    %r12d,%ecx
  movslq %r15d,%r8
  sub    %r12d,%edx
  neg    %ecx
  mov    %r12d,%esi
  lea    (%rax,%r8,8),%rdi
  xor    %eax,%eax
  call   <stable_sqrt_sort_merge_left_with_x_buf@plt>
L94:
  movslq %r12d,%rsi
L127:
  shl    $0x3,%rsi
  sub    %rsi,0x10(%rsp)
  cmp    0x1c(%rsp),%ebx
  jl     L75
L113:
  mov    0x18(%rsp),%eax
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%r12d
  mov    0x10(%rsp),%rsi
  lea    (%rcx,%rcx,1),%ebp
  cltd
  idiv   %ebp
  sub    %edx,%r12d
  movslq %r12d,%rbx
  lea    (%rsi,%rbx,8),%rdi
  cmp    %edx,%ecx
  jl     L69
  movslq %ecx,%rax
  movslq %edx,%rdx
  add    %rbx,%rax
  shl    $0x3,%rdx
  lea    (%rsi,%rax,8),%r8
  mov    %rdi,%rsi
  mov    %r8,%rdi
  call   <memcpy@plt>
L0:
  test   %r12d,%r12d
  jle    L61
  movslq %ebp,%rax
  mov    %ebp,%r13d
  sub    %rax,%rbx
  neg    %r13d
  mov    0x10(%rsp),%rax
  movslq %r13d,%r13
  shl    $0x3,%r13
  lea    (%rax,%rbx,8),%rbx
  nopl   0x0(%rax,%rax,1)
L12:
  mov    0x1c(%rsp),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  sub    %ebp,%r12d
  add    %r13,%rbx
  mov    %esi,%ecx
  mov    %esi,%edx
  call   <stable_sqrt_sort_merge_right@plt>
  test   %r12d,%r12d
  jg     L12
L61:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L136:
  cmp    %r15d,0x18(%rsp)
  jle    L94
  mov    0x18(%rsp),%esi
  mov    0x10(%rsp),%rdi
  movslq %r15d,%rcx
  lea    -0x1(%rsi),%edx
  movslq %r12d,%rsi
  lea    (%rdi,%rcx,8),%rax
  sub    %r15d,%edx
  add    %rcx,%rdx
  mov    %rsi,%rcx
  neg    %rcx
  lea    0x8(%rdi,%rdx,8),%rdi
  shl    $0x3,%rcx
  xchg   %ax,%ax
L51:
  mov    (%rax),%rdx
  add    $0x8,%rax
  mov    %rdx,-0x8(%rax,%rcx,1)
  cmp    %rax,%rdi
  jne    L51
  jmp    L127
  cs nopw 0x0(%rax,%rax,1)
L95:
  mov    0x18(%rsp),%edx
  xor    %r15d,%r15d
  jmp    L115
L69:
  mov    0x1c(%rsp),%ecx
  xor    %eax,%eax
  sub    %ecx,%edx
  mov    %ecx,%esi
  call   <stable_sqrt_sort_merge_right@plt>
  jmp    L0
```

assistant: ```c
void stable_sqrt_sort_build_blocks(int **arr, int L, int K) {
  int m, u, h, p0, p1, rest, restk, p;
  for (m = 1; m < L; m += 2) {
    u = 0;
    if ((*(*(arr + (m - 1))) - *(*(arr + m))) > 0) {
      u = 1;
    }
    arr[m - 3] = arr[m - 1 + u];
    arr[m - 2] = arr[m - u];
  }
  if (L % 2) {
    arr[L - 3] = arr[L - 1];
  }
  arr -= 2;
  for (h = 2; h < K; h *= 2) {
    p0 = 0;
    p1 = L - 2 * h;
    while (p0 <= p1) {
      stable_sqrt_sort_merge_left_with_x_buf(arr + p0, h, h, -h);
      p0 += 2 * h;
    }
    rest = L - p0;
    if (rest > h) {
      stable_sqrt_sort_merge_left_with_x_buf(arr + p0, h, rest - h, -h);
    } else {
      for (; p0 < L; p0++) {
        arr[p0 - h] = arr[p0];
      }
    }
    arr -= h;
  }
  restk = L % (2 * K);
  p = L - restk;
  if (restk <= K) {
    memcpy((arr + p + K), (arr + p), (restk) * sizeof(int *));
  } else {
    stable_sqrt_sort_merge_right(arr + p, K, restk - K, K);
  }
  while (p > 0) {
    p -= 2 * K;
    stable_sqrt_sort_merge_right(arr + p, K, K, K);
  }
}
```