user: What would the C source look like for the assembly code provided here:

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    -0x40(%rbp),%eax
  sub    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x44(%rbp),%eax
  sub    -0x40(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L9
L58:
  mov    -0x3c(%rbp),%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x24(%rbp)
L9:
  mov    -0x24(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L58
  movl   $0x0,-0x20(%rbp)
  jmp    L63
L36:
  mov    -0x40(%rbp),%edx
  mov    -0x20(%rbp),%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x20(%rbp)
L63:
  mov    -0x20(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L36
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    D3(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0x24(%rbp)
  movl   $0x0,-0x20(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L40
L7:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jg     L29
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x24(%rbp)
  jmp    L25
L29:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x38(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x20(%rbp)
L25:
  addl   $0x1,-0x1c(%rbp)
L40:
  mov    -0x1c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jle    L7
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void merge(int *input_array, int start, int mid, int end) {
  int first_size, second_size, i, j, k, *first_half, *second_half;
  first_size = mid - start + 1;
  second_size = end - mid;
  first_half = malloc((first_size + 1) * sizeof(int));
  second_half = malloc((second_size + 1) * sizeof(int));
  for (i = 0; i < first_size; ++i) {
    first_half[i] = input_array[start + i];
  }
  for (j = 0; j < second_size; ++j) {
    second_half[j] = input_array[mid + j + 1];
  }
  first_half[first_size] = INT_MAX;
  second_half[second_size] = INT_MAX;
  i = 0;
  j = 0;
  for (k = start; k <= end; ++k) {
    if (first_half[i] <= second_half[j]) {
      input_array[k] = first_half[i];
      i += 1;
    } else {
      input_array[k] = second_half[j];
      j += 1;
    }
  }
  free(first_half);
  free(second_half);
}
```