user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  lea    D74(%rip),%rdi
  lea    D1(%rip),%r15
  push   %r14
  lea    D41(%rip),%r14
  push   %r13
  lea    D15(%rip),%r13
  push   %r12
  lea    D12(%rip),%r12
  push   %rbp
  lea    D37(%rip),%rbp
  push   %rbx
  lea    D48(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x10(%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  lea    0x14(%rsp),%rax
  mov    %rax,0x8(%rsp)
  nop
L29:
  mov    %r15,%rdi
  call   <puts@plt>
  mov    %r14,%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    D16(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  mov    0x14(%rsp),%eax
  cmp    $0x3,%eax
  ja     L29
  cmp    $0x2,%eax
  je     L54
  cmp    $0x3,%eax
  je     L82
  cmp    $0x1,%eax
  je     L36
  lea    D85(%rip),%rdi
  call   <puts@plt>
  mov    0x10(%rsp),%esi
L37:
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  jne    L29
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L52
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L36:
  mov    0x10(%rsp),%eax
  lea    0x1(%rax),%esi
  mov    %esi,0x10(%rsp)
  jmp    L37
  nopl   (%rax)
L82:
  mov    0x10(%rsp),%eax
  lea    (%rax,%rax,1),%esi
  mov    %esi,0x10(%rsp)
  jmp    L37
  nopl   (%rax)
L54:
  mov    0x10(%rsp),%eax
  lea    -0x1(%rax),%esi
  mov    %esi,0x10(%rsp)
  jmp    L37
L52:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D74
type_infered: string
name: disassemble_data
arguments: tag: D1
type_infered: string
name: disassemble_data
arguments: tag: D41
type_infered: string
name: disassemble_data
arguments: tag: D15
type_infered: string
name: disassemble_data
arguments: tag: D12
type_infered: string
name: disassemble_data
arguments: tag: D37
type_infered: string
name: disassemble_data
arguments: tag: D48
type_infered: string
name: disassemble_data
arguments: tag: D16
type_infered: string
name: disassemble_data
arguments: tag: D85
type_infered: string
name: disassemble_data
arguments: tag: D0
type_infered: string

tool: D74: Enter initial value: 

tool: D1: Menu:

tool: D41: 1 - increase

tool: D15: 2 - decrease

tool: D12: 3 - double

tool: D37: 0 - END

tool: D48: %d

tool: D16: choice : 

tool: D85: End

tool: D0: value = %d


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;
}
```