#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*/ M2RTS_ErrorMessage(char *, int, char *, unsigned int,
                                      unsigned int, char *, unsigned int);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
void Assert(unsigned int b, char *file_, unsigned int _file_high,
            unsigned int line, char *func_, unsigned int _func_high) {
  char file[_file_high + 1];
  char func[_func_high + 1];
  memcpy(file, file_, _file_high + 1);
  memcpy(func, func_, _func_high + 1);
  if (!b) {
    M2RTS_ErrorMessage((char *)"assert failed", 13, (char *)file, _file_high,
                       line, (char *)func, _func_high);
  }
}


x86 assembly (clang, -O0):
<Assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x50(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x48(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
cmpl   $0x0,-0x4(%rbp)
jne    11e2 <Assert+0xc2>
mov    -0x48(%rbp),%r9
mov    -0x50(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x24(%rbp),%eax
lea    0xe33(%rip),%rdi
mov    $0xd,%esi
sub    $0x10,%rsp
mov    %eax,(%rsp)
call   1030 <M2RTS_ErrorMessage@plt>
add    $0x10,%rsp
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assert>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,%r14
mov    %ecx,-0x2c(%rbp)
mov    %edi,%r13d
mov    %rdx,-0x38(%rbp)
add    $0x1,%edx
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r9,-0x40(%rbp)
lea    0x1(%r9),%r12d
mov    %rsp,%r15
lea    0xf(%r12),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %rbx,%rdi
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1040 <memcpy@plt>
test   %r13d,%r13d
jne    11b1 <Assert+0x91>
sub    $0x8,%rsp
lea    0xe6e(%rip),%rdi
mov    $0xd,%esi
mov    %rbx,%rdx
mov    -0x38(%rbp),%rcx
mov    -0x2c(%rbp),%r8d
mov    %r15,%r9
push   -0x40(%rbp)
call   1030 <M2RTS_ErrorMessage@plt>
add    $0x10,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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