#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 /*<<< orphan*/ mx_multmx(int, int, int, double *, double *, double *);
int /*<<< orphan*/ vecadd(int, double *, double *);
void dy_dz_fill(double x[3], double z[3], double dx_dz[3], double dy_dz[9]) {
  double dy_dx[9] = {+0.0, z[2], -z[1], -z[2], 0.0, z[0], +z[1], -z[0], 0.0};
  double dy_dz_expl[9] = {+0.0,  -x[2], x[1], +x[2], 0.0,
                          -x[0], -x[1], x[0], 0.0};
  mx_multmx(3, 3, 3, dy_dz, dx_dz, dy_dx);
  vecadd(9, dy_dz, dy_dz_expl);
  return;
}


x86 assembly (clang, -O0):
<dy_dz_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    -0x70(%rbp),%r9
mov    $0x3,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1040 <mx_multmx@plt>
mov    -0x20(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
mov    $0x9,%edi
call   1030 <vecadd@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dy_dz_fill>:
push   %rbx
sub    $0xa0,%rsp
mov    %rcx,%rbx
mov    %rdx,%r8
movq   $0x0,0x50(%rsp)
movups 0x8(%rsi),%xmm0
movhps %xmm0,0x58(%rsp)
movaps 0xeb9(%rip),%xmm1
movaps %xmm0,%xmm2
xorps  %xmm1,%xmm2
movaps %xmm2,0x60(%rsp)
movq   $0x0,0x70(%rsp)
movsd  (%rsi),%xmm2
movsd  %xmm2,0x78(%rsp)
xorps  %xmm1,%xmm2
movlhps %xmm2,%xmm0
movaps %xmm0,0x80(%rsp)
movq   $0x0,0x90(%rsp)
movq   $0x0,(%rsp)
movsd  0x10(%rdi),%xmm0
movaps %xmm0,%xmm2
xorps  %xmm1,%xmm2
movlps %xmm2,0x8(%rsp)
movups (%rdi),%xmm2
movhps %xmm2,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
movq   $0x0,0x20(%rsp)
xorps  %xmm2,%xmm1
movups %xmm1,0x28(%rsp)
movlps %xmm2,0x38(%rsp)
movq   $0x0,0x40(%rsp)
lea    0x50(%rsp),%r9
mov    $0x3,%edi
mov    $0x3,%esi
mov    $0x3,%edx
call   1040 <mx_multmx@plt>
mov    %rsp,%rdx
mov    $0x9,%edi
mov    %rbx,%rsi
call   1030 <vecadd@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @dy_dz_fill(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca [9 x double]
%10 = alloca [9 x double]
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%11 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
store double 0.000000e+00, double* %11
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 2
%15 = load double, double* %14
store double %15, double* %12
%16 = getelementptr inbounds double, double* %12, i64 1
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fneg double %19
store double %20, double* %16
%21 = getelementptr inbounds double, double* %16, i64 1
%22 = load double*, double** %6
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = fneg double %24
store double %25, double* %21
%26 = getelementptr inbounds double, double* %21, i64 1
store double 0.000000e+00, double* %26
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double*, double** %6
%29 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
store double %30, double* %27
%31 = getelementptr inbounds double, double* %27, i64 1
%32 = load double*, double** %6
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
store double %34, double* %31
%35 = getelementptr inbounds double, double* %31, i64 1
%36 = load double*, double** %6
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = fneg double %38
store double %39, double* %35
%40 = getelementptr inbounds double, double* %35, i64 1
store double 0.000000e+00, double* %40
%41 = getelementptr inbounds [9 x double], [9 x double]* %10, i64 0, i64 0
store double 0.000000e+00, double* %41
%42 = getelementptr inbounds double, double* %41, i64 1
%43 = load double*, double** %5
%44 = getelementptr inbounds double, double* %43, i64 2
%45 = load double, double* %44
%46 = fneg double %45
store double %46, double* %42
%47 = getelementptr inbounds double, double* %42, i64 1
%48 = load double*, double** %5
%49 = getelementptr inbounds double, double* %48, i64 1
%50 = load double, double* %49
store double %50, double* %47
%51 = getelementptr inbounds double, double* %47, i64 1
%52 = load double*, double** %5
%53 = getelementptr inbounds double, double* %52, i64 2
%54 = load double, double* %53
store double %54, double* %51
%55 = getelementptr inbounds double, double* %51, i64 1
store double 0.000000e+00, double* %55
%56 = getelementptr inbounds double, double* %55, i64 1
%57 = load double*, double** %5
%58 = getelementptr inbounds double, double* %57, i64 0
%59 = load double, double* %58
%60 = fneg double %59
store double %60, double* %56
%61 = getelementptr inbounds double, double* %56, i64 1
%62 = load double*, double** %5
%63 = getelementptr inbounds double, double* %62, i64 1
%64 = load double, double* %63
%65 = fneg double %64
store double %65, double* %61
%66 = getelementptr inbounds double, double* %61, i64 1
%67 = load double*, double** %5
%68 = getelementptr inbounds double, double* %67, i64 0
%69 = load double, double* %68
store double %69, double* %66
%70 = getelementptr inbounds double, double* %66, i64 1
store double 0.000000e+00, double* %70
%71 = load double*, double** %8
%72 = load double*, double** %7
%73 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%74 = call i32 @mx_multmx(i32 3, i32 3, i32 3, double* %71, double* %72, double* %73)
%75 = load double*, double** %8
%76 = getelementptr inbounds [9 x double], [9 x double]* %10, i64 0, i64 0
%77 = call i32 @vecadd(i32 9, double* %75, double* %76)
ret void
}

LLVM IR (-O2):
define void @dy_dz_fill(double* nocapture %0, double* nocapture %1, double* %2, double* %3) {
%5 = alloca [9 x double]
%6 = alloca [9 x double]
%7 = bitcast [9 x double]* %5 to i8*
%8 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 0
store double 0.000000e+00, double* %8
%9 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 1
%10 = getelementptr inbounds double, double* %1, i64 1
%11 = bitcast double* %10 to <2 x double>*
%12 = load <2 x double>, <2 x double>* %11
%13 = extractelement <2 x double> %12, i64 1
store double %13, double* %9
%14 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 2
%15 = fneg <2 x double> %12
%16 = bitcast double* %14 to <2 x double>*
store <2 x double> %15, <2 x double>* %16
%17 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 4
store double 0.000000e+00, double* %17
%18 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 5
%19 = load double, double* %1
store double %19, double* %18
%20 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 6
%21 = extractelement <2 x double> %12, i64 0
store double %21, double* %20
%22 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 7
%23 = fneg double %19
store double %23, double* %22
%24 = getelementptr inbounds [9 x double], [9 x double]* %5, i64 0, i64 8
store double 0.000000e+00, double* %24
%25 = bitcast [9 x double]* %6 to i8*
%26 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 0
store double 0.000000e+00, double* %26
%27 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 1
%28 = getelementptr inbounds double, double* %0, i64 2
%29 = load double, double* %28
%30 = fneg double %29
store double %30, double* %27
%31 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 2
%32 = bitcast double* %0 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = extractelement <2 x double> %33, i64 1
store double %34, double* %31
%35 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 3
store double %29, double* %35
%36 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 4
store double 0.000000e+00, double* %36
%37 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 5
%38 = fneg <2 x double> %33
%39 = bitcast double* %37 to <2 x double>*
store <2 x double> %38, <2 x double>* %39
%40 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 7
%41 = extractelement <2 x double> %33, i64 0
store double %41, double* %40
%42 = getelementptr inbounds [9 x double], [9 x double]* %6, i64 0, i64 8
store double 0.000000e+00, double* %42
%43 = call i32 @mx_multmx(i32 3, i32 3, i32 3, double* %3, double* %2, double* %8)
%44 = call i32 @vecadd(i32 9, double* %3, double* %26)
ret void
}