#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 *, char const *, int /*<<< orphan*/ *, char const *);
int main(int argc, char **argv) {
  int result = 0;
  const char *text = "\\x280d\\x280e";
  const char *expected = "sm";
  result |= check_translation("letterDefTest_letter.ctb", text, NULL, expected);
  result |=
      check_translation("letterDefTest_lowercase.ctb", text, NULL, expected);
  result |= check_translation("letterDefTest_uplow.ctb", text, NULL, expected);
  result |=
      check_translation("letterDefTest_uppercase.ctb", text, NULL, expected);
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
lea    0xebe(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rcx
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xef2(%rip),%rdi
lea    0xedb(%rip),%r15
lea    0xee1(%rip),%r14
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14,%rcx
call   1030 <check_translation@plt>
mov    %eax,%ebp
lea    0xee7(%rip),%rdi
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14,%rcx
call   1030 <check_translation@plt>
mov    %eax,%ebx
or     %ebp,%ebx
lea    0xeeb(%rip),%rdi
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14,%rcx
call   1030 <check_translation@plt>
mov    %eax,%ebp
lea    0xeed(%rip),%rdi
mov    %r15,%rsi
xor    %edx,%edx
mov    %r14,%rcx
call   1030 <check_translation@plt>
or     %ebp,%eax
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\\x280d\\x280e\00"
@.str.1 = [3 x i8] c"sm\00"
@.str.2 = [25 x i8] c"letterDefTest_letter.ctb\00"
@.str.3 = [28 x i8] c"letterDefTest_lowercase.ctb\00"
@.str.4 = [24 x i8] c"letterDefTest_uplow.ctb\00"
@.str.5 = [28 x i8] c"letterDefTest_uppercase.ctb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = call i32 @check_translation(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* %9, i32* null, i8* %10)
%12 = load i32, i32* %6
%13 = or i32 %12, %11
store i32 %13, i32* %6
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @check_translation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* %14, i32* null, i8* %15)
%17 = load i32, i32* %6
%18 = or i32 %17, %16
store i32 %18, i32* %6
%19 = load i8*, i8** %7
%20 = load i8*, i8** %8
%21 = call i32 @check_translation(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* %19, i32* null, i8* %20)
%22 = load i32, i32* %6
%23 = or i32 %22, %21
store i32 %23, i32* %6
%24 = load i8*, i8** %7
%25 = load i8*, i8** %8
%26 = call i32 @check_translation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* %24, i32* null, i8* %25)
%27 = load i32, i32* %6
%28 = or i32 %27, %26
store i32 %28, i32* %6
%29 = load i32, i32* %6
ret i32 %29
}

LLVM IR (-O2):
@.str = [13 x i8] c"\\x280d\\x280e\00"
@.str.1 = [3 x i8] c"sm\00"
@.str.2 = [25 x i8] c"letterDefTest_letter.ctb\00"
@.str.3 = [28 x i8] c"letterDefTest_lowercase.ctb\00"
@.str.4 = [24 x i8] c"letterDefTest_uplow.ctb\00"
@.str.5 = [28 x i8] c"letterDefTest_uppercase.ctb\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_translation(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @check_translation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = or i32 %4, %3
%6 = tail call i32 @check_translation(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = or i32 %5, %6
%8 = tail call i32 @check_translation(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = or i32 %7, %8
ret i32 %9
}