user: What is the c source code of the assembly code below?

```asm
<buf2xys>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r10
  mov    %esi,%ebp
  mov    %edx,-0x4(%rsp)
  mov    $0x1f,%r13d
  sub    %ecx,%r13d
  cmp    $0x1e,%r13d
  jg     L52
  mov    %ecx,%r14d
  mov    $0x0,%r15d
  mov    $0x0,%r12d
  mov    $0x0,%edx
  mov    $0x1f,%r11d
  mov    $0x7,%ebx
L105:
  lea    0x7(%rdx),%eax
  test   %edx,%edx
  cmovns %edx,%eax
  sar    $0x3,%eax
  cltq
  movzbl (%r10,%rax,1),%esi
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  lea    (%rdx,%rcx,1),%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %ebx,%ecx
  sub    %eax,%ecx
  sar    %cl,%esi
  and    $0x1,%esi
  lea    0x1(%rdx),%eax
  add    $0x2,%edx
  lea    0x7(%rax),%ecx
  test   %eax,%eax
  cmovns %eax,%ecx
  sar    $0x3,%ecx
  movslq %ecx,%rcx
  movzbl (%r10,%rcx,1),%edi
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %ebx,%ecx
  sub    %eax,%ecx
  sar    %cl,%edi
  and    $0x1,%edi
  mov    %r11d,%ecx
  shl    %cl,%edi
  or     %edi,%r12d
  shl    %cl,%esi
  or     %esi,%r15d
  sub    $0x1,%r11d
  cmp    %r13d,%r11d
  jne    L105
  mov    %r12d,-0x1c(%rsp)
  mov    %r15d,-0x18(%rsp)
  add    %r14d,%r14d
L5:
  test   %r8d,%r8d
  jle    L7
  mov    %ebp,%eax
  shr    $0x1f,%eax
  add    %eax,%ebp
  sar    %ebp
  neg    %ebp
  lea    0x1f(%rbp),%eax
  mov    %eax,-0x14(%rsp)
  mov    %r9,%r12
  mov    0x38(%rsp),%r15
  lea    -0x1(%r8),%eax
  lea    0x4(%r9,%rax,4),%rax
  mov    %rax,-0x10(%rsp)
  mov    %r13d,%eax
  sub    %ebp,%eax
  lea    -0x40(%rax,%rax,1),%eax
  mov    %eax,-0x8(%rsp)
  add    $0x1f,%ebp
  mov    $0x7,%ebx
  jmp    L0
L52:
  movl   $0x0,-0x18(%rsp)
  movl   $0x0,-0x1c(%rsp)
  mov    $0x0,%r14d
  jmp    L5
L37:
  mov    -0x18(%rsp),%r11d
  mov    -0x1c(%rsp),%r9d
  mov    %r14d,%edx
  mov    %r13d,%r8d
L97:
  lea    0x7(%rdx),%eax
  test   %edx,%edx
  cmovns %edx,%eax
  sar    $0x3,%eax
  cltq
  movzbl (%r10,%rax,1),%esi
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  lea    (%rdx,%rcx,1),%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %ebx,%ecx
  sub    %eax,%ecx
  sar    %cl,%esi
  and    $0x1,%esi
  lea    0x1(%rdx),%eax
  add    $0x2,%edx
  lea    0x7(%rax),%ecx
  test   %eax,%eax
  cmovns %eax,%ecx
  sar    $0x3,%ecx
  movslq %ecx,%rcx
  movzbl (%r10,%rcx,1),%edi
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %ebx,%ecx
  sub    %eax,%ecx
  sar    %cl,%edi
  and    $0x1,%edi
  mov    %r8d,%ecx
  shl    %cl,%edi
  or     %edi,%r9d
  shl    %cl,%esi
  or     %esi,%r11d
  sub    $0x1,%r8d
  cmp    %ebp,%r8d
  jne    L97
  mov    -0x8(%rsp),%eax
  lea    0x2(%rax,%r14,1),%r14d
L44:
  mov    %r9d,(%r12)
  mov    %r11d,(%r15)
  add    $0x4,%r12
  add    $0x4,%r15
  cmp    -0x10(%rsp),%r12
  je     L7
L0:
  cmp    %r13d,-0x14(%rsp)
  jl     L37
  mov    -0x18(%rsp),%r11d
  mov    -0x1c(%rsp),%r9d
  jmp    L44
L7:
  mov    -0x4(%rsp),%eax
  mov    %eax,%esi
  sub    $0x1,%esi
  js     L71
  lea    -0x1(%r14,%rax,1),%r8d
  mov    $0x7,%edi
  mov    0x40(%rsp),%r9
L15:
  mov    %r8d,%eax
  sub    %esi,%eax
  lea    0x7(%rax),%edx
  cmovns %eax,%edx
  sar    $0x3,%edx
  movslq %edx,%rdx
  movzbl (%r10,%rdx,1),%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  shr    $0x1d,%ecx
  add    %ecx,%eax
  and    $0x7,%eax
  sub    %ecx,%eax
  mov    %edi,%ecx
  sub    %eax,%ecx
  sar    %cl,%edx
  and    $0x1,%edx
  mov    %esi,%ecx
  shl    %cl,%rdx
  or     %rdx,(%r9)
  sub    $0x1,%esi
  cmp    $0xffffffff,%esi
  jne    L15
L71:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void buf2xys(const unsigned char *const buf, const int mapbits, const int metabits, const int skip, const int n, unsigned int *x, unsigned int *y, unsigned long long *meta) {
  int i, j;
  int offbits = 0;
  unsigned int xx = 0, yy = 0;
  for (i = 31; i > 31 - skip; i--) {
    int y0 = (buf[offbits / 8] >> (7 - offbits % 8)) & 1;
    offbits++;
    int x0 = (buf[offbits / 8] >> (7 - offbits % 8)) & 1;
    offbits++;
    xx |= x0 << i;
    yy |= y0 << i;
  }
  for (j = 0; j < n; j++) {
    unsigned int xj = xx;
    unsigned int yj = yy;
    for (i = 31 - skip; i > 31 - mapbits / 2; i--) {
      int y0 = (buf[offbits / 8] >> (7 - offbits % 8)) & 1;
      offbits++;
      int x0 = (buf[offbits / 8] >> (7 - offbits % 8)) & 1;
      offbits++;
      xj |= x0 << i;
      yj |= y0 << i;
    }
    x[j] = xj;
    y[j] = yj;
  }
  for (i = metabits - 1; i >= 0; i--) {
    unsigned long long m = (buf[offbits / 8] >> (7 - offbits % 8)) & 1;
    offbits++;
    *meta |= m << i;
  }
}
```