// File: /workspace/github_c_makefile_star2_O0/sheneman[P]clearcut/dist.c
// Function: NJ_DNA_count_tt
void
NJ_DNA_count_tt(NJ_alignment *alignment,
		long int x,
		long int y,
		long int *transitions,
		long int *transversions,
		long int *residues) {

  long int tmp_transitions   = 0;
  long int tmp_transversions = 0;
  long int tmp_residues      = 0;
  char a, b;
  long int i;

  for(i=0;i<alignment->length;i++) {

    a = toupper(alignment->data[x*alignment->length+i]);
    b = toupper(alignment->data[y*alignment->length+i]);
    
    if( (a == 'A' && b == 'T') ||
	(a == 'T' && b == 'A') ||
	(a == 'A' && b == 'C') ||
	(a == 'C' && b == 'A') ||
	(a == 'T' && b == 'G') ||
	(a == 'G' && b == 'T') ||
	(a == 'C' && b == 'G') ||
	(a == 'G' && b == 'C') ) {
      tmp_transversions++;
    }
	
    if( (a == 'C' && b == 'T') ||
	(a == 'T' && b == 'C') ||
	(a == 'G' && b == 'A') ||
	(a == 'A' && b == 'G') ) {
      tmp_transitions++;
    }

    /* count the number of residues */
    if(a != NJ_AMBIGUITY_CHAR &&
       b != NJ_AMBIGUITY_CHAR ) {
      tmp_residues++;
    }

  }
  
  *transitions   = tmp_transitions;
  *transversions = tmp_transversions;
  
  if(residues) {
    *residues = tmp_residues;
  }
  
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x640d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x8(%rdx), %rcx
addq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2090
movb %al, -0x49(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x8(%rdx), %rcx
addq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x2090
movb %al, -0x4a(%rbp)
movsbl -0x49(%rbp), %eax
cmpl $0x41, %eax
jne 0x62fe
movsbl -0x4a(%rbp), %eax
cmpl $0x54, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x54, %eax
jne 0x6310
movsbl -0x4a(%rbp), %eax
cmpl $0x41, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x41, %eax
jne 0x6322
movsbl -0x4a(%rbp), %eax
cmpl $0x43, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x43, %eax
jne 0x6334
movsbl -0x4a(%rbp), %eax
cmpl $0x41, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x54, %eax
jne 0x6346
movsbl -0x4a(%rbp), %eax
cmpl $0x47, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x47, %eax
jne 0x6358
movsbl -0x4a(%rbp), %eax
cmpl $0x54, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x43, %eax
jne 0x636a
movsbl -0x4a(%rbp), %eax
cmpl $0x47, %eax
je 0x637c
movsbl -0x49(%rbp), %eax
cmpl $0x47, %eax
jne 0x6388
movsbl -0x4a(%rbp), %eax
cmpl $0x43, %eax
jne 0x6388
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movsbl -0x49(%rbp), %eax
cmpl $0x43, %eax
jne 0x639a
movsbl -0x4a(%rbp), %eax
cmpl $0x54, %eax
je 0x63d0
movsbl -0x49(%rbp), %eax
cmpl $0x54, %eax
jne 0x63ac
movsbl -0x4a(%rbp), %eax
cmpl $0x43, %eax
je 0x63d0
movsbl -0x49(%rbp), %eax
cmpl $0x47, %eax
jne 0x63be
movsbl -0x4a(%rbp), %eax
cmpl $0x41, %eax
je 0x63d0
movsbl -0x49(%rbp), %eax
cmpl $0x41, %eax
jne 0x63dc
movsbl -0x4a(%rbp), %eax
cmpl $0x47, %eax
jne 0x63dc
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movsbl -0x49(%rbp), %eax
cmpl $0x3f, %eax
je 0x63fa
movsbl -0x4a(%rbp), %eax
cmpl $0x3f, %eax
je 0x63fa
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x63fc
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x6290
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x6435
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)