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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x34(%rbp),%rdx
  lea    -0x38(%rbp),%rax
  mov    %rax,%rsi
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x30(%rbp)
  jmp    L47
L20:
  lea    -0x12(%rbp),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x12(%rbp),%rax
  lea    D29(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  jne    L16
  movss  -0x38(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x2c(%rbp),%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L16:
  lea    -0x12(%rbp),%rax
  lea    D55(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  jne    L41
  movss  -0x38(%rbp),%xmm0
  cvttss2si %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  pxor   %xmm2,%xmm2
  cvtsi2sdq -0x28(%rbp),%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L41:
  lea    -0x12(%rbp),%rax
  lea    D95(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  jne    L18
  movss  -0x38(%rbp),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L18:
  lea    -0x12(%rbp),%rax
  lea    D97(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%eax
  jne    L38
  movss  -0x38(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L38:
  addl   $0x1,-0x30(%rbp)
L47:
  mov    -0x34(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L20
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L15
  call   <__stack_chk_fail@plt>
L15:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D17
type_infered: string
name: retrieve_data
arguments: data_label: D41
type_infered: string
name: retrieve_data
arguments: data_label: D29
type_infered: string
name: retrieve_data
arguments: data_label: D20
type_infered: string
name: retrieve_data
arguments: data_label: D55
type_infered: string
name: retrieve_data
arguments: data_label: D37
type_infered: string
name: retrieve_data
arguments: data_label: D95
type_infered: string
name: retrieve_data
arguments: data_label: D34
type_infered: string
name: retrieve_data
arguments: data_label: D97
type_infered: string

tool: D17: %f %d

tool: D41: %s

tool: D29: int

tool: D20: %d


tool: D55: long

tool: D37: %lld


tool: D95: float

tool: D34: %f


tool: D97: double

assistant: ```c
int main() {
  float liczba;
  int iteracje, i;
  scanf("%f %d", &liczba, &iteracje);
  for (i = 0; i < iteracje; i++) {
    char typ[10];
    scanf("%s", typ);
    if (strcmp(typ, "int") == 1) {
      int temp = liczba;
      printf("%d\n", temp);
    }
    if (strcmp(typ, "long") == 1) {
      long long int temp = liczba;
      printf("%lld\n", temp);
    }
    if (strcmp(typ, "float") == 1) {
      printf("%f\n", liczba);
    }
    if (strcmp(typ, "double") == 1) {
      double temp = liczba;
      printf("%f\n", temp);
    }
  }
}
```