Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/x86_64/trsm_kernel_RT_4x4_sse2.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 M	%rdi
kusano 2b45e8
#define N	%rsi
kusano 2b45e8
#define K	%rdx
kusano 2b45e8
#define A	%rcx
kusano 2b45e8
#define B	%r8
kusano 2b45e8
#define C	%r9
kusano 2b45e8
#define LDC	%r10
kusano 2b45e8
kusano 2b45e8
#define I	%r11
kusano 2b45e8
#define J	%r12
kusano 2b45e8
#define AO	%r13
kusano 2b45e8
#define BO	%r14
kusano 2b45e8
#define	CO1	%r15
kusano 2b45e8
#define CO2	%rbp
kusano 2b45e8
kusano 2b45e8
#ifndef WINDOWS_ABI
kusano 2b45e8
kusano 2b45e8
#define STACKSIZE 64
kusano 2b45e8
kusano 2b45e8
#define OLD_LDC		 8 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_OFFSET	16 + STACKSIZE(%rsp)
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
#define STACKSIZE 256
kusano 2b45e8
kusano 2b45e8
#define OLD_A		40 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_B		48 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_C		56 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_LDC		64 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_OFFSET	72 + STACKSIZE(%rsp)
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define ALPHA	  0(%rsp)
kusano 2b45e8
#define OFFSET	 16(%rsp)
kusano 2b45e8
#define KK	 24(%rsp)
kusano 2b45e8
#define KKK	 32(%rsp)
kusano 2b45e8
#define AORIG	 40(%rsp)
kusano 2b45e8
#define BORIG	 48(%rsp)
kusano 2b45e8
#define BUFFER	128(%rsp)
kusano 2b45e8
kusano 2b45e8
#if defined(OPTERON) || defined(BARCELONA) || defined(SHANGHAI)
kusano 2b45e8
#define PREFETCH     prefetch
kusano 2b45e8
#define PREFETCHW    prefetchw
kusano 2b45e8
#define PREFETCHNTA  prefetchnta
kusano 2b45e8
#ifndef ALLOC_HUGETLB
kusano 2b45e8
#define PREFETCHSIZE (8 * 4 + 4)
kusano 2b45e8
#else
kusano 2b45e8
#define PREFETCHSIZE (8 * 2 + 4)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef GENERIC
kusano 2b45e8
#define PREFETCH     prefetcht0
kusano 2b45e8
#define PREFETCHW    prefetcht0
kusano 2b45e8
#define PREFETCHNTA  prefetchnta
kusano 2b45e8
#define PREFETCHSIZE (8 * 4 + 4)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef OPTERON	
kusano 2b45e8
#define movsd	movlpd
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define KERNEL1(xx) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9 ;\
kusano 2b45e8
	addpd	%xmm9, %xmm0 ;\
kusano 2b45e8
	movapd	 0 * SIZE + 2 * (xx) * SIZE(BO), %xmm9 ;\
kusano 2b45e8
	mulpd	%xmm8, %xmm11 ;\
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE + 1 * (xx) * SIZE(AO) ;\
kusano 2b45e8
	addpd	%xmm11, %xmm1 ;\
kusano 2b45e8
	movapd	 2 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm8, %xmm13 ;\
kusano 2b45e8
	mulpd	 6 * SIZE + 2 * (xx) * SIZE(BO), %xmm8 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm2 ;\
kusano 2b45e8
	movapd	 4 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm8, %xmm3 ;\
kusano 2b45e8
	movapd	 8 * SIZE + 1 * (xx) * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
#define KERNEL2(xx) \
kusano 2b45e8
	mulpd	%xmm10, %xmm9 ;\
kusano 2b45e8
	addpd	%xmm9, %xmm4 ;\
kusano 2b45e8
	movapd	16 * SIZE + 2 * (xx) * SIZE(BO), %xmm9 ;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm5 ;\
kusano 2b45e8
	movapd	10 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm10, %xmm13 ;\
kusano 2b45e8
	mulpd	 6 * SIZE + 2 * (xx) * SIZE(BO), %xmm10 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm6 ;\
kusano 2b45e8
	movapd	12 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm10, %xmm7 ;\
kusano 2b45e8
	movapd	10 * SIZE + 1 * (xx) * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
#define KERNEL3(xx) \
kusano 2b45e8
	mulpd	%xmm12, %xmm15 ;\
kusano 2b45e8
	addpd	%xmm15, %xmm0 ;\
kusano 2b45e8
	movapd	 8 * SIZE + 2 * (xx) * SIZE(BO), %xmm15 ;\
kusano 2b45e8
	mulpd	%xmm12, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm1 ;\
kusano 2b45e8
	movapd	10 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13 ;\
kusano 2b45e8
	mulpd	14 * SIZE + 2 * (xx) * SIZE(BO), %xmm12 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm2 ;\
kusano 2b45e8
	movapd	12 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm12, %xmm3 ;\
kusano 2b45e8
	movapd	12 * SIZE + 1 * (xx) * SIZE(AO), %xmm12
kusano 2b45e8
kusano 2b45e8
#define KERNEL4(xx) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15 ;\
kusano 2b45e8
	addpd	%xmm15, %xmm4 ;\
kusano 2b45e8
	movapd	24 * SIZE + 2 * (xx) * SIZE(BO), %xmm15 ;\
kusano 2b45e8
	mulpd	%xmm14, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm5 ;\
kusano 2b45e8
	movapd	18 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm14, %xmm13 ;\
kusano 2b45e8
	mulpd	14 * SIZE + 2 * (xx) * SIZE(BO), %xmm14 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm6 ;\
kusano 2b45e8
	movapd	20 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm14, %xmm7 ;\
kusano 2b45e8
	movapd	14 * SIZE + 1 * (xx) * SIZE(AO), %xmm14
kusano 2b45e8
kusano 2b45e8
#define KERNEL5(xx) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9 ;\
kusano 2b45e8
	addpd	%xmm9, %xmm0 ;\
kusano 2b45e8
	movapd	16 * SIZE + 2 * (xx) * SIZE(BO), %xmm9 ;\
kusano 2b45e8
	mulpd	%xmm8, %xmm11 ;\
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  8) * SIZE + 1 * (xx) * SIZE(AO) ;\
kusano 2b45e8
	addpd	%xmm11, %xmm1 ;\
kusano 2b45e8
	movapd	18 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm8, %xmm13 ;\
kusano 2b45e8
	mulpd	22 * SIZE + 2 * (xx) * SIZE(BO), %xmm8 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm2 ;\
kusano 2b45e8
	movapd	20 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm8, %xmm3 ;\
kusano 2b45e8
	movapd	16 * SIZE + 1 * (xx) * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
#define KERNEL6(xx) \
kusano 2b45e8
	mulpd	%xmm10, %xmm9 ;\
kusano 2b45e8
	addpd	%xmm9, %xmm4 ;\
kusano 2b45e8
	movapd	32 * SIZE + 2 * (xx) * SIZE(BO), %xmm9 ;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm5 ;\
kusano 2b45e8
	movapd	26 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm10, %xmm13 ;\
kusano 2b45e8
	mulpd	22 * SIZE + 2 * (xx) * SIZE(BO), %xmm10 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm6 ;\
kusano 2b45e8
	movapd	28 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm10, %xmm7 ;\
kusano 2b45e8
	movapd	18 * SIZE + 1 * (xx) * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
#define KERNEL7(xx) \
kusano 2b45e8
	mulpd	%xmm12, %xmm15 ;\
kusano 2b45e8
	addpd	%xmm15, %xmm0 ;\
kusano 2b45e8
	movapd	24 * SIZE + 2 * (xx) * SIZE(BO), %xmm15 ;\
kusano 2b45e8
	mulpd	%xmm12, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm1 ;\
kusano 2b45e8
	movapd	26 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13 ;\
kusano 2b45e8
	mulpd	30 * SIZE + 2 * (xx) * SIZE(BO), %xmm12 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm2 ;\
kusano 2b45e8
	movapd	28 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm12, %xmm3 ;\
kusano 2b45e8
	movapd	20 * SIZE + 1 * (xx) * SIZE(AO), %xmm12
kusano 2b45e8
kusano 2b45e8
#define KERNEL8(xx) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15 ;\
kusano 2b45e8
	addpd	%xmm15, %xmm4 ;\
kusano 2b45e8
	movapd	40 * SIZE + 2 * (xx) * SIZE(BO), %xmm15 ;\
kusano 2b45e8
	mulpd	%xmm14, %xmm11 ;\
kusano 2b45e8
	addpd	%xmm11, %xmm5 ;\
kusano 2b45e8
	movapd	34 * SIZE + 2 * (xx) * SIZE(BO), %xmm11 ;\
kusano 2b45e8
	mulpd	%xmm14, %xmm13 ;\
kusano 2b45e8
	mulpd	30 * SIZE + 2 * (xx) * SIZE(BO), %xmm14 ;\
kusano 2b45e8
	addpd	%xmm13, %xmm6 ;\
kusano 2b45e8
	movapd	36 * SIZE + 2 * (xx) * SIZE(BO), %xmm13 ;\
kusano 2b45e8
	addpd	%xmm14, %xmm7 ;\
kusano 2b45e8
	movapd	22 * SIZE + 1 * (xx) * SIZE(AO), %xmm14
kusano 2b45e8
	
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
	PROFCODE
kusano 2b45e8
	
kusano 2b45e8
	subq	$STACKSIZE, %rsp
kusano 2b45e8
	movq	%rbx,  0(%rsp)
kusano 2b45e8
	movq	%rbp,  8(%rsp)
kusano 2b45e8
	movq	%r12, 16(%rsp)
kusano 2b45e8
	movq	%r13, 24(%rsp)
kusano 2b45e8
	movq	%r14, 32(%rsp)
kusano 2b45e8
	movq	%r15, 40(%rsp)
kusano 2b45e8
kusano 2b45e8
#ifdef WINDOWS_ABI
kusano 2b45e8
	movq	%rdi,    48(%rsp)
kusano 2b45e8
	movq	%rsi,    56(%rsp)
kusano 2b45e8
	movups	%xmm6,   64(%rsp)
kusano 2b45e8
	movups	%xmm7,   80(%rsp)
kusano 2b45e8
	movups	%xmm8,   96(%rsp)
kusano 2b45e8
	movups	%xmm9,  112(%rsp)
kusano 2b45e8
	movups	%xmm10, 128(%rsp)
kusano 2b45e8
	movups	%xmm11, 144(%rsp)
kusano 2b45e8
	movups	%xmm12, 160(%rsp)
kusano 2b45e8
	movups	%xmm13, 176(%rsp)
kusano 2b45e8
	movups	%xmm14, 192(%rsp)
kusano 2b45e8
	movups	%xmm15, 208(%rsp)
kusano 2b45e8
kusano 2b45e8
	movq	ARG1,      M
kusano 2b45e8
	movq	ARG2,      N
kusano 2b45e8
	movq	ARG3,      K
kusano 2b45e8
	movq	OLD_A,     A
kusano 2b45e8
	movq	OLD_B,     B
kusano 2b45e8
	movq	OLD_C,     C
kusano 2b45e8
	movq	OLD_LDC,   LDC
kusano 2b45e8
	movsd	OLD_OFFSET, %xmm4
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm3, %xmm0
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	movq	OLD_LDC,   LDC
kusano 2b45e8
	movsd	OLD_OFFSET, %xmm4
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	%rsp, %rbx	# save old stack
kusano 2b45e8
	subq	$128 + LOCAL_BUFFER_SIZE, %rsp
kusano 2b45e8
	andq	$-4096, %rsp	# align stack
kusano 2b45e8
kusano 2b45e8
	STACK_TOUCHING
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4, OFFSET
kusano 2b45e8
	movsd	%xmm4, KK
kusano 2b45e8
kusano 2b45e8
	leaq	(, LDC, SIZE), LDC
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       leaq	(, M, SIZE), %rax
kusano 2b45e8
       addq	%rax, C
kusano 2b45e8
       imulq	K, %rax
kusano 2b45e8
       addq	%rax, A
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       leaq	(, N, SIZE), %rax
kusano 2b45e8
       imulq	K, %rax
kusano 2b45e8
       addq	%rax, B
kusano 2b45e8
       movq	N, %rax
kusano 2b45e8
       imulq	LDC, %rax
kusano 2b45e8
       addq	%rax, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	negq	KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	N, %rax
kusano 2b45e8
       subq	OFFSET, %rax
kusano 2b45e8
       movq	%rax, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	testq	$1, N
kusano 2b45e8
	je	.L40
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L81:
kusano 2b45e8
/* Copying to Sub Buffer */
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	addq	M, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	B, BORIG
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 1), B
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	jle	.L83
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L82:
kusano 2b45e8
	PREFETCH	 56 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movsd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movsd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movsd	 4 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 5 * SIZE(B), %xmm5
kusano 2b45e8
	movsd	 6 * SIZE(B), %xmm6
kusano 2b45e8
	movsd	 7 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	addq	$ 8 * SIZE, B
kusano 2b45e8
	addq	$16 * SIZE, BO
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0, -16 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0, -15 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -14 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -13 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -12 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -11 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3, -10 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3,  -9 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -8 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -7 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -6 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -5 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -4 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -3 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L82
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L83:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	jle	.L90
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L84:
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0,  0 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0,  1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	addq	$1 * SIZE, B
kusano 2b45e8
	addq	$2 * SIZE, BO
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L84
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L90:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	A, AO
kusano 2b45e8
#else
kusano 2b45e8
	movq	A, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	subq	LDC, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	C, CO1			# coffset1 = c
kusano 2b45e8
#ifndef RT
kusano 2b45e8
	addq	LDC, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	M,  I
kusano 2b45e8
	sarq	$2, I	# i = (m >> 2)
kusano 2b45e8
	jle	.L100
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L91:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm12
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm14
kusano 2b45e8
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L95
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L92:
kusano 2b45e8
	mulpd	%xmm9, %xmm8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	mulpd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm0
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm9, %xmm8
kusano 2b45e8
	mulpd	 6 * SIZE(AO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm2
kusano 2b45e8
	movapd	32 * SIZE(AO), %xmm8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  8) * SIZE(AO)
kusano 2b45e8
	addpd	%xmm9, %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm9, %xmm10
kusano 2b45e8
	mulpd	10 * SIZE(AO), %xmm9
kusano 2b45e8
	addpd	%xmm10, %xmm0
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 6 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm9, %xmm10
kusano 2b45e8
	mulpd	14 * SIZE(AO), %xmm9
kusano 2b45e8
	addpd	%xmm10, %xmm2
kusano 2b45e8
	movapd	40 * SIZE(AO), %xmm10
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     + 16) * SIZE(AO)
kusano 2b45e8
	addpd	%xmm9, %xmm3
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm11, %xmm12
kusano 2b45e8
	mulpd	18 * SIZE(AO), %xmm11
kusano 2b45e8
	addpd	%xmm12, %xmm0
kusano 2b45e8
	movapd	20 * SIZE(AO), %xmm12
kusano 2b45e8
	addpd	%xmm11, %xmm1
kusano 2b45e8
	movapd	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm11, %xmm12
kusano 2b45e8
	mulpd	22 * SIZE(AO), %xmm11
kusano 2b45e8
	addpd	%xmm12, %xmm2
kusano 2b45e8
	movapd	48 * SIZE(AO), %xmm12
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     + 24) * SIZE(AO)
kusano 2b45e8
	addpd	%xmm11, %xmm3
kusano 2b45e8
	movapd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm11, %xmm14
kusano 2b45e8
	mulpd	26 * SIZE(AO), %xmm11
kusano 2b45e8
	addpd	%xmm14, %xmm0
kusano 2b45e8
	movapd	28 * SIZE(AO), %xmm14
kusano 2b45e8
	addpd	%xmm11, %xmm1
kusano 2b45e8
	movapd	14 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm11, %xmm14
kusano 2b45e8
	mulpd	30 * SIZE(AO), %xmm11
kusano 2b45e8
	addpd	%xmm14, %xmm2
kusano 2b45e8
	movapd	56 * SIZE(AO), %xmm14
kusano 2b45e8
	addpd	%xmm11, %xmm3
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
	addq   $32 * SIZE, AO
kusano 2b45e8
	addq   $16 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L92
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L95:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L99
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L96:
kusano 2b45e8
	mulpd	%xmm9, %xmm8
kusano 2b45e8
	mulpd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm0
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$2 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L96
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L99:
kusano 2b45e8
	addpd	%xmm2, %xmm0
kusano 2b45e8
	addpd	%xmm3, %xmm1
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 1), B
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm2
kusano 2b45e8
	movapd	 2 * SIZE(B), %xmm3
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0,  %xmm2
kusano 2b45e8
	subpd	%xmm1,  %xmm3
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm2
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm3
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0, %xmm2
kusano 2b45e8
	subpd	%xmm1, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movapd	%xmm2, %xmm0
kusano 2b45e8
        unpckhpd %xmm0, %xmm0
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm3, %xmm1
kusano 2b45e8
        unpckhpd %xmm1, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	15 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	14 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm1, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm3
kusano 2b45e8
	movsd	13 * SIZE(AO), %xmm6
kusano 2b45e8
	mulsd	 %xmm1, %xmm6
kusano 2b45e8
	subsd	 %xmm6, %xmm0
kusano 2b45e8
	movsd	12 * SIZE(AO), %xmm7
kusano 2b45e8
	mulsd	 %xmm1, %xmm7
kusano 2b45e8
	subsd	 %xmm7, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	10 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm3
kusano 2b45e8
kusano 2b45e8
	movsd	 9 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm3, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm0
kusano 2b45e8
	movsd	 8 * SIZE(AO), %xmm6
kusano 2b45e8
	mulsd	 %xmm3, %xmm6
kusano 2b45e8
	subsd	 %xmm6, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	 5 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 4 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm0, %xmm2
kusano 2b45e8
	unpcklpd %xmm1, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movapd	%xmm2, %xmm0
kusano 2b45e8
        unpckhpd %xmm0, %xmm0
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm3, %xmm1
kusano 2b45e8
        unpckhpd %xmm1, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm2, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm0
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm6
kusano 2b45e8
	mulsd	 %xmm2, %xmm6
kusano 2b45e8
	subsd	 %xmm6, %xmm3
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm7
kusano 2b45e8
	mulsd	 %xmm2, %xmm7
kusano 2b45e8
	subsd	 %xmm7, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	 5 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 6 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm3
kusano 2b45e8
	movsd	 7 * SIZE(AO), %xmm6
kusano 2b45e8
	mulsd	 %xmm0, %xmm6
kusano 2b45e8
	subsd	 %xmm6, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	10 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm3
kusano 2b45e8
kusano 2b45e8
	movsd	11 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm3, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	15 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm1
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm0, %xmm2
kusano 2b45e8
	unpcklpd %xmm1, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm2
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm2
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm2,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm3,  2 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm3,  3 * SIZE(CO1)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm2,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm3,  2 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm3,  3 * SIZE(CO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm2,   0 * SIZE(B)
kusano 2b45e8
	movapd	%xmm3,   2 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm2,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm2,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm2,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm2,   3 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   4 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   5 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   6 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   7 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm2,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm3,   2 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$4 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	decq	I			# i --
kusano 2b45e8
	jg	.L91
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L100:
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	je	.L110
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L101:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L105
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L102:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	 4 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm8, %xmm2
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
	mulpd	10 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm1
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
	mulpd	12 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm10, %xmm2
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
	mulpd	14 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq   $16 * SIZE, AO
kusano 2b45e8
	addq   $16 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L102
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L105:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L109
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L106:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$2 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L106
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L109:
kusano 2b45e8
	addpd	%xmm1, %xmm0
kusano 2b45e8
	addpd	%xmm3, %xmm2
kusano 2b45e8
	addpd	%xmm2, %xmm0
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 1), B
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm2
kusano 2b45e8
	subpd	%xmm0,  %xmm2
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm2
kusano 2b45e8
	subpd	%xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movapd	%xmm2, %xmm0
kusano 2b45e8
        unpckhpd %xmm0, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movapd	%xmm2, %xmm0
kusano 2b45e8
        unpckhpd %xmm0, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm5
kusano 2b45e8
	mulsd	 %xmm2, %xmm5
kusano 2b45e8
	subsd	 %xmm5, %xmm0
kusano 2b45e8
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm0
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm2,  1 * SIZE(CO1)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm2,  1 * SIZE(CO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm2,   0 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm2,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm2,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm2,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm2,   3 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm2,   0 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$2 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$2 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L110:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	je	.L119
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L111:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movsd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movsd	 4 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movsd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L115
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L112:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	movsd	16 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm8, %xmm1
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	mulsd	 4 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm8, %xmm2
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm8
kusano 2b45e8
	mulsd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 8 * SIZE(AO), %xmm8
kusano 2b45e8
	mulsd	%xmm10, %xmm11
kusano 2b45e8
	movsd	 5 * SIZE(AO), %xmm10
kusano 2b45e8
	addsd	%xmm11, %xmm0
kusano 2b45e8
	movsd	24 * SIZE(BO), %xmm11
kusano 2b45e8
	mulsd	10 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm10, %xmm1
kusano 2b45e8
	movsd	 6 * SIZE(AO), %xmm10
kusano 2b45e8
	mulsd	12 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm10, %xmm2
kusano 2b45e8
	movsd	 7 * SIZE(AO), %xmm10
kusano 2b45e8
	mulsd	14 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm10, %xmm3
kusano 2b45e8
	movsd	12 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq   $ 8 * SIZE, AO
kusano 2b45e8
	addq   $16 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L112
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L115:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L118
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L116:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	movsd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
	addq	$1 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$2 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L116
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L118:
kusano 2b45e8
	addsd	%xmm2, %xmm0
kusano 2b45e8
	addsd	%xmm3, %xmm1
kusano 2b45e8
	addsd	%xmm1, %xmm0
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
	leaq	(B,  %rax, 1), B
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm2
kusano 2b45e8
	subsd	%xmm0,  %xmm2
kusano 2b45e8
#else
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm2
kusano 2b45e8
	subsd	%xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulsd	 %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulsd	 %xmm0, %xmm2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm2,  0 * SIZE(CO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm2,   0 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm2,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm2,   1 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm2,   0 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$1 * SIZE, CO1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$1 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L119:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       leaq	(, K, SIZE), %rax
kusano 2b45e8
       leaq	(B, %rax, 1), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 1), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	addq	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	subq	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
.L40:
kusano 2b45e8
	testq	$2, N
kusano 2b45e8
	je	.L80
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L41:
kusano 2b45e8
/* Copying to Sub Buffer */
kusano 2b45e8
	
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	addq	M, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	B, BORIG
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 2), B
kusano 2b45e8
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$2, %rax
kusano 2b45e8
	jle	.L43
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L42:
kusano 2b45e8
	PREFETCH	 56 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movsd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movsd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movsd	 4 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 5 * SIZE(B), %xmm5
kusano 2b45e8
	movsd	 6 * SIZE(B), %xmm6
kusano 2b45e8
	movsd	 7 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	addq	$ 8 * SIZE, B
kusano 2b45e8
	addq	$16 * SIZE, BO
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0, -16 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0, -15 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -14 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -13 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -12 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -11 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3, -10 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3,  -9 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -8 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -7 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -6 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -5 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -4 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -3 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L42
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L43:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$3, %rax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	jle	.L50
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L44:
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0,  0 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0,  1 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1,  2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, B
kusano 2b45e8
	addq	$4 * SIZE, BO
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L44
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L50:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	A, AO
kusano 2b45e8
#else
kusano 2b45e8
	movq	A, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       leaq	(, LDC, 2), %rax
kusano 2b45e8
       subq	%rax, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	C, CO1			# coffset1 = c
kusano 2b45e8
	leaq	(C, LDC, 1), CO2	# coffset2 = c + ldc
kusano 2b45e8
#ifndef RT
kusano 2b45e8
	leaq	(C, LDC, 2), C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	M,  I
kusano 2b45e8
	sarq	$2, I	# i = (m >> 2)
kusano 2b45e8
	jle	.L60
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L51:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm12
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm14
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO1)
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L55
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L52:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm4
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm5
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm4
kusano 2b45e8
	movapd	32 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm5
kusano 2b45e8
	movapd	32 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  8) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	mulpd	10 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm1
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	mulpd	10 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm4
kusano 2b45e8
	movapd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm5
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	mulpd	14 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm1
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	mulpd	14 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm4
kusano 2b45e8
	movapd	40 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm5
kusano 2b45e8
	movapd	40 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     + 16) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm12, %xmm13
kusano 2b45e8
	mulpd	18 * SIZE(BO), %xmm12
kusano 2b45e8
	addpd	%xmm13, %xmm0
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm12, %xmm1
kusano 2b45e8
	movapd	18 * SIZE(AO), %xmm12
kusano 2b45e8
	mulpd	%xmm12, %xmm13
kusano 2b45e8
	mulpd	18 * SIZE(BO), %xmm12
kusano 2b45e8
	addpd	%xmm13, %xmm4
kusano 2b45e8
	movapd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm12, %xmm5
kusano 2b45e8
	movapd	20 * SIZE(AO), %xmm12
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm12, %xmm13
kusano 2b45e8
	mulpd	22 * SIZE(BO), %xmm12
kusano 2b45e8
	addpd	%xmm13, %xmm0
kusano 2b45e8
	movapd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm12, %xmm1
