#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_mixed(void) {
  int a[] = {5, 8, 9, 6, 3, 2, 0};
  int expected[] = {0, 2, 3, 5, 6, 8, 9};
  mergesort(7, a);
  _assert_true((int)(arrays_match(7, a, expected)),
               "arrays_match(7, a, expected)",
               "/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",
               50);
}


x86 assembly (clang, -O0):
<test_mixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeaf(%rip),%eax
mov    %eax,-0x28(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x7,%edi
call   1030 <mergesort@plt>
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x7,%edi
call   1050 <arrays_match@plt>
mov    %eax,%edi
lea    0xe87(%rip),%rsi
lea    0xe9d(%rip),%rdx
mov    $0x32,%ecx
call   1040 <_assert_true@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mixed>:
push   %rbx
sub    $0x40,%rsp
movups 0xed0(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xed8(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rbx
mov    $0x7,%edi
mov    %rbx,%rsi
call   1030 <mergesort@plt>
mov    %rsp,%rdx
mov    $0x7,%edi
mov    %rbx,%rsi
call   1050 <arrays_match@plt>
lea    0xeaf(%rip),%rsi
lea    0xec5(%rip),%rdx
mov    %eax,%edi
mov    $0x32,%ecx
call   1040 <_assert_true@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_mixed.a = [7 x i32] [i32 5, i32 8, i32 9, i32 6, i32 3, i32 2, i32 0]
@__const.test_mixed.expected = [7 x i32] [i32 0, i32 2, i32 3, i32 5, i32 6, i32 8, i32 9]
@.str = [29 x i8] c"arrays_match(7, a, expected)\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_mixed() {
%1 = alloca [7 x i32]
%2 = alloca [7 x i32]
%3 = bitcast [7 x i32]* %1 to i8*
%4 = bitcast [7 x i32]* %2 to i8*
%5 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%6 = call i32 @mergesort(i32 7, i32* %5)
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%9 = call i64 @arrays_match(i32 7, i32* %7, i32* %8)
%10 = trunc i64 %9 to i32
%11 = call i32 @_assert_true(i32 %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0), i32 50)
ret void
}

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