user: Translate the below assembly code into C programming language:

```asm
<draw_line>:
  endbr64
  movslq %edx,%rax
  mov    %ecx,%edx
  mov    %r8d,%r11d
  push   %r12
  sub    %esi,%edx
  push   %rbp
  mov    %edx,%r10d
  push   %rbx
  neg    %r10d
  cmovs  %edx,%r10d
  sub    %eax,%r11d
  mov    %r11d,%edx
  neg    %edx
  cmovs  %r11d,%edx
  xor    %ebx,%ebx
  cmp    %ecx,%esi
  setle  %bl
  xor    %r11d,%r11d
  cmp    %r8d,%eax
  setle  %r11b
  lea    -0x1(%rbx,%rbx,1),%ebx
  lea    -0x1(%r11,%r11,1),%r11d
  cmp    %edx,%r10d
  jl     L92
  lea    (%rdx,%rdx,1),%ebp
  sub    %r10d,%edx
  mov    %ebp,%r8d
  lea    (%rdx,%rdx,1),%r12d
  sub    %r10d,%r8d
  cmp    $0x1,%ebx
  jne    L79
  movslq %esi,%rsi
  movslq %r10d,%r10
  lea    0x1(%rsi),%rcx
  add    %rcx,%r10
  jmp    L74
  nop
L131:
  add    %r11d,%eax
  add    %r12d,%r8d
  mov    %rcx,%rsi
  cmp    %rcx,%r10
  je     L147
L67:
  add    $0x1,%rcx
L74:
  mov    %r9d,%edx
  imul   %eax,%edx
  movslq %edx,%rdx
  add    %rsi,%rdx
  mov    $0xfff,%esi
  mov    %si,(%rdi,%rdx,2)
  test   %r8d,%r8d
  jg     L131
  add    %ebp,%r8d
  mov    %rcx,%rsi
  cmp    %rcx,%r10
  jne    L67
L147:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L92:
  lea    (%r10,%r10,1),%ebp
  sub    %edx,%r10d
  mov    %ebp,%r8d
  add    %r10d,%r10d
  sub    %edx,%r8d
  cmp    $0x1,%r9d
  jne    L178
  movslq %r11d,%r11
  add    $0x1,%edx
  xor    %r9d,%r9d
  jmp    L5
  nopl   0x0(%rax)
L176:
  add    %ebx,%esi
  add    %r10d,%r8d
L142:
  add    $0x1,%r9d
  add    %r11,%rax
  cmp    %r9d,%edx
  je     L147
L5:
  movslq %esi,%rcx
  mov    $0xfff,%r12d
  add    %rax,%rcx
  mov    %r12w,(%rdi,%rcx,2)
  test   %r8d,%r8d
  jg     L176
  add    %ebp,%r8d
  jmp    L142
  nopl   0x0(%rax)
L178:
  imul   %r9d,%r11d
  add    $0x1,%edx
  xor    %ecx,%ecx
  imul   %eax,%r9d
  movslq %r11d,%r11
  movslq %r9d,%r9
  jmp    L64
  nopl   (%rax)
L0:
  add    %ebx,%esi
  add    %r10d,%r8d
L160:
  add    $0x1,%ecx
  add    %r11,%r9
  cmp    %ecx,%edx
  je     L147
L64:
  movslq %esi,%rax
  mov    $0xfff,%r12d
  add    %r9,%rax
  mov    %r12w,(%rdi,%rax,2)
  test   %r8d,%r8d
  jg     L0
  add    %ebp,%r8d
  jmp    L160
  xchg   %ax,%ax
L79:
  movslq %ebx,%rbx
  movslq %esi,%rsi
  add    $0x1,%r10d
  xor    %ecx,%ecx
  jmp    L114
  xchg   %ax,%ax
L43:
  add    %r11d,%eax
  add    %r12d,%r8d
L73:
  add    $0x1,%ecx
  add    %rbx,%rsi
  cmp    %ecx,%r10d
  je     L147
L114:
  mov    %r9d,%edx
  imul   %eax,%edx
  movslq %edx,%rdx
  add    %rsi,%rdx
  movw   $0xfff,(%rdi,%rdx,2)
  test   %r8d,%r8d
  jg     L43
  add    %ebp,%r8d
  jmp    L73
```

assistant: ```c
void draw_line(short int *dst, int x1, int y1, int x2, int y2, int ncol) {
  int i, e, dx, dy, ix = 1, iy = 1;
  int x = x1, y = y1;
  dx = (((x2 - x1) > 0) ? ((x2 - x1)) : (-(x2 - x1)));
  dy = (((y2 - y1) > 0) ? ((y2 - y1)) : (-(y2 - y1)));
  if (x2 < x1)
    ix = -1;
  if (y2 < y1)
    iy = -1;
  if (dx >= dy) {
    e = 2 * dy - dx;
    for (i = 0; i <= dx; ++i) {
      *(dst + ncol * y + x) = 4096 - 1;
      if (e > 0) {
        y += iy;
        e += 2 * (dy - dx);
      } else
        e += 2 * dy;
      x += ix;
    }
  } else {
    e = 2 * dx - dy;
    for (i = 0; i <= dy; ++i) {
      *(dst + ncol * y + x) = 4096 - 1;
      if (e > 0) {
        x += ix;
        e += 2 * (dx - dy);
      } else
        e += 2 * dx;
      y += iy;
    }
  }
}
```