// File: /workspace/github_c_makefile_star2_O3/jiqingxiaoxi[P]RPA/RPA.c
// Function: check_uniqProbe
int check_uniqProbe(struct Primer *F,struct Primer *R,struct ExoProbe *Probe)
{
        struct Node *s_F,*s_R,*b_R,*s_Probe,*b_Probe;

//plus
        b_R=R->specific;
	b_Probe=Probe->specific;
        for(s_F=F->specific;s_F;s_F=s_F->next)
        {
                if(s_F->plus!=1)
                        continue;
                for(s_R=b_R;s_R;s_R=s_R->next)
                {
                        if(s_R->gi<s_F->gi)
                        {
                                b_R=s_R->next;
                                continue;
                        }
                        if(s_R->gi>s_F->gi)
                                break;
                        if(s_R->pos<s_F->pos)
                        {
                                b_R=b_R->next;
                                continue;
                        }
                        if(s_R->pos-s_F->pos>2000)
                                break;
                        if(s_R->minus!=1)
                                continue;
			for(s_Probe=b_Probe;s_Probe;s_Probe->next)
			{
				if(s_Probe->gi<s_F->gi)
				{
					b_Probe=s_Probe->next;
					continue;
				}
				if(s_Probe->gi>s_F->gi)
					break;
				if(s_Probe->pos<s_F->pos)
				{
					b_Probe=s_Probe->next;
					continue;
				}
				if(s_Probe->pos>s_R->pos)
					break;
				if(s_Probe->pos+Probe->len>s_R->pos+R->len)
					continue;
	                        return 0;
			}
                }
        }
//minus
        b_R=R->specific;
	b_Probe=Probe->specific;
        for(s_F=F->specific;s_F;s_F=s_F->next)
        {
                if(s_F->minus!=1)
                        continue;
                for(s_R=b_R;s_R;s_R=s_R->next)
                {
                        if(s_R->gi<s_F->gi)
                        {
                                b_R=s_R->next;
                                continue;
                        }
                        if(s_R->gi>s_F->gi)
                                break;
                        if(s_R->pos>s_F->pos)
                                break;
                        if(s_R->pos-s_F->pos<-2000)
                        {
                                b_R=b_R->next;
                                continue;
                        }
                        if(s_R->plus!=1)
                                continue;

			for(s_Probe=b_Probe;s_Probe;s_Probe=s_Probe->next)
			{
				if(s_Probe->gi<s_F->gi)
				{
					b_Probe=s_Probe->next;
					continue;
				}
				if(s_Probe->gi>s_F->gi)
					break;
				if(s_Probe->pos-s_F->pos<-2000)
				{
					b_Probe=s_Probe->next;
					continue;
				}
				if(s_Probe->pos>s_F->pos)
					break;
				if(s_Probe->pos<s_R->pos)
					continue;
				if(s_Probe->pos+Probe->len>s_F->pos+F->len)
					continue;
	                        return 0;
			}
                }
        }
        return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, -0x40(%rbp)
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0xce3e
movq 0x38(%rsi), %r9
movq 0x28(%rdx), %r8
movq %rcx, %r10
movq %r8, %rbx
movq %r9, %r11
movq %rcx, -0x38(%rbp)
movq %r9, -0x30(%rbp)
cmpl $0x1, 0x8(%r10)
jne 0xcd86
testq %r11, %r11
je 0xcd86
movl 0x4(%r10), %r14d
movq %r11, %r15
movq %r15, %rax
cmpl %r14d, 0x4(%r15)
jl 0xcd1a
jg 0xcd86
movl (%r15), %r12d
movl (%r10), %r13d
movl %r12d, %eax
subl %r13d, %eax
jge 0xcd29
movq %r11, %rax
movq 0x10(%rax), %r11
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0xccfe
jmp 0xcd86
cmpl $0x7d0, %eax            # imm = 0x7D0
jg 0xcd86
cmpl $0x1, 0xc(%r15)
jne 0xcd1e
testq %rbx, %rbx
je 0xcd82
movq %r8, %rcx
movl 0x4(%rbx), %eax
movq %rbx, %r9
cmpl %r14d, %eax
jl 0xcd6c
jg 0xcd72
movl (%rbx), %edi
cmpl %r13d, %edi
jl 0xcd6c
cmpl %r12d, %edi
jg 0xcd72
addl 0x4(%rdx), %edi
movl 0x4(%rsi), %r8d
addl %r12d, %r8d
cmpl %r8d, %edi
jg 0xcd45
jmp 0xce45
movq 0x10(%rbx), %r9
jmp 0xcd45
movq %r9, %rbx
movq %rcx, %r8
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r9
jmp 0xcd1e
xorl %ebx, %ebx
jmp 0xcd1e
movq 0x10(%r10), %r10
testq %r10, %r10
jne 0xcce3
jmp 0xce35
cmpl $0x1, 0xc(%rcx)
jne 0xce31
testq %r9, %r9
je 0xce31
movl 0x4(%rcx), %esi
movq %r9, %r10
movq %r10, %rax
cmpl %esi, 0x4(%r10)
jl 0xcdd2
jg 0xce31
movl (%r10), %r11d
movl (%rcx), %ebx
movl %r11d, %eax
subl %ebx, %eax
jg 0xce31
cmpl $0xfffff830, %eax       # imm = 0xFFFFF830
jge 0xcde1
movq %r9, %rax
movq 0x10(%rax), %r9
movq 0x10(%r10), %r10
testq %r10, %r10
jne 0xcdb1
jmp 0xce31
cmpl $0x1, 0x8(%r10)
jne 0xcdd6
testq %r8, %r8
je 0xcdd6
movq %r8, %r14
cmpl %esi, 0x4(%r14)
jl 0xce07
jg 0xcdd6
movl (%r14), %eax
movl %eax, %edi
subl %ebx, %edi
cmpl $0xfffff830, %edi       # imm = 0xFFFFF830
jge 0xce16
movq 0x10(%r14), %r8
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xcdf0
jmp 0xcdd6
cmpl %ebx, %eax
jg 0xcdd6
cmpl %r11d, %eax
jl 0xce0b
addl 0x4(%rdx), %eax
movq -0x40(%rbp), %rdi
movl 0x4(%rdi), %edi
addl %ebx, %edi
cmpl %edi, %eax
jg 0xce0b
jmp 0xce45
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0xcd98
movl $0x1, %eax
jmp 0xce47
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq