// File: /workspace/github_c_makefile_star2_O1/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 %rsi, -0x40(%rbp)
movq 0x38(%rsi), %r12
movq %rdx, -0x38(%rbp)
movq 0x28(%rdx), %rcx
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0xcefd
movq %rcx, %r10
movq %r12, %r9
movq %r12, -0x30(%rbp)
cmpl $0x1, 0x8(%rax)
jne 0xcef0
testq %r9, %r9
je 0xcef0
movl 0x4(%rax), %r11d
movq %r9, %rbx
movq %rbx, %r8
cmpl %r11d, 0x4(%rbx)
jl 0xce7d
jg 0xcef0
movl (%rbx), %r14d
movl (%rax), %r15d
movl %r14d, %r8d
subl %r15d, %r8d
jge 0xce8c
movq %r9, %r8
movq 0x10(%r8), %r9
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0xce5d
jmp 0xcef0
cmpl $0x7d0, %r8d            # imm = 0x7D0
jg 0xcef0
cmpl $0x1, 0xc(%rbx)
jne 0xce81
testq %r10, %r10
je 0xce81
movq %rdi, %rsi
movl 0x4(%r10), %r13d
movq %r10, %r12
cmpl %r11d, %r13d
jl 0xceb9
jg 0xcee4
movl (%r10), %r8d
cmpl %r15d, %r8d
jge 0xcebf
movq 0x10(%r10), %r12
jmp 0xcedf
cmpl %r14d, %r8d
jg 0xcee4
movq -0x38(%rbp), %rdx
addl 0x4(%rdx), %r8d
movq -0x40(%rbp), %rdx
movl 0x4(%rdx), %edi
addl %r14d, %edi
cmpl %edi, %r8d
jle 0xcfb9
testq %r10, %r10
jne 0xceaa
movq %r12, %r10
movq %rsi, %rdi
movq -0x30(%rbp), %r12
jmp 0xce81
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0xce43
movq 0x38(%rdi), %rsi
movl $0x1, %eax
testq %rsi, %rsi
je 0xcfbb
cmpl $0x1, 0xc(%rsi)
jne 0xcfb0
testq %r12, %r12
je 0xcfb0
movl 0x4(%rsi), %r9d
movq %r12, %r10
movq %r10, %r8
cmpl %r9d, 0x4(%r10)
jl 0xcf4d
jg 0xcfb0
movl (%r10), %r11d
movl (%rsi), %ebx
movl %r11d, %r8d
subl %ebx, %r8d
jg 0xcfb0
cmpl $0xfffff830, %r8d       # imm = 0xFFFFF830
jge 0xcf5c
movq %r12, %r8
movq 0x10(%r8), %r12
movq 0x10(%r10), %r10
testq %r10, %r10
jne 0xcf29
jmp 0xcfb0
cmpl $0x1, 0x8(%r10)
jne 0xcf51
testq %rcx, %rcx
je 0xcf51
movq %rcx, %r14
cmpl %r9d, 0x4(%r14)
jl 0xcf83
jg 0xcf51
movl (%r14), %r15d
movl %r15d, %edx
subl %ebx, %edx
cmpl $0xfffff830, %edx       # imm = 0xFFFFF830
jge 0xcf92
movq 0x10(%r14), %rcx
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0xcf6b
jmp 0xcf51
cmpl %ebx, %r15d
jg 0xcf51
cmpl %r11d, %r15d
jl 0xcf87
movq -0x38(%rbp), %rdx
addl 0x4(%rdx), %r15d
movl 0x4(%rdi), %edx
addl %ebx, %edx
cmpl %edx, %r15d
jg 0xcf87
jmp 0xcfb9
movq 0x10(%rsi), %rsi
jmp 0xcf06
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq