Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/x86_64/ztrsm_kernel_LT_2x2_sse3.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
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	%rbx
kusano 2b45e8
#define KK	%rbp
kusano 2b45e8
	
kusano 2b45e8
#ifndef WINDOWS_ABI
kusano 2b45e8
kusano 2b45e8
#define STACKSIZE 128
kusano 2b45e8
kusano 2b45e8
#define OLD_LDC		 8 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_OFFSET	16 + STACKSIZE(%rsp)
kusano 2b45e8
kusano 2b45e8
#define OFFSET	 48(%rsp)
kusano 2b45e8
#define KKK	 56(%rsp)
kusano 2b45e8
#define AORIG    64(%rsp)
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
#define STACKSIZE 256
kusano 2b45e8
kusano 2b45e8
#define OLD_A		48 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_B		56 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_C		64 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_LDC		72 + STACKSIZE(%rsp)
kusano 2b45e8
#define OLD_OFFSET	80 + STACKSIZE(%rsp)
kusano 2b45e8
kusano 2b45e8
#define OFFSET	 224(%rsp)
kusano 2b45e8
#define KKK	 232(%rsp)
kusano 2b45e8
#define AORIG    240(%rsp)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define PREFETCH     prefetcht1
kusano 2b45e8
#define PREFETCHSIZE (16 * 12 + 3)
kusano 2b45e8
#define PREFETCH_R    (4 *  4 + 0)
kusano 2b45e8
kusano 2b45e8
#ifndef CONJ
kusano 2b45e8
#define ADD1	  addpd
kusano 2b45e8
#define ADD2	  addpd
kusano 2b45e8
#else
kusano 2b45e8
#define ADD1	  subpd
kusano 2b45e8
#define ADD2	  addpd
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define KERNEL1(address) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE +  0) * SIZE + (address) * 2 * SIZE(AO);\
kusano 2b45e8
	ADD1	%xmm9, %xmm0;\
kusano 2b45e8
	movddup	 1 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD2	%xmm9, %xmm1;\
kusano 2b45e8
	movddup	 2 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm2;\
kusano 2b45e8
	movddup	 3 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	movapd	 2 * SIZE + (address) * 2 * SIZE(AO), %xmm8;\
kusano 2b45e8
	ADD2	%xmm9, %xmm3;\
kusano 2b45e8
	movddup	 0 * SIZE + (address) * 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
#define KERNEL2(address) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm4;\
kusano 2b45e8
	movddup	 1 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD2	%xmm9, %xmm5;\
kusano 2b45e8
	movddup	 2 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm6;\
kusano 2b45e8
	movddup	 3 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	movapd	 4 * SIZE + (address) * 2 * SIZE(AO), %xmm8;\
kusano 2b45e8
	ADD2	%xmm9, %xmm7;\
kusano 2b45e8
	movddup	 4 * SIZE + (address) * 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
#define KERNEL3(address) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm0;\
kusano 2b45e8
	movddup	 5 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD2	%xmm9, %xmm1;\
kusano 2b45e8
	movddup	 6 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm2;\
kusano 2b45e8
	movddup	 7 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	movapd	 6 * SIZE + (address) * 2 * SIZE(AO), %xmm8;\
kusano 2b45e8
	ADD2	%xmm9, %xmm3;\
kusano 2b45e8
	movddup	 4 * SIZE + (address) * 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
#define KERNEL4(address) \
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm4;\
kusano 2b45e8
	movddup	 5 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD2	%xmm9, %xmm5;\
kusano 2b45e8
	movddup	 6 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	ADD1	%xmm9, %xmm6;\
kusano 2b45e8
	movddup	 7 * SIZE + (address) * 2 * SIZE(BO), %xmm9;\
kusano 2b45e8
	mulpd	%xmm8, %xmm9;\
kusano 2b45e8
	movapd	32 * SIZE + (address) * 2 * SIZE(AO), %xmm8;\
kusano 2b45e8
	ADD2	%xmm9, %xmm7;\
kusano 2b45e8
	movddup	32 * SIZE + (address) * 2 * SIZE(BO), %xmm9
kusano 2b45e8
kusano 2b45e8
#define KERNEL5(address) \
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm0;\
kusano 2b45e8
	movddup	 9 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD2	%xmm11, %xmm1;\
kusano 2b45e8
	movddup	10 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm2;\
kusano 2b45e8
	movddup	11 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	movapd	10 * SIZE + (address) * 2 * SIZE(AO), %xmm10;\
kusano 2b45e8
	ADD2	%xmm11, %xmm3;\
