// File: /workspace/github_c_makefile_star2_O2/josch[P]stride/elem.c
// Function: FullElement
int FullElement(char *Asn1, char *Asn2, char *Asn3, int Length, char SecStrType, int ElemLength,
		 char EditChar, int *YYN, int *NYY, int *YNN, int *NNY)
{

  register int i, j, Count1, Count2, Count3;
  int Beg, ElLength;

  *YYN = 0;
  *NYY = 0;
  *YNN = 0;
  *NNY = 0;

  if( ElemLength >= Length )
    return(0);

  ElLength = ElemLength-1;
  Count1 = 0;
  Count2 = 0;
  Count3 = 0;

  Beg = -1;
  
  for( i=1; i<Length; i++ ) {
    if( ( i == 0 && 
	  ( Asn1[i] == SecStrType && Asn2[i] == SecStrType && Asn3[i] == SecStrType) ||
          ( Asn1[i] != SecStrType && Asn2[i] != SecStrType && Asn3[i] != SecStrType) )
       ||
        ( i  > 0 && 
	  ( Asn1[i] != Asn1[i-1] || Asn2[i] != Asn2[i-1] || Asn3[i] != Asn3[i-1] ) )
       ||
        i == Length-1 ) {
      
      if( Count1 >= ElLength && Count2 >= ElLength && Count3 <  ElLength ) 
	(*YYN)++;
      else
      if( Count1 <  ElLength && Count2 >= ElLength && Count3 >= ElLength ) 
	(*NYY)++;
      else
      if( Count1 >= ElLength && Count2 <  ElLength && Count3 <  ElLength ) 
	(*YNN)++;
      else
      if( Count1 <  ElLength && Count2 <  ElLength && Count3 >= ElLength ) 
	(*NNY)++;
      
/*       if( Count1 >= ElLength || Count2 >= ElLength || Count3 >= ElLength ) {
 * 	for( j=Beg-1; j<i; j++ ) {
 * 	  Asn1[j] = 'X';
 * 	  Asn2[j] = 'X';
 * 	  Asn3[j] = 'X';
 * 	}
 *       }
 * 
 */
      if( Count1 >= ElLength && ( Count2 < ElLength || Count3 < ElLength ) )
	for( j=Beg-1; j<i; j++ )
	  Asn1[j] = EditChar;

      if( Count2 >= ElLength && ( Count1 < ElLength || Count3 < ElLength ) )
	for( j=Beg-1; j<i; j++ )
	  Asn2[j] = EditChar;

      if( Count3 >= ElLength && ( Count1 < ElLength || Count2 < ElLength ) )
	for( j=Beg-1; j<i; j++ )
	  Asn3[j] = EditChar;

      Count1 = 0;
      Count2 = 0;
      Count3 = 0;
      Beg = -1;
      
    }
    else {
      if( Asn1[i] == SecStrType ) Count1++;
      if( Asn2[i] == SecStrType ) Count2++;
      if( Asn3[i] == SecStrType ) Count3++;
      if( Beg == -1 && (Count1 == 1 || Count2 == 1 || Count3 == 1) ) Beg = i;
    }
  }	

  CorrectAsn(Asn1,Length,SecStrType,EditChar,ElLength);
  CorrectAsn(Asn2,Length,SecStrType,EditChar,ElLength);
  CorrectAsn(Asn3,Length,SecStrType,EditChar,ElLength);

  return( (*YYN) * (*NYY) * (*YNN) * (*NNY) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x68(%rsp), %rax
andl $0x0, (%rax)
movq 0x70(%rsp), %rax
andl $0x0, (%rax)
movq 0x78(%rsp), %rax
andl $0x0, (%rax)
movq 0x80(%rsp), %rax
andl $0x0, (%rax)
xorl %eax, %eax
cmpl %ecx, %r9d
jge 0x1650e
movl %r9d, %ebx
movq %rdx, %r15
movq %rsi, %r12
movb 0x60(%rsp), %al
decl %ebx
leal -0x1(%rcx), %edx
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movslq %ecx, %r11
pushq $-0x1
popq %rcx
xorl %r10d, %r10d
pushq $0x1
popq %r9
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %rcx, 0x10(%rsp)
cmpq %r11, %r9
jge 0x164a9
movb (%rdi,%r9), %cl
cmpb %r8b, %cl
je 0x1630d
cmpb %r8b, (%r12,%r9)
je 0x1630d
cmpb %r8b, (%r15,%r9)
jne 0x1634b
cmpb -0x1(%r9,%rdi), %cl
jne 0x1634b
movb (%r12,%r9), %sil
cmpb -0x1(%r12,%r9), %sil
jne 0x1634b
movb (%r15,%r9), %dl
movb %dl, 0xf(%rsp)
cmpb -0x1(%r15,%r9), %dl
setne %dl
cmpq 0x20(%rsp), %r9
movq %r11, %r14
sete %r11b
orb %dl, %r11b
cmpb $0x1, %r11b
movq %r14, %r11
jne 0x16461
cmpl %ebx, %r10d
setl %dl
cmpl %ebx, %r13d
setl %cl
orb %dl, %cl
jne 0x1639a
cmpl %ebx, %ebp
jge 0x1639a
cmpl %ebx, %r10d
setge %r14b
movq 0x68(%rsp), %rdx
incl (%rdx)
cmpl %ebx, %ebp
setl %sil
cmpl %ebx, %r13d
setl %dl
testb %r14b, %r14b
je 0x163b3
orb %sil, %dl
je 0x163b3
movq 0x10(%rsp), %rdx
decl %edx
movslq %edx, %rsi
cmpq %r9, %rsi
jge 0x163b3
movb %al, (%rdi,%rsi)
incq %rsi
jmp 0x1638d
cmpl %ebx, %r10d
setge %r14b
jge 0x16419
cmpl %ebx, %r13d
jl 0x16419
cmpl %ebx, %ebp
jl 0x16419
movq 0x70(%rsp), %rdx
incl (%rdx)
cmpl %ebx, %ebp
setl %sil
cmpl %ebx, %r10d
setl %dl
cmpl %ebx, %r13d
jl 0x163e1
orb %sil, %dl
je 0x163e1
movq 0x10(%rsp), %rdx
decl %edx
movslq %edx, %rsi
cmpq %r9, %rsi
jge 0x163e1
movb %al, (%r12,%rsi)
incq %rsi
jmp 0x163d3
xorl %r10d, %r10d
cmpl %ebx, %ebp
jl 0x16404
testb %cl, %cl
je 0x16404
movq 0x10(%rsp), %rcx
decl %ecx
movslq %ecx, %rcx
cmpq %r9, %rcx
jge 0x16404
movb %al, (%r15,%rcx)
incq %rcx
jmp 0x163f6
xorl %r13d, %r13d
xorl %ebp, %ebp
pushq $-0x1
popq %rcx
movq %rcx, 0x10(%rsp)
incq %r9
jmp 0x162ef
cmpl %ebx, %r13d
setl %dl
andb %r14b, %dl
cmpb $0x1, %dl
jne 0x1643a
cmpl %ebx, %ebp
jge 0x1643a
movq 0x78(%rsp), %rdx
incl (%rdx)
movb $0x1, %r14b
jmp 0x1636d
cmpl %ebx, %r10d
jge 0x1636d
cmpl %ebx, %r13d
jge 0x1636d
cmpl %ebx, %ebp
jl 0x1636d
movq 0x80(%rsp), %rdx
jmp 0x1636b
xorl %edx, %edx
cmpb %r8b, %cl
sete %dl
addl %edx, %r10d
xorl %ecx, %ecx
cmpb %r8b, %sil
sete %cl
addl %ecx, %r13d
xorl %ecx, %ecx
cmpb %r8b, 0xf(%rsp)
sete %cl
addl %ecx, %ebp
cmpl $-0x1, 0x10(%rsp)
jne 0x16411
cmpl $0x1, %ebp
pushq $-0x1
popq %rcx
cmovel %r9d, %ecx
cmpl $0x1, %r13d
cmovel %r9d, %ecx
cmpl $0x1, %r10d
cmovel %r9d, %ecx
jmp 0x1640c
movsbl %r8b, %ebp
movsbl %al, %r13d
movq 0x18(%rsp), %r14
movl %r14d, %esi
movl %ebp, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x173ec
movq %r12, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x173ec
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x173ec
movq 0x70(%rsp), %rax
movl (%rax), %eax
movq 0x68(%rsp), %rcx
imull (%rcx), %eax
movq 0x78(%rsp), %rcx
imull (%rcx), %eax
movq 0x80(%rsp), %rcx
imull (%rcx), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq