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

```asm
<mergesort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x3c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L77
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  jmp    L82
L77:
  mov    -0x3c(%rbp),%eax
L82:
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L114
L72:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0x10(%rbp),%xmm0
  comiss -0xc(%rbp),%xmm0
  jbe    L118
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0xc(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x10(%rbp),%xmm0
  movss  %xmm0,(%rax)
  movss  -0xc(%rbp),%xmm0
  mov    -0x10(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x2d(%rbp),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
L118:
  addl   $0x2,-0x2c(%rbp)
L114:
  mov    -0x2c(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L72
  movl   $0x2,-0x28(%rbp)
  jmp    L87
L84:
  movl   $0x0,-0x24(%rbp)
  movl   $0x2,-0x20(%rbp)
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jge    L65
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jne    L65
  movl   $0x1,-0x20(%rbp)
  jmp    L65
L132:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x14(%rbp)
  movss  -0x18(%rbp),%xmm0
  comiss -0x14(%rbp),%xmm0
  jbe    L68
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
L68:
  addl   $0x1,-0x24(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x14(%rbp),%xmm0
  comiss -0x18(%rbp),%xmm0
  ja     L100
  jmp    L65
L100:
  cmpl   $0x2,-0x20(%rbp)
  jne    L65
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  -0x14(%rbp),%xmm0
  movss  %xmm0,(%rax)
L65:
  mov    -0x24(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L132
  addl   $0x2,-0x28(%rbp)
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <print@plt>
L87:
  mov    -0x28(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L84
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L78
  call   <__stack_chk_fail@plt>
L78:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D5
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D16
type_infered: string

tool: D5: Swapping %f %f

tool: D16: %c

assistant: ```c
void mergesort(float *array, int size) {
  int limit = (size % 2 == 0) ? size : size - 1;
  int i;
  char ch;
  for (i = 0; i < limit; i += 2) {
    float ent1 = *(array + i);
    float ent2 = *(array + i + 1);
    if (ent1 > ent2) {
      *(array + i) = ent2;
      *(array + i + 1) = ent1;
      printf("Swapping %f %f", ent1, ent2);
      scanf("%c", &ch);
    }
  }
  int cursize = 2;
  while (cursize < size) {
    int j = 0;
    int klim = 2;
    if (limit < size && cursize == (limit)) {
      klim = 1;
    }
    while (j < cursize) {
      float ent1 = *(array + j);
      float ent2 = *(array + cursize);
      if (ent2 < ent1) {
        *(array + cursize) = ent1;
        *(array + j) = ent2;
      }
      j++;
      ent1 = *(array + cursize + 1);
      if (ent1 < ent2 && klim == 2) {
        *(array + cursize) = ent1;
        *(array + cursize + 1) = ent2;
      }
    }
    cursize += 2;
    print(array, size);
  }
}
```