// File: /workspace/github_c_makefile_star2_O2/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 0x38(%rsi), %r8
movq %rdx, -0x30(%rbp)
movq 0x28(%rdx), %r9
movq %rdi, -0x38(%rbp)
leaq 0x38(%rdi), %rcx
movq %rcx, %rax
movq %r8, %r10
movq %r9, %r11
movq (%rax), %rax
testq %rax, %rax
je 0xba90
cmpl $0x1, 0x8(%rax)
jne 0xba87
movq %r10, %rbx
testq %r10, %r10
je 0xba84
movl 0x4(%rax), %r14d
movq %r10, %rdi
cmpl %r14d, 0x4(%r10)
jl 0xba26
jg 0xba84
movl (%r10), %r15d
movl (%rax), %r12d
movl %r15d, %edi
subl %r12d, %edi
jge 0xba30
movq %rbx, %rdi
movq 0x10(%rdi), %rbx
movq 0x10(%r10), %r10
jmp 0xba01
cmpl $0x7d0, %edi            # imm = 0x7D0
jg 0xba84
cmpl $0x1, 0xc(%r10)
jne 0xba2a
movq %r11, %rdx
testq %r11, %r11
je 0xba7f
cmpl %r14d, 0x4(%r11)
jl 0xba74
jg 0xba7a
movl (%r11), %r13d
cmpl %r12d, %r13d
jl 0xba74
cmpl %r15d, %r13d
jg 0xba7a
movq -0x30(%rbp), %rdi
addl 0x4(%rdi), %r13d
movl 0x4(%rsi), %edi
addl %r15d, %edi
cmpl %edi, %r13d
jg 0xba42
jmp 0xbb4b
movq 0x10(%r11), %rdx
jmp 0xba42
movq %rdx, %r11
jmp 0xba2a
xorl %r11d, %r11d
jmp 0xba2a
movq %rbx, %r10
addq $0x10, %rax
jmp 0xb9e8
movl $0x1, %eax
movq (%rcx), %rcx
testq %rcx, %rcx
je 0xbb4d
cmpl $0x1, 0xc(%rcx)
jne 0xbb42
movq %r8, %rsi
testq %r8, %r8
je 0xbb3f
movl 0x4(%rcx), %r10d
movq %r8, %rdi
cmpl %r10d, 0x4(%r8)
jl 0xbadd
jg 0xbb3f
movl (%r8), %r11d
movl (%rcx), %ebx
movl %r11d, %edi
subl %ebx, %edi
jg 0xbb3f
cmpl $0xfffff830, %edi       # imm = 0xFFFFF830
jge 0xbae7
movq %rsi, %rdi
movq 0x10(%rdi), %rsi
movq 0x10(%r8), %r8
jmp 0xbaae
cmpl $0x1, 0x8(%r8)
jne 0xbae1
movq %r9, %r14
testq %r9, %r9
je 0xbb3a
cmpl %r10d, 0x4(%r9)
jl 0xbb0e
jg 0xbb3a
movl (%r9), %r15d
movl %r15d, %edx
subl %ebx, %edx
cmpl $0xfffff830, %edx       # imm = 0xFFFFF830
jge 0xbb18
movq 0x10(%r9), %r14
movq 0x10(%r9), %r9
jmp 0xbaf1
cmpl %ebx, %r15d
jg 0xbb3a
cmpl %r11d, %r15d
jl 0xbb12
movq -0x30(%rbp), %rdx
addl 0x4(%rdx), %r15d
movq -0x38(%rbp), %rdx
movl 0x4(%rdx), %edx
addl %ebx, %edx
cmpl %edx, %r15d
jg 0xbb12
jmp 0xbb4b
movq %r14, %r9
jmp 0xbae1
movq %rsi, %r8
addq $0x10, %rcx
jmp 0xba95
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq