// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-bentsedg.c
// Function: medianof3cmpcharbychar
static GtUword medianof3cmpcharbychar(const GtBentsedgresources *bsr,
                                            GtUword subbucketleft,
                                            GtUword depth,
                                            GtUword a,
                                            GtUword b,
                                            GtUword c)
{
  GtUword vala, valb, valc, cptr;
  GtUchar tmpavar, tmpbvar;

  CMPCHARBYCHARPTR2INT(vala,subbucketleft,tmpavar,a);
  CMPCHARBYCHARPTR2INT(valb,subbucketleft,tmpbvar,b);
  if (vala == valb)
  {
    return a;
  }
  CMPCHARBYCHARPTR2INT(valc,subbucketleft,tmpavar,c);
  if (vala == valc || valb == valc)
  {
    return c;
  }
  return vala < valb ?
        (valb < valc ? b : (vala < valc ? c : a))
      : (valb > valc ? b : (vala < valc ? a : c));
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq %rdx, 0x88(%rsp)
movq %rcx, 0x80(%rsp)
movq %r8, 0x78(%rsp)
movq %r9, 0x70(%rsp)
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x90(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x2e9ec0
addq 0x88(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jae 0x2b6a2a
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x98(%rsp), %rax
movl 0x18(%rax), %edx
callq 0xa9da0
movb %al, 0x4f(%rsp)
movzbl %al, %eax
cmpl $0xfe, %eax
jge 0x2b6a2a
movzbl 0x4f(%rsp), %eax
movq %rax, 0x40(%rsp)
jmp 0x2b6a3a
movq 0x50(%rsp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x90(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x2e9ec0
addq 0x88(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jae 0x2b6aba
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x98(%rsp), %rax
movl 0x18(%rax), %edx
callq 0xa9da0
movb %al, 0x4e(%rsp)
movzbl %al, %eax
cmpl $0xfe, %eax
jge 0x2b6aba
movzbl 0x4e(%rsp), %eax
movq %rax, 0x38(%rsp)
jmp 0x2b6aca
movq 0x50(%rsp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jne 0x2b6af5
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x2b6c6c
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x90(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x2e9ec0
addq 0x88(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rcx
cmpq 0xb0(%rcx), %rax
jae 0x2b6b6b
movq 0x98(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x98(%rsp), %rax
movl 0x18(%rax), %edx
callq 0xa9da0
movb %al, 0x4f(%rsp)
movzbl %al, %eax
cmpl $0xfe, %eax
jge 0x2b6b6b
movzbl 0x4f(%rsp), %eax
movq %rax, 0x30(%rsp)
jmp 0x2b6b7b
movq 0x50(%rsp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
je 0x2b6b9d
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
jne 0x2b6baf
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x2b6c6c
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x2b6c0e
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x2b6bd3
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x2b6c02
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x2b6beb
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2b6bf8
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x2b6c5f
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
jbe 0x2b6c26
movq 0x78(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x2b6c55
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x2b6c41
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x2b6c4b
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
addq $0xa8, %rsp
retq
nopl (%rax)