kusano 2b45e8
	movddup	 8 * SIZE + (address) * 2 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
#define KERNEL6(address) \
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm4;\
kusano 2b45e8
	movddup	 9 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD2	%xmm11, %xmm5;\
kusano 2b45e8
	movddup	10 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm6;\
kusano 2b45e8
	movddup	11 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	movapd	12 * SIZE + (address) * 2 * SIZE(AO), %xmm10;\
kusano 2b45e8
	ADD2	%xmm11, %xmm7;\
kusano 2b45e8
	movddup	12 * SIZE + (address) * 2 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
#define KERNEL7(address) \
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm0;\
kusano 2b45e8
	movddup	13 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD2	%xmm11, %xmm1;\
kusano 2b45e8
	movddup	14 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm2;\
kusano 2b45e8
	movddup	15 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	movapd	14 * SIZE + (address) * 2 * SIZE(AO), %xmm10;\
kusano 2b45e8
	ADD2	%xmm11, %xmm3;\
kusano 2b45e8
	movddup	12 * SIZE + (address) * 2 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
#define KERNEL8(address) \
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm4;\
kusano 2b45e8
	movddup	13 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD2	%xmm11, %xmm5;\
kusano 2b45e8
	movddup	14 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	ADD1	%xmm11, %xmm6;\
kusano 2b45e8
	movddup	15 * SIZE + (address) * 2 * SIZE(BO), %xmm11;\
kusano 2b45e8
	mulpd	%xmm10, %xmm11;\
kusano 2b45e8
	movapd	40 * SIZE + (address) * 2 * SIZE(AO), %xmm10;\
kusano 2b45e8
	ADD2	%xmm11, %xmm7;\
kusano 2b45e8
	movddup	40 * SIZE + (address) * 2 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
#define KERNEL9(address) \
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE + 16) * SIZE + (address) * 2 * SIZE(AO);\
kusano 2b45e8
	ADD1	%xmm13, %xmm0;\
kusano 2b45e8
	movddup	17 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD2	%xmm13, %xmm1;\
kusano 2b45e8
	movddup	18 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm2;\
kusano 2b45e8
	movddup	19 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	movapd	18 * SIZE + (address) * 2 * SIZE(AO), %xmm12;\
kusano 2b45e8
	ADD2	%xmm13, %xmm3;\
kusano 2b45e8
	movddup	16 * SIZE + (address) * 2 * SIZE(BO), %xmm13
kusano 2b45e8
kusano 2b45e8
#define KERNEL10(address) \
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm4;\
kusano 2b45e8
	movddup	17 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD2	%xmm13, %xmm5;\
kusano 2b45e8
	movddup	18 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm6;\
kusano 2b45e8
	movddup	19 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	movapd	20 * SIZE + (address) * 2 * SIZE(AO), %xmm12;\
kusano 2b45e8
	ADD2	%xmm13, %xmm7;\
kusano 2b45e8
	movddup	20 * SIZE + (address) * 2 * SIZE(BO), %xmm13
kusano 2b45e8
kusano 2b45e8
#define KERNEL11(address) \
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm0;\
kusano 2b45e8
	movddup	21 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD2	%xmm13, %xmm1;\
kusano 2b45e8
	movddup	22 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm2;\
kusano 2b45e8
	movddup	23 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	movapd	22 * SIZE + (address) * 2 * SIZE(AO), %xmm12;\
kusano 2b45e8
	ADD2	%xmm13, %xmm3;\
kusano 2b45e8
	movddup	20 * SIZE + (address) * 2 * SIZE(BO), %xmm13
kusano 2b45e8
kusano 2b45e8
#define KERNEL12(address) \
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm4;\
kusano 2b45e8
	movddup 21 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD2	%xmm13, %xmm5;\
kusano 2b45e8
	movddup	22 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	ADD1	%xmm13, %xmm6;\
kusano 2b45e8
	movddup	23 * SIZE + (address) * 2 * SIZE(BO), %xmm13;\
kusano 2b45e8
	mulpd	%xmm12, %xmm13;\
kusano 2b45e8
	movapd	48 * SIZE + (address) * 2 * SIZE(AO), %xmm12;\
kusano 2b45e8
	ADD2	%xmm13, %xmm7;\
kusano 2b45e8
	movddup	48 * SIZE + (address) * 2 * SIZE(BO), %xmm13
kusano 2b45e8
kusano 2b45e8
#define KERNEL13(address) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm0;\
kusano 2b45e8
	movddup	25 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD2	%xmm15, %xmm1;\
kusano 2b45e8
	movddup	26 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm2;\
