user: Translate the below assembly code into C programming language:

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L52
L78:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
L52:
  mov    -0xc(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jle    L78
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L33
L118:
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x8(%rbp)
L33:
  mov    -0x8(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L118
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  jmp    L42
L39:
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jne    L36
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
  jmp    L2
L36:
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x10(%rbp)
  jne    L64
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  jmp    L2
L64:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L20
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  jmp    L2
L20:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x4(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
L2:
  addl   $0x1,-0x4(%rbp)
L42:
  mov    -0x4(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L39
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void merge(int *arr, int *bufferArr, int begin, int mid, int last) {
  int leftArrIndex = begin;
  int rightArrIndex = mid + 1;
  for (int i = begin; i <= mid; ++i) {
    bufferArr[i] = arr[i];
  }
  for (int i = mid + 1; i <= last; ++i) {
    bufferArr[i] = arr[i];
  }
  for (int i = begin; i <= last; ++i) {
    if (leftArrIndex == mid + 1) {
      arr[i] = bufferArr[rightArrIndex];
      ++rightArrIndex;
    } else if (rightArrIndex == last + 1) {
      arr[i] = bufferArr[leftArrIndex];
      ++leftArrIndex;
    } else if (bufferArr[leftArrIndex] < bufferArr[rightArrIndex]) {
      arr[i] = bufferArr[leftArrIndex];
      ++leftArrIndex;
    } else {
      arr[i] = bufferArr[rightArrIndex];
      ++rightArrIndex;
    }
  }
}
```