user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  sub    $0x8,%rsp
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x2,%edx
  mov    $0x1,%esi
  mov    $0x2,%edi
  mov    $0x0,%eax
  call   <median@plt>
  mov    $0x0,%edi
  call   <assert@plt>
  mov    $0x3,%ecx
  mov    $0x2,%edx
  mov    $0x1,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x2,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x1,%ecx
  mov    $0x2,%edx
  mov    $0x3,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x2,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x3,%ecx
  mov    $0x3,%edx
  mov    $0x3,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x3,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  sub    $0x8,%rsp
  push   $0x5
  mov    $0x3,%r9d
  mov    $0x8,%r8d
  mov    $0xffffffff,%ecx
  mov    $0xfffffff6,%edx
  mov    $0x9,%esi
  mov    $0x6,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  push   $0x7
  push   $0x3
  mov    $0x2,%r9d
  mov    $0x1,%r8d
  mov    $0x4,%ecx
  mov    $0x6,%edx
  mov    $0x5,%esi
  mov    $0x7,%edi
  mov    $0x0,%eax
  call   <median@plt>
  add    $0x20,%rsp
  cmp    $0x4,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x7,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x7,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  push   $0x1
  push   $0x1
  mov    $0x1,%r9d
  mov    $0x1,%r8d
  mov    $0x1,%ecx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x7,%edi
  mov    $0x0,%eax
  call   <median@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    D16(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  mov    $0x1,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x1,%ecx
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    $0x3,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  push   $0x2
  push   $0x2
  mov    $0x2,%r9d
  mov    $0x2,%r8d
  mov    $0x1,%ecx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x7,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  add    $0x20,%rsp
  cmp    $0x2,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  sub    $0x8,%rsp
  push   $0x2
  mov    $0x2,%r9d
  mov    $0x2,%r8d
  mov    $0x3,%ecx
  mov    $0x3,%edx
  mov    $0x3,%esi
  mov    $0x6,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  cmp    $0x2,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movl   $0x3,(%rsp)
  mov    $0x2,%r9d
  mov    $0x3,%r8d
  mov    $0x2,%ecx
  mov    $0x3,%edx
  mov    $0x2,%esi
  mov    $0x6,%edi
  mov    $0x0,%eax
  call   <mode@plt>
  cmp    $0x2,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    D17(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  add    $0x18,%rsp
  ret
```

tool_calls: name: unpack_data
arguments: tag: D16
type_infered: string
name: unpack_data
arguments: tag: D17
type_infered: string

tool: D16: Median done!


tool: D17: Mode done!


assistant: ```c
int main() {
  assert(median(1, 1) == 1);
  assert(median(2, 1, 2) == 1.5);
  assert(median(3, 1, 2, 3) == 2);
  assert(median(3, 3, 2, 1) == 2);
  assert(median(3, 3, 3, 3) == 3);
  assert(median(6, 9, -10, -1, 8, 3, 5) == 4);
  assert(median(7, 5, 6, 4, 1, 2, 3, 7) == 4);
  assert(median(1, 7) == 7);
  assert(median(7, 1, 1, 1, 1, 1, 1, 1) == 1);
  printf("Median done!\n");
  mode(1, 1);
  assert(mode(1, 1) == 1);
  assert(mode(3, 2, 1, 1) == 1);
  assert(mode(7, 1, 1, 1, 2, 2, 2, 2) == 2);
  assert(mode(6, 3, 3, 3, 2, 2, 2) == 2);
  assert(mode(6, 2, 3, 2, 3, 2, 3) == 2);
  printf("Mode done!\n");
  return (0);
}
```