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

```asm
<tft_fill_triangle>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %esi,-0x58(%rbp)
  mov    %edx,-0x5c(%rbp)
  mov    %ecx,-0x60(%rbp)
  mov    %r8d,-0x64(%rbp)
  mov    %r9d,-0x68(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jle    L179
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x60(%rbp)
L179:
  mov    -0x64(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L97
  mov    0x10(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,0x10(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x68(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x60(%rbp)
L97:
  mov    -0x5c(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jle    L148
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x60(%rbp)
L148:
  mov    -0x5c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jne    L167
  mov    -0x58(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x60(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L7
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L173
L7:
  mov    -0x60(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L173
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L173:
  mov    -0x68(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L15
  mov    -0x68(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L33
L15:
  mov    -0x68(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L33
  mov    -0x68(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L33:
  mov    -0x5c(%rbp),%edi
  mov    -0x4c(%rbp),%ecx
  mov    -0x5c(%rbp),%edx
  mov    -0x50(%rbp),%esi
  mov    -0x54(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <tft_fill@plt>
  jmp    L168
L167:
  mov    -0x60(%rbp),%eax
  sub    -0x58(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x64(%rbp),%eax
  sub    -0x5c(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x58(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    0x10(%rbp),%eax
  sub    -0x5c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x60(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    0x10(%rbp),%eax
  sub    -0x64(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  mov    -0x64(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jne    L85
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L52
L85:
  mov    -0x64(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x44(%rbp)
L52:
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x48(%rbp)
  jmp    L118
L22:
  mov    -0x40(%rbp),%eax
  cltd
  idivl  -0x1c(%rbp)
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x3c(%rbp),%eax
  cltd
  idivl  -0x14(%rbp)
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x20(%rbp),%eax
  add    %eax,-0x40(%rbp)
  mov    -0x18(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L37
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L37:
  mov    -0x48(%rbp),%edi
  mov    -0x4c(%rbp),%ecx
  mov    -0x48(%rbp),%edx
  mov    -0x50(%rbp),%esi
  mov    -0x54(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <tft_fill@plt>
  addl   $0x1,-0x48(%rbp)
L118:
  mov    -0x48(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jle    L22
  mov    -0x48(%rbp),%eax
  sub    -0x64(%rbp),%eax
  mov    -0x10(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%eax
  sub    -0x5c(%rbp),%eax
  mov    -0x18(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L45
L0:
  mov    -0x40(%rbp),%eax
  cltd
  idivl  -0xc(%rbp)
  mov    %eax,%edx
  mov    -0x60(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x3c(%rbp),%eax
  cltd
  idivl  -0x14(%rbp)
  mov    %eax,%edx
  mov    -0x58(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x10(%rbp),%eax
  add    %eax,-0x40(%rbp)
  mov    -0x18(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jle    L67
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
L67:
  mov    -0x48(%rbp),%edi
  mov    -0x4c(%rbp),%ecx
  mov    -0x48(%rbp),%edx
  mov    -0x50(%rbp),%esi
  mov    -0x54(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <tft_fill@plt>
  addl   $0x1,-0x48(%rbp)
L45:
  mov    -0x48(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L0
L168:
  leave
  ret
```

assistant: ```c
void tft_fill_triangle(int color, int x0, int y0, int x1, int y1, int x2, int y2) {
  int a, b, y, last;
  if (y0 > y1) {
    {
      int _t = y0;
      y0 = y1;
      y1 = _t;
    };
    {
      int _t = x0;
      x0 = x1;
      x1 = _t;
    };
  }
  if (y1 > y2) {
    {
      int _t = y2;
      y2 = y1;
      y1 = _t;
    };
    {
      int _t = x2;
      x2 = x1;
      x1 = _t;
    };
  }
  if (y0 > y1) {
    {
      int _t = y0;
      y0 = y1;
      y1 = _t;
    };
    {
      int _t = x0;
      x0 = x1;
      x1 = _t;
    };
  }
  if (y0 == y2) {
    a = b = x0;
    if (x1 < a)
      a = x1;
    else if (x1 > b)
      b = x1;
    if (x2 < a)
      a = x2;
    else if (x2 > b)
      b = x2;
    tft_fill(color, a, y0, b, y0);
    return;
  }
  int dx01 = x1 - x0;
  int dy01 = y1 - y0;
  int dx02 = x2 - x0;
  int dy02 = y2 - y0;
  int dx12 = x2 - x1;
  int dy12 = y2 - y1;
  int sa = 0;
  int sb = 0;
  if (y1 == y2)
    last = y1;
  else
    last = y1 - 1;
  for (y = y0; y <= last; y++) {
    a = x0 + sa / dy01;
    b = x0 + sb / dy02;
    sa += dx01;
    sb += dx02;
    if (a > b) {
      int _t = a;
      a = b;
      b = _t;
    };
    tft_fill(color, a, y, b, y);
  }
  sa = dx12 * (y - y1);
  sb = dx02 * (y - y0);
  for (; y <= y2; y++) {
    a = x1 + sa / dy12;
    b = x0 + sb / dy02;
    sa += dx12;
    sb += dx02;
    if (a > b) {
      int _t = a;
      a = b;
      b = _t;
    };
    tft_fill(color, a, y, b, y);
  }
}
```