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

```asm
<derive_first_word>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %edi,%r12d
  xor    %edi,%edi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  test   %rsi,%rsi
  setne  %dil
  call   <assert@plt>
  cmp    $0x1,%r12d
  jle    L76
  mov    $0x1,%edi
  call   <assert@plt>
  xor    %edi,%edi
  test   %r13,%r13
  setne  %dil
  call   <assert@plt>
  xor    %edi,%edi
  cmpl   $0x4,0x0(%rbp)
  setg   %dil
  call   <assert@plt>
  movsbl (%rbx),%edi
  call   <vowel_Q@plt>
  mov    %eax,%edi
  cmp    $0x1,%eax
  jne    L14
L35:
  call   <assert@plt>
  movsbl (%rbx),%edi
  call   <vowel_Q@plt>
  cmp    $0x1,%eax
  je     L12
  movl   $0x2,0x20(%rsp)
  mov    %rbx,%r14
  mov    $0x1,%r15d
  movl   $0x3,0x28(%rsp)
  movq   $0x2,0x8(%rsp)
  movl   $0x4,0x24(%rsp)
  movl   $0x5,0x2c(%rsp)
  movq   $0x4,0x18(%rsp)
  movq   $0x3,0x10(%rsp)
L168:
  movsbl (%r14),%edi
  call   <consonant_Q@plt>
  cmp    $0x1,%eax
  je     L36
L27:
  mov    0x0(%rbp),%eax
L177:
  cmp    %eax,%r12d
  jge    L89
L76:
  movl   $0x0,0x0(%rbp)
L89:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L14:
  movsbl (%rbx),%edi
  call   <consonant_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  jmp    L35
  cs nopw 0x0(%rax,%rax,1)
L12:
  movsbl 0x1(%rbx),%edi
  call   <consonant_Q@plt>
  test   %eax,%eax
  je     L76
  movsbl 0x2(%rbx),%edi
  call   <consonant_Q@plt>
  test   %eax,%eax
  je     L76
  movsbl 0x1(%rbx),%edi
  lea    0x2(%rbx),%r14
  mov    $0x3,%r15d
  call   <consonant_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  movsbl 0x2(%rbx),%edi
  call   <consonant_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  movl   $0x4,0x20(%rsp)
  movl   $0x5,0x28(%rsp)
  movq   $0x4,0x8(%rsp)
  movl   $0x6,0x24(%rsp)
  movl   $0x7,0x2c(%rsp)
  movq   $0x6,0x18(%rsp)
  movq   $0x5,0x10(%rsp)
  jmp    L168
  nopw   0x0(%rax,%rax,1)
L36:
  add    %rbx,%r15
  movsbl (%r15),%edi
  call   <consonant_Q@plt>
  cmp    $0x1,%eax
  je     L48
  movsbl (%r15),%edi
  call   <vowel_Q@plt>
  cmp    $0x1,%eax
  jne    L27
  mov    0x8(%rsp),%rax
  movsbl (%rbx,%rax,1),%edi
  call   <tone_Q@plt>
  mov    %r13,%rdx
  mov    %r14,%rsi
  cmp    $0x1,%eax
  je     L29
  mov    0x20(%rsp),%edi
  call   <text_copy@plt>
  movl   $0x2,0x0(%rbp)
  jmp    L89
  nopl   (%rax)
L48:
  mov    0x8(%rsp),%r15
  add    %rbx,%r15
  movsbl (%r15),%edi
  call   <vowel_Q@plt>
  test   %eax,%eax
  je     L76
  movsbl (%r15),%edi
  call   <vowel_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    0x10(%rsp),%r15
  add    %rbx,%r15
  movsbl (%r15),%edi
  call   <tone_Q@plt>
  cmp    $0x1,%eax
  je     L193
  movsbl (%r15),%edi
  call   <consonant_Q@plt>
  test   %eax,%eax
  je     L76
  movsbl (%r15),%edi
  call   <consonant_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    0x24(%rsp),%edi
  mov    %r13,%rdx
  mov    %r14,%rsi
  call   <text_copy@plt>
  movl   $0x4,0x0(%rbp)
  mov    $0x4,%eax
  jmp    L177
L193:
  add    0x18(%rsp),%rbx
  movsbl (%rbx),%edi
  call   <consonant_Q@plt>
  test   %eax,%eax
  je     L76
  movsbl (%rbx),%edi
  call   <consonant_Q@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    0x2c(%rsp),%edi
  mov    %r13,%rdx
  mov    %r14,%rsi
  call   <text_copy@plt>
  movl   $0x5,0x0(%rbp)
  mov    $0x5,%eax
  jmp    L177
L29:
  mov    0x28(%rsp),%edi
  call   <text_copy@plt>
  movl   $0x3,0x0(%rbp)
  mov    $0x3,%eax
  jmp    L177
```

