// File: /workspace/github_c_makefile_star2_O3/cbouilla[P]AES-attacks-finder/Bazar.c
// Function: UnionListesTriees
int * UnionListesTriees(int * const L1, const int t1, int * const L2, const int t2, int *taille)
{
	int * __restrict Final=malloc((max(0,t1)+max(0,t2))*sizeof(int));
	int i=0, j=0, cpt=0;
	while (i<t1 && j<t2)
	{
		if (L1[i]<=L2[j])
		{
			if (L1[i]==L2[j]) j++;
			Final[cpt++]=L1[i++];
		}
		else Final[cpt++]=L2[j++];
	}
	for (i = i; i < t1; i++) Final[cpt++]=L1[i];
	for (j = j; j < t2; j++) Final[cpt++]=L2[j];
	*taille=cpt;
	return Final;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, (%rsp)
movl %esi, %r12d
xorl %r15d, %r15d
testl %ecx, %ecx
movl $0x0, %ecx
cmovgl %ebp, %ecx
setle %bl
testl %esi, %esi
movl $0x0, %eax
cmovgl %esi, %eax
movq %rdi, %r13
setle %r14b
addl %ecx, %eax
shlq $0x2, %rax
movq %rax, %rdi
callq 0x21d0
movq (%rsp), %r8
movq %rax, %rdi
orb %bl, %r14b
movl $0x0, %ebx
movl $0x0, %r14d
jne 0x25e7
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
movl %r15d, %eax
movl %ebx, %ecx
movl %r15d, %edx
movl (%r13,%rdx,4), %edx
movl %ebx, %esi
movl (%r8,%rsi,4), %esi
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpl %esi, %edx
setle %r15b
cmovll %edx, %esi
setge %bl
addl %eax, %r15d
movl %esi, (%rdi,%r14,4)
addl %ecx, %ebx
incq %r14
cmpl %r12d, %r15d
jge 0x25e7
cmpl %ebp, %ebx
jl 0x25ae
cmpl %r12d, %r15d
jge 0x26ce
movl %r14d, %eax
movq %rdi, 0x8(%rsp)
leaq (%rdi,%rax,4), %rdi
movslq %r15d, %rax
leaq (,%rax,4), %rsi
addq %r13, %rsi
movq %rax, %r13
notl %r15d
addl %r12d, %r15d
leaq 0x4(,%r15,4), %rdx
callq 0x21b0
movslq %r12d, %rcx
subq %r13, %rcx
leaq 0x1(%rcx), %rax
andq $-0x2, %rax
decq %rcx
movd %r14d, %xmm0
movq %rcx, %xmm1
pshufd $0x44, %xmm1, %xmm2     # xmm2 = xmm1[0,1,0,1]
movl $0x2, %ecx
pcmpeqd %xmm3, %xmm3
movdqa %xmm0, %xmm1
psubq %xmm3, %xmm0
leaq (%rax,%rcx), %rdx
addq $-0x2, %rdx
addq $-0x2, %rcx
cmpq $0x2, %rdx
jne 0x2649
negq %rcx
movq %rcx, %xmm3
pshufd $0x44, %xmm3, %xmm3     # xmm3 = xmm3[0,1,0,1]
por 0x26a98(%rip), %xmm3    # 0x29110
movdqa 0x26aa0(%rip), %xmm4    # 0x29120
pxor %xmm4, %xmm2
pxor %xmm4, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pand %xmm5, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm1
pandn %xmm0, %xmm3
por %xmm1, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
paddq %xmm3, %xmm0
movd %xmm0, %r14d
movq 0x8(%rsp), %rdi
movq (%rsp), %r8
cmpl %ebp, %ebx
jge 0x27a0
movl %r14d, %eax
movq %rdi, %r12
leaq (%rdi,%rax,4), %rdi
movslq %ebx, %r15
leaq (%r8,%r15,4), %rsi
notl %ebx
addl %ebp, %ebx
leaq 0x4(,%rbx,4), %rdx
callq 0x21b0
movslq %ebp, %rcx
subq %r15, %rcx
leaq 0x1(%rcx), %rax
andq $-0x2, %rax
decq %rcx
movd %r14d, %xmm0
movq %rcx, %xmm1
pshufd $0x44, %xmm1, %xmm2     # xmm2 = xmm1[0,1,0,1]
movl $0x2, %ecx
pcmpeqd %xmm3, %xmm3
movdqa %xmm0, %xmm1
psubq %xmm3, %xmm0
leaq (%rax,%rcx), %rdx
addq $-0x2, %rdx
addq $-0x2, %rcx
cmpq $0x2, %rdx
jne 0x2721
negq %rcx
movq %rcx, %xmm3
pshufd $0x44, %xmm3, %xmm3     # xmm3 = xmm3[0,1,0,1]
por 0x269c0(%rip), %xmm3    # 0x29110
movdqa 0x269c8(%rip), %xmm4    # 0x29120
pxor %xmm4, %xmm2
pxor %xmm4, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pand %xmm5, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm1
pandn %xmm0, %xmm3
por %xmm1, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
paddq %xmm3, %xmm0
movd %xmm0, %r14d
movq %r12, %rdi
movq 0x10(%rsp), %rax
movl %r14d, (%rax)
movq %rdi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq