#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 /*<<< orphan*/ _ok(char *, int, char *, int, char *);
int /*<<< orphan*/ printf(char *, int);
void _int_is(char *test_name, int i1, int i2, char *file, int linenum) {
  _ok(test_name, (i1 == i2), file, linenum, "");
  if (i1 != i2) {
    printf("#      got: %d\n", i1);
    printf("# expected: %d\n", i2);
  }
}


x86 assembly (clang, -O0):
<_int_is>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xec5(%rip),%r8
call   1040 <_ok@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1189 <_int_is+0x69>
mov    -0xc(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_int_is>:
push   %rbp
push   %rbx
push   %rax
mov    %r8d,%eax
mov    %edx,%ebx
mov    %esi,%ebp
xor    %esi,%esi
cmp    %edx,%ebp
sete   %sil
lea    0xee6(%rip),%r8
mov    %rcx,%rdx
mov    %eax,%ecx
call   1040 <_ok@plt>
cmp    %ebx,%ebp
jne    114e <_int_is+0x2e>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xeab(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [16 x i8] c"# got: %d\0A\00"
@.str.2 = [16 x i8] c"# expected: %d\0A\00"
define void @_int_is(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = load i8*, i8** %9
%17 = load i32, i32* %10
%18 = call i32 @_ok(i8* %11, i32 %15, i8* %16, i32 %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = icmp ne i32 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %5
%23 = load i32, i32* %7
%24 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %23)
%25 = load i32, i32* %8
%26 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %22, %5
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [16 x i8] c"# got: %d\0A\00"
@.str.2 = [16 x i8] c"# expected: %d\0A\00"
define void @_int_is(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = icmp eq i32 %1, %2
%7 = zext i1 %6 to i32
%8 = tail call i32 @_ok(i8* %0, i32 %7, i8* %3, i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br i1 %6, label %12, label %9
9: ; preds = %5
%10 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %2)
br label %12
12: ; preds = %9, %5
ret void
}