kusano 2b45e8
	movddup	27 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	movapd	26 * SIZE + (address) * 2 * SIZE(AO), %xmm14;\
kusano 2b45e8
	ADD2	%xmm15, %xmm3;\
kusano 2b45e8
	movddup	24 * SIZE + (address) * 2 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#define KERNEL14(address) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm4;\
kusano 2b45e8
	movddup	25 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD2	%xmm15, %xmm5;\
kusano 2b45e8
	movddup	26 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm6;\
kusano 2b45e8
	movddup	27 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	movapd	28 * SIZE + (address) * 2 * SIZE(AO), %xmm14;\
kusano 2b45e8
	ADD2	%xmm15, %xmm7;\
kusano 2b45e8
	movddup	28 * SIZE + (address) * 2 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#define KERNEL15(address) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm0;\
kusano 2b45e8
	movddup	29 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD2	%xmm15, %xmm1;\
kusano 2b45e8
	movddup	30 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm2;\
kusano 2b45e8
	movddup	31 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	movapd	30 * SIZE + (address) * 2 * SIZE(AO), %xmm14;\
kusano 2b45e8
	ADD2	%xmm15, %xmm3;\
kusano 2b45e8
	movddup	28 * SIZE + (address) * 2 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
#define KERNEL16(address) \
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm4;\
kusano 2b45e8
	movddup	29 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD2	%xmm15, %xmm5;\
kusano 2b45e8
	movddup	30 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	ADD1	%xmm15, %xmm6;\
kusano 2b45e8
	movddup	31 * SIZE + (address) * 2 * SIZE(BO), %xmm15;\
kusano 2b45e8
	mulpd	%xmm14, %xmm15;\
kusano 2b45e8
	movapd	56 * SIZE + (address) * 2 * SIZE(AO), %xmm14;\
kusano 2b45e8
	ADD2	%xmm15, %xmm7;\
kusano 2b45e8
	movddup	56 * SIZE + (address) * 2 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
	PROFCODE
kusano 2b45e8
	
kusano 2b45e8
	subq	$STACKSIZE, %rsp
kusano 2b45e8
	
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
#endif
kusano 2b45e8
kusano 2b45e8
	movq	OLD_LDC,    LDC
kusano 2b45e8
	movq	OLD_OFFSET, KK
kusano 2b45e8
kusano 2b45e8
	movq	KK, OFFSET
kusano 2b45e8
	
kusano 2b45e8
	salq	$ZBASE_SHIFT, LDC
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	M, %rax
kusano 2b45e8
       salq	$ZBASE_SHIFT, %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
       movq	N, %rax
kusano 2b45e8
       salq	$ZBASE_SHIFT, %rax
kusano 2b45e8
       imulq	K, %rax
kusano 2b45e8
       addq	%rax, B
kusano 2b45e8
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, KK
kusano 2b45e8
       subq	OFFSET, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	N,  J
kusano 2b45e8
	sarq	$1, J		# j = (n >> 2)
kusano 2b45e8
	jle	.L100
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L01:
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
       movq	K, %rax
kusano 2b45e8
       salq	$1 + ZBASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, B
kusano 2b45e8
       
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
kusano 2b45e8
#ifndef RT
kusano 2b45e8
	leaq	(C, LDC, 2), C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movq	OFFSET, KK
kusano 2b45e8
	addq	M, KK
kusano 2b45e8
#endif	
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movq	OFFSET, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	M,  I
kusano 2b45e8
	sarq	$1, I		# i = (m >> 2)
kusano 2b45e8
	jle	.L30
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L10:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + ZBASE_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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), BO
kusano 2b45e8
#else
kusano 2b45e8
	movq	B, BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movddup	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm12
kusano 2b45e8
	movddup 16 * SIZE(BO), %xmm13
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm14
kusano 2b45e8
	movddup	24 * SIZE(BO), %xmm15
kusano 2b45e8
kusano 2b45e8
	prefetchnta     4 * SIZE(CO1)
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	prefetchnta     4 * SIZE(CO2)
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
	pxor	%xmm6, %xmm6
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	.L12
kusano 2b45e8
	
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
	KERNEL9 (16  *  0)
kusano 2b45e8
	KERNEL10(16  *  0)
kusano 2b45e8
	KERNEL11(16  *  0)
kusano 2b45e8
	KERNEL12(16  *  0)
kusano 2b45e8
	KERNEL13(16  *  0)
kusano 2b45e8
	KERNEL14(16  *  0)
kusano 2b45e8
	KERNEL15(16  *  0)
