user: Translate the below assembly code into C programming language:

```asm
<inputsetup_menu>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %esi,%r12d
  mov    %edx,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  lea    D15(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D9(%rip),%rax
  mov    %rax,0x18(%rsp)
  lea    D98(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D57(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D74(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D93(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D69(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D49(%rip),%rax
  mov    %rax,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  lea    D17(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D48(%rip),%rax
  mov    %rax,0x60(%rsp)
  movabs $0x77636120746f5220,%rax
  mov    %rax,0x6f(%rsp)
  movb   $0x0,0x77(%rsp)
  movl   $0x0,0xc(%rsp)
  lea    0x6f(%rsp),%rbp
  lea    0x74(%rsp),%rdi
  mov    $0x0,%eax
  call   <spellword@plt>
  mov    %rbp,0x50(%rsp)
  lea    0x10(%rsp),%rdi
  mov    $0x0,%r9d
  mov    %ebx,%r8d
  mov    %r12d,%ecx
  mov    0xc(%rsp),%edx
  mov    $0x6,%esi
  mov    $0x0,%eax
  call   <drawmenu@plt>
  lea    0xc(%r12),%ecx
  lea    0x40(%rsp),%rdi
  mov    $0x0,%r9d
  mov    %ebx,%r8d
  mov    $0xffffffff,%edx
  mov    $0x5,%esi
  mov    $0x0,%eax
  call   <drawmenu@plt>
  lea    0xc(%rsp),%r13
  jmp    L94
L2:
  mov    $0x4,%eax
L105:
  movslq %ecx,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  shr    $0x20,%rdx
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%edx
  lea    (%rdx,%rdx,2),%edx
  add    %edx,%edx
  sub    %edx,%ecx
  lea    0x10(%rsp),%rdi
  push   %rax
  push   $0x0
  lea    (%rcx,%rbx,1),%r9d
  mov    %ebp,%r8d
  mov    $0x6,%ecx
  mov    %r13,%rdx
  mov    $0xb,%esi
  mov    $0x0,%eax
  call   <handle_menuitem_2cols@plt>
  add    $0x10,%rsp
  cmp    $0x2,%eax
  je     L64
  cmp    $0x3,%eax
  je     L89
  test   %eax,%eax
  je     L64
L94:
  mov    %ebx,%edx
  mov    %r12d,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <inp_printkeys@plt>
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <inp_setcurs@plt>
  mov    %eax,%ebp
  mov    $0xffffffff,%edi
  mov    $0x0,%eax
  call   <refreshwin@plt>
  mov    0xc(%rsp),%edi
  mov    $0x0,%eax
  call   <inp_keypr@plt>
  mov    %eax,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <setkeymapping@plt>
  mov    0xc(%rsp),%ecx
  cmp    $0x3,%eax
  jne    L30
  test   %ecx,%ecx
  je     L2
L30:
  cmp    $0x4,%eax
  jne    L105
  cmp    $0xa,%ecx
  jne    L105
  mov    $0x0,%esi
  mov    0x60(%rsp),%rdi
  mov    $0x0,%eax
  call   <printmenuitem@plt>
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <inp_setcurs@plt>
  mov    $0x1,%esi
  mov    0x10(%rsp),%rdi
  mov    $0x0,%eax
  call   <printmenuitem@plt>
  jmp    L94
L89:
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    $0x0,%eax
  call   <inp_setcurs@plt>
  movslq 0xc(%rsp),%rax
  mov    0x10(%rsp,%rax,8),%rdi
  mov    $0x1,%esi
  mov    $0x0,%eax
  call   <printmenuitem@plt>
  jmp    L94
L64:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D15
type_guessed: string
name: extract_symbolic_data
arguments: tag: D9
type_guessed: string
name: extract_symbolic_data
arguments: tag: D98
type_guessed: string
name: extract_symbolic_data
arguments: tag: D57
type_guessed: string
name: extract_symbolic_data
arguments: tag: D74
type_guessed: string
name: extract_symbolic_data
arguments: tag: D93
type_guessed: string
name: extract_symbolic_data
arguments: tag: D69
type_guessed: string
name: extract_symbolic_data
arguments: tag: D49
type_guessed: string
name: extract_symbolic_data
arguments: tag: D17
type_guessed: string
name: extract_symbolic_data
arguments: tag: D48
type_guessed: string

tool: D15:  Up

tool: D9: Dwn

tool: D98: Lft

tool: D57: Rgt

tool: D74:   A

tool: D93:   B

tool: D69:  Rotate 

tool: D49:  Rot cw 

tool: D17: Harddrop

tool: D48: Softdrop

assistant: ```c
void inputsetup_menu(int pl, int x, int y) {
  const char *menu[11] = {" Up", "Dwn", "Lft", "Rgt", "  A", "  B", " Rotate ", " Rot cw ", (void *)0, "Harddrop", "Softdrop"};
  char rot_acw[9] = " Rot acw";
  int dev = 0;
  int i = 0;
  int xx, k;
  spellword(rot_acw + 5);
  menu[8] = rot_acw;
  drawmenu(menu, 6, i, x, y, (void *)0);
  drawmenu(menu + 6, 5, -1, x + 12, y, (void *)0);
  while (1) {
    inp_printkeys(dev, x, y);
    xx = inp_setcurs(x, y, i);
    refreshwin(-1);
    k = setkeymapping(dev, inp_keypr(i));
    if (k == 3 && !i)
      k = 4;
    else if (k == 4 && i == 10) {
      printmenuitem(menu[10], 0);
      inp_setcurs(x, y, i = 0);
      printmenuitem(menu[0], 1);
      continue;
    }
    switch (handle_menuitem_2cols(menu, 11, &i, 6, xx, y + i % 6, (void *)0, k)) {
    case 0:
    case 2:
      return;
    case 3:
      inp_setcurs(x, y, i);
      printmenuitem(menu[i], 1);
    }
  }
}
```