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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D183(%rip),%rax
  mov    %rax,-0x120(%rbp)
  lea    D89(%rip),%rax
  mov    %rax,-0x118(%rbp)
  lea    D65(%rip),%rax
  mov    %rax,-0x110(%rbp)
  lea    D168(%rip),%rax
  mov    %rax,-0x108(%rbp)
  lea    D114(%rip),%rax
  mov    %rax,-0x100(%rbp)
  lea    D386(%rip),%rax
  mov    %rax,-0xf8(%rbp)
  lea    D166(%rip),%rax
  mov    %rax,-0xf0(%rbp)
  lea    D286(%rip),%rax
  mov    %rax,-0xe8(%rbp)
  lea    D287(%rip),%rax
  mov    %rax,-0xe0(%rbp)
  lea    D163(%rip),%rax
  mov    %rax,-0xd8(%rbp)
  lea    D122(%rip),%rax
  mov    %rax,-0xd0(%rbp)
  lea    D351(%rip),%rax
  mov    %rax,-0xc8(%rbp)
  lea    D34(%rip),%rax
  mov    %rax,-0xc0(%rbp)
  lea    D10(%rip),%rax
  mov    %rax,-0xb8(%rbp)
  lea    D190(%rip),%rax
  mov    %rax,-0xb0(%rbp)
  lea    D90(%rip),%rax
  mov    %rax,-0xa8(%rbp)
  lea    D217(%rip),%rax
  mov    %rax,-0xa0(%rbp)
  lea    D283(%rip),%rax
  mov    %rax,-0x98(%rbp)
  lea    D95(%rip),%rax
  mov    %rax,-0x90(%rbp)
  lea    D360(%rip),%rax
  mov    %rax,-0x88(%rbp)
  lea    D111(%rip),%rax
  mov    %rax,-0x80(%rbp)
  lea    D245(%rip),%rax
  mov    %rax,-0x78(%rbp)
  lea    D325(%rip),%rax
  mov    %rax,-0x70(%rbp)
  lea    D16(%rip),%rax
  mov    %rax,-0x68(%rbp)
  lea    D108(%rip),%rax
  mov    %rax,-0x60(%rbp)
  lea    D229(%rip),%rax
  mov    %rax,-0x58(%rbp)
  lea    D214(%rip),%rax
  mov    %rax,-0x50(%rbp)
  lea    D298(%rip),%rax
  mov    %rax,-0x48(%rbp)
  lea    D172(%rip),%rax
  mov    %rax,-0x40(%rbp)
  lea    D350(%rip),%rax
  mov    %rax,-0x38(%rbp)
  lea    D213(%rip),%rax
  mov    %rax,-0x30(%rbp)
  lea    D52(%rip),%rax
  mov    %rax,-0x28(%rbp)
  lea    D58(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D109(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L3
L12:
  mov    -0x124(%rbp),%eax
  sar    $0xa,%eax
  cmp    $0x6,%eax
  je     L57
  cmp    $0x10,%eax
  je     L54
  jmp    L73
L57:
  mov    -0x124(%rbp),%eax
  and    $0x3,%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rsi
  mov    -0x124(%rbp),%eax
  sar    $0x3,%eax
  and    $0x3,%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rcx
  mov    -0x124(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3,%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rdx
  mov    -0x124(%rbp),%eax
  sar    $0x9,%eax
  and    $0x1,%eax
  cltq
  mov    -0x120(%rbp,%rax,8),%rax
  mov    %rsi,%r8
  mov    %rax,%rsi
  lea    D262(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L3
L54:
  mov    -0x124(%rbp),%eax
  and    $0x3,%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rcx
  mov    -0x124(%rbp),%eax
  sar    $0x3,%eax
  and    $0x3,%eax
  cltq
  mov    -0x90(%rbp,%rax,8),%rdx
  mov    -0x124(%rbp),%eax
  sar    $0x6,%eax
  and    $0x4,%eax
  cltq
  mov    -0x110(%rbp,%rax,8),%rax
  mov    %rax,%rsi
  lea    D222(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L3
L73:
  lea    D219(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
L3:
  lea    -0x124(%rbp),%rax
  mov    %rax,%rsi
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  cmp    $0x1,%eax
  je     L12
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L72
  call   <__stack_chk_fail@plt>
L72:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D183
type_infered: string
name: parse_data
arguments: data_tag: D89
type_infered: string
name: parse_data
arguments: data_tag: D65
type_infered: string
name: parse_data
arguments: data_tag: D168
type_infered: string
name: parse_data
arguments: data_tag: D114
type_infered: string
name: parse_data
arguments: data_tag: D386
type_infered: string
name: parse_data
arguments: data_tag: D166
type_infered: string
name: parse_data
arguments: data_tag: D286
type_infered: string
name: parse_data
arguments: data_tag: D287
type_infered: string
name: parse_data
arguments: data_tag: D163
type_infered: string
name: parse_data
arguments: data_tag: D122
type_infered: string
name: parse_data
arguments: data_tag: D351
type_infered: string
name: parse_data
arguments: data_tag: D34
type_infered: string
name: parse_data
arguments: data_tag: D10
type_infered: string
name: parse_data
arguments: data_tag: D190
type_infered: string
name: parse_data
arguments: data_tag: D90
type_infered: string
name: parse_data
arguments: data_tag: D217
type_infered: string
name: parse_data
arguments: data_tag: D283
type_infered: string
name: parse_data
arguments: data_tag: D95
type_infered: string
name: parse_data
arguments: data_tag: D360
type_infered: string
name: parse_data
arguments: data_tag: D111
type_infered: string
name: parse_data
arguments: data_tag: D245
type_infered: string
name: parse_data
arguments: data_tag: D325
type_infered: string
name: parse_data
arguments: data_tag: D16
type_infered: string
name: parse_data
arguments: data_tag: D108
type_infered: string
name: parse_data
arguments: data_tag: D229
type_infered: string
name: parse_data
arguments: data_tag: D214
type_infered: string
name: parse_data
arguments: data_tag: D298
type_infered: string
name: parse_data
arguments: data_tag: D172
type_infered: string
name: parse_data
arguments: data_tag: D350
type_infered: string
name: parse_data
arguments: data_tag: D213
type_infered: string
name: parse_data
arguments: data_tag: D52
type_infered: string
name: parse_data
arguments: data_tag: D58
type_infered: string
name: parse_data
arguments: data_tag: D109
type_infered: string
name: parse_data
arguments: data_tag: D32
type_infered: string
name: parse_data
arguments: data_tag: D262
type_infered: string
name: parse_data
arguments: data_tag: D222
type_infered: string
name: parse_data
arguments: data_tag: D219
type_infered: string
name: parse_data
arguments: data_tag: D62
type_infered: string

tool: D183: adds

tool: D89: subs

tool: D65: ands

tool: D168: eors

tool: D114: lsls

tool: D386: lsrs

tool: D166: asrs

tool: D286: adcs

tool: D287: sbcs

tool: D163: rors

tool: D122: tst

tool: D351: rsbs

tool: D34: cmp

tool: D10: cmn

tool: D190: orrs

tool: D90: muls

tool: D217: bics

tool: D283: mvns

tool: D95: r0

tool: D360: r1

tool: D111: r2

tool: D245: r3

tool: D325: r4

tool: D16: r5

tool: D108: r6

tool: D229: r7

tool: D214: r8

tool: D298: r9

tool: D172: r10

tool: D350: r11

tool: D213: r12

tool: D52: sp

tool: D58: lr

tool: D109: pc

tool: D32: .text
.syntax unified
.thumb

tool: D262: 	 %s, %s, %s, %s 


tool: D222: 	 %s, %s, %s


tool: D219: not legal number

tool: D62: %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;
    }
  }
}
```