user: 请从给定的汇编指令推导出C源代码:

```asm
<line>:
  endbr64
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %esi,%ebp
  sub    $0x8,%rsp
  cmp    %edx,%edi
  jle    L29
  mov    %ecx,%ebp
  mov    %esi,%r13d
  mov    %edx,%r12d
  mov    %edi,%r14d
L29:
  mov    %r14d,%ecx
  sub    %r12d,%ecx
  jne    L98
  cmp    %r13d,%ebp
  jle    L67
  mov    %ebp,%eax
  mov    %r13d,%ebp
  mov    %eax,%r13d
  xchg   %ax,%ax
L67:
  mov    %ebp,%esi
  mov    %r12d,%edi
  add    $0x1,%ebp
  call   <pixel_on@plt>
  cmp    %ebp,%r13d
  jge    L67
L210:
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  xchg   %ax,%ax
L98:
  mov    %r13d,%eax
  sub    %ebp,%eax
  test   %eax,%eax
  jne    L171
  cmp    %r14d,%r12d
  jge    L210
  xchg   %ax,%ax
L142:
  mov    %r12d,%edi
  mov    %ebp,%esi
  add    $0x1,%r12d
  call   <pixel_on@plt>
  cmp    %r12d,%r14d
  jne    L142
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nop
L171:
  setg   %dl
  cmp    %eax,%ecx
  jle    L81
  test   %dl,%dl
  je     L81
L160:
  lea    (%rax,%rax,1),%r9d
  sub    %ecx,%eax
  mov    $0x1,%r8d
  add    %eax,%eax
  push   %r9
  sub    %ecx,%r9d
  push   %rax
L180:
  mov    %r13d,%ecx
  mov    %ebp,%esi
  mov    %r14d,%edx
  mov    %r12d,%edi
  call   <drawlinex@plt>
  pop    %rcx
  pop    %rsi
  add    $0x8,%rsp
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L81:
  cmp    %eax,%ecx
  jne    L56
  test   %dl,%dl
  jne    L160
L56:
  xor    %edx,%edx
  test   %ecx,%ecx
  cmovns %ecx,%edx
  cmp    %eax,%edx
  jl     L86
  mov    %ebp,%edx
  mov    %eax,%esi
  sub    %r13d,%edx
  shr    $0x1f,%esi
  cmp    %ecx,%edx
  jge    L41
  test   %sil,%sil
  je     L41
  lea    (%rdx,%rdx,1),%r9d
  sub    %ecx,%edx
  push   %r9
  lea    (%rdx,%rdx,1),%eax
L73:
  push   %rax
  sub    %ecx,%r9d
  mov    $0xffffffff,%r8d
  jmp    L180
  nopl   0x0(%rax)
L41:
  mov    %r12d,%edi
  sub    %r14d,%edi
  cmp    %eax,%edi
  jne    L92
  test   %sil,%sil
  je     L92
  mov    %edx,%eax
  lea    (%rdx,%rdx,1),%r9d
  sub    %ecx,%eax
  push   %r9
  add    %eax,%eax
  jmp    L73
  nopl   (%rax)
L92:
  cmp    %ecx,%edx
  jle    L210
  test   %sil,%sil
  je     L210
  mov    %edi,%edx
  mov    $0xffffffff,%r8d
  mov    %ebp,%ecx
  mov    %r13d,%esi
  neg    %edx
  add    %edx,%edx
  push   %rdx
  mov    %edx,%r9d
  mov    %eax,%edx
  sub    %edi,%edx
  neg    %r9d
  mov    %r14d,%edi
  add    %edx,%edx
  sub    %eax,%r9d
  push   %rdx
  mov    %r12d,%edx
  call   <drawliney@plt>
  pop    %rax
  pop    %rdx
  jmp    L210
L86:
  lea    (%rcx,%rcx,1),%r9d
  sub    %eax,%ecx
  mov    $0x1,%r8d
  mov    %r12d,%edi
  lea    (%rcx,%rcx,1),%edx
  push   %r9
  mov    %r13d,%ecx
  sub    %eax,%r9d
  push   %rdx
  mov    %ebp,%esi
  mov    %r14d,%edx
  call   <drawliney@plt>
  pop    %rdi
  pop    %r8
  jmp    L210
```

assistant: ```c
void line(int x1, int y1, int x2, int y2) {
  int dx, dy, e, e_inc, e_noinc;
  int incdec, t, i;
  if (x1 > x2) {
    t = x1;
    x1 = x2;
    x2 = t;
    t = y1;
    y1 = y2;
    y2 = t;
  }
  dx = x2 - x1;
  dy = y2 - y1;
  if (dx == 0) {
    if (y1 > y2) {
      t = y1;
      y1 = y2;
      y2 = t;
    }
    for (i = y1; i <= y2; i++)
      pixel_on(x1, i);
  } else if (dy == 0) {
    for (i = x1; i < x2; i++)
      pixel_on(i, y1);
  } else if (dy < dx && dy > 0) {
    e_noinc = 2 * dy;
    e = 2 * dy - dx;
    e_inc = 2 * (dy - dx);
    drawlinex(x1, y1, x2, y2, 1, e, e_inc, e_noinc);
  } else if (dy == dx && dy > 0) {
    e_noinc = 2 * dy;
    e = 2 * dy - dx;
    e_inc = 2 * (dy - dx);
    drawlinex(x1, y1, x2, y2, 1, e, e_inc, e_noinc);
  } else if (dy > dx && dy > 0) {
    e_noinc = 2 * dx;
    e = 2 * dx - dy;
    e_inc = 2 * (dx - dy);
    drawliney(x1, y1, x2, y2, 1, e, e_inc, e_noinc);
  } else if (-dy < dx && dy < 0) {
    dy = -dy;
    e_noinc = 2 * dy;
    e = 2 * dy - dx;
    e_inc = 2 * (dy - dx);
    drawlinex(x1, y1, x2, y2, -1, e, e_inc, e_noinc);
  } else if (dy == -dx && dy < 0) {
    dy = -dy;
    e_noinc = (2 * dy);
    e = 2 * dy - dx;
    e_inc = 2 * (dy - dx);
    drawlinex(x1, y1, x2, y2, -1, e, e_inc, e_noinc);
  } else if (-dy > dx && dy < 0) {
    dx = -dx;
    e_noinc = -2 * dx;
    e = 2 * dx - dy;
    e_inc = -2 * (dx - dy);
    drawliney(x2, y2, x1, y1, -1, e, e_inc, e_noinc);
  }
}
```