#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_true(int, char *, char *, int);
scalar_t__ arrays_match(int /*<<< orphan*/, int *, int *);
int /*<<< orphan*/ mergesort(int /*<<< orphan*/, int *);
void test_empty_list(void) {
  int a[] = {};
  int b[] = {};
  mergesort(0, b);
  _assert_true((int)(arrays_match(0, a, b)), "arrays_match(0, a, b)",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/"
               "Lab_3_starter/refs/heads/master/mergesort/mergesort_test.c",
               22);
}


x86 assembly (clang, -O0):
<test_empty_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <mergesort@plt>
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
xor    %edi,%edi
call   1050 <arrays_match@plt>
mov    %eax,%edi
lea    0xea5(%rip),%rsi
lea    0xeb4(%rip),%rdx
mov    $0x16,%ecx
call   1040 <_assert_true@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_empty_list>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <mergesort@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1050 <arrays_match@plt>
lea    0xea8(%rip),%rsi
lea    0xeb7(%rip),%rdx
mov    %eax,%edi
mov    $0x16,%ecx
call   1040 <_assert_true@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"arrays_match(0, a, b)\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/mergesort/mergesort_test.c\00"
define void @test_empty_list() {
%1 = alloca [0 x i32]
%2 = alloca [0 x i32]
%3 = bitcast [0 x i32]* %1 to i8*
%4 = bitcast [0 x i32]* %2 to i8*
%5 = getelementptr inbounds [0 x i32], [0 x i32]* %2, i64 0, i64 0
%6 = call i32 @mergesort(i32 0, i32* %5)
%7 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [0 x i32], [0 x i32]* %2, i64 0, i64 0
%9 = call i64 @arrays_match(i32 0, i32* %7, i32* %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @_assert_true(i32 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0), i32 22)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"arrays_match(0, a, b)\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/UMM-CSci-3401-F13/Lab_3_starter/refs/heads/master/mergesort/mergesort_test.c\00"
define void @test_empty_list() {
%1 = alloca [0 x i32]
%2 = bitcast [0 x i32]* %1 to i8*
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = call i32 @mergesort(i32 0, i32* %3)
%5 = call i64 @arrays_match(i32 0, i32* %3, i32* %3)
%6 = trunc i64 %5 to i32
%7 = call i32 @_assert_true(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0), i32 22)
ret void
}