#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 */

/* Variables and functions */
int caracteresIguais(char const *, char *);
int /*<<< orphan*/ printf(char *);
void analisarPalavra(const char *palavra) {
  if (caracteresIguais(palavra, "one") >= 2) {
    printf("1\n");
  } else if (caracteresIguais(palavra, "two") >= 2) {
    printf("2\n");
  } else if (caracteresIguais(palavra, "three") >= 4) {
    printf("3\n");
  }
}


x86 assembly (clang, -O0):
<analisarPalavra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <caracteresIguais@plt>
cmp    $0x2,%eax
jl     1156 <analisarPalavra+0x36>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
jmp    11af <analisarPalavra+0x8f>
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1040 <caracteresIguais@plt>
cmp    $0x2,%eax
jl     1180 <analisarPalavra+0x60>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <analisarPalavra+0x8a>
mov    -0x8(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1040 <caracteresIguais@plt>
cmp    $0x4,%eax
jl     11a5 <analisarPalavra+0x85>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <analisarPalavra+0x8a>
jmp    11af <analisarPalavra+0x8f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analisarPalavra>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <caracteresIguais@plt>
cmp    $0x1,%eax
jle    1142 <analisarPalavra+0x22>
lea    0xed6(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <caracteresIguais@plt>
cmp    $0x1,%eax
jle    1163 <analisarPalavra+0x43>
lea    0xeb3(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <caracteresIguais@plt>
cmp    $0x4,%eax
jl     1184 <analisarPalavra+0x64>
lea    0xe90(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"one\00"
@.str.1 = [3 x i8] c"1\0A\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [3 x i8] c"2\0A\00"
@.str.4 = [6 x i8] c"three\00"
@.str.5 = [3 x i8] c"3\0A\00"
define void @analisarPalavra(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @caracteresIguais(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp sge i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %22
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @caracteresIguais(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp sge i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %21
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = call i32 @caracteresIguais(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp sge i32 %16, 4
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %20
20: ; preds = %18, %14
br label %21
21: ; preds = %20, %12
br label %22
22: ; preds = %21, %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.4 = [6 x i8] c"three\00"
@str = [2 x i8] c"3\00"
@str.6 = [2 x i8] c"2\00"
@str.7 = [2 x i8] c"1\00"
define void @analisarPalavra(i8* %0) {
%2 = tail call i32 @caracteresIguais(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp sgt i32 %2, 1
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i32 @caracteresIguais(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp sgt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @caracteresIguais(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%9 = icmp sgt i32 %8, 3
br i1 %9, label %10, label %13
10: ; preds = %7, %4, %1
%11 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), %1 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0), %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0), %7 ]
%12 = tail call i32 @puts(i8* dereferenceable(1) %11)
br label %13
13: ; preds = %10, %7
ret void
}