// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/fillasn.c
// Function: MakeEnds
int MakeEnds(int *Beg1, int ResBeg1, int NeiBeg1, char *Beg1Cn, char ResBeg1Cn, int *End1, 
	     int ResEnd1, int NeiEnd1, char ResEnd1Cn, int *Beg2, int ResBeg2, int NeiBeg2, 
	     char *Beg2Cn, char ResBeg2Cn, int *End2, int ResEnd2, int NeiEnd2, 
	     char ResEnd2Cn, PATTERN **Pat, int NPat)
{

  register int i;
  int Flag1 = 0, Flag2 = 0;


  if( ResBeg1 <= NeiBeg1 && NeiBeg1 <= NeiEnd1 && NeiEnd1 <= ResEnd1 &&
      ResBeg2 <= NeiBeg2 && NeiBeg2 <= NeiEnd2 && NeiEnd2 <= ResEnd2 &&
      ResBeg1Cn == ResEnd1Cn && ResBeg2Cn == ResEnd2Cn ) {

    *Beg1 = ResBeg1;
    *End1 = ResEnd1;
    *Beg2 = ResBeg2;
    *End2 = ResEnd2;
    *Beg1Cn = ResBeg1Cn;
    *Beg2Cn = ResBeg2Cn;
    
    for( i=0; i<NPat && (Flag1 == 0 || Flag2 == 0); i++ ) {
      if( ( (Pat[i]->Hb1->Dnr->D_Res == (*Beg1) 
	     && Pat[i]->Hb1->Acc->A_Res == (*End2)
	     && Pat[i]->Hb1->Dnr->Chain->Id == (*Beg1Cn)
	     && Pat[i]->Hb1->Acc->Chain->Id == (*Beg2Cn) ) 
	   ||
	   (Pat[i]->Hb1->Acc->A_Res == (*Beg1) 
	    && Pat[i]->Hb1->Dnr->D_Res == (*End2) 
	    && Pat[i]->Hb1->Acc->Chain->Id == (*Beg1Cn)
	    && Pat[i]->Hb1->Dnr->Chain->Id == (*Beg2Cn) ) ) 
	 && Pat[i]->Hb1->Dnr->D_Res == Pat[i]->Hb2->Acc->A_Res 
	 && Pat[i]->Hb2->Dnr->D_Res == Pat[i]->Hb1->Acc->A_Res )
	Flag1 = 1; 
      if( ( (Pat[i]->Hb1->Dnr->D_Res == (*Beg2) 
	     && Pat[i]->Hb1->Acc->A_Res == (*End1) 
	     && Pat[i]->Hb1->Dnr->Chain->Id == (*Beg2Cn)
	     && Pat[i]->Hb1->Acc->Chain->Id == (*Beg1Cn) ) 
	   ||
	   (Pat[i]->Hb1->Acc->A_Res == (*Beg2) 
	    && Pat[i]->Hb1->Dnr->D_Res == (*End1) 
	    && Pat[i]->Hb1->Acc->Chain->Id == (*Beg2Cn)
	    && Pat[i]->Hb1->Dnr->Chain->Id == (*Beg1Cn) ) ) 
	 && Pat[i]->Hb1->Dnr->D_Res == Pat[i]->Hb2->Acc->A_Res 
	 && Pat[i]->Hb2->Dnr->D_Res == Pat[i]->Hb1->Acc->A_Res )
	Flag2 = 1; 
    }
    
    if( !Flag1 ) {
      if( *Beg1 != NeiBeg1 ) (*Beg1)++;
      if( *End2 != NeiEnd2 ) (*End2)--;
    }
    
    if( !Flag2 ) {
      if( *End1 != NeiEnd1 ) (*End1)--;
      if( *Beg2 != NeiBeg2 ) (*Beg2)++;
    }
    return(SUCCESS);
  }
  
  return(FAILURE);
}

