user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r14
  lea    D61(%rip),%rsi
  lea    D95(%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    D8(%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    L158
  lea    0x20(%rsp),%rbp
  mov    %r12,%rdi
  xor    %eax,%eax
  mov    $0x1,%ebx
  lea    D119(%rip),%r13
  mov    %rbp,%rdx
  mov    %r13,%rsi
  call   <fscanf@plt>
  movss  0x20(%rsp),%xmm4
  pxor   %xmm5,%xmm5
  addss  %xmm4,%xmm5
  movss  %xmm4,0x4(%rsp)
  movss  %xmm4,0x8(%rsp)
  movd   %xmm5,%r14d
  jmp    L27
  nopl   0x0(%rax)
L55:
  movss  %xmm0,0x4(%rsp)
L63:
  add    $0x1,%rbx
L27:
  cmp    %ebx,0x18(%rsp)
  jle    L158
  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     L55
  minss  0x8(%rsp),%xmm0
  movss  %xmm0,0x8(%rsp)
  jmp    L63
  nopl   0x0(%rax,%rax,1)
L158:
  mov    %r12,%rdi
  call   <fclose@plt>
  lea    D23(%rip),%rdi
  mov    0x18(%rsp),%ebx
  call   <puts@plt>
  lea    D43(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x17(%rsp),%rsi
  lea    D56(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0x17(%rsp),%eax
  cmp    $0x6e,%al
  je     L154
  jg     L23
  cmp    $0x61,%al
  je     L67
  cmp    $0x62,%al
  jne    L15
  pxor   %xmm0,%xmm0
  lea    D118(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0x4(%rsp),%xmm0
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L15:
  mov    0x1b8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L157
  add    $0x1c0,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L23:
  cmp    $0x73,%al
  jne    L15
  pxor   %xmm0,%xmm0
  lea    D118(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0x8(%rsp),%xmm0
  call   <printf@plt>
  jmp    L15
L154:
  lea    D33(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  lea    0x1c(%rsp),%rsi
  lea    D118(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x0,0x18(%rsp)
  jle    L20
  lea    0x20(%rsp),%r12
  xor    %ebx,%ebx
L96:
  test   %ebx,%ebx
  jne    L128
  movss  0x20(%rsp),%xmm1
  movss  %xmm1,0xc(%rsp)
L128:
  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    L44
  movss  (%r12),%xmm1
  movss  %xmm1,0xc(%rsp)
L44:
  add    $0x1,%ebx
  add    $0x4,%r12
  cmp    %ebx,0x18(%rsp)
  jg     L96
L20:
  pxor   %xmm0,%xmm0
  lea    D125(%rip),%rdi
  mov    $0x1,%eax
  cvtss2sd 0xc(%rsp),%xmm0
  call   <printf@plt>
  jmp    L15
L67:
  pxor   %xmm1,%xmm1
  movd   %r14d,%xmm0
  mov    $0x1,%eax
  cvtsi2ss %ebx,%xmm1
  lea    D118(%rip),%rdi
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <printf@plt>
  jmp    L15
L157:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D61
type: string
name: extract_symbolic_data
arguments: label: D95
type: string
name: extract_symbolic_data
arguments: label: D8
type: string
name: extract_symbolic_data
arguments: label: D119
type: string
name: extract_symbolic_data
arguments: label: D23
type: string
name: extract_symbolic_data
arguments: label: D43
type: string
name: extract_symbolic_data
arguments: label: D56
type: string
name: extract_symbolic_data
arguments: label: D118
type: string
name: extract_symbolic_data
arguments: label: D33
type: string
name: extract_symbolic_data
arguments: label: D125
type: string

tool: D61: r

tool: D95: values

tool: D8: %i

tool: D119:  %f

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

tool: D43: What do you want? 

tool: D56: %s

tool: D118: %f

tool: D33: What is your value? 

tool: D125: 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;
}
```