user: Converte this assembly snippet into its equivalent C code:

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %ecx,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x50(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L99
L11:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L17
  mov    -0x3c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x3c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  mov    (%rcx),%edx
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
  jmp    L99
L17:
  mov    -0x38(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x38(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  mov    (%rcx),%edx
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
L99:
  mov    -0x3c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jg     L64
  mov    -0x38(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L11
  jmp    L64
L118:
  mov    -0x3c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x3c(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  mov    (%rcx),%edx
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
L64:
  mov    -0x3c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jle    L118
  jmp    L90
L75:
  mov    -0x38(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x38(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x34(%rbp)
  mov    (%rcx),%edx
  cltq
  mov    %edx,-0x30(%rbp,%rax,4)
L90:
  mov    -0x38(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L75
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L66
L117:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  mov    -0x30(%rbp,%rax,4),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x34(%rbp)
L66:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L117
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L103
  call   <__stack_chk_fail@plt>
L103:
  leave
  ret
```

assistant: ```c
void merge(int array[], int low, int mid, int high) {
  int left = low, right = mid + 1;
  int i = low;
  int temp[10];
  while (left <= mid && right <= high) {
    if (array[left] <= array[right]) {
      temp[i++] = array[left++];
    } else {
      temp[i++] = array[right++];
    }
  }
  while (left <= mid) {
    temp[i++] = array[left++];
  }
  while (right <= high) {
    temp[i++] = array[right++];
  }
  for (i = low; i <= high; i++) {
    array[i] = temp[i];
  }
}
```