user: 请将以下的汇编代码转换成C语言代码：

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L89
L73:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L37
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x24(%rbp)
  jmp    L89
L37:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x28(%rbp)
L89:
  mov    -0x24(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jg     L107
  mov    -0x28(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L73
  jmp    L107
L85:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x24(%rbp)
  addl   $0x1,-0xc(%rbp)
L107:
  mov    -0x24(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jle    L85
  jmp    L94
L19:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
  addl   $0x1,-0xc(%rbp)
L94:
  mov    -0x28(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L19
  movl   $0x0,-0x10(%rbp)
  jmp    L106
L59:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    -0x2c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  subl   $0x1,-0x2c(%rbp)
  addl   $0x1,-0x10(%rbp)
L106:
  mov    -0x10(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jle    L59
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void merge(int arr[], int temp[], int left, int mid, int right) {
  int i, left_end, size, temp_pos;
  left_end = mid - 1;
  temp_pos = left;
  size = right - left + 1;
  while ((left <= left_end) && (mid <= right)) {
    if (arr[left] <= arr[mid]) {
      temp[temp_pos] = arr[left];
      temp_pos = temp_pos + 1;
      left = left + 1;
    } else {
      temp[temp_pos] = arr[mid];
      temp_pos = temp_pos + 1;
      mid = mid + 1;
    }
  }
  while (left <= left_end) {
    temp[temp_pos] = arr[left];
    left = left + 1;
    temp_pos = temp_pos + 1;
  }
  while (mid <= right) {
    temp[temp_pos] = arr[mid];
    mid = mid + 1;
    temp_pos = temp_pos + 1;
  }
  for (i = 0; i <= size; ++i) {
    arr[right] = temp[right];
    right = right - 1;
  }
}
```