#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*/ show(int *, int);
int main() {
  int nums1[100] = {3, 5, 7, 11, 23};
  int nums2[4] = {1, 4, 9, 13};
  merge(nums1, 5, nums2, 4);
  show(nums1, 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
movl   $0x3,-0x1a0(%rbp)
movl   $0x5,-0x19c(%rbp)
movl   $0x7,-0x198(%rbp)
movl   $0xb,-0x194(%rbp)
movl   $0x17,-0x190(%rbp)
mov    0xe72(%rip),%rax
mov    %rax,-0x1b0(%rbp)
mov    0xe6c(%rip),%rax
mov    %rax,-0x1a8(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    -0x1b0(%rbp),%rdx
mov    $0x5,%esi
mov    $0x4,%ecx
call   1050 <merge@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0x9,%esi
call   1040 <show@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

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

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

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