#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, int *, int *);
int /*<<< orphan*/ mergesort(int, int *);
void test_singleton_list(void) {
  int a[] = {5};
  int b[] = {5};
  mergesort(1, b);
  _assert_true((int)(arrays_match(1, a, b)), "arrays_match(1, 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",
               29);
}


x86 assembly (clang, -O0):
<test_singleton_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec2(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <mergesort@plt>
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x1,%edi
call   1050 <arrays_match@plt>
mov    %eax,%edi
lea    0xe91(%rip),%rsi
lea    0xea0(%rip),%rdx
mov    $0x1d,%ecx
call   1040 <_assert_true@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_singleton_list>:
push   %rbx
sub    $0x10,%rsp
movl   $0x5,0xc(%rsp)
movl   $0x5,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <mergesort@plt>
lea    0xc(%rsp),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1050 <arrays_match@plt>
lea    0xe90(%rip),%rsi
lea    0xe9f(%rip),%rdx
mov    %eax,%edi
mov    $0x1d,%ecx
call   1040 <_assert_true@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_singleton_list.a = [1 x i32] [i32 5]
@__const.test_singleton_list.b = [1 x i32] [i32 5]
@.str = [22 x i8] c"arrays_match(1, 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_singleton_list() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = bitcast [1 x i32]* %2 to i8*
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%6 = call i32 @mergesort(i32 1, i32* %5)
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%9 = call i64 @arrays_match(i32 1, 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 29)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"arrays_match(1, 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_singleton_list() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %1 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 5, i32* %4
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 5, i32* %6
%7 = call i32 @mergesort(i32 1, i32* %6)
%8 = call i64 @arrays_match(i32 1, i32* %4, i32* %6)
%9 = trunc i64 %8 to i32
%10 = call i32 @_assert_true(i32 %9, 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 29)
ret void
}