user: Translate the below assembly code into C programming language:

```asm
<wear_bit_name>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %edi,-0x4(%rbp)
  movb   $0x0,D39(%rip)
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L122
  lea    D84(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L122:
  mov    -0x4(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L64
  lea    D230(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L64:
  mov    -0x4(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L88
  lea    D268(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L88:
  mov    -0x4(%rbp),%eax
  and    $0x8,%eax
  test   %eax,%eax
  je     L84
  lea    D14(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L84:
  mov    -0x4(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L128
  lea    D172(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L128:
  mov    -0x4(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L11
  lea    D150(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L11:
  mov    -0x4(%rbp),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L127
  lea    D243(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L127:
  mov    -0x4(%rbp),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L35
  lea    D199(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L35:
  mov    -0x4(%rbp),%eax
  and    $0x100,%eax
  test   %eax,%eax
  je     L169
  lea    D47(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L169:
  mov    -0x4(%rbp),%eax
  and    $0x200,%eax
  test   %eax,%eax
  je     L93
  lea    D15(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L93:
  mov    -0x4(%rbp),%eax
  and    $0x400,%eax
  test   %eax,%eax
  je     L132
  lea    D144(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L132:
  mov    -0x4(%rbp),%eax
  and    $0x800,%eax
  test   %eax,%eax
  je     L19
  lea    D330(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L19:
  mov    -0x4(%rbp),%eax
  and    $0x1000,%eax
  test   %eax,%eax
  je     L91
  lea    D139(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L91:
  mov    -0x4(%rbp),%eax
  and    $0x2000,%eax
  test   %eax,%eax
  je     L183
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L183:
  mov    -0x4(%rbp),%eax
  and    $0x4000,%eax
  test   %eax,%eax
  je     L96
  lea    D185(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L96:
  mov    -0x4(%rbp),%eax
  and    $0x8000,%eax
  test   %eax,%eax
  je     L146
  lea    D285(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L146:
  mov    -0x4(%rbp),%eax
  and    $0x10000,%eax
  test   %eax,%eax
  je     L173
  lea    D117(%rip),%rax
  mov    %rax,%rsi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <strcat@plt>
L173:
  movzbl D39(%rip),%eax
  test   %al,%al
  je     L49
  lea    D379(%rip),%rax
  jmp    L114
L49:
  lea    D208(%rip),%rax
L114:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D84
type_infered: string
name: retrieve_data
arguments: data_label: D230
type_infered: string
name: retrieve_data
arguments: data_label: D268
type_infered: string
name: retrieve_data
arguments: data_label: D14
type_infered: string
name: retrieve_data
arguments: data_label: D172
type_infered: string
name: retrieve_data
arguments: data_label: D150
type_infered: string
name: retrieve_data
arguments: data_label: D243
type_infered: string
name: retrieve_data
arguments: data_label: D199
type_infered: string
name: retrieve_data
arguments: data_label: D47
type_infered: string
name: retrieve_data
arguments: data_label: D15
type_infered: string
name: retrieve_data
arguments: data_label: D144
type_infered: string
name: retrieve_data
arguments: data_label: D330
type_infered: string
name: retrieve_data
arguments: data_label: D139
type_infered: string
name: retrieve_data
arguments: data_label: D16
type_infered: string
name: retrieve_data
arguments: data_label: D185
type_infered: string
name: retrieve_data
arguments: data_label: D285
type_infered: string
name: retrieve_data
arguments: data_label: D117
type_infered: string
name: retrieve_data
arguments: data_label: D208
type_infered: string

tool: D84:  take

tool: D230:  finger

tool: D268:  neck

tool: D14:  torso

tool: D172:  head

tool: D150:  legs

tool: D243:  feet

tool: D199:  hands

tool: D47:  arms

tool: D15:  shield

tool: D144:  body

tool: D330:  waist

tool: D139:  wrist

tool: D16:  wield

tool: D185:  hold

tool: D285:  nosac

tool: D117:  float

tool: D208: none

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