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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movabs $0x7261626f6f66,%rax
  mov    $0x0,%edx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movl   $0x0,0x10(%rsp)
  mov    %rsp,%rbx
  mov    %rbx,%rdi
  call   <reverse@plt>
  mov    %rbx,%rsi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D65(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x20(%rsp),%rdi
  mov    $0x32,%esi
  call   <get_line@plt>
  test   %eax,%eax
  jg     L6
L5:
  lea    D103(%rip),%rdi
  call   <atoi@plt>
  mov    %eax,%esi
  lea    D90(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x20(%rsp),%rbx
  mov    %rbx,%rsi
  mov    $0xffffef1f,%edi
  call   <itoa@plt>
  mov    %rbx,%rsi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D40(%rip),%rsi
  lea    D93(%rip),%rdi
  call   <strindex@plt>
  mov    %eax,%esi
  lea    D109(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D95(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <getop@plt>
  mov    %eax,%esi
  mov    %rbx,%rdx
  lea    D99(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  mov    $0x0,%eax
  add    $0x60,%rsp
  pop    %rbx
  ret
L6:
  lea    0x20(%rsp),%rdx
  mov    %eax,%esi
  lea    D51(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L5
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D31
type_guessed: string
name: read_data
arguments: label: D65
type_guessed: string
name: read_data
arguments: label: D103
type_guessed: string
name: read_data
arguments: label: D90
type_guessed: string
name: read_data
arguments: label: D10
type_guessed: string
name: read_data
arguments: label: D40
type_guessed: string
name: read_data
arguments: label: D93
type_guessed: string
name: read_data
arguments: label: D109
type_guessed: string
name: read_data
arguments: label: D95
type_guessed: string
name: read_data
arguments: label: D99
type_guessed: string
name: read_data
arguments: label: D51
type_guessed: string

tool: D31: Let's test reverse("foobar"): %s


tool: D65: Enter some text to test get_line(): 

tool: D103: 7529

tool: D90: atoi(): %d


tool: D10: itoa(): %s


tool: D40: bar

tool: D93: foobarness

tool: D109: strindex("foobarness", "bar"): %d


tool: D95: Enter a RPN equation to test getop(): 

tool: D99: getop(): %d, %s


tool: D51: get_line() returns %d and updates to: %s

assistant: ```c
int main() {
  char foo[20] = "foobar";
  char bar[50];
  int baz;
  reverse(foo);
  printf("Let's test reverse(\"foobar\"): %s\n", foo);
  printf("Enter some text to test get_line(): ");
  if ((baz = get_line(bar, 50)) > 0) {
    printf("get_line() returns %d and updates to: %s", baz, bar);
  }
  printf("atoi(): %d\n", atoi("7529"));
  itoa(-4321, bar);
  printf("itoa(): %s\n", bar);
  printf("strindex(\"foobarness\", \"bar\"): %d\n", strindex("foobarness", "bar"));
  printf("Enter a RPN equation to test getop(): ");
  printf("getop(): %d, %s\n", getop(bar), bar);
  return 0;
}
```