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

```asm
<write_tetrs>:
  endbr64
  push   %r15
  push   %r14
  lea    0x1(%rdx),%r14d
  push   %r13
  mov    %r8d,%r13d
  push   %r12
  mov    %edx,%r12d
  mov    %r8d,%edx
  lea    0x1(%r13),%r15d
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  lea    0x1(%rcx),%ebx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %r14d,%edi
  mov    %esi,0x10(%rsp)
  mov    %ebx,%esi
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    %eax,0x1c(%rsp)
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    %eax,0x18(%rsp)
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,0x14(%rsp)
  call   <get_absolute_num@plt>
  sub    $0x8,%rsp
  mov    0x24(%rsp),%r10d
  mov    %eax,%ecx
  push   %r10
  lea    D38(%rip),%r10
  mov    0x28(%rsp),%r9d
  mov    0x24(%rsp),%r8d
  mov    0x20(%rsp),%edx
  mov    %r10,%rsi
  mov    0x18(%rsp),%rdi
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  mov    %eax,0x2c(%rsp)
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    %eax,0x28(%rsp)
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,0x24(%rsp)
  call   <get_absolute_num@plt>
  mov    0x2c(%rsp),%r11d
  mov    0x28(%rsp),%r9d
  lea    D38(%rip),%r10
  mov    %eax,%ecx
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%r8d
  mov    %r10,%rsi
  mov    0x18(%rsp),%rdi
  mov    %r11d,(%rsp)
  lea    0x1(%rax),%edx
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  mov    %eax,0x2c(%rsp)
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,0x28(%rsp)
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r12d,%edi
  mov    %eax,0x24(%rsp)
  call   <get_absolute_num@plt>
  mov    0x2c(%rsp),%r11d
  mov    0x28(%rsp),%r9d
  lea    D38(%rip),%r10
  mov    %eax,%ecx
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%r8d
  mov    %r10,%rsi
  mov    0x18(%rsp),%rdi
  mov    %r11d,(%rsp)
  lea    0x2(%rax),%edx
  call   <fprintf@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  mov    %eax,0x2c(%rsp)
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  mov    %eax,0x28(%rsp)
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,0x24(%rsp)
  call   <get_absolute_num@plt>
  mov    0x2c(%rsp),%r11d
  mov    0x28(%rsp),%r9d
  lea    D38(%rip),%r10
  mov    %eax,%ecx
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%r8d
  mov    %r10,%rsi
  mov    0x18(%rsp),%rdi
  mov    %r11d,(%rsp)
  lea    0x3(%rax),%edx
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  mov    %eax,0x2c(%rsp)
  call   <get_absolute_num@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  mov    %eax,0x28(%rsp)
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,0x24(%rsp)
  call   <get_absolute_num@plt>
  mov    0x2c(%rsp),%r11d
  mov    0x28(%rsp),%r9d
  lea    D38(%rip),%r10
  mov    %eax,%ecx
  mov    0x20(%rsp),%eax
  mov    0x24(%rsp),%r8d
  mov    %r10,%rsi
  mov    0x18(%rsp),%rdi
  mov    %r11d,(%rsp)
  lea    0x4(%rax),%edx
  call   <fprintf@plt>
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  mov    %eax,%r13d
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  mov    %eax,%r12d
  call   <get_absolute_num@plt>
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r14d,%edi
  mov    %eax,%ebx
  call   <get_absolute_num@plt>
  mov    0x18(%rsp),%rdi
  mov    %r12d,%r9d
  mov    %ebx,%r8d
  mov    %eax,%ecx
  mov    0x20(%rsp),%eax
  lea    D38(%rip),%r10
  mov    %r13d,(%rsp)
  mov    %r10,%rsi
  lea    0x5(%rax),%edx
  call   <fprintf@plt>
  xor    %eax,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: label: D38
type_infered: string

tool: D38: %d 4 3 0 1 0 %d %d %d %d


assistant: ```c
int write_tetrs(FILE *file, int num, int i, int j, int k) {
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num, get_absolute_num(i, j, k), get_absolute_num(i, j + 1, k + 1), get_absolute_num(i, j + 1, k), get_absolute_num(i + 1, j + 1, k));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 1, get_absolute_num(i, j, k + 1), get_absolute_num(i, j + 1, k + 1), get_absolute_num(i + 1, j + 1, k + 1), get_absolute_num(i, j, k));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 2, get_absolute_num(i, j + 1, k + 1), get_absolute_num(i, j, k), get_absolute_num(i + 1, j + 1, k + 1), get_absolute_num(i + 1, j + 1, k));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 3, get_absolute_num(i, j, k), get_absolute_num(i + 1, j, k), get_absolute_num(i + 1, j + 1, k), get_absolute_num(i + 1, j + 1, k + 1));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 4, get_absolute_num(i, j, k + 1), get_absolute_num(i + 1, j, k), get_absolute_num(i + 1, j + 1, k + 1), get_absolute_num(i, j, k));
  fprintf(file, "%d 4 3 0 1 0 %d %d %d %d\n", num + 5, get_absolute_num(i + 1, j, k + 1), get_absolute_num(i + 1, j + 1, k + 1), get_absolute_num(i, j, k + 1), get_absolute_num(i + 1, j, k));
  return 0;
}
```