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

```asm
<p3dWriteRaw32f>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %r9,-0x48(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  je     L33
  mov    $0x0,%eax
  call   <p3dResetStartTime@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x48(%rbp),%rdx
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   *%rdx
L33:
  mov    -0x30(%rbp),%rax
  lea    D38(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L18
  mov    -0x30(%rbp),%rax
  mov    -0x48(%rbp),%rdx
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   *%rdx
  mov    $0x1,%eax
  jmp    L6
L18:
  mov    -0x34(%rbp),%eax
  imul   -0x38(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x34(%rbp),%edx
  imul   -0x38(%rbp),%edx
  imul   -0x3c(%rbp),%edx
  cmp    %edx,%eax
  jge    L25
  mov    -0x30(%rbp),%rax
  mov    -0x48(%rbp),%rdx
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   *%rdx
  mov    $0x1,%eax
  jmp    L6
L25:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  cmpq   $0x0,-0x48(%rbp)
  je     L0
  mov    $0x0,%eax
  call   <p3dGetElapsedTime_sec@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <p3dGetElapsedTime_min@plt>
  mov    -0x48(%rbp),%rcx
  mov    %ebx,%edx
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   *%rcx
L0:
  mov    $0x2,%eax
L6:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D5
type_guessed: string
name: extract_symbolic_data
arguments: tag: D38
type_guessed: string
name: extract_symbolic_data
arguments: tag: D25
type_guessed: string
name: extract_symbolic_data
arguments: tag: D18
type_guessed: string
name: extract_symbolic_data
arguments: tag: D12
type_guessed: string

tool: D5: Pore3D - Writing float 32-bit RAW file %s ...

tool: D38: wb

tool: D25: Pore3D - IO error: cannot open output file %s. Program will exit.

tool: D18: Pore3D - IO error: error on writing file %s. Program will exit.

tool: D12: Pore3D - RAW file written successfully in %dm%0.3fs.

assistant: ```c
int p3dWriteRaw32f(float *in_im, char *filename, const int dimx, const int dimy, const int dimz, int (*wr_log)(const char *, ...), int (*wr_progress)(const int, ...)) {
  FILE *fvol;
  if (wr_log != NULL) {
    p3dResetStartTime();
    wr_log("Pore3D - Writing float 32-bit RAW file %s ...", filename);
  }
  if ((fvol = fopen(filename, "wb")) == NULL) {
    wr_log("Pore3D - IO error: cannot open output file %s. Program will exit.", filename);
    return 1;
  }
  if (fwrite(in_im, sizeof(float), dimx * dimy * dimz, fvol) < (dimx * dimy * dimz)) {
    wr_log("Pore3D - IO error: error on writing file %s. Program will exit.", filename);
    return 1;
  }
  fclose(fvol);
  if (wr_log != NULL) {
    wr_log("Pore3D - RAW file written successfully in %dm%0.3fs.", p3dGetElapsedTime_min(), p3dGetElapsedTime_sec());
  }
  return 2;
}
```