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

```asm
<wear_bit_name>:
  endbr64
  push   %rbp
  lea    D140(%rip),%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  and    $0x1,%edi
  movb   $0x0,D140(%rip)
  jne    L214
  test   $0x2,%bl
  jne    L82
L166:
  test   $0x4,%bl
  jne    L227
L19:
  test   $0x8,%bl
  jne    L2
L55:
  test   $0x10,%bl
  jne    L264
L234:
  test   $0x20,%bl
  jne    L236
L3:
  test   $0x40,%bl
  jne    L316
L105:
  test   $0x80,%bl
  jne    L27
L80:
  test   $0x1,%bh
  jne    L81
L78:
  test   $0x2,%bh
  jne    L22
L36:
  test   $0x4,%bh
  jne    L228
L34:
  test   $0x8,%bh
  jne    L54
L102:
  test   $0x10,%bh
  jne    L284
L121:
  test   $0x20,%bh
  jne    L195
L74:
  test   $0x40,%bh
  jne    L224
L59:
  test   $0x80,%bh
  jne    L44
L98:
  and    $0x10000,%ebx
  jne    L135
L230:
  cmpb   $0x0,D140(%rip)
  lea    D114(%rip),%rax
  lea    D192(%rip),%rdx
  cmove  %rdx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L214:
  lea    D38(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x2,%bl
  je     L166
L82:
  lea    D71(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x4,%bl
  je     L19
L227:
  lea    D1(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x8,%bl
  je     L55
L2:
  lea    D216(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10,%bl
  je     L234
L264:
  lea    D126(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20,%bl
  je     L3
L236:
  lea    D123(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x40,%bl
  je     L105
L316:
  lea    D162(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x80,%bl
  je     L80
L27:
  lea    D86(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x1,%bh
  je     L78
L81:
  lea    D101(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x2,%bh
  je     L36
L22:
  lea    D188(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x4,%bh
  je     L34
L228:
  lea    D201(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x8,%bh
  je     L102
L54:
  lea    D67(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10,%bh
  je     L121
L284:
  lea    D57(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20,%bh
  je     L74
L195:
  lea    D98(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x40,%bh
  je     L59
L224:
  lea    D151(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x80,%bh
  je     L98
L44:
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  and    $0x10000,%ebx
  je     L230
L135:
  lea    D122(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L230
```

tool_calls: name: disassemble_data
arguments: label: D192
type: string
name: disassemble_data
arguments: label: D38
type: string
name: disassemble_data
arguments: label: D71
type: string
name: disassemble_data
arguments: label: D1
type: string
name: disassemble_data
arguments: label: D216
type: string
name: disassemble_data
arguments: label: D126
type: string
name: disassemble_data
arguments: label: D123
type: string
name: disassemble_data
arguments: label: D162
type: string
name: disassemble_data
arguments: label: D86
type: string
name: disassemble_data
arguments: label: D101
type: string
name: disassemble_data
arguments: label: D188
type: string
name: disassemble_data
arguments: label: D201
type: string
name: disassemble_data
arguments: label: D67
type: string
name: disassemble_data
arguments: label: D57
type: string
name: disassemble_data
arguments: label: D98
type: string
name: disassemble_data
arguments: label: D151
type: string
name: disassemble_data
arguments: label: D0
type: string
name: disassemble_data
arguments: label: D122
type: string

tool: D192: none

tool: D38:  take

tool: D71:  finger

tool: D1:  neck

tool: D216:  torso

tool: D126:  head

tool: D123:  legs

tool: D162:  feet

tool: D86:  hands

tool: D101:  arms

tool: D188:  shield

tool: D201:  body

tool: D67:  waist

tool: D57:  wrist

tool: D98:  wield

tool: D151:  hold

tool: D0:  nosac

tool: D122:  float

assistant: ```c
char *wear_bit_name(int wear_flags) {
  static char buf[512];
  buf[0] = '\0';
  if (wear_flags & (1))
    strcat(buf, " take");
  if (wear_flags & (2))
    strcat(buf, " finger");
  if (wear_flags & (4))
    strcat(buf, " neck");
  if (wear_flags & (8))
    strcat(buf, " torso");
  if (wear_flags & (16))
    strcat(buf, " head");
  if (wear_flags & (32))
    strcat(buf, " legs");
  if (wear_flags & (64))
    strcat(buf, " feet");
  if (wear_flags & (128))
    strcat(buf, " hands");
  if (wear_flags & (256))
    strcat(buf, " arms");
  if (wear_flags & (512))
    strcat(buf, " shield");
  if (wear_flags & (1024))
    strcat(buf, " body");
  if (wear_flags & (2048))
    strcat(buf, " waist");
  if (wear_flags & (4096))
    strcat(buf, " wrist");
  if (wear_flags & (8192))
    strcat(buf, " wield");
  if (wear_flags & (16384))
    strcat(buf, " hold");
  if (wear_flags & (32768))
    strcat(buf, " nosac");
  if (wear_flags & (65536))
    strcat(buf, " float");
  return (buf[0] != '\0') ? buf + 1 : "none";
}
```