Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/x86/gemm_kernel_8x2_core2.S

kusano 2b45e8
/*********************************************************************/
kusano 2b45e8
/* Copyright 2009, 2010 The University of Texas at Austin.           */
kusano 2b45e8
/* All rights reserved.                                              */
kusano 2b45e8
/*                                                                   */
kusano 2b45e8
/* Redistribution and use in source and binary forms, with or        */
kusano 2b45e8
/* without modification, are permitted provided that the following   */
kusano 2b45e8
/* conditions are met:                                               */
kusano 2b45e8
/*                                                                   */
kusano 2b45e8
/*   1. Redistributions of source code must retain the above         */
kusano 2b45e8
/*      copyright notice, this list of conditions and the following  */
kusano 2b45e8
/*      disclaimer.                                                  */
kusano 2b45e8
/*                                                                   */
kusano 2b45e8
/*   2. Redistributions in binary form must reproduce the above      */
kusano 2b45e8
/*      copyright notice, this list of conditions and the following  */
kusano 2b45e8
/*      disclaimer in the documentation and/or other materials       */
kusano 2b45e8
/*      provided with the distribution.                              */
kusano 2b45e8
/*                                                                   */
kusano 2b45e8
/*    THIS  SOFTWARE IS PROVIDED  BY THE  UNIVERSITY OF  TEXAS AT    */
kusano 2b45e8
/*    AUSTIN  ``AS IS''  AND ANY  EXPRESS OR  IMPLIED WARRANTIES,    */
kusano 2b45e8
/*    INCLUDING, BUT  NOT LIMITED  TO, THE IMPLIED  WARRANTIES OF    */
kusano 2b45e8
/*    MERCHANTABILITY  AND FITNESS FOR  A PARTICULAR  PURPOSE ARE    */
kusano 2b45e8
/*    DISCLAIMED.  IN  NO EVENT SHALL THE UNIVERSITY  OF TEXAS AT    */
kusano 2b45e8
/*    AUSTIN OR CONTRIBUTORS BE  LIABLE FOR ANY DIRECT, INDIRECT,    */
kusano 2b45e8
/*    INCIDENTAL,  SPECIAL, EXEMPLARY,  OR  CONSEQUENTIAL DAMAGES    */
kusano 2b45e8
/*    (INCLUDING, BUT  NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE    */
kusano 2b45e8
/*    GOODS  OR  SERVICES; LOSS  OF  USE,  DATA,  OR PROFITS;  OR    */
kusano 2b45e8
/*    BUSINESS INTERRUPTION) HOWEVER CAUSED  AND ON ANY THEORY OF    */
kusano 2b45e8
/*    LIABILITY, WHETHER  IN CONTRACT, STRICT  LIABILITY, OR TORT    */
kusano 2b45e8
/*    (INCLUDING NEGLIGENCE OR OTHERWISE)  ARISING IN ANY WAY OUT    */
kusano 2b45e8
/*    OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF ADVISED  OF  THE    */
kusano 2b45e8
/*    POSSIBILITY OF SUCH DAMAGE.                                    */
kusano 2b45e8
/*                                                                   */
kusano 2b45e8
/* The views and conclusions contained in the software and           */
kusano 2b45e8
/* documentation are those of the authors and should not be          */
kusano 2b45e8
/* interpreted as representing official policies, either expressed   */
kusano 2b45e8
/* or implied, of The University of Texas at Austin.                 */
kusano 2b45e8
/*********************************************************************/
kusano 2b45e8
kusano 2b45e8
#define ASSEMBLER
kusano 2b45e8
#include "common.h"
kusano 2b45e8
kusano 2b45e8
#define STACK	16
kusano 2b45e8
#define ARGS	 0
kusano 2b45e8
	
