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

```asm
<main>:
  endbr64
  push   %r15
  lea    D144(%rip),%r15
  push   %r14
  lea    D191(%rip),%r14
  push   %r13
  lea    D186(%rip),%r13
  push   %r12
  lea    D176(%rip),%r12
  push   %rbp
  lea    D137(%rip),%rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x5(%rsp),%rbx
  nopw   0x0(%rax,%rax,1)
L273:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L22
L147:
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L88
  call   <programs@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L147
L22:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L40
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L88:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L70
  lea    D69(%rip),%rdi
  call   <printf@plt>
  jmp    L273
  nopl   0x0(%rax)
L70:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L279
  call   <degree_to_radian@plt>
  jmp    L273
  nopw   0x0(%rax,%rax,1)
L279:
  lea    D118(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L116
  call   <radian_to_degree@plt>
  jmp    L273
L116:
  lea    D106(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L109
  call   <circle_area@plt>
  jmp    L273
L109:
  lea    D153(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L208
  lea    D88(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L59
  call   <parallelogram_area@plt>
  jmp    L273
L208:
  call   <trapezoid_area@plt>
  jmp    L273
L59:
  lea    D98(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L12
  lea    D167(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L127
  call   <cylinder_surface_area@plt>
  jmp    L273
L12:
  call   <triangle_area@plt>
  jmp    L273
L127:
  lea    D80(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L36
  call   <cylinder_volume@plt>
  jmp    L273
L36:
  lea    D84(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L244
  call   <sphere_surface_area@plt>
  jmp    L273
L244:
  lea    D82(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L219
  call   <sphere_volume@plt>
  jmp    L273
L219:
  lea    D194(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L282
  call   <circumference@plt>
  jmp    L273
L282:
  lea    D155(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L337
  call   <arc_length@plt>
  jmp    L273
L337:
  lea    D148(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L49
  call   <sector_area@plt>
  jmp    L273
L40:
  call   <__stack_chk_fail@plt>
L49:
  lea    D87(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L112
  call   <quadratic_formula@plt>
  jmp    L273
L112:
  lea    D54(%rip),%rdi
  call   <printf@plt>
  jmp    L273
```

tool_calls: name: disassemble_data
arguments: data_tag: D144
datatype: string
name: disassemble_data
arguments: data_tag: D191
datatype: string
name: disassemble_data
arguments: data_tag: D186
datatype: string
name: disassemble_data
arguments: data_tag: D176
datatype: string
name: disassemble_data
arguments: data_tag: D137
datatype: string
name: disassemble_data
arguments: data_tag: D69
datatype: string
name: disassemble_data
arguments: data_tag: D118
datatype: string
name: disassemble_data
arguments: data_tag: D106
datatype: string
name: disassemble_data
arguments: data_tag: D153
datatype: string
name: disassemble_data
arguments: data_tag: D88
datatype: string
name: disassemble_data
arguments: data_tag: D98
datatype: string
name: disassemble_data
arguments: data_tag: D167
datatype: string
name: disassemble_data
arguments: data_tag: D80
datatype: string
name: disassemble_data
arguments: data_tag: D84
datatype: string
name: disassemble_data
arguments: data_tag: D82
datatype: string
name: disassemble_data
arguments: data_tag: D194
datatype: string
name: disassemble_data
arguments: data_tag: D155
datatype: string
name: disassemble_data
arguments: data_tag: D148
datatype: string
name: disassemble_data
arguments: data_tag: D87
datatype: string
name: disassemble_data
arguments: data_tag: D54
datatype: string

tool: D144: d2r

tool: D191: Select a program: 

tool: D186: %4s

tool: D176: p

tool: D137: q

tool: D69: quitting...


tool: D118: r2d

tool: D106: ca

tool: D153: ta

tool: D88: pa

tool: D98: tea

tool: D167: csa

tool: D80: cv

tool: D84: ssa

tool: D82: sv

tool: D194: c

tool: D155: al

tool: D148: sa

tool: D87: qf

tool: D54: That's not a program, type "p" for a list


assistant: ```c
int main() {
  char program[3];
  while (strcmp(program, "q") != 0) {
    printf("Select a program: ");
    scanf("%4s", program);
    if (strcmp(program, "p") == 0) {
      programs();
    } else if (strcmp(program, "q") == 0) {
      printf("quitting...\n");
    } else if (strcmp(program, "d2r") == 0) {
      degree_to_radian();
    } else if (strcmp(program, "r2d") == 0) {
      radian_to_degree();
    } else if (strcmp(program, "ca") == 0) {
      circle_area();
    } else if (strcmp(program, "ta") == 0) {
      trapezoid_area();
    } else if (strcmp(program, "pa") == 0) {
      parallelogram_area();
    } else if (strcmp(program, "tea") == 0) {
      triangle_area();
    } else if (strcmp(program, "csa") == 0) {
      cylinder_surface_area();
    } else if (strcmp(program, "cv") == 0) {
      cylinder_volume();
    } else if (strcmp(program, "ssa") == 0) {
      sphere_surface_area();
    } else if (strcmp(program, "sv") == 0) {
      sphere_volume();
    } else if (strcmp(program, "c") == 0) {
      circumference();
    } else if (strcmp(program, "al") == 0) {
      arc_length();
    } else if (strcmp(program, "sa") == 0) {
      sector_area();
    } else if (strcmp(program, "qf") == 0) {
      quadratic_formula();
    } else {
      printf("That's not a program, type \"p\" for a list\n");
    }
  }
  return 0;
}
```