#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*/ fprintf(int /*<<< orphan*/, char *, char const *, char *,
                           char *);
int /*<<< orphan*/ stderr;
int expect_true(int actual, const char *description) {
  int passed = 1;
  if (!actual) {
    passed = 0;
    fprintf(stderr, "%s: Expected %s, got %s\n", description, "TRUE",
            actual ? "TRUE" : "FALSE");
  }
  return passed;
}


x86 assembly (clang, -O0):
<expect_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    116f <expect_true+0x5f>
movl   $0x0,-0x14(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x4(%rbp),%ecx
lea    0xed0(%rip),%r8
lea    0xec4(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%r8
lea    0xe9d(%rip),%rsi
lea    0xeaf(%rip),%rcx
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expect_true>:
mov    $0x1,%eax
test   %edi,%edi
je     111a <expect_true+0xa>
ret
push   %rax
mov    %rsi,%rdx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
lea    0xee4(%rip),%rcx
lea    0xee2(%rip),%r8
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"%s: Expected %s, got %s\0A\00"
@.str.1 = [5 x i8] c"TRUE\00"
@.str.2 = [6 x i8] c"FALSE\00"
define i32 @expect_true(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 1, i32* %5
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %2
store i32 0, i32* %5
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %4
%11 = load i32, i32* %3
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%15 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %8, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"%s: Expected %s, got %s\0A\00"
@.str.1 = [5 x i8] c"TRUE\00"
@.str.2 = [6 x i8] c"FALSE\00"
define i32 @expect_true(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %4, %2
%8 = phi i32 [ 1, %2 ], [ 0, %4 ]
ret i32 %8
}