user: What is the c source code of the assembly code below?

```asm
<wear_bit_name>:
  endbr64
  push   %rbp
  lea    D11(%rip),%rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x8,%rsp
  and    $0x1,%edi
  movb   $0x0,D11(%rip)
  jne    L167
  test   $0x2,%bl
  jne    L105
L208:
  test   $0x4,%bl
  jne    L168
L6:
  test   $0x8,%bl
  jne    L309
L51:
  test   $0x10,%bl
  jne    L97
L61:
  test   $0x20,%bl
  jne    L301
L86:
  test   $0x40,%bl
  jne    L39
L358:
  test   $0x80,%bl
  jne    L327
L22:
  test   $0x1,%bh
  jne    L221
L99:
  test   $0x2,%bh
  jne    L153
L72:
  test   $0x4,%bh
  jne    L251
L195:
  test   $0x8,%bh
  jne    L316
L267:
  test   $0x10,%bh
  jne    L45
L274:
  test   $0x20,%bh
  jne    L58
L35:
  test   $0x40,%bh
  jne    L292
L82:
  test   $0x10000,%ebx
  jne    L288
L146:
  test   $0x20000,%ebx
  jne    L25
L74:
  and    $0x80,%bh
  jne    L142
L91:
  cmpb   $0x0,D11(%rip)
  lea    D42(%rip),%rax
  lea    D132(%rip),%rdx
  cmove  %rdx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L167:
  lea    D137(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x2,%bl
  je     L208
L105:
  lea    D114(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x4,%bl
  je     L6
L168:
  lea    D43(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x8,%bl
  je     L51
L309:
  lea    D207(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10,%bl
  je     L61
L97:
  lea    D196(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20,%bl
  je     L86
L301:
  lea    D165(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x40,%bl
  je     L358
L39:
  lea    D150(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x80,%bl
  je     L22
L327:
  lea    D107(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x1,%bh
  je     L99
L221:
  lea    D82(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x2,%bh
  je     L72
L153:
  lea    D6(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x4,%bh
  je     L195
L251:
  lea    D144(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x8,%bh
  je     L267
L316:
  lea    D57(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10,%bh
  je     L274
L45:
  lea    D184(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20,%bh
  je     L35
L58:
  lea    D216(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x40,%bh
  je     L82
L292:
  lea    D60(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10000,%ebx
  je     L146
L288:
  lea    D219(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20000,%ebx
  je     L74
L25:
  lea    D205(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  and    $0x80,%bh
  je     L91
L142:
  lea    D65(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L91
```

tool_calls: name: retrieve_data
arguments: tag: D132
datatype: string
name: retrieve_data
arguments: tag: D137
datatype: string
name: retrieve_data
arguments: tag: D114
datatype: string
name: retrieve_data
arguments: tag: D43
datatype: string
name: retrieve_data
arguments: tag: D207
datatype: string
name: retrieve_data
arguments: tag: D196
datatype: string
name: retrieve_data
arguments: tag: D165
datatype: string
name: retrieve_data
arguments: tag: D150
datatype: string
name: retrieve_data
arguments: tag: D107
datatype: string
name: retrieve_data
arguments: tag: D82
datatype: string
name: retrieve_data
arguments: tag: D6
datatype: string
name: retrieve_data
arguments: tag: D144
datatype: string
name: retrieve_data
arguments: tag: D57
datatype: string
name: retrieve_data
arguments: tag: D184
datatype: string
name: retrieve_data
arguments: tag: D216
datatype: string
name: retrieve_data
arguments: tag: D60
datatype: string
name: retrieve_data
arguments: tag: D219
datatype: string
name: retrieve_data
arguments: tag: D205
datatype: string
name: retrieve_data
arguments: tag: D65
datatype: string

tool: D132: none

tool: D137:  take

tool: D114:  finger

tool: D43:  neck

tool: D207:  torso

tool: D196:  head

tool: D165:  legs

tool: D150:  feet

tool: D107:  hands

tool: D82:  arms

tool: D6:  shield

tool: D144:  body

tool: D57:  waist

tool: D184:  wrist

tool: D216:  wield

tool: D60:  hold

tool: D219:  float

tool: D205:  face

tool: D65:  no_sac

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 & (65536))
    strcat(buf, " float");
  if (wear_flags & (131072))
    strcat(buf, " face");
  if (wear_flags & (32768))
    strcat(buf, " no_sac");
  return (buf[0] != '\0') ? buf + 1 : "none";
}
```