kusano 2b45e8
#define STACK_M	 4 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_N	 8 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_K	12 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_ALPHA	16 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_A	20 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_B	24 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_C	28 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_LDC	32 + STACK + ARGS(%esi)
kusano 2b45e8
#define STACK_OFFT	36 + STACK + ARGS(%esi)
kusano 2b45e8
kusano 2b45e8
#define ALPHA	 0(%esp)
kusano 2b45e8
#define K	16(%esp)
kusano 2b45e8
#define N	20(%esp)
kusano 2b45e8
#define M	24(%esp)
kusano 2b45e8
#define A	28(%esp)
kusano 2b45e8
#define C	32(%esp)
kusano 2b45e8
#define J	36(%esp)
kusano 2b45e8
#define OLD_STACK 40(%esp)
kusano 2b45e8
#define OFFSET  44(%esp)
kusano 2b45e8
#define KK	48(%esp)
kusano 2b45e8
#define KKK	52(%esp)
kusano 2b45e8
#define BUFFER 512(%esp)
kusano 2b45e8
kusano 2b45e8
#define PREFETCH_R    (8 * 16 + 0)
kusano 2b45e8
#define PREFETCH_W    (PREFETCH_R * 2)
kusano 2b45e8
kusano 2b45e8
#define PREFETCHSIZE  (8 * 16 + 4)
kusano 2b45e8
#define PREFETCH     prefetcht0
kusano 2b45e8
kusano 2b45e8
#define AA	%edx
kusano 2b45e8
#define BB	%ecx
kusano 2b45e8
#define LDC	%ebp
kusano 2b45e8
#define B	%edi
kusano 2b45e8
#define C1	%esi
kusano 2b45e8
#define I	%ebx
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
kusano 2b45e8
	pushl	%ebp
kusano 2b45e8
	pushl	%edi
kusano 2b45e8
	pushl	%esi
kusano 2b45e8
	pushl	%ebx
kusano 2b45e8
kusano 2b45e8
	PROFCODE
kusano 2b45e8
kusano 2b45e8
	movl	%esp, %esi	# save old stack
kusano 2b45e8
kusano 2b45e8
	subl	$512 + LOCAL_BUFFER_SIZE, %esp
kusano 2b45e8
	andl	$-4096, %esp	# align stack
kusano 2b45e8
kusano 2b45e8
        STACK_TOUCHING
kusano 2b45e8
kusano 2b45e8
	movl	STACK_M, %ebx
kusano 2b45e8
	movl	STACK_N, %eax
kusano 2b45e8
	movl	STACK_K, %ecx
kusano 2b45e8
	movl	STACK_A, %edx
kusano 2b45e8
	movss	STACK_ALPHA,  %xmm3
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
	movd	STACK_OFFT, %mm4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movl	%ebx, M
kusano 2b45e8
	movl	%eax, N
kusano 2b45e8
	movl	%ecx, K
kusano 2b45e8
	movl	%edx, A
kusano 2b45e8
	movl	%esi, OLD_STACK
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
	movd	%mm4, OFFSET
kusano 2b45e8
	movd	%mm4, KK
kusano 2b45e8
#ifndef LEFT
kusano 2b45e8
	negl	KK
kusano 2b45e8
#endif	
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	shufps	$0, %xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movl	STACK_B, B
kusano 2b45e8
	movl	STACK_C, %ebx
kusano 2b45e8
kusano 2b45e8
	movaps	 %xmm3, ALPHA
kusano 2b45e8
	movl	%ebx, C
kusano 2b45e8
	movl	STACK_LDC, LDC
kusano 2b45e8
kusano 2b45e8
	subl	$-32 * SIZE, A
kusano 2b45e8
	subl	$-32 * SIZE, B
kusano 2b45e8
kusano 2b45e8
	leal	(, LDC, SIZE), LDC
kusano 2b45e8
kusano 2b45e8
	sarl	$1, %eax
kusano 2b45e8
	movl	%eax, J
kusano 2b45e8
	jle	.L50
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L01:
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	movl	OFFSET, %eax
kusano 2b45e8
	movl	%eax, KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	sarl	$2, %eax
kusano 2b45e8
	jle	.L05
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L02:
kusano 2b45e8
	prefetcht0	(PREFETCH_R + 0) * SIZE(B)
kusano 2b45e8
	movss	-32 * SIZE(B), %xmm0
kusano 2b45e8
	movss	-31 * SIZE(B), %xmm1
kusano 2b45e8
	movss	-30 * SIZE(B), %xmm2
kusano 2b45e8
	movss	-29 * SIZE(B), %xmm3
kusano 2b45e8
	movss	-28 * SIZE(B), %xmm4
kusano 2b45e8
	movss	-27 * SIZE(B), %xmm5
kusano 2b45e8
	movss	-26 * SIZE(B), %xmm6
kusano 2b45e8
	movss	-25 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	prefetcht0	(PREFETCH_W +  0) * SIZE(BB)
kusano 2b45e8
	shufps	$0, %xmm0, %xmm0
kusano 2b45e8
	shufps	$0, %xmm1, %xmm1
kusano 2b45e8
	shufps	$0, %xmm2, %xmm2
kusano 2b45e8
	shufps	$0, %xmm3, %xmm3
