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

```asm
<drawLineHMaxUnclipped>:
  endbr64
  push   %r14
  mov    %edx,%eax
  mov    %r9d,%r10d
  mov    %ecx,%edx
  push   %r13
  mov    %esi,%ecx
  mov    %esi,%r11d
  mov    %r9d,%r14d
  push   %r12
  movsbl %r9b,%r12d
  and    $0x1,%ecx
  shl    $0x4,%r12d
  push   %rbp
  mov    %r12d,%r13d
  push   %rbx
  or     %r12d,%r10d
  mov    %rdi,%rbx
  mov    $0x40,%edi
  test   %r8d,%r8d
  jg     L165
  neg    %r8d
  mov    $0xffffffffffffffc0,%rdi
L165:
  shl    $0x6,%eax
  sar    %r11d
  lea    (%r8,%r8,1),%ebp
  sub    %edx,%r8d
  add    %r11d,%eax
  mov    %ebp,%esi
  add    %r8d,%r8d
  cltq
  sub    %edx,%esi
  add    %rbx,%rax
  test   %ecx,%ecx
  jne    L93
  mov    $0x1,%ebx
  test   %edx,%edx
  jg     L4
  movzbl (%rax),%edx
  and    $0xfffffff0,%edx
  or     %r9d,%edx
  mov    %dl,(%rax)
L35:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L144:
  add    %r8d,%esi
  mov    %r10d,%r11d
  test   %ebx,%ecx
  jne    L167
  movzbl (%rax),%r11d
  test   %ebx,%ebx
  je     L120
  and    $0xfffffff0,%r11d
  or     %r14d,%r11d
L167:
  mov    %r11b,(%rax)
  mov    $0x1,%r11d
  cmp    $0x1,%ecx
  jne    L37
  add    $0x1,%rax
  xor    %r11d,%r11d
L37:
  mov    %ecx,%ebx
  add    %rdi,%rax
  mov    %r11d,%ecx
L96:
  sub    $0x1,%edx
  je     L39
L4:
  test   %esi,%esi
  jg     L144
  add    %ebp,%esi
  cmp    $0x1,%ecx
  je     L141
  mov    $0x1,%ecx
  sub    $0x1,%edx
  jne    L4
L39:
  test   %ebx,%ecx
  je     L163
  mov    %r10b,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L120:
  and    $0xf,%r11d
  or     %r13d,%r11d
  jmp    L167
  nopl   0x0(%rax)
L141:
  mov    %r10d,%ecx
  test   %ebx,%ebx
  jne    L69
  movzbl (%rax),%ecx
  and    $0xf,%ecx
  or     %r13d,%ecx
L69:
  mov    %cl,(%rax)
  mov    $0x1,%ebx
  add    $0x1,%rax
  xor    %ecx,%ecx
  jmp    L96
  nop
L93:
  xor    %ebx,%ebx
  test   %edx,%edx
  jg     L4
L16:
  movzbl (%rax),%edx
  and    $0xf,%edx
  or     %r12d,%edx
  mov    %dl,(%rax)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L163:
  test   %ebx,%ebx
  je     L16
  movzbl (%rax),%edx
  and    $0xfffffff0,%edx
  or     %r9d,%edx
  mov    %dl,(%rax)
  jmp    L35
```

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