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

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D84(%rip),%rdi
  call   <printf@plt>
  mov    %rsp,%rsi
  lea    D5(%rip),%rdi
  call   <scanf@plt>
  lea    D115(%rip),%r13
  lea    D112(%rip),%r12
  lea    D111(%rip),%rbp
  lea    D10(%rip),%rbx
  jmp    L62
L24:
  subl   $0x1,(%rsp)
L41:
  mov    (%rsp),%esi
  lea    D6(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,0x4(%rsp)
  je     L23
L62:
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D58(%rip),%rdi
  call   <puts@plt>
  lea    D69(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D5(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x3,%eax
  ja     L62
  cmp    $0x2,%eax
  je     L24
  jg     L88
  test   %eax,%eax
  je     L117
  cmp    $0x1,%eax
  jne    L51
  addl   $0x1,(%rsp)
  jmp    L41
L88:
  shll   (%rsp)
  jmp    L41
L117:
  lea    D33(%rip),%rdi
  call   <puts@plt>
  jmp    L41
L51:
  lea    D61(%rip),%rdi
  call   <puts@plt>
  jmp    L41
L23:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L56:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D84
data_type: string
name: extract_symbolic_data
arguments: data_tag: D5
data_type: string
name: extract_symbolic_data
arguments: data_tag: D115
data_type: string
name: extract_symbolic_data
arguments: data_tag: D112
data_type: string
name: extract_symbolic_data
arguments: data_tag: D111
data_type: string
name: extract_symbolic_data
arguments: data_tag: D10
data_type: string
name: extract_symbolic_data
arguments: data_tag: D6
data_type: string
name: extract_symbolic_data
arguments: data_tag: D58
data_type: string
name: extract_symbolic_data
arguments: data_tag: D69
data_type: string
name: extract_symbolic_data
arguments: data_tag: D33
data_type: string
name: extract_symbolic_data
arguments: data_tag: D61
data_type: string

tool: D84: Enter initial value: 

tool: D5: %d

tool: D115: Menu:

tool: D112: 1 - increase

tool: D111: 2 - decrease

tool: D10: 3 - double

tool: D6: value = %d


tool: D58: 0 - END

tool: D69: choice : 

tool: D33: End

tool: D61: Invalid choice!

assistant: ```c
int main() {
  int value, choice;
  printf("Enter initial value: ");
  scanf("%d", &value);
  do {
    do {
      printf("Menu:\n");
      printf("1 - increase\n");
      printf("2 - decrease\n");
      printf("3 - double\n");
      printf("0 - END\n");
      printf("choice : ");
      scanf("%d", &choice);
    } while ((choice < 0) || (choice > 3));
    switch (choice) {
    case 1:
      value++;
      break;
    case 2:
      value--;
      break;
    case 3:
      value *= 2;
      break;
    case 0:
      printf("End\n");
      break;
    default:
      printf("Invalid choice!\n");
      break;
    }
    printf("value = %d\n", value);
  } while (choice != 0);
  return 0;
}
```