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

```asm
<ic_b2c_compile_type_union_header>:
  endbr64
  push   %r12
  push   %rbp
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L39
  mov    %rsi,%rdi
  test   %rsi,%rsi
  je     L35
  mov    %rdx,%rbp
  test   %rdx,%rdx
  je     L11
  call   <ic_decl_type_union_mangled_name@plt>
  mov    %rax,%rdi
  test   %rax,%rax
  je     L38
  call   <ic_symbol_contents@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L42
  mov    %rax,%rdx
  lea    D58(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D0(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    $0x1,%eax
L76:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L42:
  lea    D24(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L76
L11:
  lea    D44(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L38:
  lea    D34(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L39:
  lea    D47(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L76
L35:
  lea    D41(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L76
```

tool_calls: name: parse_data
arguments: data_label: D58
type: string
name: parse_data
arguments: data_label: D0
type: string
name: parse_data
arguments: data_label: D24
type: string
name: parse_data
arguments: data_label: D44
type: string
name: parse_data
arguments: data_label: D34
type: string
name: parse_data
arguments: data_label: D47
type: string
name: parse_data
arguments: data_label: D41
type: string

tool: D58: enum %s_tag;


tool: D0: typedef struct %s * %s;


tool: D24: ic_b2c_compile_type_union_header: call to ic_symbol_contents failed

tool: D44: ic_b2c_compile_type_union_header: f was null

tool: D34: ic_b2c_compile_type_union_header: call to ic_decl_type_union_mangled_name failed

tool: D47: ic_b2c_compile_type_union_header: kludge was null

tool: D41: ic_b2c_compile_type_union_header: tdecl_union was null

assistant: ```c
unsigned int ic_b2c_compile_type_union_header(struct ic_kludge *kludge, struct ic_decl_type_union *tdecl_union, FILE *f) {
  struct ic_symbol *mangled_type_name = 0;
  char *mangled_type_name_ch = 0;
  if (!kludge) {
    puts("ic_b2c_compile_type_union_header: kludge was null");
    return 0;
  }
  if (!tdecl_union) {
    puts("ic_b2c_compile_type_union_header: tdecl_union was null");
    return 0;
  }
  if (!f) {
    puts("ic_b2c_compile_type_union_header: f was null");
    return 0;
  }
  mangled_type_name = ic_decl_type_union_mangled_name(tdecl_union);
  if (!mangled_type_name) {
    puts("ic_b2c_compile_type_union_header: call to ic_decl_type_union_mangled_name failed");
    return 0;
  }
  mangled_type_name_ch = ic_symbol_contents(mangled_type_name);
  if (!mangled_type_name_ch) {
    puts("ic_b2c_compile_type_union_header: call to ic_symbol_contents failed");
    return 0;
  }
  fprintf(f, "enum %s_tag;\n", mangled_type_name_ch);
  fprintf(f, "typedef struct %s * %s;\n", mangled_type_name_ch, mangled_type_name_ch);
  return 1;
}
```