#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 isEqual(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a = 60;
  int b = 13;
  int c = isEqual(a, b);
  printf("%d == %d should be %d\n", a, b, 0);
  printf("isEqual(%d, %d) -> %d\n", a, b, c);
  int d = isEqual(a, a);
  printf("%d == %d should be %d\n", a, a, 1);
  printf("isEqual(%d, %d) -> %d\n", a, a, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3c,-0x4(%rbp)
movl   $0xd,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <isEqual@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeaf(%rip),%rdi
xor    %ecx,%ecx
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <isEqual@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe78(%rip),%rdi
mov    $0x1,%ecx
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x3c,%edi
mov    $0xd,%esi
call   1040 <isEqual@plt>
mov    %eax,%ebx
lea    0xec3(%rip),%r14
mov    %r14,%rdi
mov    $0x3c,%esi
mov    $0xd,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
lea    0xebf(%rip),%r15
mov    %r15,%rdi
mov    $0x3c,%esi
mov    $0xd,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    $0x3c,%edi
mov    $0x3c,%esi
call   1040 <isEqual@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    $0x3c,%esi
mov    $0x3c,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    $0x3c,%esi
mov    $0x3c,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"%d == %d should be %d\0A\00"
@.str.1 = [23 x i8] c"isEqual(%d, %d) -> %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 60, i32* %1
store i32 13, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @isEqual(i32 %5, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 0)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %1
%16 = load i32, i32* %1
%17 = call i32 @isEqual(i32 %15, i32 %16)
store i32 %17, i32* %4
%18 = load i32, i32* %1
%19 = load i32, i32* %1
%20 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19, i32 1)
%21 = load i32, i32* %1
%22 = load i32, i32* %1
%23 = load i32, i32* %4
%24 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %22, i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"%d == %d should be %d\0A\00"
@.str.1 = [23 x i8] c"isEqual(%d, %d) -> %d\0A\00"
define i32 @main() {
%1 = tail call i32 @isEqual(i32 60, i32 13)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 60, i32 13, i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 60, i32 13, i32 %1)
%4 = tail call i32 @isEqual(i32 60, i32 60)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 60, i32 60, i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 60, i32 60, i32 %4)
ret i32 0
}