#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_3(double *);
int /*<<< orphan*/ quad_3_grad(double *, double const *, double const *,
                               double const *);
double quad_3_jac(const double g[9], const double H[18], const double r[3]) {
  double J[9];
  quad_3_grad(J, g, H, r);
  quad_3_grad(J + 3, g + 3, H + 6, r);
  quad_3_grad(J + 6, g + 6, H + 12, r);
  return det_3(J);
}


x86 assembly (clang, -O0):
<quad_3_jac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <quad_3_grad@plt>
lea    -0x60(%rbp),%rdi
add    $0x18,%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
mov    -0x10(%rbp),%rdx
add    $0x30,%rdx
mov    -0x18(%rbp),%rcx
call   1030 <quad_3_grad@plt>
lea    -0x60(%rbp),%rdi
add    $0x30,%rdi
mov    -0x8(%rbp),%rsi
add    $0x30,%rsi
mov    -0x10(%rbp),%rdx
add    $0x60,%rdx
mov    -0x18(%rbp),%rcx
call   1030 <quad_3_grad@plt>
lea    -0x60(%rbp),%rdi
call   1040 <det_3@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quad_3_jac>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%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   1030 <quad_3_grad@plt>
lea    0x18(%rsp),%rdi
lea    0x18(%rbx),%rsi
lea    0x30(%r15),%rdx
mov    %r14,%rcx
call   1030 <quad_3_grad@plt>
lea    0x30(%rsp),%rdi
add    $0x30,%rbx
add    $0x60,%r15
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <quad_3_grad@plt>
mov    %r12,%rdi
call   1040 <det_3@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define double @quad_3_jac(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [9 x double]
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = getelementptr inbounds [9 x double], [9 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_3_grad(double* %8, double* %9, double* %10, double* %11)
%13 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 0
%14 = getelementptr inbounds double, double* %13, i64 3
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 3
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 6
%19 = load double*, double** %6
%20 = call i32 @quad_3_grad(double* %14, double* %16, double* %18, double* %19)
%21 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 0
%22 = getelementptr inbounds double, double* %21, i64 6
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 6
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 12
%27 = load double*, double** %6
%28 = call i32 @quad_3_grad(double* %22, double* %24, double* %26, double* %27)
%29 = getelementptr inbounds [9 x double], [9 x double]* %7, i64 0, i64 0
%30 = call double @det_3(double* %29)
ret double %30
}

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