user: What is the c source code of the assembly code below?

```asm
<printer_print>:
  endbr64
  push   %r15
  mov    %r8,%rdi
  mov    %rcx,%r15
  push   %r14
  mov    %rdx,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,0x8(%rsp)
  call   <strlen@plt>
  mov    $0x80,%edi
  mov    %rax,%rbx
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L75
L6:
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D124(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L16
L39:
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    $0x1,%esi
  mov    %r13,%rdi
  call   <fwrite@plt>
  cmp    %rax,%rbx
  je     L1
  lea    D99(%rip),%rdi
  call   <perror@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
  call   <abort@plt>
L1:
  mov    %r12,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L0
  xor    %eax,%eax
  call   <connect_to_server@plt>
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D100(%rip),%rdi
  mov    %rax,%r12
  mov    %rax,%rcx
  call   <fwrite@plt>
  mov    %r14,%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D66(%rip),%rsi
  call   <fprintf@plt>
  xor    %eax,%eax
  mov    %rbp,%rdx
  mov    %r12,%rdi
  lea    D54(%rip),%rsi
  call   <fprintf@plt>
  test   %r15,%r15
  je     L58
  mov    %r15,%rdx
  lea    D15(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L58:
  mov    0x8(%rsp),%rdx
  lea    D113(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D47(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  xor    %eax,%eax
L61:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L16:
  lea    D101(%rip),%rdi
  call   <perror@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L39
L75:
  lea    D120(%rip),%rdi
  call   <perror@plt>
  xor    %eax,%eax
  call   <abort@plt>
  jmp    L6
  nopl   0x0(%rax,%rax,1)
L0:
  lea    D16(%rip),%rdi
  call   <perror@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L61
```

tool_calls: name: unpack_data
arguments: data_label: D125
data_type: string
name: unpack_data
arguments: data_label: D124
data_type: string
name: unpack_data
arguments: data_label: D99
data_type: string
name: unpack_data
arguments: data_label: D100
data_type: string
name: unpack_data
arguments: data_label: D66
data_type: string
name: unpack_data
arguments: data_label: D54
data_type: string
name: unpack_data
arguments: data_label: D15
data_type: string
name: unpack_data
arguments: data_label: D113
data_type: string
name: unpack_data
arguments: data_label: D47
data_type: string
name: unpack_data
arguments: data_label: D19
data_type: string
name: unpack_data
arguments: data_label: D101
data_type: string
name: unpack_data
arguments: data_label: D120
data_type: string
name: unpack_data
arguments: data_label: D16
data_type: string

tool: D125: /tmp/print_job_

tool: D124: w

tool: D99: fwrite

tool: D100: NEW


tool: D66: NAME:%s


tool: D54: FILE:%s


tool: D15: DESCRIPTION:%s


tool: D113: PRINTER:%s


tool: D47: PRINT


tool: D19: EXIT


tool: D101: fopen

tool: D120: malloc

tool: D16: fclose

assistant: ```c
int printer_print(int *handle __attribute__((unused)), char *driver, char *job_name, char *description, char *data) {
  size_t datasize = strlen(data);
  char *tmpfile_name = malloc(128);
  if (tmpfile_name == NULL) {
    perror("malloc");
    abort();
  }
  strcpy(tmpfile_name, "/tmp/print_job_");
  strcat(tmpfile_name, job_name);
  FILE *tmpfile = fopen(tmpfile_name, "w");
  if (tmpfile == NULL) {
    perror("fopen");
    free(tmpfile_name);
    abort();
  }
  size_t count = fwrite(data, 1, datasize, tmpfile);
  if (count != datasize) {
    perror("fwrite");
    fclose(tmpfile);
    free(tmpfile_name);
    abort();
  }
  if (fclose(tmpfile)) {
    perror("fclose");
    fclose(tmpfile);
    free(tmpfile_name);
    return -1;
  }
  FILE *conn = connect_to_server();
  fprintf(conn, "NEW\n");
  fprintf(conn, "NAME:%s\n", job_name);
  fprintf(conn, "FILE:%s\n", tmpfile_name);
  if (description != NULL) {
    fprintf(conn, "DESCRIPTION:%s\n", description);
  }
  fprintf(conn, "PRINTER:%s\n", driver);
  fprintf(conn, "PRINT\n");
  fprintf(conn, "EXIT\n");
  free(tmpfile_name);
  fclose(conn);
  return 0;
}
```