user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r13
  lea    D92(%rip),%r13
  push   %r12
  lea    D128(%rip),%r12
  push   %rbp
  mov    %r12,%rdi
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rsi
  lea    0x14(%rsp),%rbp
  call   <scanf@plt>
  mov    %rbp,%rsi
  lea    D138(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    0x10(%rsp),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L119
  mov    0x10(%rsp),%esi
  mov    %r12,%rdi
  add    0xc(%rsp),%esi
  call   <printf@plt>
L7:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L149
L184:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L92
  add    $0x20,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L119:
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L134
L99:
  lea    D112(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L105
L83:
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L153
  mov    0x10(%rsp),%ecx
  test   %ecx,%ecx
  je     L174
  mov    0xc(%rsp),%eax
  mov    %r12,%rdi
  cltd
  idiv   %ecx
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
L153:
  lea    D65(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L7
  mov    0x10(%rsp),%ecx
  test   %ecx,%ecx
  je     L95
  mov    0xc(%rsp),%eax
  mov    %r12,%rdi
  cltd
  idiv   %ecx
  xor    %eax,%eax
  mov    %edx,%esi
  call   <printf@plt>
  jmp    L7
L149:
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L184
  lea    D112(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L184
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L184
  lea    D65(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L184
  lea    D119(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L184
L95:
  lea    D119(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L7
L174:
  lea    D119(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L153
L105:
  mov    0xc(%rsp),%esi
  imul   0x10(%rsp),%esi
  mov    %r12,%rdi
  call   <printf@plt>
  jmp    L83
L134:
  mov    0xc(%rsp),%esi
  mov    %r12,%rdi
  sub    0x10(%rsp),%esi
  call   <printf@plt>
  jmp    L99
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D92
datatype: string
name: retrieve_data
arguments: tag: D128
datatype: string
name: retrieve_data
arguments: tag: D138
datatype: string
name: retrieve_data
arguments: tag: D20
datatype: string
name: retrieve_data
arguments: tag: D112
datatype: string
name: retrieve_data
arguments: tag: D42
datatype: string
name: retrieve_data
arguments: tag: D65
datatype: string
name: retrieve_data
arguments: tag: D119
datatype: string

tool: D92: add

tool: D128: %d

tool: D138: %s

tool: D20: sub

tool: D112: mul

tool: D42: div

tool: D65: mod

tool: D119: error

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;
}
```