LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: is_number(char const*)
bool is_number(const char *str)
{
    for(unsigned int i=0; i < strlen(str); i++)
    { //iterating the whole string character by character
        if(!isdigit(str[i]))
        {// and checking if every character is a number
            return 0;
        }
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2070
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x2d57
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
movsbl (%rax,%rcx), %edi
callq 0x20a0
cmpl $0x0, %eax
jne 0x2d4a
movb $0x0, -0x1(%rbp)
jmp 0x2d5b
jmp 0x2d4c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2d13
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: insert_docs_into_trie(my_trie*, char**, unsigned int*, unsigned int)
unsigned int insert_docs_into_trie(my_trie * my_trie_ptr, char ** docs,
    unsigned int * docs_word_counter, unsigned int nlines)
{//inserting every doc's word into trie, counting each doc's number of words - returns total number of all docs' words
    unsigned int total_word_counter = 0;

    for(unsigned int i = 0; i < nlines; i++)
    { //for each doc
        char * line_cp = (char *) malloc((strlen(docs[i]) + 1) * sizeof(char));
        strcpy(line_cp, docs[i]);
        char * word = strtok (line_cp, " \t");
        unsigned int line_word_counter = 0;

        while (word != NULL)
        {//for each doc's word
            line_word_counter++;
            my_trie_ptr->insert_word(word, i);
            word = strtok (NULL, " \t");
        }

        free(line_cp);

        docs_word_counter[i] = line_word_counter;
        total_word_counter += line_word_counter;
    }

    return total_word_counter;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x3027
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2070
movq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x2160
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x20b0
movq -0x30(%rbp), %rdi
leaq 0x327c(%rip), %rsi      # 0x6230
callq 0x2200
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x2ffa
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x4730
xorl %eax, %eax
movl %eax, %edi
leaq 0x3241(%rip), %rsi      # 0x6230
callq 0x2200
movq %rax, -0x38(%rbp)
jmp 0x2fc4
movq -0x30(%rbp), %rdi
callq 0x2130
movl -0x3c(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2f65
movl -0x20(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: strip_line_into_words(char*, unsigned int&)
char ** strip_line_into_words(char * cmd, unsigned int & cmd_nwords)
{//returns a char * array which contains each cmd's word
    char ** cmd_words = NULL;
    char * word = strtok (cmd, " \t");

    unsigned int word_counter = 0;

    while (word != NULL)
    { //for each cmd's word
        cmd_words = (char **) realloc(cmd_words, (word_counter + 1) * sizeof(char *));
        cmd_words[word_counter] = (char *) malloc((strlen(word) + 1) * sizeof(char));  // plus one for \0
        strcpy(cmd_words[word_counter], word);
        word_counter++;
        word = strtok (NULL, " \t");
    }

    cmd_nwords = word_counter;
    return cmd_words;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x31dd(%rip), %rsi      # 0x6230
callq 0x2200
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x30df
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x2220
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2070
movq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x2160
movq %rax, %rdx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
callq 0x20b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x315c(%rip), %rsi      # 0x6230
callq 0x2200
movq %rax, -0x20(%rbp)
jmp 0x3063
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: delete_docs(char**, unsigned int*, unsigned int)
void delete_docs(char ** docs, unsigned int * docs_word_counter, unsigned int nlines)
{
    for(unsigned int i = 0; i < nlines; i++)
    {
        if (docs[i] != NULL)
        {
            free(docs[i]);
        }
    }

    free(docs);
    free(docs_word_counter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x319d
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x3190
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2130
jmp 0x3192
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x316a
movq -0x8(%rbp), %rdi
callq 0x2130
movq -0x10(%rbp), %rdi
callq 0x2130
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: read_str(unsigned int)
char * read_str(unsigned int str_len)
{ //reads and returns string of unknown length
    char * str = (char *) malloc((str_len) * sizeof(char));
    int ch;
    unsigned int i = 0;

    while(((ch = getchar()) != '\n') && (ch != EOF))
    {
        str[i] = ch;
        i++;
        if(i == str_len)
        {
            str_len++;
            str = (char *) realloc(str, str_len * sizeof(char));
        }
    }

    str[i] = '\0';  // add \0 at the end of the string
    return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %edi
shlq $0x0, %rdi
callq 0x2160
movq %rax, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
callq 0x2180
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x19(%rbp)
je 0x3202
cmpl $-0x1, -0x14(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x320b
jmp 0x324c
movl -0x14(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jne 0x324a
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x2220
movq %rax, -0x10(%rbp)
jmp 0x31e4
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: get_unq_doc_ids(char**, posting_list**, my_trie*, unsigned int, unsigned int&)
unsigned int * get_unq_doc_ids(char ** cmd_words, posting_list ** pl_array, my_trie * trie_ptr,
    unsigned int nqs, unsigned int & unq_doc_ids_size)
{//returns an array that contains every unique doc id taken from each query's posting list
 //also all queries' posting lists pointers are stored in an array
    unsigned int * unq_doc_ids = NULL;
    unq_doc_ids_size = 0;

    for(unsigned int i = 1; i <= nqs; i++)
    { // for each query (max = 10)
        posting_list * pl_ptr = trie_ptr->search_word(cmd_words[i]);  //check if query exists in trie
        pl_array[i-1] = pl_ptr;  //store query's posting list pointer

        if(pl_ptr != NULL)
        { // if query exists
            unq_doc_ids = pl_ptr->add_doc_id_to_array(unq_doc_ids, unq_doc_ids_size);  //update unique doc ids array from query's posting list
        }
    }

    return unq_doc_ids;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x33e1
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x4ac0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x40(%rbp)
je 0x33d4
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x5040
movq %rax, -0x30(%rbp)
jmp 0x33d6
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3384
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: calc_whitespace(char*)
unsigned int calc_whitespace(char * str)
{//returns number of spaces at the beginning of the string
    if(str == NULL)
    {
        return 0;
    }

    unsigned int whitespace_counter = 1;
    bool all_whitespace = 1;

    for(unsigned int i = 0; i < strlen(str); i++)
    {
        if(str[i] == ' ')
        {
            whitespace_counter++;
        }
        else
        {
            all_whitespace = 0;
            break;
        }
    }

    if(all_whitespace == 1)
    { // if the whole string is whitespace
        return 0;
    }
    else
    {
        return whitespace_counter;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x345c
movl $0x0, -0x4(%rbp)
jmp 0x34d4
movl $0x1, -0x14(%rbp)
movb $0x1, -0x15(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2070
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x34b8
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x34a5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x34ab
movb $0x0, -0x15(%rbp)
jmp 0x34b8
jmp 0x34ad
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x346e
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x34ce
movl $0x0, -0x4(%rbp)
jmp 0x34d4
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: init_newline(unsigned int, unsigned int&)
void init_newline(unsigned int init_llen, unsigned int & curr_llen)
{//go to new line and set cursor to the correct spot for printing
    cout<<endl;
    curr_llen = init_llen;
    for(unsigned int i = 0; i < init_llen; i++)
    {
        cout<<" ";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x593a(%rip), %rdi      # 0x8fd0
movq 0x5923(%rip), %rsi      # 0x8fc0
callq 0x2100
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x36d8
movq 0x590f(%rip), %rdi      # 0x8fd0
leaq 0x2e3d(%rip), %rsi      # 0x6505
callq 0x20c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x36b2
addq $0x20, %rsp
popq %rbp
retq
nop
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: manage_whitespace(char*, unsigned int, unsigned int, unsigned int&, int**, int&)
bool manage_whitespace(char * rest_line, unsigned int lwidth, unsigned int init_llen, unsigned int & curr_llen,
                       int ** underline_info, int & underline_info_size)
{
    unsigned int whitespace = calc_whitespace(rest_line); //calculate the whitespace from the beginning of the rest content
    if (whitespace == 0)
    {//the whole rest content is whitespace
        if (underline_info_size > 0)
        {//if there are some words to be underlined
            underline(init_llen, curr_llen, underline_info, underline_info_size, 1);
        }

        return 1;  //send stop signal
    }
    else
    {
        for(unsigned int i = 0; i < whitespace; i++)
        {//print whitespace space by space
            if ((curr_llen + 1) > lwidth)
            {// if there is no free space left in terminal's line
                if (underline_info_size > 0)
                {
                    underline(init_llen, curr_llen, underline_info, underline_info_size, 0);
                }
                else
                {
                    init_newline(init_llen, curr_llen);
                }
            }

            curr_llen++;
            cout<<" ";
        }

        return 0;  //keep printing
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3440
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x3739
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x3733
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %r8d
callq 0x34e0
movb $0x1, -0x1(%rbp)
jmp 0x37b3
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x34(%rbp), %eax
jae 0x37af
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
cmpl -0x14(%rbp), %eax
jbe 0x3786
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x3778
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x34e0
jmp 0x3784
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x3680
jmp 0x3786
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq 0x5838(%rip), %rdi      # 0x8fd0
leaq 0x2d66(%rip), %rsi      # 0x6505
callq 0x20c0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3740
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: reallocate_underline_info(int**, unsigned int, unsigned int, unsigned int)
int ** reallocate_underline_info(int ** underline_info, unsigned int underline_info_size, unsigned int ul_start, unsigned int ul_end)
{
    underline_info = (int **) realloc(underline_info, underline_info_size * sizeof(int *));
    underline_info[underline_info_size - 2] = (int *) malloc(sizeof(int));
    underline_info[underline_info_size - 1] = (int *) malloc(sizeof(int));
    *underline_info[underline_info_size - 2] = ul_start;
    *underline_info[underline_info_size - 1] = ul_end;
    return underline_info;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x2220
movq %rax, -0x8(%rbp)
movl $0x4, %edi
callq 0x2160
movq %rax, %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl $0x4, %edi
callq 0x2160
movq %rax, %rdx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
subl $0x2, %edx
movl %edx, %edx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %edx
subl $0x1, %edx
movl %edx, %edx
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: JohnPapad[P]Mini-Search-Engine/minisearch.cpp
// Function: search_doc_word_into_queries(char*, char**, unsigned int)
bool search_doc_word_into_queries(char * doc_word, char ** queries, unsigned int nqs)
{//returns 1 if doc_word is contained in queries and 0 otherwise
    for(unsigned int i = 1; i <= nqs; i++)
    {
        if (strcmp(queries[i], doc_word) == 0)
        {
            return 1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
ja 0x3b4e
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
callq 0x2190
cmpl $0x0, %eax
jne 0x3b41
movb $0x1, -0x1(%rbp)
jmp 0x3b52
jmp 0x3b43
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3b1a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: JohnPapad[P]Mini-Search-Engine/trie.cpp
// Function: my_trie::destroy(my_trie::node*)
void my_trie::destroy(node * n)
{
    if (n != NULL)
    {
        destroy(n->down);
        destroy(n->right);
        if(n->pl_ptr != NULL)
        { //delete node's posting list before deleting the node itself
            delete n->pl_ptr;
        }
        delete n;
        trie_size--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x46be
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x4620
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x4620
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4697
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x4695
movq -0x20(%rbp), %rdi
callq 0x4da0
movq -0x20(%rbp), %rdi
movl $0x18, %esi
callq 0x20f0
jmp 0x4697
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x46b3
movq -0x28(%rbp), %rdi
movl $0x20, %esi
callq 0x20f0
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/trie.cpp
// Function: my_trie::create_node(char)
my_trie::node * my_trie::create_node(char ch)
{
    node * new_node = new node;
    new_node->ch = ch;
    new_node->down = NULL;
    new_node->right = NULL;
    new_node->pl_ptr = NULL;
    return new_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x20, %edi
callq 0x20e0
movq %rax, -0x18(%rbp)
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/trie.cpp
// Function: my_trie::print(bool)
void my_trie::print(bool full_print)
{
    if(first == NULL)
    {
        cout<<"-> Trie cannot be printed because it is empty !"<<endl;
        return;
    }

    if(full_print == 1)
    {
        cout<<"-----> Printing whole trie <-----"<<endl;
    }
    else
    {
        cout<<"---> Printing document frequency vector <---"<<endl;
    }

    print_subtrie(first, full_print); //print trie recursively starting from the root
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x49c7
movq 0x4626(%rip), %rdi      # 0x8fd0
leaq 0x1ab3(%rip), %rsi      # 0x6464
callq 0x20c0
movq %rax, %rdi
movq 0x4600(%rip), %rsi      # 0x8fc0
callq 0x2100
jmp 0x4a2f
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x49f8
movq 0x45f5(%rip), %rdi      # 0x8fd0
leaq 0x1ab2(%rip), %rsi      # 0x6494
callq 0x20c0
movq %rax, %rdi
movq 0x45cf(%rip), %rsi      # 0x8fc0
callq 0x2100
jmp 0x4a1a
movq 0x45d1(%rip), %rdi      # 0x8fd0
leaq 0x1ab0(%rip), %rsi      # 0x64b6
callq 0x20c0
movq %rax, %rdi
movq 0x45ab(%rip), %rsi      # 0x8fc0
callq 0x2100
movq -0x18(%rbp), %rdi
movq 0x8(%rdi), %rsi
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x4a40
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/trie.cpp
// Function: my_trie::print_subtrie(my_trie::node*, bool)
void my_trie::print_subtrie(node * n, bool full_print)
{
    if (n != NULL)
    {
        if(n->pl_ptr != NULL)
        {
            n->pl_ptr->print(full_print);
        }
        print_subtrie(n->down, full_print);
        print_subtrie(n->right, full_print);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4ab8
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4a86
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x4c00
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x4a40
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x4a40
addq $0x20, %rsp
popq %rbp
retq
nop
// File: JohnPapad[P]Mini-Search-Engine/trie.cpp
// Function: my_trie::search_word(char const*)
posting_list * my_trie::search_word(const char * query)
{ //if word exists in the trie return its posting list or NULL otherwise
    node * start_node = first;
    node * last_char_node = NULL;

    for(unsigned int i = 0; i < strlen(query); i++)
    { //iterating query word letter by letter
        node * temp = start_node;

        while(1)
        {
            if (temp == NULL) //we have interated the whole orizontal list and a query word's letter does not exist,
                              // therefore the whole word does not exist
            {
                return NULL;  //query not found
            }

            if(temp->ch == query[i])
            {// a query word's letter has been found so keep searching downwards
                last_char_node = temp;
                start_node = temp->down;
                break;
            }
            else if(temp->ch > query[i])
            {//stop searching. orizontal list is sorted alphabetically
                return NULL;  // query not found
            }
            else
            {//keep iterating the orizontal list
                temp = temp->right;
            }
        }
    }

    return last_char_node->pl_ptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2070
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x4b90
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x4b24
movq $0x0, -0x8(%rbp)
jmp 0x4b9c
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x4b50
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4b80
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x4b70
movq $0x0, -0x8(%rbp)
jmp 0x4b9c
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x4b7e
jmp 0x4b13
jmp 0x4b82
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4aeb
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/posting_list.cpp
// Function: posting_list::print(bool)
void posting_list::print(bool full_print)
{
    if (full_print == 0) //only print df
    {
        cout<<word<<"  "<<pl_size<<endl;
        return;
    }

    node * temp = first;
    if (first == NULL)
    {
        cout<<"Posting list is empty"<<endl;
        return;
    }

    cout<<"-> word:'"<<word<<"'  "<<pl_size<<"  ";

    while(temp != NULL) //print whole posting list
    {
        cout<<"["<<temp->doc_id<<", "<<temp->freq<<"]"<<"  ";
        temp = temp->next;
    }

    cout<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4c6e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x4398(%rip), %rdi      # 0x8fd0
callq 0x20c0
movq %rax, %rdi
leaq 0x18bd(%rip), %rsi      # 0x6504
callq 0x20c0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
callq 0x2170
movq %rax, %rdi
movq 0x435c(%rip), %rsi      # 0x8fc0
callq 0x2100
jmp 0x4d7c
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x4ca8
movq 0x4348(%rip), %rdi      # 0x8fd0
leaq 0x1854(%rip), %rsi      # 0x64e3
callq 0x20c0
movq %rax, %rdi
movq 0x4322(%rip), %rsi      # 0x8fc0
callq 0x2100
jmp 0x4d7c
movq 0x4321(%rip), %rdi      # 0x8fd0
leaq 0x1843(%rip), %rsi      # 0x64f9
callq 0x20c0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x20c0
movq %rax, %rdi
leaq 0x182e(%rip), %rsi      # 0x6503
callq 0x20c0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
callq 0x2170
movq %rax, %rdi
leaq 0x1812(%rip), %rsi      # 0x6504
callq 0x20c0
cmpq $0x0, -0x18(%rbp)
je 0x4d69
movq 0x42cb(%rip), %rdi      # 0x8fd0
leaq 0x1751(%rip), %rsi      # 0x645d
callq 0x20c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x2170
movq %rax, %rdi
leaq 0x17de(%rip), %rsi      # 0x6507
callq 0x20c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x2170
movq %rax, %rdi
leaq 0x17c3(%rip), %rsi      # 0x650a
callq 0x20c0
movq %rax, %rdi
leaq 0x17ae(%rip), %rsi      # 0x6504
callq 0x20c0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x4cf7
movq 0x4260(%rip), %rdi      # 0x8fd0
movq 0x4249(%rip), %rsi      # 0x8fc0
callq 0x2100
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/posting_list.cpp
// Function: posting_list::~posting_list()
posting_list::~posting_list()
{
    node * temp = first;
    node * temp2;

    while(temp != NULL) //iterate list
    {
        temp2 = temp->next;
        delete temp;
        temp = temp2;
        pl_size--;
    }

    free(word);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4e00
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x4deb
movq -0x28(%rbp), %rdi
movl $0x10, %esi
callq 0x20f0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x4dbc
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2130
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/posting_list.cpp
// Function: posting_list::create_node(unsigned int)
posting_list::node * posting_list::create_node(unsigned int doc_id)
{
    node * new_node = new node;
    new_node->doc_id = doc_id;
    new_node->freq = 1;
    new_node->next = NULL ;
    return new_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x10, %edi
callq 0x20e0
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/posting_list.cpp
// Function: posting_list::get_term_freq(unsigned int)
unsigned int posting_list::get_term_freq(unsigned int doc_id)
{
    node * temp = first;

    while(temp != NULL) //iterating posting list
    {
        if(temp->doc_id == doc_id)
        {
            return temp->freq;  //found it
        }
        else if(temp->doc_id > doc_id)
        { // there is no point keep searching because list is sorted
            return 0; //doc id not found
        }
        else
        {
            temp = temp->next;
        }
    }

    return 0; // we have searched the whole list and doc id not found
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5029
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x5005
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5030
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jbe 0x5019
movl $0x0, -0x4(%rbp)
jmp 0x5030
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5027
jmp 0x4fe7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: JohnPapad[P]Mini-Search-Engine/posting_list.cpp
// Function: posting_list::add_doc_id_to_array(unsigned int*, unsigned int&)
unsigned int * posting_list::add_doc_id_to_array(unsigned int * unq_doc_ids, unsigned int & unq_doc_ids_size)
{// adding posting list's doc ids to an array. if a posting list's doc id is already contained in the array do not add it again
    node * temp = first;
    while(temp != NULL) //iterating posting list
    {
        bool doc_id_exists = 0;
        for(unsigned int i = 0; i < unq_doc_ids_size; i++)
        { // checking if current doc id is already contained in the array
            if (unq_doc_ids[i] == temp->doc_id)
            {
                doc_id_exists = 1;  // already exists
                break;
            }
        }

        if(doc_id_exists == 0)
        { //if current doc id is not already contained in the array add it now
            unq_doc_ids_size++;
            unq_doc_ids = (unsigned int *) realloc(unq_doc_ids, unq_doc_ids_size * sizeof(unsigned int));
            unq_doc_ids[unq_doc_ids_size - 1] = temp->doc_id;
        }

        temp = temp->next;
    }

    return unq_doc_ids;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5100
movb $0x0, -0x21(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x50a6
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x5099
movb $0x1, -0x21(%rbp)
jmp 0x50a6
jmp 0x509b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5076
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x50ef
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
shlq $0x2, %rsi
callq 0x2220
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5060
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: GLUTStop()
void GLUTStop(void)
{
  // Write configuration
  if (output_configuration_filename) {
    if (!WriteConfigurationFile(configuration, output_configuration_filename)) exit(-1);
  }

  // Destroy window 
  glutDestroyWindow(GLUTwindow);

  // Exit
  exit(0);
}

// Assembly:
pushq %rax
cmpq $0x0, 0x212c4f(%rip)    # 0x23bd88
je 0x2915f
movq 0x212c46(%rip), %rsi    # 0x23bd88
leaq 0x212a97(%rip), %rdi    # 0x23bbe0
callq 0x29180
cmpl $0x0, %eax
jne 0x2915d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x24c90
jmp 0x2915f
movl 0x212c2b(%rip), %edi    # 0x23bd90
callq 0x1bcfc0
xorl %edi, %edi
callq 0x24c90
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: WriteConfigurationFile(gaps::RGBDConfiguration&, char const*)
static int
WriteConfigurationFile(RGBDConfiguration& configuration, const char *filename) 
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("Writing configuration to %s ...\n", filename);
    fflush(stdout);
  }

  // Write file
  if (!configuration.WriteFile(filename)) return 0;

  // Print statistics
  if (print_verbose) {
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", configuration.NImages());
    printf("  # Surfaces = %d\n", configuration.NSurfaces());
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rsp, %rdi
callq 0x127730
movq %rsp, %rdi
callq 0x2e970
cmpl $0x0, 0x212c2b(%rip)    # 0x23bdd0
je 0x291c9
movq 0x10(%rsp), %rsi
leaq 0x19e1b9(%rip), %rdi    # 0x1c736c
movb $0x0, %al
callq 0x24090
movq 0x20bdcf(%rip), %rax    # 0x234f90
movq (%rax), %rdi
callq 0x24c20
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x98(%rax)
cmpl $0x0, %eax
jne 0x291f0
movl $0x0, 0x24(%rsp)
jmp 0x2925a
cmpl $0x0, 0x212bd9(%rip)    # 0x23bdd0
je 0x29252
movq %rsp, %rdi
callq 0x1277f0
leaq 0x19e185(%rip), %rdi    # 0x1c738d
movb $0x1, %al
callq 0x24090
movq 0x18(%rsp), %rdi
callq 0x2ea00
movl %eax, %esi
leaq 0x19e182(%rip), %rdi    # 0x1c73a4
movb $0x0, %al
callq 0x24090
movq 0x18(%rsp), %rdi
callq 0x2ecd0
movl %eax, %esi
leaq 0x19e179(%rip), %rdi    # 0x1c73b5
movb $0x0, %al
callq 0x24090
movq 0x20bd46(%rip), %rax    # 0x234f90
movq (%rax), %rdi
callq 0x24c20
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawCameras(int)
static void
DrawCameras(int color_scheme = RGBD_INDEX_COLOR_SCHEME)
{
  // Draw cameras
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if (!CheckVisibility(image, selected_position)) continue;
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index))
      image->DrawCamera(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else image->DrawCamera(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x2126f1(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x2958b
movl 0x10(%rsp), %esi
leaq 0x2126d3(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x212755(%rip), %rsi    # 0x23bc78
callq 0x2e670
cmpl $0x0, %eax
jne 0x2952f
jmp 0x2957b
cmpl $0x3, 0x14(%rsp)
je 0x2955f
movl 0x10(%rsp), %eax
cmpl 0x20c5a8(%rip), %eax    # 0x235ae8
jne 0x2955f
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movsd 0x19dad1(%rip), %xmm0   # 0x1c7028
callq *0xc0(%rax)
jmp 0x29579
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
movsd 0x19dab5(%rip), %xmm0   # 0x1c7028
callq *0xc0(%rax)
jmp 0x2957b
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x294e0
addq $0x18, %rsp
retq
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawBBoxes(int)
static void
DrawBBoxes(int color_scheme = RGBD_INDEX_COLOR_SCHEME)
{
  // Draw pixels of all images as bboxs in world space
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) image->DrawBBox(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else image->DrawBBox(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x212631(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x2961c
movl 0x10(%rsp), %esi
leaq 0x212617(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x8(%rsp)
cmpl $0x3, 0x14(%rsp)
je 0x295fb
movl 0x10(%rsp), %eax
cmpl 0x20c504(%rip), %eax    # 0x235ae8
jne 0x295fb
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0xc8(%rax)
jmp 0x2960d
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
callq *0xc8(%rax)
jmp 0x2960f
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x295a0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawImages(int)
static void
DrawImages(int color_scheme = RGBD_PHOTO_COLOR_SCHEME)
{
  // Draw images
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if (!image->RedChannel()) continue;
    if (!CheckVisibility(image, selected_position)) continue;
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index))
      image->DrawImage(RGBD_HIGHLIGHT_COLOR_SCHEME, 1.0);
    else image->DrawImage(color_scheme, 1.0);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x212591(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x296fd
movl 0x10(%rsp), %esi
leaq 0x212573(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2ef20
cmpq $0x0, %rax
jne 0x29689
jmp 0x296ed
movq 0x8(%rsp), %rdi
leaq 0x2125e3(%rip), %rsi    # 0x23bc78
callq 0x2e670
cmpl $0x0, %eax
jne 0x296a1
jmp 0x296ed
cmpl $0x3, 0x14(%rsp)
je 0x296d1
movl 0x10(%rsp), %eax
cmpl 0x20c436(%rip), %eax    # 0x235ae8
jne 0x296d1
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
movsd 0x19d947(%rip), %xmm0   # 0x1c7010
callq *0xd0(%rax)
jmp 0x296eb
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
movsd 0x19d92b(%rip), %xmm0   # 0x1c7010
callq *0xd0(%rax)
jmp 0x296ed
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x29640
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawFaces(int)
static void
DrawFaces(int color_scheme = RGBD_INDEX_COLOR_SCHEME)
{
  // Draw surfaces
  for (int i = 0; i < configuration.NSurfaces(); i++) {
    RGBDSurface *surface = configuration.Surface(i);
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) surface->DrawFaces(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else surface->DrawFaces(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x212181(%rip), %rdi    # 0x23bbe0
callq 0x2ecd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x29ac6
movl 0x10(%rsp), %esi
leaq 0x212167(%rip), %rdi    # 0x23bbe0
callq 0x2f050
movq %rax, 0x8(%rsp)
cmpl $0x3, 0x14(%rsp)
je 0x29aa8
movl 0x10(%rsp), %eax
cmpl 0x20c054(%rip), %eax    # 0x235ae8
jne 0x29aa8
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0x60(%rax)
jmp 0x29ab7
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
callq *0x60(%rax)
jmp 0x29ab9
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x29a50
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawEdges(int)
static void
DrawEdges(int color_scheme = RGBD_INDEX_COLOR_SCHEME)
{
  // Draw surfaces
  for (int i = 0; i < configuration.NSurfaces(); i++) {
    RGBDSurface *surface = configuration.Surface(i);
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) surface->DrawEdges(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else surface->DrawEdges(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x2120f1(%rip), %rdi    # 0x23bbe0
callq 0x2ecd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x29b56
movl 0x10(%rsp), %esi
leaq 0x2120d7(%rip), %rdi    # 0x23bbe0
callq 0x2f050
movq %rax, 0x8(%rsp)
cmpl $0x3, 0x14(%rsp)
je 0x29b38
movl 0x10(%rsp), %eax
cmpl 0x20bfc4(%rip), %eax    # 0x235ae8
jne 0x29b38
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0x68(%rax)
jmp 0x29b47
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
callq *0x68(%rax)
jmp 0x29b49
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x29ae0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawVertices(int)
static void
DrawVertices(int color_scheme = RGBD_INDEX_COLOR_SCHEME)
{
  // Draw surfaces
  for (int i = 0; i < configuration.NSurfaces(); i++) {
    RGBDSurface *surface = configuration.Surface(i);
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) surface->DrawVertices(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else surface->DrawVertices(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x212061(%rip), %rdi    # 0x23bbe0
callq 0x2ecd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x29be6
movl 0x10(%rsp), %esi
leaq 0x212047(%rip), %rdi    # 0x23bbe0
callq 0x2f050
movq %rax, 0x8(%rsp)
cmpl $0x3, 0x14(%rsp)
je 0x29bc8
movl 0x10(%rsp), %eax
cmpl 0x20bf34(%rip), %eax    # 0x235ae8
jne 0x29bc8
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0x70(%rax)
jmp 0x29bd7
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
callq *0x70(%rax)
jmp 0x29bd9
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x29b70
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawPoints(int, int)
static void
DrawPoints(int color_scheme = RGBD_PHOTO_COLOR_SCHEME, int skip = 1)
{
  // Draw pixels of all images as points in world space
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if (!image->DepthChannel()) continue;
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) image->DrawPoints(RGBD_HIGHLIGHT_COLOR_SCHEME, skip);
    else image->DrawPoints(color_scheme, skip);
  }
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x211fcd(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x29c9d
movl 0x1c(%rsp), %esi
leaq 0x211fb3(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2ea50
cmpq $0x0, %rax
jne 0x29c49
jmp 0x29c8d
cmpl $0x3, 0x24(%rsp)
je 0x29c75
movl 0x1c(%rsp), %eax
cmpl 0x20be8e(%rip), %eax    # 0x235ae8
jne 0x29c75
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
movl $0x4, %esi
callq *0xd8(%rax)
jmp 0x29c8b
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
callq *0xd8(%rax)
jmp 0x29c8d
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x29c04
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawSurfels(int, int)
static void
DrawSurfels(int color_scheme = RGBD_PHOTO_COLOR_SCHEME, int skip = 1)
{
  // Draw pixels of all images as surfels in world space
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if (!image->DepthChannel()) continue;
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) image->DrawSurfels(RGBD_HIGHLIGHT_COLOR_SCHEME, skip);
    else image->DrawSurfels(color_scheme, skip);
  }
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x211f0d(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x29d5d
movl 0x1c(%rsp), %esi
leaq 0x211ef3(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2ea50
cmpq $0x0, %rax
jne 0x29d09
jmp 0x29d4d
cmpl $0x3, 0x24(%rsp)
je 0x29d35
movl 0x1c(%rsp), %eax
cmpl 0x20bdce(%rip), %eax    # 0x235ae8
jne 0x29d35
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
movl $0x4, %esi
callq *0xe0(%rax)
jmp 0x29d4b
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
callq *0xe0(%rax)
jmp 0x29d4d
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x29cc4
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawQuads(int, int)
static void
DrawQuads(int color_scheme = RGBD_PHOTO_COLOR_SCHEME, int skip = 1)
{
  // Draw pixels of all images as quads in world space
  for (int i = 0; i < configuration.NImages(); i++) {
    RGBDImage *image = configuration.Image(i);
    if (!image->DepthChannel()) continue;
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) image->DrawQuads(RGBD_HIGHLIGHT_COLOR_SCHEME, skip);
    else image->DrawQuads(color_scheme, skip);
  }
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movl %esi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0x211e4d(%rip), %rdi    # 0x23bbe0
callq 0x2ea00
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x29e1d
movl 0x1c(%rsp), %esi
leaq 0x211e33(%rip), %rdi    # 0x23bbe0
callq 0x2ea20
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2ea50
cmpq $0x0, %rax
jne 0x29dc9
jmp 0x29e0d
cmpl $0x3, 0x24(%rsp)
je 0x29df5
movl 0x1c(%rsp), %eax
cmpl 0x20bd0e(%rip), %eax    # 0x235ae8
jne 0x29df5
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
movl $0x4, %esi
callq *0xe8(%rax)
jmp 0x29e0b
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x20(%rsp), %edx
movq (%rdi), %rax
callq *0xe8(%rax)
jmp 0x29e0d
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x29d84
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawTextures(int)
static void
DrawTextures(int color_scheme = RGBD_PHOTO_COLOR_SCHEME)
{
  // Draw surfaces
  for (int i = 0; i < configuration.NSurfaces(); i++) {
    RGBDSurface *surface = configuration.Surface(i);
    if ((color_scheme != RGBD_INDEX_COLOR_SCHEME) && (i == selected_image_index)) surface->DrawTexture(RGBD_HIGHLIGHT_COLOR_SCHEME);
    else surface->DrawTexture(color_scheme);
  }
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x211d91(%rip), %rdi    # 0x23bbe0
callq 0x2ecd0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x29eb6
movl 0x10(%rsp), %esi
leaq 0x211d77(%rip), %rdi    # 0x23bbe0
callq 0x2f050
movq %rax, 0x8(%rsp)
cmpl $0x3, 0x14(%rsp)
je 0x29e98
movl 0x10(%rsp), %eax
cmpl 0x20bc64(%rip), %eax    # 0x235ae8
jne 0x29e98
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x4, %esi
callq *0x78(%rax)
jmp 0x29ea7
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq (%rdi), %rax
callq *0x78(%rax)
jmp 0x29ea9
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x29e40
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/confview/confview.cpp
// Function: DrawSelectedPosition()
static void
DrawSelectedPosition(void)
{
  // Check selected position
  if (selected_position == R3unknown_point) return;
  
  // Draw center point
  RNLoadRgb(1, 0, 0);
  RNScalar d = 0.025;
  R3Sphere(selected_position, d).Draw();
}

// Assembly:
subq $0x48, %rsp
leaq 0x211b9d(%rip), %rdi    # 0x23bc78
leaq 0x215336(%rip), %rsi    # 0x23f418
callq 0xed340
cmpl $0x0, %eax
je 0x2a0ee
jmp 0x2a14e
movl $0x1, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x2efd0
movabsq $0x3f9999999999999a, %rax # imm = 0x3F9999999999999A
movq %rax, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
leaq 0x211b60(%rip), %rsi    # 0x23bc78
leaq 0x18(%rsp), %rdi
callq 0xd3590
leaq 0x10(%rsp), %rdi
movl $0x772, %esi            # imm = 0x772
callq 0x2f210
jmp 0x2a133
movq 0x10(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x862a0
jmp 0x2a144
leaq 0x18(%rsp), %rdi
callq 0x2f230
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x8(%rsp)
movl %eax, 0x4(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2f230
movq 0x8(%rsp), %rdi
callq 0x252b0
nopw %cs:(%rax,%rax)