user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %r15
  lea    D6(%rip),%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0x2c(%rsp),%rax
  lea    0x30(%rsp),%rbp
  mov    %rax,0x8(%rsp)
  lea    0x28(%rsp),%rax
  lea    0x50(%rsp),%rbx
  mov    %rax,0x18(%rsp)
  lea    0x70(%rsp),%rax
  lea    0x6f(%rsp),%r14
  mov    %rax,0x10(%rsp)
  lea    0x4f(%rsp),%r13
  lea    0x2f(%rsp),%r12
  cs nopw 0x0(%rax,%rax,1)
L31:
  lea    D39(%rip),%rdi
  call   <printf@plt>
  lea    D41(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x2c(%rsp),%eax
  cmp    $0x2,%eax
  je     L81
  cmp    $0x3,%eax
  je     L24
  cmp    $0x1,%eax
  je     L102
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L31
  nopl   0x0(%rax)
L81:
  lea    D27(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  movzbl 0x30(%rsp),%eax
  test   %al,%al
  je     L78
  movzbl 0x28(%rsp),%esi
  xor    %edx,%edx
  nopl   0x0(%rax)
L50:
  add    %esi,%eax
  mov    %al,(%rbx,%rdx,1)
  add    $0x1,%rdx
  movzbl 0x0(%rbp,%rdx,1),%eax
  test   %al,%al
  jne    L50
L78:
  lea    D32(%rip),%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  jmp    L31
  nopl   0x0(%rax,%rax,1)
L102:
  lea    D40(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <gets@plt>
  jmp    L31
  nopl   0x0(%rax)
L24:
  xor    %edx,%edx
  cmpb   $0x0,0x30(%rsp)
  movzbl 0x28(%rsp),%esi
  mov    $0x1,%eax
  je     L74
  nopl   0x0(%rax,%rax,1)
L13:
  movzbl 0x0(%r13,%rax,1),%edx
  sub    %esi,%edx
  mov    %dl,(%r14,%rax,1)
  movslq %eax,%rdx
  add    $0x1,%rax
  cmpb   $0x0,(%r12,%rax,1)
  jne    L13
L74:
  lea    D49(%rip),%rdi
  movb   $0x0,0x70(%rsp,%rdx,1)
  call   <printf@plt>
  mov    0x10(%rsp),%rdi
  call   <puts@plt>
  jmp    L31
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D6
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D39
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D41
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D27
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D32
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D40
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D49
type_infered: string

tool: D6: %d

tool: D39: 
MENU
=====
1.Input
2.Encode
3.Decode
4.Exit

tool: D41: 
Enter your choice


tool: D27: 
Enter a key


tool: D32: 
Encoded String :


tool: D40: 
Enter a str


tool: D49: 
Decoded String :


assistant: ```c
int main(void) {
  char Str[30], encStr[30], decStr[30];
  int i, iKey, iChoice;
  while (1) {
    printf("\nMENU\n=====\n1.Input\n2.Encode\n3.Decode\n4.Exit");
    printf("\nEnter your choice\n");
    scanf("%d", &iChoice);
    getchar();
    switch (iChoice) {
    case 1:
      printf("\nEnter a str\n");
      gets(Str);
      break;
    case 2:
      printf("\nEnter a key\n");
      scanf("%d", &iKey);
      for (i = 0; Str[i] != '\0'; i++) {
        encStr[i] = Str[i] + iKey;
      }
      printf("\nEncoded String :\n");
      puts(encStr);
      break;
    case 3:
      for (i = 0; Str[i] != '\0'; i++) {
        decStr[i] = encStr[i] - iKey;
      }
      decStr[i] = '\0';
      printf("\nDecoded String :\n");
      puts(decStr);
      break;
    default:
      exit(0);
    }
  }
  return 0;
}
```