// Magnetica_v14.h:
//    _____                                __  .__               
//   /     \ _____     ____   ____   _____/  |_|__| ____ _____   
//  /  \ /  \\__  \   / ___\ /    \_/ __ \   __\  |/ ___\\__  \  
// /    Y    \/ __ \_/ /_/  >   |  \  ___/|  | |  \  \___ / __ \_
// \____|__  (____  /\___  /|___|  /\___  >__| |__|\___  >____  /
//         \/     \//_____/      \/     \/             \/     \/ 
// Written by Sanmayce, 2022-Mar-20
#define M14_InsertionsortTHRESHOLD 0
#define M14_StackEntries 18001 //(18001-1)/2=9000 pairs/recursions
void M14_swapUnconditional(uint64_t *a, uint64_t *b) { uint64_t t = *a; *a = *b; *b = t; }
#define MINKaze(x,y) (x<y?x:y)
#define MAXKaze(x,y) (x<y?y:x)
#define MINKazeSO(x, y) (y ^ ((x ^ y) & -(x < y)))
#define MAXKazeSO(x, y) (x ^ ((x ^ y) & -(x < y)))

int Scandum_UINT64v(uint64_t a, uint64_t b) { return (a > b) - (a < b); } // if a G b then 1
/*
;;; int Scandum_UINT64v(uint64_t a, uint64_t b) { return (a > b) - (a < b); }
  00000 45 33 c0         xor r8d, r8d                           
  00003 33 c0            xor eax, eax                           
  00005 48 3b ca         cmp rcx, rdx                           
  00008 0f 97 c0         seta al                                
  0000b 41 0f 92 c0      setb r8b                               
  0000f 41 2b c0         sub eax, r8d                           
  00012 c3               ret                                    
*/
int Scandum_UINT64p(uint64_t *a, uint64_t *b) { return (*a > *b) - (*a < *b); }
/*
;;; int Scandum_UINT64p(uint64_t *a, uint64_t *b) { return (*a > *b) - (*a < *b); }
  00000 45 33 c0         xor r8d, r8d                           
  00003 48 8b 01         mov rax, QWORD PTR [rcx]               
  00006 48 3b 02         cmp rax, QWORD PTR [rdx]               
  00009 44 89 c0         mov eax, r8d                           
  0000c 0f 97 c0         seta al                                
  0000f 41 0f 92 c0      setb r8b                               
  00013 41 2b c0         sub eax, r8d                           
  00016 c3               ret                                    
*/

// GCC 11.2.1 -O3 fails no more, but the instruction count is meh:
void M14_swapconditional_GCCfails_adjacent(uint64_t *a) { uint64_t bNEW = *a > *(a+1); uint64_t aNEW = !bNEW; uint64_t SAVEa = a[aNEW]; a[0] = a[bNEW]; a[1] = SAVEa; }
/*
M14_swapconditional_GCCfails_adjacent:
.LFB197:
	.cfi_startproc
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	cmpq	%rax, %rcx
	sbbq	%rdx, %rdx
	andl	$8, %edx
	cmpq	%rax, %rcx
	sbbq	%rax, %rax
	movq	(%rdi,%rdx), %xmm0
	notq	%rax
	andl	$8, %eax
	movhps	(%rdi,%rax), %xmm0
	movups	%xmm0, (%rdi)
	ret
*/
// However, now ICL 15.0 -O3 fails:
/*
;;; void M14_swapconditional_GCCfails_adjacent(uint64_t *a) { uint64_t bNEW = *a > *(a+1); uint64_t aNEW = !bNEW; uint64_t SAVEa = a[aNEW]; a[0] = a[bNEW]; a[1] = SAVEa; }
  00000 33 d2            xor edx, edx                           
  00002 48 8b 01         mov rax, QWORD PTR [rcx]               
  00005 41 b8 01 00 00 
        00               mov r8d, 1                             
  0000b 48 3b 41 08      cmp rax, QWORD PTR [8+rcx]             
  0000f 0f 97 c2         seta dl                                
  00012 48 85 d2         test rdx, rdx                          
  00015 74 06            je L1627 
  00017 41 b8 00 00 00 
        00               mov r8d, 0                             
L1627:                                                          
  0001d 45 89 c0         mov r8d, r8d                           
  00020 4c 8b 0c d1      mov r9, QWORD PTR [rcx+rdx*8]          
  00024 4e 8b 14 c1      mov r10, QWORD PTR [rcx+r8*8]          
  00028 4c 89 09         mov QWORD PTR [rcx], r9                
  0002b 4c 89 51 08      mov QWORD PTR [8+rcx], r10             
  0002f c3               ret                                    
*/

// Original Scandum's "adjacent" (12 instructions, but with two?! CMPs), GCC 11.2.1 -O3 makes it branchless, but Intel fails (see next snippet):
#define cmp_Scandum(a,b) (*(a) > *(b))
// x = cmp_Scandum(pta, pta + 1) > 0; y = !x; swap = pta[y]; pta[0] = pta[x]; pta[1] = swap;
void M14_swapconditional_Scandum_adjacent(uint64_t *pta) { uint64_t swap; int x; int y; x = cmp_Scandum(pta, pta + 1) > 0; y = !x; swap = pta[y]; pta[0] = pta[x]; pta[1] = swap; }
/*
M14_swapconditional_Scandum_adjacent:
.LFB197:
	.cfi_startproc
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	cmpq	%rax, %rcx
	sbbq	%rdx, %rdx
	andl	$8, %edx
	cmpq	%rax, %rcx
	sbbq	%rax, %rax
	movq	(%rdi,%rdx), %xmm0
	notq	%rax
	andl	$8, %eax
	movhps	(%rdi,%rax), %xmm0
	movups	%xmm0, (%rdi)
	ret
*/
// ICL 15.0 -O3 fails:
/*
;;; void M14_swapconditional_Scandum_adjacent(uint64_t *pta) { uint64_t swap; int x; int y; x = cmp_Scandum(pta, pta + 1) > 0; y = !x; swap = pta[y]; pta[0] = pta[x]; pta[1] = swap; }
  00000 41 b9 01 00 00 
        00               mov r9d, 1                             
  00006 48 8b 01         mov rax, QWORD PTR [rcx]               
  00009 45 33 c0         xor r8d, r8d                           
  0000c 48 3b 41 08      cmp rax, QWORD PTR [8+rcx]             
  00010 4c 89 ca         mov rdx, r9                            
  00013 76 03            jbe L1622 
  00015 4c 89 c2         mov rdx, r8                            
L1622:                                                          
  00018 77 03            ja L1623 
  0001a 4d 89 c1         mov r9, r8                             
L1623:                                                          
  0001d 4c 8b 1c d1      mov r11, QWORD PTR [rcx+rdx*8]         
  00021 4e 8b 14 c9      mov r10, QWORD PTR [rcx+r9*8]          
  00025 4c 89 11         mov QWORD PTR [rcx], r10               
  00028 4c 89 59 08      mov QWORD PTR [8+rcx], r11             
  0002c c3               ret                                    
*/

// (My Alternative) Scandum's "adjacent" (10 instructions, but with one CMP), Intel makes it branchless, but GCC 11.2.1 -O3 fails (see next snippet):
void M14_swapconditional1adjacent(uint64_t *a, uint64_t *b) { uint64_t bNEW = *(a+(!(*a > *b))); *(a+0) = *(a+(*a > *b)); *b = bNEW; } // bnew = a+0; a+0 = a+1; b = a+0
/*
;;; void M14_swapconditional1adjacent(uint64_t *a, uint64_t *b) { uint64_t bNEW = *(a+(!(*a > *b))); *(a+0) = *(a+(*a > *b)); *b = bNEW; } // bnew = a+0; a+0 = a+1; b = a+0
  00000 45 33 c9         xor r9d, r9d                           
  00003 48 8b 01         mov rax, QWORD PTR [rcx]               
  00006 45 33 c0         xor r8d, r8d                           
  00009 48 3b 02         cmp rax, QWORD PTR [rdx]               
  0000c 41 0f 97 c1      seta r9b                               
  00010 41 0f 96 c0      setbe r8b                              
  00014 4e 8b 14 c9      mov r10, QWORD PTR [rcx+r9*8]          
  00018 4e 8b 1c c1      mov r11, QWORD PTR [rcx+r8*8]          
  0001c 4c 89 11         mov QWORD PTR [rcx], r10               
  0001f 4c 89 1a         mov QWORD PTR [rdx], r11               
  00022 c3               ret                                    
*/
// Caramba! Why so? Why does GCC use branching!
/*
M14_swapconditional1adjacent:
.LFB197:
	.cfi_startproc
	movq	(%rdi), %rax
	cmpq	(%rsi), %rax
	ja	.L5048
	movq	8(%rdi), %rcx
	movq	%rax, %rdx
	movq	%rdx, (%rdi)
	movq	%rcx, (%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L5048:
	movq	8(%rdi), %rdx
	movq	%rax, %rcx
	movq	%rdx, (%rdi)
	movq	%rcx, (%rsi)
	ret
*/

// "MINMAX" variant (9 instructions, but with two CMPs), Intel -O3:
void M14_swapconditional1(uint64_t *a, uint64_t *b) { uint64_t aOLD = *a; uint64_t bOLD = *b; *a = MINKaze(aOLD,bOLD); *b = MAXKaze(aOLD,bOLD); }
/*
;;; void M14_swapconditional1(uint64_t *a, uint64_t *b) { uint64_t aOLD = *a; uint64_t bOLD = *b; *a = MINKaze(aOLD,bOLD); *b = MAXKaze(aOLD,bOLD); }
  00000 4c 8b 09         mov r9, QWORD PTR [rcx]                
  00003 4c 8b 02         mov r8, QWORD PTR [rdx]                
  00006 4d 3b c8         cmp r9, r8                             
  00009 4c 89 c0         mov rax, r8                            
  0000c 49 0f 42 c1      cmovb rax, r9                          
  00010 4d 3b c1         cmp r8, r9                             
  00013 48 89 01         mov QWORD PTR [rcx], rax               
  00016 4d 0f 47 c8      cmova r9, r8                           
  0001a 4c 89 0a         mov QWORD PTR [rdx], r9                
  0001d c3               ret                                    
*/
// "MINMAX" variant #1 (8 instructions, but with one CMP), GCC 11.2.1 -O3: ! Note: GCC is so smart, it sees 'M14_swapconditional1' and 'M14_swapconditional2' as identical !
/*
M14_swapconditional1:
.LFB198:
	.cfi_startproc
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	movq	%rdx, %rcx
	cmovbe	%rax, %rcx
	cmovb	%rdx, %rax
	movq	%rcx, (%rdi)
	movq	%rax, (%rsi)
	ret
*/

