#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*/ itoa(int, char *);
int /*<<< orphan*/ puts(char const *);
void _assert(int expr, const char *the_file, int the_line) {
  char buf[16];
  if (!expr) {
    puts("assert failed in ");
    puts(the_file);
    puts(" ");
    itoa(the_line, buf);
    puts((const char *)buf);
    puts("\n");
    while (1)
      ;
  }
}


x86 assembly (clang, -O0):
<_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1183 <_assert+0x63>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%edi
lea    -0x30(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0x30(%rbp),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
jmp    117e <_assert+0x5e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert>:
test   %edi,%edi
je     1125 <_assert+0x5>
ret
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
nopw   0x0(%rax,%rax,1)
jmp    1180 <_assert+0x60>

LLVM IR (-O0):
@.str = [18 x i8] c"assert failed in \00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @_assert(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [16 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %22, label %10
10: ; preds = %3
%11 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %5
%13 = call i32 @puts(i8* %12)
%14 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%15 = load i32, i32* %6
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%17 = call i32 @itoa(i32 %15, i8* %16)
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%19 = call i32 @puts(i8* %18)
%20 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %10, %21
br label %21
22: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"assert failed in \00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @_assert(i32 %0, i8* nocapture %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = icmp eq i32 %0, 0
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) %1)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @itoa(i32 %2, i8* %5)
%12 = call i32 @puts(i8* %5)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %14, %7
br label %14
15: ; preds = %3
ret void
}