LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/custompickle/load/loadbuffer.c
// Function: loadbuffer_load
int
loadbuffer_load(LoadBuffer* input, char* buffer, size_t size) {

    size_t read;

    ASSERT(input != NULL);
    ASSERT(buffer != NULL);

    if (UNLIKELY(size == 0)) {
        PyErr_SetString(PyExc_ValueError, "logic error: tried to read 0 bytes");
        return 0;
    }

    read = fread(buffer, 1, size, input->file);
    if (read != size) {
        PyErr_SetFromErrno(PyExc_IOError);
        return 0;
    }

    return 1;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4f6d
movq %rsi, %rax
testq %rsi, %rsi
je 0x4f72
movq %rdx, %rbx
testq %rdx, %rdx
je 0x4f66
movq 0x8(%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x30a0
movq %rax, %rcx
movl $0x1, %eax
cmpq %rbx, %rcx
je 0x4f64
movq 0xb046(%rip), %rax      # 0xffa0
movq (%rax), %rdi
callq 0x3090
xorl %eax, %eax
popq %rbx
retq
callq 0x3c00
jmp 0x4f62
callq 0x3c58
callq 0x3c16
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/custompickle/load/loadbuffer.c
// Function: loadbuffer_init
int
loadbuffer_init(LoadBuffer* input, CustompickleHeader* header, CustompickleFooter* footer) {

    long pos;
    int ret;

    ASSERT(input != NULL);
    ASSERT(header != NULL);
    ASSERT(footer != NULL);

    ret = loadbuffer_loadinto(input, header, CustompickleHeader);
    if (UNLIKELY(!ret)) {
        return 0;
    }

    pos = ftell(input->file);
    if (UNLIKELY(pos < 0)) {
        PyErr_SetFromErrno(PyExc_IOError);
        return 0;
    }

    ret = fseek(input->file, -(long int)sizeof(CustompickleFooter), SEEK_END);
    if (UNLIKELY(ret < 0)) {
        PyErr_SetFromErrno(PyExc_IOError);
        return 0;
    }

    ret = loadbuffer_loadinto(input, footer, CustompickleFooter);
    if (UNLIKELY(!ret)) {
        return 0;
    }

    ret = fseek(input->file, pos, SEEK_SET);
    if (UNLIKELY(ret < 0)) {
        PyErr_SetFromErrno(PyExc_IOError);
        return 0;
    }

    if (UNLIKELY(!custompickle_validate_header(header))) {
        PyErr_Format(PyExc_ValueError, "invalid header");
        return 0;
    }

    if (UNLIKELY(!custompickle_validate_footer(footer))) {
        PyErr_Format(PyExc_ValueError, "invalid footer");
        return 0;
    }

    input->store    = header->data.store;
    input->kind     = header->data.kind;
    input->size     = 0;
    input->capacity = footer->nodes_count;
    input->lookup   = (AddressPair*)memory_alloc(sizeof(AddressPair) * input->capacity);
    if (UNLIKELY(input->lookup == NULL)) {
        PyErr_NoMemory();
        return 0;
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x50a4
movq %rsi, %r15
testq %rsi, %rsi
je 0x50a9
movq %rdx, %r14
testq %rdx, %rdx
je 0x50ae
movq %rdi, %rbx
movl $0x30, %edx
movq %r15, %rsi
callq 0x4f1c
xorl %ebp, %ebp
testl %eax, %eax
je 0x506d
movq 0x8(%rbx), %rdi
callq 0x31c0
testq %rax, %rax
js 0x5078
movq %rax, %r12
movq 0x8(%rbx), %rdi
movq $-0x18, %rsi
movl $0x2, %edx
callq 0x3260
testl %eax, %eax
js 0x507f
movl $0x18, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4f1c
testl %eax, %eax
je 0x506d
movq 0x8(%rbx), %rdi
xorl %ebp, %ebp
movq %r12, %rsi
xorl %edx, %edx
callq 0x3260
testl %eax, %eax
js 0x5086
movq %r15, %rdi
callq 0x4bb4
testl %eax, %eax
je 0x508d
movdqu 0x8(%r14), %xmm0
pcmpeqb 0x3fd2(%rip), %xmm0     # 0x9000
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x5094
movl 0x14(%r15), %eax
movl %eax, 0x10(%rbx)
movl 0x10(%r15), %eax
movl %eax, 0x14(%rbx)
movq $0x0, 0x20(%rbx)
movq (%r14), %rdi
movq %rdi, 0x28(%rbx)
shlq $0x4, %rdi
callq 0x3370
movq %rax, 0x18(%rbx)
movl $0x1, %ebp
testq %rax, %rax
je 0x509b
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x3ce8
jmp 0x506d
callq 0x3cd9
jmp 0x506d
callq 0x3cca
jmp 0x506d
callq 0x3cb2
jmp 0x50a0
callq 0x3c9a
jmp 0x50a0
callq 0x30e0
xorl %ebp, %ebp
jmp 0x506d
callq 0x3d7b
callq 0x3d39
callq 0x3cf7
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/custompickle/load/loadbuffer.c
// Function: loadbuffer_close
void
loadbuffer_close(LoadBuffer* input) {

    TrieNode* node;
    size_t i;

    if (input->file != NULL) {
        fclose(input->file);
    }

    if (input->lookup) {
        for (i=0; i < input->size; i++) {
            node = input->lookup[i].current;

            if (node->eow && input->store == STORE_ANY) {
                Py_DECREF(node->output.object);
            }

            trienode_free(node);
        }

        memory_free(input->lookup);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x50e0
callq 0x3100
cmpq $0x0, 0x18(%rbx)
je 0x5142
cmpq $0x0, 0x20(%rbx)
je 0x512e
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq (%rax,%r15), %r14
cmpb $0x0, 0x14(%r14)
je 0x5119
cmpl $0x1e, 0x10(%rbx)
jne 0x5119
movq (%r14), %rdi
decq (%rdi)
jne 0x5119
callq 0x30d0
movq %r14, %rdi
callq 0x514e
incq %r12
addq $0x10, %r15
cmpq 0x20(%rbx), %r12
jb 0x50f7
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3070
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/trienode.c
// Function: trienode_free
static void
trienode_free(TrieNode* node) {

    ASSERT(node);

    if (node->n > 0) {
        memory_free(node->next);
    }

    memory_free(node);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x516f
movq %rdi, %rbx
cmpl $0x0, 0x10(%rdi)
je 0x5166
movq 0x18(%rbx), %rdi
callq 0x3070
movq %rbx, %rdi
popq %rbx
jmp 0x3070
callq 0x3dff
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/custompickle/load/loadbuffer.c
// Function: loadbuffer_dump
void
loadbuffer_dump(LoadBuffer* input, FILE* out) {

    AddressPair* pair;
    size_t i;

    for (i=0; i < input->size; i++) {
        pair = &(input->lookup[i]);
        fprintf(out, "%p -> %p\n", pair->original, pair->current);
    }
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x51ca
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %r12d
leaq 0x41a4(%rip), %r15      # 0x933b
xorl %r13d, %r13d
movq 0x18(%r14), %rax
movq -0x8(%rax,%r12), %rdx
movq (%rax,%r12), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x31b0
incq %r13
addq $0x10, %r12
cmpq 0x20(%r14), %r13
jb 0x519a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_contains
static int
automaton_contains(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    TrieNode* node;
    struct Input input;

    if (!prepare_input(self, args, &input)) {
        return -1;
    }

    node = trie_find(automaton->root, input.word, input.wordlen);

    destroy_input(&input);

    return (node and node->eow);
#undef automaton
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x471d
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
je 0x5699
movq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq (%r14), %rdx
movq 0x8(%r14), %rsi
callq 0x5764
movq %rax, %rbx
movq %r14, %rdi
callq 0x4a2c
xorl %eax, %eax
testq %rbx, %rbx
je 0x5699
cmpb $0x0, 0x14(%rbx)
setne %al
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/trie.c
// Function: trie_traverse_aux
static int
trie_traverse_aux(
    TrieNode* node,
    const int depth,
    trie_traverse_callback callback,
    void *extra
) {
    unsigned i;
    if (callback(node, depth, extra) == 0)
        return 0;

    for (i=0; i < node->n; i++) {
        if (trie_traverse_aux(trienode_get_ith_unsafe(node, i), depth + 1, callback, extra) == 0)
            return 0;
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
movq %rcx, %rdx
callq *%r14
testl %eax, %eax
je 0x5722
movl $0x1, %r15d
cmpl $0x0, 0x10(%r12)
je 0x5725
incl %ebp
xorl %r13d, %r13d
movq %r12, %rdi
movq %r13, %rsi
callq 0x5737
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x56c1
testl %eax, %eax
je 0x5722
incq %r13
movl 0x10(%r12), %eax
cmpq %rax, %r13
jb 0x56f4
jmp 0x5725
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/trie.c
// Function: trie_find
static TrieNode* PURE
trie_find(TrieNode* root, const TRIE_LETTER_TYPE* word, const size_t wordlen) {
    TrieNode* node;
    size_t i;

    node = root;

    if (node != NULL) {
        for (i=0; i < wordlen; i++) {
            node = trienode_get_next(node, word[i]);
            if (node == NULL)
                return NULL;
        }
    }

    return node;
}

// Assembly:
testq %rdi, %rdi
je 0x57b4
movq %rdi, %rax
testq %rdx, %rdx
je 0x57b3
xorl %ecx, %ecx
movl 0x10(%rax), %r8d
testq %r8, %r8
je 0x579d
movl (%rsi,%rcx,4), %edi
movq 0x18(%rax), %rax
shlq $0x2, %r8
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
cmpl %edi, (%rax,%r9)
je 0x57a1
addq $0xc, %r9
cmpq %r9, %r8
jne 0x578e
xorl %eax, %eax
jmp 0x57a6
movq 0x4(%rax,%r9), %rax
testq %rax, %rax
je 0x57b4
incq %rcx
cmpq %rdx, %rcx
jne 0x5773
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/trienode.c
// Function: trienode_get_next
static TrieNode* PURE
trienode_get_next(TrieNode* node, const TRIE_LETTER_TYPE letter) {

    unsigned i;
    Pair* next;

    ASSERT(node);
    next = (Pair*)node->next;

    for (i=0; i < node->n; i++)
        if (next[i].letter == letter) {
            return next[i].child;
        }

    return NULL;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x57e6
movl 0x10(%rdi), %ecx
testl %ecx, %ecx
je 0x57dd
movq 0x18(%rdi), %rdx
addq $0x4, %rdx
xorl %eax, %eax
cmpl %esi, -0x4(%rdx)
je 0x57e1
addq $0xc, %rdx
decl %ecx
jne 0x57ce
jmp 0x57e4
xorl %eax, %eax
jmp 0x57e4
movq (%rdx), %rax
popq %rcx
retq
callq 0x40b2
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_del
static void
automaton_del(PyObject* self) {
#define automaton ((Automaton*)self)
    automaton_clear(self, NULL);
    PyObject_Del(self);
#undef automaton
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl 0x14(%rbx), %esi
callq 0x585b
xorl %eax, %eax
movq %rax, 0x1c(%rbx)
movl $0x0, 0x10(%rbx)
movq %rax, 0x28(%rbx)
incl 0x30(%rbx)
movq 0xa7aa(%rip), %rax      # 0xffc0
incq (%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x3170
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_clear
static PyObject*
automaton_clear(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    clear_aux(automaton->root, automaton->store);
    automaton->count = 0;
    automaton->longest_word = 0;
    automaton->kind = EMPTY;
    automaton->root = NULL;
    automaton->version += 1;

    Py_RETURN_NONE;
#undef automaton
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl 0x14(%rbx), %esi
callq 0x585b
xorl %eax, %eax
movq %rax, 0x1c(%rbx)
movl $0x0, 0x10(%rbx)
movq %rax, 0x28(%rbx)
incl 0x30(%rbx)
movq 0xa76a(%rip), %rax      # 0xffc0
incq (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: clear_aux
static void
clear_aux(TrieNode* node, KeysStore store) {

    unsigned i;

    if (node) {
        switch (store) {
            case STORE_INTS:
            case STORE_LENGTH:
                // nop
                break;

            case STORE_ANY:
                if (node->eow && node->output.object)
                    Py_DECREF(node->output.object);
                break;
        }

        for (i=0; i < node->n; i++) {
            TrieNode* child = trienode_get_ith_unsafe(node, i);
            if (child != node) // avoid self-loops!
                clear_aux(child, store);
        }

        trienode_free(node);
    }
#undef automaton
}

// Assembly:
testq %rdi, %rdi
je 0x58cd
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x1e, %esi
jne 0x5889
cmpb $0x0, 0x14(%rbx)
je 0x5889
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5889
decq (%rdi)
jne 0x5889
callq 0x30d0
cmpl $0x0, 0x10(%rbx)
je 0x58bb
movl $0x4, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r14), %rdi
cmpq %rbx, %rdi
je 0x58ac
movl %ebp, %esi
callq 0x585b
incq %r15
movl 0x10(%rbx), %eax
addq $0xc, %r14
cmpq %rax, %r15
jb 0x5898
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x514e
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/AutomatonItemsIter.c
// Function: automaton_items_iter_del
static void
automaton_items_iter_del(PyObject* self) {
    memory_safefree(iter->buffer);
    memory_safefree(iter->pattern);
#ifndef AHOCORASICK_UNICODE
    memory_safefree(iter->char_buffer);
#endif

    list_delete(&iter->stack);
    Py_DECREF(iter->automaton);

    PyObject_Del(self);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x5c72
callq 0x3070
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x5c80
callq 0x3070
leaq 0x30(%rbx), %r14
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x5c9d
movq (%rdi), %r15
callq 0x3070
movq %r15, %rdi
testq %r15, %r15
jne 0x5c8d
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq 0x10(%rbx), %rdi
decq (%rdi)
jne 0x5cb2
callq 0x30d0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3170
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_remove_word
static PyObject*
automaton_remove_word(PyObject* self, PyObject* args) {
    PyObject* value;

    switch (automaton_remove_word_aux(self, args, &value)) {
        case FALSE:
            Py_RETURN_FALSE;
            break;

        case TRUE:
            if (automaton->store == STORE_ANY) {
                // value is meaningful
                Py_DECREF(value);
            }

            automaton->version += 1;
            automaton->count   -= 1;
            Py_RETURN_TRUE;
            break;

        case MEMORY_ERROR:
        default:
            return NULL;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x72e5
cmpl $0x2, %eax
je 0x6412
cmpl $0x1, %eax
jne 0x641e
cmpl $0x1e, 0x14(%rbx)
jne 0x6403
movq 0x8(%rsp), %rdi
decq (%rdi)
jne 0x6403
callq 0x30d0
incl 0x30(%rbx)
decl 0x1c(%rbx)
movq 0x9bb8(%rip), %rax      # 0xffc8
jmp 0x6419
movq 0x9b8f(%rip), %rax      # 0xffa8
incq (%rax)
jmp 0x6420
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_pop
static PyObject*
automaton_pop(PyObject* self, PyObject* args) {
    PyObject* value;

    switch (automaton_remove_word_aux(self, args, &value)) {
        case FALSE:
            PyErr_SetNone(PyExc_KeyError);
            return NULL;

        case TRUE:
            automaton->version += 1;
            automaton->count   -= 1;
            return value; // there's no need to increase refcount, the value was removed

        case MEMORY_ERROR:
        default:
            return NULL;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
callq 0x72e5
cmpl $0x1, %eax
je 0x6455
cmpl $0x2, %eax
jne 0x6451
movq 0x9b4f(%rip), %rax      # 0xff98
movq (%rax), %rdi
callq 0x3160
xorl %eax, %eax
jmp 0x6460
incl 0x30(%rbx)
decl 0x1c(%rbx)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_exists
static PyObject*
automaton_exists(PyObject* self, PyObject* args) {
    PyObject* word;

    word = F(PyTuple_GetItem)(args, 0);
    if (word)
        switch (automaton_contains(self, word)) {
            case 1:
                Py_RETURN_TRUE;

            case 0:
                Py_RETURN_FALSE;

            default:
                return NULL;
        }
    else
        return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x64a9
movq %r14, %rdi
movq %rax, %rsi
callq 0x564c
cmpl $0x1, %eax
je 0x649b
testl %eax, %eax
jne 0x64a7
movq 0x9b0f(%rip), %rbx      # 0xffa8
jmp 0x64a2
movq 0x9b26(%rip), %rbx      # 0xffc8
incq (%rbx)
jmp 0x64a9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_match
static PyObject*
automaton_match(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    TrieNode* node;
    struct Input input;

    if (!prepare_input_from_tuple(self, args, 0, &input)) {
        return NULL;
    }

    node = trie_find(automaton->root, input.word, input.wordlen);;

    destroy_input(&input);

    if (node)
        Py_RETURN_TRUE;
    else
        Py_RETURN_FALSE;
#undef automaton
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x6521
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x471d
testb %al, %al
je 0x6512
movq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %rbx
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
callq 0x5764
movq %rax, %r14
movq %rbx, %rdi
callq 0x4a2c
testq %r14, %r14
jne 0x6517
movq 0x9a98(%rip), %r14      # 0xffa8
jmp 0x651e
xorl %r14d, %r14d
jmp 0x6521
movq 0x9aaa(%rip), %r14      # 0xffc8
incq (%r14)
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_longest_prefix
static PyObject*
automaton_longest_prefix(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    int len;
    struct Input input;

    if (!prepare_input_from_tuple(self, args, 0, &input)) {
        return NULL;
    }

    len = trie_longest(automaton->root, input.word, input.wordlen);

    destroy_input(&input);

    return F(Py_BuildValue)("i", len);
#undef automaton
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x658b
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x471d
testb %al, %al
je 0x658b
movq (%rsp), %r14
testq %r14, %r14
je 0x6597
movq 0x8(%rsp), %r15
movq 0x28(%rbx), %rax
xorl %ebx, %ebx
movl (%r15,%rbx,4), %esi
movq %rax, %rdi
callq 0x57b7
testq %rax, %rax
je 0x6599
incq %rbx
cmpq %rbx, %r14
jne 0x656d
movq %r14, %rbx
jmp 0x6599
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %ebx, %ebx
movq %rsp, %rdi
callq 0x4a2c
leaq 0x575d(%rip), %rdi      # 0xbd05
movl %ebx, %esi
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3330
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_get
static PyObject*
automaton_get(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    struct Input input;
    PyObject* py_def;
    Py_ssize_t k;
    TrieNode* node;

    k = PyTuple_GET_SIZE(args);

    if (k < 1 || k > 2) {
        PyErr_Format(PyExc_TypeError, "get() takes one or two arguments (%ld given)", k);
        return NULL;
    }

    if (!prepare_input_from_tuple(self, args, 0, &input)) {
        return NULL;
    }

    node = trie_find(automaton->root, input.word, input.wordlen);

    destroy_input(&input);

    if (node and node->eow) {
        switch (automaton->store) {
            case STORE_INTS:
            case STORE_LENGTH:
                return F(Py_BuildValue)("i", node->output.integer);

            case STORE_ANY:
                Py_INCREF(node->output.object);
                return node->output.object;

            default:
                PyErr_SetNone(PyExc_ValueError);
                return NULL;
        }
    }
    else {
        py_def = F(PyTuple_GetItem)(args, 1);
        if (py_def) {
            Py_INCREF(py_def);
            return py_def;
        }
        else {
            PyErr_Clear();
            PyErr_SetNone(PyExc_KeyError);
            return NULL;
        }
    }
#undef automaton
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rsi), %rax
testb $0x4, 0xab(%rax)
je 0x66e9
movq %rsi, %rbx
movq 0x10(%rsi), %rdx
leaq -0x3(%rdx), %rax
cmpq $-0x3, %rax
ja 0x6607
movq 0x99a2(%rip), %rax      # 0xff90
movq (%rax), %rdi
leaq 0x516a(%rip), %rsi      # 0xb762
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x3300
jmp 0x66da
movq %rdi, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x66da
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x471d
testb %al, %al
je 0x66d7
movq 0x28(%r14), %rdi
leaq 0x8(%rsp), %r12
movq (%r12), %rdx
movq 0x8(%r12), %rsi
callq 0x5764
movq %rax, %r15
movq %r12, %rdi
callq 0x4a2c
testq %r15, %r15
je 0x6695
cmpb $0x0, 0x14(%r15)
je 0x6695
movl 0x14(%r14), %eax
cmpl $0xa, %eax
je 0x6679
cmpl $0x1e, %eax
je 0x66bd
cmpl $0x14, %eax
jne 0x66c8
movq (%r15), %rsi
leaq 0x5682(%rip), %rdi      # 0xbd05
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3330
movl $0x1, %esi
movq %rbx, %rdi
callq 0x3140
testq %rax, %rax
je 0x66af
movq %rax, %r15
incq (%rax)
jmp 0x66da
callq 0x3190
movq 0x98dd(%rip), %rax      # 0xff98
jmp 0x66cf
movq (%r15), %rax
incq (%rax)
movq (%r15), %r15
jmp 0x66da
movq 0x98b9(%rip), %rax      # 0xff88
movq (%rax), %rdi
callq 0x3160
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2a28(%rip), %rdi      # 0x9118
leaq 0x502b(%rip), %rsi      # 0xb722
leaq 0x5034(%rip), %rcx      # 0xb732
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x3130
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_get_stats
static PyObject*
automaton_get_stats(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)

    PyObject* dict;

    if (automaton->stats.version != automaton->version)
        get_stats(automaton);

    dict = F(Py_BuildValue)(
        "{s:k,s:k,s:k,s:k,s:i,s:k}",
        "nodes_count",  automaton->stats.nodes_count,
        "words_count",  automaton->stats.words_count,
        "longest_word", automaton->stats.longest_word,
        "links_count",  automaton->stats.links_count,
        "sizeof_node",  automaton->stats.sizeof_node,
        "total_size",   automaton->stats.total_size
    );
    return dict;
#undef automaton
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl 0x30(%rdi), %eax
je 0x6ecb
movq %rbx, %rdi
callq 0x7db6
movq 0x40(%rbx), %rdx
movq 0x48(%rbx), %r8
subq $0x8, %rsp
leaq 0x4e16(%rip), %r10      # 0xbcf4
leaq 0x4e03(%rip), %r11      # 0xbce8
leaq 0x4df0(%rip), %r14      # 0xbcdc
leaq 0x4daa(%rip), %rdi      # 0xbc9d
leaq 0x4dbd(%rip), %rsi      # 0xbcb7
leaq 0x4dc2(%rip), %rcx      # 0xbcc3
leaq 0x4dc7(%rip), %r9       # 0xbccf
xorl %eax, %eax
pushq 0x68(%rbx)
pushq %r10
pushq 0x60(%rbx)
pushq %r11
pushq 0x58(%rbx)
pushq %r14
pushq 0x50(%rbx)
callq 0x3330
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton_dump
static PyObject*
automaton_dump(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    DumpAux dump;

    if (automaton->kind == EMPTY)
        Py_RETURN_NONE;

    dump.nodes = 0;
    dump.edges = 0;
    dump.fail  = 0;
    dump.error = 0;

    dump.nodes = F(PyList_New)(0);
    dump.edges = F(PyList_New)(0);
    dump.fail  = F(PyList_New)(0);
    if (dump.edges == NULL or dump.fail == NULL or dump.nodes == NULL)
        goto error;

    trie_traverse(automaton->root, dump_aux, &dump);
    if (dump.error)
        goto error;
    else
        return F(Py_BuildValue)("OOO", dump.nodes, dump.edges, dump.fail);

error:
    Py_XDECREF(dump.nodes);
    Py_XDECREF(dump.edges);
    Py_XDECREF(dump.fail);
    return NULL;

#undef automaton
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpl $0x0, 0x10(%rdi)
je 0x6fd9
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x9(%rsp)
movaps %xmm0, (%rsp)
xorl %edi, %edi
callq 0x3030
movq %rax, (%rsp)
xorl %edi, %edi
callq 0x3030
movq %rax, 0x8(%rsp)
xorl %edi, %edi
callq 0x3030
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x6f9a
testq %rax, %rax
je 0x6f9a
cmpq $0x0, (%rsp)
je 0x6f9a
movq 0x28(%rbx), %rdi
leaq 0xee6(%rip), %rsi       # 0x7e6f
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x56a1
cmpb $0x0, 0x18(%rbx)
je 0x6fe5
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6fad
decq (%rdi)
jne 0x6fad
callq 0x30d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6fc1
decq (%rdi)
jne 0x6fc1
callq 0x30d0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6fd5
decq (%rdi)
jne 0x6fd5
callq 0x30d0
xorl %eax, %eax
jmp 0x7001
movq 0x8fe0(%rip), %rax      # 0xffc0
incq (%rax)
jmp 0x7001
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0x4d05(%rip), %rdi      # 0xbcff
xorl %eax, %eax
callq 0x3330
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: automaton___sizeof__
static PyObject*
automaton___sizeof__(PyObject* self, PyObject* args) {
#define automaton ((Automaton*)self)
    Py_ssize_t size = sizeof(Automaton);

    if (automaton->kind != EMPTY) {
        if (automaton->stats.version != automaton->version) {
            get_stats(automaton);
        }

        size += automaton->stats.total_size;
    }

    return Py_BuildValue("i", size);
#undef automaton
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
je 0x72d2
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
cmpl 0x30(%rdi), %eax
je 0x72c7
movq %rbx, %rdi
callq 0x7db6
movq 0x68(%rbx), %rsi
addq $0x70, %rsi
popq %rbx
jmp 0x72d7
movl $0x70, %esi
leaq 0x4a27(%rip), %rdi      # 0xbd05
xorl %eax, %eax
jmp 0x3330
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/trie.c
// Function: ahocorasick_next
static TrieNode* PURE
ahocorasick_next(TrieNode* node, TrieNode* root, const TRIE_LETTER_TYPE letter) {
    TrieNode* next = node;
    TrieNode* tmp;

    while (next) {
        tmp = trienode_get_next(next, letter);
        if (tmp)
            // found link
            return tmp;
        else
            // or go back through fail edges
            next = next->fail;
    }

    // or return root node
    return root;
}

// Assembly:
testq %rdi, %rdi
je 0x777c
movl 0x10(%rdi), %ecx
testq %rcx, %rcx
je 0x7768
movq 0x18(%rdi), %rax
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %r8d, %r8d
cmpl %edx, (%rax,%r8)
je 0x776c
addq $0xc, %r8
cmpq %r8, %rcx
jne 0x7759
xorl %eax, %eax
jmp 0x7771
movq 0x4(%rax,%r8), %rax
testq %rax, %rax
jne 0x777f
movq 0x8(%rdi), %rdi
jmp 0x773d
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/AutomatonSearchIter.c
// Function: automaton_search_iter_set
static PyObject*
automaton_search_iter_set(PyObject* self, PyObject* args) {
    PyObject* object;
    PyObject* flag;
    Py_ssize_t position;
    bool reset;
    struct Input new_input;

    // first argument - required string or buffer
    object = F(PyTuple_GetItem)(args, 0);
    if (object) {
        init_input(&new_input);
        if (!prepare_input((PyObject*)iter->automaton, object, &new_input)) {
            return NULL;
        }
    }
    else
        return NULL;

    // second argument - optional bool
    flag = F(PyTuple_GetItem)(args, 1);
    if (flag) {
        switch (PyObject_IsTrue(flag)) {
            case 0:
                reset = false;
                break;
            case 1:
                reset = true;
                break;
            default:
                return NULL;
        }
    }
    else {
        PyErr_Clear();
        reset = false;
    }

    destroy_input(&iter->input);
    assign_input(&iter->input, &new_input);

    if (!reset) {
        position = iter->index;
#ifdef VARIABLE_LEN_CHARCODES
        if (iter->automaton->key_type == KEY_STRING) {
            position = iter->position;
        }
#endif
        iter->shift += (position >= 0) ? position : 0;
    }

    iter->index     = -1;
    iter->end       = new_input.wordlen;

    if (reset) {
        iter->state  = iter->automaton->root;
        iter->shift  = 0;
        iter->output = NULL;
#ifdef VARIABLE_LEN_CHARCODES
        iter->position = -1;
        iter->expected = pyaho_UCS2_Any;
#endif
    }

    Py_RETURN_NONE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x7a13
xorps %xmm0, %xmm0
movq %rsp, %rdx
movups %xmm0, 0x8(%rdx)
movq 0x10(%rbx), %rdi
movq %rax, %rsi
callq 0x471d
testb %al, %al
je 0x79bf
movl $0x1, %esi
movq %r14, %rdi
callq 0x3140
testq %rax, %rax
je 0x79c4
movq %rax, %rdi
callq 0x3250
testl %eax, %eax
je 0x79c9
cmpl $0x1, %eax
jne 0x79bf
leaq 0x20(%rbx), %rdi
callq 0x4a2c
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x28(%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rbx)
movq $-0x1, 0x50(%rbx)
movq %rax, 0x60(%rbx)
movq 0x10(%rbx), %rax
movq 0x28(%rax), %rax
movq %rax, 0x40(%rbx)
xorl %eax, %eax
movq %rax, 0x58(%rbx)
movq %rax, 0x48(%rbx)
jmp 0x7a09
xorl %r15d, %r15d
jmp 0x7a13
callq 0x3190
leaq 0x20(%rbx), %rdi
callq 0x4a2c
movq (%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x8(%rsp), %rcx
movq %rcx, 0x28(%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rbx)
movq 0x50(%rbx), %rcx
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
addq %rdx, 0x58(%rbx)
movq $-0x1, 0x50(%rbx)
movq %rax, 0x60(%rbx)
movq 0x85b0(%rip), %r15      # 0xffc0
incq (%r15)
movq %r15, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/AutomatonSearchIterLong.c
// Function: automaton_search_iter_long_del
static void
automaton_search_iter_long_del(PyObject* self) {
    Py_DECREF(iter->automaton);
    Py_DECREF(iter->object);
    destroy_input(&iter->input);
    PyObject_Del(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
decq (%rdi)
jne 0x7a32
callq 0x30d0
movq 0x20(%rbx), %rdi
decq (%rdi)
jne 0x7a40
callq 0x30d0
leaq 0x28(%rbx), %rdi
callq 0x4a2c
movq %rbx, %rdi
popq %rbx
jmp 0x3170
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/AutomatonSearchIterLong.c
// Function: automaton_search_iter_long_set
static PyObject*
automaton_search_iter_long_set(PyObject* self, PyObject* args) {
    PyObject* object;
    PyObject* flag;
    bool reset;
    struct Input new_input;

    // first argument - required string or buffer
    object = PyTuple_GetItem(args, 0);
    if (object) {
        init_input(&new_input);
        if (!prepare_input((PyObject*)iter->automaton, object, &new_input)) {
            return NULL;
        }
    }
    else
        return NULL;

    // second argument - optional bool
    flag = PyTuple_GetItem(args, 1);
    if (flag) {
        switch (PyObject_IsTrue(flag)) {
            case 0:
                reset = false;
                break;
            case 1:
                reset = true;
                break;
            default:
                return NULL;
        }
    }
    else {
        PyErr_Clear();
        reset = false;
    }

    // update internal state
    Py_XDECREF(iter->object);
    Py_INCREF(object);
    iter->object    = object;

    destroy_input(&iter->input);
    assign_input(&iter->input, &new_input);

    if (!reset)
        iter->shift += (iter->index >= 0) ? iter->index : 0;

    iter->index     = -1;
    iter->end       = new_input.wordlen;

    if (reset) {
        iter->state  = iter->automaton->root;
        iter->shift  = 0;

        iter->last_node  = NULL;
        iter->last_index = -1;
    }

    Py_RETURN_NONE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3140
testq %rax, %rax
je 0x7da7
movq %rax, %r14
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movq 0x10(%rbx), %rdi
movq %rax, %rsi
callq 0x471d
testb %al, %al
je 0x7d3d
movl $0x1, %esi
movq %r15, %rdi
callq 0x3140
testq %rax, %rax
je 0x7d42
movq %rax, %rdi
callq 0x3250
testl %eax, %eax
je 0x7d47
cmpl $0x1, %eax
jne 0x7d3d
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x7ce7
decq (%rdi)
jne 0x7ce7
callq 0x30d0
incq (%r14)
movq %r14, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x4a2c
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rbx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rbx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x5c(%rbx)
movl %eax, 0x64(%rbx)
movq 0x10(%rbx), %rax
movq 0x28(%rax), %rax
movq %rax, 0x48(%rbx)
movl $0x0, 0x60(%rbx)
movq $0x0, 0x50(%rbx)
movl %ecx, 0x58(%rbx)
jmp 0x7d9c
xorl %r12d, %r12d
jmp 0x7da7
callq 0x3190
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x7d5a
decq (%rdi)
jne 0x7d5a
callq 0x30d0
incq (%r14)
movq %r14, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x4a2c
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x30(%rbx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x38(%rbx)
movl 0x5c(%rbx), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovgl %ecx, %edx
addl %edx, 0x60(%rbx)
movl $0xffffffff, 0x5c(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x64(%rbx)
movq 0x821d(%rip), %r12      # 0xffc0
incq (%r12)
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: get_stats
static void
get_stats(Automaton* automaton) {
    automaton->stats.nodes_count    = 0;
    automaton->stats.words_count    = 0;
    automaton->stats.longest_word   = 0;
    automaton->stats.links_count    = 0;
    automaton->stats.sizeof_node    = sizeof(TrieNode);
    automaton->stats.total_size     = 0;

    if (automaton->kind != EMPTY)
        get_stats_aux(automaton->root, &automaton->stats, 0);

    automaton->stats.version        = automaton->version;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movq $0x20, 0x60(%rdi)
movq $0x0, 0x68(%rdi)
cmpl $0x0, 0x10(%rdi)
je 0x7dea
leaq 0x38(%rbx), %rsi
movq 0x28(%rbx), %rdi
xorl %edx, %edx
callq 0x7df2
movl 0x30(%rbx), %eax
movl %eax, 0x38(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: get_stats_aux
static void
get_stats_aux(TrieNode* node, AutomatonStatistics* stats, int depth) {

    unsigned i;

    stats->nodes_count  += 1;
    stats->words_count  += (int)(node->eow);
    stats->links_count  += node->n;
    stats->total_size   += trienode_get_size(node);

    if (depth > stats->longest_word)
        stats->longest_word = depth;

    for (i=0; i < node->n; i++)
        get_stats_aux(trienode_get_ith_unsafe(node, i), stats, depth + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
incq 0x8(%rsi)
movzbl 0x14(%rdi), %eax
addq %rax, 0x10(%rsi)
movl 0x10(%rdi), %eax
addq %rax, 0x20(%rsi)
movl %edx, %ebp
movq 0x18(%rsi), %rcx
movq 0x30(%rsi), %rdx
leaq (%rdx,%rax,8), %rax
addq $0x20, %rax
movq %rax, 0x30(%rsi)
movslq %ebp, %rax
cmpq %rax, %rcx
jge 0x7e34
movq %rax, 0x18(%rbx)
cmpl $0x0, 0x10(%r14)
je 0x7e64
incl %ebp
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x5737
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x7df2
incq %r15
movl 0x10(%r14), %eax
cmpq %rax, %r15
jb 0x7e40
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton.c
// Function: dump_aux
static int
dump_aux(TrieNode* node, const int depth, void* extra) {
#define Dump ((DumpAux*)extra)
    PyObject* tuple;
    TrieNode* child;
    unsigned i;

#define append_tuple(list) \
    if (tuple == NULL) { \
        Dump->error = 1; \
        return 0; \
    } \
    else if (PyList_Append(list, tuple) < 0) { \
        Dump->error = 1; \
        return 0; \
    }


    // 1.
    tuple = F(Py_BuildValue)("ii", node, (int)(node->eow));
    append_tuple(Dump->nodes)

    // 2.
    for (i=0; i < node->n; i++) {
        child = trienode_get_ith_unsafe(node, i);
        tuple = F(Py_BuildValue)("ici", node, trieletter_get_ith_unsafe(node, i), child);
        append_tuple(Dump->edges)
    }

    // 3.
    if (node->fail) {
        tuple = F(Py_BuildValue)("ii", node, node->fail);
        append_tuple(Dump->fail);
    }

    return 1;
#undef append_tuple
#undef Dump
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movzbl 0x14(%rdi), %edx
leaq 0x3a53(%rip), %rdi      # 0xb8de
movq %r14, %rsi
xorl %eax, %eax
callq 0x3330
testq %rax, %rax
je 0x7f42
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x31a0
testl %eax, %eax
js 0x7f42
cmpl $0x0, 0x10(%r14)
je 0x7f0e
leaq 0x3e44(%rip), %r15      # 0xbd03
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0x5737
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x6044
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x3330
testq %rax, %rax
je 0x7f42
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x31a0
testl %eax, %eax
js 0x7f42
incq %r12
movl 0x10(%r14), %eax
cmpq %rax, %r12
jb 0x7ec2
movq 0x8(%r14), %rdx
movl $0x1, %ebp
testq %rdx, %rdx
je 0x7f48
leaq 0x39bb(%rip), %rdi      # 0xb8de
movq %r14, %rsi
xorl %eax, %eax
callq 0x3330
testq %rax, %rax
je 0x7f42
movq 0x10(%rbx), %rdi
movq %rax, %rsi
callq 0x31a0
testl %eax, %eax
jns 0x7f48
movb $0x1, 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton_pickle.c
// Function: pickle_dump_replace_fail_with_id
static int
pickle_dump_replace_fail_with_id(TrieNode* node, const int depth, void* extra) {

    NodeID* repl;

    ASSERT(sizeof(NodeID*) <= sizeof(TrieNode*));
#define state ((DumpState*)extra)
    repl = (NodeID*)memory_alloc(sizeof(NodeID));
    if (LIKELY(repl != NULL)) {
        state->id += 1;
        state->total_size += get_pickled_size(node);

        repl->id   = state->id;
        repl->fail = node->fail;

        node->fail = (TrieNode*)repl;
        return 1;
    }
    else {
        // error, revert is needed!
        state->failed_on = node;
        return 0;
    }
#undef state
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x3370
testq %rax, %rax
je 0x7fa2
movq %rax, %r15
incq (%r14)
movq %rbx, %rdi
callq 0x8106
addq %rax, 0x8(%r14)
movq (%r14), %rax
movq %rax, 0x8(%r15)
movq 0x8(%rbx), %rax
movq %rax, (%r15)
movq %r15, 0x8(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, 0x10(%r14)
xorl %eax, %eax
jmp 0x7f9c
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton_pickle.c
// Function: pickle_dump_revert_replace
static int
pickle_dump_revert_replace(TrieNode* node, const int depth, void* extra) {
#define state ((DumpState*)extra)
    if (state->failed_on != node) {
        NodeID* repl = (NodeID*)(node->fail);
        node->fail = repl->fail;
        memory_free(repl);

        return 1;
    }
    else
        return 0;
#undef state
}

// Assembly:
cmpq %rdi, 0x10(%rdx)
je 0x7fce
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, %rdi
callq 0x3070
movl $0x1, %eax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton_pickle.c
// Function: pickle_dump_save
static int
pickle_dump_save(TrieNode* node, const int depth, void* extra) {
#define self ((PickleData*)extra)
#define NODEID(object) ((NodeID*)((TrieNode*)object)->fail)

    TrieNode* dump;
    TrieNode* tmp;
    Pair* arr;
    unsigned i;
    size_t size;

    size = get_pickled_size(node);
    if (UNLIKELY(self->top + size > self->size)) {
        if (UNLIKELY(!pickle_data__add_next_buffer(self))) {
            self->error = true;
            return 0;
        }
    }

    dump = (TrieNode*)(self->data + self->top);

    // we do not save the last pointer in array
    arr = (Pair*)(self->data + self->top + PICKLE_TRIENODE_SIZE);

    // append the python object to the list
    if (node->eow and self->values) {
        if (PyList_Append(self->values, node->output.object) == -1) {
            self->error = true;
            return 0;
        }
    }

    // save node data
    if (self->values)
        dump->output.integer = 0;
    else
        dump->output.integer = node->output.integer;

    dump->n         = node->n;
    dump->eow       = node->eow;

    tmp = NODEID(node)->fail;
    if (tmp)
        dump->fail  = (TrieNode*)(NODEID(tmp)->id);
    else
        dump->fail  = NULL;

    // save array of pointers
    for (i=0; i < node->n; i++) {
        TrieNode* child = trienode_get_ith_unsafe(node, i);
        ASSERT(child);
        arr[i].child  = (TrieNode*)(NODEID(child)->id);    // save the id of child node
        arr[i].letter = trieletter_get_ith_unsafe(node, i);
    }

    self->top       += size;
    (*self->count)  += 1;
    return 1;
#undef NODEID
#undef self
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x8106
movq %rax, %r15
movq 0x28(%rbx), %rax
addq %r15, %rax
cmpq 0x10(%rbx), %rax
ja 0x80ce
movq 0x18(%rbx), %r12
movq 0x28(%rbx), %r13
cmpb $0x0, 0x14(%r14)
je 0x8024
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x8024
movq (%r14), %rsi
callq 0x31a0
cmpl $-0x1, %eax
je 0x80de
cmpq $0x0, 0x30(%rbx)
je 0x802f
xorl %eax, %eax
jmp 0x8032
movq (%r14), %rax
movq %rax, (%r12,%r13)
movl 0x10(%r14), %eax
movl %eax, 0x10(%r12,%r13)
movb 0x14(%r14), %al
movb %al, 0x14(%r12,%r13)
movq 0x8(%r14), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x805e
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
jmp 0x8060
xorl %eax, %eax
movq %rax, 0x8(%r12,%r13)
movl 0x10(%r14), %ebp
testq %rbp, %rbp
je 0x80af
addq %r12, %r13
addq $0x1c, %r13
xorl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0x5737
testq %rax, %rax
je 0x80e6
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, (%r13)
movq %r14, %rdi
movq %r12, %rsi
callq 0x6044
movl %eax, -0x4(%r13)
incq %r12
addq $0xc, %r13
cmpq %r12, %rbp
jne 0x8078
addq %r15, 0x28(%rbx)
movq 0x20(%rbx), %rax
incq (%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x8121
testb %al, %al
jne 0x7ffb
movb $0x1, 0x38(%rbx)
xorl %eax, %eax
jmp 0x80bf
callq 0x4572
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/Automaton_pickle.c
// Function: pickle_dump_undo_replace
static int
pickle_dump_undo_replace(TrieNode* node, const int depth, void* extra) {
#define state ((DumpState*)extra)
    NodeID* repl = (NodeID*)(node->fail);
    node->fail = repl->fail;
    memory_free(repl);

    return 1;
#undef state
}

// Assembly:
pushq %rax
movq 0x8(%rdi), %rax
movq (%rax), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, %rdi
callq 0x3070
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/WojciechMula[P]pyahocorasick/src/pickle/pickle_data.c
// Function: pickle_data__add_next_buffer
static bool
pickle_data__add_next_buffer(PickleData* data) {

	PyObject* bytes;
	void* raw;

	ASSERT(data != NULL);

	bytes = F(PyBytes_FromStringAndSize)(NULL, data->size);
	if (UNLIKELY(bytes == NULL)) {
		return false;
	}

	if (UNLIKELY(F(PyList_Append)(data->bytes_list, bytes) < 0)) {
		Py_DECREF(bytes);
		return false;
	}

	raw = PyBytes_AS_STRING(bytes);

	data->count 	= (Py_ssize_t*)raw;
	(*data->count)	= 0;

	data->data  	= (uint8_t*)raw;
	data->top   	= PICKLE_CHUNK_COUNTER_SIZE;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x819d
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x30c0
testq %rax, %rax
je 0x8182
movq %rax, %r14
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x31a0
testl %eax, %eax
js 0x818b
movq 0x8(%r14), %rax
testb $0x8, 0xab(%rax)
je 0x81a2
movq %r14, %rax
addq $0x20, %rax
movq %rax, 0x20(%rbx)
movq $0x0, 0x20(%r14)
movq %rax, 0x18(%rbx)
movq $0x8, 0x28(%rbx)
movb $0x1, %r15b
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
decq (%r14)
jne 0x8198
movq %r14, %rdi
callq 0x30d0
xorl %r15d, %r15d
jmp 0x8182
callq 0x45f8
leaq 0x1452(%rip), %rdi      # 0x95fb
leaq 0x3b8e(%rip), %rsi      # 0xbd3e
leaq 0x3beb(%rip), %rcx      # 0xbda2
movl $0x2f, %edx
callq 0x3130
// File: /workspace/github_c_makefile_star2_O1/sbp[P]tweetnacl-tools/randombytes.c
// Function: randombytes
void randombytes(unsigned char *x,unsigned long long xlen)
{
  int i;

  if (fd == -1) {
    for (;;) {
      fd = open("/dev/urandom",O_RDONLY);
      if (fd != -1) break;
      sleep(1);
    }
  }

  while (xlen > 0) {
    if (xlen < 1048576) i = xlen; else i = 1048576;

    i = read(fd,x,i);
    if (i < 1) {
      sleep(1);
      continue;
    }

    x += i;
    xlen -= i;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x1, 0x5e47(%rip)     # 0x70c8
jne 0x12c6
leaq 0x2d7a(%rip), %rdi      # 0x4004
xorl %esi, %esi
xorl %eax, %eax
callq 0x1100
movl %eax, 0x5e2f(%rip)      # 0x70c8
cmpl $-0x1, %eax
jne 0x12c6
leaq 0x2d5f(%rip), %r15      # 0x4004
movl $0x1, %edi
callq 0x1160
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1100
movl %eax, 0x5e07(%rip)      # 0x70c8
cmpl $-0x1, %eax
je 0x12a5
testq %rbx, %rbx
sete %bpl
je 0x131a
movl $0x100000, %r12d        # imm = 0x100000
cmpq %r12, %rbx
movl $0x100000, %r15d        # imm = 0x100000
cmovbq %rbx, %r15
movl 0x5de0(%rip), %edi      # 0x70c8
movq %r14, %rsi
movq %r15, %rdx
callq 0x1080
testl %eax, %eax
jg 0x1309
movl $0x1, %edi
callq 0x1160
testb $0x1, %bpl
je 0x12e2
jmp 0x131a
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r14
subq %rax, %rbx
sete %bpl
jne 0x12d5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/sbp[P]tweetnacl-tools/tools.c
// Function: error
void error(int code, char message[]) {
    fprintf(stderr, "Error: ");
    fputs(message, stderr);
    fprintf(stderr, "\n");
    exit(code);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movq 0x5cc4(%rip), %r14      # 0x6ff8
movq (%r14), %rcx
leaq 0x2cd3(%rip), %rdi      # 0x4011
movl $0x7, %esi
movl $0x1, %edx
callq 0x1150
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x1050
movq (%r14), %rsi
movl $0xa, %edi
callq 0x1070
movl %ebp, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/sbp[P]tweetnacl-tools/tools.c
// Function: errorf
void errorf(int code, char message[], char arg[]) {
    fprintf(stderr, "Error: ");
    fprintf(stderr, message, arg);
    fprintf(stderr, "\n");
    exit(code);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq 0x5c76(%rip), %r15      # 0x6ff8
movq (%r15), %rcx
leaq 0x2c85(%rip), %rdi      # 0x4011
movl $0x7, %esi
movl $0x1, %edx
callq 0x1150
movq (%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0x1070
movl %ebp, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/sbp[P]tweetnacl-tools/tools.c
// Function: bytes_to_hex
char * bytes_to_hex(unsigned char bytes[], int size) {
    char *hex = malloc((size * 2) + 1);
    if (hex == NULL) error(1, "Malloc failed!");
    for (int i = 0; i < size; i++) {
        sprintf(hex + (i * 2), "%02x", bytes[i]);
    }
    return hex;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leal 0x1(,%r15,2), %eax
movslq %eax, %rdi
callq 0x10d0
testq %rax, %rax
je 0x142b
movq %rax, %r14
testl %r15d, %r15d
jle 0x1419
movl %r15d, %r13d
leaq 0x2c31(%rip), %r15      # 0x4028
movq %r14, %r12
xorl %ebp, %ebp
movzbl (%rbx,%rbp), %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1130
incq %rbp
addq $0x2, %r12
cmpq %rbp, %r13
jne 0x13fc
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2be7(%rip), %rsi      # 0x4019
movl $0x1, %edi
callq 0x1324