void M14_swapconditional2(uint64_t *a, uint64_t *b) { uint64_t aOLD = *a; uint64_t bOLD = *b; *a = MINKazeSO(aOLD,bOLD); *b = MAXKazeSO(aOLD,bOLD); }
/*
;;; void M14_swapconditional2(uint64_t *a, uint64_t *b) { uint64_t aOLD = *a; uint64_t bOLD = *b; *a = MINKazeSO(aOLD,bOLD); *b = MAXKazeSO(aOLD,bOLD); }
  00000 33 c0            xor eax, eax                           
  00002 4c 8b 11         mov r10, QWORD PTR [rcx]               
  00005 4d 89 d1         mov r9, r10                            
  00008 4c 8b 02         mov r8, QWORD PTR [rdx]                
  0000b 4d 3b d0         cmp r10, r8                            
  0000e 0f 92 c0         setb al                                
  00011 4d 33 c8         xor r9, r8                             
  00014 f7 d8            neg eax                                
  00016 48 63 c0         movsxd rax, eax                        
  00019 4c 23 c8         and r9, rax                            
  0001c 4d 33 c1         xor r8, r9                             
  0001f 4d 33 d1         xor r10, r9                            
  00022 4c 89 01         mov QWORD PTR [rcx], r8                
  00025 4c 89 12         mov QWORD PTR [rdx], r10               
  00028 c3               ret                                    
*/
// "MINMAX" variant #2 (8 instructions, but with one CMP), GCC 11.2.1 -O3: ! Note: GCC is so smart, it sees 'M14_swapconditional1' and 'M14_swapconditional2' as identical !
/*
M14_swapconditional2:
.LFB237:
	.cfi_startproc
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	cmpq	%rdx, %rax
	movq	%rdx, %rcx
	cmovbe	%rax, %rcx
	cmovb	%rdx, %rax
	movq	%rcx, (%rdi)
	movq	%rax, (%rsi)
	ret
*/
void M14_SwapConditional_ifXbY_BUGGY(int64_t X, int64_t Y, uint64_t *a, uint64_t *b) { int64_t XYsgnd = X-Y; int64_t ABsgnd= *a-*b; ABsgnd = ABsgnd&(XYsgnd >> 63); *a = *a-ABsgnd; *b = *b+ABsgnd; } // if X<Y then swap
/*
;;; void M14_SwapConditional_ifXbY_BUGGY(int64_t X, int64_t Y, uint64_t *a, uint64_t *b) { int64_t XYsgnd = X-Y; int64_t ABsgnd= *a-*b; ABsgnd = ABsgnd&(XYsgnd >> 63); *a = *a-ABsgnd; *b = *b+ABsgnd; } // if X<Y then swap
  00000 48 2b ca         sub rcx, rdx                           
  00003 4d 8b 11         mov r10, QWORD PTR [r9]                
  00006 49 f7 da         neg r10                                
  00009 49 8b 00         mov rax, QWORD PTR [r8]                
  0000c 4c 03 d0         add r10, rax                           
  0000f 48 c1 f9 3f      sar rcx, 63                            
  00013 4c 23 d1         and r10, rcx                           
  00016 49 2b c2         sub rax, r10                           
  00019 49 89 00         mov QWORD PTR [r8], rax                
  0001c 4d 01 11         add QWORD PTR [r9], r10                
  0001f c3               ret                                    
*/
void M14_swapConditionalXY_Akkodah(uint64_t X, uint64_t Y, uint64_t *a, uint64_t *b) { int64_t XYsgnd = -(X<Y); int64_t ABsgnd= *a-*b; ABsgnd = ABsgnd&XYsgnd; *a = *a-ABsgnd; *b = *b+ABsgnd; } // if X<Y then swap
/*
;;; void M14_swapConditionalXY_Akkodah(uint64_t X, uint64_t Y, uint64_t *a, uint64_t *b) { int64_t XYsgnd = -(X<Y); int64_t ABsgnd= *a-*b; ABsgnd = ABsgnd&XYsgnd; *a = *a-ABsgnd; *b = *b+ABsgnd; } // if X<Y then swap
  00000 4d 89 ca         mov r10, r9                            
  00003 45 33 db         xor r11d, r11d                         
  00006 48 3b ca         cmp rcx, rdx                           
  00009 4d 8b 08         mov r9, QWORD PTR [r8]                 
  0000c 41 0f 92 c3      setb r11b                              
  00010 49 8b 02         mov rax, QWORD PTR [r10]               
  00013 41 f7 db         neg r11d                               
  00016 48 f7 d8         neg rax                                
  00019 4d 63 db         movsxd r11, r11d                       
  0001c 49 03 c1         add rax, r9                            
  0001f 49 23 c3         and rax, r11                           
  00022 4c 2b c8         sub r9, rax                            
  00025 4d 89 08         mov QWORD PTR [r8], r9                 
  00028 49 01 02         add QWORD PTR [r10], rax               
  0002b c3               ret                                    
*/
void Quicksort_QB64_v14(uint64_t QWORDS[], uint64_t NumOfEle) {
	uint64_t* Stack[M14_StackEntries];
	uint64_t* Left = QWORDS;
	uint64_t* Right = &QWORDS[NumOfEle-1];
	uint64_t* TheMiddleOfMiddle;
	uint64_t* LeftBackup = Left;
	uint64_t* RightBackup = Right;
	uint64_t *Indx, *Jndx, *PL, *PR;
	uint64_t StackPtr = 0;
	int StackNotOverflow;
	register uint64_t Temporary;
	register uint64_t x0,x1,x2,x3,x4,x5,x6,x7,x8;
	int o0,o1,o2,o3,o4,o5,o6,o7,o8;
	uint64_t Pivot;
	int64_t Stefan_Edelkamp_Armin_Weiss;
	int64_t Stefan_Edelkamp_Armin_Weiss_MASK, Stefan_Edelkamp_Armin_Weiss_MASKm;
	StackPtr++; Stack[StackPtr] = Left; // M14_StackEntries minimum is 3 i.e. Stack[0]=unused,Stack[1],Stack[2] i.e. one entry/pair
	StackPtr++; Stack[StackPtr] = Right;
	do {
		Right = Stack[StackPtr];
		Left = Stack[StackPtr - 1];
		StackPtr = StackPtr - 2;
		for(;(M14_InsertionsortTHRESHOLD < Right-Left);) { // if not 1<Right-Left then Right=Left (i.e. 0), or adjacent (i.e. 1) ... or Left>Right
			switch (Right-Left) { // The name of the game "jmp rax"
/*
				case 1:	// sorting 2 elements, thanks to Rex Kerr
					//M14_swapconditional1(&QWORDS[Left], &QWORDS[Right]); 
					x0 = *(Left+0);
					x1 = *(Left+1);
					o0 = (x0>x1);
					o1 = (0+1)-(o0);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					goto DirtyBypass; //break;
*/
// 11 instructions!
/*
..1.200_0.TAG.01.0.200::
.B60.37::                       
  00e52 48 8b 1a         mov rbx, QWORD PTR [rdx]               
  00e55 b8 01 00 00 00   mov eax, 1                             
  00e5a 48 8b 72 08      mov rsi, QWORD PTR [8+rdx]             
  00e5e 33 ed            xor ebp, ebp                           
  00e60 48 3b de         cmp rbx, rsi                           
  00e63 48 0f 47 e8      cmova rbp, rax                         
  00e67 48 c1 e5 03      shl rbp, 3                             
  00e6b 48 89 1c 2a      mov QWORD PTR [rdx+rbp], rbx           
  00e6f 48 2b d5         sub rdx, rbp                           
  00e72 48 89 72 08      mov QWORD PTR [8+rdx], rsi             
  00e76 e9 0a f3 ff ff   jmp .B60.19 
*/
/*
				case 2: // sorting 3 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					o0 = (x0>x1)+(x0>x2);
					o1 = (x1>=x0)+(x1>x2);
					o2 = (0+1+2)-(o0+o1);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					goto DirtyBypass; //break;
*/
// 23 instructions!
/*
..1.200_0.TAG.02.0.200::
.B60.35::                       
  00e09 48 8b 3a         mov rdi, QWORD PTR [rdx]               
  00e0c 33 db            xor ebx, ebx                           
  00e0e 4c 8b 42 08      mov r8, QWORD PTR [8+rdx]              
  00e12 49 3b f8         cmp rdi, r8                            
  00e15 4c 8b 4a 10      mov r9, QWORD PTR [16+rdx]             
  00e19 0f 97 c3         seta bl                                
  00e1c 33 c0            xor eax, eax                           
  00e1e 49 3b f9         cmp rdi, r9                            
  00e21 0f 97 c0         seta al                                
  00e24 33 f6            xor esi, esi                           
  00e26 33 ed            xor ebp, ebp                           
  00e28 4c 3b c7         cmp r8, rdi                            
  00e2b 40 0f 93 c6      setae sil                              
  00e2f 4d 3b c1         cmp r8, r9                             
  00e32 40 0f 97 c5      seta bpl                               
  00e36 03 d8            add ebx, eax                           
  00e38 03 f5            add esi, ebp                           
  00e3a 48 89 3c da      mov QWORD PTR [rdx+rbx*8], rdi         
  00e3e 48 03 de         add rbx, rsi                           
  00e41 48 f7 db         neg rbx                                
  00e44 4c 89 04 f2      mov QWORD PTR [rdx+rsi*8], r8          
  00e48 4c 89 4c da 18   mov QWORD PTR [24+rdx+rbx*8], r9       
  00e4d e9 33 f3 ff ff   jmp .B60.19 
*/
/*
				case 3: // sorting 4 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					o0 = (x0>x1)+(x0>x2)+(x0>x3);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3);
					o3 = (0+1+2+3)-(o0+o1+o2);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					goto DirtyBypass; //break;
				case 4: // sorting 5 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					x4 = *(Left+4);
					o0 = (x0>x1)+(x0>x2)+(x0>x3)+(x0>x4);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3)+(x1>x4);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3)+(x2>x4);
					o3 = (x3>=x0)+(x3>=x1)+(x3>=x2)+(x3>x4);
					o4 = (0+1+2+3+4)-(o0+o1+o2+o3);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					*(Left+o4)=x4;
					goto DirtyBypass; //break;
				case 5: // sorting 6 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					x4 = *(Left+4);
					x5 = *(Left+5);
					o0 = (x0>x1)+(x0>x2)+(x0>x3)+(x0>x4)+(x0>x5);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3)+(x1>x4)+(x1>x5);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3)+(x2>x4)+(x2>x5);
					o3 = (x3>=x0)+(x3>=x1)+(x3>=x2)+(x3>x4)+(x3>x5);
					o4 = (x4>=x0)+(x4>=x1)+(x4>=x2)+(x4>=x3)+(x4>x5);
					o5 = (0+1+2+3+4+5)-(o0+o1+o2+o3+o4);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					*(Left+o4)=x4;
					*(Left+o5)=x5;
					goto DirtyBypass; //break;
				case 6: // sorting 7 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					x4 = *(Left+4);
					x5 = *(Left+5);
					x6 = *(Left+6);
					o0 = (x0>x1)+(x0>x2)+(x0>x3)+(x0>x4)+(x0>x5)+(x0>x6);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3)+(x1>x4)+(x1>x5)+(x1>x6);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3)+(x2>x4)+(x2>x5)+(x2>x6);
					o3 = (x3>=x0)+(x3>=x1)+(x3>=x2)+(x3>x4)+(x3>x5)+(x3>x6);
					o4 = (x4>=x0)+(x4>=x1)+(x4>=x2)+(x4>=x3)+(x4>x5)+(x4>x6);
					o5 = (x5>=x0)+(x5>=x1)+(x5>=x2)+(x5>=x3)+(x5>=x4)+(x5>x6);
					o6 = (0+1+2+3+4+5+6)-(o0+o1+o2+o3+o4+o5);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					*(Left+o4)=x4;
					*(Left+o5)=x5;
					*(Left+o6)=x6;
					goto DirtyBypass; //break;
*/
#ifdef ScandumADJACENT
				//case 13: // sorting 14 elements
					//M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8)); M14_swapconditional1adjacent((Left+8),(Left+9)); M14_swapconditional1adjacent((Left+9),(Left+10)); M14_swapconditional1adjacent((Left+10),(Left+11)); M14_swapconditional1adjacent((Left+11),(Left+12)); M14_swapconditional1adjacent((Left+12),(Left+13));
				case 12: // sorting 13 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8)); M14_swapconditional1adjacent((Left+8),(Left+9)); M14_swapconditional1adjacent((Left+9),(Left+10)); M14_swapconditional1adjacent((Left+10),(Left+11)); M14_swapconditional1adjacent((Left+11),(Left+12));
				case 11: // sorting 12 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8)); M14_swapconditional1adjacent((Left+8),(Left+9)); M14_swapconditional1adjacent((Left+9),(Left+10)); M14_swapconditional1adjacent((Left+10),(Left+11));
				case 10: // sorting 11 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8)); M14_swapconditional1adjacent((Left+8),(Left+9)); M14_swapconditional1adjacent((Left+9),(Left+10));
				case 9: // sorting 10 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8)); M14_swapconditional1adjacent((Left+8),(Left+9));
				case 8: // sorting 9 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7)); M14_swapconditional1adjacent((Left+7),(Left+8));
				case 7: // sorting 8 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6)); M14_swapconditional1adjacent((Left+6),(Left+7));
				case 6: // sorting 7 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5)); M14_swapconditional1adjacent((Left+5),(Left+6));
				case 5: // sorting 6 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4)); M14_swapconditional1adjacent((Left+4),(Left+5));
				case 4: // sorting 5 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3)); M14_swapconditional1adjacent((Left+3),(Left+4));
				case 3: // sorting 4 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2)); M14_swapconditional1adjacent((Left+2),(Left+3));
				case 2: // sorting 3 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2));
				case 1: // sorting 2 elements
					M14_swapconditional1adjacent((Left+0),(Left+1));
#else
				//case 13: // sorting 14 elements
					//M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8)); M14_swapconditional1((Left+8),(Left+9)); M14_swapconditional1((Left+9),(Left+10)); M14_swapconditional1((Left+10),(Left+11)); M14_swapconditional1((Left+11),(Left+12)); M14_swapconditional1((Left+12),(Left+13));
				case 12: // sorting 13 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8)); M14_swapconditional1((Left+8),(Left+9)); M14_swapconditional1((Left+9),(Left+10)); M14_swapconditional1((Left+10),(Left+11)); M14_swapconditional1((Left+11),(Left+12));
				case 11: // sorting 12 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8)); M14_swapconditional1((Left+8),(Left+9)); M14_swapconditional1((Left+9),(Left+10)); M14_swapconditional1((Left+10),(Left+11));
				case 10: // sorting 11 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8)); M14_swapconditional1((Left+8),(Left+9)); M14_swapconditional1((Left+9),(Left+10));
				case 9: // sorting 10 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8)); M14_swapconditional1((Left+8),(Left+9));
				case 8: // sorting 9 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7)); M14_swapconditional1((Left+7),(Left+8));
				case 7: // sorting 8 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6)); M14_swapconditional1((Left+6),(Left+7));
				case 6: // sorting 7 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5)); M14_swapconditional1((Left+5),(Left+6));
				case 5: // sorting 6 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4)); M14_swapconditional1((Left+4),(Left+5));
				case 4: // sorting 5 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3)); M14_swapconditional1((Left+3),(Left+4));
				case 3: // sorting 4 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2)); M14_swapconditional1((Left+2),(Left+3));
				case 2: // sorting 3 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2));
/*
..1.192_0.TAG.02.0.192::
.B57.45::                       
  00ad7 48 8b 75 00      mov rsi, QWORD PTR [rbp]               
  00adb 48 8b 55 08      mov rdx, QWORD PTR [8+rbp]             
  00adf 48 3b f2         cmp rsi, rdx                           
  00ae2 48 89 d0         mov rax, rdx                           
  00ae5 48 0f 42 c6      cmovb rax, rsi                         
  00ae9 48 3b d6         cmp rdx, rsi                           
  00aec 48 8b 5d 10      mov rbx, QWORD PTR [16+rbp]            
  00af0 48 89 d9         mov rcx, rbx                           
  00af3 48 0f 47 f2      cmova rsi, rdx                         
  00af7 48 3b f3         cmp rsi, rbx                           
  00afa 48 89 45 00      mov QWORD PTR [rbp], rax               
  00afe 48 0f 42 ce      cmovb rcx, rsi                         
  00b02 48 3b de         cmp rbx, rsi                           
  00b05 48 89 4d 08      mov QWORD PTR [8+rbp], rcx             
  00b09 48 0f 47 f3      cmova rsi, rbx                         
  00b0d 48 89 75 10      mov QWORD PTR [16+rbp], rsi            
*/
				case 1: // sorting 2 elements
					M14_swapconditional1((Left+0),(Left+1));
/*
..1.192_0.TAG.01.0.192::
.B57.47::                       
  00b11 48 8b 4d 00      mov rcx, QWORD PTR [rbp]               
  00b15 48 8b 55 08      mov rdx, QWORD PTR [8+rbp]             
  00b19 48 3b ca         cmp rcx, rdx                           
  00b1c 48 89 d0         mov rax, rdx                           
  00b1f 48 0f 42 c1      cmovb rax, rcx                         
  00b23 48 3b d1         cmp rdx, rcx                           
  00b26 48 89 45 00      mov QWORD PTR [rbp], rax               
  00b2a 48 0f 47 ca      cmova rcx, rdx                         
  00b2e 48 89 4d 08      mov QWORD PTR [8+rbp], rcx             
*/
#endif
					goto DirtyBypass; //break;
/*
				case 7: // sorting 8 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					x4 = *(Left+4);
					x5 = *(Left+5);
					x6 = *(Left+6);
					x7 = *(Left+7);
					o0 = (x0>x1)+(x0>x2)+(x0>x3)+(x0>x4)+(x0>x5)+(x0>x6)+(x0>x7);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3)+(x1>x4)+(x1>x5)+(x1>x6)+(x1>x7);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3)+(x2>x4)+(x2>x5)+(x2>x6)+(x2>x7);
					o3 = (x3>=x0)+(x3>=x1)+(x3>=x2)+(x3>x4)+(x3>x5)+(x3>x6)+(x3>x7);
					o4 = (x4>=x0)+(x4>=x1)+(x4>=x2)+(x4>=x3)+(x4>x5)+(x4>x6)+(x4>x7);
					o5 = (x5>=x0)+(x5>=x1)+(x5>=x2)+(x5>=x3)+(x5>=x4)+(x5>x6)+(x5>x7);
					o6 = (x6>=x0)+(x6>=x1)+(x6>=x2)+(x6>=x3)+(x6>=x4)+(x6>=x5)+(x6>x7);
					o7 = (0+1+2+3+4+5+6+7)-(o0+o1+o2+o3+o4+o5+o6);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					*(Left+o4)=x4;
					*(Left+o5)=x5;
					*(Left+o6)=x6;
					*(Left+o7)=x7;
					goto DirtyBypass; //break;
				case 8: // sorting 9 elements
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					x3 = *(Left+3);
					x4 = *(Left+4);
					x5 = *(Left+5);
					x6 = *(Left+6);
					x7 = *(Left+7);
					x8 = *(Left+8);
					o0 = (x0>x1)+(x0>x2)+(x0>x3)+(x0>x4)+(x0>x5)+(x0>x6)+(x0>x7)+(x0>x8);
					o1 = (x1>=x0)+(x1>x2)+(x1>x3)+(x1>x4)+(x1>x5)+(x1>x6)+(x1>x7)+(x1>x8);
					o2 = (x2>=x0)+(x2>=x1)+(x2>x3)+(x2>x4)+(x2>x5)+(x2>x6)+(x2>x7)+(x2>x8);
					o3 = (x3>=x0)+(x3>=x1)+(x3>=x2)+(x3>x4)+(x3>x5)+(x3>x6)+(x3>x7)+(x3>x8);
					o4 = (x4>=x0)+(x4>=x1)+(x4>=x2)+(x4>=x3)+(x4>x5)+(x4>x6)+(x4>x7)+(x4>x8);
					o5 = (x5>=x0)+(x5>=x1)+(x5>=x2)+(x5>=x3)+(x5>=x4)+(x5>x6)+(x5>x7)+(x5>x8);
					o6 = (x6>=x0)+(x6>=x1)+(x6>=x2)+(x6>=x3)+(x6>=x4)+(x6>=x5)+(x6>x7)+(x6>x8);
					o7 = (x7>=x0)+(x7>=x1)+(x7>=x2)+(x7>=x3)+(x7>=x4)+(x7>=x5)+(x7>=x6)+(x7>x8);
					o8 = (0+1+2+3+4+5+6+7+8)-(o0+o1+o2+o3+o4+o5+o6+o7);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
					*(Left+o3)=x3;
					*(Left+o4)=x4;
					*(Left+o5)=x5;
					*(Left+o6)=x6;
					*(Left+o7)=x7;
					*(Left+o8)=x8;
					goto DirtyBypass; //break;
*/
// 289 instructions!
/*
..1.200_0.TAG.08.0.200::
.B60.23::                       
  001c8 48 89 8c 24 a8 
        32 02 00         mov QWORD PTR [144040+rsp], rcx        
  001d0 33 ed            xor ebp, ebp                           
  001d2 48 8b 0a         mov rcx, QWORD PTR [rdx]               
  001d5 45 33 d2         xor r10d, r10d                         
  001d8 48 8b 7a 18      mov rdi, QWORD PTR [24+rdx]            
  001dc 48 3b cf         cmp rcx, rdi                           
  001df 4c 8b 5a 20      mov r11, QWORD PTR [32+rdx]            
  001e3 40 0f 97 c5      seta bpl                               
  001e7 45 33 ed         xor r13d, r13d                         
  001ea 49 3b cb         cmp rcx, r11                           
  001ed 4c 8b 4a 28      mov r9, QWORD PTR [40+rdx]             
  001f1 41 0f 97 c2      seta r10b                              
  001f5 45 33 f6         xor r14d, r14d                         
  001f8 49 3b c9         cmp rcx, r9                            
  001fb 4c 8b 62 30      mov r12, QWORD PTR [48+rdx]            
  001ff 41 0f 97 c5      seta r13b                              
  00203 45 33 ff         xor r15d, r15d                         
  00206 49 3b cc         cmp rcx, r12                           
  00209 48 8b 5a 38      mov rbx, QWORD PTR [56+rdx]            
  0020d 41 0f 97 c6      seta r14b                              
  00211 41 03 ea         add ebp, r10d                          
  00214 45 03 ee         add r13d, r14d                         
  00217 45 33 f6         xor r14d, r14d                         
  0021a 41 03 ed         add ebp, r13d                          
  0021d 45 33 ed         xor r13d, r13d                         
  00220 48 3b cb         cmp rcx, rbx                           
  00223 48 8b 42 40      mov rax, QWORD PTR [64+rdx]            
  00227 41 0f 97 c5      seta r13b                              
  0022b 45 33 d2         xor r10d, r10d                         
  0022e 48 3b c8         cmp rcx, rax                           
  00231 48 8b 72 08      mov rsi, QWORD PTR [8+rdx]             
  00235 41 0f 97 c7      seta r15b                              
  00239 48 3b ce         cmp rcx, rsi                           
  0023c 4c 8b 42 10      mov r8, QWORD PTR [16+rdx]             
  00240 41 0f 97 c6      seta r14b                              
  00244 49 3b c8         cmp rcx, r8                            
  00247 48 89 84 24 b0 
        32 02 00         mov QWORD PTR [144048+rsp], rax        
  0024f 41 0f 97 c2      seta r10b                              
  00253 45 03 ef         add r13d, r15d                         
  00256 45 03 f2         add r14d, r10d                         
  00259 45 33 d2         xor r10d, r10d                         
  0025c 48 3b f1         cmp rsi, rcx                           
  0025f 41 0f 93 c2      setae r10b                             
  00263 45 33 ff         xor r15d, r15d                         
  00266 48 3b f7         cmp rsi, rdi                           
  00269 41 0f 97 c7      seta r15b                              
  0026d 45 03 ee         add r13d, r14d                         
  00270 41 03 ed         add ebp, r13d                          
  00273 45 33 ed         xor r13d, r13d                         
  00276 49 3b f3         cmp rsi, r11                           
  00279 41 0f 97 c5      seta r13b                              
  0027d 45 33 f6         xor r14d, r14d                         
  00280 49 3b f1         cmp rsi, r9                            
  00283 41 0f 97 c6      seta r14b                              
  00287 45 03 d7         add r10d, r15d                         
  0028a 45 33 ff         xor r15d, r15d                         
  0028d 49 3b f4         cmp rsi, r12                           
  00290 41 0f 97 c7      seta r15b                              
  00294 45 03 ee         add r13d, r14d                         
  00297 45 33 f6         xor r14d, r14d                         
  0029a 48 3b f3         cmp rsi, rbx                           
  0029d 48 89 0c ea      mov QWORD PTR [rdx+rbp*8], rcx         
  002a1 41 0f 97 c6      seta r14b                              
  002a5 45 03 d5         add r10d, r13d                         
  002a8 45 03 fe         add r15d, r14d                         
  002ab 45 33 f6         xor r14d, r14d                         
  002ae 48 3b f0         cmp rsi, rax                           
  002b1 41 0f 97 c6      seta r14b                              
  002b5 45 33 ed         xor r13d, r13d                         
  002b8 49 3b f0         cmp rsi, r8                            
  002bb 41 0f 97 c5      seta r13b                              
  002bf 45 03 f5         add r14d, r13d                         
  002c2 45 33 ed         xor r13d, r13d                         
  002c5 45 03 fe         add r15d, r14d                         
  002c8 45 33 f6         xor r14d, r14d                         
  002cb 4c 3b c1         cmp r8, rcx                            
  002ce 41 0f 93 c6      setae r14b                             
  002d2 4c 3b c6         cmp r8, rsi                            
  002d5 41 0f 93 c5      setae r13b                             
  002d9 45 03 d7         add r10d, r15d                         
  002dc 4c 3b c7         cmp r8, rdi                            
  002df 4c 89 94 24 b8 
        32 02 00         mov QWORD PTR [144056+rsp], r10        
  002e7 41 ba 00 00 00 
        00               mov r10d, 0                            
  002ed 41 0f 97 c2      seta r10b                              
  002f1 45 33 ff         xor r15d, r15d                         
  002f4 4d 3b c3         cmp r8, r11                            
  002f7 41 0f 97 c7      seta r15b                              
  002fb 45 03 f5         add r14d, r13d                         
  002fe 45 03 d7         add r10d, r15d                         
  00301 45 33 ed         xor r13d, r13d                         
  00304 45 03 f2         add r14d, r10d                         
  00307 45 33 d2         xor r10d, r10d                         
  0030a 4d 3b c1         cmp r8, r9                             
  0030d 41 0f 97 c2      seta r10b                              
  00311 45 33 ff         xor r15d, r15d                         
  00314 4d 3b c4         cmp r8, r12                            
  00317 41 0f 97 c5      seta r13b                              
  0031b 45 03 d5         add r10d, r13d                         
  0031e 45 33 ed         xor r13d, r13d                         
  00321 4c 3b c3         cmp r8, rbx                            
  00324 41 0f 97 c5      seta r13b                              
  00328 4c 3b c0         cmp r8, rax                            
  0032b 41 0f 97 c7      seta r15b                              
  0032f 45 03 ef         add r13d, r15d                         
  00332 45 33 ff         xor r15d, r15d                         
  00335 45 03 d5         add r10d, r13d                         
  00338 45 33 ed         xor r13d, r13d                         
  0033b 49 3b fb         cmp rdi, r11                           
  0033e 41 0f 97 c5      seta r13b                              
  00342 45 03 f2         add r14d, r10d                         
  00345 45 33 d2         xor r10d, r10d                         
  00348 49 3b f9         cmp rdi, r9                            
  0034b 41 0f 97 c2      seta r10b                              
  0034f 45 03 ea         add r13d, r10d                         
  00352 45 33 d2         xor r10d, r10d                         
  00355 49 3b fc         cmp rdi, r12                           
  00358 41 0f 97 c2      seta r10b                              
  0035c 48 3b fb         cmp rdi, rbx                           
  0035f 4c 89 b4 24 c0 
        32 02 00         mov QWORD PTR [144064+rsp], r14        
  00367 41 0f 97 c7      seta r15b                              
  0036b 45 33 f6         xor r14d, r14d                         
  0036e 48 3b f8         cmp rdi, rax                           
  00371 41 0f 97 c6      seta r14b                              
  00375 45 03 d7         add r10d, r15d                         
  00378 45 33 ff         xor r15d, r15d                         
  0037b 48 3b f9         cmp rdi, rcx                           
  0037e 41 0f 93 c7      setae r15b                             
  00382 45 03 ea         add r13d, r10d                         
  00385 45 03 f7         add r14d, r15d                         
  00388 45 33 ff         xor r15d, r15d                         
  0038b 48 3b fe         cmp rdi, rsi                           
  0038e 41 0f 93 c7      setae r15b                             
  00392 45 33 d2         xor r10d, r10d                         
  00395 49 3b f8         cmp rdi, r8                            
  00398 41 0f 93 c2      setae r10b                             
  0039c 45 03 fa         add r15d, r10d                         
  0039f 45 33 d2         xor r10d, r10d                         
  003a2 4c 3b df         cmp r11, rdi                           
  003a5 41 0f 93 c2      setae r10b                             
  003a9 45 03 f7         add r14d, r15d                         
  003ac 45 03 ee         add r13d, r14d                         
  003af 45 33 f6         xor r14d, r14d                         
  003b2 4d 3b d9         cmp r11, r9                            
  003b5 41 0f 97 c6      seta r14b                              
  003b9 45 33 ff         xor r15d, r15d                         
  003bc 45 03 d6         add r10d, r14d                         
  003bf 45 33 f6         xor r14d, r14d                         
  003c2 4d 3b dc         cmp r11, r12                           
  003c5 41 0f 97 c6      seta r14b                              
  003c9 4c 3b db         cmp r11, rbx                           
  003cc 41 0f 97 c7      seta r15b                              
  003d0 45 03 f7         add r14d, r15d                         
  003d3 45 33 ff         xor r15d, r15d                         
  003d6 4c 3b d8         cmp r11, rax                           
  003d9 41 0f 97 c7      seta r15b                              
  003dd 4c 3b d9         cmp r11, rcx                           
  003e0 4c 89 ac 24 c8 
        32 02 00         mov QWORD PTR [144072+rsp], r13        
  003e8 41 bd 00 00 00 
        00               mov r13d, 0                            
  003ee 41 0f 93 c5      setae r13b                             
  003f2 45 03 d6         add r10d, r14d                         
  003f5 45 03 fd         add r15d, r13d                         
  003f8 45 33 ed         xor r13d, r13d                         
  003fb 4c 3b de         cmp r11, rsi                           
  003fe 41 0f 93 c5      setae r13b                             
  00402 45 33 f6         xor r14d, r14d                         
  00405 4d 3b d8         cmp r11, r8                            
  00408 41 0f 93 c6      setae r14b                             
  0040c 45 03 ee         add r13d, r14d                         
  0040f 45 33 f6         xor r14d, r14d                         
  00412 45 03 fd         add r15d, r13d                         
  00415 45 33 ed         xor r13d, r13d                         
  00418 4c 3b cf         cmp r9, rdi                            
  0041b 41 0f 93 c5      setae r13b                             
  0041f 4d 3b cb         cmp r9, r11                            
  00422 41 0f 93 c6      setae r14b                             
  00426 45 03 d7         add r10d, r15d                         
  00429 4d 3b cc         cmp r9, r12                            
  0042c 4c 89 94 24 d0 
        32 02 00         mov QWORD PTR [144080+rsp], r10        
  00434 41 ba 00 00 00 
        00               mov r10d, 0                            
  0043a 41 0f 97 c2      seta r10b                              
  0043e 45 33 ff         xor r15d, r15d                         
  00441 4c 3b cb         cmp r9, rbx                            
  00444 41 0f 97 c7      seta r15b                              
  00448 45 03 ee         add r13d, r14d                         
  0044b 45 33 f6         xor r14d, r14d                         
  0044e 4c 3b c8         cmp r9, rax                            
  00451 41 0f 97 c6      seta r14b                              
  00455 45 03 d7         add r10d, r15d                         
  00458 45 33 ff         xor r15d, r15d                         
  0045b 4c 3b c9         cmp r9, rcx                            
  0045e 41 0f 93 c7      setae r15b                             
  00462 45 03 ea         add r13d, r10d                         
  00465 45 03 f7         add r14d, r15d                         
  00468 45 33 ff         xor r15d, r15d                         
  0046b 4c 3b ce         cmp r9, rsi                            
  0046e 41 0f 93 c7      setae r15b                             
  00472 45 33 d2         xor r10d, r10d                         
  00475 4d 3b c8         cmp r9, r8                             
  00478 41 0f 93 c2      setae r10b                             
  0047c 45 03 fa         add r15d, r10d                         
  0047f 45 33 d2         xor r10d, r10d                         
  00482 4c 3b e7         cmp r12, rdi                           
  00485 41 0f 93 c2      setae r10b                             
  00489 45 03 f7         add r14d, r15d                         
  0048c 45 03 ee         add r13d, r14d                         
  0048f 45 33 f6         xor r14d, r14d                         
  00492 4d 3b e3         cmp r12, r11                           
  00495 41 0f 93 c6      setae r14b                             
  00499 45 33 ff         xor r15d, r15d                         
  0049c 4d 3b e1         cmp r12, r9                            
  0049f 41 0f 93 c7      setae r15b                             
  004a3 4c 3b e3         cmp r12, rbx                           
  004a6 4c 89 ac 24 d8 
        32 02 00         mov QWORD PTR [144088+rsp], r13        
  004ae 41 bd 00 00 00 
        00               mov r13d, 0                            
  004b4 41 0f 97 c5      seta r13b                              
  004b8 45 03 d6         add r10d, r14d                         
  004bb 45 03 fd         add r15d, r13d                         
  004be 45 33 ed         xor r13d, r13d                         
  004c1 4c 3b e0         cmp r12, rax                           
  004c4 41 0f 97 c5      seta r13b                              
  004c8 45 33 f6         xor r14d, r14d                         
  004cb 4c 3b e1         cmp r12, rcx                           
  004ce 41 0f 93 c6      setae r14b                             
  004d2 45 03 d7         add r10d, r15d                         
  004d5 45 03 ee         add r13d, r14d                         
  004d8 45 33 f6         xor r14d, r14d                         
  004db 4c 3b e6         cmp r12, rsi                           
  004de 41 0f 93 c6      setae r14b                             
  004e2 45 33 ff         xor r15d, r15d                         
  004e5 4d 3b e0         cmp r12, r8                            
  004e8 41 0f 93 c7      setae r15b                             
  004ec 45 03 f7         add r14d, r15d                         
  004ef 45 33 ff         xor r15d, r15d                         
  004f2 45 03 ee         add r13d, r14d                         
  004f5 45 33 f6         xor r14d, r14d                         
  004f8 48 3b df         cmp rbx, rdi                           
  004fb 41 0f 93 c6      setae r14b                             
  004ff 45 03 d5         add r10d, r13d                         
  00502 45 33 ed         xor r13d, r13d                         
  00505 49 3b db         cmp rbx, r11                           
  00508 41 0f 93 c5      setae r13b                             
  0050c 45 03 f5         add r14d, r13d                         
  0050f 45 33 ed         xor r13d, r13d                         
  00512 49 3b d9         cmp rbx, r9                            
  00515 41 0f 93 c5      setae r13b                             
  00519 49 3b dc         cmp rbx, r12                           
  0051c 41 0f 93 c7      setae r15b                             
  00520 45 03 ef         add r13d, r15d                         
  00523 45 33 ff         xor r15d, r15d                         
  00526 48 3b d8         cmp rbx, rax                           
  00529 41 0f 97 c7      seta r15b                              
  0052d 33 c0            xor eax, eax                           
  0052f 48 3b d9         cmp rbx, rcx                           
  00532 48 8b 8c 24 c0 
        32 02 00         mov rcx, QWORD PTR [144064+rsp]        
  0053a 0f 93 c0         setae al                               
  0053d 45 03 f5         add r14d, r13d                         
  00540 44 03 f8         add r15d, eax                          
  00543 33 c0            xor eax, eax                           
  00545 48 3b de         cmp rbx, rsi                           
  00548 0f 93 c0         setae al                               
  0054b 45 33 ed         xor r13d, r13d                         
  0054e 49 3b d8         cmp rbx, r8                            
  00551 41 0f 93 c5      setae r13b                             
  00555 41 03 c5         add eax, r13d                          
  00558 4c 8b ac 24 b8 
        32 02 00         mov r13, QWORD PTR [144056+rsp]        
  00560 44 03 f8         add r15d, eax                          
  00563 45 03 f7         add r14d, r15d                         
  00566 49 03 ed         add rbp, r13                           
  00569 4a 89 34 ea      mov QWORD PTR [rdx+r13*8], rsi         
  0056d 4c 89 04 ca      mov QWORD PTR [rdx+rcx*8], r8          
  00571 4c 8b 84 24 c8 
        32 02 00         mov r8, QWORD PTR [144072+rsp]         
  00579 49 03 c8         add rcx, r8                            
  0057c 48 8b b4 24 d0 
        32 02 00         mov rsi, QWORD PTR [144080+rsp]        
  00584 48 03 e9         add rbp, rcx                           
  00587 48 8b 8c 24 a8 
        32 02 00         mov rcx, QWORD PTR [144040+rsp]        
  0058f 4a 89 3c c2      mov QWORD PTR [rdx+r8*8], rdi          
  00593 4c 89 1c f2      mov QWORD PTR [rdx+rsi*8], r11         
  00597 4c 8b 9c 24 d8 
        32 02 00         mov r11, QWORD PTR [144088+rsp]        
  0059f 49 03 f3         add rsi, r11                           
  005a2 4e 89 0c da      mov QWORD PTR [rdx+r11*8], r9          
  005a6 4e 89 24 d2      mov QWORD PTR [rdx+r10*8], r12         
  005aa 4d 03 d6         add r10, r14                           
  005ad 49 03 f2         add rsi, r10                           
  005b0 48 03 ee         add rbp, rsi                           
  005b3 48 f7 dd         neg rbp                                
  005b6 4a 89 1c f2      mov QWORD PTR [rdx+r14*8], rbx         
  005ba 48 8b 9c 24 b0 
        32 02 00         mov rbx, QWORD PTR [144048+rsp]        
  005c2 48 89 9c ea 20 
        01 00 00         mov QWORD PTR [288+rdx+rbp*8], rbx     
  005ca e9 b6 fb ff ff   jmp .B60.19 
*/
				default:
			Jndx = Right;
// Open variants are: monad, dyad, [triad], tetrad, [pentad], hexad, [heptad], octad, [ennead/nonad], decad, [hendecad], dodecad.
// https://en.wiktionary.org/wiki/hendecad#Etymology
// Try median of HENDECAD(a set of eleven things):
//  - copying 4 QWORDS instead of one from (Left + ((Right-Left)>>2)
//  - copying 4 QWORDS instead of one from (Left + ((Right-Left)>>1)
//  - using the 3 QWORDS at 8th, 9th and 10th positions
// Taking the 6th element, that is:
//			PL = Left+5; // Left+1 for 2nd (0,1,2 positions) for TRIAD Median of 3
//			PR = Left+5; // Left+5 for 6th (0,1,2,3,4,5 positions) for HENDECAD Median of 11
			PL = Left+1;
			PR = Left+1;
			//TheMiddleOfMiddle = Left + ((Right-Left)>>2); // (4Left + Right - Left)/4; Caution: [TheMiddleOfMiddle+6] should be <= [Right] i.e. 6+(4Left + Right - Left)/4 <= Right or 4*6+(4Left + Right - Left) <= 4Right or 4*6 <= 3Right-3Left or (4*6)/3 <= Right-Left i.e. 8 <= Right-Left as a minimum condition to enter the 'for'.
			M14_swapUnconditional (Left + ((Right-Left)>>2), Left+0);
			M14_swapUnconditional (Left + ((Right-Left)>>1), Left+1);
#ifdef ScandumADJACENT
					// sorting 3 elements
					M14_swapconditional1adjacent((Left+0),(Left+1)); M14_swapconditional1adjacent((Left+1),(Left+2));
					M14_swapconditional1adjacent((Left+0),(Left+1));
/*
  00090 45 89 d5         mov r13d, r10d                         
  00093 4d 8b 71 08      mov r14, QWORD PTR [8+r9]              
  00097 4f 8b 3c d9      mov r15, QWORD PTR [r9+r11*8]          
  0009b 4f 89 34 d9      mov QWORD PTR [r9+r11*8], r14          
  0009f 45 89 d3         mov r11d, r10d                         
  000a2 4d 3b 39         cmp r15, QWORD PTR [r9]                
  000a5 4d 89 79 08      mov QWORD PTR [8+r9], r15              
  000a9 45 89 d7         mov r15d, r10d                         
  000ac 41 0f 93 c3      setae r11b                             
  000b0 41 0f 92 c5      setb r13b                              
  000b4 4f 8b 34 d9      mov r14, QWORD PTR [r9+r11*8]          
  000b8 4d 3b 71 10      cmp r14, QWORD PTR [16+r9]             
  000bc 4f 8b 2c e9      mov r13, QWORD PTR [r9+r13*8]          
  000c0 4d 89 71 08      mov QWORD PTR [8+r9], r14              
  000c4 45 89 d6         mov r14d, r10d                         
  000c7 41 0f 96 c7      setbe r15b                             
  000cb 41 0f 97 c6      seta r14b                              
  000cf 4d 89 29         mov QWORD PTR [r9], r13                
  000d2 4f 8b 5c f9 08   mov r11, QWORD PTR [8+r9+r15*8]        
  000d7 4f 8b 7c f1 08   mov r15, QWORD PTR [8+r9+r14*8]        
  000dc 4d 3b ef         cmp r13, r15                           
  000df 4d 89 59 10      mov QWORD PTR [16+r9], r11             
  000e3 45 89 d5         mov r13d, r10d                         
  000e6 45 89 d3         mov r11d, r10d                         
  000e9 41 0f 96 c5      setbe r13b                             
  000ed 41 0f 97 c3      seta r11b                              
  000f1 4d 89 79 08      mov QWORD PTR [8+r9], r15              
  000f5 4f 8b 2c e9      mov r13, QWORD PTR [r9+r13*8]          
  000f9 4f 8b 34 d9      mov r14, QWORD PTR [r9+r11*8]          
*/
#else
					// sorting 3 elements
					M14_swapconditional1((Left+0),(Left+1)); M14_swapconditional1((Left+1),(Left+2));
					M14_swapconditional1((Left+0),(Left+1));
/*
  00097 4c 89 f8         mov rax, r15                           
  0009a 4d 8b 32         mov r14, QWORD PTR [r10]               
  0009d 4d 3b f7         cmp r14, r15                           
  000a0 49 0f 42 c6      cmovb rax, r14                         
  000a4 4d 3b fe         cmp r15, r14                           
  000a7 4d 0f 47 f7      cmova r14, r15                         
  000ab 4d 8b 7a 10      mov r15, QWORD PTR [16+r10]            
  000af 4d 3b f7         cmp r14, r15                           
  000b2 4d 89 fb         mov r11, r15                           
  000b5 4d 0f 42 de      cmovb r11, r14                         
  000b9 4d 3b fe         cmp r15, r14                           
  000bc 4d 0f 47 f7      cmova r14, r15                         
  000c0 49 3b c3         cmp rax, r11                           
  000c3 4d 89 72 10      mov QWORD PTR [16+r10], r14            
  000c7 4d 89 de         mov r14, r11                           
  000ca 4c 0f 42 f0      cmovb r14, rax                         
  000ce 4c 3b d8         cmp r11, rax                           
  000d1 4d 89 32         mov QWORD PTR [r10], r14               
  000d4 49 0f 47 c3      cmova rax, r11                         
*/
#endif
//On i5-7200U, next fragment (Rex Kerr's rank sort) is faster than above Bubblesort?!
/*
					x0 = *(Left+0);
					x1 = *(Left+1);
					x2 = *(Left+2);
					o0 = (x0>x1)+(x0>x2);
					o1 = (x1>=x0)+(x1>x2);
					o2 = (0+1+2)-(o0+o1);
					*(Left+o0)=x0;
					*(Left+o1)=x1;
					*(Left+o2)=x2;
*/
			PL = PL - (*(Left+1)==*(Left+0));
			//PL = PL - (*(Left+2)==*(Left+1)); // trying to expand the Pivot Pool (i.e. PL..PR) is kinda not worth it, therefore commented
			//PL = PL - (*(Left+2)==*(Left+0)); // trying to expand the Pivot Pool (i.e. PL..PR) is kinda not worth it, therefore commented
/*
  000c9 45 33 c0         xor r8d, r8d                           
  000cc 48 8b 42 10      mov rax, QWORD PTR [16+rdx]            
  000d0 48 3b 42 08      cmp rax, QWORD PTR [8+rdx]             
  000d4 45 0f 44 f7      cmove r14d, r15d                       
  000d8 48 3b 02         cmp rax, QWORD PTR [rdx]               
  000db 45 0f 44 c7      cmove r8d, r15d                        
  000df 49 f7 de         neg r14                                
  000e2 4d 2b f0         sub r14, r8                            
*/
			//!(5-2)=0
			//!(2-5)=0
			//!(3-3)=1
			//PL = PL - !(*(Left+2)-*(Left+1)); // trying to expand the Pivot Pool (i.e. PL..PR) is kinda not worth it, therefore commented
			//PL = PL - !(*(Left+2)-*(Left+0)); // trying to expand the Pivot Pool (i.e. PL..PR) is kinda not worth it, therefore commented
/*
  000c9 45 33 c0         xor r8d, r8d                           
  000cc 48 8b 42 10      mov rax, QWORD PTR [16+rdx]            
  000d0 48 3b 42 08      cmp rax, QWORD PTR [8+rdx]             
  000d4 45 0f 44 f7      cmove r14d, r15d                       
  000d8 48 3b 02         cmp rax, QWORD PTR [rdx]               
  000db 45 0f 44 c7      cmove r8d, r15d                        
  000df 49 f7 de         neg r14                                
  000e2 4d 2b f0         sub r14, r8                            
*/

//Before: x0,x1,x2,x3,x4,x5,x6 = 7,1,2,4,0,3,3
//Before: o0,o1,o2,o3,o4,o5,o6 = 6 1 2 5 0 3 4
//After : s0,s1,s2,s3,s4,s5,s6 = 0,1,2,3,3,4,7
//PL,PR = 1D980050,1D980050 // 50-50=00 i.e. 0/8=0 or 7-7=0

//Before: x0,x1,x2,x3,x4,x5,x6 = 7,7,7,4,0,3,3
//Before: o0,o1,o2,o3,o4,o5,o6 = 4 5 6 3 0 1 2
//After : s0,s1,s2,s3,s4,s5,s6 = 0,3,3,4,7,7,7
//PL,PR = 1D980040,1D980050 // 50-40=10 i.e. 16/8=2 or 7-5=2

//Before: x0,x1,x2,x3,x4,x5,x6 = 7,7,7,7,7,7,7
//Before: o0,o1,o2,o3,o4,o5,o6 = 0 1 2 3 4 5 6
//After : s0,s1,s2,s3,s4,s5,s6 = 7,7,7,7,7,7,7
//PL,PR = 1D980020,1D980050 // 50-20=30 i.e. 48/8=6 or 7-1=6

			Pivot = *PR;
/*
; mark_description "Intel(R) C++ Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726";
; mark_description "-FAcs -O3 -FeQS_bench_r13_ICL15.0_64bit.exe -D_N_HIGH_PRIORITY";
; 19f-f4+6=177 bytes, 2/0 conditional/unconditional jumps; 53 instructions
; 'Magnetica' partitioning, mainloop rev.6-[
.B60.7::                        
  000f4 4c 8b 6d 08      mov r13, QWORD PTR [8+rbp]             
  000f8 4d 3b dd         cmp r11, r13                           
  000fb 41 89 fa         mov r10d, edi                          
  000fe 41 89 f8         mov r8d, edi                           
  00101 41 0f 97 c2      seta r10b                              
  00105 41 0f 92 c0      setb r8b                               
  00109 4d 2b d0         sub r10, r8                            
  0010c 4d 89 d0         mov r8, r10                            
  0010f 49 f7 da         neg r10                                
  00112 49 c1 f8 3f      sar r8, 63                             
  00116 49 c1 fa 3f      sar r10, 63                            
  0011a 4c 8b 36         mov r14, QWORD PTR [rsi]               
  0011d 4d 3b de         cmp r11, r14                           
  00120 73 0c            jae .B60.11 
.B60.9::                        
  00122 48 83 c6 f8      add rsi, -8                            
  00126 4c 8b 36         mov r14, QWORD PTR [rsi]               
  00129 4d 3b de         cmp r11, r14                           
  0012c 72 f4            jb .B60.9 
.B60.11::                       
  0012e 4d 89 c1         mov r9, r8                             
  00131 4d 89 ef         mov r15, r13                           
  00134 49 f7 d1         not r9                                 
  00137 4d 23 f0         and r14, r8                            
  0013a 4d 23 f9         and r15, r9                            
  0013d 4d 03 fe         add r15, r14                           
  00140 4c 89 7d 08      mov QWORD PTR [8+rbp], r15             
  00144 4d 89 c7         mov r15, r8                            
  00147 49 83 e0 01      and r8, 1                              
  0014b 48 83 c5 08      add rbp, 8                             
  0014f 49 c1 e0 03      shl r8, 3                              
  00153 4d 23 fd         and r15, r13                           
  00156 49 2b e8         sub rbp, r8                            
  00159 4d 23 ea         and r13, r10                           
  0015c 4c 8b 36         mov r14, QWORD PTR [rsi]               
  0015f 4d 23 f1         and r14, r9                            
  00162 4d 03 fe         add r15, r14                           
  00165 4d 89 d6         mov r14, r10                           
  00168 4c 89 3e         mov QWORD PTR [rsi], r15               
  0016b 49 f7 d6         not r14                                
  0016e 4d 8b 0c 24      mov r9, QWORD PTR [r12]                
  00172 49 2b f0         sub rsi, r8                            
  00175 4c 8b 45 00      mov r8, QWORD PTR [rbp]                
  00179 4d 23 ca         and r9, r10                            
  0017c 4d 23 c6         and r8, r14                            
  0017f 49 83 e2 01      and r10, 1                             
  00183 4d 03 c8         add r9, r8                             
  00186 4c 89 4d 00      mov QWORD PTR [rbp], r9                
  0018a 4d 8b 3c 24      mov r15, QWORD PTR [r12]               
  0018e 4d 23 fe         and r15, r14                           
  00191 4d 03 ef         add r13, r15                           
  00194 4d 89 2c 24      mov QWORD PTR [r12], r13               
  00198 4f 8d 24 d4      lea r12, QWORD PTR [r12+r10*8]         
  0019c 48 3b ee         cmp rbp, rsi                           
  0019f 0f 82 4f ff ff 
        ff               jb .B60.7 
; 'Magnetica' partitioning, mainloop rev.6-]
*/
// 'Magnetica' partitioning, mainloop rev.6-[ ! TOO SLOW !
//			for (;PR < Jndx;) {
//				PR = PR + 1;
//				Temporary=*PR;
//				Stefan_Edelkamp_Armin_Weiss = Scandum_UINT64v(Pivot, Temporary);
//				Stefan_Edelkamp_Armin_Weiss_MASK = (Stefan_Edelkamp_Armin_Weiss >> 63);
//				Stefan_Edelkamp_Armin_Weiss_MASKm = ((-Stefan_Edelkamp_Armin_Weiss) >> 63);
//					for (;Pivot < *Jndx;) {
//						Jndx = Jndx - 1;
//					}
//				//if (Stefan_Edelkamp_Armin_Weiss < 0) {	//]
//				//	M14_swapUnconditional (PR, Jndx);	//]-----+
//				//	Jndx = Jndx - 1;			//]	|
//				//	PR = PR - 1;				//]	|
//										//<-----/
//					*PR = ( *Jndx&Stefan_Edelkamp_Armin_Weiss_MASK ) + ( *PR&(~Stefan_Edelkamp_Armin_Weiss_MASK) );
//					*Jndx = ( Temporary&Stefan_Edelkamp_Armin_Weiss_MASK ) + ( *Jndx&(~Stefan_Edelkamp_Armin_Weiss_MASK) );
//					Jndx = Jndx - ( 1&Stefan_Edelkamp_Armin_Weiss_MASK );
//					PR = PR - ( 1&Stefan_Edelkamp_Armin_Weiss_MASK );
//				//} else if (Stefan_Edelkamp_Armin_Weiss > 0) {	//]
//				//	M14_swapUnconditional (PL, PR);		//]-----+
//				//	PL = PL + 1;				//]	|
//				//}						//]	|
//				//} else {					//<-----/
//					*PR = ( *PL&Stefan_Edelkamp_Armin_Weiss_MASKm ) + ( *PR&(~Stefan_Edelkamp_Armin_Weiss_MASKm) );
//					*PL = ( Temporary&Stefan_Edelkamp_Armin_Weiss_MASKm ) + ( *PL&(~Stefan_Edelkamp_Armin_Weiss_MASKm) );
//					PL = PL + ( 1&Stefan_Edelkamp_Armin_Weiss_MASKm );
//				//}
//			}
// 'Magnetica' partitioning, mainloop rev.6-] ! TOO SLOW !

// GCC 11.2.1 -O3:
//; 'Magnetica' partitioning, mainloop rev.5a2p_BYPASSSWAP:
/*
.L5100:
	movq	%rdi, (%r12)
	leaq	16(%rdx), %rbx
	addq	$8, %r12
	movq	%r8, 8(%rdx)
	movq	%rbp, %rdx
.L5085:
	movq	8(%rdx), %rdi
	cmpq	%rdx, %rsi
	jbe	.L5090
.L5089:
	leaq	8(%rdx), %rbp
	cmpq	%rdi, %r8
	ja	.L5100
	jb	.L5099
	leaq	16(%rdx), %rbx
	movq	%rbp, %rdx
	movq	8(%rdx), %rdi
	cmpq	%rdx, %rsi
	ja	.L5089
.L5090:
...
.L5088:
	subq	$8, %rsi
.L5099:
	movq	(%rsi), %rbx
	cmpq	%r8, %rbx
	ja	.L5088
	movq	%rbx, 8(%rdx)
	subq	$8, %rsi
	movq	%rbp, %rbx
	movq	%rdi, 8(%rsi)
	jmp	.L5085
*/
/*
; mark_description "Intel(R) C++ Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726";
; mark_description "-FAcs -O3 -FeQS_bench_r13_ICL15.0_64bit.exe -D_N_HIGH_PRIORITY";
; 13e-ff+2=65 bytes, 4/1 conditional/unconditional jumps; 22 instructions
; 'Magnetica' partitioning, mainloop rev.5a2p_BYPASSSWAP[
.B172.7::                       
  000ff 49 83 c1 08      add r9, 8                              
  00103 4d 8b 39         mov r15, QWORD PTR [r9]                
  00106 49 3b c7         cmp rax, r15                           
  00109 76 0c            jbe .B172.9 
.B172.8::                       
  0010b 4d 89 3b         mov QWORD PTR [r11], r15               
  0010e 49 83 c3 08      add r11, 8                             
  00112 49 89 01         mov QWORD PTR [r9], rax                
  00115 eb 24            jmp .B172.15 
.B172.9::                       
  00117 73 22            jae .B172.15 
.B172.10::                      
  00119 4d 8b 30         mov r14, QWORD PTR [r8]                
  0011c 49 3b c6         cmp rax, r14                           
  0011f 73 0c            jae .B172.14 
.B172.12::                      
  00121 49 83 c0 f8      add r8, -8                             
  00125 4d 8b 30         mov r14, QWORD PTR [r8]                
  00128 49 3b c6         cmp rax, r14                           
  0012b 72 f4            jb .B172.12 
.B172.14::                      
  0012d 4d 89 31         mov QWORD PTR [r9], r14                
  00130 49 83 c1 f8      add r9, -8                             
  00134 4d 89 38         mov QWORD PTR [r8], r15                
  00137 49 83 c0 f8      add r8, -8                             
.B172.15::                      
  0013b 4d 3b c8         cmp r9, r8                             
  0013e 72 bf            jb .B172.7 
; 'Magnetica' partitioning, mainloop rev.5a2p_BYPASSSWAP]
*/
/*
; mark_description "Intel(R) C++ Compiler XE for applications running on Intel(R) 64, Version 15.0.0.108 Build 20140726";
; mark_description "-FAcs -O3 -FeQS_bench_r13_ICL15.0_64bit.exe -D_N_HIGH_PRIORITY";
; dd-9b+2=68 bytes, 4/1 conditional/unconditional jumps; 23 instructions
; 'Magnetica' partitioning, mainloop rev.5a2p[
.B183.7::                       
  0009b 48 83 c0 08      add rax, 8                             
  0009f 4c 8b 00         mov r8, QWORD PTR [rax]                
  000a2 49 3b f0         cmp rsi, r8                            
  000a5 77 26            ja .B183.14 
.B183.8::                       
  000a7 73 31            jae .B183.15 
.B183.9::                       
  000a9 48 8b 2f         mov rbp, QWORD PTR [rdi]               
  000ac 48 3b f5         cmp rsi, rbp                           
  000af 73 0c            jae .B183.13 
.B183.11::                      
  000b1 48 83 c7 f8      add rdi, -8                            
  000b5 48 8b 2f         mov rbp, QWORD PTR [rdi]               
  000b8 48 3b f5         cmp rsi, rbp                           
  000bb 72 f4            jb .B183.11 
.B183.13::                      
  000bd 48 89 28         mov QWORD PTR [rax], rbp               
  000c0 48 83 c0 f8      add rax, -8                            
  000c4 4c 89 07         mov QWORD PTR [rdi], r8                
  000c7 48 83 c7 f8      add rdi, -8                            
  000cb eb 0d            jmp .B183.15 
.B183.14::                      
  000cd 48 8b 29         mov rbp, QWORD PTR [rcx]               
  000d0 4c 89 01         mov QWORD PTR [rcx], r8                
  000d3 48 83 c1 08      add rcx, 8                             
  000d7 48 89 28         mov QWORD PTR [rax], rbp               
.B183.15::                      
  000da 48 3b c7         cmp rax, rdi                           
  000dd 72 bc            jb .B183.7 
; 'Magnetica' partitioning, mainloop rev.5a2p]
*/
// 'Magnetica' partitioning, mainloop rev.5a2p_BYPASSSWAP[
			for (;PR < Jndx;) {
				PR = PR + 1;
				if (Pivot > *PR) { // *PL == Pivot
					//M14_swapUnconditional (PL, PR); // Dummy me, using Pivot instead of *PL saves... one 'MOV'	//]-----+
					//BYPASSSWAP:											//]	|
					*PL=*PR; *PR=Pivot;										//<-----/
					PL = PL + 1;
				} else if (Pivot < *PR) {
					for (;Pivot < *Jndx;) {
						Jndx = Jndx - 1;
					}
					//M14_SwapConditional_ifXbY_BUGGY((uint64_t)PR, (uint64_t)Jndx, PR, Jndx);	//] Slow! Therefore moving it outwith the loop, see Leftover:
					//Jndx = Jndx - 1;								//]-----+
					//PR = PR - 1;									//]	|
															//]<----/
					M14_swapUnconditional (PR, Jndx);	//] //CAUTION: Inhere, PR could be BIGGER than Jndx (i.e.  Jndx == PR-1), it needs Leftover:
					Jndx = Jndx - 1;			//]-----+
					PR = PR - 1;				//]	|
					//UNWIND (it doesn't need Leftover:):	//]<----/
/*
					if (PR > Jndx) {PR--; break;} // It means *Jndx == Pivot because Jndx == PR-1
					Temporary=*Jndx; // Temporary is LE i.e. LESS-or-EQUAL to Pivot
					*Jndx=*(PR);
					Jndx = Jndx - 1;
					//if (Pivot == Temporary) {*PR=Pivot;} //{*PR=Temporary;}	//]
					//else {*PL=Temporary; *PR=Pivot; PL = PL + 1;}			//]----+
													//]<---/
					*(PR)=Pivot;
					if (Pivot > Temporary) {*PL=Temporary; PL = PL + 1;}
*/
				}
			}
// 'Magnetica' partitioning, mainloop rev.5a2p_BYPASSSWAP]
			//if (PR > Jndx) {								//]
			//	M14_swapUnconditional (&QWORDS[PR+1], &QWORDS[Jndx+1]);			//]-----+
			//}										//]	|
			//Leftover:									//<-----/ Kinda 'Desperate Measures' - debranchifying the mainloop as much as possible
			M14_SwapConditional_ifXbY_BUGGY((uint64_t)Jndx, (uint64_t)PR, PR+1, Jndx+1);
			Jndx = PL - 1;
			Indx = PR + 1;
			//StackPtr = StackPtr + 2;				]
			//if ((Right-Indx) > (Jndx-Left)) {			]
			//	Stack[StackPtr - 1] = Indx;			]
			//	Stack[StackPtr] = Right;			]
			//	Right = Jndx;					]
			//} else {						]
			//	Stack[StackPtr - 1] = Left;			]
			//	Stack[StackPtr] = Jndx;				]
			//	Left = Indx;					]-------+
			//}							]	|
			//if (Indx + M14_InsertionsortTHRESHOLD < Right) {	//<-----/ Operation 'Maximum Underkill', getting rid of conditional jumps as if there is no tomorrow
				StackPtr = StackPtr + 2;
				Stack[StackPtr - 1] = Indx;
				Stack[StackPtr] = Right;
			//}
			Right = Jndx;
			// Stack is full, bail out and finalize with Insertionsort [
/*
			StackNotOverflow = (StackPtr + 2 <= M14_StackEntries-1);
			StackPtr = StackPtr &(-StackNotOverflow);  // StackPtr should be enforced FALSE; also, ensure the next 'push' above is sanctioned - the max index of Stack[] being 'StackEntries-1'
			Right = (uint64_t*)((uint64_t)(Right) &(-StackNotOverflow)); // Left + M14_InsertionsortTHRESHOLD < Right should be enforced FALSE:
*/
			// Stack is full, bail out and finalize with Insertionsort ]
			} //switch (Right-Left) {
		} //for(;(M14_InsertionsortTHRESHOLD < Right-Left);) { // if not 1<Right-Left then Right=Left (i.e. 0), or adjacent (i.e. 1) ... or Left>Right
DirtyBypass:;
		// Caution: Inhere 'Left' could be bigger than 'Right'.
// Too slow [[[
//		for (Indx=Left+1; Indx <= Right; Indx++) { // Inhere, we must sort the [Left..Right] micro-partition [[[
//			Jndx = Indx;
//			for (;Jndx >= 1;) {
//				if (QWORDS[Jndx-1] > QWORDS[Jndx]) M14_swapUnconditional (&QWORDS[Jndx-1], &QWORDS[Jndx]); else break;
//				Jndx = Jndx - 1;
//			}
//		} // Inhere, we must sort the [Left..Right] micro-partition ]]]
// Too slow ]]]
	} while ( (StackPtr != 0) );
// Slow [[[
/*
if (!StackNotOverflow)
		for (Indx=LeftBackup+1; Indx <= RightBackup; Indx++) {
			Jndx = Indx;
			for (;Jndx >= LeftBackup+1;) {
				if (*(Jndx-1) > *Jndx) M14_swapUnconditional (Jndx-1, Jndx); else break;
				Jndx = Jndx - 1;
			}
		}
*/
// Slow ]]]
}

