user: 请从给定的汇编指令推导出C源代码：

```asm
<BWTIncMergeBwt>:
  endbr64
  push   %r15
  mov    %rcx,%r10
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movl   $0x0,(%rcx)
  mov    %rdx,-0x10(%rsp)
  xor    %edx,%edx
  mov    %r9d,-0x28(%rsp)
  xor    %r9d,%r9d
  mov    %rdi,-0x18(%rsp)
  mov    %r8d,-0x1c(%rsp)
  test   %r8d,%r8d
  je     L69
  mov    %rsi,%r14
  xor    %edi,%edi
  xor    %r9d,%r9d
  xor    %r15d,%r15d
  xor    %r12d,%r12d
  xor    %edx,%edx
  xor    %ebp,%ebp
  xor    %r8d,%r8d
  cmp    %edx,-0x28(%rsp)
  jb     L163
  nopl   0x0(%rax,%rax,1)
L91:
  mov    -0x18(%rsp),%rsi
  mov    -0x10(%rsp),%r13
  mov    -0x28(%rsp),%ebx
  jmp    L55
L203:
  test   %ecx,%ecx
  je     L90
  mov    $0xf,%ecx
  mov    0x0(%r13,%rax,4),%eax
  add    $0x1,%r12d
  sub    %r9d,%ecx
  add    $0x1,%r9d
  add    %ecx,%ecx
  shl    %cl,%eax
  or     %eax,%edi
  mov    %edi,(%r11)
  cmp    $0x10,%r9d
  jne    L90
  lea    0x1(%r15),%r8d
  xor    %edi,%edi
  xor    %r9d,%r9d
  lea    (%r10,%r8,4),%r11
  mov    %r8,%r15
  movl   $0x0,(%r11)
  nop
L90:
  add    $0x1,%edx
  cmp    %edx,%ebx
  jb     L79
L55:
  mov    %edx,%eax
  lea    (%r10,%r8,4),%r11
  mov    (%rsi,%rax,4),%ecx
  cmp    %ebp,%ecx
  jbe    L203
  mov    %ecx,%eax
L113:
  mov    %ebp,%ebx
  mov    %eax,%r13d
  mov    %ebp,%ecx
  shr    $0x4,%ebx
  sub    %ebp,%r13d
  and    $0xf,%ecx
  mov    %ebx,%esi
  mov    %r13d,-0x24(%rsp)
  mov    (%r14,%rsi,4),%r8d
  lea    (%r9,%r9,1),%esi
  mov    %esi,-0x20(%rsp)
  mov    $0x10,%esi
  sub    %r9d,%esi
  cmp    %r13d,%esi
  cmova  %r13d,%esi
  add    %ebp,%esi
  cmp    %r9d,%ecx
  ja     L198
  jae    L99
  mov    %ecx,%r13d
  mov    %r9d,%ebp
  sub    %r9d,%r13d
  sub    %ecx,%ebp
  add    %ecx,%ecx
  lea    0x20(%r13,%r13,1),%r9d
  mov    %r8d,%r13d
  add    %ebp,%ebp
  shl    %cl,%r13d
  movzbl -0x20(%rsp),%ecx
  shr    %cl,%r13d
  or     %edi,%r13d
  mov    %r13d,(%r11)
  cmp    %esi,%eax
  jbe    L257
  mov    %edx,-0x20(%rsp)
  mov    %ebx,%edi
  nop
L139:
  add    $0x1,%edi
  mov    %r9d,%ecx
  add    $0x10,%esi
  shl    %cl,%r8d
  mov    %edi,%ecx
  mov    %r8d,%r13d
  mov    (%r14,%rcx,4),%r8d
  mov    %edi,%ecx
  sub    %ebx,%ecx
  lea    (%rcx,%r15,1),%r11d
  mov    %r8d,%edx
  mov    %ebp,%ecx
  shr    %cl,%edx
  mov    %edx,%ecx
  or     %r13d,%ecx
  mov    %ecx,(%r10,%r11,4)
  cmp    %esi,%eax
  ja     L139
  mov    -0x20(%rsp),%edx
L257:
  add    -0x24(%rsp),%r12d
  mov    %r12d,%r15d
  mov    %r12d,%r9d
  shr    $0x4,%r15d
  mov    %r15d,%r8d
  lea    (%r10,%r8,4),%rsi
  and    $0xf,%r9d
  jne    L40
  movl   $0x0,(%rsi)
  cmp    -0x1c(%rsp),%eax
  jae    L96
  xor    %edi,%edi
L34:
  mov    %eax,%ebp
  cmp    %edx,-0x28(%rsp)
  jae    L91
L163:
  mov    -0x1c(%rsp),%eax
  lea    (%r10,%r8,4),%r11
  jmp    L113
  nopl   0x0(%rax,%rax,1)
L40:
  mov    $0x10,%ecx
  mov    (%rsi),%edi
  sub    %r9d,%ecx
  add    %ecx,%ecx
  shr    %cl,%edi
  shl    %cl,%edi
  mov    %edi,(%rsi)
  cmp    -0x1c(%rsp),%eax
  jb     L34
L96:
  cmp    %edx,-0x28(%rsp)
  jb     L237
L69:
  mov    -0x18(%rsp),%r8
  mov    -0x10(%rsp),%rbx
  mov    $0xf,%edi
  mov    -0x28(%rsp),%r11d
  nopw   0x0(%rax,%rax,1)
L87:
  mov    %edx,%eax
  mov    (%r8,%rax,4),%ecx
  test   %ecx,%ecx
  je     L81
  mov    %edi,%ecx
  mov    (%rbx,%rax,4),%eax
  mov    %r15d,%esi
  sub    %r9d,%ecx
  add    $0x1,%r9d
  add    %ecx,%ecx
  shl    %cl,%eax
  or     %eax,(%r10,%rsi,4)
  cmp    $0x10,%r9d
  jne    L81
  lea    0x1(%r15),%eax
  xor    %r9d,%r9d
  movl   $0x0,(%r10,%rax,4)
  mov    %rax,%r15
  nopl   0x0(%rax)
L81:
  add    $0x1,%edx
  cmp    %edx,%r11d
  jae    L87
L237:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L79:
  mov    -0x1c(%rsp),%eax
  jmp    L113
  nopl   0x0(%rax)
L99:
  mov    -0x20(%rsp),%r9d
  mov    %r9d,%ecx
  shl    %cl,%r8d
  shr    %cl,%r8d
  or     %edi,%r8d
  mov    %r8d,(%r11)
  cmp    %esi,%eax
  jbe    L257
  mov    %ebx,%ecx
  xchg   %ax,%ax
L93:
  lea    0x1(%rcx),%r8d
  add    $0x10,%esi
  mov    %r8d,%edi
  mov    %r8,%rcx
  mov    (%r14,%r8,4),%r8d
  sub    %ebx,%edi
  add    %r15d,%edi
  mov    %edi,%edi
  mov    %r8d,(%r10,%rdi,4)
  cmp    %esi,%eax
  ja     L93
  jmp    L257
  nopl   (%rax)
L198:
  mov    %ecx,%ebp
  sub    %r9d,%ebp
  lea    0x0(%rbp,%rbp,1),%r13d
  mov    $0x10,%ebp
  sub    %ecx,%ebp
  add    %ecx,%ecx
  add    %r9d,%ebp
  shl    %cl,%r8d
  lea    0x1(%rbx),%r9d
  movzbl -0x20(%rsp),%ecx
  mov    %r9d,-0x4(%rsp)
  add    %ebp,%ebp
  mov    (%r14,%r9,4),%r9d
  shr    %cl,%r8d
  mov    %ebp,%ecx
  mov    %r9d,-0x8(%rsp)
  or     %edi,%r8d
  shr    %cl,%r9d
  or     %r9d,%r8d
  mov    %r8d,(%r11)
  cmp    %esi,%eax
  jbe    L257
  add    $0x2,%ebx
  lea    0x1(%r15),%edi
  add    $0x10,%esi
  mov    (%r14,%rbx,4),%r9d
  mov    -0x8(%rsp),%ebx
  mov    %rdi,%r8
  shr    %cl,%r9d
  mov    %r13d,%ecx
  shl    %cl,%ebx
  or     %ebx,%r9d
  mov    %r9d,(%r10,%rdi,4)
  cmp    %esi,%eax
  jbe    L257
  mov    -0x4(%rsp),%r11d
  sub    %r15d,%r11d
  nopw   0x0(%rax,%rax,1)
L59:
  lea    (%r11,%r8,1),%ecx
  lea    0x1(%r8),%r9d
  add    $0x10,%esi
  mov    (%r14,%rcx,4),%ebx
  lea    (%r9,%r11,1),%ecx
  mov    %r9,%r8
  mov    (%r14,%rcx,4),%edi
  mov    %ebp,%ecx
  shr    %cl,%edi
  mov    %r13d,%ecx
  shl    %cl,%ebx
  or     %ebx,%edi
  mov    %edi,(%r10,%r9,4)
  cmp    %esi,%eax
  ja     L59
  jmp    L257
```

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++;
  }
}
```