kusano 2b45e8
	shufps	$0, %xmm4, %xmm4
kusano 2b45e8
	shufps	$0, %xmm5, %xmm5
kusano 2b45e8
	shufps	$0, %xmm6, %xmm6
kusano 2b45e8
	shufps	$0, %xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
	prefetcht0	(PREFETCH_W + 16) * SIZE(BB)
kusano 2b45e8
	movaps	%xmm0,  -32 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm1,  -28 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm2,  -24 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm3,  -20 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm4,  -16 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm5,  -12 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm6,   -8 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm7,   -4 * SIZE(BB)
kusano 2b45e8
kusano 2b45e8
	addl	$  8 * SIZE, B
kusano 2b45e8
	subl	$-32 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jne	.L02
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L05:
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	andl	$3, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	jle	.L10
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L06:
kusano 2b45e8
	movss	-32 * SIZE(B), %xmm0
kusano 2b45e8
	movss	-31 * SIZE(B), %xmm1
kusano 2b45e8
kusano 2b45e8
	shufps	$0, %xmm0, %xmm0
kusano 2b45e8
	shufps	$0, %xmm1, %xmm1
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -32 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm1,  -28 * SIZE(BB)
kusano 2b45e8
	addl	$2 * SIZE, B
kusano 2b45e8
	addl	$8 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jne	.L06
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L10:
kusano 2b45e8
	movl	C, C1
kusano 2b45e8
	movl	A, AA
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	sarl	$3, I
kusano 2b45e8
	jle	.L20
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L11:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 4), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movaps	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movapd	-16 * SIZE(AA), %xmm3
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	prefetcht0	7 * SIZE(C1)
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
	prefetcht0	7 * SIZE(C1, LDC)
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$8, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L15
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L12:
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm0
kusano 2b45e8
	addps	%xmm0,  %xmm5
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	-20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm0
kusano 2b45e8
	addps	%xmm0,  %xmm5
kusano 2b45e8
	movaps	-20 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	  0 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	-16 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	-12 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm3
kusano 2b45e8
	addps	%xmm3,  %xmm5
kusano 2b45e8
	movaps	-12 * SIZE(AA), %xmm3
kusano 2b45e8
	mulps	%xmm3,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	movaps	 -8 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	 -8 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	 -4 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm3
kusano 2b45e8
	addps	%xmm3,  %xmm5
kusano 2b45e8
	movaps	 -4 * SIZE(AA), %xmm3
kusano 2b45e8
	mulps	%xmm3,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	movaps	 16 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
	movaps	  0 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	  4 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm0
kusano 2b45e8
	addps	%xmm0,  %xmm5
kusano 2b45e8
	movaps	  4 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	  8 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	  8 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	 12 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm0
kusano 2b45e8
	addps	%xmm0,  %xmm5
kusano 2b45e8
	movaps	 12 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	 32 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	 16 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	 20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm3
kusano 2b45e8
	addps	%xmm3,  %xmm5
kusano 2b45e8
	movaps	 20 * SIZE(AA), %xmm3
kusano 2b45e8
	mulps	%xmm3,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	movaps	 24 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	 24 * SIZE(BB), %xmm1
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	 28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm3
kusano 2b45e8
	addps	%xmm3,  %xmm5
kusano 2b45e8
	movaps	 28 * SIZE(AA), %xmm3
kusano 2b45e8
	mulps	%xmm3,  %xmm2
kusano 2b45e8
	mulps	%xmm3,  %xmm1
kusano 2b45e8
	subl   $-64 * SIZE, BB
kusano 2b45e8
	movaps	 48 * SIZE(AA), %xmm3
kusano 2b45e8
	subl   $-64 * SIZE, AA
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
	movaps	-32 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L12
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L15:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L18
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L16:
kusano 2b45e8
	movaps	%xmm1,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	addps	%xmm1,  %xmm4
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1,  %xmm0
kusano 2b45e8
	addps	%xmm0,  %xmm5
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm2
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm2,  %xmm6
kusano 2b45e8
	addps	%xmm1,  %xmm7
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	addl	$8 * SIZE, AA
kusano 2b45e8
	addl	$8 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L16
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L18:
kusano 2b45e8
	movaps	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm5
kusano 2b45e8
	mulps	%xmm3, %xmm6
kusano 2b45e8
	mulps	%xmm3, %xmm7
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movhps	2 * SIZE(C1), %xmm0
kusano 2b45e8
	movsd	4 * SIZE(C1), %xmm2
