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

```asm
<drawBitmap2BPP>:
  endbr64
  push   %r15
  mov    %r8d,%eax
  shl    $0x6,%r9d
  push   %r14
  mov    %edx,%r14d
  and    $0x1,%eax
  sar    %r8d
  push   %r13
  sub    $0x1,%r14d
  push   %r12
  sar    $0x2,%r14d
  push   %rbp
  add    $0x1,%r14d
  push   %rbx
  mov    0x38(%rsp),%r11d
  movslq 0x50(%rsp),%rdx
  mov    0x48(%rsp),%r15d
  lea    (%r11,%r11,1),%ecx
  sar    $0x2,%r11d
  movzbl 0x58(%rsp),%ebx
  mov    %eax,-0x8(%rsp)
  mov    0x40(%rsp),%eax
  and    $0x6,%ecx
  imul   %r14d,%eax
  add    %r11d,%eax
  cltq
  lea    (%rsi,%rax,1),%r13
  lea    (%r9,%r8,1),%eax
  cltq
  lea    (%rdi,%rax,1),%r12
  test   %edx,%edx
  jle    L117
  lea    -0x1(%r15),%eax
  shl    $0x6,%rdx
  movslq %r14d,%r14
  mov    %eax,-0x4(%rsp)
  lea    (%r12,%rdx,1),%rax
  mov    %rax,-0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L53:
  movsbl 0x0(%r13),%eax
  sar    %cl,%eax
  test   %r15d,%r15d
  jle    L124
  mov    0x60(%rsp),%edx
  mov    -0x4(%rsp),%edi
  mov    %r13,%r11
  mov    %r12,%r10
  mov    -0x8(%rsp),%r8d
  test   %edx,%edx
  mov    %ecx,%edx
  sete   %bpl
  jmp    L67
  nopl   0x0(%rax)
L87:
  mov    $0x1,%r8d
  sub    $0x1,%edi
  jb     L124
L67:
  mov    %eax,%esi
  and    $0x3,%esi
  jne    L16
  test   %bpl,%bpl
  jne    L16
L88:
  add    $0x2,%edx
  sar    $0x2,%al
  cmp    $0x6,%edx
  jle    L57
  movzbl 0x1(%r11),%eax
  xor    %edx,%edx
  add    $0x1,%r11
L57:
  cmp    $0x1,%r8d
  jne    L87
  add    $0x1,%r10
  xor    %r8d,%r8d
  sub    $0x1,%edi
  jae    L67
L124:
  add    %r14,%r13
  add    $0x40,%r12
  cmp    -0x10(%rsp),%r12
  jne    L53
L117:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L16:
  test   %bl,%bl
  movzbl (%r10),%r9d
  cmovns %ebx,%esi
  test   %r8d,%r8d
  jne    L95
  and    $0xfffffff0,%r9d
  or     %esi,%r9d
  mov    %r9b,(%r10)
  jmp    L88
  nopw   0x0(%rax,%rax,1)
L95:
  and    $0xf,%r9d
  shl    $0x4,%esi
  or     %r9d,%esi
  mov    %sil,(%r10)
  jmp    L88
```

assistant: ```c
void drawBitmap2BPP(char *buffer, char *bitmap, int bitmapWidth, int bitmapHeight, int destX, int destY, int sourceX, int sourceY, int width, int height, signed char shade, int isTransparent) {
  int startPos, startShift, widthLeft;
  char currentBitmap, currentShade;
  char *startBitmap, *startBuffer;
  int bitmapScanlineSkip = ((bitmapWidth - 1) >> 2) + 1;
  int bitmapShift = (sourceX & 0x03) << 1;
  int pixelPos = destX & 0x1;
  bitmap += (sourceY * bitmapScanlineSkip) + (sourceX >> 2);
  buffer += (destY << 6) + (destX >> 1);
  startShift = bitmapShift;
  startPos = pixelPos;
  startBitmap = bitmap;
  startBuffer = buffer;
  while (height-- > 0) {
    widthLeft = width;
    currentBitmap = *bitmap >> bitmapShift;
    while (widthLeft-- > 0) {
      currentShade = currentBitmap & 0x03;
      if (currentShade != 0 || !isTransparent) {
        if (shade >= 0)
          currentShade = shade;
        if (pixelPos == 0) {
          *buffer &= 0xF0;
          *buffer |= currentShade;
        } else {
          *buffer &= 0x0F;
          *buffer |= currentShade << 4;
        }
      }
      bitmapShift += 2;
      if (bitmapShift > 6) {
        bitmapShift = 0;
        currentBitmap = *(++bitmap);
      } else
        currentBitmap >>= 2;
      if (++pixelPos > 1) {
        buffer++;
        pixelPos = 0;
      }
    }
    bitmapShift = startShift;
    startBitmap += bitmapScanlineSkip;
    bitmap = startBitmap;
    pixelPos = startPos;
    startBuffer += 64;
    buffer = startBuffer;
  }
}
```