user: What is the c source code of the assembly code below?

```asm
<drawline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8d,-0x28(%rbp)
  mov    %r9d,-0x2c(%rbp)
  mov    -0x24(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  sub    0x10(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x8(%rbp)
  jne    L143
  cmpl   $0x0,-0x4(%rbp)
  jne    L143
  movl   $0x0,-0x8(%rbp)
  jmp    L82
L10:
  mov    -0x28(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  imul   -0x20(%rbp),%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0xff,(%rax)
  addl   $0x1,-0x8(%rbp)
L82:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L10
  jmp    L181
L143:
  cmpl   $0x0,-0x8(%rbp)
  jns    L191
  negl   -0x8(%rbp)
L191:
  cmpl   $0x0,-0x4(%rbp)
  jns    L60
  negl   -0x4(%rbp)
L60:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jge    L95
  mov    -0x28(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L183
  mov    0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,0x10(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L183:
  mov    0x10(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jne    L128
  cmpl   $0x0,0x10(%rbp)
  jle    L149
  subl   $0x1,-0x28(%rbp)
  jmp    L128
L149:
  addl   $0x1,0x10(%rbp)
L128:
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  jmp    L46
L205:
  movl   $0x0,-0x8(%rbp)
  jmp    L52
L151:
  mov    -0x4(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  sub    -0x24(%rbp),%eax
  imul   %edx,%eax
  mov    0x10(%rbp),%edx
  mov    %edx,%esi
  sub    -0x28(%rbp),%esi
  cltd
  idiv   %esi
  mov    %eax,%edx
  mov    -0x24(%rbp),%eax
  add    %edx,%eax
  imul   -0x20(%rbp),%eax
  lea    (%rcx,%rax,1),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0xff,(%rax)
  addl   $0x1,-0x8(%rbp)
L52:
  mov    -0x8(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L151
  addl   $0x1,-0x4(%rbp)
L46:
  mov    -0x4(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L205
  jmp    L181
L95:
  mov    -0x24(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L214
  mov    0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,0x10(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x24(%rbp)
L214:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L200
L117:
  movl   $0x0,-0x4(%rbp)
  jmp    L140
L120:
  mov    -0x8(%rbp),%eax
  sub    -0x24(%rbp),%eax
  mov    %eax,%edx
  mov    0x10(%rbp),%eax
  sub    -0x28(%rbp),%eax
  imul   %edx,%eax
  mov    -0x2c(%rbp),%edx
  mov    %edx,%edi
  sub    -0x24(%rbp),%edi
  cltd
  idiv   %edi
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  imul   -0x1c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x20(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0xff,(%rax)
  addl   $0x1,-0x4(%rbp)
L140:
  mov    -0x4(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L120
  addl   $0x1,-0x8(%rbp)
L200:
  mov    -0x8(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L117
L181:
  pop    %rbp
  ret
```

assistant: ```c
void drawline(unsigned char *buffer, int rowstride, int bpp, int x1, int y1, int x2, int y2) {
  int i, j;
  i = x1 - x2;
  j = y1 - y2;
  if (i == 0 && j == 0) {
    for (i = 0; i < bpp; i++)
      buffer[y1 * rowstride + x1 * bpp + i] = 0xff;
    return;
  }
  if (i < 0)
    i = -i;
  if (j < 0)
    j = -j;
  if (i < j) {
    if (y1 > y2) {
      i = y2;
      y2 = y1;
      y1 = i;
      i = x2;
      x2 = x1;
      x1 = i;
    }
    if (y2 == y1) {
      if (y2 > 0)
        y1--;
      else
        y2++;
    }
    for (j = y1; j <= y2; j++)
      for (i = 0; i < bpp; i++)
        buffer[j * rowstride + (x1 + (j - y1) * (x2 - x1) / (y2 - y1)) * bpp + i] = 0xff;
  } else {
    if (x1 > x2) {
      i = y2;
      y2 = y1;
      y1 = i;
      i = x2;
      x2 = x1;
      x1 = i;
    }
    for (i = x1; i <= x2; i++)
      for (j = 0; j < bpp; j++)
        buffer[(y1 + (i - x1) * (y2 - y1) / (x2 - x1)) * rowstride + i * bpp + j] = 0xff;
  }
}
```