kusano 2b45e8
	movapd	22 * SIZE(AO), %xmm12
kusano 2b45e8
	mulpd	%xmm12, %xmm13
kusano 2b45e8
	mulpd	22 * SIZE(BO), %xmm12
kusano 2b45e8
	addpd	%xmm13, %xmm4
kusano 2b45e8
	movapd	48 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm12, %xmm5
kusano 2b45e8
	movapd	48 * SIZE(AO), %xmm12
kusano 2b45e8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     + 24) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm14, %xmm15
kusano 2b45e8
	mulpd	26 * SIZE(BO), %xmm14
kusano 2b45e8
	addpd	%xmm15, %xmm0
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm14, %xmm1
kusano 2b45e8
	movapd	26 * SIZE(AO), %xmm14
kusano 2b45e8
	mulpd	%xmm14, %xmm15
kusano 2b45e8
	mulpd	26 * SIZE(BO), %xmm14
kusano 2b45e8
	addpd	%xmm15, %xmm4
kusano 2b45e8
	movapd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm14, %xmm5
kusano 2b45e8
	movapd	28 * SIZE(AO), %xmm14
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm14, %xmm15
kusano 2b45e8
	mulpd	30 * SIZE(BO), %xmm14
kusano 2b45e8
	addpd	%xmm15, %xmm0
kusano 2b45e8
	movapd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm14, %xmm1
kusano 2b45e8
	movapd	30 * SIZE(AO), %xmm14
kusano 2b45e8
	mulpd	%xmm14, %xmm15
kusano 2b45e8
	mulpd	30 * SIZE(BO), %xmm14
kusano 2b45e8
	addpd	%xmm15, %xmm4
kusano 2b45e8
	movapd	56 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm14, %xmm5
kusano 2b45e8
	movapd	56 * SIZE(AO), %xmm14
kusano 2b45e8
kusano 2b45e8
	addq   $32 * SIZE, AO
kusano 2b45e8
	addq   $32 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L52
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L55:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L59
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L56:
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm4
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm8, %xmm5
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$4 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L56
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L59:
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), B
kusano 2b45e8
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm0, %xmm8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
	unpckhpd %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm4, %xmm12
kusano 2b45e8
	unpcklpd %xmm5, %xmm4
kusano 2b45e8
	unpckhpd %xmm5, %xmm12
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(B), %xmm5
kusano 2b45e8
	movapd	 4 * SIZE(B), %xmm9
kusano 2b45e8
	movapd	 6 * SIZE(B), %xmm13
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0,  %xmm1
kusano 2b45e8
	subpd	%xmm8,  %xmm5
kusano 2b45e8
	subpd	%xmm4,  %xmm9
kusano 2b45e8
	subpd	%xmm12, %xmm13
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm10
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm11
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0, %xmm8
kusano 2b45e8
	subpd	%xmm4, %xmm9
kusano 2b45e8
	subpd	%xmm1, %xmm10
kusano 2b45e8
	subpd	%xmm5, %xmm11
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movlpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
	movlpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm13, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm9
kusano 2b45e8
	movlpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm13, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm5
kusano 2b45e8
	movlpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm13, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm1
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	movlpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm9, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
	movlpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm9, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm1
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
	movlpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm1
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm1, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm1, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm9
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm1, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm13
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm9
kusano 2b45e8
	movlpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm5, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	movlpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm9, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm8, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm9, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm8
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm11, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4 * SIZE, CO1
kusano 2b45e8
	subq	$4 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm1,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm9,  2 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm13, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm1,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm5,  1 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm9,  2 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm13, 3 * SIZE(CO2)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm9,  2 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm9,  3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm10,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm10,  1 * SIZE(CO2)
kusano 2b45e8
	movsd	%xmm11,  2 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm11,  3 * SIZE(CO2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm1,   0 * SIZE(B)
kusano 2b45e8
	movapd	%xmm5,   2 * SIZE(B)
kusano 2b45e8
	movapd	%xmm9,   4 * SIZE(B)
kusano 2b45e8
	movapd	%xmm13,  6 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm1,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm1,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   3 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   4 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   5 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,   6 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,   7 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm9,   8 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm9,   9 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm9,  10 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm9,  11 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm13, 12 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm13, 13 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm13, 14 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm13, 15 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm9,   2 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm10,  4 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm11,  6 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$4 * SIZE, CO1
kusano 2b45e8
	addq	$4 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$8 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	decq	I			# i --
kusano 2b45e8
	jg	.L51
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L60:
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	je	.L70
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L61:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L65
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L62:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm2
kusano 2b45e8
	movapd	32 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	mulpd	10 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	mulpd	14 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm11, %xmm2
kusano 2b45e8
	movapd	40 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  8) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm10, %xmm13
kusano 2b45e8
	mulpd	18 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm13, %xmm0
kusano 2b45e8
	movapd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm10, %xmm1
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm13
kusano 2b45e8
	mulpd	22 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm13, %xmm2
kusano 2b45e8
	movapd	48 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm15
kusano 2b45e8
	mulpd	26 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm15, %xmm0
kusano 2b45e8
	movapd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm10, %xmm1
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm15
kusano 2b45e8
	mulpd	30 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm15, %xmm2
kusano 2b45e8
	movapd	56 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq   $16 * SIZE, AO
kusano 2b45e8
	addq   $32 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L62
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L65:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L69
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L66:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$4 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L66
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L69:
kusano 2b45e8
	addpd	%xmm2, %xmm0
kusano 2b45e8
	addpd	%xmm3, %xmm1
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), B
kusano 2b45e8
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm0, %xmm8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
	unpckhpd %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(B), %xmm5
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0,  %xmm1
kusano 2b45e8
	subpd	%xmm8,  %xmm5
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0, %xmm8
kusano 2b45e8
	subpd	%xmm1, %xmm10
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm1
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm1, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm8, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2 * SIZE, CO1
kusano 2b45e8
	subq	$2 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm1,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm1,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm5,  1 * SIZE(CO2)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm10,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm10,  1 * SIZE(CO2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm1,   0 * SIZE(B)
kusano 2b45e8
	movapd	%xmm5,   2 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm1,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm1,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   3 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   4 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   5 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,   6 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,   7 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm10,  2 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$2 * SIZE, CO1
kusano 2b45e8
	addq	$2 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
	addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L70:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	je	.L79
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L71:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movsd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movsd	 4 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movsd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movsd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	movsd	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L75
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L72:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	mulsd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	movsd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	addsd	%xmm8, %xmm1
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	mulsd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm2
kusano 2b45e8
	movsd	32 * SIZE(BO), %xmm9
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	mulsd	10 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm11, %xmm0
kusano 2b45e8
	movsd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	addsd	%xmm8, %xmm1
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	mulsd	14 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm11, %xmm2
kusano 2b45e8
	movsd	40 * SIZE(BO), %xmm11
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 8 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm10, %xmm13
kusano 2b45e8
	mulsd	18 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm13, %xmm0
kusano 2b45e8
	movsd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	addsd	%xmm10, %xmm1
kusano 2b45e8
	movsd	 5 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm10, %xmm13
kusano 2b45e8
	mulsd	22 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm13, %xmm2
kusano 2b45e8
	movsd	48 * SIZE(BO), %xmm13
kusano 2b45e8
	addsd	%xmm10, %xmm3
kusano 2b45e8
	movsd	 6 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm10, %xmm15
kusano 2b45e8
	mulsd	26 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm15, %xmm0
kusano 2b45e8
	movsd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	addsd	%xmm10, %xmm1
kusano 2b45e8
	movsd	 7 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm10, %xmm15
kusano 2b45e8
	mulsd	30 * SIZE(BO), %xmm10
kusano 2b45e8
	addsd	%xmm15, %xmm2
kusano 2b45e8
	movsd	56 * SIZE(BO), %xmm15
kusano 2b45e8
	addsd	%xmm10, %xmm3
kusano 2b45e8
	movsd	12 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq   $ 8 * SIZE, AO
kusano 2b45e8
	addq   $32 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L72
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L75:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L78
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L76:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	mulsd	 2 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	addsd	%xmm8, %xmm1
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
	movsd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
	addq	$1 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$4 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L76
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L78:
kusano 2b45e8
	addsd	%xmm2, %xmm0
kusano 2b45e8
	addsd	%xmm3, %xmm1
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), B
kusano 2b45e8
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm5
kusano 2b45e8
#else
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	subsd	%xmm0,  %xmm4
kusano 2b45e8
	subsd	%xmm1,  %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
