// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/elem.c
// Function: CompareElements
int CompareElements(char *Asn1, char *Asn2, char *Asn3, int Length, 
		   char SecStrType, int *Better, int *Worse)
{

  register int i, j, Count1, Count2;
  int TotalNumber = 0, Beg;

  *Better = 0;
  *Worse = 0;

  Beg = -1;
  
  for( i=0; i<Length; i++ ) {
    if( (Asn1[i] == SecStrType || Asn2[i] == SecStrType || Asn3[i] == SecStrType) &&
	(i == 0 || 
	 ( Asn1[i-1] != SecStrType && Asn2[i-1] != SecStrType && Asn3[i-1] != SecStrType) ) ) {
      TotalNumber++;
      Beg = i;
    }
    else
    if( Beg != -1 && ( i == Length-1 || 
	 ( Asn1[i] != SecStrType && Asn2[i] != SecStrType && Asn3[i] != SecStrType ) ) ) {
      Count1 = Count2 = 0;
      for( j=Beg; j<=i; j++ ) {
	if( (Asn1[j] == SecStrType || Asn2[j] == SecStrType) && Asn1[j] != Asn2[j] ) 
	  Count1++;
	if( (Asn3[j] == SecStrType || Asn2[j] == SecStrType) && Asn3[j] != Asn2[j] ) 
	  Count2++;
      }
      if( Count1 > Count2 ) 
	(*Worse)++;
      else
      if( Count2 > Count1 ) 
	(*Better)++;
      Beg = -1;
    }
  }
  return(TotalNumber);
}

// Assembly:
movb %r8b, %al
movq 0x8(%rsp), %r8
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl %ecx, -0x1c(%rsp)
movb %al, -0x1d(%rsp)
movq %r9, -0x28(%rsp)
movl $0x0, -0x3c(%rsp)
movq -0x28(%rsp), %rax
movl $0x0, (%rax)
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl $0xffffffff, -0x40(%rsp) # imm = 0xFFFFFFFF
movl $0x0, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0x27829
movq -0x8(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27615
movq -0x10(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27615
movq -0x18(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
jne 0x27688
cmpl $0x0, -0x2c(%rsp)
je 0x27670
movq -0x8(%rsp), %rax
movl -0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27688
movq -0x10(%rsp), %rax
movl -0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27688
movq -0x18(%rsp), %rax
movl -0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27688
movl -0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rsp)
movl -0x2c(%rsp), %eax
movl %eax, -0x40(%rsp)
jmp 0x27817
cmpl $-0x1, -0x40(%rsp)
je 0x27815
movl -0x2c(%rsp), %eax
movl -0x1c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x276f3
movq -0x8(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27815
movq -0x10(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27815
movq -0x18(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27815
movl $0x0, -0x38(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x40(%rsp), %eax
movl %eax, -0x30(%rsp)
movl -0x30(%rsp), %eax
cmpl -0x2c(%rsp), %eax
jg 0x277dd
movq -0x8(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x27747
movq -0x10(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
jne 0x27772
movq -0x8(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x10(%rsp), %rcx
movslq -0x30(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x27772
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
movq -0x18(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
je 0x277a0
movq -0x10(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x1d(%rsp), %ecx
cmpl %ecx, %eax
jne 0x277cb
movq -0x18(%rsp), %rax
movslq -0x30(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x10(%rsp), %rcx
movslq -0x30(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x277cb
movl -0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rsp)
jmp 0x277cd
movl -0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rsp)
jmp 0x2770b
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jle 0x277f5
movq 0x8(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x2780d
movl -0x38(%rsp), %eax
cmpl -0x34(%rsp), %eax
jle 0x2780b
movq -0x28(%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x2780d
movl $0xffffffff, -0x40(%rsp) # imm = 0xFFFFFFFF
jmp 0x27817
jmp 0x27819
movl -0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rsp)
jmp 0x275c2
movl -0x3c(%rsp), %eax
retq
nop