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

```asm
<medianOfFour>:
  endbr64
  push   %r15
  mov    %edx,%eax
  movslq %esi,%rdx
  push   %r14
  add    %eax,%esi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rcx,%rbx
  lea    (%rdi,%rdx,8),%rcx
  movslq %esi,%rdx
  lea    (%rdi,%rdx,8),%rdx
  add    %eax,%esi
  add    %esi,%eax
  sub    $0x28,%rsp
  mov    (%rdx),%r13
  mov    (%rcx),%r12
  cltq
  mov    %rdx,0x10(%rsp)
  movslq %esi,%rdx
  lea    (%rdi,%rdx,8),%rbp
  mov    %rcx,0x8(%rsp)
  lea    (%rdi,%rax,8),%rcx
  mov    %r13,%rsi
  mov    0x0(%rbp),%r14
  mov    (%rcx),%r15
  mov    %rcx,0x18(%rsp)
  mov    %r12,%rdi
  call   *%rbx
  mov    %r14,%rsi
  test   %eax,%eax
  jle    L43
  mov    %r12,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L148
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   *%rbx
  mov    %r15,%rsi
  test   %eax,%eax
  jle    L57
  mov    %r13,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L62
L1:
  mov    0x10(%rsp),%rbx
  mov    0x0(%rbp),%rdx
  mov    (%rbx),%rax
  mov    %rdx,(%rbx)
  mov    %rax,0x0(%rbp)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L148:
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L50
L94:
  mov    0x8(%rsp),%rbx
  mov    0x0(%rbp),%rdx
  mov    (%rbx),%rax
  mov    %rdx,(%rbx)
  mov    %rax,0x0(%rbp)
L174:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L43:
  mov    %r13,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L19
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   *%rbx
  mov    %r15,%rsi
  test   %eax,%eax
  jle    L144
  mov    %r12,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L94
L127:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L1
L72:
  mov    0x18(%rsp),%rbx
  mov    0x0(%rbp),%rax
  mov    (%rbx),%rdx
  mov    %rdx,0x0(%rbp)
  mov    %rax,(%rbx)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L144:
  mov    %r14,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L174
  jmp    L127
  nopl   0x0(%rax,%rax,1)
L50:
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L72
  jmp    L174
  nopl   0x0(%rax)
L57:
  mov    %r14,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L174
L62:
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L72
  jmp    L94
  cs nopw 0x0(%rax,%rax,1)
L19:
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L1
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   *%rbx
  test   %eax,%eax
  jle    L174
  mov    0x18(%rsp),%rcx
  mov    0x0(%rbp),%rax
  mov    (%rcx),%rdx
  mov    %rdx,0x0(%rbp)
  mov    %rax,(%rcx)
  jmp    L174
```

assistant: ```c
void medianOfFour(void **ar, int left, int gap, int (*cmp)(const void *, const void *)) {
  int pos1 = left, pos2, pos3, pos4;
  void *a1 = ar[pos1];
  void *a2 = ar[pos2 = pos1 + gap];
  void *a3 = ar[pos3 = pos2 + gap];
  void *a4 = ar[pos4 = pos3 + gap];
  if (cmp(a1, a2) <= 0) {
    if (cmp(a2, a3) <= 0) {
      if (cmp(a2, a4) <= 0) {
        if (cmp(a3, a4) > 0) {
          {
            void *_tmp__ = ar[pos3];
            ar[pos3] = ar[pos4];
            ar[pos4] = _tmp__;
          };
        }
      } else {
        {
          void *_tmp__ = ar[pos2];
          ar[pos2] = ar[pos3];
          ar[pos3] = _tmp__;
        };
      }
    } else {
      if (cmp(a1, a3) <= 0) {
        if (cmp(a3, a4) <= 0) {
          if (cmp(a2, a4) <= 0) {
            {
              void *_tmp__ = ar[pos2];
              ar[pos2] = ar[pos3];
              ar[pos3] = _tmp__;
            };
          } else {
            {
              void *_tmp__ = ar[pos3];
              ar[pos3] = ar[pos4];
              ar[pos4] = _tmp__;
            };
          }
        }
      } else {
        if (cmp(a1, a4) <= 0) {
          if (cmp(a2, a4) <= 0) {
            {
              void *_tmp__ = ar[pos2];
              ar[pos2] = ar[pos3];
              ar[pos3] = _tmp__;
            };
          } else {
            {
              void *_tmp__ = ar[pos3];
              ar[pos3] = ar[pos4];
              ar[pos4] = _tmp__;
            };
          }
        } else {
          {
            void *_tmp__ = ar[pos1];
            ar[pos1] = ar[pos3];
            ar[pos3] = _tmp__;
          };
        }
      }
    }
  } else {
    if (cmp(a1, a3) <= 0) {
      if (cmp(a1, a4) <= 0) {
        if (cmp(a3, a4) > 0) {
          {
            void *_tmp__ = ar[pos3];
            ar[pos3] = ar[pos4];
            ar[pos4] = _tmp__;
          };
        }
      } else {
        {
          void *_tmp__ = ar[pos1];
          ar[pos1] = ar[pos3];
          ar[pos3] = _tmp__;
        };
      }
    } else {
      if (cmp(a2, a3) <= 0) {
        if (cmp(a3, a4) <= 0) {
          if (cmp(a1, a4) <= 0) {
            {
              void *_tmp__ = ar[pos1];
              ar[pos1] = ar[pos3];
              ar[pos3] = _tmp__;
            };
          } else {
            {
              void *_tmp__ = ar[pos3];
              ar[pos3] = ar[pos4];
              ar[pos4] = _tmp__;
            };
          }
        }
      } else {
        if (cmp(a2, a4) <= 0) {
          if (cmp(a1, a4) <= 0) {
            {
              void *_tmp__ = ar[pos1];
              ar[pos1] = ar[pos3];
              ar[pos3] = _tmp__;
            };
          } else {
            {
              void *_tmp__ = ar[pos3];
              ar[pos3] = ar[pos4];
              ar[pos4] = _tmp__;
            };
          }
        } else {
          {
            void *_tmp__ = ar[pos2];
            ar[pos2] = ar[pos3];
            ar[pos3] = _tmp__;
          };
        }
      }
    }
  }
}
```