#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 /*<<< orphan*/ printf(char *);
scalar_t__ strcmp(char const *, char *);
void fourteen(const char *s) {
  if (strcmp(s, "blue") == 0) {
    printf("Orange and BLUE!\n");
  } else if (strcmp(s, "orange") == 0) {
    printf("ORANGE and blue!\n");
  } else {
    printf("orange and blue!\n");
  }
}


x86 assembly (clang, -O0):
<fourteen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1157 <fourteen+0x37>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
jmp    1193 <fourteen+0x73>
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1182 <fourteen+0x62>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    118e <fourteen+0x6e>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
jmp    1193 <fourteen+0x73>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fourteen>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     115f <fourteen+0x3f>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
lea    0xecf(%rip),%rax
lea    0xeb7(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1030 <puts@plt>
lea    0xec8(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"blue\00"
@.str.1 = [18 x i8] c"Orange and BLUE!\0A\00"
@.str.2 = [7 x i8] c"orange\00"
@.str.3 = [18 x i8] c"ORANGE and blue!\0A\00"
@.str.4 = [18 x i8] c"orange and blue!\0A\00"
define void @fourteen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %17
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %16
14: ; preds = %8
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
br label %17
17: ; preds = %16, %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"blue\00"
@.str.2 = [7 x i8] c"orange\00"
@str = [17 x i8] c"orange and blue!\00"
@str.5 = [17 x i8] c"ORANGE and blue!\00"
@str.6 = [17 x i8] c"Orange and BLUE!\00"
define void @fourteen(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0)
br label %8
8: ; preds = %4, %1
%9 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.6, i64 0, i64 0), %1 ], [ %7, %4 ]
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
ret void
}