#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*/ merge(int *, int, int *, int);
int /*<<< orphan*/ pr_array(int *, int);
main() {
  int a[100] = {1, 3, 5, 7};
  int b[] = {-5, 2, 4, 6, 77};
  merge(a, 4, b, 5);
  pr_array(a, 9);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
lea    -0x190(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
movl   $0x1,-0x190(%rbp)
movl   $0x3,-0x18c(%rbp)
movl   $0x5,-0x188(%rbp)
movl   $0x7,-0x184(%rbp)
mov    0xe83(%rip),%rax
mov    %rax,-0x1b0(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0x1a8(%rbp)
mov    0xe78(%rip),%eax
mov    %eax,-0x1a0(%rbp)
lea    -0x190(%rbp),%rdi
lea    -0x1b0(%rbp),%rdx
mov    $0x4,%esi
mov    $0x5,%ecx
call   1050 <merge@plt>
lea    -0x190(%rbp),%rdi
mov    $0x9,%esi
call   1030 <pr_array@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1b0,%rsp
lea    0x30(%rsp),%rdi
mov    $0x180,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    0xec5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rbx
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x5,%ecx
call   1050 <merge@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <pr_array@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.b = [5 x i32] [i32 -5, i32 2, i32 4, i32 6, i32 77]
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [100 x i32]* %1 to i8*
%4 = bitcast i8* %3 to <{ i32, i32, i32, i32, [96 x i32] }>*
%5 = getelementptr inbounds <{ i32, i32, i32, i32, [96 x i32] }>, <{ i32, i32, i32, i32, [96 x i32] }>* %4, i32 0, i32 0
store i32 1, i32* %5
%6 = getelementptr inbounds <{ i32, i32, i32, i32, [96 x i32] }>, <{ i32, i32, i32, i32, [96 x i32] }>* %4, i32 0, i32 1
store i32 3, i32* %6
%7 = getelementptr inbounds <{ i32, i32, i32, i32, [96 x i32] }>, <{ i32, i32, i32, i32, [96 x i32] }>* %4, i32 0, i32 2
store i32 5, i32* %7
%8 = getelementptr inbounds <{ i32, i32, i32, i32, [96 x i32] }>, <{ i32, i32, i32, i32, [96 x i32] }>* %4, i32 0, i32 3
store i32 7, i32* %8
%9 = bitcast [5 x i32]* %2 to i8*
%10 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%12 = call i32 @merge(i32* %10, i32 4, i32* %11, i32 5)
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%14 = call i32 @pr_array(i32* %13, i32 9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.b = [5 x i32] [i32 -5, i32 2, i32 4, i32 6, i32 77]
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca [5 x i32]
%3 = bitcast [100 x i32]* %1 to i8*
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 4
%5 = bitcast i32* %4 to i8*
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%7 = bitcast [100 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 3, i32 5, i32 7>, <4 x i32>* %7
%8 = bitcast [5 x i32]* %2 to i8*
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%10 = call i32 @merge(i32* %6, i32 4, i32* %9, i32 5)
%11 = call i32 @pr_array(i32* %6, i32 9)
ret i32 0
}