kusano 2b45e8
	KERNEL16(16  *  0)
kusano 2b45e8
	cmpq	$128 *  1, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  1)
kusano 2b45e8
	KERNEL10(16  *  1)
kusano 2b45e8
	KERNEL11(16  *  1)
kusano 2b45e8
	KERNEL12(16  *  1)
kusano 2b45e8
	KERNEL13(16  *  1)
kusano 2b45e8
	KERNEL14(16  *  1)
kusano 2b45e8
	KERNEL15(16  *  1)
kusano 2b45e8
	KERNEL16(16  *  1)
kusano 2b45e8
	cmpq	$128 *  2, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  2)
kusano 2b45e8
	KERNEL10(16  *  2)
kusano 2b45e8
	KERNEL11(16  *  2)
kusano 2b45e8
	KERNEL12(16  *  2)
kusano 2b45e8
	KERNEL13(16  *  2)
kusano 2b45e8
	KERNEL14(16  *  2)
kusano 2b45e8
	KERNEL15(16  *  2)
kusano 2b45e8
	KERNEL16(16  *  2)
kusano 2b45e8
	cmpq	$128 *  3, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  3)
kusano 2b45e8
	KERNEL10(16  *  3)
kusano 2b45e8
	KERNEL11(16  *  3)
kusano 2b45e8
	KERNEL12(16  *  3)
kusano 2b45e8
	KERNEL13(16  *  3)
kusano 2b45e8
	KERNEL14(16  *  3)
kusano 2b45e8
	KERNEL15(16  *  3)
kusano 2b45e8
	KERNEL16(16  *  3)
kusano 2b45e8
	cmpq	$128 *  4, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  4)
kusano 2b45e8
	KERNEL10(16  *  4)
kusano 2b45e8
	KERNEL11(16  *  4)
kusano 2b45e8
	KERNEL12(16  *  4)
kusano 2b45e8
	KERNEL13(16  *  4)
kusano 2b45e8
	KERNEL14(16  *  4)
kusano 2b45e8
	KERNEL15(16  *  4)
kusano 2b45e8
	KERNEL16(16  *  4)
kusano 2b45e8
	cmpq	$128 *  5, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  5)
kusano 2b45e8
	KERNEL10(16  *  5)
kusano 2b45e8
	KERNEL11(16  *  5)
kusano 2b45e8
	KERNEL12(16  *  5)
kusano 2b45e8
	KERNEL13(16  *  5)
kusano 2b45e8
	KERNEL14(16  *  5)
kusano 2b45e8
	KERNEL15(16  *  5)
kusano 2b45e8
	KERNEL16(16  *  5)
kusano 2b45e8
	cmpq	$128 *  6, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  6)
kusano 2b45e8
	KERNEL10(16  *  6)
kusano 2b45e8
	KERNEL11(16  *  6)
kusano 2b45e8
	KERNEL12(16  *  6)
kusano 2b45e8
	KERNEL13(16  *  6)
kusano 2b45e8
	KERNEL14(16  *  6)
kusano 2b45e8
	KERNEL15(16  *  6)
kusano 2b45e8
	KERNEL16(16  *  6)
kusano 2b45e8
	cmpq	$128 *  7, %rax
kusano 2b45e8
	NOBRANCH
kusano 2b45e8
	jle	.L11
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
	KERNEL9 (16  *  7)
kusano 2b45e8
	KERNEL10(16  *  7)
kusano 2b45e8
	KERNEL11(16  *  7)
kusano 2b45e8
	KERNEL12(16  *  7)
kusano 2b45e8
	KERNEL13(16  *  7)
kusano 2b45e8
	KERNEL14(16  *  7)
kusano 2b45e8
	KERNEL15(16  *  7)
kusano 2b45e8
	KERNEL16(16  *  7)
kusano 2b45e8
kusano 2b45e8
	addq	$32 * 8  * SIZE, AO
kusano 2b45e8
	addq	$32 * 8  * SIZE, BO
kusano 2b45e8
	subq	$128 * 8, %rax
kusano 2b45e8
	jg	.L1X
kusano 2b45e8
kusano 2b45e8
.L11:
kusano 2b45e8
	leaq	(AO, %rax, 2), AO	# * 16
kusano 2b45e8
	leaq	(BO, %rax, 2), BO	# * 64
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L12:
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 .L14
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L13:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm11
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm5
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm6
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm7
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	.L13
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L14:
kusano 2b45e8
	SHUFPD_1 %xmm1, %xmm1
kusano 2b45e8
	SHUFPD_1 %xmm3, %xmm3
