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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x114(%rbp)
  lea    -0x114(%rbp),%rcx
  lea    -0x110(%rbp),%rdx
  lea    -0x118(%rbp),%rax
  mov    %rax,%rsi
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x110(%rbp),%rax
  lea    D70(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L71
  mov    -0x118(%rbp),%edx
  mov    -0x114(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L92
L71:
  lea    -0x110(%rbp),%rax
  lea    D18(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L7
  mov    -0x118(%rbp),%eax
  mov    -0x114(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L92
L7:
  lea    -0x110(%rbp),%rax
  lea    D81(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L57
  mov    -0x118(%rbp),%edx
  mov    -0x114(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L92
L57:
  lea    -0x110(%rbp),%rax
  lea    D39(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L103
  mov    -0x118(%rbp),%eax
  mov    -0x114(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L92
L103:
  lea    -0x110(%rbp),%rax
  lea    D22(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L47
  mov    -0x118(%rbp),%eax
  mov    -0x114(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%eax
  mov    %eax,-0x118(%rbp)
  mov    -0x118(%rbp),%eax
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L92
L47:
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L92:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D63
type_guessed: string
name: extract_symbolic_data
arguments: tag: D70
type_guessed: string
name: extract_symbolic_data
arguments: tag: D55
type_guessed: string
name: extract_symbolic_data
arguments: tag: D18
type_guessed: string
name: extract_symbolic_data
arguments: tag: D81
type_guessed: string
name: extract_symbolic_data
arguments: tag: D39
type_guessed: string
name: extract_symbolic_data
arguments: tag: D22
type_guessed: string
name: extract_symbolic_data
arguments: tag: D74
type_guessed: string

tool: D63: %d %s %d

tool: D70: add

tool: D55: %d


tool: D18: sub

tool: D81: mul

tool: D39: div

tool: D22: mod

tool: D74: error

assistant: ```c
int main() {
  int a, b = 0;
  char operand[256];
  scanf("%d %s %d", &a, operand, &b);
  if (!strcmp(operand, "add")) {
    a += b;
    printf("%d\n", a);
  } else if (!strcmp(operand, "sub")) {
    a -= b;
    printf("%d\n", a);
  } else if (!strcmp(operand, "mul")) {
    a *= b;
    printf("%d\n", a);
  } else if (!strcmp(operand, "div")) {
    a /= b;
    printf("%d\n", a);
  } else if (!strcmp(operand, "mod")) {
    a %= b;
    printf("%d\n", a);
  } else {
    printf("error");
  }
  return 0;
}
```