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

```asm
<draw_line>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %ecx,-0x50(%rbp)
  mov    %r8d,-0x54(%rbp)
  mov    -0x4c(%rbp),%eax
  sub    -0x44(%rbp),%eax
  test   %eax,%eax
  jns    L91
  mov    -0x44(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L42
L91:
  mov    -0x4c(%rbp),%eax
  sub    -0x44(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L42:
  mov    -0x50(%rbp),%eax
  sub    -0x48(%rbp),%eax
  test   %eax,%eax
  jns    L3
  mov    -0x48(%rbp),%eax
  sub    -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L5
L3:
  mov    -0x50(%rbp),%eax
  sub    -0x48(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
L5:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L10
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  add    %eax,%eax
  sub    -0x30(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x2c(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    -0x30(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x1,-0x14(%rbp)
  movl   $0x1,-0x10(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x1,-0x4(%rbp)
  jmp    L63
L10:
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  add    %eax,%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x30(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x1,-0x10(%rbp)
  movl   $0x1,-0x8(%rbp)
  movl   $0x1,-0x4(%rbp)
L63:
  mov    -0x44(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L2
  negl   -0x14(%rbp)
  negl   -0x10(%rbp)
L2:
  mov    -0x48(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jle    L96
  negl   -0x8(%rbp)
  negl   -0x4(%rbp)
L96:
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x48(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x1,-0x34(%rbp)
  jmp    L97
L98:
  mov    -0x54(%rbp),%edx
  mov    -0xc(%rbp),%ecx
  mov    -0x18(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <draw_pixel@plt>
  cmpl   $0x0,-0x24(%rbp)
  jns    L41
  mov    -0x20(%rbp),%eax
  add    %eax,-0x24(%rbp)
  mov    -0x14(%rbp),%eax
  add    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%eax
  add    %eax,-0xc(%rbp)
  jmp    L114
L41:
  mov    -0x1c(%rbp),%eax
  add    %eax,-0x24(%rbp)
  mov    -0x10(%rbp),%eax
  add    %eax,-0x18(%rbp)
  mov    -0x4(%rbp),%eax
  add    %eax,-0xc(%rbp)
L114:
  addl   $0x1,-0x34(%rbp)
L97:
  mov    -0x34(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L98
  nop
  nop
  leave
  ret
```

assistant: ```c
void draw_line(int x1, int y1, int x2, int y2, int nColor) {
  int i, deltax, deltay, numpixels, d, dinc1, dinc2, x, xinc1, xinc2, y, yinc1, yinc2;
  if (x2 - x1 < 0) {
    deltax = x1 - x2;
  } else {
    deltax = x2 - x1;
  }
  if (y2 - y1 < 0) {
    deltay = y1 - y2;
  } else {
    deltay = y2 - y1;
  }
  if (deltax >= deltay) {
    numpixels = deltax + 1;
    d = (2 * deltay) - deltax;
    dinc1 = deltay << 1;
    dinc2 = (deltay - deltax) << 1;
    xinc1 = 1;
    xinc2 = 1;
    yinc1 = 0;
    yinc2 = 1;
  } else {
    numpixels = deltay + 1;
    d = (2 * deltax) - deltay;
    dinc1 = deltax << 1;
    dinc2 = (deltax - deltay) << 1;
    xinc1 = 0;
    xinc2 = 1;
    yinc1 = 1;
    yinc2 = 1;
  }
  if (x1 > x2) {
    xinc1 = -xinc1;
    xinc2 = -xinc2;
  }
  if (y1 > y2) {
    yinc1 = -yinc1;
    yinc2 = -yinc2;
  }
  x = x1;
  y = y1;
  for (i = 1; i < numpixels; i++) {
    draw_pixel(x, y, nColor);
    if (d < 0) {
      d = d + dinc1;
      x = x + xinc1;
      y = y + yinc1;
    } else {
      d = d + dinc2;
      x = x + xinc2;
      y = y + yinc2;
    }
  }
}
```