#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*/ __assert_false(char *, int, int);
int /*<<< orphan*/ __assert_true(char *, int, int);
scalar_t__ compare(void *, void *);
void test_pqueue_is_before_func(void) {
  __assert_true("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/"
                "master/test/unit/vm/pqueue-test.c",
                47, (compare((void *)1UL, (void *)0UL) < 0));
  __assert_true("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/"
                "master/test/unit/vm/pqueue-test.c",
                48, (compare((void *)1UL, (void *)0UL) <= 0));
  __assert_false("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                 "outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/"
                 "master/test/unit/vm/pqueue-test.c",
                 50, (compare((void *)0UL, (void *)1UL) < 0));
}


x86 assembly (clang, -O0):
<test_pqueue_is_before_func>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <compare@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edx
lea    0xeab(%rip),%rdi
mov    $0x2f,%esi
call   1040 <__assert_true@plt>
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <compare@plt>
cmp    $0x0,%rax
setle  %al
and    $0x1,%al
movzbl %al,%edx
lea    0xe80(%rip),%rdi
mov    $0x30,%esi
call   1040 <__assert_true@plt>
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1,%esi
call   1050 <compare@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edx
lea    0xe55(%rip),%rdi
mov    $0x32,%esi
call   1030 <__assert_false@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_pqueue_is_before_func>:
push   %rbx
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <compare@plt>
shr    $0x3f,%rax
lea    0xeb8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
mov    %eax,%edx
call   1040 <__assert_true@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <compare@plt>
xor    %edx,%edx
test   %rax,%rax
setle  %dl
mov    %rbx,%rdi
mov    $0x30,%esi
call   1040 <__assert_true@plt>
mov    $0x1,%esi
xor    %edi,%edi
call   1050 <compare@plt>
shr    $0x3f,%rax
mov    %rbx,%rdi
mov    $0x32,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <__assert_false@plt>

LLVM IR (-O0):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/pqueue-test.c\00"
define void @test_pqueue_is_before_func() {
%1 = call i64 @compare(i8* inttoptr (i64 1 to i8*), i8* null)
%2 = icmp slt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @__assert_true(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 47, i32 %3)
%5 = call i64 @compare(i8* inttoptr (i64 1 to i8*), i8* null)
%6 = icmp sle i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @__assert_true(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 48, i32 %7)
%9 = call i64 @compare(i8* null, i8* inttoptr (i64 1 to i8*))
%10 = icmp slt i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @__assert_false(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 50, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/headius/jato/refs/heads/master/test/unit/vm/pqueue-test.c\00"
define void @test_pqueue_is_before_func() {
%1 = tail call i64 @compare(i8* inttoptr (i64 1 to i8*), i8* null)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @__assert_true(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 47, i32 %3)
%5 = tail call i64 @compare(i8* inttoptr (i64 1 to i8*), i8* null)
%6 = icmp slt i64 %5, 1
%7 = zext i1 %6 to i32
%8 = tail call i32 @__assert_true(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 48, i32 %7)
%9 = tail call i64 @compare(i8* null, i8* inttoptr (i64 1 to i8*))
%10 = lshr i64 %9, 63
%11 = trunc i64 %10 to i32
%12 = tail call i32 @__assert_false(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 50, i32 %11)
ret void
}