kusano 2b45e8
	mulsd	 %xmm0, %xmm4
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
kusano 2b45e8
	mulsd	 %xmm0, %xmm4
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	mulsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm4, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm5
kusano 2b45e8
kusano 2b45e8
	mulsd	 3 * SIZE(B), %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	mulsd	 3 * SIZE(B), %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm5, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm4
kusano 2b45e8
kusano 2b45e8
	mulsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1 * SIZE, CO1
kusano 2b45e8
	subq	$1 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  0 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(B)
kusano 2b45e8
	movsd	%xmm5,   1 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,   1 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,   2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,   3 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(AO)
kusano 2b45e8
	movsd	%xmm5,   1 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$1 * SIZE, CO1
kusano 2b45e8
	addq	$1 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$2 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
	addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
	
kusano 2b45e8
.L79:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       leaq	(, K, SIZE), %rax
kusano 2b45e8
       leaq	(B, %rax, 2), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 2), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	addq	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	subq	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L80:
kusano 2b45e8
	movq	N,  J
kusano 2b45e8
	sarq	$2, J		# j = (n >> 2)
kusano 2b45e8
	jle	.L999
kusano 2b45e8
kusano 2b45e8
.L01:
kusano 2b45e8
/* Copying to Sub Buffer */
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	addq	M, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	B, BORIG
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 4), B
kusano 2b45e8
	leaq	(BO, %rax, 8), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movq	OFFSET, %rax
kusano 2b45e8
	movq	%rax, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$2, %rax
kusano 2b45e8
	jle	.L03
kusano 2b45e8
kusano 2b45e8
	addq	%rax, %rax
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L02:
kusano 2b45e8
	PREFETCHNTA	 40 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movsd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movsd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movsd	 4 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 5 * SIZE(B), %xmm5
kusano 2b45e8
	movsd	 6 * SIZE(B), %xmm6
kusano 2b45e8
	movsd	 7 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	addq	$16 * SIZE, BO
kusano 2b45e8
	addq	$ 8 * SIZE, B
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0, -16 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0, -15 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -14 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1, -13 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -12 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2, -11 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3, -10 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3,  -9 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -8 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,  -7 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -6 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,  -5 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -4 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,  -3 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,  -1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L02
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L03:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$3, %rax
kusano 2b45e8
	BRANCH
kusano 2b45e8
	jle	.L10
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L04:
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movsd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movsd	 3 * SIZE(B), %xmm3
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm0,  0 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm0,  1 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1,  2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm1,  3 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2,  4 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm2,  5 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3,  6 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm3,  7 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, B
kusano 2b45e8
	addq	$8 * SIZE, BO
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jne	.L04
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L10:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	A, AO
kusano 2b45e8
#else
kusano 2b45e8
	movq	A, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       leaq	(, LDC, 4), %rax
kusano 2b45e8
       subq	%rax, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	C, CO1			# coffset1 = c
kusano 2b45e8
	leaq	(C, LDC, 1), CO2	# coffset2 = c + ldc
kusano 2b45e8
#ifndef RT
kusano 2b45e8
	leaq	(C, LDC, 4), C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	M,  I
kusano 2b45e8
	sarq	$2, I	# i = (m >> 2)
kusano 2b45e8
	jle	.L20
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L11:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm11
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm13
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm12
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm14
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO1)
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO2)
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	pxor	%xmm6, %xmm6
kusano 2b45e8
	PREFETCHW      4 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	pxor	%xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$-8, %rax
kusano 2b45e8
	salq	$4, %rax
kusano 2b45e8
	je	.L15
kusano 2b45e8
.L1X:	
kusano 2b45e8
	KERNEL1(16 *  0)
kusano 2b45e8
	KERNEL2(16 *  0)
kusano 2b45e8
	KERNEL3(16 *  0)
kusano 2b45e8
	KERNEL4(16 *  0)
kusano 2b45e8
	KERNEL5(16 *  0)
kusano 2b45e8
	KERNEL6(16 *  0)
kusano 2b45e8
	KERNEL7(16 *  0)
kusano 2b45e8
	KERNEL8(16 *  0)
kusano 2b45e8
	KERNEL1(16 *  1)
kusano 2b45e8
	KERNEL2(16 *  1)
kusano 2b45e8
	KERNEL3(16 *  1)
kusano 2b45e8
	KERNEL4(16 *  1)
kusano 2b45e8
	KERNEL5(16 *  1)
kusano 2b45e8
	KERNEL6(16 *  1)
kusano 2b45e8
	KERNEL7(16 *  1)
kusano 2b45e8
	KERNEL8(16 *  1)
kusano 2b45e8
	cmpq	$64 *  2, %rax
kusano 2b45e8
	jle	.L12
kusano 2b45e8
	KERNEL1(16 *  2)
kusano 2b45e8
	KERNEL2(16 *  2)
kusano 2b45e8
	KERNEL3(16 *  2)
kusano 2b45e8
	KERNEL4(16 *  2)
kusano 2b45e8
	KERNEL5(16 *  2)
kusano 2b45e8
	KERNEL6(16 *  2)
kusano 2b45e8
	KERNEL7(16 *  2)
kusano 2b45e8
	KERNEL8(16 *  2)
kusano 2b45e8
	KERNEL1(16 *  3)
kusano 2b45e8
	KERNEL2(16 *  3)
kusano 2b45e8
	KERNEL3(16 *  3)
kusano 2b45e8
	KERNEL4(16 *  3)
kusano 2b45e8
	KERNEL5(16 *  3)
kusano 2b45e8
	KERNEL6(16 *  3)
kusano 2b45e8
	KERNEL7(16 *  3)
kusano 2b45e8
	KERNEL8(16 *  3)
kusano 2b45e8
	cmpq	$64 *  4, %rax
kusano 2b45e8
	jle	.L12
kusano 2b45e8
	KERNEL1(16 *  4)
kusano 2b45e8
	KERNEL2(16 *  4)
kusano 2b45e8
	KERNEL3(16 *  4)
kusano 2b45e8
	KERNEL4(16 *  4)
kusano 2b45e8
	KERNEL5(16 *  4)
kusano 2b45e8
	KERNEL6(16 *  4)
kusano 2b45e8
	KERNEL7(16 *  4)
kusano 2b45e8
	KERNEL8(16 *  4)
kusano 2b45e8
	KERNEL1(16 *  5)
kusano 2b45e8
	KERNEL2(16 *  5)
kusano 2b45e8
	KERNEL3(16 *  5)
kusano 2b45e8
	KERNEL4(16 *  5)
kusano 2b45e8
	KERNEL5(16 *  5)
kusano 2b45e8
	KERNEL6(16 *  5)
kusano 2b45e8
	KERNEL7(16 *  5)
kusano 2b45e8
	KERNEL8(16 *  5)
kusano 2b45e8
	cmpq	$64 *  6, %rax
kusano 2b45e8
	jle	.L12
kusano 2b45e8
	KERNEL1(16 *  6)
kusano 2b45e8
	KERNEL2(16 *  6)
kusano 2b45e8
	KERNEL3(16 *  6)
kusano 2b45e8
	KERNEL4(16 *  6)
kusano 2b45e8
	KERNEL5(16 *  6)
kusano 2b45e8
	KERNEL6(16 *  6)
kusano 2b45e8
	KERNEL7(16 *  6)
kusano 2b45e8
	KERNEL8(16 *  6)
kusano 2b45e8
	KERNEL1(16 *  7)
kusano 2b45e8
	KERNEL2(16 *  7)
kusano 2b45e8
	KERNEL3(16 *  7)
kusano 2b45e8
	KERNEL4(16 *  7)
kusano 2b45e8
	KERNEL5(16 *  7)
kusano 2b45e8
	KERNEL6(16 *  7)
kusano 2b45e8
	KERNEL7(16 *  7)
kusano 2b45e8
	KERNEL8(16 *  7)
kusano 2b45e8
kusano 2b45e8
	addq	$16 * 8  * SIZE, AO
kusano 2b45e8
	addq	$32 * 8  * SIZE, BO
kusano 2b45e8
	subq	$64 * 8, %rax
kusano 2b45e8
	jg	.L1X
kusano 2b45e8
kusano 2b45e8
.L12:
kusano 2b45e8
	leaq	(AO, %rax, 2), AO	# * 16
kusano 2b45e8
	leaq	(BO, %rax, 4), BO	# * 64
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L15:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L19
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L16:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm2
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm4
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm5
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm9, %xmm6
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm10, %xmm7
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$8 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L16
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L19:
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), B
kusano 2b45e8
	leaq	(BO, %rax, 8), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm0, %xmm8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
	unpckhpd %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm2, %xmm10
kusano 2b45e8
	unpcklpd %xmm3, %xmm2