kusano 2b45e8
	movhps	6 * SIZE(C1), %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	0 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
	movhps	2 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
	movsd	4 * SIZE(C1, LDC), %xmm3
kusano 2b45e8
	movhps	6 * SIZE(C1, LDC), %xmm3
kusano 2b45e8
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
	addps	%xmm2, %xmm6
kusano 2b45e8
	addps	%xmm3, %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm4, 2 * SIZE(C1)
kusano 2b45e8
	movsd	%xmm6, 4 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm6, 6 * SIZE(C1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm5, 0 * SIZE(C1, LDC)
kusano 2b45e8
	movhps	%xmm5, 2 * SIZE(C1, LDC)
kusano 2b45e8
	movsd	%xmm7, 4 * SIZE(C1, LDC)
kusano 2b45e8
	movhps	%xmm7, 6 * SIZE(C1, LDC)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 4), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$8, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addl	$8 * SIZE, C1
kusano 2b45e8
	decl	I
kusano 2b45e8
	jg	.L11
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L20:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$4, I
kusano 2b45e8
	jle	.L30
kusano 2b45e8
kusano 2b45e8
.L21:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 2), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movaps	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movaps	-16 * SIZE(AA), %xmm2
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	movaps	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$4, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L25
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L22:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-20 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movaps	  0 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm7
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm3
kusano 2b45e8
	mulps	-12 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movaps	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movaps	-20 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm3
kusano 2b45e8
	mulps	 -4 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movaps	 16 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm7
kusano 2b45e8
	movaps	  0 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm2,  %xmm1
kusano 2b45e8
	mulps	  4 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	  8 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movaps	-12 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm1
kusano 2b45e8
	mulps	 12 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movaps	 32 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm7
kusano 2b45e8
	movaps	 -8 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	mulps	 20 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movaps	 24 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movaps	 -4 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	mulps	 28 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movaps	 48 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm7
kusano 2b45e8
	movaps	 16 * SIZE(AA), %xmm2
kusano 2b45e8
kusano 2b45e8
	subl   $-32 * SIZE, AA
kusano 2b45e8
	addl   $ 64 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L22
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L25:
kusano 2b45e8
	movaps	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L28
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L26:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
kusano 2b45e8
	addl	$4 * SIZE, AA
kusano 2b45e8
	addl	$8 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L26
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L28:
kusano 2b45e8
	addps	%xmm6, %xmm4
kusano 2b45e8
	addps	%xmm7, %xmm5
kusano 2b45e8
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm5
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movhps	2 * SIZE(C1), %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	0 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
	movhps	2 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm4, 2 * SIZE(C1)
kusano 2b45e8
	movsd	%xmm5, 0 * SIZE(C1, LDC)
kusano 2b45e8
	movhps	%xmm5, 2 * SIZE(C1, LDC)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 2), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addl	$4 * SIZE, C1
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L30:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$2, I
kusano 2b45e8
	jle	.L40
kusano 2b45e8
kusano 2b45e8
.L31:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movsd	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movsd	-24 * SIZE(AA), %xmm2
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	movsd	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L35
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L32:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
 	movsd	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movsd	-30 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-20 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movsd	  0 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm7
kusano 2b45e8
	movsd	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm3
kusano 2b45e8
	mulps	-12 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movsd	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movsd	-26 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm0,  %xmm3
kusano 2b45e8
	mulps	 -4 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movsd	 16 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm7
kusano 2b45e8
	movsd	-16 * SIZE(AA), %xmm0
kusano 2b45e8
	mulps	%xmm2,  %xmm1
kusano 2b45e8
	mulps	  4 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movsd	  8 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movsd	-22 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm1
kusano 2b45e8
	mulps	 12 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movsd	 32 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm7
kusano 2b45e8
	movsd	-20 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	mulps	 20 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movsd	 24 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movsd	-18 * SIZE(AA), %xmm2
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	mulps	 28 * SIZE(BB), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movsd	 48 * SIZE(BB), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm7
kusano 2b45e8
	movsd	 -8 * SIZE(AA), %xmm2
kusano 2b45e8
kusano 2b45e8
	subl   $-16 * SIZE, AA
kusano 2b45e8
	addl   $ 64 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L32
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L35:
kusano 2b45e8
	movsd	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L38
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L36:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	mulps	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movsd	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movsd	-30 * SIZE(AA), %xmm0
kusano 2b45e8
kusano 2b45e8
	addl	$2 * SIZE, AA
