#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 /*<<< orphan*/ convert_typeform(char const *);
int main(int argc, char **argv) {
  int result = 0;
  const char *str = "This is a Test";
  const char *typeform = "00000000000000";
  const char *expected = ",this is a ,test";
  result |= check_translation("en-gb-g1.utb", str, convert_typeform(typeform),
                              expected);
  str = "This is a Test in Italic.";
  typeform = "1111111111111111111111111";
  expected = "..,this is a ,test in ,italic4.'";
  result |= check_translation("en-gb-g1.utb", str, convert_typeform(typeform),
                              expected);
  str = "This is a Test";
  typeform = "00000111100000";
  expected = ",this .is .a ,test";
  result |= check_translation("en-gb-g1.utb", str, convert_typeform(typeform),
                              expected);
  str = "time and spirit";
  typeform = "111111111111111";
  expected = ".\"t .& ._s";
  result |= check_translation("en-gb-g1.utb", str, convert_typeform(typeform),
                              expected);
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xebc(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec0(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xec4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <convert_typeform@plt>
mov    -0x50(%rbp),%rsi
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
lea    0xeaf(%rip),%rdi
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeb9(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xec8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <convert_typeform@plt>
mov    -0x48(%rbp),%rsi
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
lea    0xe61(%rip),%rdi
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xe20(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xea6(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <convert_typeform@plt>
mov    -0x40(%rbp),%rsi
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
lea    0xe13(%rip),%rdi
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xe85(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe27(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe7f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <convert_typeform@plt>
mov    -0x38(%rbp),%rsi
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
lea    0xdc5(%rip),%rdi
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xee1(%rip),%rdi
call   1040 <convert_typeform@plt>
lea    0xef5(%rip),%r15
lea    0xebf(%rip),%r14
lea    0xed6(%rip),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <check_translation@plt>
mov    %eax,%ebx
lea    0xef8(%rip),%rdi
call   1040 <convert_typeform@plt>
lea    0xed2(%rip),%rsi
lea    0xeff(%rip),%rcx
mov    %r15,%rdi
mov    %eax,%edx
call   1030 <check_translation@plt>
mov    %eax,%ebp
or     %ebx,%ebp
lea    0xf0b(%rip),%rdi
call   1040 <convert_typeform@plt>
lea    0xf0e(%rip),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <check_translation@plt>
mov    %eax,%ebx
lea    0xeb8(%rip),%rdi
call   1040 <convert_typeform@plt>
lea    0xeff(%rip),%rsi
lea    0xf08(%rip),%rcx
mov    %r15,%rdi
mov    %eax,%edx
call   1030 <check_translation@plt>
or     %ebx,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"This is a Test\00"
@.str.1 = [15 x i8] c"00000000000000\00"
@.str.2 = [17 x i8] c",this is a ,test\00"
@.str.3 = [13 x i8] c"en-gb-g1.utb\00"
@.str.4 = [26 x i8] c"This is a Test in Italic.\00"
@.str.5 = [26 x i8] c"1111111111111111111111111\00"
@.str.6 = [33 x i8] c"..,this is a ,test in ,italic4.'\00"
@.str.7 = [15 x i8] c"00000111100000\00"
@.str.8 = [19 x i8] c",this .is .a ,test\00"
@.str.9 = [16 x i8] c"time and spirit\00"
@.str.10 = [16 x i8] c"111111111111111\00"
@.str.11 = [11 x i8] c".\22t .& ._s\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*
%9 = 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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8** %9
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @convert_typeform(i8* %11)
%13 = load i8*, i8** %9
%14 = call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %10, i32 %12, i8* %13)
%15 = load i32, i32* %6
%16 = or i32 %15, %14
store i32 %16, i32* %6
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8** %9
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = call i32 @convert_typeform(i8* %18)
%20 = load i8*, i8** %9
%21 = call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %17, i32 %19, i8* %20)
%22 = load i32, i32* %6
%23 = or i32 %22, %21
store i32 %23, i32* %6
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8** %9
%24 = load i8*, i8** %7
%25 = load i8*, i8** %8
%26 = call i32 @convert_typeform(i8* %25)
%27 = load i8*, i8** %9
%28 = call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %24, i32 %26, i8* %27)
%29 = load i32, i32* %6
%30 = or i32 %29, %28
store i32 %30, i32* %6
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8** %9
%31 = load i8*, i8** %7
%32 = load i8*, i8** %8
%33 = call i32 @convert_typeform(i8* %32)
%34 = load i8*, i8** %9
%35 = call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %31, i32 %33, i8* %34)
%36 = load i32, i32* %6
%37 = or i32 %36, %35
store i32 %37, i32* %6
%38 = load i32, i32* %6
ret i32 %38
}

LLVM IR (-O2):
@.str = [15 x i8] c"This is a Test\00"
@.str.1 = [15 x i8] c"00000000000000\00"
@.str.2 = [17 x i8] c",this is a ,test\00"
@.str.3 = [13 x i8] c"en-gb-g1.utb\00"
@.str.4 = [26 x i8] c"This is a Test in Italic.\00"
@.str.5 = [26 x i8] c"1111111111111111111111111\00"
@.str.6 = [33 x i8] c"..,this is a ,test in ,italic4.'\00"
@.str.7 = [15 x i8] c"00000111100000\00"
@.str.8 = [19 x i8] c",this .is .a ,test\00"
@.str.9 = [16 x i8] c"time and spirit\00"
@.str.10 = [16 x i8] c"111111111111111\00"
@.str.11 = [11 x i8] c".\22t .& ._s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @convert_typeform(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @convert_typeform(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%7 = or i32 %6, %4
%8 = tail call i32 @convert_typeform(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
%10 = or i32 %7, %9
%11 = tail call i32 @convert_typeform(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i32 %11, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%13 = or i32 %10, %12
ret i32 %13
}