// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/traceback.c
// Function: match_char
static inline char match_char(
        const char *seqA,
        int ai,
        const char *seqB,
        int bi,
        const parasail_matrix_t *matrix,
        char match,
        char pos,
        char neg,
        int case_sensitive,
        const char *alphabet_aliases,
        size_t aliases_size)
{
    char a = missing_char(seqA, ai);
    char b = seqB[bi];
    int matches = case_sensitive ? (a == b) : (toupper(a) == toupper(b));
    if (NULL != alphabet_aliases) {
        size_t i;
        for (i=0; i<aliases_size; i+=1) {
            if (alphabet_aliases[i] == a) {
                matches |= alphabet_aliases[i+1] == b;
            }
            else if (alphabet_aliases[i+1] == a) {
                matches |= alphabet_aliases[i] == b;
            }
        }
    }
    if (matches) {
        return match;
    }
    else {
        int sub = 0;
        if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
            sub = matrix->matrix[matrix->mapper[(unsigned char)a]*matrix->size + matrix->mapper[(unsigned char)b]];
        }
        else {
            sub = matrix->matrix[ai*matrix->size + matrix->mapper[(unsigned char)b]];
        }
        if (sub > 0) {
            return pos;
        }
        else {
            return neg;
        }
    }

    return 'X'; /* shouldn't happen */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r9b, %al
movq 0x30(%rbp), %r9
movq 0x28(%rbp), %r9
movl 0x20(%rbp), %r9d
movb 0x18(%rbp), %r9b
movb 0x10(%rbp), %r9b
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3b6400
movb %al, -0x32(%rbp)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x33(%rbp)
cmpl $0x0, 0x20(%rbp)
je 0x3b649e
movsbl -0x32(%rbp), %eax
movsbl -0x33(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
jmp 0x3b64c5
movsbl -0x32(%rbp), %edi
callq 0x2af570
movl %eax, -0x4c(%rbp)
movsbl -0x33(%rbp), %edi
callq 0x2af570
movl %eax, %ecx
movl -0x4c(%rbp), %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
xorl %eax, %eax
cmpq 0x28(%rbp), %rax
je 0x3b6570
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq 0x30(%rbp), %rax
jae 0x3b656e
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3b6524
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
movsbl -0x33(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x3b655b
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %eax
movsbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3b6559
movq 0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x33(%rbp), %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
orl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x3b655b
jmp 0x3b655d
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3b64df
jmp 0x3b6570
cmpl $0x0, -0x38(%rbp)
je 0x3b6581
movb -0x31(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3b660a
movl $0x0, -0x44(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x3b65cb
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
movzbl -0x32(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movq -0x30(%rbp), %rdx
imull 0x18(%rdx), %ecx
movq -0x30(%rbp), %rdx
movq 0x10(%rdx), %rdx
movzbl -0x33(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
jmp 0x3b65f6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rdx
imull 0x18(%rdx), %ecx
movq -0x30(%rbp), %rdx
movq 0x10(%rdx), %rdx
movzbl -0x33(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jle 0x3b6604
movb 0x10(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x3b660a
movb 0x18(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)