user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  lea    D20(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  lea    D18(%rip),%r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <puts@plt>
  mov    %r13,%rdi
  lea    -0x3c(%rbp),%rsi
  call   <scanf@plt>
  movslq -0x3c(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rax,%rdi
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L75
L3:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L3
L75:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L12
L9:
  mov    %rsp,%rbx
  test   %edi,%edi
  jle    L111
  mov    %rbx,%r12
  xor    %r15d,%r15d
  lea    D66(%rip),%r14
  nopl   0x0(%rax)
L60:
  mov    %r15d,%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  add    $0x4,%r12
  call   <scanf@plt>
  mov    -0x3c(%rbp),%edi
  cmp    %r15d,%edi
  jg     L60
  lea    -0x1(%rdi),%eax
  lea    0x4(%rbx,%rax,4),%rsi
L144:
  test   %edi,%edi
  jle    L111
  mov    %rbx,%rdx
  xor    %r12d,%r12d
  xchg   %ax,%ax
L86:
  movq   (%rdx),%xmm0
  pshufd $0xe5,%xmm0,%xmm2
  movd   %xmm0,%ecx
  movd   %xmm2,%eax
  pshufd $0xe1,%xmm0,%xmm1
  cmp    %eax,%ecx
  jle    L119
  movq   %xmm1,(%rdx)
  mov    $0x1,%r12d
L119:
  add    $0x4,%rdx
  cmp    %rdx,%rsi
  jne    L86
  test   %r12d,%r12d
  jne    L144
  mov    %rbx,%r13
  lea    D9(%rip),%r14
  nopl   0x0(%rax)
L37:
  mov    0x0(%r13),%esi
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%r12d
  add    $0x4,%r13
  call   <printf@plt>
  mov    -0x3c(%rbp),%edi
  cmp    %r12d,%edi
  jg     L37
L101:
  mov    %r12d,%eax
  pxor   %xmm1,%xmm1
  sar    %eax
  and    $0x1,%edi
  cltq
  cvtsi2ssl (%rbx,%rax,4),%xmm1
  je     L128
  pxor   %xmm0,%xmm0
  lea    D38(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd %xmm1,%xmm0
  call   <printf@plt>
L25:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L15
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax)
L111:
  xor    %r12d,%r12d
  jmp    L101
L128:
  lea    -0x1(%r12),%eax
  mov    $0x2,%ecx
  pxor   %xmm0,%xmm0
  cltd
  lea    D41(%rip),%rdi
  idiv   %ecx
  cltq
  cvtsi2ssl (%rbx,%rax,4),%xmm0
  mov    $0x1,%eax
  addss  %xmm1,%xmm0
  mulss  D11(%rip),%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  jmp    L25
L12:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L9
L15:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D20
type_infered: string
name: unpack_data
arguments: tag: D18
type_infered: string
name: unpack_data
arguments: tag: D66
type_infered: string
name: unpack_data
arguments: tag: D9
type_infered: string
name: unpack_data
arguments: tag: D38
type_infered: string
name: unpack_data
arguments: tag: D41
type_infered: string
name: unpack_data
arguments: tag: D11
type_infered: byte[4]

tool: D20: hvor mange tal skal du bruge?

tool: D18: %d

tool: D66: Tal nr. %d:
 

tool: D9: %d


tool: D38: 
Medianen af dine tal = %.1f


tool: D41: 
Medianen for dine tal = %.2f


tool: {"D11": [0x00,0x00,0x00,0x3f]}

assistant: ```c
int main() {
  int swapped, r, i;
  int tal, antal;
  printf("hvor mange tal skal du bruge?\n");
  scanf("%d", &tal);
  int u[tal];
  for (i = 0; i < tal; i++) {
    printf("Tal nr. %d:\n ", i);
    scanf("%d", &u[i]);
  }
  while (1) {
    swapped = 0;
    for (r = 0; r < tal; r++) {
      if (u[r] > u[r + 1]) {
        int temp = u[r];
        u[r] = u[r + 1];
        u[r + 1] = temp;
        swapped = 1;
      }
    }
    if (swapped == 0) {
      break;
    }
  }
  for (r = 0; r < tal; r++) {
    printf("%d\n", u[r]);
  }
  if ((tal % 2) != 0) {
    float median = u[r / 2];
    printf("\nMedianen af dine tal = %.1f\n", median);
  } else if (tal % 2 == 0) {
    float d = (u[(r - 1) / 2]);
    float c = (u[r / 2]);
    float a = (d + c) / 2;
    printf("\nMedianen for dine tal = %.2f\n", a);
  }
  return 0;
}
```