user: Please show me the C implementation that matches the assembly code listed below:

```asm
<qtree_bitins64>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,-0x8(%rsp)
  mov    %edx,%r12d
  mov    %rcx,%rdi
  mov    %r8d,-0x28(%rsp)
  mov    $0x1,%eax
  mov    %r9d,%ecx
  shl    %cl,%eax
  mov    %eax,-0x4(%rsp)
  lea    -0x1(%rsi),%r15d
  test   %r15d,%r15d
  jle    L370
  mov    %eax,%ecx
  lea    (%r8,%r8,1),%eax
  mov    %eax,-0x24(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %rax,-0x20(%rsp)
  mov    %rdi,%r14
  lea    -0x2(%rdx),%eax
  mov    %eax,%edx
  and    $0xfffffffe,%edx
  mov    %edx,-0x10(%rsp)
  mov    %eax,%edx
  shr    %edx
  add    $0x1,%edx
  mov    %edx,-0x14(%rsp)
  add    %edx,%edx
  mov    %edx,-0x18(%rsp)
  mov    $0x0,%r11d
  mov    $0x0,%ebp
  mov    $0x0,%r13d
  and    $0xfffffffe,%eax
  lea    0x2(%r8,%rax,1),%eax
  mov    %eax,-0xc(%rsp)
  lea    D14(%rip),%r9
  movslq %ecx,%r8
  jmp    L53
  movslq %esi,%rcx
  or     %r8,0x8(%rdi,%rcx,8)
L267:
  add    $0x1,%rax
  add    $0x2,%esi
  add    $0x10,%rdx
  cmp    %r10d,%esi
  je     L23
L315:
  cmpb   $0xf,(%rax)
  ja     L267
  movzbl (%rax),%ecx
  movslq (%r9,%rcx,4),%rcx
  add    %r9,%rcx
  notrack jmp *%rcx
  movslq %esi,%rcx
  or     %r8,(%rdi,%rcx,8)
  jmp    L267
  movslq %esi,%rcx
  lea    0x8(,%rcx,8),%rcx
  or     %r8,(%rdi,%rcx,1)
  or     %r8,-0x8(%rdi,%rcx,1)
  jmp    L267
  or     %r8,0x8(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,0x8(%rdi,%rcx,8)
  or     %r8,0x8(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,(%rdi,%rcx,8)
  or     %r8,0x8(%rdx)
  jmp    L267
  movslq %esi,%rcx
  lea    0x8(,%rcx,8),%rcx
  or     %r8,(%rdi,%rcx,1)
  or     %r8,-0x8(%rdi,%rcx,1)
  or     %r8,0x8(%rdx)
  jmp    L267
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,0x8(%rdi,%rcx,8)
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,(%rdi,%rcx,8)
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  lea    0x8(,%rcx,8),%rcx
  or     %r8,(%rdi,%rcx,1)
  or     %r8,-0x8(%rdi,%rcx,1)
  or     %r8,(%rdx)
  jmp    L267
  or     %r8,0x8(%rdx)
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,0x8(%rdi,%rcx,8)
  or     %r8,0x8(%rdx)
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  or     %r8,(%rdi,%rcx,8)
  or     %r8,0x8(%rdx)
  or     %r8,(%rdx)
  jmp    L267
  movslq %esi,%rcx
  lea    0x8(,%rcx,8),%rcx
  or     %r8,(%rdi,%rcx,1)
  or     %r8,-0x8(%rdi,%rcx,1)
  or     %r8,0x8(%rdx)
  or     %r8,(%rdx)
  jmp    L267
L23:
  mov    -0x10(%rsp),%eax
  lea    0x2(%rax,%r11,1),%eax
  add    -0x14(%rsp),%ebp
  mov    -0x18(%rsp),%edx
L170:
  cmp    %edx,%r12d
  jle    L603
  movslq %ebp,%rdx
  cmpb   $0xf,(%rbx,%rdx,1)
  ja     L340
  movzbl (%rbx,%rdx,1),%edx
  lea    D25(%rip),%rsi
  movslq (%rsi,%rdx,4),%rdx
  add    %rsi,%rdx
  notrack jmp *%rdx
L147:
  mov    $0x0,%edx
  jmp    L170
  add    -0x28(%rsp),%eax
  cltq
  or     %r8,(%rdi,%rax,8)
L340:
  add    $0x1,%ebp
L603:
  add    $0x2,%r13d
  add    -0x24(%rsp),%r11d
  add    -0x20(%rsp),%r14
  cmp    %r15d,%r13d
  jge    L290
L53:
  mov    %r11d,%eax
  cmp    $0x1,%r12d
  jle    L147
  movslq %ebp,%rax
  add    %rbx,%rax
  mov    -0x28(%rsp),%esi
  add    %r11d,%esi
  mov    -0xc(%rsp),%edx
  lea    (%rdx,%r11,1),%r10d
  mov    %r14,%rdx
  jmp    L315
  add    -0x28(%rsp),%eax
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  add    -0x28(%rsp),%eax
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  add    -0x28(%rsp),%eax
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  mov    -0x28(%rsp),%edx
  add    %eax,%edx
  movslq %edx,%rdx
  or     %r8,(%rdi,%rdx,8)
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  mov    -0x28(%rsp),%edx
  add    %eax,%edx
  movslq %edx,%rdx
  or     %r8,(%rdi,%rdx,8)
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  mov    -0x28(%rsp),%edx
  add    %eax,%edx
  movslq %edx,%rdx
  or     %r8,(%rdi,%rdx,8)
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
  mov    -0x28(%rsp),%edx
  add    %eax,%edx
  movslq %edx,%rdx
  or     %r8,(%rdi,%rdx,8)
  cltq
  or     %r8,(%rdi,%rax,8)
  jmp    L340
L290:
  mov    -0x8(%rsp),%eax
  sub    $0x2,%eax
  shr    %eax
  lea    0x2(%rax,%rax,1),%r8d
L241:
  cmp    %r8d,-0x8(%rsp)
  jle    L17
  imul   -0x28(%rsp),%r8d
  cmp    $0x1,%r12d
  jle    L205
  movslq %ebp,%rcx
  add    %rbx,%rcx
  movslq %r8d,%rax
  lea    (%rdi,%rax,8),%rdx
  lea    -0x2(%r12),%r10d
  shr    %r10d
  mov    %r10d,%esi
  lea    (%rax,%rsi,2),%rax
  lea    0x10(%rdi,%rax,8),%r11
  lea    D19(%rip),%rsi
  movslq -0x4(%rsp),%r9
  jmp    L524
L370:
  mov    $0x0,%ebp
  mov    $0x0,%r8d
  jmp    L241
  or     %r9,0x8(%rdx)
L504:
  add    $0x1,%rcx
  add    $0x10,%rdx
  cmp    %r11,%rdx
  je     L261
L524:
  movzbl (%rcx),%eax
  sub    $0x4,%eax
  cmp    $0xb,%al
  ja     L504
  movzbl %al,%eax
  movslq (%rsi,%rax,4),%rax
  add    %rsi,%rax
  notrack jmp *%rax
  or     %r9,0x8(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  jmp    L504
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  or     %r9,(%rdx)
  jmp    L504
  or     %r9,0x8(%rdx)
  or     %r9,(%rdx)
  jmp    L504
L261:
  lea    0x2(%r8,%r10,2),%r8d
  add    $0x1,%r10d
  add    %r10d,%ebp
  add    %r10d,%r10d
L152:
  cmp    %r10d,%r12d
  jle    L17
  movslq %ebp,%rbp
  movzbl (%rbx,%rbp,1),%eax
  sub    $0x8,%eax
  cmp    $0x7,%al
  ja     L17
  movzbl %al,%eax
  lea    D39(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L205:
  mov    $0x0,%r10d
  jmp    L152
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
L17:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
  movslq %r8d,%r8
  movslq -0x4(%rsp),%rax
  or     %rax,(%rdi,%r8,8)
  jmp    L17
```

