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

```asm
<push_string>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  mov    $0x12,%edx
  mov    %rdi,%r15
  push   %r14
  lea    D43(%rip),%rdi
  mov    %rsi,%r14
  mov    $0x1,%esi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <fwrite@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %eax,%ebp
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  je     L18
L42:
  cmp    $0x3,%ebp
  jle    L48
  movslq %ebp,%rax
  sub    $0x4,%ebp
  lea    D40(%rip),%r13
  mov    %ebp,%esi
  lea    -0x8(%r14,%rax,1),%r12
  lea    -0x4(%r14,%rax,1),%rbx
  shr    $0x2,%esi
  mov    %esi,%eax
  mov    %esi,0xc(%rsp)
  shl    $0x2,%rax
  sub    %rax,%r12
  xchg   %ax,%ax
L47:
  movsbl 0x3(%rbx),%r9d
  movsbl 0x2(%rbx),%r8d
  mov    %r13,%rsi
  mov    %r15,%rdi
  movsbl 0x1(%rbx),%ecx
  movsbl (%rbx),%edx
  xor    %eax,%eax
  sub    $0x4,%rbx
  push   %r9
  push   %r8
  push   %rcx
  push   %rdx
  call   <fprintf@plt>
  add    $0x20,%rsp
  cmp    %r12,%rbx
  jne    L47
  mov    0xc(%rsp),%eax
  neg    %eax
  lea    0x0(%rbp,%rax,4),%ebp
L48:
  cmp    $0x1,%ebp
  jg     L37
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L37:
  movslq %ebp,%rbp
  mov    %r15,%rdi
  lea    D18(%rip),%rsi
  xor    %eax,%eax
  movsbl -0x1(%r14,%rbp,1),%ecx
  movsbl -0x2(%r14,%rbp,1),%edx
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  mov    %ecx,%r9d
  pop    %r12
  mov    %edx,%r8d
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <fprintf@plt>
  nopl   0x0(%rax)
L18:
  movslq %ebp,%rax
  lea    D9(%rip),%rsi
  mov    %r15,%rdi
  sub    $0x1,%ebp
  movsbl -0x1(%r14,%rax,1),%edx
  xor    %eax,%eax
  mov    %edx,%ecx
  call   <fprintf@plt>
  mov    %r15,%rcx
  mov    $0x31,%edx
  mov    $0x1,%esi
  lea    D39(%rip),%rdi
  call   <fwrite@plt>
  jmp    L42
```

tool_calls: name: disassemble_data
arguments: data_tag: D43
datatype: string
name: disassemble_data
arguments: data_tag: D40
datatype: string
name: disassemble_data
arguments: data_tag: D18
datatype: string
name: disassemble_data
arguments: data_tag: D9
datatype: string
name: disassemble_data
arguments: data_tag: D39
datatype: string

tool: D43: "\x50" //push eax


tool: D40: "\x68\x%x\x%x\x%x\x%x" //push '%c%c%c%c'


tool: D18: "\x66\x68\x%x\x%x" //pushw '%c%c'


tool: D9: "\xb0\x%x" //movb al, '%c'


tool: D39: "\x66\x50" //pushw ax
 "\x31\xc0" //xor eax, eax


assistant: ```c
void push_string(FILE *f, char *string) {
  fprintf(f, "\"\\x50\" //push eax\n");
  int left = strlen(string);
  if (left % 2 > 0) {
    fprintf(f, "\"\\xb0\\x%x\" //movb al, '%c'\n", string[left - 1], string[left - 1]);
    fprintf(f, "\"\\x66\\x50\" //pushw ax\n \"\\x31\\xc0\" //xor eax, eax\n");
    left = left - 1;
  }
  while (left / 4 > 0) {
    fprintf(f, "\"\\x68\\x%x\\x%x\\x%x\\x%x\" //push '%c%c%c%c'\n", string[left - 4], string[left - 3], string[left - 2], string[left - 1], string[left - 4], string[left - 3], string[left - 2], string[left - 1]);
    left = left - 4;
  }
  if (left / 2 > 0) {
    fprintf(f, "\"\\x66\\x68\\x%x\\x%x\" //pushw '%c%c'\n", string[left - 2], string[left - 1], string[left - 2], string[left - 1]);
    left = left - 2;
  }
}
```