#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 *);
int doWeHaveAWinner(int harePosition, int tortoisePosition) {
  if (harePosition >= 70 && tortoisePosition >= 70) {
    printf("It's a tie. (How conventional!)\n");
    return 1;
  } else if (harePosition >= 70) {
    printf("Hare Wins! Yuch.\n");
    return 1;
  } else if (tortoisePosition >= 70) {
    printf("TORTOISE WINS!!! YAY!!!\n");
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<doWeHaveAWinner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x46,-0x8(%rbp)
jl     114a <doWeHaveAWinner+0x3a>
cmpl   $0x46,-0xc(%rbp)
jl     114a <doWeHaveAWinner+0x3a>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1195 <doWeHaveAWinner+0x85>
cmpl   $0x46,-0x8(%rbp)
jl     116c <doWeHaveAWinner+0x5c>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1195 <doWeHaveAWinner+0x85>
cmpl   $0x46,-0xc(%rbp)
jl     118e <doWeHaveAWinner+0x7e>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1195 <doWeHaveAWinner+0x85>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doWeHaveAWinner>:
cmp    $0x45,%edi
jg     111d <doWeHaveAWinner+0xd>
xor    %eax,%eax
cmp    $0x46,%esi
jge    111d <doWeHaveAWinner+0xd>
ret
push   %rax
cmp    $0x46,%esi
lea    0xf01(%rip),%rax
lea    0xee9(%rip),%rcx
cmovl  %rcx,%rax
cmp    $0x46,%edi
cmovl  %rcx,%rax
lea    0xebf(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"It's a tie. (How conventional!)\0A\00"
@.str.1 = [18 x i8] c"Hare Wins! Yuch.\0A\00"
@.str.2 = [25 x i8] c"TORTOISE WINS!!! YAY!!!\0A\00"
define i32 @doWeHaveAWinner(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sge i32 %6, 70
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 70
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %24
13: ; preds = %8, %2
%14 = load i32, i32* %4
%15 = icmp sge i32 %14, 70
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %24
18: ; preds = %13
%19 = load i32, i32* %5
%20 = icmp sge i32 %19, 70
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %21, %16, %11
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@str = [24 x i8] c"TORTOISE WINS!!! YAY!!!\00"
@str.3 = [17 x i8] c"Hare Wins! Yuch.\00"
@str.4 = [32 x i8] c"It's a tie. (How conventional!)\00"
define i32 @doWeHaveAWinner(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 69
%4 = icmp sgt i32 %1, 69
%5 = or i1 %3, %4
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = and i1 %3, %4
%8 = select i1 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0)
%9 = select i1 %3, i8* %8, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %12
}