user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D16(%rip),%rbp
  lea    D192(%rip),%r14
  lea    D110(%rip),%r13
  lea    D115(%rip),%r12
  jmp    L311
L264:
  lea    0x5(%rsp),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L250
  lea    D98(%rip),%rdi
  call   <printf@plt>
L311:
  lea    0x5(%rsp),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L5
  mov    %r14,%rdi
  call   <printf@plt>
  lea    0x5(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L264
  call   <programs@plt>
  jmp    L311
L250:
  lea    0x5(%rsp),%rdi
  lea    D181(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L114
  call   <degree_to_radian@plt>
  jmp    L311
L114:
  lea    0x5(%rsp),%rdi
  lea    D84(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L224
  call   <radian_to_degree@plt>
  jmp    L311
L224:
  lea    0x5(%rsp),%rdi
  lea    D25(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L329
  call   <circle_area@plt>
  jmp    L311
L329:
  lea    0x5(%rsp),%rdi
  lea    D28(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L167
  call   <trapezoid_area@plt>
  jmp    L311
L167:
  lea    0x5(%rsp),%rdi
  lea    D40(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L338
  call   <parallelogram_area@plt>
  jmp    L311
L338:
  lea    0x5(%rsp),%rdi
  lea    D88(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L134
  call   <triangle_area@plt>
  jmp    L311
L134:
  lea    0x5(%rsp),%rdi
  lea    D107(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L152
  call   <cylinder_surface_area@plt>
  jmp    L311
L152:
  lea    0x5(%rsp),%rdi
  lea    D168(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L333
  call   <cylinder_volume@plt>
  jmp    L311
L333:
  lea    0x5(%rsp),%rdi
  lea    D62(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L19
  call   <sphere_surface_area@plt>
  jmp    L311
L19:
  lea    0x5(%rsp),%rdi
  lea    D89(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L9
  call   <sphere_volume@plt>
  jmp    L311
L9:
  lea    0x5(%rsp),%rdi
  lea    D141(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L147
  call   <circumference@plt>
  jmp    L311
L147:
  lea    0x5(%rsp),%rdi
  lea    D22(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L184
  call   <arc_length@plt>
  jmp    L311
L184:
  lea    0x5(%rsp),%rdi
  lea    D130(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L72
  call   <sector_area@plt>
  jmp    L311
L72:
  lea    0x5(%rsp),%rdi
  lea    D18(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L115
  call   <quadratic_formula@plt>
  jmp    L311
L115:
  lea    D34(%rip),%rdi
  call   <printf@plt>
  jmp    L311
L5:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D16
datatype: string
name: disassemble_data
arguments: tag: D192
datatype: string
name: disassemble_data
arguments: tag: D110
datatype: string
name: disassemble_data
arguments: tag: D115
datatype: string
name: disassemble_data
arguments: tag: D98
datatype: string
name: disassemble_data
arguments: tag: D181
datatype: string
name: disassemble_data
arguments: tag: D84
datatype: string
name: disassemble_data
arguments: tag: D25
datatype: string
name: disassemble_data
arguments: tag: D28
datatype: string
name: disassemble_data
arguments: tag: D40
datatype: string
name: disassemble_data
arguments: tag: D88
datatype: string
name: disassemble_data
arguments: tag: D107
datatype: string
name: disassemble_data
arguments: tag: D168
datatype: string
name: disassemble_data
arguments: tag: D62
datatype: string
name: disassemble_data
arguments: tag: D89
datatype: string
name: disassemble_data
arguments: tag: D141
datatype: string
name: disassemble_data
arguments: tag: D22
datatype: string
name: disassemble_data
arguments: tag: D130
datatype: string
name: disassemble_data
arguments: tag: D18
datatype: string
name: disassemble_data
arguments: tag: D34
datatype: string

tool: D16: q

tool: D192: Select a program: 

tool: D110: %4s

tool: D115: p

tool: D98: quitting...


tool: D181: d2r

tool: D84: r2d

tool: D25: ca

tool: D28: ta

tool: D40: pa

tool: D88: tea

tool: D107: csa

tool: D168: cv

tool: D62: ssa

tool: D89: sv

tool: D141: c

tool: D22: al

tool: D130: sa

tool: D18: qf

tool: D34: 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;
}
```