#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 do_test(char *);
int main(void) {
  int res;
  res = do_test("C");
  res |= do_test("de_DE.ISO-8859-1");
  res |= do_test("de_DE.UTF-8");
  res |= do_test("en_US.ANSI_X3.4-1968");
  res |= do_test("ja_JP.EUC-JP");
  res |= do_test("hr_HR.ISO-8859-2");
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <do_test@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <do_test@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xec6(%rip),%rdi
call   1030 <do_test@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <do_test@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xec4(%rip),%rdi
call   1030 <do_test@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xee5(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,%ebx
lea    0xed9(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,%ebp
or     %ebx,%ebp
lea    0xeda(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,%r14d
lea    0xed7(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,%ebx
or     %r14d,%ebx
or     %ebp,%ebx
lea    0xed9(%rip),%rdi
call   1030 <do_test@plt>
mov    %eax,%ebp
lea    0xed8(%rip),%rdi
call   1030 <do_test@plt>
or     %ebp,%eax
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"C\00"
@.str.1 = [17 x i8] c"de_DE.ISO-8859-1\00"
@.str.2 = [12 x i8] c"de_DE.UTF-8\00"
@.str.3 = [21 x i8] c"en_US.ANSI_X3.4-1968\00"
@.str.4 = [13 x i8] c"ja_JP.EUC-JP\00"
@.str.5 = [17 x i8] c"hr_HR.ISO-8859-2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @do_test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = call i32 @do_test(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = call i32 @do_test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = or i32 %8, %7
store i32 %9, i32* %2
%10 = call i32 @do_test(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = call i32 @do_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = or i32 %14, %13
store i32 %15, i32* %2
%16 = call i32 @do_test(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"C\00"
@.str.1 = [17 x i8] c"de_DE.ISO-8859-1\00"
@.str.2 = [12 x i8] c"de_DE.UTF-8\00"
@.str.3 = [21 x i8] c"en_US.ANSI_X3.4-1968\00"
@.str.4 = [13 x i8] c"ja_JP.EUC-JP\00"
@.str.5 = [17 x i8] c"hr_HR.ISO-8859-2\00"
define i32 @main() {
%1 = tail call i32 @do_test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @do_test(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = or i32 %2, %1
%4 = tail call i32 @do_test(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%5 = or i32 %3, %4
%6 = tail call i32 @do_test(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
%7 = or i32 %5, %6
%8 = tail call i32 @do_test(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%9 = or i32 %7, %8
%10 = tail call i32 @do_test(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%11 = or i32 %9, %10
ret i32 %11
}