assistant: ```c
void qtree_bitins64(unsigned char a[], int nx, int ny, long long b[], int n, int bit) {
  int i, j, k;
  int s00;
  int plane_val;
  plane_val = 1 << bit;
  k = 0;
  for (i = 0; i < nx - 1; i += 2) {
    s00 = n * i;
    for (j = 0; j < ny - 1; j += 2) {
      switch (a[k]) {
      case (0):
        break;
      case (1):
        b[s00 + n + 1] |= plane_val;
        break;
      case (2):
        b[s00 + n] |= plane_val;
        break;
      case (3):
        b[s00 + n + 1] |= plane_val;
        b[s00 + n] |= plane_val;
        break;
      case (4):
        b[s00 + 1] |= plane_val;
        break;
      case (5):
        b[s00 + n + 1] |= plane_val;
        b[s00 + 1] |= plane_val;
        break;
      case (6):
        b[s00 + n] |= plane_val;
        b[s00 + 1] |= plane_val;
        break;
      case (7):
        b[s00 + n + 1] |= plane_val;
        b[s00 + n] |= plane_val;
        b[s00 + 1] |= plane_val;
        break;
      case (8):
        b[s00] |= plane_val;
        break;
      case (9):
        b[s00 + n + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (10):
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (11):
        b[s00 + n + 1] |= plane_val;
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (12):
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (13):
        b[s00 + n + 1] |= plane_val;
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (14):
        b[s00 + n] |= plane_val;
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (15):
        b[s00 + n + 1] |= plane_val;
        b[s00 + n] |= plane_val;
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      }
      s00 += 2;
      k += 1;
    }
    if (j < ny) {
      switch (a[k]) {
      case (0):
        break;
      case (1):
        break;
      case (2):
        b[s00 + n] |= plane_val;
        break;
      case (3):
        b[s00 + n] |= plane_val;
        break;
      case (4):
        break;
      case (5):
        break;
      case (6):
        b[s00 + n] |= plane_val;
        break;
      case (7):
        b[s00 + n] |= plane_val;
        break;
      case (8):
        b[s00] |= plane_val;
        break;
      case (9):
        b[s00] |= plane_val;
        break;
      case (10):
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (11):
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (12):
        b[s00] |= plane_val;
        break;
      case (13):
        b[s00] |= plane_val;
        break;
      case (14):
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (15):
        b[s00 + n] |= plane_val;
        b[s00] |= plane_val;
        break;
      }
      k += 1;
    }
  }
  if (i < nx) {
    s00 = n * i;
    for (j = 0; j < ny - 1; j += 2) {
      switch (a[k]) {
      case (0):
        break;
      case (1):
        break;
      case (2):
        break;
      case (3):
        break;
      case (4):
        b[s00 + 1] |= plane_val;
        break;
      case (5):
        b[s00 + 1] |= plane_val;
        break;
      case (6):
        b[s00 + 1] |= plane_val;
        break;
      case (7):
        b[s00 + 1] |= plane_val;
        break;
      case (8):
        b[s00] |= plane_val;
        break;
      case (9):
        b[s00] |= plane_val;
        break;
      case (10):
        b[s00] |= plane_val;
        break;
      case (11):
        b[s00] |= plane_val;
        break;
      case (12):
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (13):
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (14):
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      case (15):
        b[s00 + 1] |= plane_val;
        b[s00] |= plane_val;
        break;
      }
      s00 += 2;
      k += 1;
    }
    if (j < ny) {
      switch (a[k]) {
      case (0):
        break;
      case (1):
        break;
      case (2):
        break;
      case (3):
        break;
      case (4):
        break;
      case (5):
        break;
      case (6):
        break;
      case (7):
        break;
      case (8):
        b[s00] |= plane_val;
        break;
      case (9):
        b[s00] |= plane_val;
        break;
      case (10):
        b[s00] |= plane_val;
        break;
      case (11):
        b[s00] |= plane_val;
        break;
      case (12):
        b[s00] |= plane_val;
        break;
      case (13):
        b[s00] |= plane_val;
        break;
      case (14):
        b[s00] |= plane_val;
        break;
      case (15):
        b[s00] |= plane_val;
        break;
      }
      k += 1;
    }
  }
}
```