// File: /workspace/github_c_makefile_star2_O0/cbouilla[P]AES-attacks-finder/Bazar.c
// Function: TriSpecial_tmp
void TriSpecial_tmp(int *L1, int *L2, int taille, int *L)
{
	int N1=taille/2;
	if (N1>2) TriSpecial_tmp(L1,L2,N1,L);
	if (taille-N1>2) TriSpecial_tmp(L1+N1,L2,taille-N1,L);
	int i;
	for (i = 0; i < N1; i++) L[i]=L1[i];
	i=0;
	int j=N1, cpt=0;
	while (i<N1 && j<taille)
	{
		if (L2[L[i]]<L2[L1[j]]) L1[cpt++]=L[i++];
		else
		{
			if (L2[L[i]]>L2[L1[j]]) L1[cpt++]=L1[j++];
			else L1[cpt++]=L[i++];
		}
	}
	for (j = i; j < N1; j++) L1[cpt++]=L[j];	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jle 0x2f7f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x2f40
movl -0x14(%rbp), %eax
subl -0x24(%rbp), %eax
cmpl $0x2, %eax
jle 0x2fac
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
subl -0x24(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x2f40
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2fdc
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2fb3
movl $0x0, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x28(%rbp), %ecx
xorl %eax, %eax
cmpl -0x24(%rbp), %ecx
movb %al, -0x31(%rbp)
jge 0x3009
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
setl %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3015
jmp 0x30f1
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x306c
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x30ec
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
movslq -0x2c(%rbp), %rsi
movslq (%rdx,%rsi,4), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x30c0
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x2c(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x30ea
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x30ec
jmp 0x2ff0
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x312a
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x30f7
addq $0x40, %rsp
popq %rbp
retq