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

```asm
<main>:
  endbr64
  push   %rbx
  lea    D77(%rip),%rdi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <puts@plt>
  lea    0x4(%rsp),%rdx
  mov    %rsp,%rsi
  lea    D73(%rip),%rdi
  call   <scanf@plt>
  nopl   0x0(%rax)
L80:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0x20,%al
  je     L80
  movsbl %al,%edi
  call   <toupper@plt>
  cmp    $0x50,%eax
  jne    L137
  addl   $0xc,(%rsp)
L137:
  mov    0x4(%rsp),%edx
  mov    (%rsp),%esi
  lea    D9(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  imul   $0x3c,(%rsp),%eax
  add    0x4(%rsp),%eax
  cmp    $0x1e0,%eax
  jg     L210
  mov    $0x1e0,%edx
  sub    %eax,%edx
L44:
  mov    $0x247,%ecx
  sub    %eax,%ecx
L49:
  mov    $0x2a7,%esi
  sub    %eax,%esi
L26:
  mov    $0x2ff,%edi
  sub    %eax,%edi
L113:
  mov    $0x348,%r8d
  sub    %eax,%r8d
L98:
  mov    $0x3b1,%r9d
  sub    %eax,%r9d
L203:
  mov    $0x474,%r10d
  sub    %eax,%r10d
L89:
  mov    $0x519,%r11d
  sub    %eax,%r11d
L88:
  cmp    %edx,%r11d
  mov    %edx,%eax
  mov    %r10d,%ebx
  cmovle %r11d,%eax
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  cmp    %esi,%eax
  cmovg  %esi,%eax
  cmp    %edi,%eax
  cmovg  %edi,%eax
  cmp    %r8d,%eax
  cmovg  %r8d,%eax
  cmp    %r9d,%eax
  cmovg  %r9d,%eax
  cmp    %r10d,%eax
  cmovle %eax,%ebx
  cmp    %edx,%ebx
  je     L123
  cmp    %ecx,%ebx
  je     L5
  cmp    %esi,%ebx
  je     L265
  cmp    %edi,%ebx
  je     L219
  cmp    %r8d,%ebx
  je     L148
  cmp    %r9d,%ebx
  je     L191
  cmp    %r10d,%eax
  jge    L58
  cmp    %ebx,%r11d
  je     L2
  nopw   0x0(%rax,%rax,1)
L242:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L159
  add    $0x10,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
L210:
  lea    -0x1e0(%rax),%edx
  cmp    $0x247,%eax
  jle    L44
  lea    -0x247(%rax),%ecx
  cmp    $0x2a7,%eax
  jle    L49
  lea    -0x2a7(%rax),%esi
  cmp    $0x2ff,%eax
  jle    L26
  lea    -0x2ff(%rax),%edi
  cmp    $0x348,%eax
  jle    L113
  lea    -0x348(%rax),%r8d
  cmp    $0x3b1,%eax
  jle    L98
  lea    -0x3b1(%rax),%r9d
  cmp    $0x474,%eax
  jle    L203
  lea    -0x474(%rax),%r10d
  lea    -0x519(%rax),%r11d
  cmp    $0x519,%eax
  jg     L88
  jmp    L89
L123:
  lea    D89(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L242
L219:
  lea    D58(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L5:
  lea    D67(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L242
L265:
  lea    D59(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L148:
  lea    D52(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L191:
  lea    D98(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L58:
  lea    D42(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L2:
  lea    D91(%rip),%rdi
  call   <puts@plt>
  jmp    L242
L159:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D77
type_infered: string
name: retrieve_data
arguments: label: D73
type_infered: string
name: retrieve_data
arguments: label: D9
type_infered: string
name: retrieve_data
arguments: label: D89
type_infered: string
name: retrieve_data
arguments: label: D58
type_infered: string
name: retrieve_data
arguments: label: D67
type_infered: string
name: retrieve_data
arguments: label: D59
type_infered: string
name: retrieve_data
arguments: label: D52
type_infered: string
name: retrieve_data
arguments: label: D98
type_infered: string
name: retrieve_data
arguments: label: D42
type_infered: string
name: retrieve_data
arguments: label: D91
type_infered: string

tool: D77: enter a 12-hour time:(xx:xx)

tool: D73: %d:%d

tool: D9: 24-hour time is: %d:%d


tool: D89: closest departure time is 8:00 a.m., arriving at 10:16 a.m.

tool: D58: closest departure time is 12:47 p.m., arriving at 3:00 p.m.

tool: D67: closest departure time is 9:43 a.m., arriving at 11:52 a.m.

tool: D59: closest departure time is 11:19 a.m., arriving at 1:31 p.m.

tool: D52: closest departure time is 2:00 p.m., arriving at 4:08 p.m.

tool: D98: closest departure time is 3:45 p.m., arriving at 5:55 p.m.

tool: D42: closest departure time is 7:00 p.m., arriving at 9:20 p.m.

tool: D91: closest departure time is 9:45 p.m., arriving at 11:58 p.m.

assistant: ```c
int main(void) {
  int time1 = 480, time2 = 583, time3 = 679, time4 = 767, time5 = 840, time6 = 945, time7 = 1140, time8 = 1305;
  int hour, minute;
  char ch;
  printf("enter a 12-hour time:(xx:xx)\n");
  scanf("%d:%d", &hour, &minute);
  while ((ch = getchar()) == ' ') {
    ;
  }
  switch (toupper(ch)) {
  case 'A':
    hour += 0;
    break;
  case 'P':
    hour += 12;
    break;
  }
  printf("24-hour time is: %d:%d\n", hour, minute);
  int time_now = hour * 60 + minute;
  int m1 = ((time1 >= time_now) ? (time1 - time_now) : (time_now - time1)), m2 = ((time2 >= time_now) ? (time2 - time_now) : (time_now - time2)), m3 = ((time3 >= time_now) ? (time3 - time_now) : (time_now - time3)), m4 = ((time4 >= time_now) ? (time4 - time_now) : (time_now - time4)), m5 = ((time5 >= time_now) ? (time5 - time_now) : (time_now - time5)), m6 = ((time6 >= time_now) ? (time6 - time_now) : (time_now - time6)), m7 = ((time7 >= time_now) ? (time7 - time_now) : (time_now - time7)), m8 = ((time8 >= time_now) ? (time8 - time_now) : (time_now - time8));
  int min12 = m1 < m2 ? m1 : m2, min34 = m3 < m4 ? m3 : m4, min1234 = min12 < min34 ? min12 : min34, min56 = m5 < m6 ? m5 : m6, min78 = m7 < m8 ? m7 : m8, min5678 = min56 < min78 ? min56 : min78, min = min1234 < min5678 ? min1234 : min5678;
  if (min == m1) {
    printf("closest departure time is 8:00 a.m., arriving at 10:16 a.m.");
  } else if (min == m2) {
    printf("closest departure time is 9:43 a.m., arriving at 11:52 a.m.");
  } else if (min == m3) {
    printf("closest departure time is 11:19 a.m., arriving at 1:31 p.m.\n");
  } else if (min == m4) {
    printf("closest departure time is 12:47 p.m., arriving at 3:00 p.m.\n");
  } else if (min == m5) {
    printf("closest departure time is 2:00 p.m., arriving at 4:08 p.m.\n");
  } else if (min == m6) {
    printf("closest departure time is 3:45 p.m., arriving at 5:55 p.m.\n");
  } else if (min == m7) {
    printf("closest departure time is 7:00 p.m., arriving at 9:20 p.m.\n");
  } else if (min == m8) {
    printf("closest departure time is 9:45 p.m., arriving at 11:58 p.m.\n");
  }
  return 0;
}
```