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    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x14(%rbp),%rax
  mov    %rax,%rsi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0xc(%rbp),%rax
  lea    D137(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L138
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L39
L138:
  lea    -0xc(%rbp),%rax
  lea    D164(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L6
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L6:
  lea    -0xc(%rbp),%rax
  lea    D150(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L76
  mov    -0x18(%rbp),%edx
  mov    -0x14(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L76:
  lea    -0xc(%rbp),%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L97
  mov    -0x14(%rbp),%eax
  test   %eax,%eax
  je     L47
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L97
L47:
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L97:
  lea    -0xc(%rbp),%rax
  lea    D185(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L39
  mov    -0x14(%rbp),%eax
  test   %eax,%eax
  je     L37
  mov    -0x18(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %edx,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L39
L37:
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L39:
  lea    -0xc(%rbp),%rax
  lea    D137(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L68
  lea    -0xc(%rbp),%rax
  lea    D164(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L68
  lea    -0xc(%rbp),%rax
  lea    D150(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L68
  lea    -0xc(%rbp),%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L68
  lea    -0xc(%rbp),%rax
  lea    D185(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L68
  lea    D157(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L68:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L65
  call   <__stack_chk_fail@plt>
L65:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D192
data_type: string
name: parse_data
arguments: tag: D18
data_type: string
name: parse_data
arguments: tag: D137
data_type: string
name: parse_data
arguments: tag: D164
data_type: string
name: parse_data
arguments: tag: D150
data_type: string
name: parse_data
arguments: tag: D7
data_type: string
name: parse_data
arguments: tag: D157
data_type: string
name: parse_data
arguments: tag: D185
data_type: string

tool: D192: %d

tool: D18: %s

tool: D137: add

tool: D164: sub

tool: D150: mul

tool: D7: div

tool: D157: error

tool: D185: mod

assistant: ```c
int main() {
  int chislo1, chislo2, izhod;
  char znak[4];
  scanf("%d", &chislo1);
  scanf("%s", znak);
  scanf("%d", &chislo2);
  if (strcmp(znak, "add") == 0) {
    izhod = chislo1 + chislo2;
    printf("%d", izhod);
  } else {
    if (strcmp(znak, "sub") == 0) {
      izhod = chislo1 - chislo2;
      printf("%d", izhod);
    }
    if (strcmp(znak, "mul") == 0) {
      izhod = chislo1 * chislo2;
      printf("%d", izhod);
    }
    if (strcmp(znak, "div") == 0) {
      if (chislo2 != 0) {
        izhod = chislo1 / chislo2;
        printf("%d", izhod);
      } else {
        printf("error");
      }
    }
    if (strcmp(znak, "mod") == 0) {
      if (chislo2 != 0) {
        izhod = chislo1 % chislo2;
        printf("%d", izhod);
      } else {
        printf("error");
      }
    }
  }
  if (strcmp(znak, "add") != 0 && strcmp(znak, "sub") != 0 && strcmp(znak, "mul") != 0 && strcmp(znak, "div") != 0 && strcmp(znak, "mod") != 0) {
    printf("error");
  }
  return 0;
}
```