#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*/ Platform_errint(long long);
int /*<<< orphan*/ Platform_errln();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, unsigned char *, long long);
void Platform_AssertFail(long long code) {
  int e;
  write(1, (unsigned char *)"Assertion failure.", (long long)19 - 1);
  if (code != 0) {
    write(1, (unsigned char *)" ASSERT code ", (long long)14 - 1);
    Platform_errint(code);
    write(1, (unsigned char *)".", (long long)2 - 1);
  }
  Platform_errln();
  exit(((int)(code)));
}


x86 assembly (clang, -O0):
<Platform_AssertFail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
lea    0xea8(%rip),%rsi
mov    $0x12,%edx
call   1030 <write@plt>
cmpq   $0x0,-0x8(%rbp)
je     11a2 <Platform_AssertFail+0x62>
mov    $0x1,%edi
lea    0xe9a(%rip),%rsi
mov    $0xd,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
call   1060 <Platform_errint@plt>
mov    $0x1,%edi
lea    0xe79(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <Platform_errln@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Platform_AssertFail>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rsi
mov    $0x12,%edx
mov    $0x1,%edi
call   1030 <write@plt>
test   %rbx,%rbx
je     1193 <Platform_AssertFail+0x53>
lea    0xead(%rip),%rsi
mov    $0xd,%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %rbx,%rdi
call   1060 <Platform_errint@plt>
lea    0xe8d(%rip),%rsi
mov    $0x1,%edx
mov    $0x1,%edi
call   1030 <write@plt>
xor    %eax,%eax
call   1040 <Platform_errln@plt>
mov    %ebx,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Assertion failure.\00"
@.str.1 = [14 x i8] c" ASSERT code \00"
@.str.2 = [2 x i8] c".\00"
define void @Platform_AssertFail(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 18)
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 13)
%9 = load i64, i64* %2
%10 = call i32 @Platform_errint(i64 %9)
%11 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i64 1)
br label %12
12: ; preds = %7, %1
%13 = call i32 (...) @Platform_errln()
%14 = load i64, i64* %2
%15 = trunc i64 %14 to i32
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Assertion failure.\00"
@.str.1 = [14 x i8] c" ASSERT code \00"
@.str.2 = [2 x i8] c".\00"
define void @Platform_AssertFail(i64 %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 18)
%3 = icmp eq i64 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i64 13)
%6 = tail call i32 @Platform_errint(i64 %0)
%7 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i64 1)
br label %8
8: ; preds = %4, %1
%9 = tail call i32 (...) @Platform_errln()
%10 = trunc i64 %0 to i32
%11 = tail call i32 @exit(i32 %10)
unreachable
}