#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 check_translation(char const *, char *, int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ lou_free();
int main(int argc, char **argv) {
  const char *table = "tests/tables/pass2.ctb";
  int result = 0;
  result = check_translation(table, "Rene", NULL, "rene");
  result |= check_translation(table, "Reno", NULL, "ren'o");
  lou_free();
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec4(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    0xebe(%rip),%rcx
call   1030 <check_translation@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    0xeaa(%rip),%rcx
call   1030 <check_translation@plt>
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <lou_free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rbx
lea    0xee6(%rip),%rsi
lea    0xee4(%rip),%rcx
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <check_translation@plt>
mov    %eax,%ebp
lea    0xed6(%rip),%rsi
lea    0xed4(%rip),%rcx
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <check_translation@plt>
mov    %eax,%ebx
or     %ebp,%ebx
xor    %eax,%eax
call   1040 <lou_free@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"tests/tables/pass2.ctb\00"
@.str.1 = [5 x i8] c"Rene\00"
@.str.2 = [5 x i8] c"rene\00"
@.str.3 = [5 x i8] c"Reno\00"
@.str.4 = [6 x i8] c"ren'o\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %6
store i32 0, i32* %7
%8 = load i8*, i8** %6
%9 = call i32 @check_translation(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 %9, i32* %7
%10 = load i8*, i8** %6
%11 = call i32 @check_translation(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* %7
%13 = or i32 %12, %11
store i32 %13, i32* %7
%14 = call i32 (...) @lou_free()
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
@.str = [23 x i8] c"tests/tables/pass2.ctb\00"
@.str.1 = [5 x i8] c"Rene\00"
@.str.2 = [5 x i8] c"rene\00"
@.str.3 = [5 x i8] c"Reno\00"
@.str.4 = [6 x i8] c"ren'o\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_translation(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @check_translation(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%5 = or i32 %4, %3
%6 = tail call i32 (...) @lou_free()
ret i32 %5
}