#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*/ libc_printf(char *, int, ...);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
scalar_t__ twoDsim_isFixed(unsigned int);
void assertMovement(unsigned int id1, unsigned int id2, char *message_,
                    unsigned int _message_high) {
  char message[_message_high + 1];
  memcpy(message, message_, _message_high + 1);
  if ((twoDsim_isFixed(id1)) && (twoDsim_isFixed(id2))) {
    libc_printf((char *)"assert failed, ", 15);
    libc_printf((char *)message, _message_high);
    libc_printf((char *)", pge should not be detecting a collision event "
                        "between two fixed objects %d and %d\\n",
                85, id1, id2);
  }
}


x86 assembly (clang, -O0):
<assertMovement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x4(%rbp),%edi
call   1050 <twoDsim_isFixed@plt>
cmp    $0x0,%rax
je     11db <assertMovement+0xab>
mov    -0x8(%rbp),%edi
call   1050 <twoDsim_isFixed@plt>
cmp    $0x0,%rax
je     11db <assertMovement+0xab>
lea    0xe58(%rip),%rdi
mov    $0xf,%esi
mov    $0x0,%al
call   1030 <libc_printf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1030 <libc_printf@plt>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe41(%rip),%rdi
mov    $0x55,%esi
mov    $0x0,%al
call   1030 <libc_printf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertMovement>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r12d
mov    %esi,%r14d
mov    %edi,%r15d
lea    0x1(%r12),%eax
mov    %rsp,%rbx
lea    0xf(%rax),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %rdx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    %r15d,%edi
call   1050 <twoDsim_isFixed@plt>
test   %rax,%rax
je     11ba <assertMovement+0x8a>
mov    %r14d,%edi
call   1050 <twoDsim_isFixed@plt>
test   %rax,%rax
je     11ba <assertMovement+0x8a>
lea    0xe78(%rip),%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1030 <libc_printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1030 <libc_printf@plt>
lea    0xe68(%rip),%rdi
mov    $0x55,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1030 <libc_printf@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"assert failed, \00"
@.str.1 = [86 x i8] c", pge should not be detecting a collision event between two fixed objects %d and %d\\n\00"
define void @assertMovement(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%11 = load i32, i32* %8
%12 = add i32 %11, 1
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %9
%15 = alloca i8, i64 %13
store i64 %13, i64* %10
%16 = load i8*, i8** %7
%17 = load i32, i32* %8
%18 = add i32 %17, 1
%19 = call i32 @memcpy(i8* %15, i8* %16, i32 %18)
%20 = load i32, i32* %5
%21 = call i64 @twoDsim_isFixed(i32 %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %34
23: ; preds = %4
%24 = load i32, i32* %6
%25 = call i64 @twoDsim_isFixed(i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = call i32 (i8*, i32, ...) @libc_printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%29 = load i32, i32* %8
%30 = call i32 (i8*, i32, ...) @libc_printf(i8* %15, i32 %29)
%31 = load i32, i32* %5
%32 = load i32, i32* %6
%33 = call i32 (i8*, i32, ...) @libc_printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %31, i32 %32)
br label %34
34: ; preds = %27, %23, %4
%35 = load i8*, i8** %9
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"assert failed, \00"
@.str.1 = [86 x i8] c", pge should not be detecting a collision event between two fixed objects %d and %d\\n\00"
define void @assertMovement(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = add i32 %3, 1
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = call i32 @memcpy(i8* %7, i8* %2, i32 %5)
%9 = call i64 @twoDsim_isFixed(i32 %0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %4
%12 = call i64 @twoDsim_isFixed(i32 %1)
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %11
%15 = call i32 (i8*, i32, ...) @libc_printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 15)
%16 = call i32 (i8*, i32, ...) @libc_printf(i8* %7, i32 %3)
%17 = call i32 (i8*, i32, ...) @libc_printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0), i32 85, i32 %0, i32 %1)
br label %18
18: ; preds = %14, %11, %4
ret void
}