#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*/ test_fail_message(int /*<<< orphan*/ *, char const *, int,
                                     char *, char const *, char *, char *,
                                     char *);
int test_true(const char *file, int line, const char *s, int b) {
  if (b)
    return 1;
  test_fail_message(NULL, file, line, "bool", s, "true", "==", "false");
  return 0;
}


x86 assembly (clang, -O0):
<test_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     113c <test_true+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    117c <test_true+0x6c>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
xor    %eax,%eax
mov    %eax,%edi
lea    0xeae(%rip),%rcx
lea    0xeac(%rip),%r9
lea    0xeaa(%rip),%r10
lea    0xea6(%rip),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <test_fail_message@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_true>:
push   %rbx
mov    $0x1,%ebx
test   %ecx,%ecx
jne    114e <test_true+0x3e>
mov    %rdx,%r8
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rax
lea    0xeda(%rip),%r10
lea    0xec9(%rip),%rcx
lea    0xec7(%rip),%r9
xor    %ebx,%ebx
xor    %edi,%edi
push   %rax
push   %r10
call   1030 <test_fail_message@plt>
add    $0x10,%rsp
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"bool\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @test_true(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %4
store i32 1, i32* %5
br label %18
13: ; preds = %4
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load i8*, i8** %8
%17 = call i32 @test_fail_message(i32* null, i8* %14, i32 %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %5
br label %18
18: ; preds = %13, %12
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [5 x i8] c"bool\00"
@.str.1 = [5 x i8] c"true\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [6 x i8] c"false\00"
define i32 @test_true(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @test_fail_message(i32* null, i8* %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ 0, %6 ], [ 1, %4 ]
ret i32 %9
}