#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 */
scalar_t__ accept(char *);
int /*<<< orphan*/ binary1(int);
int binary2(int, int, char *);
int bitwise_and_expr();
int bitwise_or_expr() {
  int type = bitwise_and_expr();
  while (accept("|")) {
    binary1(type);
    type = binary2(bitwise_and_expr(), 3, "\x5b\x09\xd8");
  }
  return type;
}


x86 assembly (clang, -O0):
<bitwise_or_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <bitwise_and_expr@plt>
mov    %eax,-0x4(%rbp)
lea    0xea7(%rip),%rdi
call   1050 <accept@plt>
cmp    $0x0,%rax
je     1192 <bitwise_or_expr+0x52>
mov    -0x4(%rbp),%edi
call   1030 <binary1@plt>
mov    $0x0,%al
call   1040 <bitwise_and_expr@plt>
mov    %eax,%edi
mov    $0x3,%esi
lea    0xe7d(%rip),%rdx
call   1060 <binary2@plt>
mov    %eax,-0x4(%rbp)
jmp    1152 <bitwise_or_expr+0x12>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitwise_or_expr>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <bitwise_and_expr@plt>
mov    %eax,%ebx
lea    0xeab(%rip),%rdi
call   1050 <accept@plt>
test   %rax,%rax
je     119c <bitwise_or_expr+0x5c>
lea    0xe9c(%rip),%r14
lea    0xe93(%rip),%r15
nopl   (%rax)
mov    %ebx,%edi
call   1030 <binary1@plt>
xor    %eax,%eax
call   1040 <bitwise_and_expr@plt>
mov    %eax,%edi
mov    $0x3,%esi
mov    %r14,%rdx
call   1060 <binary2@plt>
mov    %eax,%ebx
mov    %r15,%rdi
call   1050 <accept@plt>
test   %rax,%rax
jne    1170 <bitwise_or_expr+0x30>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"|\00"
@.str.1 = [4 x i8] c"[\09\D8\00"
define i32 @bitwise_or_expr() {
%1 = alloca i32
%2 = call i32 (...) @bitwise_and_expr()
store i32 %2, i32* %1
br label %3
3: ; preds = %6, %0
%4 = call i64 @accept(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @binary1(i32 %7)
%9 = call i32 (...) @bitwise_and_expr()
%10 = call i32 @binary2(i32 %9, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
store i32 %10, i32* %1
br label %3
11: ; preds = %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"|\00"
@.str.1 = [4 x i8] c"[\09\D8\00"
define i32 @bitwise_or_expr() {
%1 = tail call i32 (...) @bitwise_and_expr()
%2 = tail call i64 @accept(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @binary1(i32 %5)
%7 = tail call i32 (...) @bitwise_and_expr()
%8 = tail call i32 @binary2(i32 %7, i32 3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i64 @accept(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %0
%12 = phi i32 [ %1, %0 ], [ %8, %4 ]
ret i32 %12
}