#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*/ gen_stride_mmul_1x2_2x1(double const *, int, int,
                                           double const *, int, int, double *,
                                           int, int);
void gen_stride_mmul_2x2_2x1(const double *a, int a_row_stride,
                             int a_col_stride, const double *b,
                             int b_row_stride, int b_col_stride, double *c,
                             int c_row_stride, int c_col_stride) {
  gen_stride_mmul_1x2_2x1(
      &a[(0) * a_row_stride + (0) * a_col_stride], a_row_stride, a_col_stride,
      &b[(0) * b_row_stride + (0) * b_col_stride], b_row_stride, b_col_stride,
      &c[(0) * c_row_stride + (0) * c_col_stride], c_row_stride, c_col_stride);
  gen_stride_mmul_1x2_2x1(
      &a[(1) * a_row_stride + (0) * a_col_stride], a_row_stride, a_col_stride,
      &b[(0) * b_row_stride + (0) * b_col_stride], b_row_stride, b_col_stride,
      &c[(1) * c_row_stride + (0) * c_col_stride], c_row_stride, c_col_stride);
}


x86 assembly (clang, -O0):
<gen_stride_mmul_2x2_2x1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
imul   $0x0,-0xc(%rbp),%eax
imul   $0x0,-0x10(%rbp),%ecx
add    %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
imul   $0x0,-0x1c(%rbp),%eax
imul   $0x0,-0x20(%rbp),%r8d
add    %r8d,%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    0x10(%rbp),%r11
imul   $0x0,0x18(%rbp),%eax
imul   $0x0,0x20(%rbp),%r10d
add    %r10d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r11
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <gen_stride_mmul_1x2_2x1@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
shl    $0x0,%eax
imul   $0x0,-0x10(%rbp),%ecx
add    %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
imul   $0x0,-0x1c(%rbp),%eax
imul   $0x0,-0x20(%rbp),%r8d
add    %r8d,%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%eax
shl    $0x0,%eax
imul   $0x0,0x20(%rbp),%r10d
add    %r10d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r11
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <gen_stride_mmul_1x2_2x1@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_stride_mmul_2x2_2x1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,0x4(%rsp)
mov    %r8d,%r15d
mov    %rcx,%r12
mov    %edx,%r13d
mov    %esi,%ebx
mov    %rdi,%rbp
movslq 0x48(%rsp),%r14
mov    0x50(%rsp),%eax
sub    $0x8,%rsp
push   %rax
push   %r14
push   0x58(%rsp)
call   1030 <gen_stride_mmul_1x2_2x1@plt>
add    $0x20,%rsp
movslq %ebx,%rsi
lea    0x0(,%rsi,8),%rdi
add    %rbp,%rdi
mov    0x40(%rsp),%rax
lea    (%rax,%r14,8),%rax
sub    $0x8,%rsp
mov    %r13d,%edx
mov    %r12,%rcx
mov    %r15d,%r8d
mov    0xc(%rsp),%r9d
mov    0x58(%rsp),%ebp
push   %rbp
push   %r14
push   %rax
call   1030 <gen_stride_mmul_1x2_2x1@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @gen_stride_mmul_2x2_2x1(double* %0, i32 %1, i32 %2, double* %3, i32 %4, i32 %5, double* %6, i32 %7, i32 %8) {
%10 = tail call i32 @gen_stride_mmul_1x2_2x1(double* %0, i32 %1, i32 %2, double* %3, i32 %4, i32 %5, double* %6, i32 %7, i32 %8)
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds double, double* %0, i64 %11
%13 = sext i32 %7 to i64
%14 = getelementptr inbounds double, double* %6, i64 %13
%15 = tail call i32 @gen_stride_mmul_1x2_2x1(double* %12, i32 %1, i32 %2, double* %3, i32 %4, i32 %5, double* %14, i32 %7, i32 %8)
ret void
}