user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x1d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x1bc(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x1cc(%rbp)
  lea    D71(%rip),%rax
  mov    %rax,%rsi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x1b8(%rbp)
  lea    -0x1dc(%rbp),%rdx
  mov    -0x1b8(%rbp),%rax
  lea    D59(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  movl   $0x0,-0x1c4(%rbp)
  jmp    L111
L53:
  lea    -0x1b0(%rbp),%rdx
  mov    -0x1c4(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0x1b8(%rbp),%rax
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fscanf@plt>
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  -0x1cc(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x1cc(%rbp)
  cmpl   $0x0,-0x1c4(%rbp)
  jne    L78
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1d4(%rbp)
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1d0(%rbp)
L78:
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  comiss -0x1d4(%rbp),%xmm0
  jbe    L65
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1d4(%rbp)
  jmp    L1
L65:
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm1
  movss  -0x1d0(%rbp),%xmm0
  comiss %xmm1,%xmm0
  jbe    L1
  mov    -0x1c4(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1d0(%rbp)
L1:
  addl   $0x1,-0x1c4(%rbp)
L111:
  mov    -0x1dc(%rbp),%eax
  cmp    %eax,-0x1c4(%rbp)
  jl     L53
  mov    -0x1b8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x1dc(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0x1cc(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x1bc(%rbp)
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1dd(%rbp),%rax
  mov    %rax,%rsi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl -0x1dd(%rbp),%eax
  movsbl %al,%eax
  cmp    $0x73,%eax
  je     L144
  cmp    $0x73,%eax
  jg     L17
  cmp    $0x6e,%eax
  je     L122
  cmp    $0x6e,%eax
  jg     L17
  cmp    $0x61,%eax
  je     L128
  cmp    $0x62,%eax
  jne    L17
  pxor   %xmm2,%xmm2
  cvtss2sd -0x1d4(%rbp),%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L17
L144:
  pxor   %xmm3,%xmm3
  cvtss2sd -0x1d0(%rbp),%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L17
L128:
  pxor   %xmm4,%xmm4
  cvtss2sd -0x1bc(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  jmp    L17
L122:
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1d8(%rbp),%rax
  mov    %rax,%rsi
  lea    D79(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x1c0(%rbp)
  jmp    L99
L35:
  cmpl   $0x0,-0x1c0(%rbp)
  jne    L24
  mov    -0x1c0(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1c8(%rbp)
L24:
  movss  -0x1d8(%rbp),%xmm0
  subss  -0x1c8(%rbp),%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <abs@plt>
  mov    %eax,%ebx
  movss  -0x1d8(%rbp),%xmm0
  mov    -0x1c0(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm1
  subss  %xmm1,%xmm0
  movd   %xmm0,%eax
  movd   %eax,%xmm0
  call   <abs@plt>
  cmp    %eax,%ebx
  jle    L22
  mov    -0x1c0(%rbp),%eax
  cltq
  movss  -0x1b0(%rbp,%rax,4),%xmm0
  movss  %xmm0,-0x1c8(%rbp)
L22:
  addl   $0x1,-0x1c0(%rbp)
L99:
  mov    -0x1dc(%rbp),%eax
  cmp    %eax,-0x1c0(%rbp)
  jl     L35
  pxor   %xmm5,%xmm5
  cvtss2sd -0x1c8(%rbp),%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  nop
L17:
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L100
  call   <__stack_chk_fail@plt>
L100:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D71
type: string
name: unpack_data
arguments: data_tag: D88
type: string
name: unpack_data
arguments: data_tag: D59
type: string
name: unpack_data
arguments: data_tag: D14
type: string
name: unpack_data
arguments: data_tag: D51
type: string
name: unpack_data
arguments: data_tag: D66
type: string
name: unpack_data
arguments: data_tag: D53
type: string
name: unpack_data
arguments: data_tag: D79
type: string
name: unpack_data
arguments: data_tag: D111
type: string
name: unpack_data
arguments: data_tag: D10
type: string

tool: D71: r

tool: D88: values

tool: D59: %i

tool: D14:  %f

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

tool: D66: What do you want? 

tool: D53: %s

tool: D79: %f

tool: D111: What is your value? 

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