user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %edx,%r10d
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  sub    %esi,%r14d
  mov    %rdi,%r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbx
  mov    %esi,%ebx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x1(%r14),%eax
  mov    %rsp,%rcx
  cltq
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L305
L40:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L40
L305:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L78
L10:
  mov    %r12d,%r15d
  mov    %rsp,%rcx
  mov    %rsp,%r9
  sub    %r10d,%r15d
  movslq %r15d,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L60
L251:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L251
L60:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L279
L102:
  mov    %rsp,%r8
  cmp    %ebx,%r10d
  jl     L160
  mov    %r10d,%eax
  mov    %r9,%rdi
  mov    %r8,-0x50(%rbp)
  sub    %ebx,%eax
  mov    %r10d,-0x48(%rbp)
  lea    0x4(,%rax,4),%rdx
  movslq %ebx,%rax
  lea    0x0(%r13,%rax,4),%rsi
  call   <memcpy@plt>
  mov    -0x48(%rbp),%r10d
  mov    -0x50(%rbp),%r8
  mov    %rax,%r9
L160:
  lea    0x1(%r10),%eax
  cmp    %eax,%r12d
  jl     L168
  lea    -0x1(%r12),%edx
  cltq
  mov    %r8,%rdi
  mov    %r9,-0x48(%rbp)
  sub    %r10d,%edx
  lea    0x0(%r13,%rax,4),%rsi
  lea    0x4(,%rdx,4),%rdx
  call   <memcpy@plt>
  mov    -0x48(%rbp),%r9
  mov    %rax,%r8
L168:
  xor    %ecx,%ecx
  xor    %edx,%edx
  cmp    %r12d,%ebx
  jg     L259
  test   %r14d,%r14d
  js     L132
  xor    %ecx,%ecx
  xor    %edx,%edx
  xor    %edi,%edi
  test   %r15d,%r15d
  jg     L46
  jmp    L93
  nop
L161:
  add    $0x1,%edx
  lea    0x1(%rbx),%r10d
  movslq %ebx,%rbx
  movslq %edx,%rdi
  mov    %esi,0x0(%r13,%rbx,4)
  mov    %r10d,%ebx
  cmp    (%r9,%rdi,4),%eax
  jge    L5
  cmp    %r12d,%ebx
  jg     L259
L297:
  cmp    %edx,%r14d
  jl     L148
  cmp    %r15d,%ecx
  jge    L93
L46:
  movslq %ecx,%rax
  mov    (%r9,%rdi,4),%esi
  mov    (%r8,%rax,4),%eax
  cmp    %eax,%esi
  jg     L161
L5:
  movslq %ebx,%rsi
  add    $0x1,%ebx
  add    $0x1,%ecx
  mov    %eax,0x0(%r13,%rsi,4)
  cmp    %r12d,%ebx
  jle    L297
L259:
  cmp    %ebx,%r12d
  setge  %sil
  cmp    %edx,%r14d
  jl     L98
  movslq %edx,%rdi
  test   %sil,%sil
  je     L98
L93:
  movslq %ebx,%rsi
  lea    0x1(%rbx),%eax
  sub    %ebx,%edx
  sub    %rsi,%rdi
  cltq
  lea    (%r9,%rdi,4),%r9
  jmp    L105
  nopw   0x0(%rax,%rax,1)
L16:
  test   %sil,%sil
  je     L98
L105:
  mov    -0x4(%r9,%rax,4),%esi
  cmp    %eax,%r12d
  lea    (%rdx,%rax,1),%edi
  mov    %eax,%ebx
  mov    %esi,-0x4(%r13,%rax,4)
  setge  %sil
  add    $0x1,%rax
  cmp    %edi,%r14d
  jge    L16
L98:
  cmp    %ecx,%r15d
  jle    L101
  test   %sil,%sil
  je     L101
  movslq %ecx,%rsi
  movslq %ebx,%rdx
  lea    0x1(%rcx),%eax
  sub    %ecx,%ebx
  sub    %rsi,%rdx
  cltq
  lea    0x0(%r13,%rdx,4),%rsi
  nopl   0x0(%rax,%rax,1)
L53:
  mov    -0x4(%r8,%rax,4),%edx
  mov    %edx,-0x4(%rsi,%rax,4)
  lea    (%rbx,%rax,1),%edx
  cmp    %edx,%r12d
  setge  %cl
  cmp    %eax,%r15d
  setg   %dl
  add    $0x1,%rax
  test   %dl,%cl
  jne    L53
L101:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L222
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L78:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L10
  nopl   0x0(%rax,%rax,1)
L148:
  mov    $0x1,%esi
  jmp    L98
L279:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L102
L132:
  mov    $0x1,%esi
  xor    %ecx,%ecx
  jmp    L98
L222:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void merge(int arr[], int low, int mid, int high) {
  int A1[mid - low + 1];
  int A2[high - mid];
  int i = 0, j = 0;
  for (i = low; i <= mid; i++)
    A1[i - low] = arr[i];
  for (j = mid + 1; j <= high; j++)
    A2[j - mid - 1] = arr[j];
  int k = low;
  j = 0;
  i = 0;
  while (k <= high && i <= mid - low && j <= high - mid - 1) {
    if (A1[i] > A2[j])
      arr[k++] = A1[i++];
    if (A2[j] >= A1[i])
      arr[k++] = A2[j++];
  }
  while (i <= mid - low && k <= high)
    arr[k++] = A1[i++];
  while (j <= high - mid - 1 && k <= high)
    arr[k++] = A2[j++];
}
```