#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 relational_expr();
int equality_expr() {
  int type = relational_expr();
  while (1) {
    if (accept("==")) {
      binary1(type);
      type =
          binary2(relational_expr(), 9, "\x5b\x39\xc3\x0f\x94\xc0\x0f\xb6\xc0");
    } else if (accept("!=")) {
      binary1(type);
      type =
          binary2(relational_expr(), 9, "\x5b\x39\xc3\x0f\x95\xc0\x0f\xb6\xc0");
    } else
      return type;
  }
}


x86 assembly (clang, -O0):
<equality_expr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <relational_expr@plt>
mov    %eax,-0x4(%rbp)
lea    0xea7(%rip),%rdi
call   1040 <accept@plt>
cmp    $0x0,%rax
je     1192 <equality_expr+0x52>
mov    -0x4(%rbp),%edi
call   1030 <binary1@plt>
mov    $0x0,%al
call   1050 <relational_expr@plt>
mov    %eax,%edi
mov    $0x9,%esi
lea    0xe7e(%rip),%rdx
call   1060 <binary2@plt>
mov    %eax,-0x4(%rbp)
jmp    11e0 <equality_expr+0xa0>
lea    0xe74(%rip),%rdi
call   1040 <accept@plt>
cmp    $0x0,%rax
je     11d2 <equality_expr+0x92>
mov    -0x4(%rbp),%edi
call   1030 <binary1@plt>
mov    $0x0,%al
call   1050 <relational_expr@plt>
mov    %eax,%edi
mov    $0x9,%esi
lea    0xe4b(%rip),%rdx
call   1060 <binary2@plt>
mov    %eax,-0x4(%rbp)
jmp    11db <equality_expr+0x9b>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    11e0 <equality_expr+0xa0>
jmp    1152 <equality_expr+0x12>

x86 assembly (clang, -O2):
<equality_expr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <relational_expr@plt>
mov    %eax,%ebp
lea    0xea5(%rip),%r15
lea    0xea1(%rip),%r12
lea    0xea4(%rip),%r14
lea    0xea0(%rip),%r13
jmp    119f <equality_expr+0x5f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <binary1@plt>
xor    %eax,%eax
call   1050 <relational_expr@plt>
mov    %eax,%edi
mov    $0x9,%esi
mov    %rbx,%rdx
call   1060 <binary2@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1040 <accept@plt>
mov    %r12,%rbx
test   %rax,%rax
jne    1180 <equality_expr+0x40>
mov    %r14,%rdi
call   1040 <accept@plt>
mov    %r13,%rbx
test   %rax,%rax
jne    1180 <equality_expr+0x40>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"==\00"
@.str.1 = [10 x i8] c"[9\C3\0F\94\C0\0F\B6\C0\00"
@.str.2 = [3 x i8] c"!=\00"
@.str.3 = [10 x i8] c"[9\C3\0F\95\C0\0F\B6\C0\00"
define i32 @equality_expr() {
%1 = alloca i32
%2 = call i32 (...) @relational_expr()
store i32 %2, i32* %1
br label %3
3: ; preds = %0, %22
%4 = call i64 @accept(i8* getelementptr inbounds ([3 x i8], [3 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 (...) @relational_expr()
%10 = call i32 @binary2(i32 %9, i32 9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i32 %10, i32* %1
br label %22
11: ; preds = %3
%12 = call i64 @accept(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i32, i32* %1
%16 = call i32 @binary1(i32 %15)
%17 = call i32 (...) @relational_expr()
%18 = call i32 @binary2(i32 %17, i32 9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
store i32 %18, i32* %1
br label %21
19: ; preds = %11
%20 = load i32, i32* %1
ret i32 %20
21: ; preds = %14
br label %22
22: ; preds = %21, %6
br label %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"==\00"
@.str.1 = [10 x i8] c"[9\C3\0F\94\C0\0F\B6\C0\00"
@.str.2 = [3 x i8] c"!=\00"
@.str.3 = [10 x i8] c"[9\C3\0F\95\C0\0F\B6\C0\00"
define i32 @equality_expr() {
%1 = tail call i32 (...) @relational_expr()
br label %2
2: ; preds = %10, %0
%3 = phi i32 [ %1, %0 ], [ %14, %10 ]
%4 = tail call i64 @accept(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @accept(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
ret i32 %3
10: ; preds = %6, %2
%11 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %6 ]
%12 = tail call i32 @binary1(i32 %3)
%13 = tail call i32 (...) @relational_expr()
%14 = tail call i32 @binary2(i32 %13, i32 9, i8* %11)
br label %2
}