user: 请从给定的汇编指令推导出C源代码：

```asm
<drawLineHMaxUnclipped>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rax
  mov    %edx,%r10d
  mov    %ecx,%edi
  mov    %r9b,-0x1(%rsp)
  mov    %esi,%edx
  and    $0x1,%edx
  movsbl %r9b,%r15d
  shl    $0x4,%r15d
  mov    %r15b,-0x2(%rsp)
  mov    %r9d,%r13d
  or     %r15d,%r13d
  mov    $0x40,%r12d
  test   %r8d,%r8d
  jle    L187
L74:
  lea    (%r8,%r8,1),%r14d
  mov    %r14d,%ecx
  sub    %edi,%ecx
  sub    %edi,%r8d
  add    %r8d,%r8d
  shl    $0x6,%r10d
  sar    %esi
  add    %esi,%r10d
  movslq %r10d,%r10
  add    %r10,%rax
  test   %edx,%edx
  jne    L102
  lea    -0x1(%rdi),%esi
  test   %edi,%edi
  jle    L88
  mov    $0x1,%r10d
L2:
  mov    %edx,%r11d
  mov    $0x1,%ebx
  mov    $0x0,%ebp
  movslq %r12d,%r12
  jmp    L237
L187:
  neg    %r8d
  mov    $0xffffffc0,%r12d
  jmp    L74
L115:
  add    %r14d,%ecx
  add    $0x1,%edx
  cmp    $0x2,%edx
  je     L3
  mov    %ebx,%r11d
  jmp    L186
L3:
  test   %r10d,%r10d
  je     L91
  mov    %r13d,%edx
  test   %r11d,%r11d
  je     L91
L163:
  mov    %dl,(%rax)
  add    $0x1,%rax
  mov    %ebp,%r11d
  mov    %ebx,%r10d
  mov    $0x0,%edx
  jmp    L186
L91:
  test   %r10d,%r10d
  je     L144
  movzbl (%rax),%edx
  and    $0xfffffff0,%edx
  or     -0x1(%rsp),%dl
  jmp    L163
L144:
  movzbl (%rax),%edx
  and    $0xf,%edx
  or     -0x2(%rsp),%dl
  jmp    L163
L22:
  movzbl (%rax),%edi
  and    $0xf,%edi
  or     -0x2(%rsp),%dil
L251:
  mov    %dil,(%rax)
  add    $0x1,%edx
  mov    %ebx,%r11d
  mov    %ebp,%r10d
  cmp    $0x2,%edx
  je     L250
L204:
  add    %r12,%rax
L186:
  lea    -0x1(%rsi),%edi
  test   %esi,%esi
  jle    L150
  mov    %edi,%esi
L237:
  test   %ecx,%ecx
  jle    L115
  add    %r8d,%ecx
  test   %r10d,%r10d
  je     L236
  mov    %r13d,%edi
  test   %r11d,%r11d
  jne    L251
L236:
  test   %r10d,%r10d
  je     L22
  movzbl (%rax),%edi
  and    $0xfffffff0,%edi
  or     -0x1(%rsp),%dil
  jmp    L251
L250:
  add    $0x1,%rax
  mov    %ebp,%r11d
  mov    %ebx,%r10d
  mov    $0x0,%edx
  jmp    L204
L150:
  test   %r10d,%r10d
  je     L193
  test   %r11d,%r11d
  je     L193
  mov    %r13b,(%rax)
L252:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L193:
  test   %r10d,%r10d
  je     L131
L88:
  movzbl (%rax),%edx
  and    $0xfffffff0,%edx
  or     %r9d,%edx
  mov    %dl,(%rax)
  jmp    L252
L102:
  lea    -0x1(%rdi),%esi
  mov    $0x0,%r10d
  test   %edi,%edi
  jg     L2
L131:
  movzbl (%rax),%edx
  and    $0xf,%edx
  or     %r15d,%edx
  mov    %dl,(%rax)
  jmp    L252
```

assistant: ```c
void drawLineHMaxUnclipped(char *buffer, int x0, int y0, int dx, int dy, char shade) {
  int d, incrH, incrHV, addV;
  int pixelPos = x0 & 0x1;
  int loPixel = 0;
  int hiPixel = 0;
  char hiShade = shade << 4;
  char biShade = shade | hiShade;
  if (dy > 0)
    addV = 64;
  else {
    addV = -64;
    dy = -dy;
  }
  d = 2 * dy - dx;
  incrH = 2 * dy;
  incrHV = 2 * (dy - dx);
  buffer += (y0 << 6) + (x0 >> 1);
  if (pixelPos == 0)
    loPixel = 1;
  else
    hiPixel = 1;
  while (dx-- > 0)
    if (d <= 0) {
      d += incrH;
      pixelPos++;
      if (pixelPos == 2) {
        if (loPixel && hiPixel) {
          *buffer = biShade;
        } else if (loPixel) {
          *buffer &= 0xF0;
          *buffer |= shade;
        } else {
          *buffer &= 0x0F;
          *buffer |= hiShade;
        }
        buffer++;
        pixelPos = 0;
        hiPixel = 0;
        loPixel = 1;
      } else {
        hiPixel = 1;
      }
    } else {
      d += incrHV;
      if (loPixel && hiPixel) {
        *buffer = biShade;
      } else if (loPixel) {
        *buffer &= 0xF0;
        *buffer |= shade;
      } else {
        *buffer &= 0x0F;
        *buffer |= hiShade;
      }
      pixelPos++;
      if (pixelPos == 2) {
        buffer++;
        pixelPos = 0;
        loPixel = 1;
        hiPixel = 0;
      } else {
        loPixel = 0;
        hiPixel = 1;
      }
      buffer += addV;
    }
  if (loPixel && hiPixel) {
    *buffer = biShade;
  } else if (loPixel) {
    *buffer &= 0xF0;
    *buffer |= shade;
  } else {
    *buffer &= 0x0F;
    *buffer |= hiShade;
  }
}
```