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

```asm
<main>:
  endbr64
  push   %rbp
  pxor   %xmm0,%xmm0
  mov    $0x1,%edx
  xor    %edi,%edi
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    0xb(%rsp),%rsi
  lea    0x10(%rsp),%rbp
  movaps %xmm0,0x10(%rsp)
  movaps %xmm0,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm0,0x40(%rsp)
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movl   $0x0,0x70(%rsp)
  call   <read@plt>
  mov    $0x50,%edx
  mov    %rbp,%rsi
  xor    %edi,%edi
  call   <read@plt>
  movzbl 0xb(%rsp),%eax
  cmp    $0x78,%al
  je     L273
  cmp    $0x75,%al
  je     L83
  lea    D197(%rip),%rdi
  call   <puts@plt>
L308:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  sub    $0xffffffffffffff80,%rsp
  xor    %eax,%eax
  pop    %rbp
  ret
L83:
  lea    0xc(%rsp),%rdx
  lea    D99(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  mov    0xc(%rsp),%eax
  cmp    $0xaaaa,%eax
  je     L261
  cmp    $0xffff3233,%eax
  jne    L282
  cmpb   $0x2d,0x10(%rsp)
  je     L2
L189:
  lea    D198(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L273:
  lea    0xc(%rsp),%rdx
  lea    D108(%rip),%rsi
  mov    %rbp,%rdi
  call   <sscanf@plt>
  mov    0xc(%rsp),%eax
  cmp    $0xaaaa,%eax
  je     L266
  cmp    $0xffff3233,%eax
  je     L193
  lea    D155(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L261:
  movzbl 0x10(%rsp),%eax
  cmp    $0x30,%al
  je     L196
  cmp    $0x2b,%al
  je     L111
L180:
  lea    D111(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L282:
  lea    D23(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L193:
  mov    $0x3,%edx
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L179
  cmpb   $0x2d,0x10(%rsp)
  jne    L189
  lea    D121(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L266:
  mov    $0x2,%edx
  lea    D75(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L31
  lea    D125(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L111:
  cmpb   $0x30,0x11(%rsp)
  je     L279
  lea    D14(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L179:
  lea    D78(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L196:
  cmpb   $0x78,0x11(%rsp)
  je     L180
  lea    D95(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L2:
  cmpb   $0x30,0x11(%rsp)
  je     L0
  lea    D9(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L31:
  mov    $0x3,%edx
  lea    D170(%rip),%rsi
  mov    %rbp,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L303
  cmpb   $0x2b,0x10(%rsp)
  je     L294
  lea    D143(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L0:
  cmpb   $0x78,0x12(%rsp)
  je     L189
  lea    D20(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L279:
  cmpb   $0x78,0x12(%rsp)
  je     L180
  lea    D58(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L303:
  lea    D172(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L294:
  lea    D68(%rip),%rdi
  call   <puts@plt>
  jmp    L308
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D197
data_type: string
name: retrieve_data
arguments: label: D99
data_type: string
name: retrieve_data
arguments: label: D198
data_type: string
name: retrieve_data
arguments: label: D108
data_type: string
name: retrieve_data
arguments: label: D155
data_type: string
name: retrieve_data
arguments: label: D111
data_type: string
name: retrieve_data
arguments: label: D23
data_type: string
name: retrieve_data
arguments: label: D11
data_type: string
name: retrieve_data
arguments: label: D121
data_type: string
name: retrieve_data
arguments: label: D75
data_type: string
name: retrieve_data
arguments: label: D125
data_type: string
name: retrieve_data
arguments: label: D14
data_type: string
name: retrieve_data
arguments: label: D78
data_type: string
name: retrieve_data
arguments: label: D95
data_type: string
name: retrieve_data
arguments: label: D9
data_type: string
name: retrieve_data
arguments: label: D170
data_type: string
name: retrieve_data
arguments: label: D143
data_type: string
name: retrieve_data
arguments: label: D20
data_type: string
name: retrieve_data
arguments: label: D58
data_type: string
name: retrieve_data
arguments: label: D172
data_type: string
name: retrieve_data
arguments: label: D68
data_type: string

tool: D197: No switch

tool: D99: %u

tool: D198: shouldn't happen

tool: D108: %07x

tool: D155: Nope x

tool: D111: base 10 worked

tool: D23: Nope u

tool: D11: -0x

tool: D121: base -16 worked

tool: D75: 0x

tool: D125: 0x worked

tool: D14: base +10 worked

tool: D78: -0x worked

tool: D95: base 8 worked

tool: D9: base -10 worked

tool: D170: +0x

tool: D143: base 16 worked

tool: D20: base -8 worked

tool: D58: base +8 worked

tool: D172: +0x worked

tool: D68: base +16 worked

assistant: ```c
int main() {
  char swch;
  char test[100] = {0};
  unsigned int val;
  read(0, &swch, 1);
  read(0, test, 80);
  if (swch == 'x') {
    sscanf(test, "%07x", &val);
    if (val == 0xaaaa) {
      if (strncmp(test, "0x", 2) == 0) {
        puts("0x worked");
      } else if (strncmp(test, "+0x", 3) == 0) {
        puts("+0x worked");
      } else if (test[0] == '+') {
        puts("base +16 worked");
      } else {
        puts("base 16 worked");
      }
    } else if (val == -0xcdcd) {
      if (strncmp(test, "-0x", 3) == 0) {
        puts("-0x worked");
      } else if (test[0] == '-') {
        puts("base -16 worked");
      } else {
        puts("shouldn't happen");
      }
    } else {
      puts("Nope x");
    }
  } else if (swch == 'u') {
    sscanf(test, "%u", &val);
    if (val == 0xaaaa) {
      if (test[0] == '0' && test[1] != 'x') {
        puts("base 8 worked");
      } else if (test[0] == '+' && test[1] == '0' && test[2] != 'x') {
        puts("base +8 worked");
      } else if (test[0] == '+' && test[1] != '0') {
        puts("base +10 worked");
      } else {
        puts("base 10 worked");
      }
    } else if (val == -0xcdcd) {
      if (test[0] == '-' && test[1] == '0' && test[2] != 'x') {
        puts("base -8 worked");
      } else if (test[0] == '-' && test[1] != '0') {
        puts("base -10 worked");
      } else {
        puts("shouldn't happen");
      }
    } else {
      puts("Nope u");
    }
  } else {
    puts("No switch");
  }
  return 0;
}
```