#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 test3DigitNumbers() {
  assertEquals("one hundred", getNumberInWords(100));
  assertEquals("one hundred one", getNumberInWords(101));
  assertEquals("two hundred eleven", getNumberInWords(211));
  assertEquals("three hundred twenty two", getNumberInWords(322));
  assertEquals("four hundred thirty three", getNumberInWords(433));
  assertEquals("five hundred forty four", getNumberInWords(544));
  assertEquals("six hundred fifty five", getNumberInWords(655));
  assertEquals("seven hundred sixty six", getNumberInWords(766));
  assertEquals("eight hundred seventy seven", getNumberInWords(877));
  assertEquals("nine hundred eighty eight", getNumberInWords(988));
  assertEquals("nine hundred ninety nine", getNumberInWords(999));
}


x86 assembly (clang, -O0):
<test3DigitNumbers>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x65,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0xd3,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x142,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb0(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x1b1,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x220,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x28f,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb3(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x2fe,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x36d,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x3dc,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1030 <assertEquals@plt>
mov    $0x3e7,%edi
call   1040 <getNumberInWords@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1030 <assertEquals@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3DigitNumbers>:
push   %rax
mov    $0x64,%edi
call   1040 <getNumberInWords@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x65,%edi
call   1040 <getNumberInWords@plt>
lea    0xec2(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0xd3,%edi
call   1040 <getNumberInWords@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x142,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x1b1,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x220,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x28f,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb8(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x2fe,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x36d,%edi
call   1040 <getNumberInWords@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x3dc,%edi
call   1040 <getNumberInWords@plt>
lea    0xebb(%rip),%rdi
mov    %eax,%esi
call   1030 <assertEquals@plt>
mov    $0x3e7,%edi
call   1040 <getNumberInWords@plt>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <assertEquals@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"one hundred\00"
@.str.1 = [16 x i8] c"one hundred one\00"
@.str.2 = [19 x i8] c"two hundred eleven\00"
@.str.3 = [25 x i8] c"three hundred twenty two\00"
@.str.4 = [26 x i8] c"four hundred thirty three\00"
@.str.5 = [24 x i8] c"five hundred forty four\00"
@.str.6 = [23 x i8] c"six hundred fifty five\00"
@.str.7 = [24 x i8] c"seven hundred sixty six\00"
@.str.8 = [28 x i8] c"eight hundred seventy seven\00"
@.str.9 = [26 x i8] c"nine hundred eighty eight\00"
@.str.10 = [25 x i8] c"nine hundred ninety nine\00"
define void @test3DigitNumbers() {
%1 = call i32 @getNumberInWords(i32 100)
%2 = call i32 @assertEquals(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @getNumberInWords(i32 101)
%4 = call i32 @assertEquals(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @getNumberInWords(i32 211)
%6 = call i32 @assertEquals(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 @getNumberInWords(i32 322)
%8 = call i32 @assertEquals(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 @getNumberInWords(i32 433)
%10 = call i32 @assertEquals(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 @getNumberInWords(i32 544)
%12 = call i32 @assertEquals(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 @getNumberInWords(i32 655)
%14 = call i32 @assertEquals(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 @getNumberInWords(i32 766)
%16 = call i32 @assertEquals(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 @getNumberInWords(i32 877)
%18 = call i32 @assertEquals(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = call i32 @getNumberInWords(i32 988)
%20 = call i32 @assertEquals(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = call i32 @getNumberInWords(i32 999)
%22 = call i32 @assertEquals(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"one hundred\00"
@.str.1 = [16 x i8] c"one hundred one\00"
@.str.2 = [19 x i8] c"two hundred eleven\00"
@.str.3 = [25 x i8] c"three hundred twenty two\00"
@.str.4 = [26 x i8] c"four hundred thirty three\00"
@.str.5 = [24 x i8] c"five hundred forty four\00"
@.str.6 = [23 x i8] c"six hundred fifty five\00"
@.str.7 = [24 x i8] c"seven hundred sixty six\00"
@.str.8 = [28 x i8] c"eight hundred seventy seven\00"
@.str.9 = [26 x i8] c"nine hundred eighty eight\00"
@.str.10 = [25 x i8] c"nine hundred ninety nine\00"
define void @test3DigitNumbers() {
%1 = tail call i32 @getNumberInWords(i32 100)
%2 = tail call i32 @assertEquals(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @getNumberInWords(i32 101)
%4 = tail call i32 @assertEquals(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @getNumberInWords(i32 211)
%6 = tail call i32 @assertEquals(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @getNumberInWords(i32 322)
%8 = tail call i32 @assertEquals(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 @getNumberInWords(i32 433)
%10 = tail call i32 @assertEquals(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 @getNumberInWords(i32 544)
%12 = tail call i32 @assertEquals(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 @getNumberInWords(i32 655)
%14 = tail call i32 @assertEquals(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 @getNumberInWords(i32 766)
%16 = tail call i32 @assertEquals(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 @getNumberInWords(i32 877)
%18 = tail call i32 @assertEquals(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 @getNumberInWords(i32 988)
%20 = tail call i32 @assertEquals(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = tail call i32 @getNumberInWords(i32 999)
%22 = tail call i32 @assertEquals(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i32 %21)
ret void
}