user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rcx
  lea    -0xb(%rbp),%rdx
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  lea    -0xb(%rbp),%rax
  lea    D47(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L72
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L72:
  lea    -0xb(%rbp),%rax
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L70
  mov    -0x1c(%rbp),%eax
  mov    -0x18(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L70:
  lea    -0xb(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L35
  mov    -0x1c(%rbp),%edx
  mov    -0x18(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L35:
  lea    -0xb(%rbp),%rax
  lea    D55(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L56
  mov    -0x18(%rbp),%eax
  test   %eax,%eax
  je     L56
  mov    -0x1c(%rbp),%eax
  mov    -0x18(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L56:
  lea    -0xb(%rbp),%rax
  lea    D105(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L60
  mov    -0x18(%rbp),%eax
  test   %eax,%eax
  je     L60
  mov    -0x1c(%rbp),%eax
  mov    -0x18(%rbp),%ecx
  cltd
  idiv   %ecx
  mov    %edx,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L60:
  cmpl   $0x0,-0x14(%rbp)
  jne    L3
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L3:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D58
datatype: string
name: extract_symbolic_data
arguments: tag: D47
datatype: string
name: extract_symbolic_data
arguments: tag: D100
datatype: string
name: extract_symbolic_data
arguments: tag: D52
datatype: string
name: extract_symbolic_data
arguments: tag: D5
datatype: string
name: extract_symbolic_data
arguments: tag: D55
datatype: string
name: extract_symbolic_data
arguments: tag: D105
datatype: string
name: extract_symbolic_data
arguments: tag: D21
datatype: string

tool: D58: %d %s %d

tool: D47: add

tool: D100: %d


tool: D52: sub

tool: D5: mul

tool: D55: div

tool: D105: mod

tool: D21: error

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