#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 testFiveBits();
int testFiveBitsEnd();
int testFiveBitsMid();
int testFiveBitsStart();
int testNoFiveBits();
int testStuffAndUnstuff();
int main() {
  int ret = 0;
  ret = ret | testNoFiveBits();
  ret = ret | testFiveBits();
  ret = ret | testFiveBitsStart();
  ret = ret | testFiveBitsMid();
  ret = ret | testFiveBitsEnd();
  ret = ret | testStuffAndUnstuff();
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <testNoFiveBits@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1080 <testFiveBits@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1060 <testFiveBitsStart@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <testFiveBitsMid@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <testFiveBitsEnd@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <testStuffAndUnstuff@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <testNoFiveBits@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <testFiveBits@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1060 <testFiveBitsStart@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <testFiveBitsMid@plt>
mov    %eax,%ebx
or     %r14d,%ebx
or     %ebp,%ebx
xor    %eax,%eax
call   1040 <testFiveBitsEnd@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1070 <testStuffAndUnstuff@plt>
or     %ebp,%eax
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @testNoFiveBits()
%5 = or i32 %3, %4
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (...) @testFiveBits()
%8 = or i32 %6, %7
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = call i32 (...) @testFiveBitsStart()
%11 = or i32 %9, %10
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = call i32 (...) @testFiveBitsMid()
%14 = or i32 %12, %13
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = call i32 (...) @testFiveBitsEnd()
%17 = or i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = call i32 (...) @testStuffAndUnstuff()
%20 = or i32 %18, %19
store i32 %20, i32* %2
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testNoFiveBits()
%2 = tail call i32 (...) @testFiveBits()
%3 = or i32 %2, %1
%4 = tail call i32 (...) @testFiveBitsStart()
%5 = or i32 %3, %4
%6 = tail call i32 (...) @testFiveBitsMid()
%7 = or i32 %5, %6
%8 = tail call i32 (...) @testFiveBitsEnd()
%9 = or i32 %7, %8
%10 = tail call i32 (...) @testStuffAndUnstuff()
%11 = or i32 %9, %10
ret i32 %11
}