user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x14(%rbp),%rcx
  lea    -0xe(%rbp),%rdx
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0xe(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L12
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L12:
  lea    -0xe(%rbp),%rax
  lea    D80(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L115
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L115:
  lea    -0xe(%rbp),%rax
  lea    D70(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L107
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L107:
  lea    -0xe(%rbp),%rax
  lea    D89(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L19
  mov    -0x14(%rbp),%eax
  test   %eax,%eax
  je     L70
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L70:
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L19:
  lea    -0xe(%rbp),%rax
  lea    D104(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L62
  mov    -0x14(%rbp),%eax
  test   %eax,%eax
  je     L18
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L18:
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L145
L62:
  lea    D86(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L145:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L49
  call   <__stack_chk_fail@plt>
L49:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D101
datatype: string
name: unpack_data
arguments: label: D66
datatype: string
name: unpack_data
arguments: label: D27
datatype: string
name: unpack_data
arguments: label: D80
datatype: string
name: unpack_data
arguments: label: D70
datatype: string
name: unpack_data
arguments: label: D89
datatype: string
name: unpack_data
arguments: label: D86
datatype: string
name: unpack_data
arguments: label: D104
datatype: string

tool: D101: %d %s %d

tool: D66: add

tool: D27: %d

tool: D80: sub

tool: D70: mul

tool: D89: div

tool: D86: error

tool: D104: mod

assistant: ```c
int main(void) {
  char command[6];
  int i, j;
  scanf("%d %s %d", &i, command, &j);
  if (!strcmp(command, "add"))
    printf("%d", i + j);
  else if (!strcmp(command, "sub"))
    printf("%d", i - j);
  else if (!strcmp(command, "mul"))
    printf("%d", i * j);
  else if (!strcmp(command, "div")) {
    if (j)
      printf("%d", i / j);
    else
      printf("error");
  } else if (!strcmp(command, "mod")) {
    if (j)
      printf("%d", i % j);
    else
      printf("error");
  } else
    printf("error");
  return 0;
}
```