#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_smul_2x1(double const *, double *, int, int);
void gen_stride_smul_2x2(const double *scalar, double *a, int a_row_stride,
                         int a_col_stride) {
  gen_stride_smul_2x1(scalar, &a[(0) * a_row_stride + (0) * a_col_stride],
                      a_row_stride, a_col_stride);
  gen_stride_smul_2x1(scalar, &a[(0) * a_row_stride + (1) * a_col_stride],
                      a_row_stride, a_col_stride);
}


x86 assembly (clang, -O0):
<gen_stride_smul_2x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
imul   $0x0,-0x14(%rbp),%eax
imul   $0x0,-0x18(%rbp),%ecx
add    %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <gen_stride_smul_2x1@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
imul   $0x0,-0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x0,%ecx
add    %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <gen_stride_smul_2x1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_stride_smul_2x2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1030 <gen_stride_smul_2x1@plt>
movslq %r15d,%rcx
lea    0x0(,%rcx,8),%rsi
add    %rbp,%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <gen_stride_smul_2x1@plt>

LLVM IR (-O0):
define void @gen_stride_smul_2x2(double* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load double*, double** %5
%10 = load double*, double** %6
%11 = load i32, i32* %7
%12 = mul nsw i32 0, %11
%13 = load i32, i32* %8
%14 = mul nsw i32 0, %13
%15 = add nsw i32 %12, %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds double, double* %10, i64 %16
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @gen_stride_smul_2x1(double* %9, double* %17, i32 %18, i32 %19)
%21 = load double*, double** %5
%22 = load double*, double** %6
%23 = load i32, i32* %7
%24 = mul nsw i32 0, %23
%25 = load i32, i32* %8
%26 = mul nsw i32 1, %25
%27 = add nsw i32 %24, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %22, i64 %28
%30 = load i32, i32* %7
%31 = load i32, i32* %8
%32 = call i32 @gen_stride_smul_2x1(double* %21, double* %29, i32 %30, i32 %31)
ret void
}

LLVM IR (-O2):
define void @gen_stride_smul_2x2(double* %0, double* %1, i32 %2, i32 %3) {
%5 = tail call i32 @gen_stride_smul_2x1(double* %0, double* %1, i32 %2, i32 %3)
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds double, double* %1, i64 %6
%8 = tail call i32 @gen_stride_smul_2x1(double* %0, double* %7, i32 %2, i32 %3)
ret void
}