kusano 2b45e8
	SHUFPD_1 %xmm5, %xmm5
kusano 2b45e8
	SHUFPD_1 %xmm7, %xmm7
kusano 2b45e8
kusano 2b45e8
#ifndef CONJ
kusano 2b45e8
	addsubpd	%xmm1, %xmm0
kusano 2b45e8
	addsubpd	%xmm3, %xmm2
kusano 2b45e8
	addsubpd	%xmm5, %xmm4
kusano 2b45e8
	addsubpd	%xmm7, %xmm6
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd	%xmm0, %xmm1
kusano 2b45e8
	addsubpd	%xmm2, %xmm3
kusano 2b45e8
	addsubpd	%xmm4, %xmm5
kusano 2b45e8
	addsubpd	%xmm6, %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	subq	$2, %rax
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(BO), %xmm10
kusano 2b45e8
	movapd	 6 * SIZE(BO), %xmm11
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
#endif
kusano 2b45e8
kusano 2b45e8
#if   (defined(LN) || defined(LT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm2,  %xmm9
kusano 2b45e8
	subpd	%xmm4,  %xmm10
kusano 2b45e8
	subpd	%xmm6,  %xmm11
kusano 2b45e8
#elif (defined(LN) || defined(LT)) &&  defined(CONJ)
kusano 2b45e8
	subpd	%xmm1,  %xmm8
kusano 2b45e8
	subpd	%xmm3,  %xmm9
kusano 2b45e8
	subpd	%xmm5,  %xmm10
kusano 2b45e8
	subpd	%xmm7,  %xmm11
kusano 2b45e8
#elif (defined(RN) || defined(RT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm4,  %xmm9
kusano 2b45e8
	subpd	%xmm2,  %xmm10
kusano 2b45e8
	subpd	%xmm6,  %xmm11
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd %xmm1,  %xmm8
kusano 2b45e8
	addsubpd %xmm5,  %xmm9
kusano 2b45e8
	addsubpd %xmm3,  %xmm10
kusano 2b45e8
	addsubpd %xmm7,  %xmm11
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	pcmpeqb	%xmm7,  %xmm7
kusano 2b45e8
	psllq	$63,    %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movddup	 6 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 7 * SIZE(AO), %xmm1
kusano 2b45e8
	movddup	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	movddup	 5 * SIZE(AO), %xmm3
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm5
kusano 2b45e8
#else
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm1
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm2
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm3
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm10,  %xmm12
kusano 2b45e8
	movapd	%xmm11,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm10
kusano 2b45e8
	mulpd	 %xmm0, %xmm11
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	mulpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm10
kusano 2b45e8
	addsubpd %xmm13, %xmm11
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm10,  %xmm12
kusano 2b45e8
	movapd	%xmm10,  %xmm13
kusano 2b45e8
	movapd	%xmm11,  %xmm14
kusano 2b45e8
	movapd	%xmm11,  %xmm15
kusano 2b45e8
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm15, %xmm15
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm2, %xmm14
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
	mulpd	%xmm3, %xmm15
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
	addsubpd %xmm15, %xmm14
kusano 2b45e8
kusano 2b45e8
	subpd	 %xmm12, %xmm8
kusano 2b45e8
	subpd	 %xmm14, %xmm9
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm4, %xmm9
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	mulpd	 %xmm5, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LT) || defined(RN)
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(AO), %xmm3
kusano 2b45e8
	movddup	 6 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 7 * SIZE(AO), %xmm5
kusano 2b45e8
#else
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm3
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	mulpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm8,  %xmm13
kusano 2b45e8
	movapd	%xmm9,  %xmm14
kusano 2b45e8
	movapd	%xmm9,  %xmm15
kusano 2b45e8
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm15, %xmm15
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm2, %xmm14
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
	mulpd	%xmm3, %xmm15
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
	addsubpd %xmm15, %xmm14
kusano 2b45e8
kusano 2b45e8
	subpd	 %xmm12, %xmm10
kusano 2b45e8
	subpd	 %xmm14, %xmm11
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm10,  %xmm12
kusano 2b45e8
	movapd	%xmm11,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm10
kusano 2b45e8
	mulpd	 %xmm4, %xmm11
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	mulpd	 %xmm5, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm10
kusano 2b45e8
	addsubpd %xmm13, %xmm11
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	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
	movsd	%xmm10, 2 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm10, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm9,   0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm9,   1 * SIZE(CO2)
kusano 2b45e8
	movsd	%xmm11,  2 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm11,  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	%xmm8,   0 * SIZE(BO)
