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

```asm
<inputsetup_menu>:
  endbr64
  push   %r14
  lea    D31(%rip),%rcx
  lea    D53(%rip),%rdi
  push   %r13
  movq   %rcx,%xmm0
  lea    D73(%rip),%rcx
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %edx,%ebx
  add    $0xffffffffffffff80,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  lea    D8(%rip),%rax
  lea    0x6f(%rsp),%r12
  movb   $0x0,0x77(%rsp)
  lea    0xc(%rsp),%r13
  movq   $0x0,0x50(%rsp)
  movl   $0x0,0xc(%rsp)
  movq   %rax,%xmm1
  lea    D28(%rip),%rax
  punpcklqdq %xmm1,%xmm0
  movq   %rax,%xmm2
  lea    D33(%rip),%rax
  movaps %xmm0,0x10(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm3
  lea    D38(%rip),%rax
  punpcklqdq %xmm2,%xmm0
  movq   %rax,%xmm4
  lea    D32(%rip),%rax
  movaps %xmm0,0x20(%rsp)
  movq   %rdi,%xmm0
  lea    D27(%rip),%rcx
  lea    0x74(%rsp),%rdi
  punpcklqdq %xmm3,%xmm0
  mov    %rax,0x58(%rsp)
  lea    D3(%rip),%rax
  mov    %rax,0x60(%rsp)
  movabs $0x77636120746f5220,%rax
  movaps %xmm0,0x30(%rsp)
  movq   %rcx,%xmm0
  punpcklqdq %xmm4,%xmm0
  mov    %rax,0x6f(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x40(%rsp)
  call   <spellword@plt>
  mov    %r12,0x50(%rsp)
  mov    0xc(%rsp),%edx
  mov    %ebp,%ecx
  lea    0x10(%rsp),%r12
  xor    %r9d,%r9d
  mov    %ebx,%r8d
  mov    $0x6,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <drawmenu@plt>
  lea    0xc(%rbp),%ecx
  lea    0x40(%rsp),%rdi
  xor    %r9d,%r9d
  mov    %ebx,%r8d
  mov    $0xffffffff,%edx
  mov    $0x5,%esi
  xor    %eax,%eax
  call   <drawmenu@plt>
L92:
  mov    %ebx,%edx
  mov    %ebp,%esi
  xor    %edi,%edi
  xor    %eax,%eax
  call   <inp_printkeys@plt>
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <inp_setcurs@plt>
  mov    $0xffffffff,%edi
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <refreshwin@plt>
  mov    0xc(%rsp),%edi
  xor    %eax,%eax
  call   <inp_keypr@plt>
  xor    %edi,%edi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <setkeymapping@plt>
  mov    0xc(%rsp),%ecx
  cmp    $0x3,%eax
  jne    L13
  test   %ecx,%ecx
  jne    L13
  mov    $0x4,%eax
L83:
  movslq %ecx,%rdx
  mov    %ecx,%esi
  push   %rax
  mov    %r14d,%r8d
  imul   $0x2aaaaaab,%rdx,%rdx
  sar    $0x1f,%esi
  push   $0x0
  mov    %r12,%rdi
  xor    %eax,%eax
  shr    $0x20,%rdx
  sub    %esi,%edx
  mov    $0xb,%esi
  lea    (%rdx,%rdx,2),%edx
  add    %edx,%edx
  sub    %edx,%ecx
  mov    %r13,%rdx
  lea    (%rcx,%rbx,1),%r9d
  mov    $0x6,%ecx
  call   <handle_menuitem_2cols@plt>
  pop    %rdx
  pop    %rcx
  cmp    $0x2,%eax
  je     L95
  cmp    $0x3,%eax
  je     L80
  test   %eax,%eax
  jne    L92
L95:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L86
  sub    $0xffffffffffffff80,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L13:
  cmp    $0x4,%eax
  jne    L83
  cmp    $0xa,%ecx
  jne    L83
  mov    0x60(%rsp),%rdi
  xor    %esi,%esi
  xor    %eax,%eax
  call   <printmenuitem@plt>
  mov    %ebx,%esi
  mov    %ebp,%edi
  xor    %edx,%edx
  xor    %eax,%eax
  movl   $0x0,0xc(%rsp)
  call   <inp_setcurs@plt>
  mov    0x10(%rsp),%rdi
  mov    $0x1,%esi
  xor    %eax,%eax
  call   <printmenuitem@plt>
  jmp    L92
  nopl   0x0(%rax,%rax,1)
L80:
  mov    0xc(%rsp),%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  xor    %eax,%eax
  call   <inp_setcurs@plt>
  movslq 0xc(%rsp),%rax
  mov    $0x1,%esi
  mov    0x10(%rsp,%rax,8),%rdi
  xor    %eax,%eax
  call   <printmenuitem@plt>
  jmp    L92
L86:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D31
type_infered: string
name: parse_data
arguments: tag: D53
type_infered: string
name: parse_data
arguments: tag: D73
type_infered: string
name: parse_data
arguments: tag: D8
type_infered: string
name: parse_data
arguments: tag: D28
type_infered: string
name: parse_data
arguments: tag: D33
type_infered: string
name: parse_data
arguments: tag: D38
type_infered: string
name: parse_data
arguments: tag: D32
type_infered: string
name: parse_data
arguments: tag: D27
type_infered: string
name: parse_data
arguments: tag: D3
type_infered: string

tool: D31:  Up

tool: D53:   A

tool: D73: Lft

tool: D8: Dwn

tool: D28: Rgt

tool: D33:   B

tool: D38:  Rot cw 

tool: D32: Harddrop

tool: D27:  Rotate 

tool: D3: 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);
    }
  }
}
```