#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int consonant_Q(char const);
int /*<<< orphan*/ text_copy(int, char const *, char *);
int tone_Q(char const);
int vowel_Q(char const);
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;
  }
}


x86 assembly (clang, -O0):
<derive_first_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpl   $0x2,-0x4(%rbp)
jge    1199 <derive_first_word+0x49>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1535 <derive_first_word+0x3e5>
cmpl   $0x1,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x18(%rbp),%rax
cmpl   $0x5,(%rax)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <vowel_Q@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x1,%ecx
mov    %al,-0x25(%rbp)
je     1215 <derive_first_word+0xc5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
sete   %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <vowel_Q@plt>
cmp    $0x1,%eax
jne    12dc <derive_first_word+0x18c>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x0,%eax
je     127a <derive_first_word+0x12a>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x0,%eax
jne    1289 <derive_first_word+0x139>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1535 <derive_first_word+0x3e5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movl   $0x2,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
jne    151c <derive_first_word+0x3cc>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
jne    1482 <derive_first_word+0x332>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <vowel_Q@plt>
cmp    $0x0,%eax
jne    1343 <derive_first_word+0x1f3>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1535 <derive_first_word+0x3e5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <vowel_Q@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tone_Q@plt>
cmp    $0x1,%eax
jne    1405 <derive_first_word+0x2b5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x0,%eax
jne    13b6 <derive_first_word+0x266>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1535 <derive_first_word+0x3e5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x24(%rbp),%edi
add    $0x5,%edi
mov    -0x10(%rbp),%rsi
movslq -0x24(%rbp),%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
call   1050 <text_copy@plt>
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
jmp    147d <derive_first_word+0x32d>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x0,%eax
jne    1433 <derive_first_word+0x2e3>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    1535 <derive_first_word+0x3e5>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x24(%rbp),%edi
add    $0x4,%edi
mov    -0x10(%rbp),%rsi
movslq -0x24(%rbp),%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
call   1050 <text_copy@plt>
mov    -0x18(%rbp),%rax
movl   $0x4,(%rax)
jmp    1517 <derive_first_word+0x3c7>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <vowel_Q@plt>
cmp    $0x1,%eax
jne    1512 <derive_first_word+0x3c2>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tone_Q@plt>
cmp    $0x1,%eax
jne    14e9 <derive_first_word+0x399>
mov    -0x24(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%rsi
movslq -0x24(%rbp),%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
call   1050 <text_copy@plt>
mov    -0x18(%rbp),%rax
movl   $0x3,(%rax)
jmp    150d <derive_first_word+0x3bd>
mov    -0x24(%rbp),%edi
add    $0x2,%edi
mov    -0x10(%rbp),%rsi
movslq -0x24(%rbp),%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
call   1050 <text_copy@plt>
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
jmp    1512 <derive_first_word+0x3c2>
jmp    1517 <derive_first_word+0x3c7>
jmp    151c <derive_first_word+0x3cc>
mov    -0x4(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1535 <derive_first_word+0x3e5>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<derive_first_word>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x8(%rsp)
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %edi,%r15d
xor    %edi,%edi
test   %rsi,%rsi
setne  %dil
call   1060 <assert@plt>
cmp    $0x2,%r15d
jl     136f <derive_first_word+0x21f>
mov    $0x1,%ebx
mov    $0x1,%edi
call   1060 <assert@plt>
xor    %edi,%edi
cmpq   $0x0,0x8(%rsp)
setne  %dil
call   1060 <assert@plt>
mov    0x0(%r13),%r14d
xor    %edi,%edi
cmp    $0x5,%r14d
setge  %dil
call   1060 <assert@plt>
movsbl 0x0(%rbp),%edi
call   1030 <vowel_Q@plt>
cmp    $0x1,%eax
je     11d6 <derive_first_word+0x86>
movsbl 0x0(%rbp),%edi
call   1070 <consonant_Q@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
sete   %bl
mov    %ebx,%edi
call   1060 <assert@plt>
movsbl 0x0(%rbp),%edi
call   1030 <vowel_Q@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
jne    1242 <derive_first_word+0xf2>
movsbl 0x1(%rbp),%edi
call   1070 <consonant_Q@plt>
test   %eax,%eax
je     136f <derive_first_word+0x21f>
movsbl 0x2(%rbp),%edi
call   1070 <consonant_Q@plt>
test   %eax,%eax
je     136f <derive_first_word+0x21f>
movsbl 0x1(%rbp),%edi
call   1070 <consonant_Q@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
movsbl 0x2(%rbp),%edi
call   1070 <consonant_Q@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0x2,%ebx
mov    %ebx,%r12d
movsbl 0x0(%rbp,%r12,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
jne    136a <derive_first_word+0x21a>
mov    %ebx,0x4(%rsp)
mov    %r12,%rbx
or     $0x1,%rbx
movsbl 0x0(%rbp,%rbx,1),%edi
call   1070 <consonant_Q@plt>
cmp    $0x1,%eax
jne    12d6 <derive_first_word+0x186>
movsbl 0x2(%r12,%rbp,1),%edi
call   1030 <vowel_Q@plt>
test   %eax,%eax
mov    0x4(%rsp),%ebx
je     136f <derive_first_word+0x21f>
movsbl 0x2(%rbp,%r12,1),%edi
call   1030 <vowel_Q@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
movsbl 0x3(%r12,%rbp,1),%edi
call   1040 <tone_Q@plt>
cmp    $0x1,%eax
jne    1317 <derive_first_word+0x1c7>
movsbl 0x4(%rbp,%r12,1),%edi
call   1070 <consonant_Q@plt>
test   %eax,%eax
je     136f <derive_first_word+0x21f>
lea    (%r12,%rbp,1),%rax
add    $0x4,%rax
mov    $0x5,%r14d
jmp    133b <derive_first_word+0x1eb>
movsbl 0x0(%rbp,%rbx,1),%edi
call   1030 <vowel_Q@plt>
cmp    $0x1,%eax
jne    136a <derive_first_word+0x21a>
movsbl 0x2(%rbp,%r12,1),%edi
mov    %r12,%rbx
add    $0x2,%rbx
call   1040 <tone_Q@plt>
mov    0x4(%rsp),%ecx
add    $0x3,%ecx
xor    %r14d,%r14d
cmp    $0x1,%eax
sete   %r14b
cmovne %ebx,%ecx
mov    %ecx,%ebx
or     $0x2,%r14d
jmp    1354 <derive_first_word+0x204>
lea    (%r12,%rbp,1),%rax
add    $0x3,%rax
mov    %rax,0x10(%rsp)
movsbl (%rax),%edi
call   1070 <consonant_Q@plt>
mov    $0x4,%r14d
test   %eax,%eax
mov    0x10(%rsp),%rax
je     136f <derive_first_word+0x21f>
movsbl (%rax),%edi
call   1070 <consonant_Q@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
or     %r14d,%ebx
add    %r12,%rbp
mov    %ebx,%edi
mov    %rbp,%rsi
mov    0x8(%rsp),%rdx
call   1050 <text_copy@plt>
mov    %r14d,0x0(%r13)
cmp    %r15d,%r14d
jle    1377 <derive_first_word+0x227>
movl   $0x0,0x0(%r13)
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @derive_first_word(i32 %0, i8* noalias %1, i32* noalias %2, i8* noalias %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
store i32 0, i32* %9
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %4
%17 = load i32*, i32** %7
store i32 0, i32* %17
br label %259
18: ; preds = %4
%19 = load i32, i32* %5
%20 = icmp sgt i32 %19, 1
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = load i8*, i8** %8
%24 = icmp ne i8* %23, null
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i32*, i32** %7
%28 = load i32, i32* %27
%29 = icmp sge i32 %28, 5
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i8*, i8** %6
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 0
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %32, i64 %35
%37 = load i8, i8* %36
%38 = call i32 @vowel_Q(i8 signext %37)
%39 = icmp eq i32 %38, 1
br i1 %39, label %49, label %40
40: ; preds = %18
%41 = load i8*, i8** %6
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 0
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %41, i64 %44
%46 = load i8, i8* %45
%47 = call i32 @consonant_Q(i8 signext %46)
%48 = icmp eq i32 %47, 1
br label %49
49: ; preds = %40, %18
%50 = phi i1 [ true, %18 ], [ %48, %40 ]
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = load i8*, i8** %6
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = load i8, i8* %56
%58 = call i32 @vowel_Q(i8 signext %57)
%59 = icmp eq i32 %58, 1
br i1 %59, label %60, label %101
60: ; preds = %49
%61 = load i8*, i8** %6
%62 = load i32, i32* %9
%63 = add nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %61, i64 %64
%66 = load i8, i8* %65
%67 = call i32 @consonant_Q(i8 signext %66)
%68 = icmp eq i32 %67, 0
br i1 %68, label %78, label %69
69: ; preds = %60
%70 = load i8*, i8** %6
%71 = load i32, i32* %9
%72 = add nsw i32 %71, 2
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %70, i64 %73
%75 = load i8, i8* %74
%76 = call i32 @consonant_Q(i8 signext %75)
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %69, %60
%79 = load i32*, i32** %7
store i32 0, i32* %79
br label %259
80: ; preds = %69
%81 = load i8*, i8** %6
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %81, i64 %84
%86 = load i8, i8* %85
%87 = call i32 @consonant_Q(i8 signext %86)
%88 = icmp eq i32 %87, 1
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = load i8*, i8** %6
%92 = load i32, i32* %9
%93 = add nsw i32 %92, 2
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %91, i64 %94
%96 = load i8, i8* %95
%97 = call i32 @consonant_Q(i8 signext %96)
%98 = icmp eq i32 %97, 1
%99 = zext i1 %98 to i32
%100 = call i32 @assert(i32 %99)
store i32 2, i32* %9
br label %101
101: ; preds = %80, %49
%102 = load i8*, i8** %6
%103 = load i32, i32* %9
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %102, i64 %104
%106 = load i8, i8* %105
%107 = call i32 @consonant_Q(i8 signext %106)
%108 = icmp eq i32 %107, 1
br i1 %108, label %109, label %252
109: ; preds = %101
%110 = load i8*, i8** %6
%111 = load i32, i32* %9
%112 = add nsw i32 %111, 1
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %110, i64 %113
%115 = load i8, i8* %114
%116 = call i32 @consonant_Q(i8 signext %115)
%117 = icmp eq i32 %116, 1
br i1 %117, label %118, label %211
118: ; preds = %109
%119 = load i8*, i8** %6
%120 = load i32, i32* %9
%121 = add nsw i32 %120, 2
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %119, i64 %122
%124 = load i8, i8* %123
%125 = call i32 @vowel_Q(i8 signext %124)
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %118
%128 = load i32*, i32** %7
store i32 0, i32* %128
br label %259
129: ; preds = %118
%130 = load i8*, i8** %6
%131 = load i32, i32* %9
%132 = add nsw i32 %131, 2
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %130, i64 %133
%135 = load i8, i8* %134
%136 = call i32 @vowel_Q(i8 signext %135)
%137 = icmp eq i32 %136, 1
%138 = zext i1 %137 to i32
%139 = call i32 @assert(i32 %138)
%140 = load i8*, i8** %6
%141 = load i32, i32* %9
%142 = add nsw i32 %141, 3
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i8, i8* %140, i64 %143
%145 = load i8, i8* %144
%146 = call i32 @tone_Q(i8 signext %145)
%147 = icmp eq i32 %146, 1
br i1 %147, label %148, label %179
148: ; preds = %129
%149 = load i8*, i8** %6
%150 = load i32, i32* %9
%151 = add nsw i32 %150, 4
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %149, i64 %152
%154 = load i8, i8* %153
%155 = call i32 @consonant_Q(i8 signext %154)
%156 = icmp eq i32 %155, 0
br i1 %156, label %157, label %159
157: ; preds = %148
%158 = load i32*, i32** %7
store i32 0, i32* %158
br label %259
159: ; preds = %148
%160 = load i8*, i8** %6
%161 = load i32, i32* %9
%162 = add nsw i32 %161, 4
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds i8, i8* %160, i64 %163
%165 = load i8, i8* %164
%166 = call i32 @consonant_Q(i8 signext %165)
%167 = icmp eq i32 %166, 1
%168 = zext i1 %167 to i32
%169 = call i32 @assert(i32 %168)
%170 = load i32, i32* %9
%171 = add nsw i32 %170, 5
%172 = load i8*, i8** %6
%173 = load i32, i32* %9
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i8, i8* %172, i64 %174
%176 = load i8*, i8** %8
%177 = call i32 @text_copy(i32 %171, i8* %175, i8* %176)
%178 = load i32*, i32** %7
store i32 5, i32* %178
br label %210
179: ; preds = %129
%180 = load i8*, i8** %6
%181 = load i32, i32* %9
%182 = add nsw i32 %181, 3
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds i8, i8* %180, i64 %183
%185 = load i8, i8* %184
%186 = call i32 @consonant_Q(i8 signext %185)
%187 = icmp eq i32 %186, 0
br i1 %187, label %188, label %190
188: ; preds = %179
%189 = load i32*, i32** %7
store i32 0, i32* %189
br label %259
190: ; preds = %179
%191 = load i8*, i8** %6
%192 = load i32, i32* %9
%193 = add nsw i32 %192, 3
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds i8, i8* %191, i64 %194
%196 = load i8, i8* %195
%197 = call i32 @consonant_Q(i8 signext %196)
%198 = icmp eq i32 %197, 1
%199 = zext i1 %198 to i32
%200 = call i32 @assert(i32 %199)
%201 = load i32, i32* %9
%202 = add nsw i32 %201, 4
%203 = load i8*, i8** %6
%204 = load i32, i32* %9
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i8, i8* %203, i64 %205
%207 = load i8*, i8** %8
%208 = call i32 @text_copy(i32 %202, i8* %206, i8* %207)
%209 = load i32*, i32** %7
store i32 4, i32* %209
br label %210
210: ; preds = %190, %159
br label %251
211: ; preds = %109
%212 = load i8*, i8** %6
%213 = load i32, i32* %9
%214 = add nsw i32 %213, 1
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds i8, i8* %212, i64 %215
%217 = load i8, i8* %216
%218 = call i32 @vowel_Q(i8 signext %217)
%219 = icmp eq i32 %218, 1
br i1 %219, label %220, label %250
220: ; preds = %211
%221 = load i8*, i8** %6
%222 = load i32, i32* %9
%223 = add nsw i32 %222, 2
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds i8, i8* %221, i64 %224
%226 = load i8, i8* %225
%227 = call i32 @tone_Q(i8 signext %226)
%228 = icmp eq i32 %227, 1
br i1 %228, label %229, label %239
229: ; preds = %220
%230 = load i32, i32* %9
%231 = add nsw i32 %230, 3
%232 = load i8*, i8** %6
%233 = load i32, i32* %9
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds i8, i8* %232, i64 %234
%236 = load i8*, i8** %8
%237 = call i32 @text_copy(i32 %231, i8* %235, i8* %236)
%238 = load i32*, i32** %7
store i32 3, i32* %238
br label %249
239: ; preds = %220
%240 = load i32, i32* %9
%241 = add nsw i32 %240, 2
%242 = load i8*, i8** %6
%243 = load i32, i32* %9
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i8, i8* %242, i64 %244
%246 = load i8*, i8** %8
%247 = call i32 @text_copy(i32 %241, i8* %245, i8* %246)
%248 = load i32*, i32** %7
store i32 2, i32* %248
br label %249
249: ; preds = %239, %229
br label %250
250: ; preds = %249, %211
br label %251
251: ; preds = %250, %210
br label %252
252: ; preds = %251, %101
%253 = load i32, i32* %5
%254 = load i32*, i32** %7
%255 = load i32, i32* %254
%256 = icmp slt i32 %253, %255
br i1 %256, label %257, label %259
257: ; preds = %252
%258 = load i32*, i32** %7
store i32 0, i32* %258
br label %259
259: ; preds = %16, %78, %127, %157, %188, %257, %252
ret void
}

LLVM IR (-O2):
define void @derive_first_word(i32 %0, i8* noalias %1, i32* noalias nocapture %2, i8* noalias %3) {
%5 = icmp ne i8* %1, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp slt i32 %0, 2
br i1 %8, label %127, label %9
9: ; preds = %4
%10 = tail call i32 @assert(i32 1)
%11 = icmp ne i8* %3, null
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = load i32, i32* %2
%15 = icmp sgt i32 %14, 4
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = load i8, i8* %1
%19 = tail call i32 @vowel_Q(i8 signext %18)
%20 = icmp eq i32 %19, 1
br i1 %20, label %26, label %21
21: ; preds = %9
%22 = load i8, i8* %1
%23 = tail call i32 @consonant_Q(i8 signext %22)
%24 = icmp eq i32 %23, 1
%25 = zext i1 %24 to i32
br label %26
26: ; preds = %21, %9
%27 = phi i32 [ 1, %9 ], [ %25, %21 ]
%28 = tail call i32 @assert(i32 %27)
%29 = load i8, i8* %1
%30 = tail call i32 @vowel_Q(i8 signext %29)
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %53
32: ; preds = %26
%33 = getelementptr inbounds i8, i8* %1, i64 1
%34 = load i8, i8* %33
%35 = tail call i32 @consonant_Q(i8 signext %34)
%36 = icmp eq i32 %35, 0
br i1 %36, label %127, label %37
37: ; preds = %32
%38 = getelementptr inbounds i8, i8* %1, i64 2
%39 = load i8, i8* %38
%40 = tail call i32 @consonant_Q(i8 signext %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %127, label %42
42: ; preds = %37
%43 = load i8, i8* %33
%44 = tail call i32 @consonant_Q(i8 signext %43)
%45 = icmp eq i32 %44, 1
%46 = zext i1 %45 to i32
%47 = tail call i32 @assert(i32 %46)
%48 = load i8, i8* %38
%49 = tail call i32 @consonant_Q(i8 signext %48)
%50 = icmp eq i32 %49, 1
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
br label %53
53: ; preds = %42, %26
%54 = phi i32 [ 2, %42 ], [ 0, %26 ]
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %1, i64 %55
%57 = load i8, i8* %56
%58 = tail call i32 @consonant_Q(i8 signext %57)
%59 = icmp eq i32 %58, 1
br i1 %59, label %60, label %124
60: ; preds = %53
%61 = or i32 %54, 1
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %1, i64 %62
%64 = load i8, i8* %63
%65 = tail call i32 @consonant_Q(i8 signext %64)
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %97
67: ; preds = %60
%68 = add nuw nsw i32 %54, 2
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %1, i64 %69
%71 = load i8, i8* %70
%72 = tail call i32 @vowel_Q(i8 signext %71)
%73 = icmp eq i32 %72, 0
br i1 %73, label %127, label %74
74: ; preds = %67
%75 = load i8, i8* %70
%76 = tail call i32 @vowel_Q(i8 signext %75)
%77 = icmp eq i32 %76, 1
%78 = zext i1 %77 to i32
%79 = tail call i32 @assert(i32 %78)
%80 = add nuw nsw i32 %54, 3
%81 = zext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %1, i64 %81
%83 = load i8, i8* %82
%84 = tail call i32 @tone_Q(i8 signext %83)
%85 = icmp eq i32 %84, 1
br i1 %85, label %86, label %93
86: ; preds = %74
%87 = or i32 %54, 4
%88 = zext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %1, i64 %88
%90 = load i8, i8* %89
%91 = tail call i32 @consonant_Q(i8 signext %90)
%92 = icmp eq i32 %91, 0
br i1 %92, label %127, label %111
93: ; preds = %74
%94 = load i8, i8* %82
%95 = tail call i32 @consonant_Q(i8 signext %94)
%96 = icmp eq i32 %95, 0
br i1 %96, label %127, label %111
97: ; preds = %60
%98 = load i8, i8* %63
%99 = tail call i32 @vowel_Q(i8 signext %98)
%100 = icmp eq i32 %99, 1
br i1 %100, label %101, label %124
101: ; preds = %97
%102 = add nuw nsw i32 %54, 2
%103 = zext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* %1, i64 %103
%105 = load i8, i8* %104
%106 = tail call i32 @tone_Q(i8 signext %105)
%107 = icmp eq i32 %106, 1
%108 = add nuw nsw i32 %54, 3
%109 = select i1 %107, i32 %108, i32 %102
%110 = select i1 %107, i32 3, i32 2
br label %120
111: ; preds = %93, %86
%112 = phi i8* [ %89, %86 ], [ %82, %93 ]
%113 = phi i32 [ 5, %86 ], [ 4, %93 ]
%114 = load i8, i8* %112
%115 = tail call i32 @consonant_Q(i8 signext %114)
%116 = icmp eq i32 %115, 1
%117 = zext i1 %116 to i32
%118 = tail call i32 @assert(i32 %117)
%119 = or i32 %54, %113
br label %120
120: ; preds = %101, %111
%121 = phi i32 [ %109, %101 ], [ %119, %111 ]
%122 = phi i32 [ %110, %101 ], [ %113, %111 ]
%123 = tail call i32 @text_copy(i32 %121, i8* %56, i8* %3)
store i32 %122, i32* %2
br label %124
124: ; preds = %120, %97, %53
%125 = phi i32 [ %14, %97 ], [ %14, %53 ], [ %122, %120 ]
%126 = icmp sgt i32 %125, %0
br i1 %126, label %127, label %128
127: ; preds = %124, %93, %86, %67, %32, %37, %4
store i32 0, i32* %2
br label %128
128: ; preds = %127, %124
ret void
}