user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  lea    D393(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D372(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D529(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L224
L55:
  movsbl -0x4d(%rbp),%eax
  cmp    $0x63,%eax
  je     L300
  cmp    $0x63,%eax
  jg     L183
  cmp    $0x61,%eax
  je     L39
  cmp    $0x62,%eax
  je     L167
  jmp    L183
L39:
  lea    D214(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L245
L59:
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  lea    D321(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L245:
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D386(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L59
  jmp    L236
L126:
  nop
L236:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L126
  jmp    L183
L167:
  lea    D377(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L104
L254:
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L104:
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D386(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L254
  jmp    L12
L87:
  nop
L12:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L87
  jmp    L183
L300:
  lea    D536(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L50
L141:
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  lea    D517(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L50:
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D386(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L141
  jmp    L252
L171:
  nop
L252:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L171
  nop
L183:
  cmpb   $0x71,-0x4d(%rbp)
  je     L18
  mov    $0xa,%edi
  call   <putchar@plt>
  lea    D393(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D372(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D529(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D135(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L224:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %al,-0x4d(%rbp)
  cmpb   $0x61,-0x4d(%rbp)
  je     L55
  cmpb   $0x62,-0x4d(%rbp)
  je     L55
  cmpb   $0x63,-0x4d(%rbp)
  je     L55
  jmp    L246
L18:
  nop
L246:
  movsd  -0x40(%rbp),%xmm1
  movsd  D244(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  movsd  D447(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  movsd  D115(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  comisd D23(%rip),%xmm0
  jbe    L127
  movsd  -0x20(%rbp),%xmm1
  movsd  D421(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x1,-0x4c(%rbp)
  jmp    L116
L127:
  movl   $0x0,-0x4c(%rbp)
L116:
  movsd  -0x40(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D541(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L223
  movsd  D464(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L56
L223:
  movsd  D540(%rip),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L47
  movsd  D452(%rip),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L56
L47:
  movsd  -0x10(%rbp),%xmm0
  movsd  D540(%rip),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D462(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D452(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L56:
  movsd  -0x20(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  lea    D490(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movsd  -0x40(%rbp),%xmm0
  mov    D244(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D389(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  movsd  -0x38(%rbp),%xmm0
  mov    D447(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D353(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  movsd  -0x30(%rbp),%xmm0
  mov    D115(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D428(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D197(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movsd  -0x30(%rbp),%xmm1
  movsd  D115(%rip),%xmm0
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x38(%rbp),%xmm1
  movsd  D447(%rip),%xmm0
  movapd %xmm1,%xmm3
  mulsd  %xmm0,%xmm3
  movsd  -0x40(%rbp),%xmm1
  movsd  D244(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movapd %xmm3,%xmm1
  movq   %rax,%xmm0
  lea    D204(%rip),%rax
  mov    %rax,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  lea    D504(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  cmpl   $0x0,-0x4c(%rbp)
  je     L131
  movsd  -0x40(%rbp),%xmm1
  movsd  D244(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  movsd  D447(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  movsd  D115(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D331(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  lea    D301(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L131:
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  lea    D229(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  lea    D543(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  lea    D338(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L177
  call   <__stack_chk_fail@plt>
L177:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D393
type: string
name: read_data
arguments: data_label: D84
type: string
name: read_data
arguments: data_label: D372
type: string
name: read_data
arguments: data_label: D529
type: string
name: read_data
arguments: data_label: D135
type: string
name: read_data
arguments: data_label: D198
type: string
name: read_data
arguments: data_label: D214
type: string
name: read_data
arguments: data_label: D321
type: string
name: read_data
arguments: data_label: D386
type: string
name: read_data
arguments: data_label: D377
type: string
name: read_data
arguments: data_label: D30
type: string
name: read_data
arguments: data_label: D536
type: string
name: read_data
arguments: data_label: D517
type: string
name: read_data
arguments: data_label: D244
type: f64
name: read_data
arguments: data_label: D447
type: f64
name: read_data
arguments: data_label: D115
type: f64
name: read_data
arguments: data_label: D23
type: byte[16]
name: read_data
arguments: data_label: D421
type: byte[8]
name: read_data
arguments: data_label: D541
type: byte[8]
name: read_data
arguments: data_label: D464
type: f64
name: read_data
arguments: data_label: D540
type: byte[8]
name: read_data
arguments: data_label: D452
type: byte[8]
name: read_data
arguments: data_label: D462
type: f64
name: read_data
arguments: data_label: D490
type: string
name: read_data
arguments: data_label: D389
type: string
name: read_data
arguments: data_label: D353
type: string
name: read_data
arguments: data_label: D428
type: string
name: read_data
arguments: data_label: D6
type: string
name: read_data
arguments: data_label: D197
type: string
name: read_data
arguments: data_label: D204
type: string
name: read_data
arguments: data_label: D504
type: string
name: read_data
arguments: data_label: D331
type: f64
name: read_data
arguments: data_label: D301
type: string
name: read_data
arguments: data_label: D229
type: string
name: read_data
arguments: data_label: D543
type: string
name: read_data
arguments: data_label: D338
type: string

tool: D393: **************The ABC Mail Order Grocery Order System*************

tool: D84: Enter the letter corresponding to the desired vegetable or action:

tool: D372: a) Artichokes               b) Beets

tool: D529: c) Carrots

tool: D135: q) Quit ordering process

tool: D198: ******************************************************************

tool: D214: Please enter pounds of artichokes (q to finish):

tool: D321: More pounds of artichokes? (q to finish)

tool: D386: %lf

tool: D377: Please enter pounds of beets (q to finish):

tool: D30: More pounds of beets? (q to finish)

tool: D536: Please enter pounds of carrots (q to finish):

tool: D517: More pounds of carrots? (q to finish)

tool: D244: 2.05

tool: D447: 1.15

tool: D115: 1.09

tool: {"D23": [0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x40,0x66,0x66,0x66,0x66,0x66,0x66,0xee,0x3f]}

tool: {"D421": [0x66,0x66,0x66,0x66,0x66,0x66,0xee,0x3f]}

tool: {"D541": [0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x40]}

tool: D464: 6.5

tool: {"D540": [0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x40]}

tool: {"D452": [0x00,0x00,0x00,0x00,0x00,0x00,0x2c,0x40]}

tool: D462: 0.5

tool: D490: 
---------------------------------------------------------

tool: D389: Artichokes: $%.2f/pound, you have ordered %.1f pound(s)


tool: D353: Beets: $%.2f/pound, you have ordered %.1f pound(s)


tool: D428: Carrots: $%.2f/pound, you have ordered %.1f pound(s)


tool: D6: ---------------------------------------------------------

tool: D197: Summary:


tool: D204: Artichokes: $%.2f
Beets: $%.2f
Carrots: $%.2f


tool: D504: Total: $%.2f



tool: D331: 0.05

tool: D301: Discount: -$%.2f


tool: D229: Shipment: $%.2f


tool: D543: Grand Total Cost: $%.2f



tool: D338: Thank you for purchasing!
Your vegetables will arrive within 3 minutes:)

assistant: ```c
int main(void) {
  char option;
  double apound, bpound, cpound, pound, temp;
  double total, ship, price;
  bool DISCOUNT_FLAG;
  apound = bpound = cpound = pound = total = ship = price = 0;
  printf("**************The ABC Mail Order Grocery Order System*************\n");
  printf("Enter the letter corresponding to the desired vegetable or action:\n");
  printf("a) Artichokes               b) Beets\n");
  printf("c) Carrots\n");
  printf("q) Quit ordering process\n");
  printf("******************************************************************\n");
  while ((option = getchar()) == 'a' || option == 'b' || option == 'c') {
    switch (option) {
    case 'a':
      printf("Please enter pounds of artichokes (q to finish):\n");
      while (scanf("%lf", &temp) == 1) {
        apound += temp;
        printf("More pounds of artichokes? (q to finish)\n");
      }
      while (getchar() != '\n')
        continue;
      break;
    case 'b':
      printf("Please enter pounds of beets (q to finish):\n");
      while (scanf("%lf", &temp) == 1) {
        bpound += temp;
        printf("More pounds of beets? (q to finish)\n");
      }
      while (getchar() != '\n')
        continue;
      break;
    case 'c':
      printf("Please enter pounds of carrots (q to finish):\n");
      while (scanf("%lf", &temp) == 1) {
        cpound += temp;
        printf("More pounds of carrots? (q to finish)\n");
      }
      while (getchar() != '\n')
        continue;
      break;
    }
    if ('q' == option)
      break;
    putchar('\n');
    printf("**************The ABC Mail Order Grocery Order System*************\n");
    printf("Enter the letter corresponding to the desired vegetable or action:\n");
    printf("a) Artichokes               b) Beets\n");
    printf("c) Carrots\n");
    printf("q) Quit ordering process\n");
    printf("******************************************************************\n");
  }
  price = apound * 2.05 + bpound * 1.15 + cpound * 1.09;
  if (price > 100) {
    price *= (1 - 0.05);
    DISCOUNT_FLAG = true;
  } else
    DISCOUNT_FLAG = false;
  pound = apound + bpound + cpound;
  if (pound < 5)
    ship = 6.5;
  else if (pound < 20)
    ship = 14;
  else
    ship = 14 + (pound - 20) * 0.5;
  total = price + ship;
  printf("\n---------------------------------------------------------\n");
  printf("Artichokes: $%.2f/pound, you have ordered %.1f pound(s)\n", 2.05, apound);
  printf("Beets: $%.2f/pound, you have ordered %.1f pound(s)\n", 1.15, bpound);
  printf("Carrots: $%.2f/pound, you have ordered %.1f pound(s)\n", 1.09, cpound);
  printf("---------------------------------------------------------\n");
  printf("Summary:\n\n");
  printf("Artichokes: $%.2f\nBeets: $%.2f\nCarrots: $%.2f\n", 2.05 * apound, 1.15 * bpound, 1.09 * cpound);
  printf("Total: $%.2f\n\n", price);
  if (DISCOUNT_FLAG)
    printf("Discount: -$%.2f\n", 0.05 * (apound * 2.05 + bpound * 1.15 + cpound * 1.09));
  printf("Shipment: $%.2f\n", ship);
  printf("Grand Total Cost: $%.2f\n\n", total);
  printf("Thank you for purchasing!\nYour vegetables will arrive within 3 minutes:)\n");
  return 0;
}
```