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

```asm
<prs_decompress_size>:
  endbr64
  mov    (%rdi),%r10d
  lea    0x4(%rdi),%rcx
  mov    $0x0,%eax
  mov    $0x9,%edi
  mov    $0x8,%r8d
  mov    $0x7,%r9d
  jmp    L107
L50:
  mov    %r10d,%esi
  sar    %esi
  test   $0x1,%r10b
  jne    L118
  mov    %edi,%edx
  sub    $0x2,%edx
  jne    L92
  mov    (%rcx),%r10d
  add    $0x4,%rcx
  mov    %r8d,%edi
  jmp    L195
L118:
  mov    %esi,%r10d
  mov    %edx,%edi
L70:
  add    $0x4,%rcx
  add    $0x4,%rax
  jmp    L107
L150:
  mov    %r8d,%edi
  jmp    L70
L92:
  sar    $0x2,%r10d
  test   $0x1,%sil
  je     L122
  mov    %edx,%edi
  jmp    L203
L85:
  mov    0x8(%rcx),%edx
  add    $0xc,%rcx
  add    $0x1,%edx
  jne    L65
L107:
  mov    %edi,%edx
  sub    $0x1,%edx
  jne    L50
  mov    (%rcx),%edx
  add    $0x4,%rcx
  mov    %edx,%r10d
  sar    %r10d
  mov    %r9d,%edi
  test   $0x1,%dl
  jne    L150
L195:
  mov    %r10d,%edx
  and    $0x1,%edx
  sar    %r10d
  test   %edx,%edx
  je     L36
L203:
  mov    (%rcx),%edx
  mov    0x4(%rcx),%esi
  shl    $0x8,%esi
  or     %edx,%esi
  je     L169
  and    $0x7,%edx
  je     L85
  add    $0x8,%rcx
  add    $0x2,%edx
L186:
  mov    $0x0,%esi
L139:
  add    $0x1,%esi
  cmp    %edx,%esi
  jne    L139
  mov    %edx,%edx
  lea    (%rax,%rdx,4),%rax
  jmp    L107
L122:
  sub    $0x3,%edi
  jne    L165
  mov    (%rcx),%edx
  add    $0x4,%rcx
  mov    %edx,%esi
  and    $0x1,%esi
  sar    %edx
  mov    %r9d,%edi
L105:
  mov    %edx,%r10d
  sar    %r10d
  and    $0x1,%edx
  add    %esi,%esi
  or     %esi,%edx
  add    $0x2,%edx
  add    $0x4,%rcx
L65:
  test   %edx,%edx
  jle    L107
  jmp    L186
L36:
  sub    $0x1,%edi
L165:
  mov    %r10d,%esi
  and    $0x1,%esi
  mov    %r10d,%edx
  sar    %edx
  sub    $0x1,%edi
  jne    L105
  mov    (%rcx),%edx
  add    $0x4,%rcx
  mov    %r8d,%edi
  jmp    L105
L169:
  sar    $0x2,%rax
  ret
```

assistant: ```c
uint32_t prs_decompress_size(void *source) {
  uint32_t r0, r3, r5, r6, r9;
  uint32_t bitpos = 9;
  uint8_t *sourceptr = (uint8_t *)source;
  uint8_t *destptr = NULL;
  uint8_t *destptr_orig = NULL;
  uint8_t currentbyte, lastbyte;
  bool flag;
  int offset;
  uint32_t x, t;
  currentbyte = sourceptr[0];
  sourceptr++;
  for (;;) {
    bitpos--;
    if (bitpos == 0) {
      lastbyte = currentbyte = sourceptr[0];
      bitpos = 8;
      sourceptr++;
    }
    flag = currentbyte & 1;
    currentbyte = currentbyte >> 1;
    if (flag) {
      sourceptr++;
      destptr++;
      continue;
    }
    bitpos--;
    if (bitpos == 0) {
      lastbyte = currentbyte = sourceptr[0];
      bitpos = 8;
      sourceptr++;
    }
    flag = currentbyte & 1;
    currentbyte = currentbyte >> 1;
    if (flag) {
      r3 = sourceptr[0];
      offset = (sourceptr[1] << 8) | r3;
      sourceptr += 2;
      if (offset == 0) {
        return (uint32_t)(destptr - destptr_orig);
      }
      r3 = r3 & 0x00000007;
      r5 = (offset >> 3) | 0xFFFFE000;
      if (r3 == 0) {
        r3 = sourceptr[0];
        sourceptr++;
        r3++;
      } else {
        r3 += 2;
      }
      r5 += (uint32_t)destptr;
    } else {
      r3 = 0;
      for (x = 0; x < 2; x++) {
        bitpos--;
        if (bitpos == 0) {
          lastbyte = currentbyte = sourceptr[0];
          bitpos = 8;
          sourceptr++;
        }
        flag = currentbyte & 1;
        currentbyte = currentbyte >> 1;
        offset = r3 << 1;
        r3 = offset | flag;
      }
      offset = sourceptr[0] | 0xFFFFFF00;
      r3 += 2;
      sourceptr++;
      r5 = offset + (uint32_t)destptr;
    }
    if (r3 == 0) {
      continue;
    }
    t = r3;
    for (x = 0; x < t; x++) {
      r5++;
      r3++;
      destptr++;
    }
  }
}
```