user: 请将以下的汇编代码转换成C语言代码：

```asm
<line>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %edi,%ebp
  mov    %esi,%ebx
  mov    %edx,%r13d
  mov    %ecx,%r12d
  cmp    %edx,%edi
  jle    L74
  mov    %ecx,%ebx
  mov    %esi,%r12d
  mov    %edx,%ebp
  mov    %edi,%r13d
L74:
  mov    %r13d,%ecx
  sub    %ebp,%ecx
  jne    L238
  cmp    %r12d,%ebx
  jle    L229
  mov    %ebx,%eax
  mov    %r12d,%ebx
  mov    %eax,%r12d
L229:
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <pixel_on@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jge    L229
L109:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L238:
  mov    %r12d,%eax
  sub    %ebx,%eax
  jne    L18
  cmp    %r13d,%ebp
  jge    L109
L213:
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <pixel_on@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r13d
  jne    L213
  jmp    L109
L18:
  test   %eax,%eax
  setg   %dl
  cmp    %eax,%ecx
  jle    L103
  test   %dl,%dl
  jne    L49
L103:
  cmp    %eax,%ecx
  jne    L196
  test   %dl,%dl
  jne    L39
L196:
  test   %ecx,%ecx
  mov    $0x0,%edx
  cmovns %ecx,%edx
  cmp    %eax,%edx
  jl     L123
  mov    %ebx,%edx
  sub    %r12d,%edx
  mov    %eax,%esi
  shr    $0x1f,%esi
  cmp    %ecx,%edx
  jge    L186
  test   %sil,%sil
  jne    L232
L186:
  mov    %ebp,%edi
  sub    %r13d,%edi
  cmp    %eax,%edi
  jne    L164
  test   %sil,%sil
  jne    L46
L164:
  cmp    %ecx,%edx
  jle    L109
  test   %sil,%sil
  je     L109
  mov    %edi,%edx
  neg    %edx
  add    %edx,%edx
  mov    %edx,%r9d
  neg    %r9d
  push   %rdx
  mov    %eax,%edx
  sub    %edi,%edx
  add    %edx,%edx
  push   %rdx
  sub    %eax,%r9d
  mov    $0xffffffff,%r8d
  mov    %ebx,%ecx
  mov    %ebp,%edx
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <drawliney@plt>
  add    $0x10,%rsp
  jmp    L109
L49:
  lea    (%rax,%rax,1),%r9d
  push   %r9
  sub    %ecx,%eax
  add    %eax,%eax
  push   %rax
  sub    %ecx,%r9d
  mov    $0x1,%r8d
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <drawlinex@plt>
  add    $0x10,%rsp
  jmp    L109
L39:
  lea    (%rax,%rax,1),%r9d
  push   %r9
  sub    %ecx,%eax
  add    %eax,%eax
  push   %rax
  sub    %ecx,%r9d
  mov    $0x1,%r8d
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <drawlinex@plt>
  add    $0x10,%rsp
  jmp    L109
L123:
  lea    (%rcx,%rcx,1),%r9d
  push   %r9
  sub    %eax,%ecx
  lea    (%rcx,%rcx,1),%edx
  push   %rdx
  sub    %eax,%r9d
  mov    $0x1,%r8d
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <drawliney@plt>
  add    $0x10,%rsp
  jmp    L109
L232:
  lea    (%rdx,%rdx,1),%r9d
  push   %r9
  sub    %ecx,%edx
  lea    (%rdx,%rdx,1),%eax
  push   %rax
  sub    %ecx,%r9d
  mov    $0xffffffff,%r8d
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <drawlinex@plt>
  add    $0x10,%rsp
  jmp    L109
L46:
  lea    (%rdx,%rdx,1),%r9d
  push   %r9
  mov    %edx,%eax
  sub    %ecx,%eax
  add    %eax,%eax
  push   %rax
  sub    %ecx,%r9d
  mov    $0xffffffff,%r8d
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <drawlinex@plt>
  add    $0x10,%rsp
  jmp    L109
```

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