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

```asm
<main>:
  endbr64
  push   %r14
  lea    D57(%rip),%rsi
  lea    D10(%rip),%rdi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1c0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1b8(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  lea    0x18(%rsp),%rdx
  lea    D1(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  xor    %eax,%eax
  call   <fscanf@plt>
  mov    0x18(%rsp),%eax
  pxor   %xmm5,%xmm5
  movd   %xmm5,%r14d
  test   %eax,%eax
  jle    L148
  lea    0x20(%rsp),%rbp
  xor    %eax,%eax
  mov    %r12,%rdi
  mov    $0x1,%ebx
  lea    D127(%rip),%r13
  mov    %rbp,%rdx
  mov    %r13,%rsi
  call   <fscanf@plt>
  movss  0x20(%rsp),%xmm4
  pxor   %xmm5,%xmm5
  cmpl   $0x1,0x18(%rsp)
  addss  %xmm4,%xmm5
  movss  %xmm4,0x4(%rsp)
  movss  %xmm4,0x8(%rsp)
  movd   %xmm5,%r14d
  jg     L113
  jmp    L148
L87:
  movss  %xmm0,0x4(%rsp)
  add    $0x1,%rbx
  cmp    %ebx,0x18(%rsp)
  jle    L148
L113:
  xor    %eax,%eax
  lea    0x0(%rbp,%rbx,4),%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <fscanf@plt>
  movss  0x0(%rbp,%rbx,4),%xmm0
  movd   %r14d,%xmm2
  comiss 0x4(%rsp),%xmm0
  addss  %xmm0,%xmm2
  movd   %xmm2,%r14d
  ja     L87
  minss  0x8(%rsp),%xmm0
  add    $0x1,%rbx
  movss  %xmm0,0x8(%rsp)
  cmp    %ebx,0x18(%rsp)
  jg     L113
L148:
  mov    %r12,%rdi
  call   <fclose@plt>
  lea    D94(%rip),%rdi
  mov    0x18(%rsp),%ebx
  call   <puts@plt>
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x17(%rsp),%rsi
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0x17(%rsp),%eax
  cmp    $0x6e,%al
  je     L29
  jg     L68
  cmp    $0x61,%al
  je     L67
  cmp    $0x62,%al
  jne    L81
  pxor   %xmm0,%xmm0
  lea    D64(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0x4(%rsp),%xmm0
  call   <printf@plt>
  xchg   %ax,%ax
L81:
  mov    0x1b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L97
  add    $0x1c0,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L68:
  cmp    $0x73,%al
  jne    L81
  pxor   %xmm0,%xmm0
  lea    D64(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0x8(%rsp),%xmm0
  call   <printf@plt>
  jmp    L81
L29:
  lea    D101(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  lea    D64(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0x18(%rsp)
  jle    L107
  lea    0x20(%rsp),%r12
  xor    %ebx,%ebx
L16:
  test   %ebx,%ebx
  jne    L156
  movss  0x20(%rsp),%xmm1
  movss  %xmm1,0xc(%rsp)
L156:
  movss  0x1c(%rsp),%xmm0
  subss  0xc(%rsp),%xmm0
  call   <abs@plt>
  movss  0x1c(%rsp),%xmm0
  subss  (%r12),%xmm0
  mov    %eax,%ebp
  call   <abs@plt>
  cmp    %eax,%ebp
  jle    L71
  movss  (%r12),%xmm1
  movss  %xmm1,0xc(%rsp)
L71:
  add    $0x1,%ebx
  add    $0x4,%r12
  cmp    %ebx,0x18(%rsp)
  jg     L16
L107:
  pxor   %xmm0,%xmm0
  lea    D51(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0xc(%rsp),%xmm0
  call   <printf@plt>
  jmp    L81
L67:
  pxor   %xmm1,%xmm1
  movd   %r14d,%xmm0
  mov    $0x1,%eax
  cvtsi2ss %ebx,%xmm1
  lea    D64(%rip),%rdi
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  jmp    L81
L97:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D57
type_guessed: string
name: parse_data
arguments: data_tag: D10
type_guessed: string
name: parse_data
arguments: data_tag: D1
type_guessed: string
name: parse_data
arguments: data_tag: D127
type_guessed: string
name: parse_data
arguments: data_tag: D94
type_guessed: string
name: parse_data
arguments: data_tag: D12
type_guessed: string
name: parse_data
arguments: data_tag: D30
type_guessed: string
name: parse_data
arguments: data_tag: D64
type_guessed: string
name: parse_data
arguments: data_tag: D101
type_guessed: string
name: parse_data
arguments: data_tag: D51
type_guessed: string

tool: D57: r

tool: D10: values

tool: D1: %i

tool: D127:  %f

tool: D94: [b] for maxvalue
[s] for minvalue
[a] for avg
[n] for nearest value

tool: D12: What do you want? 

tool: D30: %s

tool: D64: %f

tool: D101: What is your value? 

tool: D51: The nearest value to your value is %f

assistant: ```c
int main() {
  float values[100];
  int countValues;
  float userValue;
  char userInput;
  float maxValue;
  float minValue;
  float avg;
  float sum;
  float nearestValue;
  FILE *file;
  avg = 0;
  sum = 0;
  file = fopen("values", "r");
  fscanf(file, "%i", &countValues);
  for (int i = 0; i < countValues; i++) {
    fscanf(file, " %f", &values[i]);
    sum += values[i];
    if (i == 0) {
      maxValue = values[i];
      minValue = values[i];
    }
    if (values[i] > maxValue) {
      maxValue = values[i];
    } else {
      if (values[i] < minValue) {
        minValue = values[i];
      }
    }
  }
  fclose(file);
  avg = sum / countValues;
  printf("[b] for maxvalue\n[s] for minvalue\n[a] for avg\n[n] for nearest value\n");
  printf("What do you want? ");
  scanf("%s", &userInput);
  switch (userInput) {
  case 'b':
    printf("%f", maxValue);
    break;
  case 's':
    printf("%f", minValue);
    break;
  case 'a':
    printf("%f", avg);
    break;
  case 'n':
    printf("What is your value? ");
    scanf("%f", &userValue);
    for (int i = 0; i < countValues; i++) {
      if (i == 0)
        nearestValue = values[i];
      if (abs(userValue - nearestValue) > abs(userValue - values[i]))
        nearestValue = values[i];
    }
    printf("The nearest value to your value is %f", nearestValue);
    break;
  }
  return 0;
}
```