kusano 2b45e8
	unpckhpd %xmm3, %xmm10
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm4, %xmm12
kusano 2b45e8
	unpcklpd %xmm5, %xmm4
kusano 2b45e8
	unpckhpd %xmm5, %xmm12
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm6, %xmm14
kusano 2b45e8
	unpcklpd %xmm7, %xmm6
kusano 2b45e8
	unpckhpd %xmm7, %xmm14
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(B), %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(B), %xmm5
kusano 2b45e8
	movapd	 6 * SIZE(B), %xmm7
kusano 2b45e8
	movapd	 8 * SIZE(B), %xmm9
kusano 2b45e8
	movapd	10 * SIZE(B), %xmm11
kusano 2b45e8
	movapd	12 * SIZE(B), %xmm13
kusano 2b45e8
	movapd	14 * SIZE(B), %xmm15
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0,  %xmm1
kusano 2b45e8
	subpd	%xmm2,  %xmm3
kusano 2b45e8
	subpd	%xmm8,  %xmm5
kusano 2b45e8
	subpd	%xmm10, %xmm7
kusano 2b45e8
	subpd	%xmm4,  %xmm9
kusano 2b45e8
	subpd	%xmm6,  %xmm11
kusano 2b45e8
	subpd	%xmm12, %xmm13
kusano 2b45e8
	subpd	%xmm14, %xmm15
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm10
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm11
kusano 2b45e8
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm12
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm13
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm14
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm15
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0, %xmm8
kusano 2b45e8
	subpd	%xmm4, %xmm9
kusano 2b45e8
	subpd	%xmm1, %xmm10
kusano 2b45e8
	subpd	%xmm5, %xmm11
kusano 2b45e8
	subpd	%xmm2, %xmm12
kusano 2b45e8
	subpd	%xmm6, %xmm13
kusano 2b45e8
	subpd	%xmm3, %xmm14
kusano 2b45e8
	subpd	%xmm7, %xmm15
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movlpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
	mulpd	 %xmm0, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm13, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm9
kusano 2b45e8
	movlpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	14 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm15, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm13, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm5
kusano 2b45e8
	movlpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	13 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm15, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm13, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm1
kusano 2b45e8
	movlpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	12 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm15, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm9, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
	movlpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 9 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm11, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm9, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm1
kusano 2b45e8
	movlpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 8 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm11, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
	mulpd	 %xmm0, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm1
kusano 2b45e8
	movlpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm7, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm1, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm3, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm1, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm9
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm3, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm1, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm13
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm6
kusano 2b45e8
	mulpd	 %xmm3, %xmm6
kusano 2b45e8
	subpd	 %xmm6, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
	mulpd	 %xmm0, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm9
kusano 2b45e8
	movlpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 6 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm7, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm5, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm13
kusano 2b45e8
	movlpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	movhpd	 7 * SIZE(AO), %xmm4
kusano 2b45e8
	mulpd	 %xmm7, %xmm4
kusano 2b45e8
	subpd	 %xmm4, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm9, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm13
kusano 2b45e8
	movlpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	11 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm11, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
	mulpd	 %xmm0, %xmm15
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm8, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm9, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm8, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm12
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm9, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm8, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm14
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm9, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm12
kusano 2b45e8
	movlpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm11, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm10, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm14
kusano 2b45e8
	movlpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm11, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm12, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm14
kusano 2b45e8
	movlpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm13, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm14
kusano 2b45e8
	mulpd	 %xmm0, %xmm15
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm14
kusano 2b45e8
	mulpd	 %xmm0, %xmm15
kusano 2b45e8
kusano 2b45e8
	movlpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm14, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm12
kusano 2b45e8
	movlpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm15, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm14, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm10
kusano 2b45e8
	movlpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm15, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm14, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm8
kusano 2b45e8
	movlpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm15, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm13
kusano 2b45e8
kusano 2b45e8
	movlpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm12, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
	movlpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm13, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm12, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm8
kusano 2b45e8
	movlpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm13, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
kusano 2b45e8
	movlpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm8
kusano 2b45e8
	movlpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm11, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm9
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4 * SIZE, CO1
kusano 2b45e8
	subq	$4 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm1,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm9,  2 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm13, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm1,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm5,  1 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm9,  2 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm13, 3 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm3,  0 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm7,  1 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm11, 2 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm15, 3 * SIZE(CO1, LDC, 2)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm3,  0 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm7,  1 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm11, 2 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm15, 3 * SIZE(CO2, LDC, 2)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm9,  2 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm9,  3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm10,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm10,  1 * SIZE(CO2)
kusano 2b45e8
	movsd	%xmm11,  2 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm11,  3 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm12,  0 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movhpd	%xmm12,  1 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm13,  2 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movhpd	%xmm13,  3 * SIZE(CO1, LDC, 2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm14,  0 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm14,  1 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movsd	%xmm15,  2 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm15,  3 * SIZE(CO2, LDC, 2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm1,   0 * SIZE(B)
kusano 2b45e8
	movapd	%xmm3,   2 * SIZE(B)
kusano 2b45e8
	movapd	%xmm5,   4 * SIZE(B)
kusano 2b45e8
	movapd	%xmm7,   6 * SIZE(B)
kusano 2b45e8
	movapd	%xmm9,   8 * SIZE(B)
kusano 2b45e8
	movapd	%xmm11, 10 * SIZE(B)
kusano 2b45e8
	movapd	%xmm13, 12 * SIZE(B)
kusano 2b45e8
	movapd	%xmm15, 14 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm1,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm1,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   3 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   4 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   5 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   6 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   7 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   8 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   9 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,  10 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,  11 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm7,  12 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm7,  13 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm7,  14 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm7,  15 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm9,  16 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm9,  17 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm9,  18 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm9,  19 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm11, 20 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm11, 21 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm11, 22 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm11, 23 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm13, 24 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm13, 25 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm13, 26 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm13, 27 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm15, 28 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm15, 29 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm15, 30 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm15, 31 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm9,   2 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm10,  4 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm11,  6 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm12,  8 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm13, 10 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm14, 12 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm15, 14 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$4 * SIZE, CO1
kusano 2b45e8
	addq	$4 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$16 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$4, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
	addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	decq	I			# i --
kusano 2b45e8
	jg	.L11
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L20:
kusano 2b45e8
	testq	$3, M
kusano 2b45e8
	je	.L39
kusano 2b45e8
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	je	.L30
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L21:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movapd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	movapd	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L25
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L22:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm2
kusano 2b45e8
	movapd	32 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	addpd	%xmm11, %xmm1
kusano 2b45e8
	movapd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	mulpd	14 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm11, %xmm2
kusano 2b45e8
	movapd	40 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm13
kusano 2b45e8
	addpd	%xmm13, %xmm0
kusano 2b45e8
	movapd	18 * SIZE(BO), %xmm13
kusano 2b45e8
	mulpd	%xmm8, %xmm13
kusano 2b45e8
	addpd	%xmm13, %xmm1
kusano 2b45e8
	movapd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	mulpd	%xmm8, %xmm13
kusano 2b45e8
	mulpd	22 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm13, %xmm2
kusano 2b45e8
	movapd	48 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm8, %xmm15
kusano 2b45e8
	addpd	%xmm15, %xmm0
kusano 2b45e8
	movapd	26 * SIZE(BO), %xmm15
kusano 2b45e8
	mulpd	%xmm8, %xmm15
kusano 2b45e8
	addpd	%xmm15, %xmm1
kusano 2b45e8
	movapd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	mulpd	%xmm8, %xmm15
kusano 2b45e8
	mulpd	30 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm15, %xmm2
kusano 2b45e8
	movapd	56 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  8) * SIZE(AO)
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	34 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	36 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	mulpd	38 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm9, %xmm2
kusano 2b45e8
	movapd	64 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	addpd	%xmm11, %xmm0
kusano 2b45e8
	movapd	42 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	addpd	%xmm11, %xmm1
kusano 2b45e8
	movapd	44 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	mulpd	46 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm11, %xmm2
kusano 2b45e8
	movapd	72 * SIZE(BO), %xmm11
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm13
kusano 2b45e8
	addpd	%xmm13, %xmm0
kusano 2b45e8
	movapd	50 * SIZE(BO), %xmm13
kusano 2b45e8
	mulpd	%xmm10, %xmm13
kusano 2b45e8
	addpd	%xmm13, %xmm1
kusano 2b45e8
	movapd	52 * SIZE(BO), %xmm13
kusano 2b45e8
	mulpd	%xmm10, %xmm13
kusano 2b45e8
	mulpd	54 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm13, %xmm2
kusano 2b45e8
	movapd	80 * SIZE(BO), %xmm13
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm10, %xmm15
kusano 2b45e8
	addpd	%xmm15, %xmm0
kusano 2b45e8
	movapd	58 * SIZE(BO), %xmm15
kusano 2b45e8
	mulpd	%xmm10, %xmm15
kusano 2b45e8
	addpd	%xmm15, %xmm1
kusano 2b45e8
	movapd	60 * SIZE(BO), %xmm15
kusano 2b45e8
	mulpd	%xmm10, %xmm15
kusano 2b45e8
	mulpd	62 * SIZE(BO), %xmm10
kusano 2b45e8
	addpd	%xmm15, %xmm2
kusano 2b45e8
	movapd	88 * SIZE(BO), %xmm15
kusano 2b45e8
	addpd	%xmm10, %xmm3
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm10
kusano 2b45e8
kusano 2b45e8
	addq   $16 * SIZE, AO
kusano 2b45e8
	addq   $64 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L22
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L25:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L29
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L26:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm0
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	addpd	%xmm9, %xmm1
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	mulpd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addpd	%xmm9, %xmm2
kusano 2b45e8
	movapd	 8 * SIZE(BO), %xmm9
kusano 2b45e8
	addpd	%xmm8, %xmm3
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$8 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L26
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L29:
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), B
kusano 2b45e8
	leaq	(BO, %rax, 8), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm0, %xmm8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
	unpckhpd %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm2, %xmm10
