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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    D93(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D80(%rip),%rdi
  call   <puts@plt>
  lea    D122(%rip),%r12
  lea    D105(%rip),%rbp
  lea    D36(%rip),%r13
  jmp    L65
L63:
  lea    D104(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x18(%rsp),%rsi
  lea    D147(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  jmp    L97
L37:
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x8(%rsp)
  lea    D33(%rip),%r14
  lea    D147(%rip),%rbx
  jmp    L25
L96:
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L25:
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x20(%rsp),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movsd  0x20(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jae    L96
  movsd  0x8(%rsp),%xmm0
  mov    %r13,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
  mulsd  0x18(%rsp),%xmm0
  lea    D142(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  0x20(%rsp),%xmm0
  comisd D2(%rip),%xmm0
  jae    L25
  jmp    L97
L102:
  lea    D72(%rip),%rdi
  call   <puts@plt>
L97:
  cmpl   $0x3,0x14(%rsp)
  je     L34
L65:
  movsd  0x18(%rsp),%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D16(%rip),%rdi
  call   <puts@plt>
  lea    D74(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x14(%rsp),%rsi
  lea    D119(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x14(%rsp),%eax
  cmp    $0x1,%eax
  je     L63
  cmp    $0x2,%eax
  je     L37
  cmp    $0x3,%eax
  je     L102
  lea    D83(%rip),%rdi
  call   <puts@plt>
  jmp    L97
L34:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  mov    $0x0,%eax
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L73:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D93
type: f64
name: parse_data
arguments: data_label: D80
type: string
name: parse_data
arguments: data_label: D122
type: string
name: parse_data
arguments: data_label: D105
type: string
name: parse_data
arguments: data_label: D36
type: string
name: parse_data
arguments: data_label: D104
type: string
name: parse_data
arguments: data_label: D147
type: string
name: parse_data
arguments: data_label: D33
type: string
name: parse_data
arguments: data_label: D142
type: string
name: parse_data
arguments: data_label: D2
type: f64[2]
name: parse_data
arguments: data_label: D72
type: string
name: parse_data
arguments: data_label: D16
type: string
name: parse_data
arguments: data_label: D74
type: string
name: parse_data
arguments: data_label: D119
type: string
name: parse_data
arguments: data_label: D83
type: string

tool: D93: 1

tool: D80: Your shopping assistant

tool: D122: 
1. Set exchange rate in SEK (current rate: %.2f)

tool: D105: 
2. Read prices in the foreign currency

tool: D36: 
Sum in foreign currency: %.2f

tool: D104: Give exchange rate: 

tool: D147: %lf

tool: D33: Give price (finish with < 0): 

tool: D142: 
Sum in SEK: %.2f


tool: {"D2": [0.0,1.0]}

tool: D72: End of program!


tool: D16: 
3. End

tool: D74: 
Give your choice (1 - 3): 

tool: D119: %d

tool: D83: Not a valid choice!

assistant: ```c
int main() {
  int menuSelection;
  double currencyRate = 1.0;
  printf("Your shopping assistant\n");
  do {
    printf("\n1. Set exchange rate in SEK (current rate: %.2f)", currencyRate);
    printf("\n2. Read prices in the foreign currency");
    printf("\n3. End\n");
    printf("\nGive your choice (1 - 3): ");
    scanf("%d", &menuSelection);
    printf("\n");
    if (menuSelection == 1) {
      printf("Give exchange rate: ");
      scanf("%lf", &currencyRate);
    } else if (menuSelection == 2) {
      double priceSum = 0;
      double price;
      do {
        printf("Give price (finish with < 0): ");
        scanf("%lf", &price);
        if (price >= 0) {
          priceSum = priceSum + price;
        } else {
          printf("\nSum in foreign currency: %.2f", priceSum);
          printf("\nSum in SEK: %.2f\n", (priceSum * currencyRate));
        }
      } while (price >= 0);
    } else if (menuSelection == 3) {
      printf("End of program!\n\n");
    } else {
      printf("Not a valid choice!\n");
    }
  } while (menuSelection != 3);
}
```