assistant: ```c
void derive_first_word(const uint8_t ACC_GEN_size, const char *restrict ACC_independentClause, uint8_t *restrict DAT_GEN_size, char *restrict DAT_word) {
  uint8_t start = 0;
  assert(ACC_independentClause != NULL);
  if (ACC_GEN_size < 2) {
    *DAT_GEN_size = (uint8_t)0;
    return;
    ;
  }
  assert(ACC_GEN_size > 1);
  assert(DAT_word != NULL);
  assert(*DAT_GEN_size >= 0x05);
  assert(vowel_Q(ACC_independentClause[start + 0]) == 1 || consonant_Q(ACC_independentClause[start + 0]) == 1);
  if (vowel_Q(ACC_independentClause[start]) == 1) {
    if (consonant_Q(ACC_independentClause[start + 1]) == 0 || consonant_Q(ACC_independentClause[start + 2]) == 0) {
      *DAT_GEN_size = (uint8_t)0;
      return;
      ;
    }
    assert(consonant_Q(ACC_independentClause[start + 1]) == 1);
    assert(consonant_Q(ACC_independentClause[start + 2]) == 1);
    start = 2;
  }
  if (consonant_Q(ACC_independentClause[start]) == 1) {
    if (consonant_Q(ACC_independentClause[start + 1]) == 1) {
      if (vowel_Q(ACC_independentClause[start + 2]) == 0) {
        *DAT_GEN_size = (uint8_t)0;
        return;
        ;
      }
      assert(vowel_Q(ACC_independentClause[start + 2]) == 1);
      if (tone_Q(ACC_independentClause[start + 3]) == 1) {
        if (consonant_Q(ACC_independentClause[start + 4]) == 0) {
          *DAT_GEN_size = (uint8_t)0;
          return;
          ;
        }
        assert(consonant_Q(ACC_independentClause[start + 4]) == 1);
        text_copy((uint8_t)(start + 5), ACC_independentClause + start, DAT_word);
        *DAT_GEN_size = (uint8_t)5;
      } else {
        if (consonant_Q(ACC_independentClause[start + 3]) == 0) {
          *DAT_GEN_size = (uint8_t)0;
          return;
          ;
        }
        assert(consonant_Q(ACC_independentClause[start + 3]) == 1);
        text_copy((uint8_t)(start + 4), ACC_independentClause + start, DAT_word);
        *DAT_GEN_size = (uint8_t)4;
      }
    } else if (vowel_Q(ACC_independentClause[start + 1]) == 1) {
      if (tone_Q(ACC_independentClause[start + 2]) == 1) {
        text_copy((uint8_t)(start + 3), ACC_independentClause + start, DAT_word);
        *DAT_GEN_size = (uint8_t)3;
      } else {
        text_copy((uint8_t)(start + 2), ACC_independentClause + start, DAT_word);
        *DAT_GEN_size = (uint8_t)2;
      }
    }
  }
  if (ACC_GEN_size < *DAT_GEN_size) {
    *DAT_GEN_size = 0;
  }
}
```