#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 EXIT_SUCCESS;
int /*<<< orphan*/ bitonic(int, double *, double *);
int main() {
  int n = 7;
  double x[] = {0.0, 1.0, 1.5, 3.0, 3.5, 5.0, 6.0};
  double y[] = {0.0, 4.0, 4.0, 1.0, 0.5, 2.0, 1.0};
  bitonic(n, x, y);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x38,%edx
call   1030 <memset@plt>
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x38,%edx
call   1030 <memset@plt>
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe5c(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe37(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe3a(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe25(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe10(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x40(%rbp),%rsi
lea    -0x80(%rbp),%rdx
call   1040 <bitonic@plt>
mov    0x2dd4(%rip),%rax
mov    (%rax),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xedd(%rip),%xmm1
movups %xmm1,0x48(%rsp)
movaps 0xee1(%rip),%xmm1
movups %xmm1,0x58(%rsp)
movaps 0xee5(%rip),%xmm1
movups %xmm1,0x68(%rsp)
movaps %xmm0,(%rsp)
movaps 0xee5(%rip),%xmm0
movups %xmm0,0x8(%rsp)
movaps 0xee9(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movaps 0xeed(%rip),%xmm0
movups %xmm0,0x28(%rsp)
lea    0x40(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x7,%edi
call   1030 <bitonic@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [7 x double]
%4 = alloca [7 x double]
store i32 0, i32* %1
store i32 7, i32* %2
%5 = bitcast [7 x double]* %3 to i8*
%6 = bitcast i8* %5 to [7 x double]*
%7 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 1
store double 1.000000e+00, double* %7
%8 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 2
store double 1.500000e+00, double* %8
%9 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 3
store double 3.000000e+00, double* %9
%10 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 4
store double 3.500000e+00, double* %10
%11 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 5
store double 5.000000e+00, double* %11
%12 = getelementptr inbounds [7 x double], [7 x double]* %6, i32 0, i32 6
store double 6.000000e+00, double* %12
%13 = bitcast [7 x double]* %4 to i8*
%14 = bitcast i8* %13 to [7 x double]*
%15 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 1
store double 4.000000e+00, double* %15
%16 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 2
store double 4.000000e+00, double* %16
%17 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 3
store double 1.000000e+00, double* %17
%18 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 4
store double 5.000000e-01, double* %18
%19 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 5
store double 2.000000e+00, double* %19
%20 = getelementptr inbounds [7 x double], [7 x double]* %14, i32 0, i32 6
store double 1.000000e+00, double* %20
%21 = load i32, i32* %2
%22 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 0
%23 = getelementptr inbounds [7 x double], [7 x double]* %4, i64 0, i64 0
%24 = call i32 @bitonic(i32 %21, double* %22, double* %23)
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [7 x double]
%2 = alloca [7 x double]
%3 = bitcast [7 x double]* %1 to i8*
%4 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 1
%5 = bitcast double* %4 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.500000e+00>, <2 x double>* %5
%6 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 3
%7 = bitcast double* %6 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 3.500000e+00>, <2 x double>* %7
%8 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 5
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 5.000000e+00, double 6.000000e+00>, <2 x double>* %9
%10 = bitcast [7 x double]* %2 to i8*
%11 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 1
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 4.000000e+00>, <2 x double>* %12
%13 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 3
%14 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 5.000000e-01>, <2 x double>* %14
%15 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 5
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 1.000000e+00>, <2 x double>* %16
%17 = getelementptr inbounds [7 x double], [7 x double]* %1, i64 0, i64 0
%18 = getelementptr inbounds [7 x double], [7 x double]* %2, i64 0, i64 0
%19 = call i32 @bitonic(i32 7, double* %17, double* %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}