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

```asm
<merge>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  lea    0x0(,%rsi,4),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L26
L251:
  mov    %ebp,%r9d
  mov    $0x1,%eax
  shr    $0x1f,%r9d
  add    %ebp,%r9d
  sar    %r9d
  test   %r9d,%r9d
  cmovg  %r9d,%eax
  cmp    %eax,%ebp
  jle    L244
  mov    %r12,%rax
  mov    %r9d,%ecx
  xor    %esi,%esi
  xor    %edx,%edx
  xor    %r11d,%r11d
  movslq %r9d,%r10
  cs nopw 0x0(%rax,%rax,1)
L188:
  mov    (%rbx,%r11,4),%r8d
  mov    (%rbx,%r10,4),%edi
  cmp    %r8d,%edi
  jl     L189
L82:
  mov    %r8d,(%rax)
  add    $0x1,%edx
  add    $0x1,%esi
  add    $0x4,%rax
  cmp    %ecx,%ebp
  jle    L157
  cmp    %edx,%r9d
  jle    L157
  movslq %edx,%r11
  mov    (%rbx,%r10,4),%edi
  mov    (%rbx,%r11,4),%r8d
  cmp    %r8d,%edi
  jge    L82
L189:
  add    $0x1,%ecx
  mov    %edi,(%rax)
  add    $0x1,%esi
  add    $0x4,%rax
  cmp    %ecx,%ebp
  jle    L157
  cmp    %r9d,%edx
  jge    L157
  movslq %ecx,%r10
  jmp    L188
  nopl   (%rax)
L244:
  mov    %r9d,%ecx
  xor    %esi,%esi
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L157:
  cmp    %edx,%r9d
  je     L246
  jle    L57
  movslq %esi,%r11
  lea    0x1(%rdx),%edi
  mov    %r9d,%r10d
  lea    0x0(,%r11,4),%r8
  movslq %edi,%rdi
  sub    %edx,%r10d
  lea    (%r8,%r12,1),%rcx
  shl    $0x2,%rdi
  lea    (%rbx,%rdi,1),%r14
  mov    %rcx,%r13
  mov    %rcx,%rax
  sub    %r14,%r13
  cmp    $0x8,%r13
  jbe    L218
  lea    -0x1(%r10),%r13d
  cmp    $0x2,%r13d
  jbe    L218
  mov    %r10d,%ecx
  shr    $0x2,%ecx
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rax,%rcx,1),%r8
  mov    %rbx,%rcx
  sub    %rax,%rcx
  lea    -0x4(%rcx,%rdi,1),%rcx
L355:
  movdqu (%rax,%rcx,1),%xmm1
  add    $0x10,%rax
  movups %xmm1,-0x10(%rax)
  cmp    %r8,%rax
  jne    L355
  mov    %r10d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%edx
  add    %eax,%esi
  cmp    %eax,%r10d
  je     L57
  movslq %edx,%rdi
  lea    0x1(%rsi),%ecx
  lea    0x1(%rdx),%eax
  movslq %esi,%rsi
  mov    (%rbx,%rdi,4),%edi
  mov    %edi,(%r12,%rsi,4)
  cmp    %r9d,%eax
  jge    L57
  cltq
  movslq %ecx,%rcx
  add    $0x2,%edx
  lea    0x0(,%rax,4),%rdi
  mov    (%rbx,%rax,4),%eax
  lea    0x0(,%rcx,4),%rsi
  mov    %eax,(%r12,%rcx,4)
  cmp    %r9d,%edx
  jge    L57
L27:
  mov    0x4(%rbx,%rdi,1),%eax
  mov    %eax,0x4(%r12,%rsi,1)
L57:
  test   %ebp,%ebp
  jle    L103
  lea    0x4(%r12),%rdx
  mov    %rbx,%rax
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L90
  lea    -0x1(%rbp),%eax
  cmp    $0x2,%eax
  jbe    L90
  mov    %ebp,%edx
  mov    %rbx,%rcx
  mov    %r12,%rax
  shr    $0x2,%edx
  sub    %r12,%rcx
  shl    $0x4,%rdx
  add    %r12,%rdx
  nopl   0x0(%rax)
L185:
  movdqu (%rax),%xmm0
  movups %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L185
  mov    %ebp,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%bpl
  je     L103
  mov    %eax,%ecx
  mov    (%r12,%rcx,4),%esi
  lea    0x0(,%rcx,4),%rdx
  mov    %esi,(%rbx,%rcx,4)
  lea    0x1(%rax),%ecx
  cmp    %ebp,%ecx
  jge    L103
  mov    0x4(%r12,%rdx,1),%ecx
  add    $0x2,%eax
  mov    %ecx,0x4(%rbx,%rdx,1)
  cmp    %ebp,%eax
  jge    L103
  mov    0x8(%r12,%rdx,1),%eax
  mov    %eax,0x8(%rbx,%rdx,1)
L103:
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <free@plt>
  nopl   (%rax)
L246:
  cmp    %ecx,%ebp
  jle    L57
  movslq %esi,%r10
  lea    0x1(%rcx),%edi
  mov    %ebp,%r9d
  lea    0x0(,%r10,4),%r8
  movslq %edi,%rdi
  sub    %ecx,%r9d
  lea    (%r8,%r12,1),%rdx
  shl    $0x2,%rdi
  lea    (%rbx,%rdi,1),%r13
  mov    %rdx,%r11
  mov    %rdx,%rax
  sub    %r13,%r11
  cmp    $0x8,%r11
  jbe    L80
  lea    -0x1(%r9),%r11d
  cmp    $0x2,%r11d
  jbe    L80
  mov    %r9d,%edx
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rax,%rdx,1),%r8
  mov    %rbx,%rdx
  sub    %rax,%rdx
  lea    -0x4(%rdx,%rdi,1),%rdx
  nopl   0x0(%rax)
L68:
  movdqu (%rax,%rdx,1),%xmm2
  add    $0x10,%rax
  movups %xmm2,-0x10(%rax)
  cmp    %r8,%rax
  jne    L68
  mov    %r9d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%ecx
  add    %eax,%esi
  cmp    %eax,%r9d
  je     L57
  movslq %ecx,%rdi
  lea    0x1(%rsi),%edx
  lea    0x1(%rcx),%eax
  movslq %esi,%rsi
  mov    (%rbx,%rdi,4),%edi
  mov    %edi,(%r12,%rsi,4)
  cmp    %eax,%ebp
  jle    L57
  cltq
  movslq %edx,%rdx
  add    $0x2,%ecx
  lea    0x0(,%rax,4),%rdi
  mov    (%rbx,%rax,4),%eax
  lea    0x0(,%rdx,4),%rsi
  mov    %eax,(%r12,%rdx,4)
  cmp    %ecx,%ebp
  jg     L27
  jmp    L57
  nopl   0x0(%rax)
L26:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L251
  nopw   0x0(%rax,%rax,1)
L218:
  sub    $0x1,%r9d
  sub    %edx,%r9d
  lea    (%r9,%r11,1),%rax
  lea    0x4(%r12,%rax,4),%rsi
  lea    -0x4(%rdi),%rax
  sub    %r8,%rax
  sub    %r12,%rax
  add    %rbx,%rax
  nopl   (%rax)
L63:
  mov    (%rax,%rcx,1),%edx
  add    $0x4,%rcx
  mov    %edx,-0x4(%rcx)
  cmp    %rsi,%rcx
  jne    L63
  jmp    L57
  nopl   0x0(%rax)
L90:
  mov    %ebp,%ebp
  mov    %r12,%rax
  sub    %r12,%rbx
  lea    (%r12,%rbp,4),%rcx
  nopl   0x0(%rax)
L23:
  mov    (%rax),%edx
  mov    %edx,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%rcx
  jne    L23
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <free@plt>
L80:
  lea    -0x1(%rbp),%eax
  sub    %ecx,%eax
  add    %r10,%rax
  lea    0x4(%r12,%rax,4),%rsi
  lea    -0x4(%rdi),%rax
  sub    %r8,%rax
  sub    %r12,%rax
  add    %rbx,%rax
L250:
  mov    (%rax,%rdx,1),%ecx
  add    $0x4,%rdx
  mov    %ecx,-0x4(%rdx)
  cmp    %rsi,%rdx
  jne    L250
  jmp    L57
```

assistant: ```c
void merge(int vec[], int vetsize) {
  int md;
  int i, j, k;
  int *tmp;
  tmp = (int *)malloc(vetsize * sizeof(int));
  if (tmp == NULL) {
    exit(1);
  }
  md = vetsize / 2;
  i = 0;
  j = md;
  k = 0;
  while (i < md && j < vetsize) {
    if (vec[i] <= vec[j]) {
      tmp[k] = vec[i++];
    } else {
      tmp[k] = vec[j++];
    }
    ++k;
  }
  if (i == md) {
    while (j < vetsize) {
      tmp[k++] = vec[j++];
    }
  } else {
    while (i < md) {
      tmp[k++] = vec[i++];
    }
  }
  for (i = 0; i < vetsize; ++i) {
    vec[i] = tmp[i];
  }
  free(tmp);
}
```