user: 请将以下的汇编代码转换成C语言代码:

```asm
<menu>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D53(%rip),%r13
  lea    D54(%rip),%r12
  lea    D17(%rip),%rbp
  lea    D48(%rip),%rbx
L67:
  mov    %r13,%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D59(%rip),%rdi
  call   <scanf@plt>
  mov    0x4(%rsp),%eax
  cmp    $0x3,%eax
  je     L19
  jg     L47
  cmp    $0x1,%eax
  je     L81
  cmp    $0x2,%eax
  jne    L35
  mov    $0x0,%eax
  call   <getInsertPosition@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <getInsertQuantity@plt>
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <saveMultipleEntries@plt>
  jmp    L49
L47:
  cmp    $0x4,%eax
  jne    L35
  mov    $0x0,%eax
  call   <getInsertPosition@plt>
  mov    %eax,%ebp
  mov    $0x0,%eax
  call   <getInsertQuantity@plt>
  mov    %eax,%ebx
  mov    %eax,%esi
  mov    %ebp,%edi
  call   <getMultipleEntries@plt>
  mov    %eax,%edi
  mov    %ebx,%esi
  call   <printEntries@plt>
  jmp    L49
L81:
  mov    $0x0,%eax
  call   <getInsertPosition@plt>
  mov    %eax,%edi
  call   <saveOneEntry@plt>
L49:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L86
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L19:
  mov    $0x0,%eax
  call   <getInsertPosition@plt>
  mov    %eax,%edi
  call   <getOneEntry@plt>
  mov    %eax,%edi
  mov    $0x1,%esi
  call   <printEntries@plt>
  jmp    L49
L35:
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L67
L86:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D53
datatype: string
name: parse_data
arguments: data_tag: D54
datatype: string
name: parse_data
arguments: data_tag: D17
datatype: string
name: parse_data
arguments: data_tag: D48
datatype: string
name: parse_data
arguments: data_tag: D59
datatype: string
name: parse_data
arguments: data_tag: D9
datatype: string

tool: D53: 
[1] Create and insert one entry

tool: D54: 
[2] Create and insert multiple entries

tool: D17: 
[3] Find and print one entry

tool: D48: 
[4] Find and print multiple entries

tool: D59: %d

tool: D9: 
Please, select a valid option!!!

assistant: ```c
int menu() {
  int menu, status = 0, position, quantity;
  do {
    printf("\n[1] Create and insert one entry");
    printf("\n[2] Create and insert multiple entries");
    printf("\n[3] Find and print one entry");
    printf("\n[4] Find and print multiple entries");
    scanf("%d", &menu);
    switch (menu) {
    case 1:
      status = 0;
      position = getInsertPosition();
      saveOneEntry(position);
      break;
    case 2:
      status = 0;
      position = getInsertPosition();
      quantity = getInsertQuantity();
      saveMultipleEntries(position, quantity);
      break;
    case 3:
      status = 0;
      position = getInsertPosition();
      printEntries(getOneEntry(position), 1);
      break;
    case 4:
      status = 0;
      position = getInsertPosition();
      quantity = getInsertQuantity();
      printEntries(getMultipleEntries(position, quantity), quantity);
      break;
    default:
      status = 1;
      printf("\nPlease, select a valid option!!!");
      break;
    }
  } while (status == 1);
}
```