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

```asm
<main>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  push   %r13
  lea    D169(%rip),%r13
  push   %r12
  lea    D218(%rip),%r12
  push   %rbp
  mov    %r12,%rdi
  mov    $0x1,%ebp
  push   %rbx
  mov    $0x1,%ebx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x40(%rsp)
  movl   $0x0,0x60(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x50(%rsp)
  call   <puts@plt>
  lea    0x30(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    0x44(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x50(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x64(%rsp),%rax
  mov    %rax,(%rsp)
  nopw   0x0(%rax,%rax,1)
L259:
  cmp    $0x5,%ebx
  jle    L69
  cmp    $0x5,%ebp
  jg     L186
L69:
  xor    %eax,%eax
L180:
  test   %eax,%eax
  je     L75
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  je     L321
L219:
  cmp    $0x2,%eax
  je     L99
  cmp    $0x3,%eax
  je     L134
L75:
  lea    0x2c(%rsp),%r15
  lea    D159(%rip),%r14
L292:
  lea    D127(%rip),%rdi
  call   <puts@plt>
  lea    D28(%rip),%rdi
  call   <puts@plt>
  lea    D86(%rip),%rdi
  call   <puts@plt>
  lea    D35(%rip),%rdi
  call   <puts@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  jne    L219
L321:
  cmp    $0x5,%ebx
  jg     L227
  lea    -0x1(%rbx),%eax
  add    $0x1,%ebx
  cltq
  movl   $0x1,0x30(%rsp,%rax,4)
L291:
  mov    %r12,%rdi
  call   <puts@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  je     L329
  mov    $0x1,%r14d
  cmp    $0x2,%eax
  je     L165
  nopl   0x0(%rax)
L106:
  cmp    $0x5,%ebx
  jle    L84
  cmp    $0x5,%ebp
  jg     L139
L84:
  mov    %r12,%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    0x10(%rsp),%r15
L290:
  mov    (%r15),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <printf@plt>
  cmp    0x8(%rsp),%r15
  jne    L290
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%r15
L137:
  mov    (%r15),%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <printf@plt>
  cmp    %r15,(%rsp)
  jne    L137
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  cmp    $0x1,%r14d
  je     L259
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L48
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L186:
  mov    0x2c(%rsp),%eax
  sub    $0x1,%eax
  cmp    $0x1,%eax
  jbe    L291
L139:
  mov    %r12,%rdi
  xor    %r14d,%r14d
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  lea    D50(%rip),%rdi
  call   <puts@plt>
  movl   $0x0,0x2c(%rsp)
  jmp    L84
L99:
  cmp    $0x5,%ebp
  jg     L249
  lea    -0x1(%rbp),%eax
  add    $0x1,%ebp
  cltq
  movl   $0x1,0x50(%rsp,%rax,4)
  jmp    L291
  xchg   %ax,%ax
L134:
  xor    %r14d,%r14d
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L227:
  mov    %r12,%rdi
  lea    0x2c(%rsp),%r15
  lea    D159(%rip),%r14
  call   <puts@plt>
  lea    D245(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D13(%rip),%rdi
  call   <puts@plt>
  lea    D41(%rip),%rdi
  call   <puts@plt>
  lea    D25(%rip),%rdi
  call   <puts@plt>
  lea    D182(%rip),%rdi
  call   <puts@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  je     L64
  sub    $0x2,%eax
  cmp    $0x1,%eax
  setbe  %al
  movzbl %al,%eax
  jmp    L180
  nopl   0x0(%rax,%rax,1)
L249:
  mov    %r12,%rdi
  lea    0x2c(%rsp),%r15
  lea    D159(%rip),%r14
  call   <puts@plt>
  lea    D114(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D232(%rip),%rdi
  call   <puts@plt>
  lea    D62(%rip),%rdi
  call   <puts@plt>
  lea    D211(%rip),%rdi
  call   <puts@plt>
  lea    D182(%rip),%rdi
  call   <puts@plt>
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x1,%eax
  je     L321
  cmp    $0x2,%eax
  je     L64
  cmp    $0x3,%eax
  sete   %al
  movzbl %al,%eax
  jmp    L180
  nopl   (%rax)
L64:
  mov    %r12,%rdi
  call   <puts@plt>
  lea    D185(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  call   <sleep@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  jmp    L292
L329:
  lea    D16(%rip),%rdi
  call   <puts@plt>
L169:
  mov    0x2c(%rsp),%r14d
  cmp    $0x1,%r14d
  jne    L5
  lea    -0x1(%rbx),%esi
  lea    D119(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L106
L165:
  lea    D154(%rip),%rdi
  call   <puts@plt>
  jmp    L169
L5:
  cmp    $0x2,%r14d
  jne    L0
  lea    -0x1(%rbp),%esi
  lea    D133(%rip),%rdi
  xor    %eax,%eax
  mov    $0x1,%r14d
  call   <printf@plt>
  jmp    L106
L0:
  mov    $0x1,%r14d
  jmp    L106
L48:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D169
type_infered: string
name: unpack_data
arguments: label: D218
type_infered: string
name: unpack_data
arguments: label: D159
type_infered: string
name: unpack_data
arguments: label: D127
type_infered: string
name: unpack_data
arguments: label: D28
type_infered: string
name: unpack_data
arguments: label: D86
type_infered: string
name: unpack_data
arguments: label: D35
type_infered: string
name: unpack_data
arguments: label: D50
type_infered: string
name: unpack_data
arguments: label: D245
type_infered: string
name: unpack_data
arguments: label: D13
type_infered: string
name: unpack_data
arguments: label: D41
type_infered: string
name: unpack_data
arguments: label: D25
type_infered: string
name: unpack_data
arguments: label: D182
type_infered: string
name: unpack_data
arguments: label: D114
type_infered: string
name: unpack_data
arguments: label: D232
type_infered: string
name: unpack_data
arguments: label: D62
type_infered: string
name: unpack_data
arguments: label: D211
type_infered: string
name: unpack_data
arguments: label: D185
type_infered: string
name: unpack_data
arguments: label: D16
type_infered: string
name: unpack_data
arguments: label: D119
type_infered: string
name: unpack_data
arguments: label: D154
type_infered: string
name: unpack_data
arguments: label: D133
type_infered: string

tool: D169: %d 

tool: D218: ----------

tool: D159: %d

tool: D127: What class of seat would you like?

tool: D28: Enter 1 for first class.

tool: D86: Enter 2 for economy.

tool: D35: Enter 3 to end.

tool: D50: There are no more seats availible.

tool: D245: Sorry, there are no first class seats free.

tool: D13: Would you like to take an economy class seat?

tool: D41: Enter 1 for no.

tool: D25: Enter 2 for yes.

tool: D182: Enter 3 to quit.

tool: D114: Sorry, there are no economy seats free.

tool: D232: Would you like to take a first class seat?

tool: D62: Enter 1 for yes.

tool: D211: Enter 2 for no.

tool: D185: Next flight leaves in 3 hours.

tool: D16: Class:	First class

tool: D119: Seat:	1, %d


tool: D154: Class:	Economy

tool: D133: Seat:	2, %d


assistant: ```c
void main() {
  int first[5] = {0}, econ[5] = {0};
  int nFirst = 1, nEcon = 1;
  int request;
  int cont = 1, still = 1;
  int i, i2;
  int skip = 0;
  printf("----------\n");
  while (cont == 1) {
    i = 0;
    i2 = 1;
    still = 1;
    while ((still == 1) && ((nFirst <= 5) || (nEcon <= 5))) {
      if (skip == 0) {
        printf("What class of seat would you like?\n");
        printf("Enter 1 for first class.\n");
        printf("Enter 2 for economy.\n");
        printf("Enter 3 to end.\n");
        scanf("%d", &request);
      }
      skip = 0;
      if (request == 1) {
        if (nFirst <= 5) {
          first[nFirst - 1] = 1;
          nFirst += 1;
          still = 0;
        } else {
          printf("----------\n");
          printf("Sorry, there are no first class seats free.\n");
          sleep((unsigned int)2);
          printf("----------\n");
          printf("Would you like to take an economy class seat?\n");
          printf("Enter 1 for no.\n");
          printf("Enter 2 for yes.\n");
          printf("Enter 3 to quit.\n");
          scanf("%d", &request);
          if (request == 1) {
            printf("----------\n");
            printf("Next flight leaves in 3 hours.\n");
            sleep((unsigned int)2);
            printf("----------\n");
          } else if (request == 2) {
            skip = 1;
          } else if (request == 3) {
            skip = 1;
          }
        }
      } else if (request == 2) {
        if (nEcon <= 5) {
          econ[nEcon - 1] = 1;
          nEcon += 1;
          still = 0;
        } else {
          printf("----------\n");
          printf("Sorry, there are no economy seats free.\n");
          sleep((unsigned int)2);
          printf("----------\n");
          printf("Would you like to take a first class seat?\n");
          printf("Enter 1 for yes.\n");
          printf("Enter 2 for no.\n");
          printf("Enter 3 to quit.\n");
          scanf("%d", &request);
          if (request == 1) {
            skip = 1;
          } else if (request == 2) {
            printf("----------\n");
            printf("Next flight leaves in 3 hours.\n");
            sleep((unsigned int)2);
            printf("----------\n");
          } else if (request == 3) {
            skip = 1;
          }
        }
      } else if (request == 3) {
        still = 0;
        cont = 0;
      }
    }
    if ((request == 1) || (request == 2)) {
      printf("----------\n");
      if (request == 1)
        printf("Class:\tFirst class\n");
      else if (request == 2)
        printf("Class:\tEconomy\n");
      if (request == 1)
        printf("Seat:\t1, %d\n", nFirst - 1);
      else if (request == 2)
        printf("Seat:\t2, %d\n", nEcon - 1);
    }
    if (!((nFirst <= 5) || (nEcon <= 5))) {
      printf("----------\n");
      sleep((unsigned int)2);
      printf("There are no more seats availible.\n");
      request = 0;
      cont = 0;
    }
    printf("----------\n");
    sleep((unsigned int)2);
    while (i2 <= 2) {
      while (i < 5) {
        if (i2 == 1)
          printf("%d ", first[i]);
        else if (i2 == 2)
          printf("%d ", econ[i]);
        i += 1;
      }
      printf("\n");
      i2 += 1;
      i = 0;
    }
    printf("----------\n");
  }
}
```