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

```asm
<render_line_3D_BLA>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  mov    %ecx,-0x44(%rbp)
  mov    %r8d,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  movss  %xmm0,-0x50(%rbp)
  mov    -0x44(%rbp),%eax
  imul   -0x40(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    0x18(%rbp),%eax
  sub    -0x48(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    0x20(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    0x28(%rbp),%eax
  sub    0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jns    L88
  movl   $0xffffffff,-0x18(%rbp)
  negl   -0x24(%rbp)
  jmp    L180
L88:
  movl   $0x1,-0x18(%rbp)
L180:
  cmpl   $0x0,-0x20(%rbp)
  jns    L66
  movl   $0xffffffff,-0x14(%rbp)
  negl   -0x20(%rbp)
  jmp    L227
L66:
  movl   $0x1,-0x14(%rbp)
L227:
  cmpl   $0x0,-0x1c(%rbp)
  jns    L158
  movl   $0xffffffff,-0x10(%rbp)
  negl   -0x1c(%rbp)
  jmp    L114
L158:
  movl   $0x1,-0x10(%rbp)
L114:
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    0x10(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L109
  mov    -0x24(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L109
  shll   -0x20(%rbp)
  shll   -0x1c(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  shll   -0x24(%rbp)
  jmp    L1
L228:
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x0,-0xc(%rbp)
  js     L42
  mov    -0x14(%rbp),%eax
  add    %eax,-0x2c(%rbp)
  mov    -0x24(%rbp),%eax
  sub    %eax,-0xc(%rbp)
L42:
  cmpl   $0x0,-0x8(%rbp)
  js     L5
  mov    -0x10(%rbp),%eax
  add    %eax,-0x28(%rbp)
  mov    -0x24(%rbp),%eax
  sub    %eax,-0x8(%rbp)
L5:
  mov    -0x20(%rbp),%eax
  add    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  add    %eax,-0x30(%rbp)
L1:
  mov    -0x30(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jne    L228
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  jmp    L46
L109:
  mov    -0x20(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L23
  mov    -0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L23
  shll   -0x24(%rbp)
  shll   -0x1c(%rbp)
  mov    -0x24(%rbp),%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    -0x20(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  shll   -0x20(%rbp)
  jmp    L70
L119:
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x0,-0xc(%rbp)
  js     L108
  mov    -0x18(%rbp),%eax
  add    %eax,-0x30(%rbp)
  mov    -0x20(%rbp),%eax
  sub    %eax,-0xc(%rbp)
L108:
  cmpl   $0x0,-0x8(%rbp)
  js     L73
  mov    -0x10(%rbp),%eax
  add    %eax,-0x28(%rbp)
  mov    -0x20(%rbp),%eax
  sub    %eax,-0x8(%rbp)
L73:
  mov    -0x24(%rbp),%eax
  add    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  add    %eax,-0x2c(%rbp)
L70:
  mov    -0x2c(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jne    L119
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  jmp    L46
L23:
  shll   -0x24(%rbp)
  shll   -0x20(%rbp)
  mov    -0x24(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  shll   -0x1c(%rbp)
  jmp    L104
L6:
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  cmpl   $0x0,-0xc(%rbp)
  js     L131
  mov    -0x18(%rbp),%eax
  add    %eax,-0x30(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    %eax,-0xc(%rbp)
L131:
  cmpl   $0x0,-0x8(%rbp)
  js     L34
  mov    -0x14(%rbp),%eax
  add    %eax,-0x2c(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    %eax,-0x8(%rbp)
L34:
  mov    -0x24(%rbp),%eax
  add    %eax,-0xc(%rbp)
  mov    -0x20(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  add    %eax,-0x28(%rbp)
L104:
  mov    -0x28(%rbp),%eax
  cmp    0x28(%rbp),%eax
  jne    L6
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  imul   -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  -0x50(%rbp),%xmm0
  movss  %xmm0,(%rax)
  nop
L46:
  nop
  pop    %rbp
  ret
```

assistant: ```c
void render_line_3D_BLA(float *mat, int wz, int wy, int wx, int x1, int y1, int z1, int x2, int y2, int z2, float val) {
  int x, y, z;
  int dx, dy, dz;
  int xinc, yinc, zinc;
  int balance1, balance2;
  int step = wx * wy;
  dx = x2 - x1;
  dy = y2 - y1;
  dz = z2 - z1;
  if (dx < 0) {
    xinc = -1;
    dx = -dx;
  } else {
    xinc = 1;
  }
  if (dy < 0) {
    yinc = -1;
    dy = -dy;
  } else {
    yinc = 1;
  }
  if (dz < 0) {
    zinc = -1;
    dz = -dz;
  } else {
    zinc = 1;
  }
  x = x1;
  y = y1;
  z = z1;
  if (dx >= dy && dx >= dz) {
    dy <<= 1;
    dz <<= 1;
    balance1 = dy - dx;
    balance2 = dz - dx;
    dx <<= 1;
    while (x != x2) {
      mat[z * step + y * wx + x] += val;
      if (balance1 >= 0) {
        y = y + yinc;
        balance1 = balance1 - dx;
      }
      if (balance2 >= 0) {
        z = z + zinc;
        balance2 = balance2 - dx;
      }
      balance1 = balance1 + dy;
      balance2 = balance2 + dz;
      x = x + xinc;
    }
    mat[z * step + y * wx + x] += val;
  } else {
    if (dy >= dx && dy >= dz) {
      dx <<= 1;
      dz <<= 1;
      balance1 = dx - dy;
      balance2 = dz - dy;
      dy <<= 1;
      while (y != y2) {
        mat[z * step + y * wx + x] += val;
        if (balance1 >= 0) {
          x = x + xinc;
          balance1 = balance1 - dy;
        }
        if (balance2 >= 0) {
          z = z + zinc;
          balance2 = balance2 - dy;
        }
        balance1 = balance1 + dx;
        balance2 = balance2 + dz;
        y = y + yinc;
      }
      mat[z * step + y * wx + x] += val;
    } else {
      dx <<= 1;
      dy <<= 1;
      balance1 = dx - dz;
      balance2 = dy - dz;
      dz <<= 1;
      while (z != z2) {
        mat[z * step + y * wx + x] += val;
        if (balance1 >= 0) {
          x = x + xinc;
          balance1 = balance1 - dz;
        }
        if (balance2 >= 0) {
          y = y + yinc;
          balance2 = balance2 - dz;
        }
        balance1 = balance1 + dx;
        balance2 = balance2 + dy;
        z = z + zinc;
      }
      mat[z * step + y * wx + x] += val;
    }
  }
}
```