kusano 2b45e8
	addl	$8 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L36
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L38:
kusano 2b45e8
	addps	%xmm6, %xmm4
kusano 2b45e8
	addps	%xmm7, %xmm5
kusano 2b45e8
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm5
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movsd	0 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movsd	%xmm5, 0 * SIZE(C1, LDC)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addl	$2 * SIZE, C1
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L40:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$1, I
kusano 2b45e8
	jle	.L49
kusano 2b45e8
kusano 2b45e8
.L41:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   4), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 8), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movss	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movss	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movss	-28 * SIZE(AA), %xmm2
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	movss	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L45
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L42:
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	mulss	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
 	movss	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addss	%xmm0, %xmm5
kusano 2b45e8
	movss	-31 * SIZE(AA), %xmm0
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	mulss	-20 * SIZE(BB), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm6
kusano 2b45e8
	movss	  0 * SIZE(BB), %xmm1
kusano 2b45e8
	addss	%xmm0, %xmm7
kusano 2b45e8
	movss	-30 * SIZE(AA), %xmm0
kusano 2b45e8
	mulss	%xmm0,  %xmm3
kusano 2b45e8
	mulss	-12 * SIZE(BB), %xmm0
kusano 2b45e8
	addss	%xmm3, %xmm4
kusano 2b45e8
	movss	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	addss	%xmm0, %xmm5
kusano 2b45e8
	movss	-29 * SIZE(AA), %xmm0
kusano 2b45e8
	mulss	%xmm0,  %xmm3
kusano 2b45e8
	mulss	 -4 * SIZE(BB), %xmm0
kusano 2b45e8
	addss	%xmm3, %xmm6
kusano 2b45e8
	movss	 16 * SIZE(BB), %xmm3
kusano 2b45e8
	addss	%xmm0, %xmm7
kusano 2b45e8
	movss	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	mulss	%xmm2,  %xmm1
kusano 2b45e8
	mulss	  4 * SIZE(BB), %xmm2
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
	movss	  8 * SIZE(BB), %xmm1
kusano 2b45e8
	addss	%xmm2, %xmm5
kusano 2b45e8
	movss	-27 * SIZE(AA), %xmm2
kusano 2b45e8
	mulss	%xmm2,  %xmm1
kusano 2b45e8
	mulss	 12 * SIZE(BB), %xmm2
kusano 2b45e8
	addss	%xmm1, %xmm6
kusano 2b45e8
	movss	 32 * SIZE(BB), %xmm1
kusano 2b45e8
	addss	%xmm2, %xmm7
kusano 2b45e8
	movss	-26 * SIZE(AA), %xmm2
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	mulss	 20 * SIZE(BB), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm4
kusano 2b45e8
	movss	 24 * SIZE(BB), %xmm3
kusano 2b45e8
	addss	%xmm2, %xmm5
kusano 2b45e8
	movss	-25 * SIZE(AA), %xmm2
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	mulss	 28 * SIZE(BB), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm6
kusano 2b45e8
	movss	 48 * SIZE(BB), %xmm3
kusano 2b45e8
	addss	%xmm2, %xmm7
kusano 2b45e8
	movss	-20 * SIZE(AA), %xmm2
kusano 2b45e8
kusano 2b45e8
	subl   $-8 * SIZE, AA
kusano 2b45e8
	addl   $64 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L42
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L45:
kusano 2b45e8
	movss	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L48
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L46:
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	mulss	-28 * SIZE(BB), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
	movss	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	addss	%xmm0, %xmm5
kusano 2b45e8
	movss	-31 * SIZE(AA), %xmm0
kusano 2b45e8
kusano 2b45e8
	addl	$1 * SIZE, AA
kusano 2b45e8
	addl	$8 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L46
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L48:
kusano 2b45e8
	addss	%xmm6, %xmm4
kusano 2b45e8
	addss	%xmm7, %xmm5
kusano 2b45e8
kusano 2b45e8
	mulss	%xmm3, %xmm4
kusano 2b45e8
	mulss	%xmm3, %xmm5
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movss	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movss	0 * SIZE(C1, LDC), %xmm1
kusano 2b45e8
kusano 2b45e8
	addss	%xmm0, %xmm4
kusano 2b45e8
	addss	%xmm1, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movss	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movss	%xmm5, 0 * SIZE(C1, LDC)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    4), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 8), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L49:
kusano 2b45e8
#if defined(TRMMKERNEL) && !defined(LEFT)
kusano 2b45e8
	addl	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leal	(, LDC, 2), %eax
