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

/* Variables and functions */
double findMedianSortedArraysByMergeSort(int *, int, int *, int);
int /*<<< orphan*/ printf(char *, double, ...);
void findMedianSortedArraysMain(void) {
  int nums1[] = {0};
  int nums2[] = {1};
  int len1;
  int len2;
  { len1 = sizeof(nums1) / sizeof(nums1[0]); };
  { len2 = sizeof(nums2) / sizeof(nums2[0]); };
  printf("%d %d\n", len1, len2);
  printf("%f", findMedianSortedArraysByMergeSort(nums1, len1, nums2, len2));
}


x86 assembly (clang, -O0):
<findMedianSortedArraysMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    0xeb2(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
mov    -0x10(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%ecx
call   1050 <findMedianSortedArraysByMergeSort@plt>
lea    0xe7c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findMedianSortedArraysMain>:
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x1,(%rsp)
lea    0xed1(%rip),%rdi
movsd  0xec1(%rip),%xmm0
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rdx
mov    $0x1,%esi
mov    $0x1,%ecx
call   1040 <findMedianSortedArraysByMergeSort@plt>
lea    0xea6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.findMedianSortedArraysMain.nums2 = [1 x i32] [i32 1]
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define void @findMedianSortedArraysMain() {
%1 = alloca [1 x i32]
%2 = alloca [1 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [1 x i32]* %1 to i8*
%6 = bitcast [1 x i32]* %2 to i8*
store i32 1, i32* %3
store i32 1, i32* %4
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = load i32, i32* %4
%10 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %8, i32 %9)
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%12 = load i32, i32* %3
%13 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%14 = load i32, i32* %4
%15 = call double @findMedianSortedArraysByMergeSort(i32* %11, i32 %12, i32* %13, i32 %14)
%16 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %15)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
@.str.1 = [3 x i8] c"%f\00"
define void @findMedianSortedArraysMain() {
%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 0, 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 1, i32* %6
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, i32 1)
%8 = call double @findMedianSortedArraysByMergeSort(i32* %4, i32 1, i32* %6, i32 1)
%9 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double %8)
ret void
}