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    D97(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <idt_install@plt>
  lea    D46(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <isrs_install@plt>
  lea    D20(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <irq_install@plt>
  sti
  lea    D127(%rip),%rdi
  xor    %eax,%eax
  lea    D94(%rip),%r12
  call   <monitor_write@plt>
  xor    %eax,%eax
  lea    D89(%rip),%rbp
  call   <timer_install@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  lea    D131(%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    D60(%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    D145(%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    D98(%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    D86(%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    D15(%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    D105(%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    D22(%rip),%rdi
  xor    %eax,%eax
  call   <monitor_write@plt>
  xor    %eax,%eax
  call   <keyboard_install@plt>
  xor    %eax,%eax
  call   <monitor_clear@plt>
  lea    D53(%rip),%rsi
  lea    D116(%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: disassemble_data
arguments: tag: D97
data_type: string
name: disassemble_data
arguments: tag: D46
data_type: string
name: disassemble_data
arguments: tag: D20
data_type: string
name: disassemble_data
arguments: tag: D127
data_type: string
name: disassemble_data
arguments: tag: D94
data_type: string
name: disassemble_data
arguments: tag: D89
data_type: string
name: disassemble_data
arguments: tag: D131
data_type: string
name: disassemble_data
arguments: tag: D60
data_type: string
name: disassemble_data
arguments: tag: D145
data_type: string
name: disassemble_data
arguments: tag: D98
data_type: string
name: disassemble_data
arguments: tag: D86
data_type: string
name: disassemble_data
arguments: tag: D15
data_type: string
name: disassemble_data
arguments: tag: D105
data_type: string
name: disassemble_data
arguments: tag: D22
data_type: string
name: disassemble_data
arguments: tag: D53
data_type: string
name: disassemble_data
arguments: tag: D116
data_type: string

tool: D97: Inicializando la IDT


tool: D46: Inicializando las ISR


tool: D20: Inicializando las IRQ


tool: D127: Inicializando el PIT


tool: D94: 			---------------------------------


tool: D89: 


tool: D131: 			|  W to Sweet                     |


tool: D60: 			|  We to Sweet                    |


tool: D145: 			|  Wel to Sweet                   |


tool: D98: 			|  Welc to Sweet                  |


tool: D86: 			|  Welco to Sweet                 |


tool: D15: 			|  Welcom to Sweet                |


tool: D105: 			|  Welcome to Sweet               |


tool: D22: Inicializando el teclado


tool: D53: user

tool: D116: %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;
}
```