kusano 2b45e8
	addl	%eax, C
kusano 2b45e8
	decl	J
kusano 2b45e8
	jg	.L01
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L50:
kusano 2b45e8
	movl	N, %eax
kusano 2b45e8
	testl	$1, %eax
kusano 2b45e8
	jle	.L999
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L51:
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	movl	OFFSET, %eax
kusano 2b45e8
	movl	%eax, KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	jle	.L55
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L52:
kusano 2b45e8
	movss	-32 * SIZE(B), %xmm0
kusano 2b45e8
	movss	-31 * SIZE(B), %xmm1
kusano 2b45e8
	movss	-30 * SIZE(B), %xmm2
kusano 2b45e8
	movss	-29 * SIZE(B), %xmm3
kusano 2b45e8
	movss	-28 * SIZE(B), %xmm4
kusano 2b45e8
	movss	-27 * SIZE(B), %xmm5
kusano 2b45e8
	movss	-26 * SIZE(B), %xmm6
kusano 2b45e8
	movss	-25 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	shufps	$0, %xmm0, %xmm0
kusano 2b45e8
	shufps	$0, %xmm1, %xmm1
kusano 2b45e8
	shufps	$0, %xmm2, %xmm2
kusano 2b45e8
	shufps	$0, %xmm3, %xmm3
kusano 2b45e8
	shufps	$0, %xmm4, %xmm4
kusano 2b45e8
	shufps	$0, %xmm5, %xmm5
kusano 2b45e8
	shufps	$0, %xmm6, %xmm6
kusano 2b45e8
	shufps	$0, %xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -32 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm1,  -28 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm2,  -24 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm3,  -20 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm4,  -16 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm5,  -12 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm6,   -8 * SIZE(BB)
kusano 2b45e8
	movaps	%xmm7,   -4 * SIZE(BB)
kusano 2b45e8
kusano 2b45e8
	addl	$  8 * SIZE, B
kusano 2b45e8
	subl	$-32 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jne	.L52
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L55:
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	jle	.L60
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L56:
kusano 2b45e8
	movss	-32 * SIZE(B), %xmm0
kusano 2b45e8
	shufps	$0, %xmm0, %xmm0
kusano 2b45e8
	movaps	%xmm0,  -32 * SIZE(BB)
kusano 2b45e8
kusano 2b45e8
	addl	$1 * SIZE, B
kusano 2b45e8
	addl	$4 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jne	.L56
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L60:
kusano 2b45e8
	movl	C, C1
kusano 2b45e8
	movl	A, AA
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	sarl	$3, I
kusano 2b45e8
	jle	.L70
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L61:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 4), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movaps	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movaps	-16 * SIZE(AA), %xmm2
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	movaps	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
	prefetcht0	3 * SIZE(C1)
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$8, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L65
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L62:
kusano 2b45e8
	mulps	%xmm1, %xmm0
kusano 2b45e8
	mulps	-28 * SIZE(AA), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1, %xmm0
kusano 2b45e8
	mulps	-20 * SIZE(AA), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movaps	  0 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm7
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1, %xmm2
kusano 2b45e8
	mulps	-12 * SIZE(AA), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm4
kusano 2b45e8
	movaps	 -8 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movaps	-20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm1, %xmm2
kusano 2b45e8
	mulps	 -4 * SIZE(AA), %xmm1
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movaps	 16 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm1, %xmm7
kusano 2b45e8
	movaps	  0 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm3, %xmm0
kusano 2b45e8
	mulps	  4 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	movaps	  8 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movaps	-12 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm3, %xmm0
kusano 2b45e8
	mulps	 12 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm0, %xmm5
kusano 2b45e8
	movaps	 32 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm3, %xmm7
kusano 2b45e8
	movaps	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm3, %xmm2
kusano 2b45e8
	mulps	 20 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm4
kusano 2b45e8
	movaps	 24 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm6
kusano 2b45e8
	movaps	 -4 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm3, %xmm2
kusano 2b45e8
	mulps	 28 * SIZE(AA), %xmm3
kusano 2b45e8
	addps	%xmm2, %xmm5
kusano 2b45e8
	movaps	 48 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm7
kusano 2b45e8
	movaps	 16 * SIZE(BB), %xmm3
kusano 2b45e8
kusano 2b45e8
	addl   $ 64 * SIZE, AA
kusano 2b45e8
	subl   $-32 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L62
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L65:
kusano 2b45e8
	movaps	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L68
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L66:
kusano 2b45e8
	mulps	%xmm1, %xmm0
