user: What would the C source look like for the assembly code provided here:

```asm
<GrOffScreen1BPPLineDrawH>:
  endbr64
  mov    %rdi,%r9
  mov    %edx,%edi
  mov    0x4(%r9),%edx
  lea    0xe(%rdx),%eax
  add    $0x7,%edx
  cmovns %edx,%eax
  sar    $0x3,%eax
  imul   %ecx,%eax
  lea    0x7(%rsi),%edx
  test   %esi,%esi
  cmovns %esi,%edx
  sar    $0x3,%edx
  add    %edx,%eax
  cltq
  lea    0x14(%r9,%rax,4),%rax
  neg    %r8d
  sbb    %r8d,%r8d
  mov    %esi,%ecx
  and    $0x7,%ecx
  je     L57
  mov    $0x8,%edx
  sub    %ecx,%edx
  mov    %edi,%ecx
  sub    %esi,%ecx
  add    $0x1,%ecx
  cmp    %edx,%ecx
  cmovg  %edx,%ecx
  sub    %ecx,%edx
  mov    %edx,%r9d
  mov    $0x1,%edx
  shl    %cl,%edx
  sub    $0x1,%edx
  mov    %r9d,%ecx
  shl    %cl,%edx
  mov    %r8d,%ecx
  xor    (%rax),%ecx
  and    %ecx,%edx
  xor    (%rax),%edx
  mov    %edx,(%rax)
  add    $0x4,%rax
  add    $0x7,%esi
  and    $0xfffffff8,%esi
L57:
  test   $0x1,%al
  je     L26
  mov    %edi,%edx
  sub    %esi,%edx
  cmp    $0x6,%edx
  jle    L26
  movzbl %r8b,%edx
  mov    %edx,(%rax)
  add    $0x8,%esi
  lea    0x4(%rax),%rax
L26:
  test   $0x2,%al
  je     L8
  mov    %edi,%edx
  sub    %esi,%edx
  cmp    $0xe,%edx
  jle    L8
  movzwl %r8w,%edx
  mov    %edx,(%rax)
  add    $0x8,%rax
  add    $0x10,%esi
L8:
  lea    0x1e(%rsi),%edx
  cmp    %edx,%edi
  jle    L68
  lea    -0x1f(%rdi),%ecx
  sub    %esi,%ecx
  shr    $0x5,%ecx
  lea    0x1(%rcx),%edx
  mov    %edx,%edx
  shl    $0x4,%rdx
  add    %rax,%rdx
L22:
  mov    %r8d,(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L22
  shl    $0x5,%ecx
  lea    0x20(%rsi,%rcx,1),%esi
L32:
  lea    0xe(%rsi),%eax
  cmp    %edi,%eax
  jge    L70
  movzwl %r8w,%eax
  mov    %eax,(%rdx)
  add    $0x8,%rdx
  add    $0x10,%esi
L70:
  lea    0x6(%rsi),%eax
  cmp    %edi,%eax
  jge    L105
  movzbl %r8b,%eax
  mov    %eax,(%rdx)
  add    $0x8,%esi
  lea    0x4(%rdx),%rdx
L105:
  cmp    %edi,%esi
  jg     L13
  sub    %esi,%edi
  lea    0x1(%rdi),%ecx
  mov    $0xff,%eax
  sar    %cl,%eax
  and    (%rdx),%eax
  mov    $0xffffff00,%esi
  sar    %cl,%esi
  and    %r8d,%esi
  or     %esi,%eax
  mov    %eax,(%rdx)
L13:
  ret
L68:
  mov    %rax,%rdx
  jmp    L32
```

assistant: ```c
void GrOffScreen1BPPLineDrawH(void *pvDisplayData, int32_t i32X1, int32_t i32X2, int32_t i32Y, uint32_t ui32Value) {
  int32_t i32BytesPerRow, i32Mask;
  uint8_t *pui8Data;
  ;
  pui8Data = (uint8_t *)pvDisplayData;
  i32BytesPerRow = (*(uint16_t *)(pui8Data + 1) + 7) / 8;
  pui8Data += (i32BytesPerRow * i32Y) + (i32X1 / 8) + 5;
  if (ui32Value) {
    ui32Value = 0xffffffff;
  }
  if (i32X1 & 7) {
    i32Mask = 8 - (i32X1 & 7);
    if (i32Mask > (i32X2 - i32X1 + 1)) {
      i32Mask = i32X2 - i32X1 + 1;
    }
    i32Mask = ((1 << i32Mask) - 1) << (8 - (i32X1 & 7) - i32Mask);
    *pui8Data = (*pui8Data & ~i32Mask) | (ui32Value & i32Mask);
    pui8Data++;
    i32X1 = (i32X1 + 7) & ~7;
  }
  if (((uint32_t)pui8Data & 1) && ((i32X2 - i32X1) > 6)) {
    *pui8Data++ = ui32Value & 0xff;
    i32X1 += 8;
  }
  if (((uint32_t)pui8Data & 2) && ((i32X2 - i32X1) > 14)) {
    *(uint16_t *)pui8Data = ui32Value & 0xffff;
    pui8Data += 2;
    i32X1 += 16;
  }
  while ((i32X1 + 31) <= i32X2) {
    *(uint32_t *)pui8Data = ui32Value;
    pui8Data += 4;
    i32X1 += 32;
  }
  if ((i32X1 + 15) <= i32X2) {
    *(uint16_t *)pui8Data = ui32Value & 0xffff;
    pui8Data += 2;
    i32X1 += 16;
  }
  if ((i32X1 + 7) <= i32X2) {
    *pui8Data++ = ui32Value & 0xff;
    i32X1 += 8;
  }
  if (i32X1 <= i32X2) {
    i32Mask = 0xff >> (i32X2 - i32X1 + 1);
    *pui8Data = (*pui8Data & i32Mask) | (ui32Value & ~i32Mask);
  }
}
```