#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*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void __eprintf(const char *condexpr, unsigned long line, const char *file) {
  char buf[12];
  char *ptr = &buf[11];
  *ptr = 0;
  do {
    --ptr;
    *ptr = (line % 10) + '0';
    line = line / 10;
  } while (line != 0);
  fputs("assertion ", stderr);
  fputs(condexpr, stderr);
  fputs(" failed at line ", stderr);
  fputs(ptr, stderr);
  fputs(" of file ", stderr);
  fputs(file, stderr);
  fputs("\n", stderr);
}


x86 assembly (clang, -O0):
<__eprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x24(%rbp),%rax
add    $0xb,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
add    $0x30,%rdx
mov    %dl,%cl
mov    -0x30(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <__eprintf+0x27>
mov    0x2e5f(%rip),%rax
mov    (%rax),%esi
lea    0xe76(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e46(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%esi
lea    0xe5a(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x30(%rbp),%rdi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%esi
lea    0xe44(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x18(%rbp),%rdi
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
lea    0xe27(%rip),%rdi
call   1030 <fputs@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__eprintf>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rdi,%r15
lea    0x17(%rsp),%rbx
movb   $0x0,0x17(%rsp)
movabs $0xcccccccccccccccd,%rcx
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rsi,%rax
mul    %rcx
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %esi,%edi
sub    %eax,%edi
or     $0x30,%dil
mov    %dil,-0x1(%rbx)
add    $0xffffffffffffffff,%rbx
cmp    $0x9,%rsi
mov    %rdx,%rsi
ja     1140 <__eprintf+0x30>
mov    0x2e70(%rip),%r12
mov    (%r12),%esi
lea    0xe85(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
mov    %r15,%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
lea    0xe74(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
lea    0xe69(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
mov    %r14,%rdi
call   1030 <fputs@plt>
mov    (%r12),%esi
lea    0xe57(%rip),%rdi
call   1030 <fputs@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"assertion \00"
@stderr = global i32 0
@.str.1 = [17 x i8] c" failed at line \00"
@.str.2 = [10 x i8] c" of file \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @__eprintf(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca [12 x i8]
%8 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %7, i64 0, i64 11
store i8* %9, i8** %8
%10 = load i8*, i8** %8
store i8 0, i8* %10
br label %11
11: ; preds = %21, %3
%12 = load i8*, i8** %8
%13 = getelementptr inbounds i8, i8* %12, i32 -1
store i8* %13, i8** %8
%14 = load i64, i64* %5
%15 = urem i64 %14, 10
%16 = add i64 %15, 48
%17 = trunc i64 %16 to i8
%18 = load i8*, i8** %8
store i8 %17, i8* %18
%19 = load i64, i64* %5
%20 = udiv i64 %19, 10
store i64 %20, i64* %5
br label %21
21: ; preds = %11
%22 = load i64, i64* %5
%23 = icmp ne i64 %22, 0
br i1 %23, label %11, label %24
24: ; preds = %21
%25 = load i32, i32* @stderr
%26 = call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = load i8*, i8** %4
%28 = load i32, i32* @stderr
%29 = call i32 @fputs(i8* %27, i32 %28)
%30 = load i32, i32* @stderr
%31 = call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = load i8*, i8** %8
%33 = load i32, i32* @stderr
%34 = call i32 @fputs(i8* %32, i32 %33)
%35 = load i32, i32* @stderr
%36 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = load i8*, i8** %6
%38 = load i32, i32* @stderr
%39 = call i32 @fputs(i8* %37, i32 %38)
%40 = load i32, i32* @stderr
%41 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %40)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"assertion \00"
@stderr = global i32 0
@.str.1 = [17 x i8] c" failed at line \00"
@.str.2 = [10 x i8] c" of file \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @__eprintf(i8* %0, i64 %1, i8* %2) {
%4 = alloca [12 x i8]
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 11
store i8 0, i8* %6
br label %7
7: ; preds = %7, %3
%8 = phi i64 [ %1, %3 ], [ %14, %7 ]
%9 = phi i8* [ %6, %3 ], [ %10, %7 ]
%10 = getelementptr inbounds i8, i8* %9, i64 -1
%11 = urem i64 %8, 10
%12 = trunc i64 %11 to i8
%13 = or i8 %12, 48
store i8 %13, i8* %10
%14 = udiv i64 %8, 10
%15 = icmp ult i64 %8, 10
br i1 %15, label %16, label %7
16: ; preds = %7
%17 = load i32, i32* @stderr
%18 = tail call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = load i32, i32* @stderr
%20 = tail call i32 @fputs(i8* %0, i32 %19)
%21 = load i32, i32* @stderr
%22 = tail call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stderr
%24 = call i32 @fputs(i8* %10, i32 %23)
%25 = load i32, i32* @stderr
%26 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @stderr
%28 = call i32 @fputs(i8* %2, i32 %27)
%29 = load i32, i32* @stderr
%30 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %29)
ret void
}