#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 */
typedef int /*<<< orphan*/ unsorted;

/* Variables and functions */
int /*<<< orphan*/ merge_sort_(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int, ...);
void merge_sort(int *unsorted, int r) {
  printf("SIZE * / SIZE 0: %lu/%lu\n", sizeof(unsorted), sizeof(unsorted[0]));
  printf("INITIAL NE: %lu\n", (sizeof(unsorted) / sizeof(unsorted[0])));
  printf("R IS: %d\n", r);
  merge_sort_(unsorted, 0, r);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x8,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <merge_sort_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xed0(%rip),%rdi
mov    $0x4,%edx
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <merge_sort_@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"SIZE * / SIZE 0: %lu/%lu\0A\00"
@.str.1 = [17 x i8] c"INITIAL NE: %lu\0A\00"
@.str.2 = [10 x i8] c"R IS: %d\0A\00"
define void @merge_sort(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 8, i64 4)
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2)
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = call i32 @merge_sort_(i32* %9, i32 0, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"SIZE * / SIZE 0: %lu/%lu\0A\00"
@.str.1 = [17 x i8] c"INITIAL NE: %lu\0A\00"
@.str.2 = [10 x i8] c"R IS: %d\0A\00"
define void @merge_sort(i32* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 8, i64 4)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 2)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%6 = tail call i32 @merge_sort_(i32* %0, i32 0, i32 %1)
ret void
}