// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/align.c
// Function: Check_Trace_Points
int Check_Trace_Points(Overlap *ovl, int tspace, int verbose, char *fname)
{ int i, p, q; 

  if (tspace != 0)
    { if (((ovl->path.aepos-1)/tspace - ovl->path.abpos/tspace)*2 != ovl->path.tlen-2)
        { if (verbose) 
            EPRINTF(EPLACE,"  %s: Wrong number of trace points\n",fname);
          return (1);
        }         
      p = ovl->path.bbpos;
      if (tspace <= TRACE_XOVR)
        { uint8 *trace8 = (uint8 *) ovl->path.trace;
          for (i = 1; i < ovl->path.tlen; i += 2)
            p += trace8[i];
        }
      else      
        { uint16 *trace16 = (uint16 *) ovl->path.trace;
          for (i = 1; i < ovl->path.tlen; i += 2)
            p += trace16[i];
        }
      if (p != ovl->path.bepos)
        { if (verbose)
            EPRINTF(EPLACE,"  %s: Trace point sum != aligned interval\n",fname);
          return (1); 
        }         
    }
  else
    { uint16 *trace16 = (uint16 *) ovl->path.trace;

      p = ovl->path.bbpos;
      q = ovl->path.abpos;
      for (i = 1; i < ovl->path.tlen; i += 2)
        { p += trace16[i];
          q += trace16[i-1];
        }
      if (p != ovl->path.bepos || q != ovl->path.aepos)
        { if (verbose)
            EPRINTF(EPLACE,"  %s: Trace point sum != aligned interval\n",fname);
          return (1); 
        }         
    }
  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xdf2a
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
subl $0x1, %eax
cltd
idivl -0x14(%rbp)
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
cltd
idivl -0x14(%rbp)
movl %eax, %ecx
movl -0x4c(%rbp), %eax
subl %ecx, %eax
shll %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
je 0xde61
cmpl $0x0, -0x18(%rbp)
je 0xde55
movq 0x1d1b8(%rip), %rax     # 0x2aff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x18724(%rip), %rsi     # 0x26572
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0xdfdc
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
cmpl $0x7d, -0x14(%rbp)
jg 0xdeae
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xdeac
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzbl (%rax,%rcx), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0xde83
jmp 0xdeeb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xdee9
movq -0x40(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0xdec0
jmp 0xdeeb
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
je 0xdf25
cmpl $0x0, -0x18(%rbp)
je 0xdf19
movq 0x1d0f4(%rip), %rax     # 0x2aff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x18684(%rip), %rsi     # 0x26596
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0xdfdc
jmp 0xdfd5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xdf90
movq -0x48(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x48(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0xdf50
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0xdfa8
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
je 0xdfd3
cmpl $0x0, -0x18(%rbp)
je 0xdfca
movq 0x1d043(%rip), %rax     # 0x2aff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0x185d3(%rip), %rsi     # 0x26596
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0xdfdc
jmp 0xdfd5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)