kusano 2b45e8
	mulps	-28 * SIZE(AA), %xmm1
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm6
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	addl	$8 * SIZE, AA
kusano 2b45e8
	addl	$4 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L66
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L68:
kusano 2b45e8
	addps	%xmm5, %xmm4
kusano 2b45e8
	addps	%xmm7, %xmm6
kusano 2b45e8
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm6
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movhps	2 * SIZE(C1), %xmm0
kusano 2b45e8
	movsd	4 * SIZE(C1), %xmm2
kusano 2b45e8
	movhps	6 * SIZE(C1), %xmm2
kusano 2b45e8
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
	addps	%xmm2, %xmm6
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm4, 2 * SIZE(C1)
kusano 2b45e8
	movsd	%xmm6, 4 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm6, 6 * SIZE(C1)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 4), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$8, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addl	$8 * SIZE, C1
kusano 2b45e8
	decl	I
kusano 2b45e8
	jg	.L61
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L70:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$4, I
kusano 2b45e8
	jle	.L80
kusano 2b45e8
kusano 2b45e8
.L71:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 2), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movaps	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movaps	-16 * SIZE(AA), %xmm2
kusano 2b45e8
	movaps	-16 * SIZE(BB), %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$4, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L75
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L72:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
	movaps	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-20 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	-20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	  0 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
	movaps	  0 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movaps	-12 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movaps	-12 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movaps	 -8 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm5
kusano 2b45e8
	movaps	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movaps	 -4 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movaps	 -4 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movaps	 16 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm5
kusano 2b45e8
	movaps	 16 * SIZE(BB), %xmm3
kusano 2b45e8
kusano 2b45e8
	subl   $-32 * SIZE, AA
kusano 2b45e8
	subl   $-32 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L72
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L75:
kusano 2b45e8
	movaps	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L78
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L76:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movaps	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movaps	-28 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	addl	$4 * SIZE, AA
kusano 2b45e8
	addl	$4 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L76
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L78:
kusano 2b45e8
	addps	%xmm5, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	movhps	2 * SIZE(C1), %xmm0
kusano 2b45e8
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	movhps	%xmm4, 2 * SIZE(C1)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 2), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addl	$4 * SIZE, C1
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L80:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$2, I
kusano 2b45e8
	jle	.L90
kusano 2b45e8
kusano 2b45e8
.L81:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   8), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movsd	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movsd	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	movsd	-24 * SIZE(AA), %xmm2
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$2, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L85
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L82:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movsd	-30 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movsd	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movsd	-28 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
	movsd	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movsd	-26 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movsd	-20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movsd	-16 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm5
kusano 2b45e8
	movsd	 -0 * SIZE(BB), %xmm1
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movsd	-22 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movsd	-12 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movsd	-20 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm5
kusano 2b45e8
	movsd	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movsd	-18 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm4
kusano 2b45e8
	movsd	 -4 * SIZE(BB), %xmm3
kusano 2b45e8
	mulps	%xmm2,  %xmm3
kusano 2b45e8
	movsd	 -8 * SIZE(AA), %xmm2
kusano 2b45e8
	addps	%xmm3, %xmm5
kusano 2b45e8
	movsd	 16 * SIZE(BB), %xmm3
kusano 2b45e8
kusano 2b45e8
	subl   $-16 * SIZE, AA
kusano 2b45e8
	subl   $-32 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L82
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L85:
kusano 2b45e8
	movsd	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L88
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L86:
kusano 2b45e8
	mulps	%xmm0,  %xmm1
kusano 2b45e8
	movsd	-30 * SIZE(AA), %xmm0
kusano 2b45e8
	addps	%xmm1, %xmm4
kusano 2b45e8
	movsd	-28 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	addl	$2 * SIZE, AA
kusano 2b45e8
	addl	$4 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L86
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L88:
kusano 2b45e8
	addps	%xmm5, %xmm4
kusano 2b45e8
	mulps	%xmm3, %xmm4
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movsd	0 * SIZE(C1), %xmm0
kusano 2b45e8
	addps	%xmm0, %xmm4
kusano 2b45e8
#endif
kusano 2b45e8
	movsd	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
kusano 2b45e8
#if (defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KKK, %eax
kusano 2b45e8
	leal	(,%eax,    8), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 2), BB
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	addl	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
	addl	$2 * SIZE, C1
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L90:
kusano 2b45e8
	movl	M,  I
