user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  lea    D50(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x6c(%rbp),%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L41:
  cmp    %rdx,%rsp
  je     L39
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L41
L39:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L121
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L121:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0x60(%rbp)
  jmp    L69
L21:
  mov    -0x60(%rbp),%eax
  mov    %eax,%esi
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x60(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  addl   $0x1,-0x60(%rbp)
L69:
  mov    -0x6c(%rbp),%eax
  cmp    %eax,-0x60(%rbp)
  jl     L21
L35:
  movl   $0x0,-0x68(%rbp)
  movl   $0x0,-0x64(%rbp)
  jmp    L100
L74:
  mov    -0x40(%rbp),%rax
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%ecx
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  cmp    %eax,%ecx
  jle    L52
  mov    -0x40(%rbp),%rax
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%ecx
  mov    -0x40(%rbp),%rax
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  mov    %ecx,(%rax,%rdx,4)
  mov    -0x64(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    -0x4c(%rbp),%ecx
  mov    %ecx,(%rax,%rdx,4)
  movl   $0x1,-0x68(%rbp)
L52:
  addl   $0x1,-0x64(%rbp)
L100:
  mov    -0x6c(%rbp),%eax
  cmp    %eax,-0x64(%rbp)
  jl     L74
  cmpl   $0x0,-0x68(%rbp)
  je     L104
  jmp    L35
L104:
  nop
  movl   $0x0,-0x64(%rbp)
  jmp    L96
L58:
  mov    -0x40(%rbp),%rax
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  addl   $0x1,-0x64(%rbp)
L96:
  mov    -0x6c(%rbp),%eax
  cmp    %eax,-0x64(%rbp)
  jl     L58
  mov    -0x6c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L45
  mov    -0x64(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x50(%rbp)
  pxor   %xmm2,%xmm2
  cvtss2sd -0x50(%rbp),%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  lea    D57(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L156
L45:
  mov    -0x6c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L156
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x5c(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x58(%rbp)
  movss  -0x5c(%rbp),%xmm0
  addss  -0x58(%rbp),%xmm0
  movss  D0(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x54(%rbp)
  pxor   %xmm3,%xmm3
  cvtss2sd -0x54(%rbp),%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L156:
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L72
  call   <__stack_chk_fail@plt>
L72:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: tag: D50
type_guessed: string
name: read_data
arguments: tag: D2
type_guessed: string
name: read_data
arguments: tag: D40
type_guessed: string
name: read_data
arguments: tag: D36
type_guessed: string
name: read_data
arguments: tag: D57
type_guessed: string
name: read_data
arguments: tag: D0
type_guessed: f32
name: read_data
arguments: tag: D55
type_guessed: string

tool: D50: hvor mange tal skal du bruge?

tool: D2: %d

tool: D40: Tal nr. %d:
 

tool: D36: %d


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


tool: D0: 2

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


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;
}
```