#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 */
double orient4d(double *, double *, double *, double *, double *);
double det4i5(double *vertex, int v1, int v2, int v3, int v4, int v5) {
  double r;
  r = orient4d(vertex + 4 * v1, vertex + 4 * v2, vertex + 4 * v3,
               vertex + 4 * v4, vertex + 4 * v5);
  return r;
}


x86 assembly (clang, -O0):
<det4i5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    -0x14(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x8(%rbp),%r8
mov    -0x1c(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
call   1030 <orient4d@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<det4i5>:
shl    $0x2,%esi
movslq %esi,%rax
lea    (%rdi,%rax,8),%r10
shl    $0x2,%edx
movslq %edx,%rdx
lea    (%rdi,%rdx,8),%rsi
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rdi,%rcx,8),%rdx
shl    $0x2,%r8d
movslq %r8d,%rcx
lea    (%rdi,%rcx,8),%rcx
shl    $0x2,%r9d
movslq %r9d,%rax
lea    (%rdi,%rax,8),%r8
mov    %r10,%rdi
jmp    1030 <orient4d@plt>

LLVM IR (-O0):
define double @det4i5(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
store double* %0, double** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load double*, double** %7
%15 = load i32, i32* %8
%16 = mul nsw i32 4, %15
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %14, i64 %17
%19 = load double*, double** %7
%20 = load i32, i32* %9
%21 = mul nsw i32 4, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %19, i64 %22
%24 = load double*, double** %7
%25 = load i32, i32* %10
%26 = mul nsw i32 4, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %24, i64 %27
%29 = load double*, double** %7
%30 = load i32, i32* %11
%31 = mul nsw i32 4, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
%34 = load double*, double** %7
%35 = load i32, i32* %12
%36 = mul nsw i32 4, %35
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %34, i64 %37
%39 = call double @orient4d(double* %18, double* %23, double* %28, double* %33, double* %38)
store double %39, double* %13
%40 = load double, double* %13
ret double %40
}

LLVM IR (-O2):
define double @det4i5(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = shl nsw i32 %1, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds double, double* %0, i64 %8
%10 = shl nsw i32 %2, 2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds double, double* %0, i64 %11
%13 = shl nsw i32 %3, 2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds double, double* %0, i64 %14
%16 = shl nsw i32 %4, 2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %0, i64 %17
%19 = shl nsw i32 %5, 2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %0, i64 %20
%22 = tail call double @orient4d(double* %9, double* %12, double* %15, double* %18, double* %21)
ret double %22
}