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

```asm
<CVDiagGetReturnFlagName>:
  endbr64
  push   %r12
  push   %rbx
  mov    %edi,%ebx
  mov    $0x1e,%edi
  sub    $0x8,%rsp
  call   <malloc@plt>
  lea    0x7(%rbx),%edi
  mov    %rax,%r12
  cmp    $0x7,%edi
  ja     L8
  lea    D53(%rip),%rdx
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D55(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D45(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D11(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D83(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D19(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D52(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D13(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %r12,%rdi
  lea    D21(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
L8:
  lea    D97(%rip),%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D55
type: string
name: extract_symbolic_data
arguments: label: D45
type: string
name: extract_symbolic_data
arguments: label: D11
type: string
name: extract_symbolic_data
arguments: label: D83
type: string
name: extract_symbolic_data
arguments: label: D19
type: string
name: extract_symbolic_data
arguments: label: D52
type: string
name: extract_symbolic_data
arguments: label: D13
type: string
name: extract_symbolic_data
arguments: label: D21
type: string
name: extract_symbolic_data
arguments: label: D97
type: string

tool: D55: CVDIAG_MEM_NULL

tool: D45: CVDIAG_SUCCESS

tool: D11: CVDIAG_RHSFUNC_RECVR

tool: D83: CVDIAG_RHSFUNC_UNRECVR

tool: D19: CVDIAG_INV_FAIL

tool: D52: CVDIAG_MEM_FAIL

tool: D13: CVDIAG_ILL_INPUT

tool: D21: CVDIAG_LMEM_NULL

tool: D97: NONE

assistant: ```c
char *CVDiagGetReturnFlagName(int flag) {
  char *name;
  name = (char *)malloc(30 * sizeof(char));
  switch (flag) {
  case 0:
    sprintf(name, "CVDIAG_SUCCESS");
    break;
  case -1:
    sprintf(name, "CVDIAG_MEM_NULL");
    break;
  case -2:
    sprintf(name, "CVDIAG_LMEM_NULL");
    break;
  case -3:
    sprintf(name, "CVDIAG_ILL_INPUT");
    break;
  case -4:
    sprintf(name, "CVDIAG_MEM_FAIL");
    break;
  case -5:
    sprintf(name, "CVDIAG_INV_FAIL");
    break;
  case -6:
    sprintf(name, "CVDIAG_RHSFUNC_UNRECVR");
    break;
  case -7:
    sprintf(name, "CVDIAG_RHSFUNC_RECVR");
    break;
  default:
    sprintf(name, "NONE");
  }
  return (name);
}
```