user: What is the c source code of the assembly code below?

```asm
<main>:
  endbr64
  push   %rbp
  lea    D49(%rip),%rsi
  lea    D41(%rip),%rdi
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <fopen@plt>
  test   %rax,%rax
  je     L120
  lea    -0x42(%rbp),%r14
  mov    %rax,%r12
  lea    -0x48(%rbp),%rcx
  mov    %rax,%rdi
  mov    %r14,%rdx
  lea    D34(%rip),%rsi
  call   <fscanf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    -0x48(%rbp),%eax
  cmp    $0x35,%eax
  jg     L243
  lea    -0x5(%rax),%edx
  and    $0x3,%dl
  jne    L243
  movslq %eax,%rcx
  mov    %rsp,%rdi
  lea    0xf(,%rcx,4),%rdx
  mov    %rdx,%rsi
  and    $0xfffffffffffff000,%rdx
  and    $0xfffffffffffffff0,%rsi
  sub    %rdx,%rdi
L13:
  cmp    %rdi,%rsp
  je     L26
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L13
L243:
  lea    D27(%rip),%rdi
  call   <printf@plt>
L45:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L127
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L120:
  lea    D29(%rip),%rdi
  call   <printf@plt>
  jmp    L45
L26:
  and    $0xfff,%esi
  sub    %rsi,%rsp
  test   %rsi,%rsi
  je     L111
  orq    $0x0,-0x8(%rsp,%rsi,1)
L111:
  mov    %rsp,%r12
  test   %eax,%eax
  jle    L223
  shl    $0x2,%rcx
  xor    %eax,%eax
  mov    %r12,%rdi
  mov    %ecx,%ecx
  rep stos %al,%es:(%rdi)
L223:
  lea    -0x4c(%rbp),%r13
  lea    D0(%rip),%rbx
  lea    D21(%rip),%r15
  nopl   0x0(%rax,%rax,1)
L22:
  xor    %eax,%eax
  call   <showMenu@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    -0x4c(%rbp),%eax
  cmp    $0x1,%eax
  je     L208
L23:
  cmp    $0x2,%eax
  je     L51
L39:
  cmp    $0x3,%eax
  je     L119
L121:
  cmp    $0x4,%eax
  je     L79
L284:
  cmp    $0x5,%eax
  je     L227
L102:
  cmp    $0x6,%eax
  je     L139
L49:
  cmp    $0x7,%eax
  je     L191
L160:
  cmp    $0x8,%eax
  je     L134
L16:
  test   %eax,%eax
  je     L45
  cmp    $0x8,%eax
  jbe    L22
  mov    %r15,%rdi
  call   <printf@plt>
  mov    -0x4c(%rbp),%eax
  test   %eax,%eax
  jne    L22
  jmp    L45
  cs nopw 0x0(%rax,%rax,1)
L134:
  mov    -0x48(%rbp),%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <saveDiagram@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L16
  nopl   0x0(%rax,%rax,1)
L191:
  mov    -0x48(%rbp),%edx
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <showDiagram@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L160
  nopl   0x0(%rax,%rax,1)
L139:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <showBookedSeats@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L49
L227:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <seatIsBooked@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L102
  nopl   0x0(%rax,%rax,1)
L79:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <cancelBooking@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L284
  nopl   0x0(%rax,%rax,1)
L119:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <bookFirstSeatAtWindow@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L121
  nopl   0x0(%rax,%rax,1)
L51:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <bookSeat@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L39
  nopl   0x0(%rax,%rax,1)
L208:
  mov    -0x48(%rbp),%esi
  mov    %r12,%rdi
  call   <showEmptySeats@plt>
  mov    -0x4c(%rbp),%eax
  jmp    L23
L127:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D49
type_guessed: string
name: read_data
arguments: tag: D41
type_guessed: string
name: read_data
arguments: tag: D34
type_guessed: string
name: read_data
arguments: tag: D27
type_guessed: string
name: read_data
arguments: tag: D29
type_guessed: string
name: read_data
arguments: tag: D0
type_guessed: string
name: read_data
arguments: tag: D21
type_guessed: string

tool: D49: r

tool: D41: bus.txt

tool: D34: %s %d

tool: D27: 
Invalid number of seats


tool: D29: 
File bus.txt not found


tool: D0: %d

tool: D21: Wrong input. Please try again


assistant: ```c
int main() {
  int action;
  int numberOfSeats;
  char busNumber[10];
  FILE *fp;
  fp = fopen("bus.txt", "r");
  if (fp) {
    fscanf(fp, "%s %d", busNumber, &numberOfSeats);
    fclose(fp);
  } else {
    printf("\nFile bus.txt not found\n");
    return 0;
  }
  if (numberOfSeats > 53 || ((numberOfSeats - 5) % 4) != 0) {
    printf("\nInvalid number of seats\n");
    return 0;
  }
  int seats[numberOfSeats];
  int n = 0;
  while (n < numberOfSeats) {
    seats[n] = 0;
    n++;
  }
  do {
    showMenu();
    scanf("%d", &action);
    if (action == 1) {
      showEmptySeats(seats, numberOfSeats);
    }
    if (action == 2) {
      bookSeat(seats, numberOfSeats);
    }
    if (action == 3) {
      bookFirstSeatAtWindow(seats, numberOfSeats);
    }
    if (action == 4) {
      cancelBooking(seats, numberOfSeats);
    }
    if (action == 5) {
      seatIsBooked(seats, numberOfSeats);
    }
    if (action == 6) {
      showBookedSeats(seats, numberOfSeats);
    }
    if (action == 7) {
      showDiagram(busNumber, seats, numberOfSeats);
    }
    if (action == 8) {
      saveDiagram(busNumber, seats, numberOfSeats);
    }
    if (action == 0) {
      return 0;
    }
    if (action < 0 || action > 8) {
      printf("Wrong input. Please try again\n");
    }
  } while (action != 0);
  return 0;
}
```