#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 const *, unsigned int, int, char const *);
int /*<<< orphan*/ putstr(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void int_is(const char *file, unsigned int line, int got, int expected,
            const char *name) {
  ok(file, line, got == expected, name);
  if (got != expected) {
    char buf[16];
    putstr("#         got: ");
    sprintf(buf,
            "%d"
            "\n",
            got);
    putstr(buf);
    putstr("#    expected: ");
    sprintf(buf,
            "%d"
            "\n",
            expected);
    putstr(buf);
  }
}


x86 assembly (clang, -O0):
<int_is>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x20(%rbp),%rcx
call   1030 <ok@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     11c3 <int_is+0x93>
lea    0xe86(%rip),%rdi
call   1040 <putstr@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xe83(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <putstr@plt>
lea    0xe72(%rip),%rdi
call   1040 <putstr@plt>
lea    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe5b(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <putstr@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_is>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebx
mov    %edx,%ebp
xor    %edx,%edx
cmp    %ecx,%ebp
sete   %dl
mov    %r8,%rcx
call   1030 <ok@plt>
cmp    %ebx,%ebp
je     119d <int_is+0x6d>
lea    0xea8(%rip),%rdi
call   1040 <putstr@plt>
lea    0xeac(%rip),%r14
mov    %rsp,%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    %r15,%rdi
call   1040 <putstr@plt>
lea    0xe91(%rip),%rdi
call   1040 <putstr@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %r15,%rdi
call   1040 <putstr@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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