kusano 2b45e8
	movapd	%xmm9,   2 * SIZE(BO)
kusano 2b45e8
	movapd	%xmm10,  4 * SIZE(BO)
kusano 2b45e8
	movapd	%xmm11,  6 * 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
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, KK
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
       salq	$1 + ZBASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	decq	I			# i --
kusano 2b45e8
	jg	.L10
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L30:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	jle	.L99
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + ZBASE_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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), BO
kusano 2b45e8
#else
kusano 2b45e8
	movq	B, BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movddup	 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	.L42
kusano 2b45e8
kusano 2b45e8
.L41:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE +  0) * SIZE(AO)
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	16 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	 9 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	11 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	13 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	14 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	15 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	24 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	17 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	18 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	19 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	20 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	21 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	22 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	23 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	32 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	25 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	26 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	27 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	28 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	29 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	30 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	31 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	40 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
	addq   $16 * SIZE, AO
kusano 2b45e8
	addq   $32 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L41
kusano 2b45e8
kusano 2b45e8
.L42:
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
	jle .L44
kusano 2b45e8
kusano 2b45e8
.L43:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
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	.L43
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L44:
kusano 2b45e8
	SHUFPD_1 %xmm1, %xmm1
kusano 2b45e8
	SHUFPD_1 %xmm3, %xmm3
kusano 2b45e8
kusano 2b45e8
#ifndef CONJ
kusano 2b45e8
	addsubpd	%xmm1, %xmm0
kusano 2b45e8
	addsubpd	%xmm3, %xmm2
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd	%xmm0, %xmm1
kusano 2b45e8
	addsubpd	%xmm2, %xmm3
kusano 2b45e8
#endif
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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if   (defined(LN) || defined(LT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm2,  %xmm9
kusano 2b45e8
#elif (defined(LN) || defined(LT)) &&  defined(CONJ)
kusano 2b45e8
	subpd	%xmm1,  %xmm8
kusano 2b45e8
	subpd	%xmm3,  %xmm9
kusano 2b45e8
#elif (defined(RN) || defined(RT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm2,  %xmm9
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd %xmm1, %xmm8
kusano 2b45e8
	addsubpd %xmm3, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	pcmpeqb	%xmm7,  %xmm7
kusano 2b45e8
	psllq	$63,    %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm4, %xmm9
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	mulpd	 %xmm5, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm1
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	mulpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm3
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm8,  %xmm13
kusano 2b45e8
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
kusano 2b45e8
	subpd	 %xmm12, %xmm9
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm9
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm1
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm2
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm3
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm9
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
kusano 2b45e8
	subpd	 %xmm12, %xmm8
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %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	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	movsd	%xmm9,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm9,  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	%xmm9,  0 * SIZE(CO2)
kusano 2b45e8
	movhpd	%xmm9,  1 * SIZE(CO2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(BO)
kusano 2b45e8
	movapd	%xmm9,   2 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm9,   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
	leaq	(BO, %rax, 4), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, KK
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
       salq	$0 + ZBASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L99:
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	BO, 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
	decq	J			# j --
kusano 2b45e8
	jg	.L01
kusano 2b45e8
kusano 2b45e8
.L100:
kusano 2b45e8
	testq	$1, N
kusano 2b45e8
	jle	.L999
kusano 2b45e8
kusano 2b45e8
.L101:
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
       movq	K, %rax
kusano 2b45e8
       salq	$0 + ZBASE_SHIFT, %rax
kusano 2b45e8
       subq	%rax, B
kusano 2b45e8
       
kusano 2b45e8
       subq	LDC, C
kusano 2b45e8
#endif
kusano 2b45e8
	movq	C, CO1		# coffset1 = c
kusano 2b45e8
#ifndef RT
kusano 2b45e8
	addq	LDC, C
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movq	OFFSET, KK
kusano 2b45e8
	addq	M, KK
kusano 2b45e8
#endif	
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movq	OFFSET, KK
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movq	M,  I
kusano 2b45e8
	sarq	$1, I		# i = (m >> 2)
kusano 2b45e8
	jle	.L130
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L110:
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$1 + ZBASE_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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), BO
kusano 2b45e8
#else
kusano 2b45e8
	movq	B, BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm4, %xmm4
kusano 2b45e8
	movddup	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	pxor	%xmm5, %xmm5
kusano 2b45e8
kusano 2b45e8
	prefetchnta     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	.L112
kusano 2b45e8
kusano 2b45e8
.L111:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE +  0) * SIZE(AO)
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm5
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm4
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm5
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm4
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm5
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm4
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm9
kusano 2b45e8
	movapd	40 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm9, %xmm5
kusano 2b45e8
	movddup	16 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE + 16) * SIZE(AO)
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	 9 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	18 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	 8 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	 9 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	20 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm5
kusano 2b45e8
	movddup	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	11 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	22 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	11 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm5
