#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 det_2(double *);
int /*<<< orphan*/ quad_2_grad(double *, double const *, double const *,
                               double const *);
double quad_2_jac(const double g[4], const double H[6], const double r[2]) {
  double J[4];
  quad_2_grad(J, g, H, r);
  quad_2_grad(J + 2, g + 2, H + 3, r);
  return det_2(J);
}


x86 assembly (clang, -O0):
<quad_2_jac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <quad_2_grad@plt>
lea    -0x40(%rbp),%rdi
add    $0x10,%rdi
mov    -0x8(%rbp),%rsi
add    $0x10,%rsi
mov    -0x10(%rbp),%rdx
add    $0x18,%rdx
mov    -0x18(%rbp),%rcx
call   1040 <quad_2_grad@plt>
lea    -0x40(%rbp),%rdi
call   1030 <det_2@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quad_2_jac>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <quad_2_grad@plt>
lea    0x10(%rsp),%rdi
add    $0x10,%rbx
add    $0x18,%r15
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <quad_2_grad@plt>
mov    %r12,%rdi
call   1030 <det_2@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define double @quad_2_jac(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [4 x double]
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%9 = load double*, double** %4
%10 = load double*, double** %5
%11 = load double*, double** %6
%12 = call i32 @quad_2_grad(double* %8, double* %9, double* %10, double* %11)
%13 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%14 = getelementptr inbounds double, double* %13, i64 2
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 2
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 3
%19 = load double*, double** %6
%20 = call i32 @quad_2_grad(double* %14, double* %16, double* %18, double* %19)
%21 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%22 = call double @det_2(double* %21)
ret double %22
}

LLVM IR (-O2):
define double @quad_2_jac(double* %0, double* %1, double* %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%7 = call i32 @quad_2_grad(double* %6, double* %0, double* %1, double* %2)
%8 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = getelementptr inbounds double, double* %1, i64 3
%11 = call i32 @quad_2_grad(double* %8, double* %9, double* %10, double* %2)
%12 = call double @det_2(double* %6)
ret double %12
}