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

```asm
<oled_fill_triangle>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%r14d
  mov    %edx,%ebx
  mov    %ecx,0x14(%rsp)
  mov    %r8d,%r13d
  cmp    %r8d,%edx
  jle    L20
  mov    %r8d,%ebx
  mov    %edx,%r13d
  mov    %esi,%eax
  mov    %ecx,%esi
  mov    %eax,0x14(%rsp)
L20:
  cmp    %r13d,0x70(%rsp)
  jge    L71
  cmp    %ebx,0x70(%rsp)
  jge    L67
  mov    %esi,%r12d
  sub    %r9d,%r12d
  mov    %ebx,%eax
  sub    0x70(%rsp),%eax
  mov    %eax,0x20(%rsp)
  mov    0x14(%rsp),%eax
  mov    %eax,%ebp
  sub    %r9d,%ebp
  mov    %r13d,%r15d
  sub    0x70(%rsp),%r15d
  sub    %esi,%eax
  mov    %eax,0x18(%rsp)
  mov    %r13d,%eax
  sub    %ebx,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %r13d,%ebx
  je     L204
  mov    %ebx,0x28(%rsp)
  mov    %esi,0x14(%rsp)
  mov    0x70(%rsp),%ebx
  mov    %r9d,%esi
  jmp    L192
L71:
  cmp    %ebx,0x70(%rsp)
  je     L96
  mov    0x14(%rsp),%eax
  mov    %eax,%r12d
  sub    %esi,%r12d
  mov    %r13d,%edx
  sub    %ebx,%edx
  mov    %edx,0x20(%rsp)
  mov    %r9d,%ebp
  sub    %esi,%ebp
  mov    0x70(%rsp),%r15d
  sub    %ebx,%r15d
  sub    %eax,%r9d
  mov    %r9d,0x18(%rsp)
  mov    0x70(%rsp),%eax
  sub    %r13d,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %r13d,0x70(%rsp)
  jne    L102
  mov    %r13d,0x28(%rsp)
  mov    0x70(%rsp),%r13d
  jmp    L21
L209:
  mov    0x14(%rsp),%eax
  mov    %r9d,0x14(%rsp)
  mov    %eax,%r9d
L96:
  mov    0x14(%rsp),%eax
  cmp    %esi,%eax
  jl     L101
  cmovl  %esi,%eax
  mov    %esi,0x14(%rsp)
  mov    %eax,%esi
L101:
  mov    0x14(%rsp),%eax
  cmp    %r9d,%eax
  jg     L206
  cmp    %r9d,%esi
  cmovl  %r9d,%esi
  mov    %eax,%r9d
L206:
  mov    %ebx,%r8d
  mov    %esi,%ecx
  mov    %ebx,%edx
  mov    %r9d,%esi
  mov    %r14d,%edi
  call   <oled_fill@plt>
L179:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  mov    %r13d,0x28(%rsp)
  mov    0x70(%rsp),%r13d
  jmp    L192
L207:
  mov    %ebx,0x2c(%rsp)
  mov    %esi,0x10(%rsp)
  mov    %ebp,0xc(%rsp)
L159:
  mov    %ebx,%r12d
  sub    0x28(%rsp),%r12d
  imul   0x18(%rsp),%r12d
  mov    %ebx,%ebp
  sub    0x2c(%rsp),%ebp
  imul   0xc(%rsp),%ebp
  cmp    %r13d,%ebx
  jle    L3
  jmp    L179
L204:
  mov    %ebx,0x28(%rsp)
  mov    %esi,0x14(%rsp)
  mov    0x70(%rsp),%eax
  mov    %eax,0x2c(%rsp)
  mov    %r9d,0x10(%rsp)
  mov    %ebp,0xc(%rsp)
  mov    %r12d,0x24(%rsp)
  mov    %eax,%ebx
  mov    %r13d,0x70(%rsp)
  mov    %r9d,%esi
  mov    %r9d,%ecx
  jmp    L52
L158:
  mov    %ebx,%r8d
  mov    %ebx,%edx
  mov    %r14d,%edi
  call   <oled_fill@plt>
  add    $0x1,%ebx
  cmp    %r13d,%ebx
  jg     L179
L3:
  mov    %r12d,%eax
  cltd
  idivl  0x1c(%rsp)
  mov    0x14(%rsp),%edx
  lea    (%rax,%rdx,1),%esi
  mov    %ebp,%eax
  cltd
  idiv   %r15d
  mov    0x10(%rsp),%edi
  lea    (%rax,%rdi,1),%ecx
  add    0x18(%rsp),%r12d
  add    0xc(%rsp),%ebp
  cmp    %ecx,%esi
  jle    L158
  mov    %esi,%eax
  mov    %ecx,%esi
  mov    %eax,%ecx
  jmp    L158
L67:
  cmp    %r13d,%ebx
  je     L209
  mov    %r9d,%r12d
  sub    %esi,%r12d
  mov    0x70(%rsp),%eax
  sub    %ebx,%eax
  mov    %eax,0x20(%rsp)
  mov    0x14(%rsp),%eax
  mov    %eax,%ebp
  sub    %esi,%ebp
  mov    %r13d,%r15d
  sub    %ebx,%r15d
  sub    %r9d,%eax
  mov    %eax,0x18(%rsp)
  mov    %r13d,%eax
  sub    0x70(%rsp),%eax
  mov    %eax,0x1c(%rsp)
  mov    0x70(%rsp),%eax
  mov    %eax,0x28(%rsp)
  mov    %r9d,0x14(%rsp)
L192:
  mov    0x28(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x70(%rsp)
L21:
  cmp    %ebx,0x70(%rsp)
  jl     L207
  mov    %ebx,0x2c(%rsp)
  mov    %esi,0x10(%rsp)
  mov    %ebp,0xc(%rsp)
  mov    %r12d,0x24(%rsp)
  mov    %esi,%ecx
L52:
  mov    %ebx,%r8d
  mov    %ebx,%edx
  mov    %r14d,%edi
  call   <oled_fill@plt>
  add    $0x1,%ebx
  cmp    0x70(%rsp),%ebx
  jg     L159
  mov    %r12d,%eax
  cltd
  idivl  0x20(%rsp)
  mov    %eax,%edi
  mov    0x10(%rsp),%ecx
  lea    (%rax,%rcx,1),%esi
  mov    %ebp,%eax
  cltd
  idiv   %r15d
  add    %eax,%ecx
  add    0x24(%rsp),%r12d
  add    0xc(%rsp),%ebp
  cmp    %eax,%edi
  jle    L52
  mov    %esi,%eax
  mov    %ecx,%esi
  mov    %eax,%ecx
  jmp    L52
```

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);
  }
}
```