user: 请将以下的汇编代码转换成C语言代码：

```asm
<str2fmt>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  lea    D121(%rip),%rsi
  call   <strstr@plt>
  mov    $0x0,%ebp
  test   %rax,%rax
  je     L16
L113:
  lea    D19(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L256
L156:
  or     $0x8,%ebp
L51:
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L16:
  lea    D106(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L113
  lea    D63(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    $0x1,%ebp
  test   %rax,%rax
  jne    L113
  lea    D112(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  jmp    L113
L256:
  lea    D108(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L156
  lea    D164(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L57
L189:
  or     $0x10,%ebp
  jmp    L51
L57:
  lea    D135(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L189
  lea    D176(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L150
L38:
  or     $0x20,%ebp
  jmp    L51
L150:
  lea    D137(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L38
  lea    D85(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L71
L121:
  or     $0x18,%ebp
  jmp    L51
L71:
  lea    D124(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L121
  lea    D128(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L37
  mov    $0x1,%ebp
  jmp    L51
L37:
  lea    D10(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L242
  mov    $0x1,%ebp
  jmp    L51
L242:
  lea    D70(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L247
L164:
  or     $0x4,%ebp
  jmp    L51
L247:
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L164
  lea    D67(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L12
L250:
  or     $0x2,%ebp
  jmp    L51
L12:
  lea    D90(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L51
  jmp    L250
```

tool_calls: name: parse_data
arguments: data_tag: D121
type: string
name: parse_data
arguments: data_tag: D19
type: string
name: parse_data
arguments: data_tag: D106
type: string
name: parse_data
arguments: data_tag: D63
type: string
name: parse_data
arguments: data_tag: D112
type: string
name: parse_data
arguments: data_tag: D108
type: string
name: parse_data
arguments: data_tag: D164
type: string
name: parse_data
arguments: data_tag: D135
type: string
name: parse_data
arguments: data_tag: D176
type: string
name: parse_data
arguments: data_tag: D137
type: string
name: parse_data
arguments: data_tag: D85
type: string
name: parse_data
arguments: data_tag: D124
type: string
name: parse_data
arguments: data_tag: D128
type: string
name: parse_data
arguments: data_tag: D10
type: string
name: parse_data
arguments: data_tag: D70
type: string
name: parse_data
arguments: data_tag: D114
type: string
name: parse_data
arguments: data_tag: D67
type: string
name: parse_data
arguments: data_tag: D90
type: string

tool: D121: be

tool: D19: mulaw

tool: D106: BE

tool: D63: le

tool: D112: LE

tool: D108: MULAW

tool: D164: alaw

tool: D135: ALAW

tool: D176: ac3

tool: D137: AC3

tool: D85: mpeg2

tool: D124: MPEG2

tool: D128: imaadpcm

tool: D10: IMAADPCM

tool: D70: float

tool: D114: FLOAT

tool: D67: unsigned

tool: D90: UNSIGNED

assistant: ```c
int str2fmt(char *str) {
  int format = 0;
  if (strstr(str, "be") || strstr(str, "BE"))
    format |= (0 << 0);
  else if (strstr(str, "le") || strstr(str, "LE"))
    format |= (1 << 0);
  else
    format |= (1 << 0);
  if (strstr(str, "mulaw") || strstr(str, "MULAW")) {
    format |= (1 << 3);
    return format;
  }
  if (strstr(str, "alaw") || strstr(str, "ALAW")) {
    format |= (2 << 3);
    return format;
  }
  if (strstr(str, "ac3") || strstr(str, "AC3")) {
    format |= (4 << 3);
    return format;
  }
  if (strstr(str, "mpeg2") || strstr(str, "MPEG2")) {
    format |= (3 << 3);
    return format;
  }
  if (strstr(str, "imaadpcm") || strstr(str, "IMAADPCM")) {
    format |= (1 << 0) | (0 << 1);
    return format;
  }
  if (strstr(str, "float") || strstr(str, "FLOAT")) {
    format |= (1 << 2);
    return format;
  } else
    format |= (0 << 2);
  if (strstr(str, "unsigned") || strstr(str, "UNSIGNED"))
    format |= (1 << 1);
  else
    format |= (0 << 1);
  return format;
}
```