// This is the initial variant, without any optimizations:
/*
            // 'Magnetica' partitioning [
            Jndx = Right;
            PL = Left;
            PR = Left;
            swap (&QWORDS[(Left + Right)>>1], &QWORDS[PR]);
            Pivot = QWORDS[PR];
            for (;PR < Jndx;) {
                if (Pivot > QWORDS[PR + 1]) {
                    swap (&QWORDS[PL], &QWORDS[PR + 1]);
                    PL = PL + 1;
                    PR = PR + 1;
                } else if (Pivot == QWORDS[PR + 1]) {
                    PR = PR + 1;
                } else {
                    for (;Pivot < QWORDS[Jndx];) {
                        Jndx = Jndx - 1;
                    }
                    if (PR + 1 < Jndx) swap (&QWORDS[PR + 1], &QWORDS[Jndx]);
                    Jndx = Jndx - 1;
                }
            }
            Jndx = PL - 1;
            Indx = PR + 1;
            // 'Magnetica' partitioning ]
*/

//# //https://stackoverflow.com/questions/2061245/how-to-subtract-two-unsigned-ints-with-wrap-around-or-overflow
//# /*
//# Here's a little more detail of why it 'just works' when you subtract the 'smaller' from the 'larger'.
//# 
//# A couple of things going into this…
//# 1. In hardware, subtraction uses addition: The appropriate operand is simply negated before being added.
//# 2. In two’s complement (which pretty much everything uses), an integer is negated by inverting all the bits then adding 1.
//# 
//# Hardware does this more efficiently than it sounds from the above description, but that’s the basic algorithm for subtraction (even when values are unsigned).
//# 
//# So, lets figure 2 – 250 using 8bit unsigned integers. In binary we have
//# 
//#   0 0 0 0 0 0 1 0  
//# - 1 1 1 1 1 0 1 0
//# We negate the operand being subtracted and then add. Recall that to negate we invert all the bits then add 1. After inverting the bits of the second operand we have
//# 
//# 0 0 0 0 0 1 0 1  
//# Then after adding 1 we have
//# 
//# 0 0 0 0 0 1 1 0  
//# Now we perform addition...
//# 
//#   0 0 0 0 0 0 1 0   
//# + 0 0 0 0 0 1 1 0
//# 
//# = 0 0 0 0 1 0 0 0 = 8, which is the result we wanted from 2 - 250
//# */
//# 
//# //https://stackoverflow.com/questions/7221409/is-unsigned-integer-subtraction-defined-behavior?noredirect=1
//# 
//# #include <stdint.h>
//# #include <stdio.h>
//# 
//# int main()
//# {
//# 
//# uint64_t SGNDmax = 1LL<<63;
//# uint64_t UNSGNDmax = -1;
//# //[[[
//#     uint8_t x = 0xff;
//#     uint8_t y = x + 20;
//#     int8_t res1;
//#     int8_t res2;
//# //]]]
//# 
//# //Well, an unsigned integer subtraction has defined behavior, also it is a tricky thing. 
//# //When you subtract two unsigned integers, result is promoted to higher type int if result (lvalue) type is not specified explicitly. 
//# //In the latter case, for example, int8_t result = a - b; (where a and b have int8_t type) you can obtain very weird behavior. 
//# //I mean you may loss transitivity property (i.e. if a > b and b > c it is true that a > c). 
//# //The loss of transitivity can destroy a tree-type data structure work. 
//# //Care must be taken not to provide comparison function for sorting, searching, tree building that uses unsigned integer subtraction to deduce which key is higher or lower.
//# //See example below.
//# 
//#     uint8_t a = 255;
//#     uint8_t b = 100;
//#     uint8_t c = 150;
//# 
//# //In Linux it is %llu and in Windows it is %I64u
//# printf("uint64_t SGNDmax = 1LL<<63 = %llu\n", SGNDmax);
//# printf("uint64_t UNSGNDmax = -1 = %llu\n\n", UNSGNDmax);
//# printf("uint64_t SGNDmax = 1LL<<63 = 0x%llX\n", SGNDmax);
//# printf("uint64_t UNSGNDmax = -1 = 0x%llX\n\n", UNSGNDmax);
//# 
//# //[[[
//#     printf("(uint8_t)x = %d\n", (uint8_t)x);
//#     printf("(uint8_t)y = %d\n", (uint8_t)y);
//# 
//#     printf("(int8_t)x = %d\n", (int8_t)x);
//#     printf("(int8_t)y = %d\n", (int8_t)y);
//# 
//#     res1 = (int8_t)x - y;
//#     res2 = (int8_t)y - x;
//#     printf("(int8_t)x - y = %d\n", res1);
//#     printf("(int8_t)y - x = %d\n", res2);
//# 
//#     res1 = (uint8_t)x - (uint8_t)y;
//#     res2 = (uint8_t)y - (uint8_t)x;
//#     printf("x and y: %d and %d\n", x, y);
//#     printf("(uint8_t)x - (uint8_t)y = %d\n", res1);
//#     printf("(uint8_t)y - (uint8_t)x = %d\n\n", res2);
//# //]]]
//# 
//#     printf("uint8_t a = %+d, b = %+d, c = %+d\n\n", a, b, c);
//# 
//#     printf("          b - a  = %+d\tpromotion to int type\n"
//#            " (int8_t)(b - a) = %+d\n\n"
//#            "          b + a  = %+d\tpromotion to int type\n"
//#            "(uint8_t)(b + a) = %+d\tmodular arithmetic\n"
//#            "     b + a %% %d = %+d\n\n", 
//#            b - a,  (int8_t)(b - a), 
//#            b + a, (uint8_t)(b + a),
//#            UINT8_MAX + 1,
//#            (b + a) % (UINT8_MAX + 1));
//# 
//# // Modified by Kaze:
//#     printf("b %s c (b - c = %d), b %s a (b - a = %d), AND c %s a (c - a = %d)\n",
//#            (int8_t)(b - c) < 0 ? "<" : ">", (int8_t)(b - c),
//#            (int8_t)(b - a) < 0 ? "<" : ">", (int8_t)(b - a),
//#            (int8_t)(c - a) < 0 ? "<" : ">", (int8_t)(c - a));
//#     return 0;
//# }
//# 
//# /*
//# F:\Quicksort_says_rev8++>notepad e.c
//# 
//# F:\Quicksort_says_rev8++>icl e.c
//# Intel(R) C++ Compiler XE for applications running on IA-32, Version 15.0.0.108 Build 20140726
//# Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.
//# 
//# e.c
//# Microsoft (R) Incremental Linker Version 10.00.40219.01
//# Copyright (C) Microsoft Corporation.  All rights reserved.
//# 
//# -out:e.exe
//# e.obj
//# 
//# F:\Quicksort_says_rev8++>e
//# uint64_t SGNDmax = 1LL<<63 = 9223372036854775808
//# uint64_t UNSGNDmax = -1 = 18446744073709551615
//# 
//# uint64_t SGNDmax = 1LL<<63 = 0x8000000000000000
//# uint64_t UNSGNDmax = -1 = 0xFFFFFFFFFFFFFFFF
//# 
//# (uint8_t)x = 255
//# (uint8_t)y = 19
//# (int8_t)x = -1
//# (int8_t)y = 19
//# (int8_t)x - y = -20
//# (int8_t)y - x = 20
//# x and y: 255 and 19
//# (uint8_t)x - (uint8_t)y = -20
//# (uint8_t)y - (uint8_t)x = 20
//# 
//# uint8_t a = +255, b = +100, c = +150
//# 
//#           b - a  = -155 promotion to int type
//#  (int8_t)(b - a) = +101
//# 
//#           b + a  = +355 promotion to int type
//# (uint8_t)(b + a) = +99  modular arithmetic
//#      b + a % 256 = +99
//# 
//# b < c (b - c = -50), b > a (b - a = 101), AND c < a (c - a = -105)
//# 
//# F:\Quicksort_says_rev8++>
//# */

