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

```asm
<ic_b2c_compile>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  test   %rdi,%rdi
  je     L219
  mov    %rsi,%rbp
  test   %rsi,%rsi
  je     L59
  mov    %rdi,%r12
  lea    D114(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  test   %rax,%rax
  je     L210
  mov    %rbp,%rsi
  lea    D63(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
L108:
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L210:
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L164
  mov    %rax,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_builtins@plt>
  test   %eax,%eax
  je     L45
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_types_pre@plt>
  test   %eax,%eax
  je     L154
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_generates_pre@plt>
  test   %eax,%eax
  je     L110
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_functions_pre@plt>
  test   %eax,%eax
  je     L10
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_types@plt>
  test   %eax,%eax
  je     L128
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_generates@plt>
  test   %eax,%eax
  je     L6
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_functions@plt>
  test   %eax,%eax
  je     L10
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <ic_b2c_compile_entry@plt>
  test   %eax,%eax
  je     L117
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
  jmp    L108
  nopl   (%rax)
L45:
  lea    D4(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L59:
  lea    D18(%rip),%rdi
  call   <puts@plt>
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L219:
  lea    D70(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L154:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L164:
  mov    %rbp,%rsi
  lea    D56(%rip),%rdi
  call   <printf@plt>
  xor    %eax,%eax
  jmp    L108
  xchg   %ax,%ax
L128:
  lea    D7(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L110:
  lea    D62(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L10:
  lea    D58(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
  nopl   0x0(%rax,%rax,1)
L6:
  lea    D123(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
L117:
  lea    D76(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L108
```

tool_calls: name: retrieve_data
arguments: tag: D114
type: string
name: retrieve_data
arguments: tag: D63
type: string
name: retrieve_data
arguments: tag: D20
type: string
name: retrieve_data
arguments: tag: D4
type: string
name: retrieve_data
arguments: tag: D18
type: string
name: retrieve_data
arguments: tag: D70
type: string
name: retrieve_data
arguments: tag: D102
type: string
name: retrieve_data
arguments: tag: D56
type: string
name: retrieve_data
arguments: tag: D7
type: string
name: retrieve_data
arguments: tag: D62
type: string
name: retrieve_data
arguments: tag: D58
type: string
name: retrieve_data
arguments: tag: D123
type: string
name: retrieve_data
arguments: tag: D76
type: string

tool: D114: r

tool: D63: ic_b2c_compile: error file already existed '%s'


tool: D20: w

tool: D4: ic_b2c_compile: call to ic_b2c_compile_builtins failed

tool: D18: ic_b2c_compile: out_filename was null

tool: D70: ic_b2c_compile: kludge was null

tool: D102: ic_b2c_compile: call to ic_b2c_compile_types_pre failed

tool: D56: ic_b2c_compile: failed to open out_filename '%s'


tool: D7: ic_b2c_compile: call to ic_b2c_compile_types failed

tool: D62: ic_b2c_compile: call to ic_b2c_compile_generates_pre failed

tool: D58: ic_b2c_compile: call to ic_b2c_compile_functions failed

tool: D123: ic_b2c_compile: call to ic_b2c_compile_generates failed

tool: D76: ic_b2c_compile: call to ic_b2c_compile_entry failed

assistant: ```c
unsigned int ic_b2c_compile(struct ic_kludge *kludge, char *out_filename) {
  FILE *f = 0;
  if (!kludge) {
    puts("ic_b2c_compile: kludge was null");
    return 0;
  }
  if (!out_filename) {
    puts("ic_b2c_compile: out_filename was null");
    return 0;
  }
  f = fopen(out_filename, "r");
  if (f) {
    printf("ic_b2c_compile: error file already existed '%s'\n", out_filename);
    return 0;
  }
  f = fopen(out_filename, "w");
  if (!f) {
    printf("ic_b2c_compile: failed to open out_filename '%s'\n", out_filename);
    return 0;
  }
  if (!ic_b2c_compile_builtins(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_builtins failed");
    return 0;
  }
  if (!ic_b2c_compile_types_pre(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_types_pre failed");
    return 0;
  }
  if (!ic_b2c_compile_generates_pre(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_generates_pre failed");
    return 0;
  }
  if (!ic_b2c_compile_functions_pre(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_functions failed");
    return 0;
  }
  if (!ic_b2c_compile_types(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_types failed");
    return 0;
  }
  if (!ic_b2c_compile_generates(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_generates failed");
    return 0;
  }
  if (!ic_b2c_compile_functions(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_functions failed");
    return 0;
  }
  if (!ic_b2c_compile_entry(kludge, f)) {
    puts("ic_b2c_compile: call to ic_b2c_compile_entry failed");
    return 0;
  }
  fclose(f);
  return 1;
}
```