user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x30(%rbp),%rax
  mov    %rax,%rsi
  lea    D314(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D139(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rsi
  lea    D314(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D446(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D314(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D351(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x24(%rbp),%rax
  mov    %rax,%rsi
  lea    D314(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    D225(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D314(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x30(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D158(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x2c(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D329(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x28(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D95(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x24(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D0(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x20(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D19(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  pxor   %xmm3,%xmm3
  cvtss2sd -0x18(%rbp),%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D380(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D130(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D424(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movss  -0x1c(%rbp),%xmm0
  subss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x14(%rbp)
  lea    D96(%rip),%rax
  mov    %rax,%rsi
  lea    D160(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x10(%rbp),%rax
  lea    D81(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x30(%rbp),%eax
  cmp    $0x1,%eax
  jne    L60
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0xa,%edx
  mov    $0x1,%esi
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L38
L60:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0xa,%edx
  mov    $0x1,%esi
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L38:
  mov    -0x30(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D158(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    D158(%rip),%rdx
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  lea    D393(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  mov    -0x2c(%rbp),%eax
  cmp    $0x1,%eax
  jne    L104
  movb   $0x20,-0x31(%rbp)
  jmp    L76
L104:
  movb   $0x73,-0x31(%rbp)
L76:
  mov    -0x2c(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D329(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsbl -0x31(%rbp),%ecx
  mov    -0x2c(%rbp),%edx
  mov    D329(%rip),%rsi
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  lea    D72(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  mov    -0x28(%rbp),%eax
  cmp    $0x1,%eax
  jne    L58
  movb   $0x20,-0x31(%rbp)
  jmp    L50
L58:
  movb   $0x73,-0x31(%rbp)
L50:
  mov    -0x28(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D95(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsbl -0x31(%rbp),%ecx
  mov    -0x28(%rbp),%edx
  mov    D95(%rip),%rsi
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  lea    D347(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  mov    -0x24(%rbp),%eax
  cmp    $0x1,%eax
  jne    L19
  movb   $0x20,-0x31(%rbp)
  jmp    L101
L19:
  movb   $0x73,-0x31(%rbp)
L101:
  mov    -0x24(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D0(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsbl -0x31(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    D0(%rip),%rsi
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  lea    D156(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  mov    -0x20(%rbp),%eax
  cmp    $0x1,%eax
  jne    L47
  movb   $0x20,-0x31(%rbp)
  jmp    L105
L47:
  movb   $0x73,-0x31(%rbp)
L105:
  mov    -0x20(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D19(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsbl -0x31(%rbp),%ecx
  mov    -0x20(%rbp),%edx
  mov    D19(%rip),%rsi
  mov    -0x10(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  lea    D300(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%rax
  mov    $0x20,%edx
  lea    D332(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  pxor   %xmm4,%xmm4
  cvtss2sd -0x18(%rbp),%xmm4
  movq   %xmm4,%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D145(%rip),%rdx
  lea    D326(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  movss  -0x1c(%rbp),%xmm0
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm0,%xmm5
  movq   %xmm5,%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D50(%rip),%rdx
  lea    D326(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  pxor   %xmm6,%xmm6
  cvtss2sd -0x14(%rbp),%xmm6
  movq   %xmm6,%rdx
  mov    -0x10(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D269(%rip),%rdx
  lea    D49(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L102
  call   <__stack_chk_fail@plt>
L102:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D157
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D314
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D139
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D446
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D351
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D225
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D158
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D329
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D95
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D0
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D19
type_infered: f64
name: extract_symbolic_data
arguments: data_tag: D380
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D130
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D424
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D96
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D160
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D81
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D135
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D86
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D393
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D72
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D347
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D156
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D300
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D332
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D145
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D326
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D50
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D269
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D49
type_infered: string

tool: D157: Bocadillos de chorizo: 

tool: D314: %d

tool: D139: Bocadillos de tortilla: 

tool: D446: Botellas de agua: 

tool: D351: Refrescos de cola: 

tool: D225: Tercios: 

tool: D158: 1.5

tool: D329: 1.2

tool: D95: 0.5

tool: D0: 0.6

tool: D19: 0.75

tool: D380: 
En total son %.2f euros.


tool: D130: 
Entregado: 

tool: D424: %f

tool: D96: w

tool: D160: cuenta.txt

tool: D81:  %2d 

tool: D135: bocadillo 

tool: D86: bocadillos

tool: D393:  de chorizo a %5.2f euros son %6.2f euros


tool: D72:  %2d bocadillo%c de tortilla a    %5.2f euros son %6.2f euros


tool: D347:  %2d botella%c de agua a      %5.2f euros son %6.2f euros


tool: D156:  %2d refresco%c de cola a     %5.2f euros son %6.2f euros


tool: D300:  %2d refresco%c de tercio a  %5.2f euros son %6.2f euros


tool: D332: %42c --------


tool: D145: TOTAL:

tool: D326: %42s  %6.2f euros


tool: D50: Entrega:

tool: D269: Devolucion:

tool: D49: %42s  %6.2f euros



assistant: ```c
int main() {
  int n_chorizo, n_tortilla, n_agua, n_cola, n_tercio;
  float total, entrega, devolucion;
  FILE *F;
  char s;
  printf("Bocadillos de chorizo: ");
  scanf("%d", &n_chorizo);
  printf("Bocadillos de tortilla: ");
  scanf("%d", &n_tortilla);
  printf("Botellas de agua: ");
  scanf("%d", &n_agua);
  printf("Refrescos de cola: ");
  scanf("%d", &n_cola);
  printf("Tercios: ");
  scanf("%d", &n_tercio);
  total = 1.50 * n_chorizo + 1.20 * n_tortilla + 0.50 * n_agua + 0.60 * n_cola + 0.75 * n_tercio;
  printf("\nEn total son %.2f euros.\n", total);
  printf("\nEntregado: ");
  scanf("%f", &entrega);
  devolucion = entrega - total;
  F = fopen("cuenta.txt", "w");
  fprintf(F, " %2d ", n_chorizo);
  if (n_chorizo == 1)
    fprintf(F, "bocadillo ");
  else
    fprintf(F, "bocadillos");
  fprintf(F, " de chorizo a %5.2f euros son %6.2f euros\n", 1.50, 1.50 * n_chorizo);
  if (n_tortilla == 1)
    s = ' ';
  else
    s = 's';
  fprintf(F, " %2d bocadillo%c de tortilla a    %5.2f euros son %6.2f euros\n", n_tortilla, s, 1.20, 1.20 * n_tortilla);
  if (n_agua == 1)
    s = ' ';
  else
    s = 's';
  fprintf(F, " %2d botella%c de agua a      %5.2f euros son %6.2f euros\n", n_agua, s, 0.50, 0.50 * n_agua);
  if (n_cola == 1)
    s = ' ';
  else
    s = 's';
  fprintf(F, " %2d refresco%c de cola a     %5.2f euros son %6.2f euros\n", n_cola, s, 0.60, 0.60 * n_cola);
  if (n_tercio == 1)
    s = ' ';
  else
    s = 's';
  fprintf(F, " %2d refresco%c de tercio a  %5.2f euros son %6.2f euros\n", n_tercio, s, 0.75, 0.75 * n_tercio);
  fprintf(F, "%42c --------\n", ' ');
  fprintf(F, "%42s  %6.2f euros\n", "TOTAL:", total);
  fprintf(F, "%42s  %6.2f euros\n", "Entrega:", entrega);
  fprintf(F, "%42s  %6.2f euros\n\n", "Devolucion:", devolucion);
  fclose(F);
  return 0;
}
```