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

```asm
<BWTIncMergeBwt>:
  endbr64
  push   %r15
  mov    %rcx,%r10
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  movl   $0x0,(%rcx)
  mov    %rdx,-0x8(%rsp)
  xor    %edx,%edx
  mov    %r9d,-0x1c(%rsp)
  xor    %r9d,%r9d
  mov    %r8d,-0xc(%rsp)
  test   %r8d,%r8d
  je     L107
  mov    %rsi,%r14
  xor    %edi,%edi
  xor    %r9d,%r9d
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  xor    %edx,%edx
  xor    %r13d,%r13d
  xor    %r8d,%r8d
  cmp    %edx,-0x1c(%rsp)
  jb     L253
  nopw   0x0(%rax,%rax,1)
L208:
  mov    -0x8(%rsp),%r15
  mov    -0x1c(%rsp),%esi
  jmp    L230
  nopl   0x0(%rax,%rax,1)
L199:
  test   %ecx,%ecx
  je     L8
  mov    $0xf,%ecx
  mov    (%r15,%rax,4),%eax
  add    $0x1,%ebp
  sub    %r9d,%ecx
  add    $0x1,%r9d
  add    %ecx,%ecx
  shl    %cl,%eax
  or     %eax,%edi
  mov    %edi,(%r11)
  cmp    $0x10,%r9d
  jne    L8
  lea    0x1(%rbx),%r8d
  xor    %edi,%edi
  xor    %r9d,%r9d
  lea    (%r10,%r8,4),%r11
  mov    %r8,%rbx
  movl   $0x0,(%r11)
  nopl   (%rax)
L8:
  add    $0x1,%edx
  cmp    %edx,%esi
  jb     L21
L230:
  mov    %edx,%eax
  lea    (%r10,%r8,4),%r11
  mov    (%r12,%rax,4),%ecx
  cmp    %r13d,%ecx
  jbe    L199
  mov    %ecx,%eax
L262:
  mov    %r13d,%esi
  mov    %eax,%r15d
  mov    %r13d,%ecx
  shr    $0x4,%esi
  sub    %r13d,%r15d
  and    $0xf,%ecx
  mov    %esi,-0x18(%rsp)
  mov    (%r14,%rsi,4),%r8d
  lea    (%r9,%r9,1),%esi
  mov    %esi,-0x10(%rsp)
  mov    $0x10,%esi
  sub    %r9d,%esi
  mov    %r15d,-0x14(%rsp)
  cmp    %r15d,%esi
  cmova  %r15d,%esi
  add    %r13d,%esi
  cmp    %r9d,%ecx
  ja     L110
  jae    L220
  mov    %ecx,%r15d
  mov    %r9d,%r13d
  sub    %r9d,%r15d
  sub    %ecx,%r13d
  add    %ecx,%ecx
  lea    0x20(%r15,%r15,1),%r9d
  mov    %r8d,%r15d
  add    %r13d,%r13d
  shl    %cl,%r15d
  movzbl -0x10(%rsp),%ecx
  shr    %cl,%r15d
  or     %edi,%r15d
  mov    %r15d,(%r11)
  cmp    %esi,%eax
  jbe    L203
  mov    -0x18(%rsp),%r15d
  mov    %edx,-0x10(%rsp)
  mov    %ebp,-0x18(%rsp)
  mov    %r15d,%edi
  nopw   0x0(%rax,%rax,1)
L266:
  add    $0x1,%edi
  mov    %r9d,%ecx
  add    $0x10,%esi
  shl    %cl,%r8d
  mov    %edi,%ecx
  mov    %r8d,%ebp
  mov    (%r14,%rcx,4),%r8d
  mov    %edi,%ecx
  sub    %r15d,%ecx
  lea    (%rcx,%rbx,1),%r11d
  mov    %r8d,%edx
  mov    %r13d,%ecx
  shr    %cl,%edx
  mov    %edx,%ecx
  or     %ebp,%ecx
  mov    %ecx,(%r10,%r11,4)
  cmp    %esi,%eax
  ja     L266
  mov    -0x18(%rsp),%ebp
  mov    -0x10(%rsp),%edx
L203:
  add    -0x14(%rsp),%ebp
  xor    %edi,%edi
  mov    %ebp,%ebx
  mov    %ebp,%r9d
  shr    $0x4,%ebx
  mov    %ebx,%r8d
  lea    (%r10,%r8,4),%rsi
  and    $0xf,%r9d
  je     L68
  mov    $0x10,%ecx
  mov    (%rsi),%edi
  sub    %r9d,%ecx
  add    %ecx,%ecx
  shr    %cl,%edi
  shl    %cl,%edi
L68:
  mov    %edi,(%rsi)
  cmp    -0xc(%rsp),%eax
  jae    L192
  mov    %eax,%r13d
  cmp    %edx,-0x1c(%rsp)
  jae    L208
L253:
  mov    -0xc(%rsp),%eax
  lea    (%r10,%r8,4),%r11
  jmp    L262
  nopl   0x0(%rax,%rax,1)
L21:
  mov    -0xc(%rsp),%eax
  jmp    L262
  nopl   0x0(%rax)
L220:
  mov    -0x10(%rsp),%r15d
  mov    %r15d,%ecx
  shl    %cl,%r8d
  shr    %cl,%r8d
  or     %edi,%r8d
  mov    %r8d,(%r11)
  cmp    %esi,%eax
  jbe    L203
  mov    -0x18(%rsp),%r9d
  mov    %r9d,%ecx
  nopl   0x0(%rax,%rax,1)
L23:
  lea    0x1(%rcx),%r8d
  add    $0x10,%esi
  mov    %r8d,%edi
  mov    %r8,%rcx
  mov    (%r14,%r8,4),%r8d
  sub    %r9d,%edi
  add    %ebx,%edi
  mov    %edi,%edi
  mov    %r8d,(%r10,%rdi,4)
  cmp    %esi,%eax
  ja     L23
  jmp    L203
  nopl   (%rax)
L110:
  mov    %ecx,%r13d
  sub    %r9d,%r13d
  lea    0x0(%r13,%r13,1),%r15d
  mov    $0x10,%r13d
  sub    %ecx,%r13d
  add    %ecx,%ecx
  add    %r9d,%r13d
  mov    -0x18(%rsp),%r9d
  shl    %cl,%r8d
  movzbl -0x10(%rsp),%ecx
  add    %r13d,%r13d
  add    $0x1,%r9d
  shr    %cl,%r8d
  mov    %r13d,%ecx
  mov    (%r14,%r9,4),%r9d
  or     %edi,%r8d
  mov    %r9d,%edi
  shr    %cl,%edi
  or     %edi,%r8d
  mov    %r8d,(%r11)
  cmp    %esi,%eax
  jbe    L203
  mov    -0x18(%rsp),%ecx
  mov    %edx,-0x18(%rsp)
  sub    %ecx,%ebx
  lea    0x2(%rcx),%edi
  sub    $0x1,%ebx
  jmp    L133
  nopw   0x0(%rax,%rax,1)
L32:
  add    $0x1,%edi
L133:
  mov    %r9d,%r11d
  mov    %r15d,%ecx
  lea    (%rbx,%rdi,1),%r8d
  add    $0x10,%esi
  shl    %cl,%r11d
  mov    %edi,%ecx
  mov    (%r14,%rcx,4),%r9d
  mov    %r13d,%ecx
  mov    %r9d,%edx
  shr    %cl,%edx
  mov    %edx,%ecx
  or     %r11d,%ecx
  mov    %ecx,(%r10,%r8,4)
  cmp    %esi,%eax
  ja     L32
  mov    -0x18(%rsp),%edx
  jmp    L203
  nopw   0x0(%rax,%rax,1)
L192:
  cmp    %edx,-0x1c(%rsp)
  jb     L254
L107:
  mov    -0x8(%rsp),%r11
  mov    -0x1c(%rsp),%r8d
  mov    $0xf,%edi
  nopl   (%rax)
L231:
  mov    %edx,%eax
  mov    (%r12,%rax,4),%ecx
  test   %ecx,%ecx
  je     L18
  mov    %edi,%ecx
  mov    (%r11,%rax,4),%eax
  mov    %ebx,%esi
  sub    %r9d,%ecx
  add    $0x1,%r9d
  add    %ecx,%ecx
  shl    %cl,%eax
  or     %eax,(%r10,%rsi,4)
  cmp    $0x10,%r9d
  jne    L18
  lea    0x1(%rbx),%eax
  xor    %r9d,%r9d
  movl   $0x0,(%r10,%rax,4)
  mov    %rax,%rbx
L18:
  add    $0x1,%edx
  cmp    %edx,%r8d
  jae    L231
L254:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void BWTIncMergeBwt(const unsigned int *sortedRank, const unsigned int *oldBwt, const unsigned int *insertBwt, unsigned int *__restrict mergedBwt, const unsigned int numOldBwt, const unsigned int numInsertBwt) {
  unsigned int bitsInWordMinusBitPerChar;
  unsigned int leftShift, rightShift;
  unsigned int o;
  unsigned int oIndex, iIndex, mIndex;
  unsigned int mWord, mChar, oWord, oChar;
  unsigned int numInsert;
  bitsInWordMinusBitPerChar = 32 - 2;
  oIndex = 0;
  iIndex = 0;
  mIndex = 0;
  mWord = 0;
  mChar = 0;
  mergedBwt[0] = 0;
  while (oIndex < numOldBwt) {
    while (iIndex <= numInsertBwt && sortedRank[iIndex] <= oIndex) {
      if (sortedRank[iIndex] != 0) {
        mergedBwt[mWord] |= insertBwt[iIndex] << (32 - (mChar + 1) * 2);
        mIndex++;
        mChar++;
        if (mChar == 16) {
          mChar = 0;
          mWord++;
          mergedBwt[mWord] = 0;
        }
      }
      iIndex++;
    }
    if (iIndex <= numInsertBwt) {
      o = sortedRank[iIndex];
    } else {
      o = numOldBwt;
    }
    numInsert = o - oIndex;
    oWord = oIndex / 16;
    oChar = oIndex - oWord * 16;
    if (oChar > mChar) {
      leftShift = (oChar - mChar) * 2;
      rightShift = (16 + mChar - oChar) * 2;
      mergedBwt[mWord] = mergedBwt[mWord] | (oldBwt[oWord] << (oChar * 2) >> (mChar * 2)) | (oldBwt[oWord + 1] >> rightShift);
      oIndex += (((numInsert) < (16 - mChar)) ? (numInsert) : (16 - mChar));
      while (o > oIndex) {
        oWord++;
        mWord++;
        mergedBwt[mWord] = (oldBwt[oWord] << leftShift) | (oldBwt[oWord + 1] >> rightShift);
        oIndex += 16;
      }
    } else if (oChar < mChar) {
      rightShift = (mChar - oChar) * 2;
      leftShift = (16 + oChar - mChar) * 2;
      mergedBwt[mWord] = mergedBwt[mWord] | (oldBwt[oWord] << (oChar * 2) >> (mChar * 2));
      oIndex += (((numInsert) < (16 - mChar)) ? (numInsert) : (16 - mChar));
      while (o > oIndex) {
        oWord++;
        mWord++;
        mergedBwt[mWord] = (oldBwt[oWord - 1] << leftShift) | (oldBwt[oWord] >> rightShift);
        oIndex += 16;
      }
    } else {
      mergedBwt[mWord] = mergedBwt[mWord] | ((oldBwt[oWord]) << (mChar * 2) >> (mChar * 2));
      oIndex += (((numInsert) < (16 - mChar)) ? (numInsert) : (16 - mChar));
      while (o > oIndex) {
        oWord++;
        mWord++;
        mergedBwt[mWord] = oldBwt[oWord];
        oIndex += 16;
      }
    }
    oIndex = o;
    mIndex += numInsert;
    mWord = mIndex / 16;
    mChar = mIndex - mWord * 16;
    if (mChar == 0) {
      mergedBwt[mWord] = 0;
    } else {
      mergedBwt[mWord] = ((mergedBwt[mWord]) >> ((32 - mChar * 2)) << ((32 - mChar * 2)));
    }
  }
  while (iIndex <= numInsertBwt) {
    if (sortedRank[iIndex] != 0) {
      mergedBwt[mWord] |= insertBwt[iIndex] << (32 - (mChar + 1) * 2);
      mIndex++;
      mChar++;
      if (mChar == 16) {
        mChar = 0;
        mWord++;
        mergedBwt[mWord] = 0;
      }
    }
    iIndex++;
  }
}
```