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

```asm
<merge_version1>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  sub    %esi,%r15d
  mov    %edx,%r14d
  push   %r13
  lea    0x1(%r15),%edx
  mov    %ecx,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  lea    0x0(,%rdx,4),%edi
  sub    $0x18,%rsp
  mov    %edx,0xc(%rsp)
  call   <malloc@plt>
  cmp    %r14d,%r12d
  setle  %sil
  xor    %edi,%edi
  cmp    %r14d,%r13d
  mov    %rax,%rbp
  setg   %dil
  mov    %sil,0xb(%rsp)
  and    %esi,%edi
  call   <assert@plt>
  mov    0xc(%rsp),%edx
  movzbl 0xb(%rsp),%esi
  test   %edx,%edx
  jle    L174
  lea    0x1(%r14),%ecx
  cmp    %ecx,%r13d
  jl     L163
  test   %sil,%sil
  je     L163
  mov    %r15d,%r8d
  mov    %r12d,%esi
  mov    $0x1,%eax
  add    $0x1,%r8
  jmp    L185
  nopl   0x0(%rax,%rax,1)
L188:
  mov    %edi,%edx
  add    $0x1,%esi
  mov    %edx,-0x4(%rbp,%rax,4)
  mov    %eax,%edx
  cmp    %r8,%rax
  je     L174
L91:
  add    $0x1,%rax
  cmp    %r14d,%esi
  jg     L57
  cmp    %r13d,%ecx
  jg     L196
L185:
  movslq %esi,%rdx
  mov    (%rbx,%rdx,4),%edi
  movslq %ecx,%rdx
  mov    (%rbx,%rdx,4),%edx
  cmp    %edx,%edi
  jle    L188
  mov    %edx,-0x4(%rbp,%rax,4)
  add    $0x1,%ecx
  mov    %eax,%edx
  cmp    %r8,%rax
  jne    L91
L174:
  cmp    %r12d,%r13d
  jl     L284
  movslq %r12d,%rax
  lea    0x4(%rbp),%rdx
  mov    %r13d,%esi
  lea    (%rbx,%rax,4),%rcx
  sub    %r12d,%esi
  mov    %rcx,%rax
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L314
  cmp    $0x2,%esi
  jbe    L314
  add    $0x1,%esi
  xor    %eax,%eax
  mov    %esi,%edx
  shr    $0x2,%edx
  shl    $0x4,%rdx
  nopl   (%rax)
L125:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movups %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L125
  mov    %esi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%r12d
  cmp    %esi,%eax
  je     L284
  cltq
  mov    0x0(%rbp,%rax,4),%ecx
  lea    0x0(,%rax,4),%rdx
  movslq %r12d,%rax
  mov    %ecx,(%rbx,%rax,4)
  lea    0x1(%r12),%eax
  cmp    %eax,%r13d
  jl     L284
  mov    0x4(%rbp,%rdx,1),%ecx
  cltq
  add    $0x2,%r12d
  lea    0x0(,%rax,4),%rsi
  mov    %ecx,(%rbx,%rax,4)
  cmp    %r13d,%r12d
  jg     L284
  mov    0x8(%rbp,%rdx,1),%eax
  mov    %eax,0x4(%rbx,%rsi,1)
L284:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
  nopl   (%rax)
L196:
  cmp    %r14d,%esi
  jg     L57
L78:
  mov    %r15d,%edi
  movslq %edx,%rax
  movslq %esi,%rcx
  sub    %edx,%edi
  cmp    %edx,%r15d
  lea    0x0(,%rax,4),%r9
  setge  %r11b
  cmp    $0x2,%edi
  lea    0x0(%rbp,%r9,1),%r8
  seta   %r10b
  lea    0x4(,%rcx,4),%rcx
  test   %r10b,%r11b
  je     L158
  lea    (%rbx,%rcx,1),%r11
  mov    %r8,%r10
  sub    %r11,%r10
  cmp    $0x8,%r10
  jbe    L158
  add    $0x1,%edi
  mov    $0x1,%eax
  lea    -0x4(%rbx,%rcx,1),%r9
  cmp    %edx,%r15d
  cmovl  %eax,%edi
  xor    %eax,%eax
  mov    %edi,%ecx
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  nopw   0x0(%rax,%rax,1)
L104:
  movdqu (%r9,%rax,1),%xmm2
  movups %xmm2,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L104
  mov    %edi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%esi
  add    %eax,%edx
  cmp    %eax,%edi
  je     L174
  lea    0x1(%rsi),%eax
  movslq %esi,%rsi
  mov    (%rbx,%rsi,4),%esi
L114:
  movslq %edx,%rcx
  mov    %esi,0x0(%rbp,%rcx,4)
  lea    0x1(%rdx),%ecx
  cmp    %edx,%r15d
  jle    L174
  cltq
  movslq %ecx,%rdx
  lea    0x0(,%rax,4),%rdi
  mov    (%rbx,%rax,4),%eax
  lea    0x0(,%rdx,4),%rsi
  mov    %eax,0x0(%rbp,%rdx,4)
  cmp    %ecx,%r15d
  jle    L174
  mov    0x4(%rbx,%rdi,1),%eax
  mov    %eax,0x4(%rbp,%rsi,1)
  jmp    L174
L172:
  xor    %edx,%edx
  nopl   (%rax)
L57:
  mov    %r15d,%r9d
  movslq %edx,%rax
  movslq %ecx,%rsi
  sub    %edx,%r9d
  lea    0x0(,%rax,4),%rdi
  lea    0x4(,%rsi,4),%rsi
  cmp    $0x2,%r9d
  lea    0x0(%rbp,%rdi,1),%r8
  seta   %r11b
  cmp    %edx,%r15d
  setge  %r10b
  test   %r10b,%r11b
  je     L168
  lea    (%rbx,%rsi,1),%r11
  mov    %r8,%r10
  sub    %r11,%r10
  cmp    $0x8,%r10
  jbe    L168
  add    $0x1,%r9d
  mov    $0x1,%eax
  cmp    %edx,%r15d
  cmovl  %eax,%r9d
  lea    -0x4(%rbx,%rsi,1),%rdi
  xor    %eax,%eax
  mov    %r9d,%esi
  shr    $0x2,%esi
  shl    $0x4,%rsi
  xchg   %ax,%ax
L258:
  movdqu (%rdi,%rax,1),%xmm1
  movups %xmm1,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rsi
  jne    L258
  mov    %r9d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%ecx
  add    %eax,%edx
  cmp    %eax,%r9d
  je     L174
  lea    0x1(%rcx),%eax
  movslq %ecx,%rcx
  mov    (%rbx,%rcx,4),%esi
  jmp    L114
  nopl   0x0(%rax)
L314:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L15:
  mov    0x0(%rbp,%rax,4),%edx
  mov    %edx,(%rcx,%rax,4)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rsi,%rdx
  jne    L15
  jmp    L284
L163:
  cmp    %r14d,%r12d
  jg     L172
  mov    %r12d,%esi
  xor    %edx,%edx
  jmp    L78
L168:
  lea    -0x4(%rsi),%rdx
  sub    %rdi,%rdx
  add    %rbx,%rdx
  nopl   (%rax)
L249:
  mov    (%rdx,%rax,4),%ecx
  mov    %ecx,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  lea    -0x1(%rax),%ecx
  cmp    %ecx,%r15d
  jg     L249
  jmp    L174
L158:
  mov    %rbx,%rdx
  sub    %r9,%rdx
  lea    -0x4(%rdx,%rcx,1),%rcx
  nopl   0x0(%rax,%rax,1)
L140:
  mov    (%rcx,%rax,4),%edx
  mov    %edx,0x0(%rbp,%rax,4)
  add    $0x1,%rax
  lea    -0x1(%rax),%edx
  cmp    %edx,%r15d
  jg     L140
  jmp    L174
```

assistant: ```c
void merge_version1(int *arr, int begin, int m, int end) {
  int *t = malloc((end - begin + 1) * sizeof(int));
  int length = end - begin + 1;
  int i, j, k;
  assert(begin <= m && m < end);
  j = begin;
  k = m + 1;
  for (i = 0; i < length; i++) {
    if (j <= m && k <= end) {
      if (arr[j] <= arr[k]) {
        t[i] = arr[j];
        j++;
      } else {
        t[i] = arr[k];
        k++;
      }
    } else {
      int l;
      if (j > m)
        for (l = i; l < length; l++)
          t[l] = arr[k++];
      else
        for (l = i; l < length; l++)
          t[l] = arr[j++];
      break;
    }
  }
  j = 0;
  for (i = begin; i <= end; i++, j++) {
    arr[i] = t[j];
  }
  free(t);
}
```