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

```asm
<BNCMode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x63,-0x10(%rbp)
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D110(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D82(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D113(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    $0x14,%edi
  call   <BNCIO@plt>
  mov    -0x18(%rbp),%rax
  cmp    $0x9,%rax
  ja     L31
  lea    0x0(,%rax,4),%rdx
  lea    D108(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D108(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x0,%eax
  call   <BNC_0@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_1@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_2@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_3@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_4@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_5@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_6@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_7@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_8@plt>
  jmp    L112
  mov    $0x0,%eax
  call   <BNC_9@plt>
  jmp    L112
L31:
  mov    $0x0,%eax
  call   <BNC_0@plt>
  nop
L112:
  mov    -0x10(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L94
  call   <__stack_chk_fail@plt>
L94:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D27
type: string
name: read_data
arguments: data_label: D101
type: string
name: read_data
arguments: data_label: D48
type: string
name: read_data
arguments: data_label: D110
type: string
name: read_data
arguments: data_label: D82
type: string
name: read_data
arguments: data_label: D128
type: string
name: read_data
arguments: data_label: D8
type: string
name: read_data
arguments: data_label: D46
type: string
name: read_data
arguments: data_label: D126
type: string
name: read_data
arguments: data_label: D113
type: string
name: read_data
arguments: data_label: D105
type: string
name: read_data
arguments: data_label: D53
type: string

tool: D27: Function (0-9) ? 


tool: D101: 0 - Power measure 


tool: D48: 1 - Am 


tool: D110: 2 - FM 


tool: D82: 3 - Phase modulated 


tool: D128: 4 - Sweep 


tool: D8: 5 - FSK 


tool: D46: 6 - Burst 


tool: D126: 7 - SSb 


tool: D113: 8 - DTMF generator 


tool: D105: 9 - DTMF detection 


tool: D53: %i

assistant: ```c
long int BNCMode() {
  long int ii, stat = 99;
  printf("Function (0-9) ? \n");
  printf("0 - Power measure \n");
  printf("1 - Am \n");
  printf("2 - FM \n");
  printf("3 - Phase modulated \n");
  printf("4 - Sweep \n");
  printf("5 - FSK \n");
  printf("6 - Burst \n");
  printf("7 - SSb \n");
  printf("8 - DTMF generator \n");
  printf("9 - DTMF detection \n");
  scanf("%i", &ii);
  BNCIO(20);
  switch (ii) {
  case 0:
    BNC_0();
    break;
  case 1:
    BNC_1();
    break;
  case 2:
    BNC_2();
    break;
  case 3:
    BNC_3();
    break;
  case 4:
    BNC_4();
    break;
  case 5:
    BNC_5();
    break;
  case 6:
    BNC_6();
    break;
  case 7:
    BNC_7();
    break;
  case 8:
    BNC_8();
    break;
  case 9:
    BNC_9();
    break;
  default:
    BNC_0();
    break;
  }
  return (stat);
}
```