// File: /workspace/github_c_makefile_star2_O0/WojciechMula[P]pyahocorasick/src/AutomatonSearchIter.c
// Function: automaton_search_iter_next
static PyObject*
automaton_search_iter_next(PyObject* self) {
    PyObject* output;

    if (iter->version != iter->automaton->version) {
        PyErr_SetString(PyExc_ValueError, "underlaying automaton has changed, iterator is not valid anymore");
        return NULL;
    }

return_output:
    switch (automaton_build_output(self, &output)) {
        case OutputValue:
            return output;

        case OutputNone:
            break;

        case OutputError:
            return NULL;
    }

#ifdef VARIABLE_LEN_CHARCODES
    if (!automaton_search_iter_advance_index(self)) {
        return NULL;
    }
#else
    iter->index += 1;
    if (iter->ignore_white_space) {
        while ((iter->index < iter->end) and iswspace(iter->input.word[iter->index])) {
            iter->index += 1;
        }
    }
#endif
    while (iter->index < iter->end) {
        // process single char
        iter->state = ahocorasick_next(
                        iter->state,
                        iter->automaton->root,
                        iter->input.word[iter->index]
                        );

        ASSERT(iter->state);

        iter->output = iter->state;
        goto return_output;

#ifdef VARIABLE_LEN_CHARCODES
        if (!automaton_search_iter_advance_index(self)) {
            return NULL;
        }
#else
        iter->index += 1;
#endif

    } // while

    return NULL;    // StopIteration
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x30(%rcx), %eax
je 0x99e3
movq 0x85c1(%rip), %rax      # 0x11f88
movq (%rax), %rdi
leaq 0x5103(%rip), %rsi      # 0xead4
callq 0x3120
movq $0x0, -0x8(%rbp)
jmp 0x9b63
jmp 0x99e5
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x9b70
movl %eax, %ecx
movl %ecx, -0x1c(%rbp)
testl %eax, %eax
je 0x9a11
jmp 0x99fd
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x9a1e
jmp 0x9a07
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x9a20
jmp 0x9a2d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9b63
jmp 0x9a2d
movq $0x0, -0x8(%rbp)
jmp 0x9b63
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
testb $0x1, 0x68(%rax)
je 0x9a9e
jmp 0x9a49
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq 0x60(%rdx), %rcx
movb %al, -0x1d(%rbp)
jge 0x9a81
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movl (%rax,%rcx,4), %edi
callq 0x3290
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x9a8a
jmp 0x9a9c
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
jmp 0x9a49
jmp 0x9a9e
jmp 0x9aa0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jge 0x9b5b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movl (%rax,%rcx,4), %edx
callq 0x97c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x9b44
movq 0x84f9(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x2507(%rip), %rsi      # 0xc010
leaq 0x5005(%rip), %rdx      # 0xeb15
leaq 0x5018(%rip), %rcx      # 0xeb2f
movl $0x11c, %r8d            # imm = 0x11C
leaq 0x5026(%rip), %r9       # 0xeb4a
movb $0x0, %al
callq 0x31b0
movq 0x84c6(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
callq 0x3230
movl $0x1, %edi
callq 0x3310
jmp 0x9b46
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0x99e5
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)