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

```asm
<FindMedian>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  mov    %ecx,0xc(%rsp)
  cmp    %edx,%esi
  jl     L111
L42:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L111:
  mov    %rdi,%r12
  mov    %esi,%ebp
  mov    %edx,%ebx
  call   <PivotChoose2@plt>
  cltq
  lea    (%r12,%rax,4),%rax
  mov    %rax,(%rsp)
  mov    %ebp,%r13d
  jmp    L11
L0:
  cmp    %ebp,%ebx
  jle    L112
  mov    (%rsp),%rax
  mov    (%rax),%edx
  movslq %ebx,%rax
  lea    (%r12,%rax,4),%rax
L16:
  cmp    %edx,(%rax)
  jle    L112
  sub    $0x1,%ebx
  sub    $0x4,%rax
  cmp    %ebx,%ebp
  jne    L16
  mov    %ebp,%ebx
L112:
  movslq %ebx,%rax
  lea    (%r12,%rax,4),%r14
  movslq %r13d,%rax
  lea    (%r12,%rax,4),%r15
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <Swap@plt>
  cmp    %ebx,%r13d
  jge    L52
L11:
  cmp    0x8(%rsp),%r13d
  jge    L0
  movslq %r13d,%rax
  mov    (%rsp),%rcx
  mov    (%rcx),%ecx
  cmp    %ecx,(%r12,%rax,4)
  jg     L0
  add    $0x1,%r13d
  jmp    L11
L52:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <Swap@plt>
  mov    %r14,%rsi
  mov    (%rsp),%rdi
  call   <Swap@plt>
  mov    0xc(%rsp),%esi
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  lea    -0x1(%rax),%edx
  cmp    %ebx,%edx
  je     L117
  cmp    %ebx,%eax
  jle    L10
  cmp    %ebx,%edx
  jle    L42
  lea    0x1(%rbx),%esi
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %r12,%rdi
  call   <FindMedian>
  jmp    L42
L117:
  lea    D15(%rip),%rdi
  call   <puts@plt>
  mov    (%r14),%esi
  lea    D26(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L42
L10:
  lea    -0x1(%rbx),%edx
  mov    0xc(%rsp),%ecx
  mov    %ebp,%esi
  mov    %r12,%rdi
  call   <FindMedian>
  jmp    L42
```

tool_calls: name: disassemble_data
arguments: label: D15
datatype: string
name: disassemble_data
arguments: label: D26
datatype: string
name: disassemble_data
arguments: label: D12
datatype: string

tool: D15: 


tool: D26: Medyan: %d 


tool: D12: Medyan adresi: %d


assistant: ```c
void FindMedian(int dizi[], int l, int r, int elemanSayisi) {
  int pivotAddress;
  int i = l;
  int j = r;
  if (l < r) {
    pivotAddress = PivotChoose2(dizi, l, r);
    do {
      while ((i < r) && (dizi[i] <= dizi[pivotAddress]))
        i++;
      while ((j > l) && (dizi[j] > dizi[pivotAddress]))
        j--;
      Swap(&dizi[i], &dizi[j]);
    } while (i < j);
    Swap(&dizi[i], &dizi[j]);
    Swap(&dizi[pivotAddress], &dizi[j]);
    pivotAddress = j;
    if (pivotAddress == elemanSayisi / 2 - 1) {
      printf("\n\n");
      printf("Medyan: %d \n", dizi[pivotAddress]);
      printf("Medyan adresi: %d\n", pivotAddress);
    } else if (pivotAddress > elemanSayisi / 2 - 1) {
      FindMedian(dizi, l, pivotAddress - 1, elemanSayisi);
    } else if (pivotAddress < elemanSayisi / 2 - 1) {
      FindMedian(dizi, pivotAddress + 1, r, elemanSayisi);
    }
  }
}
```