kusano 2b45e8
	unpcklpd %xmm3, %xmm2
kusano 2b45e8
	unpckhpd %xmm3, %xmm10
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(B), %xmm1
kusano 2b45e8
	movapd	 2 * SIZE(B), %xmm3
kusano 2b45e8
	movapd	 4 * SIZE(B), %xmm5
kusano 2b45e8
	movapd	 6 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0,  %xmm1
kusano 2b45e8
	subpd	%xmm2,  %xmm3
kusano 2b45e8
	subpd	%xmm8,  %xmm5
kusano 2b45e8
	subpd	%xmm10, %xmm7
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm10
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm12
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm14
kusano 2b45e8
kusano 2b45e8
	subpd	%xmm0, %xmm8
kusano 2b45e8
	subpd	%xmm1, %xmm10
kusano 2b45e8
	subpd	%xmm2, %xmm12
kusano 2b45e8
	subpd	%xmm3, %xmm14
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
	mulpd	 %xmm0, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm5, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm1
kusano 2b45e8
	movlpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm7, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movlpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm1
kusano 2b45e8
	mulpd	 %xmm0, %xmm3
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm1, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm5
kusano 2b45e8
	movlpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	movhpd	 1 * SIZE(AO), %xmm2
kusano 2b45e8
	mulpd	 %xmm3, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	movhpd	 3 * SIZE(AO), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm5
kusano 2b45e8
	mulpd	 %xmm0, %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm8, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm8, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm12
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm8, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm14
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	movlpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm12
kusano 2b45e8
	movlpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm10, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm14
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm12
kusano 2b45e8
kusano 2b45e8
	movlpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm12, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm14
kusano 2b45e8
kusano 2b45e8
	movlpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm14
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movlpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	15 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm14
kusano 2b45e8
kusano 2b45e8
	movlpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm14, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm12
kusano 2b45e8
	movlpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm14, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm10
kusano 2b45e8
	movlpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	movhpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	mulpd	 %xmm14, %xmm3
kusano 2b45e8
	subpd	 %xmm3, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	10 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm12
kusano 2b45e8
	movlpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm12, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm10
kusano 2b45e8
	movlpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	movhpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	mulpd	 %xmm12, %xmm2
kusano 2b45e8
	subpd	 %xmm2, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 5 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	movlpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	movhpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	mulpd	 %xmm10, %xmm1
kusano 2b45e8
	subpd	 %xmm1, %xmm8
kusano 2b45e8
kusano 2b45e8
	movlpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	movhpd	 0 * SIZE(B), %xmm0
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2 * SIZE, CO1
kusano 2b45e8
	subq	$2 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm1,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm1,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm5,  1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm3,  0 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm7,  1 * SIZE(CO1, LDC, 2)
kusano 2b45e8
kusano 2b45e8
	movhpd	%xmm3,  0 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm7,  1 * SIZE(CO2, LDC, 2)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm10,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm10,  1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm12,  0 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movhpd	%xmm12,  1 * SIZE(CO1, LDC, 2)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm14,  0 * SIZE(CO2, LDC, 2)
kusano 2b45e8
	movhpd	%xmm14,  1 * SIZE(CO2, LDC, 2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm1,   0 * SIZE(B)
kusano 2b45e8
	movapd	%xmm3,   2 * SIZE(B)
kusano 2b45e8
	movapd	%xmm5,   4 * SIZE(B)
kusano 2b45e8
	movapd	%xmm7,   6 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm1,   0 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm1,   1 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   2 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm1,   3 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   4 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm3,   5 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   6 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm3,   7 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   8 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm5,   9 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,  10 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm5,  11 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm7,  12 * SIZE(BO)
kusano 2b45e8
	movlpd	%xmm7,  13 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm7,  14 * SIZE(BO)
kusano 2b45e8
	movhpd	%xmm7,  15 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm10,  2 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm12,  4 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm14,  6 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$2 * SIZE, CO1
kusano 2b45e8
	addq	$2 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$8 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$2, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$1 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L30:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	je	.L39
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L31:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	salq	$2 + BASE_SHIFT, %rax
kusano 2b45e8
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movsd	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movsd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movsd	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movsd	16 * SIZE(BO), %xmm13
kusano 2b45e8
	movsd	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	sarq	$3, %rax
kusano 2b45e8
	je	.L35
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L32:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	PREFETCH	(PREFETCHSIZE     +  0) * SIZE(AO)
kusano 2b45e8
	movsd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm1
kusano 2b45e8
	movsd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	mulsd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm2
kusano 2b45e8
	movsd	32 * SIZE(BO), %xmm9
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	addsd	%xmm11, %xmm0
kusano 2b45e8
	movsd	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	addsd	%xmm11, %xmm1
kusano 2b45e8
	movsd	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	mulsd	14 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm11, %xmm2
kusano 2b45e8
	movsd	40 * SIZE(BO), %xmm11
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	addsd	%xmm13, %xmm0
kusano 2b45e8
	movsd	18 * SIZE(BO), %xmm13
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	addsd	%xmm13, %xmm1
kusano 2b45e8
	movsd	20 * SIZE(BO), %xmm13
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	mulsd	22 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm13, %xmm2
kusano 2b45e8
	movsd	48 * SIZE(BO), %xmm13
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	addsd	%xmm15, %xmm0
kusano 2b45e8
	movsd	26 * SIZE(BO), %xmm15
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	addsd	%xmm15, %xmm1
kusano 2b45e8
	movsd	28 * SIZE(BO), %xmm15
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	mulsd	30 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm15, %xmm2
kusano 2b45e8
	movsd	56 * SIZE(BO), %xmm15
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	movsd	34 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm1
kusano 2b45e8
	movsd	36 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	mulsd	38 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm2
kusano 2b45e8
	movsd	64 * SIZE(BO), %xmm9
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 5 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	addsd	%xmm11, %xmm0
kusano 2b45e8
	movsd	42 * SIZE(BO), %xmm11
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	addsd	%xmm11, %xmm1
kusano 2b45e8
	movsd	44 * SIZE(BO), %xmm11
kusano 2b45e8
	mulsd	%xmm8, %xmm11
kusano 2b45e8
	mulsd	46 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm11, %xmm2
kusano 2b45e8
	movsd	72 * SIZE(BO), %xmm11
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	addsd	%xmm13, %xmm0
kusano 2b45e8
	movsd	50 * SIZE(BO), %xmm13
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	addsd	%xmm13, %xmm1
kusano 2b45e8
	movsd	52 * SIZE(BO), %xmm13
kusano 2b45e8
	mulsd	%xmm8, %xmm13
kusano 2b45e8
	mulsd	54 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm13, %xmm2
kusano 2b45e8
	movsd	80 * SIZE(BO), %xmm13
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 7 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	addsd	%xmm15, %xmm0
kusano 2b45e8
	movsd	58 * SIZE(BO), %xmm15
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	addsd	%xmm15, %xmm1
kusano 2b45e8
	movsd	60 * SIZE(BO), %xmm15
kusano 2b45e8
	mulsd	%xmm8, %xmm15
kusano 2b45e8
	mulsd	62 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm15, %xmm2
kusano 2b45e8
	movsd	88 * SIZE(BO), %xmm15
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 8 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	addq   $ 8 * SIZE, AO
kusano 2b45e8
	addq   $64 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L32
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L35:
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#else
kusano 2b45e8
	movq	K, %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
#endif
kusano 2b45e8
	andq	$7, %rax		# if (k & 1)
kusano 2b45e8
	BRANCH
kusano 2b45e8
	je .L38
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L36:
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm0
kusano 2b45e8
	movsd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	addsd	%xmm9, %xmm1
kusano 2b45e8
	movsd	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulsd	%xmm8, %xmm9
kusano 2b45e8
	mulsd	 6 * SIZE(BO), %xmm8
kusano 2b45e8
	addsd	%xmm9, %xmm2
kusano 2b45e8
	movsd	 8 * SIZE(BO), %xmm9
kusano 2b45e8
	addsd	%xmm8, %xmm3
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm8
kusano 2b45e8
kusano 2b45e8
	addq	$1 * SIZE, AO		# aoffset  += 4
kusano 2b45e8
	addq	$8 * SIZE, BO		# boffset1 += 8
kusano 2b45e8
	decq	%rax
kusano 2b45e8
	jg	.L36
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L38:
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
#else
kusano 2b45e8
	subq	$4, %rax
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
	leaq	BUFFER, BO
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), B
kusano 2b45e8
	leaq	(BO, %rax, 8), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
	movsd	 1 * SIZE(B), %xmm5