// Assembly:
movb %r8b, %al
movl 0x70(%rsp), %r8d
movq 0x68(%rsp), %r8
movb 0x60(%rsp), %r8b
movl 0x58(%rsp), %r8d
movl 0x50(%rsp), %r8d
movq 0x48(%rsp), %r8
movb 0x40(%rsp), %r8b
movq 0x38(%rsp), %r8
movl 0x30(%rsp), %r8d
movl 0x28(%rsp), %r8d
movq 0x20(%rsp), %r8
movb 0x18(%rsp), %r8b
movl 0x10(%rsp), %r8d
movl 0x8(%rsp), %r8d
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl %edx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movb %al, -0x21(%rsp)
movq %r9, -0x30(%rsp)
movl $0x0, -0x38(%rsp)
movl $0x0, -0x3c(%rsp)
movl -0x14(%rsp), %eax
cmpl -0x18(%rsp), %eax
jg 0x16dde
movl -0x18(%rsp), %eax
cmpl 0x10(%rsp), %eax
jg 0x16dde
movl 0x10(%rsp), %eax
cmpl 0x8(%rsp), %eax
jg 0x16dde
movl 0x28(%rsp), %eax
cmpl 0x30(%rsp), %eax
jg 0x16dde
movl 0x30(%rsp), %eax
cmpl 0x58(%rsp), %eax
jg 0x16dde
movl 0x58(%rsp), %eax
cmpl 0x50(%rsp), %eax
jg 0x16dde
movsbl -0x21(%rsp), %eax
movsbl 0x18(%rsp), %ecx
cmpl %ecx, %eax
jne 0x16dde
movsbl 0x40(%rsp), %eax
movsbl 0x60(%rsp), %ecx
cmpl %ecx, %eax
jne 0x16dde
movl -0x14(%rsp), %ecx
movq -0x10(%rsp), %rax
movl %ecx, (%rax)
movl 0x8(%rsp), %ecx
movq -0x30(%rsp), %rax
movl %ecx, (%rax)
movl 0x28(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl 0x50(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, (%rax)
movb -0x21(%rsp), %cl
movq -0x20(%rsp), %rax
movb %cl, (%rax)
movb 0x40(%rsp), %cl
movq 0x38(%rsp), %rax
movb %cl, (%rax)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %ecx
xorl %eax, %eax
cmpl 0x70(%rsp), %ecx
movb %al, -0x3d(%rsp)
jge 0x16a07
movb $0x1, %al
cmpl $0x0, -0x38(%rsp)
movb %al, -0x3e(%rsp)
je 0x169ff
cmpl $0x0, -0x3c(%rsp)
sete %al
movb %al, -0x3e(%rsp)
movb -0x3e(%rsp), %al
movb %al, -0x3d(%rsp)
movb -0x3d(%rsp), %al
testb $0x1, %al
jne 0x16a14
jmp 0x16d5e
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16aa8
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %eax
movq 0x48(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16aa8
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq -0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16aa8
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq 0x38(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x16b44
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %eax
movq -0x10(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16bb0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x48(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16bb0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq -0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16bb0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq 0x38(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16bb0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x68(%rsp), %rcx
movslq -0x34(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x16bb0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x68(%rsp), %rcx
movslq -0x34(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x16bb0
movl $0x1, -0x38(%rsp)
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16c44
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %eax
movq -0x30(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16c44
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq 0x38(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16c44
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq -0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x16ce0
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x8(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16d4c
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq -0x30(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16d4c
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq 0x38(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16d4c
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movsbl 0x40(%rax), %eax
movq -0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x16d4c
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x68(%rsp), %rcx
movslq -0x34(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x16d4c
movq 0x68(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movq 0x68(%rsp), %rcx
movslq -0x34(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x16d4c
movl $0x1, -0x3c(%rsp)
jmp 0x16d4e
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x169d6
cmpl $0x0, -0x38(%rsp)
jne 0x16d99
movq -0x10(%rsp), %rax
movl (%rax), %eax
cmpl -0x18(%rsp), %eax
je 0x16d7e
movq -0x10(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x48(%rsp), %rax
movl (%rax), %eax
cmpl 0x58(%rsp), %eax
je 0x16d97
movq 0x48(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x16d99
cmpl $0x0, -0x3c(%rsp)
jne 0x16dd4
movq -0x30(%rsp), %rax
movl (%rax), %eax
cmpl 0x10(%rsp), %eax
je 0x16db9
movq -0x30(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movl (%rax), %eax
cmpl 0x30(%rsp), %eax
je 0x16dd2
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x16dd4
movl $0x1, -0x4(%rsp)
jmp 0x16de6
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)