#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*/ assertEquals(char *, int /*<<< orphan*/);
int /*<<< orphan*/ getNumberInWords(int);
void test1DigitNumbers() {
  assertEquals("zero", getNumberInWords(0));
  assertEquals("one", getNumberInWords(1));
  assertEquals("two", getNumberInWords(2));
  assertEquals("three", getNumberInWords(3));
  assertEquals("four", getNumberInWords(4));
  assertEquals("five", getNumberInWords(5));
  assertEquals("six", getNumberInWords(6));
  assertEquals("seven", getNumberInWords(7));
  assertEquals("eight", getNumberInWords(8));
  assertEquals("nine", getNumberInWords(9));
}


x86 assembly (clang, -O0):
<test1DigitNumbers>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x1,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x2,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x3,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x4,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe7f(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x5,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe6c(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x6,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe59(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x7,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe45(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x8,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe33(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x9,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xe21(%rip),%rdi
call   1030 <assertEquals@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1DigitNumbers>:
push   %rax
xor    %edi,%edi
call   1040 <getNumberInWords@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x1,%edi
call   1040 <getNumberInWords@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x2,%edi
call   1040 <getNumberInWords@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x3,%edi
call   1040 <getNumberInWords@plt>
lea    0xe96(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x4,%edi
call   1040 <getNumberInWords@plt>
lea    0xe84(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x5,%edi
call   1040 <getNumberInWords@plt>
lea    0xe71(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x6,%edi
call   1040 <getNumberInWords@plt>
lea    0xe5e(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x7,%edi
call   1040 <getNumberInWords@plt>
lea    0xe4a(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x8,%edi
call   1040 <getNumberInWords@plt>
lea    0xe38(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x9,%edi
call   1040 <getNumberInWords@plt>
lea    0xe26(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <assertEquals@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"zero\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
define void @test1DigitNumbers() {
%1 = call i32 @getNumberInWords(i32 0)
%2 = call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @getNumberInWords(i32 1)
%4 = call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @getNumberInWords(i32 2)
%6 = call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @getNumberInWords(i32 3)
%8 = call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 @getNumberInWords(i32 4)
%10 = call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 @getNumberInWords(i32 5)
%12 = call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 @getNumberInWords(i32 6)
%14 = call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 @getNumberInWords(i32 7)
%16 = call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 @getNumberInWords(i32 8)
%18 = call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = call i32 @getNumberInWords(i32 9)
%20 = call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"zero\00"
@.str.1 = [4 x i8] c"one\00"
@.str.2 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"three\00"
@.str.4 = [5 x i8] c"four\00"
@.str.5 = [5 x i8] c"five\00"
@.str.6 = [4 x i8] c"six\00"
@.str.7 = [6 x i8] c"seven\00"
@.str.8 = [6 x i8] c"eight\00"
@.str.9 = [5 x i8] c"nine\00"
define void @test1DigitNumbers() {
%1 = tail call i32 @getNumberInWords(i32 0)
%2 = tail call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @getNumberInWords(i32 1)
%4 = tail call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @getNumberInWords(i32 2)
%6 = tail call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @getNumberInWords(i32 3)
%8 = tail call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 @getNumberInWords(i32 4)
%10 = tail call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 @getNumberInWords(i32 5)
%12 = tail call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 @getNumberInWords(i32 6)
%14 = tail call i32 @assertEquals(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 @getNumberInWords(i32 7)
%16 = tail call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 @getNumberInWords(i32 8)
%18 = tail call i32 @assertEquals(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 @getNumberInWords(i32 9)
%20 = tail call i32 @assertEquals(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i32 %19)
ret void
}