user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %r14
  lea    D10(%rip),%rdi
  lea    D118(%rip),%r14
  push   %r13
  lea    D157(%rip),%r13
  push   %r12
  lea    D40(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D125(%rip),%rbx
  movq   %rbx,%xmm0
  lea    D1(%rip),%rbx
  sub    $0x130,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  lea    D123(%rip),%rax
  lea    0xc(%rsp),%rbp
  movq   %rax,%xmm1
  lea    D31(%rip),%rax
  punpcklqdq %xmm1,%xmm0
  movq   %rax,%xmm2
  lea    D92(%rip),%rax
  movaps %xmm0,0x10(%rsp)
  movq   %rbx,%xmm0
  movq   %rax,%xmm3
  lea    D127(%rip),%rbx
  punpcklqdq %xmm2,%xmm0
  lea    D152(%rip),%rax
  movaps %xmm0,0x20(%rsp)
  movq   %rbx,%xmm0
  lea    D141(%rip),%rbx
  punpcklqdq %xmm3,%xmm0
  mov    %rax,0x40(%rsp)
  lea    D24(%rip),%rax
  movq   %rax,%xmm4
  movaps %xmm0,0x30(%rsp)
  movq   %rbx,%xmm0
  lea    D143(%rip),%rax
  punpcklqdq %xmm4,%xmm0
  lea    D84(%rip),%rbx
  movq   %rax,%xmm5
  movaps %xmm0,0xa0(%rsp)
  movq   %rbx,%xmm0
  lea    D122(%rip),%rbx
  punpcklqdq %xmm5,%xmm0
  movaps %xmm0,0xb0(%rsp)
  call   <puts@plt>
  nopl   0x0(%rax,%rax,1)
L16:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  jne    L27
L37:
  mov    0xc(%rsp),%eax
  mov    %eax,%edx
  sar    $0xa,%edx
  cmp    $0x6,%edx
  je     L33
  cmp    $0x10,%edx
  je     L48
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L37
L27:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L35
  add    $0x130,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L48:
  mov    %eax,%edx
  mov    %r12,%rdi
  and    $0x3,%edx
  mov    0xa0(%rsp,%rdx,8),%rcx
  mov    %eax,%edx
  sar    $0x6,%eax
  sar    $0x3,%edx
  and    $0x4,%eax
  and    $0x3,%edx
  mov    0x20(%rsp,%rax,8),%rsi
  xor    %eax,%eax
  mov    0xa0(%rsp,%rdx,8),%rdx
  call   <printf@plt>
  jmp    L16
  nopw   0x0(%rax,%rax,1)
L33:
  mov    %eax,%edx
  mov    %eax,%ecx
  mov    %r14,%rdi
  sar    $0x3,%edx
  and    $0x3,%ecx
  and    $0x3,%edx
  mov    0xa0(%rsp,%rcx,8),%r8
  mov    0xa0(%rsp,%rdx,8),%r9
  mov    %eax,%edx
  sar    $0x9,%eax
  sar    $0x6,%edx
  and    $0x1,%eax
  and    $0x3,%edx
  mov    0x10(%rsp,%rax,8),%rsi
  mov    %r9,%rcx
  xor    %eax,%eax
  mov    0xa0(%rsp,%rdx,8),%rdx
  call   <printf@plt>
  jmp    L16
L35:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D10
datatype: string
name: disassemble_data
arguments: tag: D118
datatype: string
name: disassemble_data
arguments: tag: D157
datatype: string
name: disassemble_data
arguments: tag: D40
datatype: string
name: disassemble_data
arguments: tag: D125
datatype: string
name: disassemble_data
arguments: tag: D1
datatype: string
name: disassemble_data
arguments: tag: D123
datatype: string
name: disassemble_data
arguments: tag: D31
datatype: string
name: disassemble_data
arguments: tag: D92
datatype: string
name: disassemble_data
arguments: tag: D127
datatype: string
name: disassemble_data
arguments: tag: D152
datatype: string
name: disassemble_data
arguments: tag: D141
datatype: string
name: disassemble_data
arguments: tag: D24
datatype: string
name: disassemble_data
arguments: tag: D143
datatype: string
name: disassemble_data
arguments: tag: D84
datatype: string
name: disassemble_data
arguments: tag: D122
datatype: string

tool: D10: .text
.syntax unified
.thumb

tool: D118: 	 %s, %s, %s, %s 


tool: D157: not legal number

tool: D40: 	 %s, %s, %s


tool: D125: adds

tool: D1: ands

tool: D123: subs

tool: D31: eors

tool: D92: lsrs

tool: D127: lsls

tool: D152: asrs

tool: D141: r0

tool: D24: r1

tool: D143: r3

tool: D84: r2

tool: D122: %x

assistant: ```c
int main() {
  int inst;
  char *opcodes1[] = {"adds", "subs"};
  char *opcodes2[] = {"ands", "eors", "lsls", "lsrs", "asrs", "adcs", "sbcs", "rors", "tst", "rsbs", "cmp", "cmn", "orrs", "muls", "bics", "mvns"};
  char *regnames[] = {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc"};
  printf(".text\n.syntax unified\n.thumb\n");
  while (scanf("%x", &inst) == 1) {
    switch (inst >> 10) {
    case 6:
      printf("\t %s, %s, %s, %s \n", opcodes1[(((inst) >> 9) & 0x1)], regnames[(((inst) >> 6) & 0x3)], regnames[(((inst) >> 3) & 0x3)], regnames[(inst & 0x3)]);
      break;
    case 16:
      printf("\t %s, %s, %s\n", opcodes2[(((inst) >> 6) & 0x4)], regnames[(((inst) >> 3) & 0x3)], regnames[(inst & 0x3)]);
      break;
    default:
      printf("not legal number");
      break;
    }
  }
}
```