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

```asm
<main>:
  endbr64
  push   %r15
  lea    D48(%rip),%rdi
  push   %r14
  lea    D77(%rip),%r14
  push   %r13
  push   %r12
  lea    D57(%rip),%r12
  push   %rbp
  lea    D10(%rip),%rbp
  push   %rbx
  lea    D25(%rip),%rbx
  sub    $0x8,%rsp
  call   <puts@plt>
  xor    %eax,%eax
  call   <version@plt>
  xor    %eax,%eax
  call   <LocalRamTester@plt>
  xor    %eax,%eax
  call   <show_help@plt>
  nop
L70:
  mov    %rbp,%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getch@plt>
  mov    %eax,%r15d
  lea    -0x30(%rax),%eax
  cmp    $0x5,%eax
  jbe    L55
  cmp    $0x76,%r15d
  jg     L22
  xor    %r13d,%r13d
L156:
  cmp    $0x30,%r15d
  jle    L132
  lea    -0x31(%r15),%eax
  cmp    $0x45,%eax
  ja     L132
  movslq (%rbx,%rax,4),%rax
  add    %rbx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L132:
  lea    D87(%rip),%rdi
  call   <puts@plt>
  mov    %r15d,%edi
  call   <print_hex@plt>
  lea    D88(%rip),%rdi
  call   <puts@plt>
  jmp    L70
  nopw   0x0(%rax,%rax,1)
  xor    %eax,%eax
  call   <version@plt>
  jmp    L70
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <show_help@plt>
  jmp    L70
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <isStillAlive@plt>
  jmp    L70
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <ProgramExec@plt>
  jmp    L70
  nopl   0x0(%rax)
  lea    D27(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getnum@plt>
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <xtoa@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    %r15b,0x0(%r13)
  jmp    L70
  nop
  movzbl 0x0(%r13),%edi
L119:
  call   <xtoa@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  jmp    L70
  nop
  lea    D27(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getnum@plt>
  mov    %rax,%rdi
  mov    %rax,%r15
  call   <xtoa@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    %r15d,0x0(%r13)
  jmp    L70
  nop
  movslq 0x0(%r13),%rdi
  jmp    L119
  cs nopw 0x0(%rax,%rax,1)
L22:
  cmp    $0xff,%r15d
  jne    L132
  xor    %eax,%eax
  call   <ReceiveProgram@plt>
  jmp    L70
  nopl   0x0(%rax)
L55:
  mov    %r15d,%edi
  call   <putchar@plt>
  mov    %r14,%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <getnum@plt>
  lea    D54(%rip),%rdi
  mov    %rax,%r13
  call   <puts@plt>
  mov    %r13,%rdi
  call   <xtoa@plt>
  mov    %rax,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  jmp    L156
```

tool_calls: name: retrieve_data
arguments: tag: D48
data_type: string
name: retrieve_data
arguments: tag: D77
data_type: string
name: retrieve_data
arguments: tag: D57
data_type: string
name: retrieve_data
arguments: tag: D10
data_type: string
name: retrieve_data
arguments: tag: D87
data_type: string
name: retrieve_data
arguments: tag: D88
data_type: string
name: retrieve_data
arguments: tag: D27
data_type: string
name: retrieve_data
arguments: tag: D54
data_type: string

tool: D48: 





tool: D77: 
Address in hex> 

tool: D57: 


tool: D10: > 

tool: D87: => ERROR (value = 

tool: D88: )


tool: D27: 
Value in hex> 

tool: D54: Address = 

assistant: ```c
int main() {
  int ch;
  unsigned long address, value;
  puts("\r\n\r\n\r\n\r\n");
  version();
  LocalRamTester();
  show_help();
  for (;;) {
    puts("> ");
    ch = getch();
    address = 0;
    if ('0' <= ch && ch <= '5') {
      putchar(ch);
      puts("\nAddress in hex> ");
      address = getnum();
      puts("Address = ");
      puts(xtoa(address));
      puts("\n");
    }
    switch (ch) {
    case 'h':
    case 'H':
      show_help();
      break;
    case 'V':
    case 'v':
      version();
      break;
    case '1':
      value = (*(volatile int *)(address));
      puts(xtoa(value));
      puts("\n");
      break;
    case '2':
      puts("\nValue in hex> ");
      value = getnum();
      puts(xtoa(value));
      *(volatile int *)(address) = (value);
      break;
    case '3':
      value = *(unsigned char *)address;
      puts(xtoa(value));
      puts("\n");
      break;
    case '4':
      puts("\nValue in hex> ");
      value = getnum();
      puts(xtoa(value));
      *(unsigned char *)address = value;
      break;
    case '7':
      ProgramExec();
      break;
    case '8':
      isStillAlive();
      break;
    case 0xFF:
      ReceiveProgram();
      break;
    default:
      puts("=> ERROR (value = ");
      print_hex((unsigned int)ch);
      puts(")\r\n");
      break;
    }
  }
  return 0;
}
```