kusano 2b45e8
	movsd	 2 * SIZE(B), %xmm6
kusano 2b45e8
	movsd	 3 * SIZE(B), %xmm7
kusano 2b45e8
#else
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movsd	 1 * SIZE(AO), %xmm5
kusano 2b45e8
	movsd	 2 * SIZE(AO), %xmm6
kusano 2b45e8
	movsd	 3 * SIZE(AO), %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	subsd	%xmm0,  %xmm4
kusano 2b45e8
	subsd	%xmm1,  %xmm5
kusano 2b45e8
	subsd	%xmm2,  %xmm6
kusano 2b45e8
	subsd	%xmm3,  %xmm7
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
kusano 2b45e8
	mulsd	 %xmm0, %xmm4
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
	mulsd	 %xmm0, %xmm6
kusano 2b45e8
	mulsd	 %xmm0, %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movsd	 0 * SIZE(AO), %xmm0
kusano 2b45e8
kusano 2b45e8
	mulsd	 %xmm0, %xmm4
kusano 2b45e8
	mulsd	 %xmm0, %xmm5
kusano 2b45e8
	mulsd	 %xmm0, %xmm6
kusano 2b45e8
	mulsd	 %xmm0, %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	mulsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
	movlpd	 1 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm4, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm5
kusano 2b45e8
	movlpd	 2 * SIZE(B), %xmm2
kusano 2b45e8
	mulsd	 %xmm4, %xmm2
kusano 2b45e8
	subsd	 %xmm2, %xmm6
kusano 2b45e8
	movlpd	 3 * SIZE(B), %xmm3
kusano 2b45e8
	mulsd	 %xmm4, %xmm3
kusano 2b45e8
	subsd	 %xmm3, %xmm7
kusano 2b45e8
kusano 2b45e8
	mulsd	 5 * SIZE(B), %xmm5
kusano 2b45e8
	movlpd	 6 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm5, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm6
kusano 2b45e8
	movlpd	 7 * SIZE(B), %xmm2
kusano 2b45e8
	mulsd	 %xmm5, %xmm2
kusano 2b45e8
	subsd	 %xmm2, %xmm7
kusano 2b45e8
kusano 2b45e8
	mulsd	10 * SIZE(B), %xmm6
kusano 2b45e8
	movlpd	11 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm6, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm7
kusano 2b45e8
kusano 2b45e8
	mulsd	15 * SIZE(B), %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	mulsd	 15 * SIZE(B), %xmm7
kusano 2b45e8
kusano 2b45e8
	movlpd	14 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm7, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm6
kusano 2b45e8
	movlpd	13 * SIZE(B), %xmm2
kusano 2b45e8
	mulsd	 %xmm7, %xmm2
kusano 2b45e8
	subsd	 %xmm2, %xmm5
kusano 2b45e8
	movlpd	12 * SIZE(B), %xmm3
kusano 2b45e8
	mulsd	 %xmm7, %xmm3
kusano 2b45e8
	subsd	 %xmm3, %xmm4
kusano 2b45e8
kusano 2b45e8
	mulsd	 10 * SIZE(B), %xmm6
kusano 2b45e8
kusano 2b45e8
	movlpd	 9 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm6, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm5
kusano 2b45e8
	movlpd	 8 * SIZE(B), %xmm2
kusano 2b45e8
	mulsd	 %xmm6, %xmm2
kusano 2b45e8
	subsd	 %xmm2, %xmm4
kusano 2b45e8
kusano 2b45e8
	mulsd	 5 * SIZE(B), %xmm5
kusano 2b45e8
kusano 2b45e8
	movlpd	 4 * SIZE(B), %xmm1
kusano 2b45e8
	mulsd	 %xmm5, %xmm1
kusano 2b45e8
	subsd	 %xmm1, %xmm4
kusano 2b45e8
kusano 2b45e8
	mulsd	 0 * SIZE(B), %xmm4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1 * SIZE, CO1
kusano 2b45e8
	subq	$1 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4,  0 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm5,  0 * SIZE(CO2)
kusano 2b45e8
	movsd	%xmm6,  0 * SIZE(CO1, LDC, 2)
kusano 2b45e8
	movsd	%xmm7,  0 * SIZE(CO2, LDC, 2)
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(B)
kusano 2b45e8
	movsd	%xmm5,   1 * SIZE(B)
kusano 2b45e8
	movsd	%xmm6,   2 * SIZE(B)
kusano 2b45e8
	movsd	%xmm7,   3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm4,   1 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,   2 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm5,   3 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,   4 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm6,   5 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,   6 * SIZE(BO)
kusano 2b45e8
	movsd	%xmm7,   7 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm4,   0 * SIZE(AO)
kusano 2b45e8
	movsd	%xmm5,   1 * SIZE(AO)
kusano 2b45e8
	movsd	%xmm6,   2 * SIZE(AO)
kusano 2b45e8
	movsd	%xmm7,   3 * SIZE(AO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef LN
kusano 2b45e8
	addq	$1 * SIZE, CO1
kusano 2b45e8
	addq	$1 * SIZE, CO2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(AO, %rax, 1), AO
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$4 * SIZE, B
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, KK
kusano 2b45e8
	movq	BORIG, B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	addq	$1, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       movq	BORIG, B
kusano 2b45e8
       salq	$0 + BASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
	
kusano 2b45e8
.L39:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       leaq	(, K, SIZE), %rax
kusano 2b45e8
       leaq	(B, %rax, 4), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
	movq	K,  %rax
kusano 2b45e8
	subq	KK, %rax
kusano 2b45e8
	leaq	(,%rax, SIZE), %rax
kusano 2b45e8
	leaq	(B,  %rax, 4), B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	addq	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	subq	$4, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	decq	J			# j --
kusano 2b45e8
	jg	.L01
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L999:
kusano 2b45e8
	movq	%rbx, %rsp
kusano 2b45e8
kusano 2b45e8
	movq	  0(%rsp), %rbx
kusano 2b45e8
	movq	  8(%rsp), %rbp
kusano 2b45e8
	movq	 16(%rsp), %r12
kusano 2b45e8
	movq	 24(%rsp), %r13
kusano 2b45e8
	movq	 32(%rsp), %r14
kusano 2b45e8
	movq	 40(%rsp), %r15
kusano 2b45e8
kusano 2b45e8
#ifdef WINDOWS_ABI
kusano 2b45e8
	movq	 48(%rsp), %rdi
kusano 2b45e8
	movq	 56(%rsp), %rsi
kusano 2b45e8
	movups	 64(%rsp), %xmm6
kusano 2b45e8
	movups	 80(%rsp), %xmm7
kusano 2b45e8
	movups	 96(%rsp), %xmm8
kusano 2b45e8
	movups	112(%rsp), %xmm9
kusano 2b45e8
	movups	128(%rsp), %xmm10
kusano 2b45e8
	movups	144(%rsp), %xmm11
kusano 2b45e8
	movups	160(%rsp), %xmm12
kusano 2b45e8
	movups	176(%rsp), %xmm13
kusano 2b45e8
	movups	192(%rsp), %xmm14
kusano 2b45e8
	movups	208(%rsp), %xmm15
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addq	$STACKSIZE, %rsp
kusano 2b45e8
	ret
kusano 2b45e8
kusano 2b45e8
	EPILOGUE