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

```asm
<oled_fill_triangle>:
  endbr64
  push   %r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x38,%rsp
  mov    0x70(%rsp),%eax
  mov    %edx,0x28(%rsp)
  mov    %ecx,0x10(%rsp)
  mov    %r8d,0x2c(%rsp)
  mov    %eax,0xc(%rsp)
  cmp    %r8d,%edx
  jle    L145
  cmp    %eax,%edx
  jg     L97
L209:
  mov    0x28(%rsp),%eax
  mov    0x2c(%rsp),%edi
  mov    %eax,0x2c(%rsp)
  mov    %ebx,%eax
  mov    0x10(%rsp),%ebx
  mov    %edi,0x28(%rsp)
  mov    %eax,0x10(%rsp)
L99:
  mov    0xc(%rsp),%esi
  cmp    %esi,0x28(%rsp)
  je     L149
L102:
  mov    0x10(%rsp),%edi
  mov    0x28(%rsp),%ecx
  mov    %r9d,%r13d
  sub    %ebx,%r13d
  mov    %edi,%eax
  sub    %edi,%r9d
  sub    %ebx,%eax
  mov    %r9d,0x18(%rsp)
  mov    %eax,0x20(%rsp)
  mov    0x2c(%rsp),%eax
  mov    %eax,%edx
  mov    %eax,0x14(%rsp)
  sub    %ecx,%edx
  mov    %edx,0x24(%rsp)
  mov    0xc(%rsp),%edx
  mov    %edx,%esi
  sub    %ecx,%esi
  mov    %esi,0x8(%rsp)
  mov    %edx,%esi
  sub    %eax,%esi
  mov    %esi,0x1c(%rsp)
  cmp    %edx,%eax
  je     L13
L147:
  mov    0xc(%rsp),%eax
  mov    %eax,0x14(%rsp)
  mov    0x2c(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0xc(%rsp)
L13:
  mov    0x28(%rsp),%esi
  xor    %r15d,%r15d
  mov    %esi,%ebp
  cmp    %esi,0xc(%rsp)
  jl     L133
  mov    0x20(%rsp),%r15d
  mov    %r13d,%r12d
  mov    %ebx,%ecx
  mov    %ebx,%esi
  nopl   (%rax)
L172:
  mov    %ebp,%r8d
  mov    %ebp,%edx
  mov    %r14d,%edi
  add    $0x1,%ebp
  call   <oled_fill@plt>
  cmp    %ebp,0xc(%rsp)
  jl     L82
  mov    %r15d,%eax
  add    0x20(%rsp),%r15d
  cltd
  idivl  0x24(%rsp)
  mov    %eax,%edi
  lea    (%rax,%rbx,1),%esi
  mov    %r12d,%eax
  add    %r13d,%r12d
  cltd
  idivl  0x8(%rsp)
  lea    (%rax,%rbx,1),%ecx
  cmp    %eax,%edi
  jle    L172
  mov    %esi,%eax
  mov    %ecx,%esi
  mov    %eax,%ecx
  jmp    L172
  nopw   0x0(%rax,%rax,1)
L145:
  mov    %eax,%edx
  cmp    %eax,0x2c(%rsp)
  jle    L99
  mov    0x28(%rsp),%esi
  cmp    %edx,%esi
  jle    L174
  mov    0x2c(%rsp),%edi
  mov    %ebx,%eax
  mov    %edx,0x28(%rsp)
  mov    %r9d,%ebx
  mov    %esi,0x2c(%rsp)
  mov    0x10(%rsp),%r9d
  mov    %edi,0xc(%rsp)
  mov    %eax,0x10(%rsp)
  jmp    L102
  nopl   0x0(%rax,%rax,1)
L82:
  mov    %ebp,%eax
  sub    0x28(%rsp),%eax
  imul   %r13d,%eax
  mov    %eax,%r15d
L133:
  mov    %ebp,%r12d
  sub    0x2c(%rsp),%r12d
  imul   0x18(%rsp),%r12d
  cmp    0x14(%rsp),%ebp
  jg     L41
  mov    %ebx,%eax
  mov    %r15d,%ebx
  mov    %ebp,%r15d
  mov    %r12d,%ebp
  mov    %eax,%r12d
  nopw   0x0(%rax,%rax,1)
L109:
  mov    %ebp,%eax
  add    0x18(%rsp),%ebp
  cltd
  idivl  0x1c(%rsp)
  mov    0x10(%rsp),%edx
  lea    (%rax,%rdx,1),%esi
  mov    %ebx,%eax
  add    %r13d,%ebx
  cltd
  idivl  0x8(%rsp)
  lea    (%rax,%r12,1),%ecx
  cmp    %ecx,%esi
  jle    L156
  mov    %esi,%eax
  mov    %ecx,%esi
  mov    %eax,%ecx
L156:
  mov    %r15d,%r8d
  mov    %r15d,%edx
  mov    %r14d,%edi
  add    $0x1,%r15d
  call   <oled_fill@plt>
  cmp    0x14(%rsp),%r15d
  jle    L109
L41:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L97:
  mov    %r8d,%esi
  mov    %eax,%edx
  cmp    %eax,%r8d
  jle    L167
  mov    %ecx,%eax
  mov    %ecx,%edi
  mov    0xc(%rsp),%ecx
  mov    %ebx,%r13d
  sub    %r9d,%eax
  sub    %edi,%ebx
  mov    %esi,%edx
  sub    %r9d,%r13d
  mov    %eax,0x20(%rsp)
  mov    %esi,%eax
  sub    %ecx,%eax
  mov    %ebx,0x18(%rsp)
  mov    %eax,0x24(%rsp)
  mov    0x28(%rsp),%eax
  mov    %ecx,0x28(%rsp)
  mov    %eax,%esi
  mov    %eax,%ebx
  mov    %eax,0xc(%rsp)
  sub    %edx,%ebx
  sub    %ecx,%esi
  mov    %ebx,0x1c(%rsp)
  mov    %r9d,%ebx
  mov    %esi,0x8(%rsp)
  jmp    L147
  nop
L149:
  mov    0x10(%rsp),%esi
  cmp    %esi,%ebx
  jle    L178
  mov    %ebx,%eax
  mov    %esi,%ebx
  mov    %eax,0x10(%rsp)
L178:
  cmp    %r9d,%ebx
  jle    L38
L68:
  mov    0x28(%rsp),%edx
  mov    0x10(%rsp),%ecx
  add    $0x38,%rsp
  mov    %r14d,%edi
  pop    %rbx
  mov    %r9d,%esi
  pop    %rbp
  mov    %edx,%r8d
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <oled_fill@plt>
  nopl   0x0(%rax)
L167:
  mov    0x28(%rsp),%eax
  mov    %edx,0x2c(%rsp)
  mov    %r8d,0x28(%rsp)
  mov    %eax,0xc(%rsp)
  mov    %ebx,%eax
  mov    0x10(%rsp),%ebx
  mov    %r9d,0x10(%rsp)
  mov    %eax,%r9d
  jmp    L102
  nopl   0x0(%rax)
L174:
  mov    0x10(%rsp),%eax
  mov    %esi,0x2c(%rsp)
  mov    %ebx,0x10(%rsp)
  mov    %r9d,%ebx
  mov    %edx,0x28(%rsp)
  mov    %eax,%r9d
  mov    %r8d,0xc(%rsp)
  jmp    L209
  nopl   0x0(%rax,%rax,1)
L38:
  mov    0x10(%rsp),%eax
  cmp    %r9d,%eax
  cmovge %eax,%r9d
  mov    %r9d,0x10(%rsp)
  mov    %ebx,%r9d
  jmp    L68
```

assistant: ```c
void oled_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;
    oled_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;
    };
    oled_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;
    };
    oled_fill(color, a, y, b, y);
  }
}
```