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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x14(%rsp)
  mov    %rsi,0x8(%rsp)
  cmp    $0x1,%edi
  je     L137
  cmpq   $0x0,0x10(%rsi)
  je     L156
  test   %edi,%edi
  jle    L147
  mov    0x14(%rsp),%eax
  mov    0x8(%rsp),%r13
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  xor    %r12d,%r12d
  mov    $0x1,%r14d
  lea    0x8(%r13),%rdx
  sub    $0x1,%eax
  lea    (%rdx,%rax,8),%rax
  mov    %rdx,0x18(%rsp)
  mov    %rax,(%rsp)
  nopl   0x0(%rax)
L153:
  mov    0x0(%r13),%r15
  movzbl (%r15),%eax
  cmp    $0x2d,%eax
  jne    L440
  cmpb   $0x61,0x1(%r15)
  jne    L155
  cmpb   $0x0,0x2(%r15)
  cmove  %r14d,%r12d
L155:
  cmp    $0x2d,%eax
  jne    L440
  cmpb   $0x73,0x1(%r15)
  jne    L429
  cmpb   $0x0,0x2(%r15)
  cmove  %r14d,%ebx
L429:
  cmp    $0x2d,%eax
  jne    L440
  cmpb   $0x6d,0x1(%r15)
  jne    L440
  cmpb   $0x0,0x2(%r15)
  cmove  %r14d,%ebp