kusano 2b45e8
	testl	$1, I
kusano 2b45e8
	jle	.L99
kusano 2b45e8
kusano 2b45e8
.L91:
kusano 2b45e8
#if !defined(TRMMKERNEL) || \
kusano 2b45e8
	(defined(TRMMKERNEL) &&  defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
	(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
#else
kusano 2b45e8
	leal	32 * SIZE + BUFFER, BB
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
	leal	(, %eax,   4), %eax
kusano 2b45e8
	leal	(AA, %eax, 1), AA
kusano 2b45e8
	leal	(BB, %eax, 4), BB /* because it's doubled */
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movss	-32 * SIZE(AA), %xmm0
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movss	-32 * SIZE(BB), %xmm1
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	movss	-16 * SIZE(BB), %xmm3
kusano 2b45e8
	movss	-28 * SIZE(AA), %xmm2
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
	subl	KK, %eax
kusano 2b45e8
	movl	%eax, KKK	
kusano 2b45e8
#else
kusano 2b45e8
	movl	KK, %eax
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#else
kusano 2b45e8
	addl	$1, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	movl	%eax, KKK
kusano 2b45e8
#endif
kusano 2b45e8
	sarl	$3, %eax
kusano 2b45e8
	je	.L95
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L92:
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	movss	-31 * SIZE(AA), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
	movss	-28 * SIZE(BB), %xmm1
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	movss	-30 * SIZE(AA), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm5
kusano 2b45e8
	movss	-24 * SIZE(BB), %xmm1
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	movss	-29 * SIZE(AA), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
	movss	-20 * SIZE(BB), %xmm1
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	movss	-24 * SIZE(AA), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm5
kusano 2b45e8
	movss	 -0 * SIZE(BB), %xmm1
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	movss	-27 * SIZE(AA), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm4
kusano 2b45e8
	movss	-12 * SIZE(BB), %xmm3
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	movss	-26 * SIZE(AA), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm5
kusano 2b45e8
	movss	 -8 * SIZE(BB), %xmm3
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	movss	-25 * SIZE(AA), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm4
kusano 2b45e8
	movss	 -4 * SIZE(BB), %xmm3
kusano 2b45e8
	mulss	%xmm2,  %xmm3
kusano 2b45e8
	movss	-20 * SIZE(AA), %xmm2
kusano 2b45e8
	addss	%xmm3, %xmm5
kusano 2b45e8
	movss	 16 * SIZE(BB), %xmm3
kusano 2b45e8
kusano 2b45e8
	subl   $ -8 * SIZE, AA
kusano 2b45e8
	subl   $-32 * SIZE, BB
kusano 2b45e8
	decl   %eax
kusano 2b45e8
	jne    .L92
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L95:
kusano 2b45e8
	movss	ALPHA,  %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movl	K, %eax
kusano 2b45e8
#else
kusano 2b45e8
	movl	KKK, %eax
kusano 2b45e8
#endif
kusano 2b45e8
	andl	$7, %eax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L98
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L96:
kusano 2b45e8
	mulss	%xmm0,  %xmm1
kusano 2b45e8
	movss	-31 * SIZE(AA), %xmm0
kusano 2b45e8
	addss	%xmm1, %xmm4
kusano 2b45e8
	movss	-28 * SIZE(BB), %xmm1
kusano 2b45e8
kusano 2b45e8
	addl	$1 * SIZE, AA
kusano 2b45e8
	addl	$4 * SIZE, BB
kusano 2b45e8
	decl	%eax
kusano 2b45e8
	jg	.L96
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L98:
kusano 2b45e8
	addss	%xmm5, %xmm4
kusano 2b45e8
	mulss	%xmm3, %xmm4
kusano 2b45e8
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	movss	0 * SIZE(C1), %xmm0
kusano 2b45e8
	addss	%xmm0, %xmm4
kusano 2b45e8
#endif
kusano 2b45e8
	movss	%xmm4, 0 * SIZE(C1)
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L99:
kusano 2b45e8
	addl	LDC, C
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
.L999:
kusano 2b45e8
	movl	OLD_STACK, %esp
kusano 2b45e8
	
kusano 2b45e8
	EMMS
kusano 2b45e8
kusano 2b45e8
	popl	%ebx
kusano 2b45e8
	popl	%esi
kusano 2b45e8
	popl	%edi
kusano 2b45e8
	popl	%ebp
kusano 2b45e8
	ret
kusano 2b45e8
kusano 2b45e8
	EPILOGUE