// Test run: 2022-Mar-08:
// Laptop "Compressionette", Intel 'Kaby Lake' i5-7200U 3.1GHz max turbo, 36GB DDR4 2133MHz:
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
// | Performer/Keys     | #1, FEW distinct          | #2, MANY distinct         | #3, MANYmore distinct     | #4, ALL distinct          | #5, ALLmore distinct       | #6, ALLmax distinct         |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// |  Operating System, | Windows 10, | Fedora 35,  | Windows 10, | Fedora 35,  | Windows 10, | Fedora 35,  | Windows 10, | Fedora 35,  | Windows 10, | Fedora 35,   | Windows 10,  | Fedora 35,   |
// |      Compiler, -O3 | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1   | Intel v15.0  | GCC 11.2.1   |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// | qsort              |  59 seconds | 377 seconds | 336 seconds | 541 seconds | 157 seconds | 195 seconds | 435 seconds | 534 seconds | 851 seconds | 1036 seconds |         N.A. |         N.A. |
// | Magnetica v.13     |  31 seconds |  30 seconds | 202 seconds | 196 seconds |  88 seconds |  85 seconds | 259 seconds | 250 seconds | 506 seconds |  493 seconds |         N.A. |         N.A. |
// | Bentley-McIlroy    |  38 seconds |  36 seconds | 205 seconds | 208 seconds |  92 seconds |  94 seconds | 279 seconds | 281 seconds | 544 seconds |  553 seconds |         N.A. |         N.A. |
// | Crumsort           |  30 seconds |  32 seconds | 132 seconds | 150 seconds |  64 seconds |  70 seconds | 184 seconds | 192 seconds | 357 seconds |  376 seconds |         N.A. |         N.A. |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// | Best Time (bare    |                           |                           |                           |                           |                            |                             |
// | bone in-place QS): |  30s PARITY               | 132s for Crumsort         |  64s for Crumsort         | 184s for Crumsort         | 357s for Crumsort          | N.A.                        |
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
//
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
// | Performer/Keys     | #1, FEW distinct          | #2, MANY distinct         | #3, MANYmore distinct     | #4, ALL distinct          | #5, ALLmore distinct       | #6, ALLmax distinct         |
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
// |  Operating System, | Fedora 35, GCC 11.2.1     | Fedora 35, GCC 11.2.1     | Fedora 35, GCC 11.2.1     | Fedora 35, GCC 11.2.1     | Fedora 35, GCC 11.2.1      | Fedora 35, GCC 11.2.1       |
// |      Compiler, -O3 | instructions; IPC         | instructions; IPC         | instructions; IPC         | instructions; IPC         | instructions; IPC          | instructions; IPC           |
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
// | qsort              |   3,302,993,934,921; 2.75 |   2,983,579,082,155; 1.75 |     886,263,153,476; 1.41 |   2,352,769,705,563; 1.38 |    4,527,367,288,814; 1.39 |                        N.A. |
// | Magnetica v.13     |     131,873,917,282; 1.00 |     658,478,895,600; 1.02 |     309,149,594,748; 1.08 |     884,297,729,161; 1.06 |    1,726,931,029,634; 1.08 |                        N.A. |
// | Bentley-McIlroy    |     164,915,835,204; 1.09 |     681,956,155,364; 1.00 |     322,584,009,352; 1.04 |     944,038,959,690; 1.02 |    1,719,825,062,847; 0.97 |                        N.A. |
// | Crumsort           |     312,328,497,447; 2.29 |   1,295,551,817,497; 2.57 |     603,276,911,007; 2.53 |   1,597,685,291,532; 2.46 |    3,091,001,982,856; 2.51 |                        N.A. |
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
//
// Speed Roster, (the base speed 1.00x is GLIBC's qsort):
// Rank #1: 2683/820=  3.27x =  32+150+ 70+192+ 376=  820 seconds for Crumsort
// Rank #2: 2683/1054= 2.54x =  30+196+ 85+250+ 493= 1054 seconds for Magnetica v.13
// Rank #3: 2683/1172= 2.28x =  36+208+ 94+281+ 553= 1172 seconds for Bentley-McIlroy
// Rank #4: 2683/2683= 1.00x = 377+541+195+534+1036= 2683 seconds for GLIBC's qsort
//
// Test run: 2022-Mar-09:
// Laptop "Brutalitto", AMD 'Renoir' 4800H 4.3GHz max turbo, 64GB DDR4 3200MHz:
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
// | Performer/Keys     | #1, FEW distinct          | #2, MANY distinct         | #3, MANYmore distinct     | #4, ALL distinct          | #5, ALLmore distinct       | #6, ALLmax distinct         |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// |  Operating System, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10, | Windows 10,  | Windows 10,  | Windows 10,  |
// |      Compiler, -O3 | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1  | Intel v15.0 | GCC 11.2.1   | Intel v15.0  | GCC 11.2.1   |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// | qsort              |  42 seconds |  45 seconds | 242 seconds | 280 seconds | 113 seconds | 131 seconds | 319 seconds | 354 seconds | 620 seconds |  695 seconds | 1282 seconds | 1438 seconds |
// | Magnetica v.13     |  22 seconds |  21 seconds | 135 seconds | 134 seconds |  60 seconds |  59 seconds | 177 seconds | 177 seconds | 350 seconds |  349 seconds |  724 seconds |  722 seconds |
// | Bentley-McIlroy    |  24 seconds |  24 seconds | 146 seconds | 142 seconds |  66 seconds |  64 seconds | 200 seconds | 193 seconds | 391 seconds |  376 seconds |  850 seconds |  803 seconds |
// | Crumsort           |  20 seconds |  19 seconds |  91 seconds |  81 seconds |  44 seconds |  38 seconds | 126 seconds | 109 seconds | 246 seconds |  211 seconds |  567 seconds |  479 seconds |
// +--------------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+-------------+--------------+--------------+--------------+
// | Best Time (bare    |                           |                           |                           |                           |                            |                             |
// | bone in-place QS): |  19s for Crumsort         |  81s for Crumsort         |  38s for Crumsort         | 109s for Crumsort         | 211s for Crumsort          | 479s for Crumsort           |
// +--------------------+---------------------------+---------------------------+---------------------------+---------------------------+----------------------------+-----------------------------+
//
// Speed Roster, (the base speed 1.00x is GLIBC's qsort):
// Rank #1: 2943/937=  3.14x = 19+ 81+ 38+109+211+ 479=  937 seconds for Crumsort
// Rank #2: 2943/1462= 2.01x = 21+134+ 59+177+349+ 722= 1462 seconds for Magnetica v.13
// Rank #3: 2943/1602= 1.83x = 24+142+ 64+193+376+ 803= 1602 seconds for Bentley-McIlroy
// Rank #4: 2943/2943= 1.00x = 45+280+131+354+695+1438= 2943 seconds for GLIBC's qsort
//
// Test run: 2022-Mar-14:
// Laptop "Compressionette", Intel 'Kaby Lake' i5-7200U 3.1GHz max turbo, 36GB DDR4 2133MHz:
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Performer/Keys     | #1, FEW distinct        | #2, MANY distinct        | #3, MANYmore distinct    | #4, ALL distinct          | #5, ALLmore distinct      | #6, ALLmax distinct         |
// +--------------------+-------------------------+--------------------------+--------------------------+-------------+-------------+---------------------------+--------------+--------------+
// |  Operating System, |   Fedora 35, GCC 11.2.1 |    Fedora 35, GCC 11.2.1 |    Fedora 35, GCC 11.2.1 |     Fedora 35, GCC 11.2.1 |     Fedora 35, GCC 11.2.1 |       Fedora 35, GCC 11.2.1 |
// |      Compiler, -O3 |       instructions; IPC |        instructions; IPC |        instructions; IPC |         instructions; IPC |         instructions; IPC |           instructions; IPC |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | qsort              |         385/342 seconds |          527/234 seconds |           165/55 seconds |           516/128 seconds |           999/252 seconds |                        N.A. |
// |                    | 6,448,450,744,497; 2.82 |  4,921,980,445,033; 2.06 |  1,369,822,972,984; 1.94 |   3,250,596,357,540; 1.58 |   6,250,299,799,611; 1.59 |                        N.A. |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Magnetica v.14     |            29/6 seconds |           198/47 seconds |            86/22 seconds |            241/66 seconds |           472/134 seconds |                        N.A. |
// |                    |   171,452,642,615; 1.14 |    936,751,248,598; 1.17 |    443,844,553,192; 1.25 |   1,291,624,832,269; 1.28 |   2,503,942,225,085; 1.28 |                        N.A. |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Bentley-McIlroy    |           38/13 seconds |           223/47 seconds |           100/26 seconds |            304/65 seconds |           597/139 seconds |                        N.A. |
// |                    |   246,587,334,436; 1.23 |  1,105,253,285,645; 1.25 |    507,140,963,617; 1.23 |   1,460,132,564,676; 1.22 |   2,848,210,143,410; 1.22 |                        N.A. |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Crumsort 1.1.5.3   |            29/4 seconds |            129/4 seconds |             61/2 seconds |            173/3  seconds |             339/7 seconds |                        N.A. |
// |                    |   351,332,884,902; 2.43 |  1,284,147,329,900; 2.80 |    603,065,127,518; 2.77 |   1,605,371,408,284; 2.64 |   3,102,283,088,926; 2.71 |                        N.A. |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// Test run: 2022-Mar-20: (with a removed MOV instruction, and with removed case 13 i.e. 14 elements partition)
// Laptop "Compressionette", Intel 'Kaby Lake' i5-7200U 3.1GHz max turbo, 36GB DDR4 2133MHz:
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Performer/Keys     | #1, FEW distinct        | #2, MANY distinct        | #3, MANYmore distinct    | #4, ALL distinct          | #5, ALLmore distinct      | #6, ALLmax distinct         |
// +--------------------+-------------------------+--------------------------+--------------------------+-------------+-------------+---------------------------+--------------+--------------+
// |  Operating System, |   Fedora 35, GCC 11.2.1 |    Fedora 35, GCC 11.2.1 |    Fedora 35, GCC 11.2.1 |     Fedora 35, GCC 11.2.1 |     Fedora 35, GCC 11.2.1 |       Fedora 35, GCC 11.2.1 |
// |      Compiler, -O3 |       instructions; IPC |        instructions; IPC |        instructions; IPC |         instructions; IPC |         instructions; IPC |           instructions; IPC |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
// | Magnetica v.14++   |            29/5 seconds |           199/40 seconds |            86/19 seconds |            241/57 seconds |           472/116 seconds |                        N.A. |
// |                    |   169,188,245,299; 1.13 |    904,264,949,739; 1.15 |    429,079,366,360; 1.23 |   1,234,021,107,253; 1.25 |   2,376,646,792,470; 1.26 |                        N.A. |
// +--------------------+-------------------------+--------------------------+--------------------------+---------------------------+---------------------------+-----------------------------+
//
// Legend (The time is exactly the Sort process time, first value is for unsorted, second one is for sorted):
// #1,FEW = 2,233,861,800 keys, of them distinct = 10; 178,708,944 bytes 22338618_QWORDS.bin; elements = 178,708,944/8 *100; // Keys are 100 times duplicated
// #2,MANY = 2,482,300,900 keys, of them distinct = 2,847,531; 24,823,016 bytes mobythesaurus.txt; elements = 24823016 -8+1; // BuildingBlocks are size-order+1, they are 100 times duplicated
// #3,MANYmore = 1,137,582,073 keys, of them distinct = 77,275,994; 1,137,582,080 bytes linux-5.15.25.tar; elements = 1137582080 -8+1; // BuildingBlocks are size-order+1
// #4,ALL = 2,009,333,753 keys, of them distinct = 1,912,608,132; 2,009,333,760 bytes Fedora-Workstation-Live-x86_64-35-1.2.iso; elements = 2009333760 -8+1; // BuildingBlocks are size-order+1
// #5,ALLmore = 3,803,483,825 keys, of them distinct = 3,346,259,533; 3,803,483,832 bytes Fedora-Workstation-35-1.2.aarch64.raw.xz; elements = 3803483832 -8+1; // BuildingBlocks are size-order+1
// #6,ALLmax = 7,798,235,435 keys, of them distinct = 6,770,144,405; 7,798,235,442 bytes math.stackexchange.com_en_all_2019-02.zim; elements = 7798235442 -8+1; // BuildingBlocks are size-order+1
// 
// Notes:
// - Scandum's Crumsort is the FASTEST in-place sorter, known to me, hail Scandum!
// - All the runs were in "Current priority class is REALTIME_PRIORITY_CLASS" for Windows and "Current priority is -20." for Linux;
// - All the runs were executed by Core 1 (i.e. SetProcessAffinityMask(GetCurrentProcess(), 1);) in Windows, not in Linux (the task was migrating between the cores);
// To see more stats (the tables were deriving from) see 'log_i5-7200U_MAR14.txt';
// - Benchmark needs 32GB RAM, and 64GB for the 6th testset;
// - The whole package (except the 3rd, 4th, 5th and 6th datasets) is downloadable at:
//   www.sanmayce.com/QS_showdown_r14.7z
//   https://forum.qb64.org/index.php?topic=3518.msg141225#msg141225
// - To reproduce the roster, run on Windows or Linux:
//   - BENCH_ICL32GB.BAT
//   - BENCH_ICL64GB.BAT
//   - sh bench_gcc32GB.sh
//   - sh bench_gcc64GB.sh
// - 3rd dataset is downloadable at:
// https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.25.tar.xz
// - 4th dataset is downloadable at:
// https://download.fedoraproject.org/pub/fedora/linux/releases/35/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-35-1.2.iso 
// - 5th dataset is downloadable at:
// https://download.fedoraproject.org/pub/fedora/linux/releases/35/Workstation/aarch64/images/Fedora-Workstation-35-1.2.aarch64.raw.xz 
// - 6th dataset is downloadable at:
// https://download.kiwix.org/zim/stack_exchange/math.stackexchange.com_en_all_2019-02.zim
// - Managed to reduce the mainloop down to 68 bytes (from 71 in r.12), the gain comes from switching to pointers, had to do that long time ago, wanted to keep the etude ARRAY-syntax friendly. Now, r.12 uses arrays, whereas r.13 uses pointers. Another turning point, GCC now beats ICL in all tests.
// - In order to switch to "Benchmark mode":
// cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
// echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

