#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*/ dmat_sym(double **, int, double);
int /*<<< orphan*/ dsym_mul_kernel(double **, double **, int, int, int,
                                   double **, int, int, int /*<<< orphan*/);
void dmat_mul_a3(double **ax1, double **ax2, double **b11, double **b12,
                 double **b21, double **b22, int n, double **cx1, double **cx2,
                 double f, int flag) {
  dsym_mul_kernel(ax1, b11, 1., n, n, cx1, 0., 0, 0);
  dsym_mul_kernel(ax2, b21, 1., n, n, cx1, 1., flag, 0);
  dsym_mul_kernel(ax1, b12, 1., n, n, cx2, 0., 0, 0);
  dsym_mul_kernel(ax2, b22, 1., n, n, cx2, 1., 0, 0);
  if (flag)
    dmat_sym(cx2, n, f);
}


x86 assembly (clang, -O0):
<dmat_mul_a3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9
mov    $0x1,%edx
xor    %eax,%eax
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1040 <dsym_mul_kernel@plt>
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9
mov    0x28(%rbp),%eax
mov    $0x1,%edx
xor    %r10d,%r10d
movl   $0x1,(%rsp)
mov    %eax,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1040 <dsym_mul_kernel@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x20(%rbp),%r9
mov    $0x1,%edx
xor    %eax,%eax
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1040 <dsym_mul_kernel@plt>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x20(%rbp),%r9
mov    $0x1,%edx
xor    %eax,%eax
movl   $0x1,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1040 <dsym_mul_kernel@plt>
cmpl   $0x0,0x28(%rbp)
je     1246 <dmat_mul_a3+0x126>
mov    0x20(%rbp),%rdi
mov    0x10(%rbp),%esi
movsd  -0x38(%rbp),%xmm0
call   1030 <dmat_sym@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmat_mul_a3>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %r9,0x20(%rsp)
mov    %r8,%rbp
mov    %rcx,0x18(%rsp)
mov    %rsi,%r14
mov    %rdi,%r12
mov    0x70(%rsp),%r15
mov    0x60(%rsp),%ebx
mov    0x78(%rsp),%eax
mov    %rax,0x10(%rsp)
mov    0x68(%rsp),%r13
sub    $0x8,%rsp
mov    %rdx,%rsi
mov    $0x1,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    %r13,%r9
push   $0x0
push   $0x0
push   $0x0
call   1040 <dsym_mul_kernel@plt>
add    $0x18,%rsp
mov    %r14,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    %r13,%r9
push   $0x0
mov    0x20(%rsp),%rbp
push   %rbp
push   $0x1
call   1040 <dsym_mul_kernel@plt>
add    $0x18,%rsp
mov    %r12,%rdi
mov    0x20(%rsp),%rsi
mov    $0x1,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    %r15,%r9
push   $0x0
push   $0x0
push   $0x0
call   1040 <dsym_mul_kernel@plt>
add    $0x18,%rsp
mov    %r14,%rdi
mov    0x28(%rsp),%rsi
mov    $0x1,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    %r15,%r9
push   $0x0
push   $0x0
push   $0x1
call   1040 <dsym_mul_kernel@plt>
add    $0x20,%rsp
test   %ebp,%ebp
je     1211 <dmat_mul_a3+0xf1>
mov    %r15,%rdi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dmat_sym@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @dmat_mul_a3(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i32 %6, double** %7, double** %8, double %9, i32 %10) {
%12 = alloca double**
%13 = alloca double**
%14 = alloca double**
%15 = alloca double**
%16 = alloca double**
%17 = alloca double**
%18 = alloca i32
%19 = alloca double**
%20 = alloca double**
%21 = alloca double
%22 = alloca i32
store double** %0, double*** %12
store double** %1, double*** %13
store double** %2, double*** %14
store double** %3, double*** %15
store double** %4, double*** %16
store double** %5, double*** %17
store i32 %6, i32* %18
store double** %7, double*** %19
store double** %8, double*** %20
store double %9, double* %21
store i32 %10, i32* %22
%23 = load double**, double*** %12
%24 = load double**, double*** %14
%25 = load i32, i32* %18
%26 = load i32, i32* %18
%27 = load double**, double*** %19
%28 = call i32 @dsym_mul_kernel(double** %23, double** %24, i32 1, i32 %25, i32 %26, double** %27, i32 0, i32 0, i32 0)
%29 = load double**, double*** %13
%30 = load double**, double*** %16
%31 = load i32, i32* %18
%32 = load i32, i32* %18
%33 = load double**, double*** %19
%34 = load i32, i32* %22
%35 = call i32 @dsym_mul_kernel(double** %29, double** %30, i32 1, i32 %31, i32 %32, double** %33, i32 1, i32 %34, i32 0)
%36 = load double**, double*** %12
%37 = load double**, double*** %15
%38 = load i32, i32* %18
%39 = load i32, i32* %18
%40 = load double**, double*** %20
%41 = call i32 @dsym_mul_kernel(double** %36, double** %37, i32 1, i32 %38, i32 %39, double** %40, i32 0, i32 0, i32 0)
%42 = load double**, double*** %13
%43 = load double**, double*** %17
%44 = load i32, i32* %18
%45 = load i32, i32* %18
%46 = load double**, double*** %20
%47 = call i32 @dsym_mul_kernel(double** %42, double** %43, i32 1, i32 %44, i32 %45, double** %46, i32 1, i32 0, i32 0)
%48 = load i32, i32* %22
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %11
%51 = load double**, double*** %20
%52 = load i32, i32* %18
%53 = load double, double* %21
%54 = call i32 @dmat_sym(double** %51, i32 %52, double %53)
br label %55
55: ; preds = %50, %11
ret void
}

LLVM IR (-O2):
define void @dmat_mul_a3(double** %0, double** %1, double** %2, double** %3, double** %4, double** %5, i32 %6, double** %7, double** %8, double %9, i32 %10) {
%12 = tail call i32 @dsym_mul_kernel(double** %0, double** %2, i32 1, i32 %6, i32 %6, double** %7, i32 0, i32 0, i32 0)
%13 = tail call i32 @dsym_mul_kernel(double** %1, double** %4, i32 1, i32 %6, i32 %6, double** %7, i32 1, i32 %10, i32 0)
%14 = tail call i32 @dsym_mul_kernel(double** %0, double** %3, i32 1, i32 %6, i32 %6, double** %8, i32 0, i32 0, i32 0)
%15 = tail call i32 @dsym_mul_kernel(double** %1, double** %5, i32 1, i32 %6, i32 %6, double** %8, i32 1, i32 0, i32 0)
%16 = icmp eq i32 %10, 0
br i1 %16, label %19, label %17
17: ; preds = %11
%18 = tail call i32 @dmat_sym(double** %8, i32 %6, double %9)
br label %19
19: ; preds = %17, %11
ret void
}