kusano 2b45e8
	movddup	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	13 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	26 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	13 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	28 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm5
kusano 2b45e8
	movddup	14 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	15 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	30 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	14 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	15 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm8, %xmm11
kusano 2b45e8
	movapd	32 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm11, %xmm5
kusano 2b45e8
	movddup	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    .L111
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L112:
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
	jle .L114
kusano 2b45e8
kusano 2b45e8
.L113:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm11
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD1	%xmm11, %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD2	%xmm11, %xmm5
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	.L113
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L114:
kusano 2b45e8
	SHUFPD_1 %xmm1, %xmm1
kusano 2b45e8
	SHUFPD_1 %xmm5, %xmm5
kusano 2b45e8
kusano 2b45e8
#ifndef CONJ
kusano 2b45e8
	addsubpd	%xmm1, %xmm0
kusano 2b45e8
	addsubpd	%xmm5, %xmm4
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd	%xmm0, %xmm1
kusano 2b45e8
	addsubpd	%xmm4, %xmm5
kusano 2b45e8
#endif
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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 4), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(BO), %xmm9
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if   (defined(LN) || defined(LT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm4,  %xmm9
kusano 2b45e8
#elif (defined(LN) || defined(LT)) &&  defined(CONJ)
kusano 2b45e8
	subpd	%xmm1,  %xmm8
kusano 2b45e8
	subpd	%xmm5,  %xmm9
kusano 2b45e8
#elif (defined(RN) || defined(RT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
	subpd	%xmm4,  %xmm9
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd %xmm1, %xmm8
kusano 2b45e8
	addsubpd %xmm5, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	pcmpeqb	%xmm7,  %xmm7
kusano 2b45e8
	psllq	$63,    %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movddup	 6 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 7 * SIZE(AO), %xmm1
kusano 2b45e8
	movddup	 4 * SIZE(AO), %xmm2
kusano 2b45e8
	movddup	 5 * SIZE(AO), %xmm3
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm9
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
	subpd	 %xmm12, %xmm8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(AO), %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(AO), %xmm3
kusano 2b45e8
	movddup	 6 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 7 * SIZE(AO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
	xorpd	%xmm7, %xmm3
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm8,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
	mulpd	%xmm2, %xmm12
kusano 2b45e8
	mulpd	%xmm3, %xmm13
kusano 2b45e8
	addsubpd %xmm13, %xmm12
kusano 2b45e8
	subpd	 %xmm12, %xmm9
kusano 2b45e8
	movapd	%xmm9,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm4, %xmm9
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm1
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm0, %xmm9
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	mulpd	 %xmm1, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	movapd	%xmm9,  %xmm13
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm13, %xmm13
kusano 2b45e8
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm4, %xmm9
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	mulpd	 %xmm5, %xmm13
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
	addsubpd %xmm13, %xmm9
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	%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
#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
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(BO)
kusano 2b45e8
	movapd	%xmm9,   2 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(AO)
kusano 2b45e8
	movapd	%xmm9,   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
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$2, KK
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
       salq	$1 + ZBASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	decq	I			# i --
kusano 2b45e8
	jg	.L110
kusano 2b45e8
	ALIGN_4	
kusano 2b45e8
kusano 2b45e8
.L130:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	jle	.L149
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
       movq	K, %rax
kusano 2b45e8
       salq	$0 + ZBASE_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
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), BO
kusano 2b45e8
#else
kusano 2b45e8
	movq	B, BO
kusano 2b45e8
#endif	
kusano 2b45e8
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
	pxor	%xmm0, %xmm0
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm9
kusano 2b45e8
	pxor	%xmm1, %xmm1
kusano 2b45e8
	movapd	 8 * SIZE(AO), %xmm10
kusano 2b45e8
	pxor	%xmm2, %xmm2
kusano 2b45e8
	movddup	 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	.L142
kusano 2b45e8
kusano 2b45e8
.L141:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	PREFETCH  (PREFETCHSIZE + 0) * SIZE(AO)
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 2 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 3 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 4 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	 4 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 5 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 6 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 6 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm2
kusano 2b45e8
	movddup	 7 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	16 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm3
kusano 2b45e8
	movddup	16 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	 9 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	10 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	10 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	11 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	12 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	12 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm0
kusano 2b45e8
	movddup	13 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	14 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm1
kusano 2b45e8
	movddup	14 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	ADD1	%xmm11, %xmm2
kusano 2b45e8
	movddup	15 * SIZE(BO), %xmm11
kusano 2b45e8
	mulpd	%xmm10, %xmm11
kusano 2b45e8
	movapd	24 * SIZE(AO), %xmm10
kusano 2b45e8
	ADD2	%xmm11, %xmm3
kusano 2b45e8
	movddup	24 * SIZE(BO), %xmm11
kusano 2b45e8
kusano 2b45e8
	addq   $16 * SIZE, AO
kusano 2b45e8
	addq   $16 * SIZE, BO
kusano 2b45e8
	decq   %rax
kusano 2b45e8
	jne    .L141
kusano 2b45e8
kusano 2b45e8
.L142:
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
	jle .L144
kusano 2b45e8
kusano 2b45e8
.L143:
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	ADD1	%xmm9, %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm9
kusano 2b45e8
	mulpd	%xmm8, %xmm9
kusano 2b45e8
	movapd	 2 * SIZE(AO), %xmm8
kusano 2b45e8
	ADD2	%xmm9, %xmm1
kusano 2b45e8
	movddup	 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	.L143
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L144:
kusano 2b45e8
	addpd	%xmm2, %xmm0
kusano 2b45e8
	addpd	%xmm3, %xmm1
kusano 2b45e8
kusano 2b45e8
	SHUFPD_1 %xmm1, %xmm1
kusano 2b45e8
kusano 2b45e8
#ifndef CONJ
kusano 2b45e8
	addsubpd	%xmm1, %xmm0
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd	%xmm0, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(RT)
kusano 2b45e8
	movq	KK, %rax
kusano 2b45e8
	subq	$1, %rax
kusano 2b45e8
kusano 2b45e8
	leaq	(, %rax, SIZE), %rax
kusano 2b45e8
kusano 2b45e8
	movq	AORIG, AO
kusano 2b45e8
	leaq	(AO, %rax, 2), AO
kusano 2b45e8
	leaq	(B,  %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	 0 * SIZE(BO), %xmm8
kusano 2b45e8
#else
kusano 2b45e8
	movapd	 0 * SIZE(AO), %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if   (defined(LN) || defined(LT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
#elif (defined(LN) || defined(LT)) &&  defined(CONJ)
kusano 2b45e8
	subpd	%xmm1,  %xmm8
kusano 2b45e8
#elif (defined(RN) || defined(RT)) && !defined(CONJ)
kusano 2b45e8
	subpd	%xmm0,  %xmm8
kusano 2b45e8
#else
kusano 2b45e8
	addsubpd %xmm1, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	pcmpeqb	%xmm7,  %xmm7
kusano 2b45e8
	psllq	$63,    %xmm7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LT
kusano 2b45e8
	movddup	 0 * SIZE(AO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(AO), %xmm1
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RN
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm0
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm1
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm1
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm0, %xmm8
kusano 2b45e8
	mulpd	 %xmm1, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef RT
kusano 2b45e8
	movddup	 0 * SIZE(BO), %xmm4
kusano 2b45e8
	movddup	 1 * SIZE(BO), %xmm5
kusano 2b45e8
kusano 2b45e8
#ifdef CONJ
kusano 2b45e8
	xorpd	%xmm7, %xmm5
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movapd	%xmm8,  %xmm12
kusano 2b45e8
	SHUFPD_1 %xmm12, %xmm12
kusano 2b45e8
	mulpd	 %xmm4, %xmm8
kusano 2b45e8
	mulpd	 %xmm5, %xmm12
kusano 2b45e8
kusano 2b45e8
	addsubpd %xmm12, %xmm8
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	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
#else
kusano 2b45e8
	movsd	%xmm8,  0 * SIZE(CO1)
kusano 2b45e8
	movhpd	%xmm8,  1 * SIZE(CO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(LN) || defined(LT)
kusano 2b45e8
	movapd	%xmm8,   0 * SIZE(BO)
kusano 2b45e8
#else
kusano 2b45e8
	movapd	%xmm8,   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
	leaq	(BO, %rax, 2), BO
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LN
kusano 2b45e8
	subq	$1, KK
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
       salq	$0 + ZBASE_SHIFT, %rax
kusano 2b45e8
       addq	%rax, AORIG
kusano 2b45e8
#endif
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L149:
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	BO, 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_3
kusano 2b45e8
	
kusano 2b45e8
.L999:
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