/*
void quicksort_Bentley_McIlroy_3way_partitioning(uint64_t a[], int64_t l, int64_t r)
{ 
	int64_t i = l-1, j = r, p = l-1, q = r; 
	int64_t k; 
	uint64_t v;
	if (r <= l) return;
	swap(&a[r], &a[(r+l)>>1]); // Modified by Kaze
	v = a[r];
	for (;;)
	{
		while (a[++i] < v) ;
		while (v < a[--j]) if (j == l) break;
		if (i >= j) break;
		swap(&a[i], &a[j]);
		if (a[i] == v) { p++; swap(&a[p], &a[i]); }
		if (v == a[j]) { q--; swap(&a[j], &a[q]); }
	}
	swap(&a[i], &a[r]); 
	j = i-1; i = i+1;
	for (k = l; k < p; k++, j--) swap(&a[k], &a[j]);
	for (k = r-1; k > q; k--, i++) swap(&a[i], &a[k]);
	quicksort_Bentley_McIlroy_3way_partitioning(a, l, j);
	quicksort_Bentley_McIlroy_3way_partitioning(a, i, r);
}
*/

// And the Assembly code generated by GCC 11.2.1 -O3 for Magnetica_v14:
// 001 Quicksort_QB64_v14:
// 002 .LFB204:
// 003 	.cfi_startproc
// 004 	pushq	%r15
// 005 	.cfi_def_cfa_offset 16
// 006 	.cfi_offset 15, -16
// 007 	leaq	-8(%rdi,%rsi,8), %r9
// 008 	movq	%rdi, %xmm0
// 009 	movq	%rdi, %rax
// 010 	pushq	%r14
// 011 	.cfi_def_cfa_offset 24
// 012 	.cfi_offset 14, -24
// 013 	movq	%r9, %xmm3
// 014 	movl	$2, %ecx
// 015 	pushq	%r13
// 016 	.cfi_def_cfa_offset 32
// 017 	.cfi_offset 13, -32
// 018 	punpcklqdq	%xmm3, %xmm0
// 019 	pushq	%r12
// 020 	.cfi_def_cfa_offset 40
// 021 	.cfi_offset 12, -40
// 022 	pushq	%rbp
// 023 	.cfi_def_cfa_offset 48
// 024 	.cfi_offset 6, -48
// 025 	pushq	%rbx
// 026 	.cfi_def_cfa_offset 56
// 027 	.cfi_offset 3, -56
// 028 	subq	$143904, %rsp
// 029 	.cfi_def_cfa_offset 143960
// 030 	movups	%xmm0, -112(%rsp)
// 031 	.p2align 4,,10
// 032 	.p2align 3
// 033 .L5093:
// 034 	movq	%r9, %rdx
// 035 	subq	$2, %rcx
// 036 	subq	%rax, %rdx
// 037 	testq	%rdx, %rdx
// 038 	jle	.L5056
// 039 	leaq	8(%rax), %r10
// 040 	leaq	16(%rax), %r11
// 041 .L5091:
// 042 	movq	%rdx, %rsi
// 043 	movq	(%rax), %r15
// 044 	sarq	$3, %rsi
// 045 	cmpq	$103, %rdx
// 046 	ja	.L5057
// 047 	jmp	*.L5059(,%rsi,8)
// 048 	.section	.rodata
// 049 	.align 8
// 050 	.align 4
// 051 .L5059:
// 052 	.quad	.L5057
// 053 	.quad	.L5070
// 054 	.quad	.L5069
// 055 	.quad	.L5068
// 056 	.quad	.L5067
// 057 	.quad	.L5066
// 058 	.quad	.L5065
// 059 	.quad	.L5064
// 060 	.quad	.L5063
// 061 	.quad	.L5062
// 062 	.quad	.L5061
// 063 	.quad	.L5060
// 064 	.quad	.L5058
// 065 	.text
// 066 	.p2align 4,,10
// 067 	.p2align 3
// 068 .L5058:
// 069 	movq	8(%rax), %rdi
// 070 	movq	%r15, %rdx
// 071 	movq	16(%rax), %rsi
// 072 	cmpq	%r15, %rdi
// 073 	cmovbe	%rdi, %rdx
// 074 	cmovb	%r15, %rdi
// 075 	movq	88(%rax), %r15
// 076 	cmpq	%rdi, %rsi
// 077 	movq	%rdi, %r14
// 078 	cmovbe	%rsi, %r14
// 079 	cmovb	%rdi, %rsi
// 080 	movq	24(%rax), %rdi
// 081 	movq	%rsi, %r13
// 082 	cmpq	%rsi, %rdi
// 083 	cmovbe	%rdi, %r13
// 084 	cmovb	%rsi, %rdi
// 085 	movq	32(%rax), %rsi
// 086 	movq	%rdi, %r12
// 087 	cmpq	%rdi, %rsi
// 088 	movq	%r13, %xmm0
// 089 	cmovbe	%rsi, %r12
// 090 	cmovb	%rdi, %rsi
// 091 	movq	40(%rax), %rdi
// 092 	movq	%rsi, %rbp
// 093 	cmpq	%rsi, %rdi
// 094 	movq	%r12, %xmm5
// 095 	cmovbe	%rdi, %rbp
// 096 	cmovb	%rsi, %rdi
// 097 	movq	48(%rax), %rsi
// 098 	punpcklqdq	%xmm5, %xmm0
// 099 	movups	%xmm0, 16(%rax)
// 100 	cmpq	%rdi, %rsi
// 101 	movq	%rdi, %rbx
// 102 	movq	%rbp, %xmm0
// 103 	cmovbe	%rsi, %rbx
// 104 	cmovb	%rdi, %rsi
// 105 	movq	56(%rax), %rdi
// 106 	movq	%rsi, %r11
// 107 	cmpq	%rsi, %rdi
// 108 	movq	%rbx, %xmm6
// 109 	cmovbe	%rdi, %r11
// 110 	cmovb	%rsi, %rdi
// 111 	movq	64(%rax), %rsi
// 112 	punpcklqdq	%xmm6, %xmm0
// 113 	movups	%xmm0, 32(%rax)
// 114 	cmpq	%rdi, %rsi
// 115 	movq	%rdi, %r10
// 116 	movq	%r11, %xmm0
// 117 	cmovbe	%rsi, %r10
// 118 	cmovb	%rdi, %rsi
// 119 	movq	72(%rax), %rdi
// 120 	movq	%rsi, %r9
// 121 	cmpq	%rsi, %rdi
// 122 	movq	%r10, %xmm7
// 123 	cmovbe	%rdi, %r9
// 124 	cmovb	%rsi, %rdi
// 125 	movq	80(%rax), %rsi
// 126 	punpcklqdq	%xmm7, %xmm0
// 127 	movups	%xmm0, 48(%rax)
// 128 	cmpq	%rdi, %rsi
// 129 	movq	%rdi, %r8
// 130 	movq	%r9, %xmm0
// 131 	cmovbe	%rsi, %r8
// 132 	cmovb	%rdi, %rsi
// 133 	cmpq	%rsi, %r15
// 134 	movq	%rsi, %rdi
// 135 	movq	%r8, %xmm2
// 136 	cmovbe	%r15, %rdi
// 137 	cmovb	%rsi, %r15
// 138 	punpcklqdq	%xmm2, %xmm0
// 139 	cmpq	%r15, 96(%rax)
// 140 	movups	%xmm0, 64(%rax)
// 141 	movq	%r15, %rsi
// 142 	cmovnb	96(%rax), %r15
// 143 	cmovbe	96(%rax), %rsi
// 144 	movq	%rdi, %xmm0
// 145 	movq	%rsi, %xmm4
// 146 	movq	%r15, 96(%rax)
// 147 	punpcklqdq	%xmm4, %xmm0
// 148 	movups	%xmm0, 80(%rax)
// 149 .L5071:
// 150 	cmpq	%r14, %rdx
// 151 	movq	%r14, %r15
// 152 	cmovbe	%rdx, %r15
// 153 	cmovb	%r14, %rdx
// 154 	movq	%r13, %r14
// 155 	cmpq	%r13, %rdx
// 156 	cmovbe	%rdx, %r14
// 157 	cmovb	%r13, %rdx
// 158 	movq	%r12, %r13
// 159 	cmpq	%r12, %rdx
// 160 	cmovbe	%rdx, %r13
// 161 	cmovb	%r12, %rdx
// 162 	movq	%rbp, %r12
// 163 	cmpq	%rbp, %rdx
// 164 	movq	%r13, %xmm0
// 165 	cmovbe	%rdx, %r12
// 166 	cmovb	%rbp, %rdx
// 167 	movq	%rbx, %rbp
// 168 	cmpq	%rbx, %rdx
// 169 	movq	%r12, %xmm1
// 170 	cmovbe	%rdx, %rbp
// 171 	cmovb	%rbx, %rdx
// 172 	punpcklqdq	%xmm1, %xmm0
// 173 	movq	%r11, %rbx
// 174 	movups	%xmm0, 16(%rax)
// 175 	cmpq	%r11, %rdx
// 176 	movq	%rbp, %xmm0
// 177 	cmovbe	%rdx, %rbx
// 178 	cmovb	%r11, %rdx
// 179 	movq	%r10, %r11
// 180 	cmpq	%r10, %rdx
// 181 	movq	%rbx, %xmm3
// 182 	cmovbe	%rdx, %r11
// 183 	cmovb	%r10, %rdx
// 184 	punpcklqdq	%xmm3, %xmm0
// 185 	movq	%r9, %r10
// 186 	movups	%xmm0, 32(%rax)
// 187 	cmpq	%r9, %rdx
// 188 	movq	%r11, %xmm0
// 189 	cmovbe	%rdx, %r10
// 190 	cmovb	%r9, %rdx
// 191 	movq	%r8, %r9
// 192 	cmpq	%r8, %rdx
// 193 	movq	%r10, %xmm2
// 194 	cmovbe	%rdx, %r9
// 195 	cmovb	%r8, %rdx
// 196 	punpcklqdq	%xmm2, %xmm0
// 197 	movq	%rdi, %r8
// 198 	movups	%xmm0, 48(%rax)
// 199 	cmpq	%rdi, %rdx
// 200 	movq	%r9, %xmm0
// 201 	cmovbe	%rdx, %r8
// 202 	cmovb	%rdi, %rdx
// 203 	movq	%rsi, %rdi
// 204 	cmpq	%rsi, %rdx
// 205 	movq	%r8, %xmm1
// 206 	cmovbe	%rdx, %rdi
// 207 	cmovb	%rsi, %rdx
// 208 	punpcklqdq	%xmm1, %xmm0
// 209 	movups	%xmm0, 64(%rax)
// 210 	movq	%rdx, 88(%rax)
// 211 .L5072:
// 212 	cmpq	%r14, %r15
// 213 	movq	%r14, %rdx
// 214 	movq	%r13, %rsi
// 215 	cmovnb	%r15, %r14
// 216 	cmovbe	%r15, %rdx
// 217 	cmpq	%r13, %r14
// 218 	cmovbe	%r14, %rsi
// 219 	cmovb	%r13, %r14
// 220 	movq	%r12, %r13
// 221 	cmpq	%r12, %r14
// 222 	cmovbe	%r14, %r13
// 223 	cmovb	%r12, %r14
// 224 	movq	%rbp, %r12
// 225 	cmpq	%rbp, %r14
// 226 	movq	%r13, %xmm0
// 227 	cmovbe	%r14, %r12
// 228 	cmovb	%rbp, %r14
// 229 	movq	%rbx, %rbp
// 230 	cmpq	%rbx, %r14
// 231 	movq	%r12, %xmm5
// 232 	cmovbe	%r14, %rbp
// 233 	cmovb	%rbx, %r14
// 234 	punpcklqdq	%xmm5, %xmm0
// 235 	movq	%r11, %rbx
// 236 	movups	%xmm0, 16(%rax)
// 237 	cmpq	%r11, %r14
// 238 	movq	%rbp, %xmm0
// 239 	cmovbe	%r14, %rbx
// 240 	cmovb	%r11, %r14
// 241 	movq	%r10, %r11
// 242 	cmpq	%r10, %r14
// 243 	movq	%rbx, %xmm6
// 244 	cmovbe	%r14, %r11
// 245 	cmovb	%r10, %r14
// 246 	punpcklqdq	%xmm6, %xmm0
// 247 	movq	%r9, %r10
// 248 	movups	%xmm0, 32(%rax)
// 249 	cmpq	%r9, %r14
// 250 	movq	%r11, %xmm0
// 251 	cmovbe	%r14, %r10
// 252 	cmovb	%r9, %r14
// 253 	movq	%r8, %r9
// 254 	cmpq	%r8, %r14
// 255 	movq	%r10, %xmm7
// 256 	cmovbe	%r14, %r9
// 257 	cmovb	%r8, %r14
// 258 	punpcklqdq	%xmm7, %xmm0
// 259 	movq	%rdi, %r8
// 260 	movups	%xmm0, 48(%rax)
// 261 	cmpq	%rdi, %r14
// 262 	movq	%r9, %xmm0
// 263 	cmovbe	%r14, %r8
// 264 	cmovb	%rdi, %r14
// 265 	movq	%r8, %xmm4
// 266 	movq	%r14, 80(%rax)
// 267 	punpcklqdq	%xmm4, %xmm0
// 268 	movups	%xmm0, 64(%rax)
// 269 .L5073:
// 270 	cmpq	%rsi, %rdx
// 271 	movq	%rsi, %r15
// 272 	movq	%r9, %rdi
// 273 	cmovbe	%rdx, %r15
// 274 	cmovb	%rsi, %rdx
// 275 	movq	%r13, %rsi
// 276 	cmpq	%r13, %rdx
// 277 	cmovbe	%rdx, %rsi
// 278 	cmovb	%r13, %rdx
// 279 	movq	%r12, %r13
// 280 	cmpq	%r12, %rdx
// 281 	cmovbe	%rdx, %r13
// 282 	cmovb	%r12, %rdx
// 283 	movq	%rbp, %r12
// 284 	cmpq	%rbp, %rdx
// 285 	movq	%r13, %xmm0
// 286 	cmovbe	%rdx, %r12
// 287 	cmovb	%rbp, %rdx
// 288 	movq	%rbx, %rbp
// 289 	cmpq	%rbx, %rdx
// 290 	movq	%r12, %xmm5
// 291 	cmovbe	%rdx, %rbp
// 292 	cmovb	%rbx, %rdx
// 293 	punpcklqdq	%xmm5, %xmm0
// 294 	movq	%r11, %rbx
// 295 	movups	%xmm0, 16(%rax)
// 296 	cmpq	%r11, %rdx
// 297 	movq	%rbp, %xmm0
// 298 	cmovbe	%rdx, %rbx
// 299 	cmovb	%r11, %rdx
// 300 	movq	%r10, %r11
// 301 	cmpq	%r10, %rdx
// 302 	movq	%rbx, %xmm3
// 303 	cmovbe	%rdx, %r11
// 304 	cmovb	%r10, %rdx
// 305 	punpcklqdq	%xmm3, %xmm0
// 306 	movups	%xmm0, 32(%rax)
// 307 	cmpq	%r9, %rdx
// 308 	movq	%r11, %xmm0
// 309 	cmovbe	%rdx, %rdi
// 310 	cmovb	%r9, %rdx
// 311 	movq	%r8, %r9
// 312 	cmpq	%r8, %rdx
// 313 	movq	%rdi, %xmm2
// 314 	cmovbe	%rdx, %r9
// 315 	cmovb	%r8, %rdx
// 316 	punpcklqdq	%xmm2, %xmm0
// 317 	movups	%xmm0, 48(%rax)
// 318 	movq	%rdx, 72(%rax)
// 319 .L5074:
// 320 	cmpq	%rsi, %r15
// 321 	movq	%rsi, %rdx
// 322 	movq	%r13, %r14
// 323 	movq	%r12, %r10
// 324 	cmovnb	%r15, %rsi
// 325 	cmovbe	%r15, %rdx
// 326 	movq	%rsi, %r8
// 327 	cmpq	%r13, %rsi
// 328 	cmovb	%r13, %r8
// 329 	cmovbe	%rsi, %r14
// 330 	movq	%r11, %rsi
// 331 	cmpq	%r12, %r8
// 332 	cmovbe	%r8, %r10
// 333 	cmovb	%r12, %r8
// 334 	movq	%rbp, %r12
// 335 	cmpq	%rbp, %r8
// 336 	movq	%r10, %xmm0
// 337 	cmovbe	%r8, %r12
// 338 	cmovb	%rbp, %r8
// 339 	movq	%rbx, %rbp
// 340 	cmpq	%rbx, %r8
// 341 	movq	%r12, %xmm6
// 342 	cmovbe	%r8, %rbp
// 343 	cmovb	%rbx, %r8
// 344 	punpcklqdq	%xmm6, %xmm0
// 345 	movups	%xmm0, 16(%rax)
// 346 	cmpq	%r11, %r8
// 347 	movq	%rbp, %xmm0
// 348 	cmovnb	%r8, %r11
// 349 	cmovbe	%r8, %rsi
// 350 	movq	%rdi, %r8
// 351 	cmpq	%rdi, %r11
// 352 	movq	%rsi, %xmm7
// 353 	cmovnb	%r11, %rdi
// 354 	cmovbe	%r11, %r8
// 355 	punpcklqdq	%xmm7, %xmm0
// 356 	movq	%r9, %r11
// 357 	movups	%xmm0, 32(%rax)
// 358 	cmpq	%r9, %rdi
// 359 	movq	%r8, %xmm0
// 360 	cmovbe	%rdi, %r11
// 361 	cmovb	%r9, %rdi
// 362 	movq	%r11, %xmm4
// 363 	movq	%rdi, 64(%rax)
// 364 	punpcklqdq	%xmm4, %xmm0
// 365 	movups	%xmm0, 48(%rax)
// 366 .L5075:
// 367 	cmpq	%r14, %rdx
// 368 	movq	%r14, %rbx
// 369 	movq	%r14, %r15
// 370 	movq	%rbp, %r9
// 371 	cmovnb	%rdx, %rbx
// 372 	cmovbe	%rdx, %r15
// 373 	movq	%r10, %rdx
// 374 	movq	%rsi, %rdi
// 375 	cmpq	%r10, %rbx
// 376 	cmovbe	%rbx, %rdx
// 377 	cmovb	%r10, %rbx
// 378 	movq	%r12, %r10
// 379 	cmpq	%r12, %rbx
// 380 	cmovbe	%rbx, %r10
// 381 	cmovb	%r12, %rbx
// 382 	cmpq	%rbp, %rbx
// 383 	movq	%r10, %xmm0
// 384 	cmovbe	%rbx, %r9
// 385 	cmovb	%rbp, %rbx
// 386 	cmpq	%rsi, %rbx
// 387 	movq	%r9, %xmm6
// 388 	cmovbe	%rbx, %rdi
// 389 	cmovb	%rsi, %rbx
// 390 	punpcklqdq	%xmm6, %xmm0
// 391 	movq	%r8, %rsi
// 392 	movups	%xmm0, 16(%rax)
// 393 	cmpq	%r8, %rbx
// 394 	movq	%rdi, %xmm0
// 395 	cmovbe	%rbx, %rsi
// 396 	cmovb	%r8, %rbx
// 397 	movq	%r11, %r8
// 398 	cmpq	%r11, %rbx
// 399 	movq	%rsi, %xmm7
// 400 	cmovbe	%rbx, %r8
// 401 	cmovb	%r11, %rbx
// 402 	punpcklqdq	%xmm7, %xmm0
// 403 	movups	%xmm0, 32(%rax)
// 404 	movq	%rbx, 56(%rax)
// 405 .L5076:
// 406 	cmpq	%rdx, %r15
// 407 	movq	%rdx, %r11
// 408 	movq	%r10, %rbx
// 409 	cmovnb	%r15, %rdx
// 410 	cmovbe	%r15, %r11
// 411 	cmpq	%r10, %rdx
// 412 	cmovbe	%rdx, %rbx
// 413 	cmovb	%r10, %rdx
// 414 	movq	%r9, %r10
// 415 	cmpq	%r9, %rdx
// 416 	cmovbe	%rdx, %r10
// 417 	cmovb	%r9, %rdx
// 418 	movq	%rdi, %r9
// 419 	cmpq	%rdi, %rdx
// 420 	movq	%r10, %xmm0
// 421 	cmovbe	%rdx, %r9
// 422 	cmovb	%rdi, %rdx
// 423 	movq	%rsi, %rdi
// 424 	cmpq	%rsi, %rdx
// 425 	movq	%r9, %xmm4
// 426 	cmovbe	%rdx, %rdi
// 427 	cmovb	%rsi, %rdx
// 428 	punpcklqdq	%xmm4, %xmm0
// 429 	movq	%r8, %rsi
// 430 	movups	%xmm0, 16(%rax)
// 431 	cmpq	%r8, %rdx
// 432 	movq	%rdi, %xmm0
// 433 	cmovbe	%rdx, %rsi
// 434 	cmovb	%r8, %rdx
// 435 	movq	%rsi, %xmm5
// 436 	movq	%rdx, 48(%rax)
// 437 	punpcklqdq	%xmm5, %xmm0
// 438 	movups	%xmm0, 32(%rax)
// 439 .L5077:
// 440 	cmpq	%rbx, %r11
// 441 	movq	%rbx, %r15
// 442 	movq	%r10, %rdx
// 443 	movq	%rdi, %r8
// 444 	cmovbe	%r11, %r15
// 445 	cmovb	%rbx, %r11
// 446 	cmpq	%r10, %r11
// 447 	cmovbe	%r11, %rdx
// 448 	cmovb	%r10, %r11
// 449 	movq	%r9, %r10
// 450 	cmpq	%r9, %r11
// 451 	cmovbe	%r11, %r10
// 452 	cmovb	%r9, %r11
// 453 	cmpq	%rdi, %r11
// 454 	movq	%r10, %xmm0
// 455 	cmovbe	%r11, %r8
// 456 	cmovb	%rdi, %r11
// 457 	movq	%rsi, %rdi
// 458 	cmpq	%rsi, %r11
// 459 	movq	%r8, %xmm3
// 460 	cmovbe	%r11, %rdi
// 461 	cmovb	%rsi, %r11
// 462 	punpcklqdq	%xmm3, %xmm0
// 463 	movups	%xmm0, 16(%rax)
// 464 	movq	%r11, 40(%rax)
// 465 .L5078:
// 466 	cmpq	%rdx, %r15
// 467 	movq	%rdx, %rsi
// 468 	movq	%r10, %r11
// 469 	movq	%r8, %r9
// 470 	cmovnb	%r15, %rdx
// 471 	cmovbe	%r15, %rsi
// 472 	cmpq	%r10, %rdx
// 473 	cmovbe	%rdx, %r11
// 474 	cmovb	%r10, %rdx
// 475 	cmpq	%r8, %rdx
// 476 	cmovbe	%rdx, %r9
// 477 	cmovb	%r8, %rdx
// 478 	movq	%rdi, %r8
// 479 	cmpq	%rdi, %rdx
// 480 	movq	%r9, %xmm0
// 481 	cmovbe	%rdx, %r8
// 482 	cmovb	%rdi, %rdx
// 483 	movq	%r8, %xmm2
// 484 	movq	%rdx, 32(%rax)
// 485 	punpcklqdq	%xmm2, %xmm0
// 486 	movups	%xmm0, 16(%rax)
// 487 .L5079:
// 488 	cmpq	%r11, %rsi
// 489 	movq	%r11, %rdx
// 490 	movq	%r11, %rdi
// 491 	cmovnb	%rsi, %rdx
// 492 	cmovbe	%rsi, %rdi
// 493 	movq	%r9, %rsi
// 494 	cmpq	%r9, %rdx
// 495 	cmovbe	%rdx, %rsi
// 496 	cmovb	%r9, %rdx
// 497 	movq	%r8, %r9
// 498 	cmpq	%r8, %rdx
// 499 	cmovbe	%rdx, %r9
// 500 	cmovb	%r8, %rdx
// 501 	movq	%rdx, 24(%rax)
// 502 .L5080:
// 503 	cmpq	%rsi, %rdi
// 504 	movq	%rsi, %r15
// 505 	cmovnb	%rdi, %rsi
// 506 	cmovbe	%rdi, %r15
// 507 	movq	%rsi, %rdx
// 508 	cmpq	%r9, %rsi
// 509 	movq	%r9, %rsi
// 510 	cmovbe	%rdx, %rsi
// 511 	cmovb	%r9, %rdx
// 512 	movq	%rdx, 16(%rax)
// 513 .L5081:
// 514 	cmpq	%rsi, %r15
// 515 	movq	%rsi, %rbx
// 516 	cmovbe	%r15, %rbx
// 517 	cmovb	%rsi, %r15
// 518 	movq	%rbx, %xmm0
// 519 	movq	%r15, %xmm1
// 520 	punpcklqdq	%xmm1, %xmm0
// 521 	movups	%xmm0, (%rax)
// 522 .L5056:
// 523 	testq	%rcx, %rcx
// 524 	je	.L5055
// 525 	movq	-120(%rsp,%rcx,8), %r9
// 526 	movq	-128(%rsp,%rcx,8), %rax
// 527 	jmp	.L5093
// 528 	.p2align 4,,10
// 529 	.p2align 3
// 530 .L5060:
// 531 	movq	88(%rax), %rsi
// 532 	movq	80(%rax), %rdi
// 533 	movq	%r15, %rdx
// 534 	movq	72(%rax), %r8
// 535 	movq	64(%rax), %r9
// 536 	movq	56(%rax), %r10
// 537 	movq	48(%rax), %r11
// 538 	movq	40(%rax), %rbx
// 539 	movq	32(%rax), %rbp
// 540 	movq	24(%rax), %r12
// 541 	movq	16(%rax), %r13
// 542 	movq	8(%rax), %r14
// 543 	jmp	.L5071
// 544 	.p2align 4,,10
// 545 	.p2align 3
// 546 .L5061:
// 547 	movq	80(%rax), %rdi
// 548 	movq	72(%rax), %r8
// 549 	movq	64(%rax), %r9
// 550 	movq	56(%rax), %r10
// 551 	movq	48(%rax), %r11
// 552 	movq	40(%rax), %rbx
// 553 	movq	32(%rax), %rbp
// 554 	movq	24(%rax), %r12
// 555 	movq	16(%rax), %r13
// 556 	movq	8(%rax), %r14
// 557 	jmp	.L5072
// 558 	.p2align 4,,10
// 559 	.p2align 3
// 560 .L5062:
// 561 	movq	72(%rax), %r8
// 562 	movq	64(%rax), %r9
// 563 	movq	%r15, %rdx
// 564 	movq	56(%rax), %r10
// 565 	movq	48(%rax), %r11
// 566 	movq	40(%rax), %rbx
// 567 	movq	32(%rax), %rbp
// 568 	movq	24(%rax), %r12
// 569 	movq	16(%rax), %r13
// 570 	movq	8(%rax), %rsi
// 571 	jmp	.L5073
// 572 	.p2align 4,,10
// 573 	.p2align 3
// 574 .L5063:
// 575 	movq	64(%rax), %r9
// 576 	movq	56(%rax), %rdi
// 577 	movq	48(%rax), %r11
// 578 	movq	40(%rax), %rbx
// 579 	movq	32(%rax), %rbp
// 580 	movq	24(%rax), %r12
// 581 	movq	16(%rax), %r13
// 582 	movq	8(%rax), %rsi
// 583 	jmp	.L5074
// 584 	.p2align 4,,10
// 585 	.p2align 3
// 586 .L5064:
// 587 	movq	56(%rax), %r11
// 588 	movq	48(%rax), %r8
// 589 	movq	%r15, %rdx
// 590 	movq	40(%rax), %rsi
// 591 	movq	32(%rax), %rbp
// 592 	movq	24(%rax), %r12
// 593 	movq	16(%rax), %r10
// 594 	movq	8(%rax), %r14
// 595 	jmp	.L5075
// 596 	.p2align 4,,10
// 597 	.p2align 3
// 598 .L5065:
// 599 	movq	48(%rax), %r8
// 600 	movq	40(%rax), %rsi
// 601 	movq	32(%rax), %rdi
// 602 	movq	24(%rax), %r9
// 603 	movq	16(%rax), %r10
// 604 	movq	8(%rax), %rdx
// 605 	jmp	.L5076
// 606 	.p2align 4,,10
// 607 	.p2align 3
// 608 .L5066:
// 609 	movq	40(%rax), %rsi
// 610 	movq	32(%rax), %rdi
// 611 	movq	%r15, %r11
// 612 	movq	24(%rax), %r9
// 613 	movq	16(%rax), %r10
// 614 	movq	8(%rax), %rbx
// 615 	jmp	.L5077
// 616 	.p2align 4,,10
// 617 	.p2align 3
// 618 .L5069:
// 619 	movq	16(%rax), %r9
// 620 	movq	8(%rax), %rsi
// 621 	movq	%r15, %rdi
// 622 	jmp	.L5080
// 623 	.p2align 4,,10
// 624 	.p2align 3
// 625 .L5070:
// 626 	movq	8(%rax), %rsi
// 627 	jmp	.L5081
// 628 	.p2align 4,,10
// 629 	.p2align 3
// 630 .L5067:
// 631 	movq	32(%rax), %rdi
// 632 	movq	24(%rax), %r8
// 633 	movq	16(%rax), %r10
// 634 	movq	8(%rax), %rdx
// 635 	jmp	.L5078
// 636 	.p2align 4,,10
// 637 	.p2align 3
// 638 .L5068:
// 639 	movq	24(%rax), %r8
// 640 	movq	16(%rax), %r9
// 641 	movq	%r15, %rsi
// 642 	movq	8(%rax), %r11
// 643 	jmp	.L5079
// 644 	.p2align 4,,10
// 645 	.p2align 3
// 646 .L5055:
// 647 	addq	$143904, %rsp
// 648 	.cfi_remember_state
// 649 	.cfi_def_cfa_offset 56
// 650 	popq	%rbx
// 651 	.cfi_def_cfa_offset 48
// 652 	popq	%rbp
// 653 	.cfi_def_cfa_offset 40
// 654 	popq	%r12
// 655 	.cfi_def_cfa_offset 32
// 656 	popq	%r13
// 657 	.cfi_def_cfa_offset 24
// 658 	popq	%r14
// 659 	.cfi_def_cfa_offset 16
// 660 	popq	%r15
// 661 	.cfi_def_cfa_offset 8
// 662 	ret
// 663 .L5057:
// 664 	.cfi_restore_state
// 665 	movq	%rsi, %rdi
// 666 	sarq	%rsi
// 667 	movq	%r10, %r12
// 668 	movq	%r10, %rdx
// 669 	sarq	$2, %rdi
// 670 	leaq	(%rax,%rsi,8), %rsi
// 671 	leaq	(%rax,%rdi,8), %rdi
// 672 	movq	(%rdi), %r8
// 673 	movq	%r15, (%rdi)
// 674 	movq	%r8, (%rax)
// 675 	movq	8(%rax), %r8
// 676 	movq	(%rsi), %rdi
// 677 	movq	%r8, (%rsi)
// 678 	movq	(%rax), %rsi
// 679 	movq	%rdi, %rbx
// 680 	cmpq	%rdi, %rsi
// 681 	cmovbe	%rsi, %rbx
// 682 	cmovb	%rdi, %rsi
// 683 	movq	16(%rax), %rdi
// 684 	movq	%rsi, %r8
// 685 	cmpq	%rsi, %rdi
// 686 	cmovbe	%rdi, %r8
// 687 	cmovb	%rsi, %rdi
// 688 	movq	%rbx, %rsi
// 689 	cmpq	%rbx, %r8
// 690 	movq	%rdi, 16(%rax)
// 691 	cmovbe	%r8, %rsi
// 692 	cmovb	%rbx, %r8
// 693 	movq	%rsi, %xmm0
// 694 	movq	%r8, %xmm5
// 695 	cmpq	%r8, %rsi
// 696 	punpcklqdq	%xmm5, %xmm0
// 697 	cmove	%rax, %r12
// 698 	movups	%xmm0, (%rax)
// 699 	cmpq	%r10, %r9
// 700 	jbe	.L5083
// 701 	movq	%r9, %rsi
// 702 	jmp	.L5089
// 703 	.p2align 4,,10
// 704 	.p2align 3
// 705 .L5100:
// 706 	movq	%rdi, (%r12)
// 707 	leaq	16(%rdx), %rbx
// 708 	addq	$8, %r12
// 709 	movq	%r8, 8(%rdx)
// 710 	movq	%rbp, %rdx
// 711 .L5085:
// 712 	movq	8(%rdx), %rdi
// 713 	cmpq	%rdx, %rsi
// 714 	jbe	.L5090
// 715 .L5089:
// 716 	leaq	8(%rdx), %rbp
// 717 	cmpq	%rdi, %r8
// 718 	ja	.L5100
// 719 	jb	.L5099
// 720 	leaq	16(%rdx), %rbx
// 721 	movq	%rbp, %rdx
// 722 	movq	8(%rdx), %rdi
// 723 	cmpq	%rdx, %rsi
// 724 	ja	.L5089
// 725 .L5090:
// 726 	movq	%rsi, %r8
// 727 	movq	%r9, %xmm6
// 728 	movq	%rdi, %r9
// 729 	subq	8(%rsi), %r9
// 730 	subq	%rdx, %r8
// 731 	movq	%rbx, %xmm0
// 732 	addq	$2, %rcx
// 733 	sarq	$63, %r8
// 734 	punpcklqdq	%xmm6, %xmm0
// 735 	andq	%r9, %r8
// 736 	leaq	-8(%r12), %r9
// 737 	movups	%xmm0, -128(%rsp,%rcx,8)
// 738 	subq	%r8, %rdi
// 739 	movq	%rdi, 8(%rdx)
// 740 	movq	%r9, %rdx
// 741 	subq	%rax, %rdx
// 742 	addq	%r8, 8(%rsi)
// 743 	testq	%rdx, %rdx
// 744 	jg	.L5091
// 745 	jmp	.L5056
// 746 	.p2align 4,,10
// 747 	.p2align 3
// 748 .L5088:
// 749 	subq	$8, %rsi
// 750 .L5099:
// 751 	movq	(%rsi), %rbx
// 752 	cmpq	%r8, %rbx
// 753 	ja	.L5088
// 754 	movq	%rbx, 8(%rdx)
// 755 	subq	$8, %rsi
// 756 	movq	%rbp, %rbx
// 757 	movq	%rdi, 8(%rsi)
// 758 	jmp	.L5085
// 759 .L5083:
// 760 	movq	%r11, %rbx
// 761 	movq	%r9, %rsi
// 762 	jmp	.L5090
// 763 	.cfi_endproc
// 764 .LFE204:
