user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mixed_sort_selection>:
  endbr64
  cmp    %edx,%esi
  jge    L196
  push   %r15
  mov    %edx,%eax
  push   %r14
  sub    %esi,%eax
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x18,%rsp
  cmp    $0xe,%eax
  jle    L23
  lea    (%rsi,%rdx,1),%eax
  mov    %eax,%r13d
  shr    $0x1f,%r13d
  add    %eax,%r13d
  sar    %r13d
  cmp    %r13d,%esi
  jge    L45
  mov    %r13d,%eax
  sub    %esi,%eax
  cmp    $0xe,%eax
  jle    L87
  lea    (%rsi,%r13,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  cmp    %r15d,%esi
  jge    L161
  mov    %r15d,%eax
  sub    %esi,%eax
  cmp    $0xe,%eax
  jg     L171
  mov    %r15d,%edx
  call   <selection_sort@plt>
L161:
  lea    0x1(%r15),%ebx
  cmp    %ebx,%r13d
  jle    L5
  mov    %r13d,%eax
  sub    %ebx,%eax
  cmp    $0xe,%eax
  jg     L184
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <selection_sort@plt>
L5:
  mov    %r13d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <merge@plt>
L45:
  lea    0x1(%r13),%r15d
  cmp    %r12d,%r15d
  jge    L81
  mov    %r12d,%eax
  sub    %r15d,%eax
  cmp    $0xe,%eax
  jle    L18
  lea    (%r15,%r12,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  cmp    %ebx,%r15d
  jge    L6
  mov    %ebx,%eax
  sub    %r15d,%eax
  cmp    $0xe,%eax
  jg     L50
  mov    %ebx,%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <selection_sort@plt>
L6:
  lea    0x1(%rbx),%r8d
  cmp    %r8d,%r12d
  jle    L153
  mov    %r12d,%eax
  sub    %r8d,%eax
  cmp    $0xe,%eax
  jg     L105
  mov    %r12d,%edx
  mov    %r8d,%esi
  mov    %r14,%rdi
  call   <selection_sort@plt>
L153:
  mov    %r12d,%ecx
  mov    %ebx,%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <merge@plt>
L81:
  add    $0x18,%rsp
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  pop    %rbx
  mov    %r14,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <merge@plt>
  nopl   0x0(%rax,%rax,1)
L23:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <selection_sort@plt>
  nopl   0x0(%rax,%rax,1)
L196:
  ret
  nopl   0x0(%rax)
L18:
  mov    %r12d,%edx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <selection_sort@plt>
  jmp    L81
L87:
  mov    %r13d,%edx
  call   <selection_sort@plt>
  jmp    L45
  nopl   (%rax)
L184:
  lea    0x0(%r13,%rbx,1),%eax
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    %eax,%r8d
  shr    $0x1f,%r8d
  add    %eax,%r8d
  sar    %r8d
  mov    %r8d,%edx
  mov    %r8d,0x8(%rsp)
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%r8d
  mov    %r13d,%edx
  mov    %r14,%rdi
  lea    0x1(%r8),%esi
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%edx
  mov    %r13d,%ecx
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <merge@plt>
  jmp    L5
  xchg   %ax,%ax
L105:
  lea    (%r12,%r8,1),%eax
  mov    %r8d,%esi
  mov    %r14,%rdi
  mov    %r8d,0xc(%rsp)
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  mov    %r9d,%edx
  mov    %r9d,0x8(%rsp)
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%r9d
  mov    %r12d,%edx
  mov    %r14,%rdi
  lea    0x1(%r9),%esi
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    %r12d,%ecx
  mov    %r14,%rdi
  call   <merge@plt>
  jmp    L153
  nopl   (%rax)
L171:
  lea    (%rsi,%r15,1),%eax
  mov    %eax,%ebx
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%edx
  call   <mixed_sort_selection>
  lea    0x1(%rbx),%esi
  mov    %r15d,%edx
  mov    %r14,%rdi
  call   <mixed_sort_selection>
  mov    %r15d,%ecx
  mov    %ebx,%edx
  mov    %ebp,%esi
  mov    %r14,%rdi
  call   <merge@plt>
  jmp    L161
  xchg   %ax,%ax
L50:
  lea    (%r15,%rbx,1),%eax
  mov    %r15d,%esi
  mov    %r14,%rdi
  mov    %eax,%r8d
  shr    $0x1f,%r8d
  add    %eax,%r8d
  sar    %r8d
  mov    %r8d,%edx
  mov    %r8d,0x8(%rsp)
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%r8d
  mov    %ebx,%edx
  mov    %r14,%rdi
  lea    0x1(%r8),%esi
  call   <mixed_sort_selection>
  mov    0x8(%rsp),%edx
  mov    %ebx,%ecx
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <merge@plt>
  jmp    L6
```

assistant: ```c
void mixed_sort_selection(int A[], int p, int r) {
  if (p >= r)
    return;
  if (r - p < 15) {
    selection_sort(A, p, r);
  } else {
    int q = (p + r) / 2;
    mixed_sort_selection(A, p, q);
    mixed_sort_selection(A, q + 1, r);
    merge(A, p, q, r);
  }
}
```