#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 *, char const *, char const *);
int main(int argc, char **argv) {
  int result = 0;
  const char *str = "He said it wasn't always working as expected.";
  const char *typeform = "110000000000000000111111111111110000000000000";
  const char *expected = ".,he sd x wasn't .alw .\"w+ z expect$4";
  result |=
      check_translation("compress.cti,en-us-g2.ctb", str, typeform, expected);
  str = "Er sagte es funktioniere nicht immer wie erwartet.";
  typeform = "11000000000011111111111111111100000000000000000000";
  expected = "_ER SAGTE ES __FUNKTION0RE NI4T', IMMER W0 ERWARTET.";
  result |= check_translation("de-ch-g1.ctb", str, typeform, 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    0xeef(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf12(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xf21(%rip),%rdi
call   1030 <check_translation@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xf29(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf51(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf79(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xf97(%rip),%rdi
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   %rbx
lea    0xf6a(%rip),%rdi
lea    0xee1(%rip),%rsi
lea    0xf08(%rip),%rdx
lea    0xf2f(%rip),%rcx
call   1030 <check_translation@plt>
mov    %eax,%ebx
lea    0xffc(%rip),%rdi
lea    0xf5a(%rip),%rsi
lea    0xf86(%rip),%rdx
lea    0xfb2(%rip),%rcx
call   1030 <check_translation@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"He said it wasn't always working as expected.\00"
@.str.1 = [46 x i8] c"110000000000000000111111111111110000000000000\00"
@.str.2 = [38 x i8] c".,he sd x wasn't .alw .\22w+ z expect$4\00"
@.str.3 = [26 x i8] c"compress.cti,en-us-g2.ctb\00"
@.str.4 = [51 x i8] c"Er sagte es funktioniere nicht immer wie erwartet.\00"
@.str.5 = [51 x i8] c"11000000000011111111111111111100000000000000000000\00"
@.str.6 = [53 x i8] c"_ER SAGTE ES __FUNKTION0RE NI4T', IMMER W0 ERWARTET.\00"
@.str.7 = [13 x i8] c"de-ch-g1.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*
%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 ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8** %9
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = load i8*, i8** %9
%13 = call i32 @check_translation(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%14 = load i32, i32* %6
%15 = or i32 %14, %13
store i32 %15, i32* %6
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0), i8** %9
%16 = load i8*, i8** %7
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* %16, i8* %17, i8* %18)
%20 = load i32, i32* %6
%21 = or i32 %20, %19
store i32 %21, i32* %6
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
@.str = [46 x i8] c"He said it wasn't always working as expected.\00"
@.str.1 = [46 x i8] c"110000000000000000111111111111110000000000000\00"
@.str.2 = [38 x i8] c".,he sd x wasn't .alw .\22w+ z expect$4\00"
@.str.3 = [26 x i8] c"compress.cti,en-us-g2.ctb\00"
@.str.4 = [51 x i8] c"Er sagte es funktioniere nicht immer wie erwartet.\00"
@.str.5 = [51 x i8] c"11000000000011111111111111111100000000000000000000\00"
@.str.6 = [53 x i8] c"_ER SAGTE ES __FUNKTION0RE NI4T', IMMER W0 ERWARTET.\00"
@.str.7 = [13 x i8] c"de-ch-g1.ctb\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_translation(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @check_translation(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%5 = or i32 %4, %3
ret i32 %5
}