L440:
  lea    D128(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L239
  lea    D114(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  cmove  %r14d,%ebx
  cmove  %r14d,%r12d
L331:
  lea    D7(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L283
  lea    D74(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  cmove  %r14d,%ebp
  cmove  %r14d,%r12d
L51:
  lea    D129(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L102
  lea    D8(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  cmove  %r14d,%ebp
  cmove  %r14d,%ebx
L170:
  lea    D138(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L374
  lea    D68(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L374
  lea    D85(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L374
  lea    D116(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L437
  nop
L374:
  mov    $0x1,%ebp
  mov    $0x1,%ebx
  mov    $0x1,%r12d
L178:
  add    $0x8,%r13
  cmp    (%rsp),%r13
  jne    L153
  test   %r12d,%r12d
  je     L144
  mov    0x14(%rsp),%eax
  mov    0x8(%rsp),%rdx
  xor    %r13d,%r13d
  mov    0x18(%rsp),%r14
  sub    $0x2,%eax
  lea    0x10(%rdx,%rax,8),%r12
  jmp    L66
  xchg   %ax,%ax
L230:
  add    $0x8,%r14
  cmp    %r12,%r14
  je     L172
L66:
  mov    (%r14),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  test   %eax,%eax
  js     L230
  mov    (%r14),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  cmp    $0x9,%eax
  jg     L230
  mov    (%r14),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  add    %eax,%r13d
  jmp    L230
L172:
  mov    %r13d,%esi
  lea    D98(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L144:
  test   %ebx,%ebx
  jne    L454
L55:
  test   %ebp,%ebp
  je     L147
  mov    0x8(%rsp),%rcx
  cmpq   $0x0,0x10(%rcx)
  je     L425
  mov    0x14(%rsp),%eax
  cmp    $0x2,%eax
  je     L318
  sub    $0x3,%eax
  lea    0x10(%rcx),%rbx
  lea    0x18(%rcx,%rax,8),%r12
  jmp    L146
  nopl   0x0(%rax)
L49:
  add    $0x8,%rbx
  cmp    %rbx,%r12
  je     L318
L146:
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  test   %eax,%eax
  js     L49
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  cmp    $0x9,%eax
  jg     L49
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  imul   %eax,%ebp
  jmp    L49
L318:
  mov    %ebp,%esi
  lea    D98(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L147:
  mov    $0xa,%edi
  call   <putchar@plt>
L137:
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  mov    $0x1,%ebp
  mov    $0x1,%ebx
  jmp    L170
  nop
L283:
  mov    $0x1,%ebp
  mov    $0x1,%r12d
  jmp    L51
L239:
  mov    $0x1,%ebx
  mov    $0x1,%r12d
  jmp    L331
L437:
  lea    D36(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L374
  lea    D32(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  cmove  %r14d,%ebp
  cmove  %r14d,%ebx
  cmove  %r14d,%r12d
  jmp    L178
L454:
  mov    0x8(%rsp),%rbx
  xor    %eax,%eax
  mov    0x10(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%r13d
  mov    0x14(%rsp),%eax
  cmp    $0x3,%eax
  jle    L292
  mov    %rbx,%rcx
  sub    $0x4,%eax
  lea    0x18(%rbx),%rbx
  lea    0x20(%rcx,%rax,8),%r12
  jmp    L282
  cs nopw 0x0(%rax,%rax,1)
L3:
  add    $0x8,%rbx
  cmp    %r12,%rbx
  je     L292
L282:
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  test   %eax,%eax
  js     L3
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  cmp    $0x9,%eax
  jg     L3
  mov    (%rbx),%rdi
  xor    %eax,%eax
  call   <atoi@plt>
  sub    %eax,%r13d
  jmp    L3
L292:
  mov    %r13d,%esi
  lea    D98(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L55
L156:
  lea    D156(%rip),%rdi
  call   <puts@plt>
  jmp    L137
L425:
  xor    %esi,%esi
  lea    D98(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L147
```

tool_calls: name: read_data
arguments: data_label: D128
data_type: string
name: read_data
arguments: data_label: D114
data_type: string
name: read_data
arguments: data_label: D7
data_type: string
name: read_data
arguments: data_label: D74
data_type: string
name: read_data
arguments: data_label: D129
data_type: string
name: read_data
arguments: data_label: D8
data_type: string
name: read_data
arguments: data_label: D138
data_type: string
name: read_data
arguments: data_label: D68
data_type: string
name: read_data
arguments: data_label: D85
data_type: string
name: read_data
arguments: data_label: D116
data_type: string
name: read_data
arguments: data_label: D98
data_type: string
name: read_data
arguments: data_label: D36
data_type: string
name: read_data
arguments: data_label: D32
data_type: string
name: read_data
arguments: data_label: D156
data_type: string

tool: D128: -as

tool: D114: -sa

tool: D7: -am

tool: D74: -ma

tool: D129: -sm

tool: D8: -ms

tool: D138: -asm

tool: D68: -sam

tool: D85: -sma

tool: D116: -ams

tool: D98: %d


tool: D36: -msa

tool: D32: -mas

tool: D156: There is no number in your input.

assistant: ```c
int main(int argc, char *argv[]) {
  int i;
  int printa = 0;
  int prints = 0;
  int printm = 0;
  if (argc == 1)
    return 0;
  else if (argv[2] == '\0') {
    printf("There is no number in your input.\n");
    return 0;
  }
  for (i = 0; i < argc; i++) {
    if (strcmp(argv[i], "-a") == 0)
      printa = 1;
    if (strcmp(argv[i], "-s") == 0)
      prints = 1;
    if (strcmp(argv[i], "-m") == 0)
      printm = 1;
    if (strcmp(argv[i], "-as") == 0 || strcmp(argv[i], "-sa") == 0) {
      printa = 1;
      prints = 1;
    }
    if (strcmp(argv[i], "-am") == 0 || strcmp(argv[i], "-ma") == 0) {
      printa = 1;
      printm = 1;
    }
    if (strcmp(argv[i], "-sm") == 0 || strcmp(argv[i], "-ms") == 0) {
      printm = 1;
      prints = 1;
    }
    if (strcmp(argv[i], "-asm") == 0 || strcmp(argv[i], "-sam") == 0 || strcmp(argv[i], "-sma") == 0 || strcmp(argv[i], "-ams") == 0 || strcmp(argv[i], "-msa") == 0 || strcmp(argv[i], "-mas") == 0) {
      printa = 1;
      prints = 1;
      printm = 1;
    }
  }
  if (printa) {
    int sum = 0;
    for (i = 1; i < argc; i++) {
      if (atoi(argv[i]) >= 0 && atoi(argv[i]) <= 9)
        sum += atoi(argv[i]);
    }
    printf("%d\n", sum);
  }
  if (prints) {
    int i;
    int s = atoi(argv[2]);
    for (i = 3; i < argc; i++) {
      if (atoi(argv[i]) >= 0 && atoi(argv[i]) <= 9)
        s -= atoi(argv[i]);
    }
    printf("%d\n", s);
  }
  if (printm) {
    if (argv[2] != '\0') {
      int m = 1;
      for (i = 2; i < argc; i++) {
        if (atoi(argv[i]) >= 0 && atoi(argv[i]) <= 9)
          m *= atoi(argv[i]);
      }
      printf("%d\n", m);
    } else
      printf("%d\n", 0);
  }
  printf("\n");
  return 0;
}
```