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

```asm
<render_line_3D_BLA>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r10
  mov    %edx,%r11d
  mov    %ecx,%ebx
  mov    0x38(%rsp),%edx
  mov    0x40(%rsp),%ebp
  mov    0x48(%rsp),%r14d
  mov    0x50(%rsp),%r15d
  imul   %ecx,%r11d
  mov    %r14d,%ecx
  sub    %r9d,%ecx
  mov    %r15d,%eax
  sub    %edx,%eax
  movl   $0x1,-0xc(%rsp)
  mov    %ebp,%edi
  sub    %r8d,%edi
  js     L255
L62:
  mov    $0x1,%r12d
  test   %ecx,%ecx
  js     L43
L182:
  movl   $0x1,-0x8(%rsp)
  test   %eax,%eax
  js     L161
L149:
  cmp    %eax,%ecx
  mov    %eax,%esi
  cmovge %ecx,%esi
  cmp    %esi,%edi
  jl     L136
  lea    (%rcx,%rcx,1),%r14d
  lea    (%rax,%rax,1),%r15d
  mov    %r14d,%esi
  sub    %edi,%esi
  mov    %r15d,%ecx
  sub    %edi,%ecx
  add    %edi,%edi
  cmp    %r8d,%ebp
  jne    L151
L5:
  imul   %r11d,%edx
  imul   %ebx,%r9d
  lea    (%rdx,%r9,1),%eax
  add    %r8d,%eax
  cltq
  lea    (%r10,%rax,4),%rax
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
L119:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L255:
  mov    %r8d,%edi
  sub    %ebp,%edi
  movl   $0xffffffff,-0xc(%rsp)
  jmp    L62
L43:
  mov    %r9d,%ecx
  sub    %r14d,%ecx
  mov    $0xffffffff,%r12d
  jmp    L182
L161:
  mov    %edx,%eax
  sub    %r15d,%eax
  movl   $0xffffffff,-0x8(%rsp)
  jmp    L149
L263:
  add    -0x8(%rsp),%edx
  sub    %edi,%ecx
L131:
  add    %r14d,%esi
  add    %r15d,%ecx
  add    -0xc(%rsp),%r8d
  cmp    %r8d,%ebp
  je     L5
L151:
  mov    %r11d,%eax
  imul   %edx,%eax
  mov    %ebx,%r13d
  imul   %r9d,%r13d
  add    %r13d,%eax
  add    %r8d,%eax
  cltq
  lea    (%r10,%rax,4),%rax
  movaps %xmm0,%xmm1
  addss  (%rax),%xmm1
  movss  %xmm1,(%rax)
  test   %esi,%esi
  js     L200
  add    %r12d,%r9d
  sub    %edi,%esi
L200:
  test   %ecx,%ecx
  jns    L263
  jmp    L131
L136:
  cmp    %eax,%edi
  mov    %eax,%esi
  cmovge %edi,%esi
  cmp    %esi,%ecx
  jl     L168
  add    %edi,%edi
  add    %eax,%eax
  mov    %edi,%ebp
  sub    %ecx,%ebp
  mov    %eax,%r13d
  sub    %ecx,%r13d
  add    %ecx,%ecx
  cmp    %r9d,%r14d
  je     L152
  mov    %r12d,%esi
  imul   %ebx,%esi
  mov    %esi,-0x4(%rsp)
  mov    %ebx,%r15d
  imul   %r9d,%r15d
  jmp    L37
L49:
  add    %edi,%ebp
  add    %eax,%r13d
  add    %r12d,%r9d
  add    -0x4(%rsp),%r15d
  cmp    %r9d,%r14d
  je     L152
L37:
  mov    %r11d,%esi
  imul   %edx,%esi
  add    %r15d,%esi
  add    %r8d,%esi
  movslq %esi,%rsi
  lea    (%r10,%rsi,4),%rsi
  movaps %xmm0,%xmm1
  addss  (%rsi),%xmm1
  movss  %xmm1,(%rsi)
  test   %ebp,%ebp
  js     L15
  add    -0xc(%rsp),%r8d
  sub    %ecx,%ebp
L15:
  test   %r13d,%r13d
  js     L49
  add    -0x8(%rsp),%edx
  sub    %ecx,%r13d
  jmp    L49
L152:
  imul   %r11d,%edx
  imul   %ebx,%r9d
  lea    (%rdx,%r9,1),%eax
  add    %r8d,%eax
  cltq
  lea    (%r10,%rax,4),%rax
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  jmp    L119
L168:
  add    %edi,%edi
  add    %ecx,%ecx
  mov    %edi,%ebp
  sub    %eax,%ebp
  mov    %ecx,%r13d
  sub    %eax,%r13d
  add    %eax,%eax
  cmp    %edx,%r15d
  je     L253
  mov    -0x8(%rsp),%esi
  imul   %r11d,%esi
  mov    %esi,-0x4(%rsp)
  mov    %r11d,%r14d
  imul   %edx,%r14d
  jmp    L88
L125:
  add    %edi,%ebp
  add    %ecx,%r13d
  add    -0x8(%rsp),%edx
  add    -0x4(%rsp),%r14d
  cmp    %edx,%r15d
  je     L253
L88:
  mov    %ebx,%esi
  imul   %r9d,%esi
  add    %r14d,%esi
  add    %r8d,%esi
  movslq %esi,%rsi
  lea    (%r10,%rsi,4),%rsi
  movaps %xmm0,%xmm1
  addss  (%rsi),%xmm1
  movss  %xmm1,(%rsi)
  test   %ebp,%ebp
  js     L41
  add    -0xc(%rsp),%r8d
  sub    %eax,%ebp
L41:
  test   %r13d,%r13d
  js     L125
  add    %r12d,%r9d
  sub    %eax,%r13d
  jmp    L125
L253:
  imul   %edx,%r11d
  imul   %r9d,%ebx
  lea    (%r11,%rbx,1),%eax
  add    %r8d,%eax
  cltq
  lea    (%r10,%rax,4),%rax
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  jmp    L119
```

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;
    }
  }
}
```