// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/io.c
// Function: get_alphabet
inline static char*  get_alphabet(const char *T, off_t i, off_t size)
{
    char *alphabet = NULL;
    off_t _i = i;
    size_t count = 0;

    /* count number of letters first */
    while (i<size) {
        if (T[i] == '\n' || T[i] == '\r' || T[i] == '#') {
            break;
        }
        else if (T[i] == ' ' || T[i] == '\t') {
            /* ignore newline */
        }
        else if (isalpha(T[i]) || T[i] == '*') {
            ++count;
        }
        else {
            return NULL;
        }
        ++i;
    }

    if (0 == count) {
        return NULL;
    }

    alphabet = (char*)malloc(sizeof(char)*(count+1));
    if (NULL == alphabet) {
        perror("malloc");
        return NULL;
    }

    i = _i;
    count = 0;
    while (i<size) {
        if (T[i] == '\n' || T[i] == '\r' || T[i] == '#') {
            break;
        }
        else if (T[i] == ' ' || T[i] == '\t') {
            /* ignore newline */
        }
        else if (isalpha(T[i]) || T[i] == '*') {
            alphabet[count] = T[i];
            ++count;
        }
        else {
            return NULL;
        }
        ++i;
    }

    alphabet[count] = '\0';
    return alphabet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x1f6b1c
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x1f6a8d
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
je 0x1f6a8d
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x23, %eax
jne 0x1f6a92
jmp 0x1f6b1c
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x1f6ab4
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
jne 0x1f6ab6
jmp 0x1f6b09
callq 0x1f0170
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x1f6aec
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2a, %eax
jne 0x1f6afa
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1f6b07
movq $0x0, -0x8(%rbp)
jmp 0x1f6c6e
jmp 0x1f6b09
jmp 0x1f6b0b
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1f6a4c
xorl %eax, %eax
cmpq -0x38(%rbp), %rax
jne 0x1f6b31
movq $0x0, -0x8(%rbp)
jmp 0x1f6c6e
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x1f01c0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
jne 0x1f6b67
leaq 0xb0b01a(%rip), %rdi    # 0xd01b6f
callq 0x1f0120
movq $0x0, -0x8(%rbp)
jmp 0x1f6c6e
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x1f6c5a
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x1f6bb8
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
je 0x1f6bb8
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x23, %eax
jne 0x1f6bbd
jmp 0x1f6c5a
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x1f6bdf
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
jne 0x1f6be1
jmp 0x1f6c47
callq 0x1f0170
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x1f6c17
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2a, %eax
jne 0x1f6c3b
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1f6c45
movq $0x0, -0x8(%rbp)
jmp 0x1f6c6e
jmp 0x1f6c47
jmp 0x1f6c49
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1f6b77
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)