user: Please show me the C implementation that matches the assembly code listed below:

```asm
<write_turtle>:
  endbr64
  sub    $0x8,%rsp
  test   %rdi,%rdi
  je     L22
  mov    %rdx,%rax
  or     %rsi,%rax
  je     L75
  test   %rdx,%rdx
  je     L65
  test   %rsi,%rsi
  je     L72
  sub    $0x8,%rsp
  lea    D25(%rip),%rax
  push   %rax
  push   %rdx
  push   %rsi
  lea    D4(%rip),%r9
  lea    D152(%rip),%r8
  lea    D145(%rip),%rcx
  lea    D150(%rip),%rdx
  lea    D11(%rip),%rsi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x20,%rsp
L54:
  add    $0x8,%rsp
  ret
L22:
  lea    D77(%rip),%rdi
  call   <t_error@plt>
  jmp    L54
L75:
  sub    $0x8,%rsp
  lea    D25(%rip),%rax
  push   %rax
  lea    D4(%rip),%r9
  lea    D152(%rip),%r8
  lea    D145(%rip),%rcx
  lea    D150(%rip),%rdx
  lea    D202(%rip),%rsi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x10,%rsp
  jmp    L54
L65:
  lea    D25(%rip),%rax
  push   %rax
  push   %rsi
  lea    D4(%rip),%r9
  lea    D152(%rip),%r8
  lea    D145(%rip),%rcx
  lea    D150(%rip),%rdx
  lea    D160(%rip),%rsi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x10,%rsp
  jmp    L54
L72:
  lea    D25(%rip),%rax
  push   %rax
  push   %rdx
  lea    D4(%rip),%r9
  lea    D152(%rip),%r8
  lea    D145(%rip),%rcx
  lea    D150(%rip),%rdx
  lea    D197(%rip),%rsi
  mov    $0x0,%eax
  call   <fprintf@plt>
  add    $0x10,%rsp
  jmp    L54
```

tool_calls: name: retrieve_data
arguments: data_tag: D25
data_type: string
name: retrieve_data
arguments: data_tag: D4
data_type: string
name: retrieve_data
arguments: data_tag: D152
data_type: string
name: retrieve_data
arguments: data_tag: D145
data_type: string
name: retrieve_data
arguments: data_tag: D150
data_type: string
name: retrieve_data
arguments: data_tag: D11
data_type: string
name: retrieve_data
arguments: data_tag: D77
data_type: string
name: retrieve_data
arguments: data_tag: D202
data_type: string
name: retrieve_data
arguments: data_tag: D160
data_type: string
name: retrieve_data
arguments: data_tag: D197
data_type: string

tool: D25: */

tool: D4: 23:24:58

tool: D152: Mar 15 2022

tool: D145: This_is_a_turtle_file

tool: D150: /**

tool: D11: %3s %21s created on %s at %s  by %s 
 inputs processed :%s %s


tool: D77: An attempt was made towrite on a not opened file

tool: D202: %3s %21s created on %s at %s %2s 


tool: D160: %3s %21s created on %s at %s by %s %2s


tool: D197: %3s %21s created on %s at %s
 inputs processed: %s %2s


assistant: ```c
void write_turtle(FILE *outputfile, char *creator, char *inputs) {
  if (outputfile == NULL) {
    t_error("An attempt was made towrite on a not opened file");
  } else if (inputs == NULL && creator == NULL) {
    fprintf(outputfile, "%3s %21s created on %s at %s %2s \n", "/**", "This_is_a_turtle_file", "Mar 15 2022", "23:24:58", "*/");
  } else if (inputs == NULL) {
    fprintf(outputfile, "%3s %21s created on %s at %s by %s %2s\n", "/**", "This_is_a_turtle_file", "Mar 15 2022", "23:24:58", creator, "*/");
  } else if (creator == NULL) {
    fprintf(outputfile, "%3s %21s created on %s at %s\n inputs processed: %s %2s\n", "/**", "This_is_a_turtle_file", "Mar 15 2022", "23:24:58", inputs, "*/");
  } else {
    fprintf(outputfile, "%3s %21s created on %s at %s  by %s \n inputs processed :%s %s\n", "/**", "This_is_a_turtle_file", "Mar 15 2022", "23:24:58", creator, inputs, "*/");
  }
}
```