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

```asm
<main>:
  endbr64
  push   %r12
  xor    %eax,%eax
  push   %rbp
  sub    $0x8,%rsp
  call   <monitor_clear@plt>
  lea    D136(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <idt_install@plt>
  lea    D26(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <isrs_install@plt>
  lea    D156(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <irq_install@plt>
  sti
  lea    D46(%rip),%rdi
  xor    %eax,%eax
  lea    D49(%rip),%r12
  call   <monitor_write@plt>
  xor    %eax,%eax
  lea    D60(%rip),%rbp
  call   <timer_install@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D89(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D82(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D144(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D126(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <monitor_write@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D148(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    $0x140,%edi
  xor    %eax,%eax
  call   <timer_wait@plt>
  lea    D79(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <keyboard_install@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  lea    D50(%rip),%rsi
  lea    D3(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  mov    $0x2710,%edi
  xor    %eax,%eax
  call   <speaker_set@plt>
  xor    %eax,%eax
  mov    $0x7d0,%esi
  mov    $0x7d0,%edi
  call   <beep@plt>
  mov    $0x2710,%edi
  xor    %eax,%eax
  call   <speaker_set@plt>
  mov    $0x7d0,%esi
  mov    $0x7d0,%edi
  xor    %eax,%eax
  call   <beep@plt>
  mov    $0x2710,%edi
  xor    %eax,%eax
  call   <speaker_set@plt>
  mov    $0x7d0,%esi
  mov    $0x7d0,%edi
  xor    %eax,%eax
  call   <beep@plt>
  mov    $0x2710,%edi
  xor    %eax,%eax
  call   <speaker_set@plt>
  mov    $0x7d0,%esi
  mov    $0x7d0,%edi
  xor    %eax,%eax
  call   <beep@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D136
type_guessed: string
name: retrieve_data
arguments: data_tag: D26
type_guessed: string
name: retrieve_data
arguments: data_tag: D156
type_guessed: string
name: retrieve_data
arguments: data_tag: D46
type_guessed: string
name: retrieve_data
arguments: data_tag: D49
type_guessed: string
name: retrieve_data
arguments: data_tag: D60
type_guessed: string
name: retrieve_data
arguments: data_tag: D89
type_guessed: string
name: retrieve_data
arguments: data_tag: D82
type_guessed: string
name: retrieve_data
arguments: data_tag: D24
type_guessed: string
name: retrieve_data
arguments: data_tag: D63
type_guessed: string
name: retrieve_data
arguments: data_tag: D144
type_guessed: string
name: retrieve_data
arguments: data_tag: D126
type_guessed: string
name: retrieve_data
arguments: data_tag: D148
type_guessed: string
name: retrieve_data
arguments: data_tag: D79
type_guessed: string
name: retrieve_data
arguments: data_tag: D50
type_guessed: string
name: retrieve_data
arguments: data_tag: D3
type_guessed: string

tool: D136: Inicializando la IDT


tool: D26: Inicializando las ISR


tool: D156: Inicializando las IRQ


tool: D46: Inicializando el PIT


tool: D49: 			---------------------------------


tool: D60: 


tool: D89: 			|  W to Sweet                     |


tool: D82: 			|  We to Sweet                    |


tool: D24: 			|  Wel to Sweet                   |


tool: D63: 			|  Welc to Sweet                  |


tool: D144: 			|  Welco to Sweet                 |


tool: D126: 			|  Welcom to Sweet                |


tool: D148: 			|  Welcome to Sweet               |


tool: D79: Inicializando el teclado


tool: D50: user

tool: D3: %s>>>

assistant: ```c
int main() {
  monitor_clear();
  monitor_write("Inicializando la IDT\n");
  idt_install();
  monitor_write("Inicializando las ISR\n");
  isrs_install();
  monitor_write("Inicializando las IRQ\n");
  irq_install();
  asm volatile("sti");
  monitor_write("Inicializando el PIT\n");
  timer_install();
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  W to Sweet                     |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  We to Sweet                    |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  Wel to Sweet                   |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  Welc to Sweet                  |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  Welco to Sweet                 |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  Welcom to Sweet                |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  timer_wait(320);
  monitor_clear();
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\t\b\b\t\t\b|  Welcome to Sweet               |\n");
  monitor_write("\t\b\b\t\t---------------------------------\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_write("\n");
  monitor_clear();
  timer_wait(320);
  monitor_write("Inicializando el teclado\n");
  keyboard_install();
  monitor_clear();
  monitor_write("%s>>>", "user");
  speaker_set(10000);
  beep(2000, 2000);
  speaker_set(10000);
  beep(2000, 2000);
  speaker_set(10000);
  beep(2000, 2000);
  speaker_set(10000);
  beep(2000, 2000);
  return 0;
}
```