user: Converte this assembly snippet into its equivalent C code:

```asm
<mapExtendedMPAARating>:
  endbr64
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    $0x28,%edi
  call   <malloc@plt>
  lea    D108(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcpy@plt>
  test   $0x400000,%ebx
  jne    L33
  test   $0x800000,%ebx
  jne    L168
L43:
  test   $0x1000000,%ebx
  jne    L3
L65:
  test   $0x2000000,%ebx
  jne    L156
L92:
  test   $0x4000000,%ebx
  jne    L25
L40:
  test   $0x8000000,%ebx
  jne    L47
L16:
  test   $0x10000000,%ebx
  jne    L129
L73:
  test   $0x20000000,%ebx
  jne    L182
L135:
  test   $0x40000000,%ebx
  jne    L72
L21:
  test   %ebx,%ebx
  js     L90
L29:
  mov    %rbp,(%r12)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L33:
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x800000,%ebx
  je     L43
L168:
  lea    D33(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x1000000,%ebx
  je     L65
L3:
  lea    D9(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x2000000,%ebx
  je     L92
L156:
  lea    D26(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x4000000,%ebx
  je     L40
L25:
  lea    D27(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x8000000,%ebx
  je     L16
L47:
  lea    D18(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x10000000,%ebx
  je     L73
L129:
  lea    D83(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x20000000,%ebx
  je     L135
L182:
  lea    D43(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   $0x40000000,%ebx
  je     L21
L72:
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  test   %ebx,%ebx
  jns    L29
L90:
  mov    %rbp,%rdi
  lea    D93(%rip),%rsi
  call   <strcat@plt>
  mov    %rbp,(%r12)
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D108
data_type: string
name: extract_symbolic_data
arguments: data_label: D42
data_type: string
name: extract_symbolic_data
arguments: data_label: D33
data_type: string
name: extract_symbolic_data
arguments: data_label: D9
data_type: string
name: extract_symbolic_data
arguments: data_label: D26
data_type: string
name: extract_symbolic_data
arguments: data_label: D27
data_type: string
name: extract_symbolic_data
arguments: data_label: D18
data_type: string
name: extract_symbolic_data
arguments: data_label: D83
data_type: string
name: extract_symbolic_data
arguments: data_label: D43
data_type: string
name: extract_symbolic_data
arguments: data_label: D29
data_type: string
name: extract_symbolic_data
arguments: data_label: D93
data_type: string

tool: 

tool: D42: AC 

tool: D33: BN 

tool: D9: GL 

tool: D26: GV 

tool: D27: AL 

tool: D18: MV 

tool: D83: N 

tool: D43: RP 

tool: D29: SC 

tool: D93: V 

assistant: ```c
void mapExtendedMPAARating(int mpaarating, char **ratingStr) {
  char *szRating = malloc((40));
  strcpy(szRating, "");
  if (mpaarating & 0x00400000) {
    strcat(szRating, "AC ");
  }
  if (mpaarating & 0x00800000) {
    strcat(szRating, "BN ");
  }
  if (mpaarating & 0x01000000) {
    strcat(szRating, "GL ");
  }
  if (mpaarating & 0x02000000) {
    strcat(szRating, "GV ");
  }
  if (mpaarating & 0x04000000) {
    strcat(szRating, "AL ");
  }
  if (mpaarating & 0x08000000) {
    strcat(szRating, "MV ");
  }
  if (mpaarating & 0x10000000) {
    strcat(szRating, "N ");
  }
  if (mpaarating & 0x20000000) {
    strcat(szRating, "RP ");
  }
  if (mpaarating & 0x40000000) {
    strcat(szRating, "SC ");
  }
  if (mpaarating & 0x80000000) {
    strcat(szRating, "V ");
  }
  *ratingStr = szRating;
}
```