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    $0x38,%rsp
  mov    %edi,%ebx
  mov    %esi,%ebp
  mov    %ecx,%r15d
  mov    %r8d,%r13d
  mov    %r9d,%r14d
  mov    %edi,%eax
  sub    %edx,%eax
  mov    %eax,0x10(%rsp)
  mov    %esi,%ecx
  sub    %r15d,%ecx
  mov    %ecx,0x4(%rsp)
  or     %ecx,%eax
  je     L10
  mov    %edx,%r12d
  cmpl   $0x0,0x10(%rsp)
  je     L228
  cmpl   $0x0,0x4(%rsp)
  jne    L336
  cmpl   $0x0,0x10(%rsp)
  js     L98
  mov    0x70(%rsp),%r15d
  cmp    %edx,%edi
  jl     L250
L376:
  mov    %r15d,%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <dot1@plt>
  add    $0x1,%r12d
  cmp    %r12d,%ebx
  jge    L376
  jmp    L250
L10:
  mov    0x70(%rsp),%r8d
  mov    %r9d,%ecx
  mov    %r13d,%edx
  call   <dot1@plt>
L250:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L228:
  cmpl   $0x0,0x4(%rsp)
  js     L337
  mov    0x70(%rsp),%r12d
  cmp    %r15d,%esi
  jl     L250
L249:
  mov    %r12d,%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  add    $0x1,%r15d
  cmp    %r15d,%ebp
  jge    L249
  jmp    L250
L337:
  cmp    %r15d,%esi
  jg     L250
  mov    0x70(%rsp),%r12d
L306:
  mov    %r12d,%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r15d
  jge    L306
  jmp    L250
L98:
  cmp    %edx,%edi
  jg     L250
  mov    0x70(%rsp),%r15d
L319:
  mov    %r15d,%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jge    L319
  jmp    L250
L336:
  mov    %esi,%edi
  call   <abs@plt>
  cmp    $0x3e8,%rax
  jg     L250
  mov    %r15d,%edi
  call   <abs@plt>
  cmp    $0x3e8,%rax
  jg     L250
  movl   $0xffffffff,0x18(%rsp)
  cmpl   $0x0,0x10(%rsp)
  js     L24
L355:
  movl   $0xffffffff,0x14(%rsp)
  cmpl   $0x0,0x4(%rsp)
  js     L339
