user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<wear_bit_name>:
  endbr64
  push   %rbx
  mov    %edi,%ebx
  movb   $0x0,D177(%rip)
  test   $0x1,%dil
  jne    L38
L72:
  test   $0x2,%bl
  jne    L285
L147:
  test   $0x4,%bl
  jne    L334
L146:
  test   $0x8,%bl
  jne    L249
L178:
  test   $0x10,%bl
  jne    L54
L39:
  test   $0x20,%bl
  jne    L81
L57:
  test   $0x40,%bl
  jne    L338
L52:
  test   $0x80,%bl
  jne    L313
L229:
  test   $0x1,%bh
  jne    L212
L288:
  test   $0x2,%bh
  jne    L219
L272:
  test   $0x4,%bh
  jne    L37
L214:
  test   $0x8,%bh
  jne    L7
L213:
  test   $0x10,%bh
  jne    L56
L14:
  test   $0x20,%bh
  jne    L264
L160:
  test   $0x40,%bh
  jne    L119
L67:
  test   $0x80,%bh
  jne    L244
L311:
  test   $0x10000,%ebx
  jne    L126
L218:
  cmpb   $0x0,D177(%rip)
  lea    D54(%rip),%rax
  lea    D373(%rip),%rdx
  cmove  %rdx,%rax
  pop    %rbx
  ret
L38:
  lea    D86(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L72
L285:
  lea    D150(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L147
L334:
  lea    D272(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L146
L249:
  lea    D61(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L178
L54:
  lea    D357(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L39
L81:
  lea    D344(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L57
L338:
  lea    D324(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L52
L313:
  lea    D189(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L229
L212:
  lea    D26(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L288
L219:
  lea    D209(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L272
L37:
  lea    D215(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L214
L7:
  lea    D79(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L213
L56:
  lea    D98(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L14
L264:
  lea    D278(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L160
L119:
  lea    D285(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L67
L244:
  lea    D351(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L311
L126:
  lea    D24(%rip),%rsi
  lea    D177(%rip),%rdi
  call   <strcat@plt>
  jmp    L218
```

tool_calls: name: retrieve_data
arguments: data_label: D373
datatype: string
name: retrieve_data
arguments: data_label: D86
datatype: string
name: retrieve_data
arguments: data_label: D150
datatype: string
name: retrieve_data
arguments: data_label: D272
datatype: string
name: retrieve_data
arguments: data_label: D61
datatype: string
name: retrieve_data
arguments: data_label: D357
datatype: string
name: retrieve_data
arguments: data_label: D344
datatype: string
name: retrieve_data
arguments: data_label: D324
datatype: string
name: retrieve_data
arguments: data_label: D189
datatype: string
name: retrieve_data
arguments: data_label: D26
datatype: string
name: retrieve_data
arguments: data_label: D209
datatype: string
name: retrieve_data
arguments: data_label: D215
datatype: string
name: retrieve_data
arguments: data_label: D79
datatype: string
name: retrieve_data
arguments: data_label: D98
datatype: string
name: retrieve_data
arguments: data_label: D278
datatype: string
name: retrieve_data
arguments: data_label: D285
datatype: string
name: retrieve_data
arguments: data_label: D351
datatype: string
name: retrieve_data
arguments: data_label: D24
datatype: string

tool: D373: none

tool: D86:  take

tool: D150:  finger

tool: D272:  neck

tool: D61:  torso

tool: D357:  head

tool: D344:  legs

tool: D324:  feet

tool: D189:  hands

tool: D26:  arms

tool: D209:  shield

tool: D215:  body

tool: D79:  waist

tool: D98:  wrist

tool: D278:  wield

tool: D285:  hold

tool: D351:  nosac

tool: D24:  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";
}
```