user: Please show me the C implementation that matches the assembly code listed below:

```asm
<line>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %r8d,(%rsp)
  mov    %rdx,%rdi
  sub    %r13,%rdi
  call   <abs@plt>
  mov    %eax,%r15d
  mov    %eax,0x4(%rsp)
  mov    %rbp,%rdi
  sub    %r14,%rdi
  call   <abs@plt>
  mov    %eax,0x8(%rsp)
  add    %eax,%r15d
  cmp    %r13,%rbx
  mov    $0x2,%ebx
  je     L30
  jb     L164
  cmp    %r14,%rbp
  sbb    %ebx,%ebx
  and    $0x3,%ebx
  add    $0x1,%ebx
L30:
  test   %r15d,%r15d
  jle    L125
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  jmp    L210
L164:
  cmp    %r14,%rbp
  sbb    %ebx,%ebx
  and    $0x2,%ebx
  add    $0x2,%ebx
  jmp    L30
L31:
  lea    0x1(%r13),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  sub    0x8(%rsp),%r12d
  mov    0xc(%rsp),%r13d
L86:
  add    $0x1,%ebp
  cmp    %ebp,%r15d
  je     L125
L210:
  test   %r12d,%r12d
  js     L16
  cmp    $0x3,%ebx
  je     L216
  jg     L10
  cmp    $0x1,%ebx
  je     L31
  cmp    $0x2,%ebx
  jne    L86
  lea    0x1(%r14),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  sub    0x4(%rsp),%r12d
  mov    0xc(%rsp),%r14d
  jmp    L86
L216:
  lea    -0x1(%r13),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  sub    0x8(%rsp),%r12d
  mov    0xc(%rsp),%r13d
  jmp    L86
L10:
  lea    -0x1(%r14),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  sub    0x4(%rsp),%r12d
  mov    0xc(%rsp),%r14d
  jmp    L86
L16:
  cmp    $0x3,%ebx
  je     L162
  jg     L3
  cmp    $0x1,%ebx
  je     L150
  cmp    $0x2,%ebx
  jne    L86
  lea    -0x1(%r13),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  add    0x8(%rsp),%r12d
  mov    0xc(%rsp),%r13d
  jmp    L86
L150:
  lea    0x1(%r14),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  add    0x4(%rsp),%r12d
  mov    0xc(%rsp),%r14d
  jmp    L86
L162:
  lea    -0x1(%r14),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  add    0x4(%rsp),%r12d
  mov    0xc(%rsp),%r14d
  jmp    L86
L3:
  lea    0x1(%r13),%eax
  mov    %eax,0xc(%rsp)
  mov    (%rsp),%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <putpixel@plt>
  add    0x8(%rsp),%r12d
  mov    0xc(%rsp),%r13d
  jmp    L86
L125:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void line(unsigned long x0, unsigned long y0, unsigned long x1, unsigned long y1, unsigned int color) {
  int dx, dy, n, k, i, f;
  int x, y;
  dx = abs(x1 - x0);
  dy = abs(y1 - y0);
  n = dx + dy;
  if (x1 == x0) {
    k = 2;
    x = x0;
    y = y0;
  } else if (x1 >= x0) {
    k = y1 >= y0 ? 1 : 4;
    x = x0;
    y = y0;
  } else {
    k = y1 >= y0 ? 2 : 4;
    x = x0;
    y = y0;
  }
  for (i = 0, f = 0; i < n; i++)
    if (f >= 0)
      switch (k) {
      case 1:
        putpixel(x++, y, color);
        f -= dy;
        break;
      case 2:
        putpixel(x, y++, color);
        f -= dx;
        break;
      case 3:
        putpixel(x--, y, color);
        f -= dy;
        break;
      case 4:
        putpixel(x, y--, color);
        f -= dx;
        break;
      }
    else
      switch (k) {
      case 1:
        putpixel(x, y++, color);
        f += dx;
        break;
      case 2:
        putpixel(x--, y, color);
        f += dy;
        break;
      case 3:
        putpixel(x, y--, color);
        f += dx;
        break;
      case 4:
        putpixel(x++, y, color);
        f += dy;
        break;
      }
}
```