L316:
  mov    0x10(%rsp),%edi
  call   <abs@plt>
  mov    %rax,0x8(%rsp)
  mov    0x4(%rsp),%edi
  call   <abs@plt>
  cmp    %rax,0x8(%rsp)
  jge    L328
  mov    0x4(%rsp),%esi
  mov    %esi,%edx
  shr    $0x1f,%edx
  lea    (%rsi,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  mov    $0x2,%edx
  cmove  %eax,%edx
  mov    %edx,0x24(%rsp)
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %r15d,%esi
  mov    %r12d,%edi
  call   <dot1@plt>
  mov    0x10(%rsp),%eax
  lea    (%rax,%rax,1),%edi
  mov    %edi,0x20(%rsp)
  mov    0x4(%rsp),%esi
  sub    %esi,%edi
  mov    0x24(%rsp),%edx
  cmp    %edx,%esi
  jle    L127
  mov    %esi,0x28(%rsp)
  sub    %esi,%eax
  add    %eax,%eax
  mov    %eax,0x1c(%rsp)
  mov    %ebp,%eax
  mov    %ebp,0x2c(%rsp)
  mov    %edx,%ebp
  mov    %r13d,0x10(%rsp)
  mov    %eax,%r13d
  mov    %r14d,0x8(%rsp)
  mov    %r15d,%r14d
  mov    %edi,%r15d
  jmp    L232
L24:
  mov    %r12d,%eax
  sub    %ebx,%eax
  mov    %eax,0x10(%rsp)
  movl   $0x1,0x18(%rsp)
  jmp    L355
L339:
  mov    %r15d,%eax
  sub    %ebp,%eax
  mov    %eax,0x4(%rsp)
  movl   $0x1,0x14(%rsp)
  jmp    L316
L328:
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %r15d,%esi
  mov    %r12d,%edi
  call   <dot1@plt>
  mov    0x4(%rsp),%eax
  lea    (%rax,%rax,1),%edi
  mov    %edi,0x20(%rsp)
  mov    0x10(%rsp),%esi
  sub    %esi,%edi
  cmp    $0x2,%esi
  jle    L334
  mov    %esi,0x24(%rsp)
  sub    %esi,%eax
  add    %eax,%eax
  mov    %eax,0x1c(%rsp)
  mov    $0x2,%eax
  mov    %ebx,0x28(%rsp)
  mov    %r13d,0x4(%rsp)
  mov    %eax,%r13d
  mov    %r14d,0x8(%rsp)
  mov    %edi,%r14d
  jmp    L214
L271:
  add    0x20(%rsp),%r14d
L143:
  mov    0x18(%rsp),%eax
  add    %eax,%ebx
  sub    %eax,%r12d
  mov    0x70(%rsp),%r8d
  mov    0x8(%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  mov    0x70(%rsp),%r8d
  mov    0x8(%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    %r15d,%esi
  mov    %r12d,%edi
  call   <dot1@plt>
  add    $0x2,%r13d
  cmp    %r13d,0x10(%rsp)
  jle    L326
L214:
  test   %r14d,%r14d
  js     L271
  mov    0x14(%rsp),%eax
  add    %eax,%ebp
  sub    %eax,%r15d
  add    0x1c(%rsp),%r14d
  jmp    L143
L326:
  mov    %r14d,%edi
  mov    0x28(%rsp),%ebx
  mov    0x4(%rsp),%r13d
  mov    0x8(%rsp),%r14d
  mov    0x18(%rsp),%edx
  add    %edx,%ebx
  mov    0x24(%rsp),%eax
  sub    $0x3,%eax
  shr    %eax
  imul   %edx,%eax
  add    %eax,%ebx
L334:
  testb  $0x1,0x10(%rsp)
  jne    L250
  mov    0x14(%rsp),%eax
  add    %ebp,%eax
  test   %edi,%edi
  cmovns %eax,%ebp
  mov    0x18(%rsp),%edi
  add    %ebx,%edi
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  call   <dot1@plt>
  jmp    L250
L211:
  add    0x20(%rsp),%r15d
L342:
  mov    0x14(%rsp),%eax
  add    %eax,%r13d
  sub    %eax,%r14d
  mov    0x70(%rsp),%r8d
  mov    0x8(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <dot1@plt>
  mov    0x70(%rsp),%r8d
  mov    0x8(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %r14d,%esi
  mov    %r12d,%edi
  call   <dot1@plt>
  add    $0x2,%ebp
  cmp    %ebp,0x4(%rsp)
  jle    L264
L232:
  test   %r15d,%r15d
  js     L211
  mov    0x18(%rsp),%eax
  add    %eax,%ebx
  sub    %eax,%r12d
  add    0x1c(%rsp),%r15d
  jmp    L342
L264:
  mov    %r15d,%edi
  mov    0x2c(%rsp),%ebp
  mov    0x10(%rsp),%r13d
  mov    0x8(%rsp),%r14d
  mov    0x14(%rsp),%edx
  add    %edx,%ebp
  mov    0x28(%rsp),%eax
  sub    $0x1,%eax
  sub    0x24(%rsp),%eax
  shr    %eax
  imul   %edx,%eax
  add    %eax,%ebp
L127:
  testb  $0x1,0x4(%rsp)
  jne    L250
  mov    0x18(%rsp),%eax
  add    %ebx,%eax
  test   %edi,%edi
  cmovns %eax,%ebx
  mov    0x14(%rsp),%esi
  add    %ebp,%esi
  mov    0x70(%rsp),%r8d
  mov    %r14d,%ecx
  mov    %r13d,%edx
  mov    %ebx,%edi
  call   <dot1@plt>
  jmp    L250
```

assistant: ```c
void line(int x1, int y1, int x2, int y2, int r, int g, int b) {
  int dx, dy, p, s, st, n;
  dx = x1 - x2;
  dy = y1 - y2;
  if ((dx == 0) && (dy == 0)) {
    dot1(x1, y1, r, g, b);
    return;
  }
  if (dx == 0) {
    if (dy < 0) {
      for (p = y1; p <= y2; p++)
        dot1(x1, p, r, g, b);
    } else {
      for (p = y2; p <= y1; p++)
        dot1(x1, p, r, g, b);
    }
    return;
  }
  if (dy == 0) {
    if (dx < 0) {
      for (p = x1; p <= x2; p++)
        dot1(p, y1, r, g, b);
    } else {
      for (p = x2; p <= x1; p++)
        dot1(p, y1, r, g, b);
    }
    return;
  }
  if (abs(y1) > 1000)
    return;
  if (abs(y2) > 1000)
    return;
  if (dx < 0) {
    s = 1;
    dx = -dx;
  } else
    s = -1;
  if (dy < 0) {
    st = 1;
    dy = -dy;
  } else
    st = -1;
  if (abs(dx) >= abs(dy)) {
    if (dx % 2 == 1)
      n = 1;
    else
      n = 2;
    dot1(x1, y1, r, g, b);
    dot1(x2, y2, r, g, b);
    n = 2;
    p = 2 * dy - dx;
    while (n < dx) {
      if (p >= 0) {
        y1 = y1 + st;
        y2 = y2 - st;
        p = p + 2 * (dy - dx);
      } else
        p = p + 2 * dy;
      x1 = x1 + s;
      x2 = x2 - s;
      dot1(x1, y1, r, g, b);
      dot1(x2, y2, r, g, b);
      n = n + 2;
    }
    if (dx % 2 == 0) {
      if (p >= 0)
        y1 = y1 + st;
      x1 = x1 + s;
      dot1(x1, y1, r, g, b);
    }
  } else {
    if (dy % 2 == 1)
      n = 1;
    else
      n = 2;
    dot1(x1, y1, r, g, b);
    dot1(x2, y2, r, g, b);
    p = 2 * dx - dy;
    while (n < dy) {
      if (p >= 0) {
        x1 = x1 + s;
        x2 = x2 - s;
        p = p + 2 * (dx - dy);
      } else
        p = p + 2 * dx;
      y1 = y1 + st;
      y2 = y2 - st;
      dot1(x1, y1, r, g, b);
      dot1(x2, y2, r, g, b);
      n = n + 2;
    }
    if (dy % 2 == 0) {
      if (p >= 0)
        x1 = x1 + s;
      y1 = y1 + st;
      dot1(x1, y1, r, g, b);
    }
  }
}
```