user: 这段汇编代码用C语言表示是什么样的？

```asm
<stable_grail_build_blocks>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %rcx,-0x48(%rbp)
  mov    %r8d,-0x4c(%rbp)
  mov    -0x4c(%rbp),%edx
  mov    -0x40(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L27
L111:
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  and    %eax,-0x10(%rbp)
L27:
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  and    -0x10(%rbp),%eax
  test   %eax,%eax
  jne    L111
  cmpl   $0x0,-0x10(%rbp)
  je     L40
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  add    %rax,%rcx
  mov    -0x48(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  movl   $0x1,-0x24(%rbp)
  jmp    L121
L220:
  movl   $0x0,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%edx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jle    L217
  movl   $0x1,-0x20(%rbp)
L217:
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x18(%rdx),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x10(%rdx),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  addl   $0x2,-0x24(%rbp)
L121:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L220
  mov    -0x3c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L119
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x18(%rdx),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
L119:
  subq   $0x10,-0x38(%rbp)
  movl   $0x2,-0x1c(%rbp)
  jmp    L260
L160:
  movl   $0x0,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L199
L53:
  mov    -0x1c(%rbp),%eax
  neg    %eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x1c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_left_with_x_buf@plt>
  mov    -0x1c(%rbp),%eax
  add    %eax,%eax
  add    %eax,-0x18(%rbp)
L199:
  mov    -0x18(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L53
  mov    -0x3c(%rbp),%eax
  sub    -0x18(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L143
  mov    -0x1c(%rbp),%eax
  neg    %eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x38(%rbp),%rax
  lea    (%rsi,%rax,1),%rdi
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_left_with_x_buf@plt>
  jmp    L14
L163:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x18(%rbp)
L143:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L163
L14:
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x38(%rbp)
  shll   -0x1c(%rbp)
L260:
  mov    -0x1c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L160
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rax,%rcx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  jmp    L239
L40:
  movl   $0x1,-0x24(%rbp)
  jmp    L252
L244:
  movl   $0x0,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%edx
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jle    L215
  movl   $0x1,-0x20(%rbp)
L215:
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stable_grail_swap1@plt>
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stable_grail_swap1@plt>
  addl   $0x2,-0x24(%rbp)
L252:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L244
  mov    -0x3c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L150
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <stable_grail_swap1@plt>
L150:
  subq   $0x10,-0x38(%rbp)
  movl   $0x2,-0x1c(%rbp)
  jmp    L239
L64:
  movl   $0x0,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L52
L3:
  mov    -0x1c(%rbp),%eax
  neg    %eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x1c(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_left@plt>
  mov    -0x1c(%rbp),%eax
  add    %eax,%eax
  add    %eax,-0x18(%rbp)
L52:
  mov    -0x18(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L3
  mov    -0x3c(%rbp),%eax
  sub    -0x18(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L66
  mov    -0x1c(%rbp),%eax
  neg    %eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x38(%rbp),%rax
  lea    (%rsi,%rax,1),%rdi
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_left@plt>
  jmp    L60
L66:
  mov    -0x18(%rbp),%eax
  cltq
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  sub    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x8(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <stable_grail_rotate@plt>
L60:
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x38(%rbp)
  shll   -0x1c(%rbp)
L239:
  mov    -0x1c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L64
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x3c(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %edx,-0x4(%rbp)
  mov    -0x3c(%rbp),%eax
  sub    -0x4(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x4(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jg     L17
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x40(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <stable_grail_rotate@plt>
  jmp    L29
L17:
  mov    -0x4(%rbp),%eax
  sub    -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  lea    (%rcx,%rax,1),%rdi
  mov    -0x40(%rbp),%ecx
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_right@plt>
  jmp    L29
L124:
  mov    -0x40(%rbp),%eax
  add    %eax,%eax
  sub    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x40(%rbp),%ecx
  mov    -0x40(%rbp),%edx
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  call   <stable_grail_merge_right@plt>
L29:
  cmpl   $0x0,-0x14(%rbp)
  jg     L124
  nop
  nop
  leave
  ret
```

assistant: ```c
void stable_grail_build_blocks(int **arr, int L, int K, int **extbuf, int LExtBuf) {
  int m, u, h, p0, p1, rest, restk, p, kbuf;
  kbuf = K < LExtBuf ? K : LExtBuf;
  while (kbuf & (kbuf - 1)) {
    kbuf &= kbuf - 1;
  }
  if (kbuf) {
    memcpy(extbuf, arr - kbuf, kbuf * sizeof(int *));
    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 < kbuf; h *= 2) {
      p0 = 0;
      p1 = L - 2 * h;
      while (p0 <= p1) {
        stable_grail_merge_left_with_x_buf(arr + p0, h, h, -h);
        p0 += 2 * h;
      }
      rest = L - p0;
      if (rest > h) {
        stable_grail_merge_left_with_x_buf(arr + p0, h, rest - h, -h);
      } else {
        for (; p0 < L; p0++) {
          arr[p0 - h] = arr[p0];
        }
      }
      arr -= h;
    }
    memcpy(arr + L, extbuf, kbuf * sizeof(int *));
  } else {
    for (m = 1; m < L; m += 2) {
      u = 0;
      if ((*(*(arr + (m - 1))) - *(*(arr + m))) > 0) {
        u = 1;
      }
      stable_grail_swap1(arr + (m - 3), arr + (m - 1 + u));
      stable_grail_swap1(arr + (m - 2), arr + (m - u));
    }
    if (L % 2) {
      stable_grail_swap1(arr + (L - 1), arr + (L - 3));
    }
    arr -= 2;
    h = 2;
  }
  for (; h < K; h *= 2) {
    p0 = 0;
    p1 = L - 2 * h;
    while (p0 <= p1) {
      stable_grail_merge_left(arr + p0, h, h, -h);
      p0 += 2 * h;
    }
    rest = L - p0;
    if (rest > h) {
      stable_grail_merge_left(arr + p0, h, rest - h, -h);
    } else {
      stable_grail_rotate(arr + p0 - h, h, rest);
    }
    arr -= h;
  }
  restk = L % (2 * K);
  p = L - restk;
  if (restk <= K) {
    stable_grail_rotate(arr + p, restk, K);
  } else {
    stable_grail_merge_right(arr + p, K, restk - K, K);
  }
  while (p > 0) {
    p -= 2 * K;
    stable_grail_merge_right(arr + p, K, K, K);
  }
}
```