LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenSetup
void linkScreenSetup(LinkScreen *screen, const char *subreddit, const RedditListType listType)
{
    screen->list = redditLinkListNew();
    screen->list->subreddit = redditCopyString(subreddit);
    screen->list->type = listType;

    redditGetListing(screen->list);

    screen->displayed = LINES - 1;
    screen->linkOpenSize = (screen->displayed / 5) * 4;

    screen->offset = 0;
    screen->selected = 0;

    /* Assign help-screen text */
    screen->helpText = linkScreenHelp;
    screen->helpLineCount = sizeof(linkScreenHelp)/sizeof(linkScreenHelp[0]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
callq 0x21f0
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x2060
movq (%rbx), %rdi
movq %rax, (%rdi)
movl %ebp, 0x10(%rdi)
callq 0x2140
movq 0x598f(%rip), %rax      # 0x7fc0
movl (%rax), %eax
decl %eax
movl %eax, 0x8(%rbx)
pushq $0x5
popq %rcx
cltd
idivl %ecx
shll $0x2, %eax
movl %eax, 0x28(%rbx)
andq $0x0, 0xc(%rbx)
leaq 0x5ba0(%rip), %rax      # 0x81f0
movq %rax, 0x38(%rbx)
movl $0x1a, 0x30(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenFreeLines
void commentScreenFreeLines (CommentScreen *screen)
{
    int i;
    if (screen == NULL)
        return ;
    for (i = 0; i < screen->lineCount; i++)
        commentLineFree(screen->lines[i]);
    free(screen->lines);
    screen->lines = NULL;
    screen->lineCount = 0;
    screen->allocLineCount = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x26d1
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r15
jge 0x26c0
movq (%rdi,%r15,8), %rdi
callq 0x266b
incq %r15
jmp 0x26a5
callq 0x2230
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenFree
void commentScreenFree(CommentScreen *screen)
{
    if (screen == NULL)
        return ;
    commentScreenFreeLines(screen);

    free(screen->lines);
    free(screen);
}

// Assembly:
testq %rdi, %rdi
je 0x26f2
pushq %rbx
movq %rdi, %rbx
callq 0x2691
movq 0x10(%rbx), %rdi
callq 0x2230
movq %rbx, %rdi
popq %rbx
jmp 0x2230
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenAddLine
void commentScreenAddLine(CommentScreen *screen, CommentLine *line)
{
    screen->lineCount++;
    if (screen->lineCount >= screen->allocLineCount) {
        screen->allocLineCount+=100;
        screen->lines = realloc(screen->lines, sizeof(CommentLine**) * screen->allocLineCount);
    }
    screen->lines[screen->lineCount - 1] = line;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %ecx
incl %ecx
movl %ecx, 0x8(%rdi)
movslq 0xc(%rdi), %rax
cmpl %eax, %ecx
jge 0x2713
movq 0x10(%r14), %rax
jmp 0x2734
leaq 0x64(%rax), %rcx
movl %ecx, 0xc(%r14)
movq 0x10(%r14), %rdi
leaq 0x320(,%rax,8), %rsi
callq 0x2320
movq %rax, 0x10(%r14)
movl 0x8(%r14), %ecx
movslq %ecx, %rcx
movq %rbx, -0x8(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: createCommentLine
wchar_t *createCommentLine(RedditComment *comment, int width, int indent)
{
    wchar_t *text = malloc(sizeof(wchar_t) * (width+1));
    int i, ilen = indent * 3, bodylen, texlen;

    bodylen = wcslen(comment->wbodyEsc);
    memset(text, 32, sizeof(wchar_t) * (width));
    text[width] = (wchar_t)0;

    if (comment->directChildrenCount > 0)
        swprintf(text + ilen, width + 1 - ilen, L"%s (%d hidden) > ", comment->author, comment->totalReplyCount);
    else
        swprintf(text + ilen, width + 1 - ilen, L"%s > ", comment->author);

    texlen = wcslen(text);
    for (i = 0; i <= width - texlen - 1; i++)
        if (i <= bodylen - 1 && comment->wbodyEsc[i] != L'\n')
            text[i + texlen] = comment->wbodyEsc[i];
        else
            text[i + texlen] = (wchar_t)32;

    return text;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
movslq %esi, %r13
leaq 0x4(,%r13,4), %rdi
callq 0x2260
movq %rax, %r14
leal (%r12,%r12,2), %r12d
movq 0x48(%rbx), %rdi
callq 0x21b0
movq %rax, (%rsp)
leaq (,%r13,4), %rdx
pushq $0x20
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x2110
andl $0x0, (%r14,%r13,4)
subl %r12d, %r13d
incl %r13d
cmpl $0x0, 0x60(%rbx)
movslq %r12d, %rax
leaq (%r14,%rax,4), %rdi
movslq %r13d, %rsi
movq 0x20(%rbx), %rcx
jle 0x27c4
movl 0x5c(%rbx), %r8d
leaq 0x2ba5(%rip), %rdx      # 0x5360
xorl %eax, %eax
callq 0x2290
jmp 0x27d2
leaq 0x2bdd(%rip), %rdx      # 0x53a8
xorl %eax, %eax
callq 0x2290
movq %r14, %rdi
callq 0x21b0
movslq %eax, %rdx
notl %eax
addl %r15d, %eax
cltq
movslq (%rsp), %rcx
leaq (%r14,%rdx,4), %rdx
xorl %esi, %esi
cmpq %rax, %rsi
jg 0x280e
cmpq %rcx, %rsi
jge 0x2804
movq 0x48(%rbx), %rdi
movl (%rdi,%rsi,4), %edi
cmpl $0xa, %edi
jne 0x2806
movl %ebp, %edi
movl %edi, (%rdx,%rsi,4)
incq %rsi
jmp 0x27ee
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: getCommentScreenRecurse
int getCommentScreenRecurse(CommentScreen *screen, RedditComment *comment, int width, int indent)
{
    int i;
    RedditComment *current;
    CommentLine *line;
    int indentCur = indent + 1;
    int nested = 0;
    for (i = 0; i < comment->replyCount; i++) {
        current = comment->replies[i];
        line = commentLineNew();
        line->text = createCommentLine(current, width, indentCur);
        line->indentCount = indentCur;
        line->comment = current;
        commentScreenAddLine(screen, line);
        if (current->replyCount) {
            line->foldCount = getCommentScreenRecurse(screen, current, width, indentCur);
            nested += line->foldCount;
        }
        nested++;
    }
    return nested;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movl %edx, %r14d
movq %rdi, %rbx
incl %r12d
xorl %r15d, %r15d
xorl %r8d, %r8d
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movslq (%rsi), %rax
cmpq %rax, %r15
jge 0x28c8
movl %r8d, 0x4(%rsp)
movq 0x8(%rsi), %rax
movq (%rax,%r15,8), %rbp
callq 0x2660
movq %rax, %r13
movq %rbp, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x2744
movq %rax, (%r13)
movl %r12d, 0x18(%r13)
movq %rbp, 0x8(%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x26f3
cmpl $0x0, (%rbp)
je 0x28b1
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x2820
movl %eax, 0x14(%r13)
movl 0x4(%rsp), %r8d
addl %eax, %r8d
jmp 0x28b6
movl 0x4(%rsp), %r8d
incl %r8d
incq %r15
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rbx
jmp 0x284a
movl %r8d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenDown
void commentScreenDown(CommentScreen *screen)
{
    screen->selected++;
    if (screen->selected > screen->offset + screen->displayed) {
        if (screen->offset + screen->displayed + 1 < screen->lineCount)
            screen->offset++;
        else
            screen->selected--;
    } else if (screen->selected > screen->lineCount - 1) {
        screen->selected--;
    }
}

// Assembly:
movl 0x1c(%rdi), %ecx
movl 0x20(%rdi), %eax
leal 0x1(%rax), %edx
movl %edx, 0x20(%rdi)
movl 0x18(%rdi), %edx
addl %ecx, %edx
cmpl %edx, %eax
jge 0x2953
movl 0x8(%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x2960
retq
incl %edx
cmpl 0x8(%rdi), %edx
jge 0x2960
incl %ecx
movl %ecx, 0x1c(%rdi)
retq
movl %eax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenLevelDown
void commentScreenLevelDown(CommentScreen *screen) 
{
    int newPosition = screen->selected;
    int indentCount = screen->lines[screen->selected]->indentCount;
    while (++newPosition < screen->lineCount) {
        if (screen->lines[newPosition]->indentCount < indentCount)
            return;
        if (screen->lines[newPosition]->indentCount == indentCount) {
            screen->offset += newPosition - screen->selected;
            screen->selected = newPosition;
            return;
        }
    }
}

// Assembly:
movslq 0x20(%rdi), %rcx
movl %ecx, %eax
movq 0x10(%rdi), %rdx
leaq (%rdx,%rcx,8), %rdx
addq $0x8, %rdx
movq -0x8(%rdx), %rsi
movl 0x18(%rsi), %r8d
movslq 0x8(%rdi), %r9
incq %rcx
xorl %esi, %esi
leaq (%rcx,%rsi), %r10
cmpq %r9, %r10
jge 0x29ad
movq (%rdx,%rsi,8), %r10
movl 0x18(%r10), %r10d
cmpl %r8d, %r10d
jl 0x29ad
incq %rsi
cmpl %r8d, %r10d
jne 0x2987
addl %esi, %eax
addl %esi, 0x1c(%rdi)
movl %eax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenLevelUp
void commentScreenLevelUp(CommentScreen *screen)
{
    int newPosition = screen->selected;
    int indentCount = screen->lines[screen->selected]->indentCount;
    while (--newPosition >= 0) {
        if (screen->lines[newPosition]->indentCount < indentCount)
            return;
        if (screen->lines[newPosition]->indentCount == indentCount) {
            screen->offset += newPosition - screen->selected;
            if (screen->offset < 0) screen->offset = 0;
            screen->selected = newPosition;
            return;
        }
    }
}

// Assembly:
movl 0x20(%rdi), %eax
movq 0x10(%rdi), %rcx
movslq %eax, %rdx
movq (%rcx,%rdx,8), %rdx
movl 0x18(%rdx), %edx
leaq (%rcx,%rax,8), %rsi
addq $-0x8, %rsi
xorl %ecx, %ecx
leal (%rax,%rcx), %r8d
testl %r8d, %r8d
jle 0x29fb
movq (%rsi), %r8
movl 0x18(%r8), %r8d
cmpl %edx, %r8d
jl 0x29fb
decl %ecx
addq $-0x8, %rsi
cmpl %edx, %r8d
jne 0x29c9
addl %ecx, %eax
addl 0x1c(%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovgl %ecx, %edx
movl %edx, 0x1c(%rdi)
movl %eax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenUp
void commentScreenUp(CommentScreen *screen)
{
    screen->selected--;
    if (screen->selected < 0)
        screen->selected++;
    if (screen->selected < screen->offset)
        screen->offset--;
}

// Assembly:
movl 0x1c(%rdi), %eax
movl 0x20(%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
setg %dl
subl %edx, %ecx
movl %ecx, 0x20(%rdi)
cmpl %eax, %ecx
jge 0x2a17
decl %eax
movl %eax, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenCommentScrollDown
void commentScreenCommentScrollDown(CommentScreen *screen)
{
    RedditComment *current = screen->lines[screen->selected]->comment;
    wchar_t *currentTextPointer = &(current->wbodyEsc[current->advance]);
    
    wchar_t *foundNewLineString = wcschr(currentTextPointer, L'\n');

    // We found a \n char, so advance to it if it's before end-of-screen
    if (foundNewLineString != NULL) 
    {
        unsigned int distanceToNewLine = foundNewLineString - currentTextPointer + 1;
        if (distanceToNewLine < screen->width)
        {
            current->advance += distanceToNewLine;
            return;
        }
    }

    if (wcslen(currentTextPointer) > screen->width)
        current->advance += screen->width;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movslq 0x20(%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %r15
movslq 0x84(%r15), %r12
leaq (,%r12,4), %rbx
addq 0x48(%r15), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x2070
testq %rax, %rax
je 0x2a69
subq %rbx, %rax
shrq $0x2, %rax
incl %eax
movl 0x24(%r14), %ebp
cmpl %ebp, %eax
jae 0x2a6d
jmp 0x2a82
movl 0x24(%r14), %ebp
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rcx
movslq %ebp, %rdx
movl %ebp, %eax
cmpq %rdx, %rcx
jbe 0x2a8c
addl %eax, %r12d
movl %r12d, 0x84(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenCommentScrollUp
void commentScreenCommentScrollUp(CommentScreen *screen)
{
    RedditComment *current = screen->lines[screen->selected]->comment;

    if (current->advance == 0)
        return;

    wchar_t *currentTextPointer = &(current->wbodyEsc[current->advance - 1]);
    const wchar_t *foundNewLineString = reverse_wcsnchr(currentTextPointer - 1, current->advance - 1, L'\n');

    unsigned int distanceToScroll = 0;
    unsigned int distanceToNewLine = 0;

    if (foundNewLineString != NULL)
        distanceToNewLine = currentTextPointer - foundNewLineString;
                            /*wcslen(foundNewLineString);*/
    else
        distanceToNewLine = current->advance;

    distanceToScroll = (distanceToNewLine % screen->width == 0) ?
                        screen->width :
                        distanceToNewLine % screen->width;

    current->advance -= distanceToScroll;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rax
movslq 0x20(%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %r14
movslq 0x84(%r14), %r15
testq %r15, %r15
je 0x2b12
movq %rdi, %rbx
movq 0x48(%r14), %r12
leaq -0x1(%r15), %rsi
leaq (%r12,%r15,4), %rdi
addq $-0x8, %rdi
pushq $0xa
popq %rdx
callq 0x2594
testq %rax, %rax
je 0x2af4
movq %rax, %rcx
leaq (%r12,%r15,4), %rax
addq $-0x4, %rax
subq %rcx, %rax
shrq $0x2, %rax
movl 0x84(%r14), %ecx
jmp 0x2afd
movl 0x84(%r14), %ecx
movl %ecx, %eax
movl 0x24(%rbx), %esi
xorl %edx, %edx
divl %esi
testl %edx, %edx
cmovel %esi, %edx
subl %edx, %ecx
movl %ecx, 0x84(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: commentScreenOpenComment
void commentScreenOpenComment(CommentScreen *screen)
{
    if (!screen->commentOpen) {
        screen->commentOpen = 1;
        screen->displayed -= screen->commentOpenSize - 1;
        if (screen->selected > screen->displayed + screen->offset)
            screen->offset = screen->selected - screen->displayed;
    }
}

// Assembly:
movb 0x2c(%rdi), %al
testb $0x1, %al
jne 0x2e45
orb $0x1, %al
movb %al, 0x2c(%rdi)
movl 0x18(%rdi), %eax
movl 0x20(%rdi), %ecx
subl 0x28(%rdi), %eax
incl %eax
movl %eax, 0x18(%rdi)
movl 0x1c(%rdi), %edx
addl %eax, %edx
cmpl %edx, %ecx
jle 0x2e45
subl %eax, %ecx
movl %ecx, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenRenderLine
void linkScreenRenderLine (LinkScreen *screen, int line, int width)
{
    size_t tmp, title;
    size_t offset;
    if (screen->allocLineCount <= line) {
        screen->allocLineCount = line + 100;
        screen->screenLines = realloc(screen->screenLines, screen->allocLineCount * sizeof(wchar_t*));
        memset(screen->screenLines + screen->allocLineCount - 100, 0, sizeof(wchar_t*) * 100);
    }

    if (screen->screenLineCount < line)
        screen->screenLineCount = line;

    screen->screenLines[line] = realloc(screen->screenLines[line], (width + 1) * sizeof(wchar_t));

    swprintf(screen->screenLines[line], width + 1, L"%2d. [%4d] %20s - ", line + 1, screen->list->links[line]->score, screen->list->links[line]->author);

    offset = wcslen(screen->screenLines[line]);
    title = wcslen(screen->list->links[line]->wtitleEsc);
    for (tmp = 0; tmp <= width - offset; tmp++)
        if (tmp >= title)
            screen->screenLines[line][tmp + offset] = (wchar_t)32;
        else
            screen->screenLines[line][tmp + offset] = screen->list->links[line]->wtitleEsc[tmp];

    screen->screenLines[line][width] = (wchar_t)0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movslq %esi, %r12
cmpl %esi, 0x18(%rdi)
jg 0x306b
leal 0x64(%r12), %eax
movl %eax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
leaq 0x320(,%r12,8), %rsi
callq 0x2320
movq %rax, 0x20(%rbx)
movslq 0x18(%rbx), %rcx
leaq (%rax,%rcx,8), %rdi
addq $-0x320, %rdi           # imm = 0xFCE0
movl $0x320, %edx            # imm = 0x320
xorl %esi, %esi
callq 0x2110
cmpl %ebp, 0x14(%rbx)
jge 0x3073
movl %ebp, 0x14(%rbx)
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %rdi
movslq %r14d, %rax
movq %rax, (%rsp)
leaq 0x1(%rax), %r14
leaq 0x4(,%rax,4), %rsi
callq 0x2320
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movq (%rbx), %rax
movq 0x20(%rbx), %rcx
movq (%rcx,%r12,8), %rdi
incl %ebp
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %rax
movl 0x58(%rax), %r8d
movq 0x18(%rax), %r9
leaq 0x236d(%rip), %rdx      # 0x542c
xorl %r13d, %r13d
movq %r14, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2290
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r14
movq %r14, %rdi
callq 0x21b0
movq %rax, %r15
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x48(%rax), %rbx
movq %rbx, %rdi
callq 0x21b0
movq (%rsp), %r8
movq %r8, %rcx
subq %r15, %rcx
leaq (%r14,%r15,4), %rdx
pushq $0x20
popq %rsi
cmpq %rcx, %r13
ja 0x3122
movl %esi, %edi
cmpq %rax, %r13
jae 0x3119
movl (%rbx,%r13,4), %edi
movl %edi, (%rdx,%r13,4)
incq %r13
jmp 0x3109
andl $0x0, (%r14,%r8,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenSetupSplit
void linkScreenSetupSplit (LinkScreen *screen, wchar_t *tmpbuf, int bufLen, int lastLine)
{
    int i;

    for (i = 0; i < bufLen; i++)
        tmpbuf[i] = L'-';

    tmpbuf[bufLen] = (wchar_t)0;
    attron(COLOR_PAIR(2));
    mvaddwstr(lastLine, 0, tmpbuf);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movq %rsi, %rbx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
cmpq %rax, %rcx
je 0x315c
movl $0x2d, (%rbx,%rax,4)
incq %rax
jmp 0x314b
movslq %edx, %rax
andl $0x0, (%rbx,%rax,4)
movq 0x4e76(%rip), %r14      # 0x7fe0
movq (%r14), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x22e0
movq (%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x319c
movq (%r14), %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x22b0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenRenderLinkText
void linkScreenRenderLinkText (LinkScreen *screen, wchar_t *tmpbuf, int bufLen, int screenLines)
{
    RedditLink *current;
    int lastLine = screenLines - screen->offset;

    linkScreenSetupSplit(screen, tmpbuf, bufLen, lastLine);

    attron(COLOR_PAIR(1));
    if (screen->list->linkCount >= screen->selected) {
        current = screen->list->links[screen->selected];
        if (current != NULL) {
            swprintf(tmpbuf, bufLen, L"%s - %d Score / %d Comments / %s \nTitle: ", current->author, current->score, current->numComments, current->created_utc);
            mvaddwstr(lastLine + 1, 0, tmpbuf);
            addwstr(current->wtitleEsc);
            addch('\n');
            swprintf(tmpbuf, bufLen, L"-------\n");
            addwstr(tmpbuf);

            if (current->flags & REDDIT_LINK_IS_SELF)
                addwstr(&(current->wselftextEsc[current->advance]));
            else
                addstr(current->url);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
subl 0xc(%rdi), %ebp
movl %ebp, %ecx
callq 0x3136
movq 0x4e17(%rip), %r12      # 0x7fe0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x22e0
movq (%r15), %rax
movslq 0x10(%r15), %rcx
cmpl %ecx, 0x14(%rax)
jl 0x32ab
movq 0x18(%rax), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0x32ab
movslq %r14d, %r14
movq 0x18(%r15), %rcx
movl 0x58(%r15), %r8d
movl 0x64(%r15), %r9d
movq 0x70(%r15), %rax
movq %rax, (%rsp)
leaq 0x2260(%rip), %rdx      # 0x5478
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2290
movq (%r12), %rdi
incl %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x3248
movq (%r12), %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
callq 0x22b0
movq (%r12), %rdi
movq 0x48(%r15), %rsi
pushq $-0x1
popq %rbp
movl %ebp, %edx
callq 0x22b0
movq (%r12), %rdi
pushq $0xa
popq %rsi
callq 0x22c0
leaq 0x22b3(%rip), %rdx      # 0x5520
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2290
movq (%r12), %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x22b0
testb $0x1, 0x78(%r15)
movq (%r12), %rdi
jne 0x32b8
movq 0x20(%r15), %rsi
pushq $-0x1
popq %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2350
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x7c(%r15), %esi
shlq $0x2, %rsi
addq 0x50(%r15), %rsi
pushq $-0x1
popq %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22b0
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenRenderHelpText
void linkScreenRenderHelpText (LinkScreen *screen, wchar_t *tmpbuf, int bufLen, int screenLines)
{
    int i;
    int lastLine = screenLines - screen->offset;

    linkScreenSetupSplit(screen, tmpbuf, bufLen, lastLine);

    attron(COLOR_PAIR(1));

    for(i = 0; i < screen->helpLineCount; i++)
        mvaddwstr(lastLine + 1 + i, 0, screen->helpText[i]);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdi, %r14
subl 0xc(%rdi), %ebx
movl %ebx, %ecx
callq 0x3136
movq 0x4cea(%rip), %r15      # 0x7fe0
movq (%r15), %rdi
xorl %r12d, %r12d
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x22e0
incl %ebx
pushq $-0x1
popq %rbp
movslq 0x30(%r14), %rax
cmpq %rax, %r12
jge 0x3340
movq (%r15), %rdi
leal (%rbx,%r12), %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x333b
movq (%r15), %rdi
movq 0x38(%r14), %rax
movq (%rax,%r12,8), %rsi
movl %ebp, %edx
callq 0x22b0
incq %r12
jmp 0x330d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenDown
void linkScreenDown(LinkScreen *screen)
{
    screen->selected++;
    if (screen->selected > screen->offset + screen->displayed) {
        if (screen->offset + screen->displayed + 1 < screen->list->linkCount)
            screen->offset++;
        else
            screen->selected--;
    } else if (screen->selected + 1 > screen->list->linkCount) {
        screen->selected--;
    }
}

// Assembly:
movl 0x10(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rdi)
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %edx
addl %ecx, %edx
movq (%rdi), %rsi
movl 0x14(%rsi), %esi
cmpl %edx, %eax
jge 0x352b
leal 0x2(%rax), %ecx
cmpl %esi, %ecx
jg 0x3537
retq
incl %edx
cmpl %esi, %edx
jge 0x3537
incl %ecx
movl %ecx, 0xc(%rdi)
retq
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenUp
void linkScreenUp(LinkScreen *screen)
{
    screen->selected--;
    if (screen->selected < 0)
        screen->selected++;
    if (screen->selected < screen->offset)
        screen->offset--;
}

// Assembly:
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
setg %dl
subl %edx, %ecx
movl %ecx, 0x10(%rdi)
cmpl %eax, %ecx
jge 0x3556
decl %eax
movl %eax, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenTextScrollDown
void linkScreenTextScrollDown(LinkScreen *screen)
{
    RedditLink *current = screen->list->links[screen->selected];

    if (current->wselftextEsc == NULL)
        return;

    wchar_t *currentTextPointer = &(current->wselftextEsc[current->advance]);
    wchar_t *foundNewLineString = wcschr(currentTextPointer, '\n');
    int screenWidth = COLS;

    // We found a \n char, so advance to it if it's before end-of-screen
    if (foundNewLineString != NULL) 
    {
        unsigned int distanceToNewLine = foundNewLineString - currentTextPointer + 1;
        if (distanceToNewLine < screenWidth)
        {
            // Step past the newline char
            current->advance += distanceToNewLine;
            return;
        }
    }

    if (wcslen(currentTextPointer) > screenWidth)
        current->advance += screenWidth;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rdi), %rcx
movq (%rax,%rcx,8), %r14
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x35c1
movl 0x7c(%r14), %r15d
leaq (%rax,%r15,4), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x2070
movq 0x4a37(%rip), %rcx      # 0x7fc8
movl (%rcx), %ebp
testq %rax, %rax
je 0x35a5
subq %rbx, %rax
shrq $0x2, %rax
incl %eax
cmpl %ebp, %eax
jb 0x35ba
movslq %ebp, %r12
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rcx
movl %ebp, %eax
cmpq %r12, %rcx
jbe 0x35c1
addl %eax, %r15d
movl %r15d, 0x7c(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenTextScrollUp
void linkScreenTextScrollUp(LinkScreen *screen)
{
    RedditLink *current = screen->list->links[screen->selected];
    int screenWidth = COLS;

    if (current->advance == 0)
        return;

    wchar_t *currentTextPointer = &(current->wselftextEsc[current->advance - 1]);
    const wchar_t *foundNewLineString = reverse_wcsnchr(currentTextPointer - 1, current->advance - 1, L'\n');

    unsigned int distanceToScroll = 0;
    unsigned int distanceToNewLine = 0;

    if (foundNewLineString != NULL)
        distanceToNewLine = currentTextPointer - foundNewLineString;
                            /*wcslen(foundNewLineString);*/
    else
        distanceToNewLine = current->advance;

    distanceToScroll = (distanceToNewLine % screenWidth == 0) ?
                        screenWidth :
                        distanceToNewLine % screenWidth;

    current->advance -= distanceToScroll;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rdi), %rcx
movq (%rax,%rcx,8), %r14
movl 0x7c(%r14), %ebx
testl %ebx, %ebx
je 0x3638
movq 0x49d9(%rip), %rax      # 0x7fc8
movl (%rax), %ebp
movq 0x50(%r14), %r15
decl %ebx
leaq (%r15,%rbx,4), %rdi
addq $-0x4, %rdi
pushq $0xa
popq %rdx
movq %rbx, %rsi
callq 0x2594
testq %rax, %rax
je 0x3623
movq %rax, %rcx
leaq (%r15,%rbx,4), %rax
subq %rcx, %rax
shrq $0x2, %rax
movl 0x7c(%r14), %ecx
jmp 0x3629
movl 0x7c(%r14), %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebp
testl %edx, %edx
cmovel %ebp, %edx
subl %edx, %ecx
movl %ecx, 0x7c(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: linkScreenOpenLink
void linkScreenOpenLink(LinkScreen *screen)
{
    if (!screen->linkOpen) {
        screen->linkOpen = 1;
        screen->displayed -= screen->linkOpenSize - 1;
        if (screen->selected > screen->displayed + screen->offset)
            screen->offset = screen->selected - screen->displayed;
    }
}

// Assembly:
movb 0x2c(%rdi), %al
testb $0x1, %al
jne 0x366b
orb $0x1, %al
movb %al, 0x2c(%rdi)
movl 0x8(%rdi), %eax
movl 0x10(%rdi), %ecx
subl 0x28(%rdi), %eax
incl %eax
movl %eax, 0x8(%rdi)
movl 0xc(%rdi), %edx
addl %eax, %edx
cmpl %edx, %ecx
jle 0x366b
subl %eax, %ecx
movl %ecx, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: getPassword
char *getPassword()
{
    const int MAX_PASSWD_SIZE = 200;
    char *password = malloc(MAX_PASSWD_SIZE);

    clear();
    mvprintw(0, 0, "Password: ");
    refresh();

    getnstr(password, MAX_PASSWD_SIZE);
    password[MAX_PASSWD_SIZE - 1] = '\0';
    return password;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0xc8, %edi
callq 0x2260
movq %rax, %rbx
movq 0x45b1(%rip), %r14      # 0x7fe0
movq (%r14), %rdi
callq 0x22f0
leaq 0x1b0f(%rip), %rdx      # 0x554d
xorl %edi, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2380
movq (%r14), %rdi
callq 0x2220
movq (%r14), %rdi
movq %rbx, %rsi
movl $0xc8, %edx
callq 0x2390
movb $0x0, 0xc7(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: handleArguments
void handleArguments (optParser *parser)
{
    optResponse res;
    int unusedCount = 0;
    int optUnused[3] = { MOPT_SUBREDDIT, MOPT_USERNAME, MOPT_PASSWORD };

    do {
       res = optRunParser(parser);
       if (res == OPT_UNUSED) {
           if (unusedCount < (sizeof(optUnused)/sizeof(optUnused[0]))) {
               int optC = optUnused[unusedCount];
               strcpy(mainOptions[optC].svalue, parser->argv[parser->curopt]);
               mainOptions[optC].isSet = 1;
           }

           unusedCount++;
       }

    } while (res != OPT_SUCCESS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x60d(%rip), %r12       # 0x4098
leaq 0x482e(%rip), %r13      # 0x82c0
movq %rbx, %rdi
callq 0x3e6e
movl %eax, %ebp
cmpl $0x2, %eax
jne 0x3adc
cmpl $0x2, %r15d
ja 0x3ad9
movl %r15d, %eax
movslq (%r12,%rax,4), %rax
imulq $0x1f0, %rax, %rax      # imm = 0x1F0
leaq (%rax,%r13), %r14
addq $0x1bc, %r14            # imm = 0x1BC
movq 0x8(%rbx), %rax
movslq 0x10(%rbx), %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x21e0
orb $0x1, -0x7(%r14)
incl %r15d
testl %ebp, %ebp
jne 0x3a92
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: displayCmd
void displayCmd (optOption *option)
{
    printf("   ");
    if (option->opt_long[0] != '\0')
        printf("--%-10s ", option->opt_long);
    else
        printf("             ");

    if (option->opt_short != '\0')
        printf("-%c ", option->opt_short);
    else
        printf("   ");

    switch(option->arg) {
    case OPT_STRING:
        printf("[String] ");
        break;
    case OPT_INT:
        printf("[Int]    ");
        break;
    case OPT_NONE:
        printf("         ");
        break;
    }

    printf(" : %s\n", option->helpText);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x1a71(%rip), %rdi      # 0x556b
xorl %eax, %eax
callq 0x2030
cmpb $0x0, (%rbx)
je 0x3b19
leaq 0x1a4b(%rip), %rdi      # 0x5558
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
jmp 0x3b27
leaq 0x1a41(%rip), %rdi      # 0x5561
xorl %eax, %eax
callq 0x2030
movsbl 0x1f(%rbx), %esi
testl %esi, %esi
je 0x3b3f
leaq 0x1a39(%rip), %rdi      # 0x556f
xorl %eax, %eax
callq 0x2030
jmp 0x3b4d
leaq 0x1a25(%rip), %rdi      # 0x556b
xorl %eax, %eax
callq 0x2030
movl 0x20(%rbx), %eax
cmpq $0x2, %rax
ja 0x3b6b
leaq 0x547(%rip), %rcx       # 0x40a4
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
xorl %eax, %eax
callq 0x2030
addq $0x24, %rbx
leaq 0x1a12(%rip), %rdi      # 0x5588
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/main.c
// Function: displayHelp
void displayHelp (optParser *parser)
{
    optOption **option;

    printf("Usage: %s [flags] [subreddit] [username] [password] \n\n", parser->argv[0]);
    printf("Below is a list of all the flags reconized by creddit.\n");
    printf(" [String] --> argument takes a string\n");
    printf(" [Int]    --> argument takes an integer value\n");

    printf("\n");
    for (option = parser->options; *option != NULL; option++)
        displayCmd(*option);

    printf("\nYou will be prompted for a password if you don't include one\n");

    printf("\nTo report any bugs, submit patches, etc. Please see the github page at:\n");
    printf("http://www.github.com/Cotix/cReddit\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq (%rax), %rsi
leaq 0x19fc(%rip), %rdi      # 0x558f
xorl %eax, %eax
callq 0x2030
leaq 0x1a37(%rip), %rdi      # 0x55d8
callq 0x22a0
leaq 0x1a62(%rip), %rdi      # 0x560f
callq 0x22a0
leaq 0x1a7c(%rip), %rdi      # 0x5635
callq 0x22a0
pushq $0xa
popq %rdi
callq 0x2270
movq 0x20(%rbx), %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3bdd
callq 0x3aef
addq $0x8, %rbx
jmp 0x3bca
leaq 0x1a7f(%rip), %rdi      # 0x5663
callq 0x22a0
leaq 0x1ab1(%rip), %rdi      # 0x56a1
callq 0x22a0
leaq 0x1aee(%rip), %rdi      # 0x56ea
popq %rbx
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/opt.c
// Function: optAddOptions
void optAddOptions (optParser *parser, optOption *options, int optionCount)
{
    const int blockSize = 100;
    int opt = parser->optCount, i;
    parser->optCount += optionCount;

    /* Make sure to leave one empty arg */
    if (parser->optCount + 1 >= parser->optAllocCount) {
        do {
            parser->optAllocCount += blockSize;
            parser->options = realloc(parser->options, parser->optAllocCount * sizeof(optOption*));
            memset(parser->options, 0, blockSize * sizeof(optOption*));
        } while (parser->optCount + 1 >= parser->optAllocCount);
    }

    for (i = 0; i < optionCount; i++)
        parser->options[opt + i] = options + i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x18(%rdi), %r13
leal (%r13,%r15), %eax
movl %eax, 0x18(%rdi)
leal (%r15,%r13), %ecx
incl %ecx
movl 0x1c(%rdi), %eax
cmpl %eax, %ecx
jl 0x3e38
movq 0x20(%r14), %r12
leal 0x64(%rax), %ecx
movl %ecx, 0x1c(%r14)
cltq
leaq 0x320(,%rax,8), %rsi
movq %r12, %rdi
callq 0x2320
movq %rax, %r12
movq %rax, 0x20(%r14)
movl $0x320, %edx            # imm = 0x320
movq %rax, %rdi
xorl %esi, %esi
callq 0x2110
movl 0x18(%r14), %ecx
movl 0x1c(%r14), %eax
incl %ecx
cmpl %eax, %ecx
jge 0x3dfb
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %r15d, %eax
subq $0x1, %rax
jb 0x3e5b
movq 0x20(%r14), %rcx
movq %rbx, (%rcx,%r13,8)
incq %r13
addq $0x1f0, %rbx            # imm = 0x1F0
jmp 0x3e41
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/opt.c
// Function: optRunParser
optResponse optRunParser (optParser *parser)
{
    optResponse res = OPT_CONTINUE;

    if (parser->options == NULL)
        return OPT_SUCCESS;

    parser->curopt++;

    while ((parser->curopt != parser->argc) && res == OPT_CONTINUE) {
        if ((parser->argv)[parser->curopt][0] == '-') {
            if (parser->argv[parser->curopt][1] == '-')
                res = optParseLong(parser);
            else
                res = optParseChars(parser);

            parser->curopt++;
        } else {
            res = OPT_UNUSED;
        }
    }
    if (parser->curopt == parser->argc && res == OPT_CONTINUE)
        res = OPT_SUCCESS;

    return res;
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x3f90
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x10(%rdi), %edx
incl %edx
movl %edx, 0x10(%rdi)
pushq $0x3
popq %rcx
pushq $0x2
popq %rbp
movq %rsp, %r14
pushq $0x1
popq %r12
pushq $0x3
popq %r13
movl (%rbx), %eax
movslq %edx, %rdi
cmpl $0x3, %ecx
jne 0x3f73
cmpl %eax, %edi
je 0x3f73
movq 0x8(%rbx), %rcx
movq (%rcx,%rdi,8), %rsi
cmpb $0x2d, (%rsi)
movl %ebp, %ecx
jne 0x3ea8
cmpb $0x2d, 0x1(%rsi)
jne 0x3f0e
movq 0x20(%rbx), %r13
addq $0x2, %rsi
movq %r14, %rdi
callq 0x21e0
movq (%r13), %r15
testq %r15, %r15
je 0x3f5f
movq %r15, %rdi
movq %r14, %rsi
callq 0x2280
addq $0x8, %r13
testl %eax, %eax
jne 0x3ede
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3f93
pushq $0x3
popq %r13
movl %r13d, %ecx
jmp 0x3f66
movq %rsi, %rdi
callq 0x20d0
movq %rax, %r15
movl %r12d, %ecx
movl %ecx, 0x14(%rbx)
cmpl %r15d, %ecx
jge 0x3f09
movq 0x8(%rbx), %rdx
movq 0x20(%rbx), %rax
movslq 0x10(%rbx), %rsi
movq (%rdx,%rsi,8), %rdx
movslq %ecx, %rcx
movb (%rdx,%rcx), %cl
movq (%rax), %rsi
testq %rsi, %rsi
je 0x3f5a
addq $0x8, %rax
cmpb %cl, 0x1f(%rsi)
jne 0x3f3a
movq %rbx, %rdi
callq 0x3f93
movl 0x14(%rbx), %ecx
incl %ecx
jmp 0x3f1c
movl %r12d, %ecx
jmp 0x3f66
movl %r12d, %ecx
pushq $0x3
popq %r13
movl 0x10(%rbx), %edx
incl %edx
movl %edx, 0x10(%rbx)
jmp 0x3ea3
movl %ecx, %esi
xorl $0x3, %esi
xorl %eax, %edx
xorl %eax, %eax
orl %esi, %edx
cmovnel %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/src/opt.c
// Function: optProcessOption
static optResponse optProcessOption (optParser *parser, optOption *option)
{
    option->isSet = 1;
    switch (option->arg) {
    case OPT_INT:
        return optReadInt(parser, option);

    case OPT_STRING:
        return optReadString(parser, option);

    default:
        break;
    }
    return OPT_CONTINUE;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
orb $0x1, 0x1b5(%rsi)
movl 0x20(%rsi), %eax
cmpl $0x2, %eax
je 0x3fcc
cmpl $0x1, %eax
jne 0x3fca
movslq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x10(%rdi)
movq 0x8(%rdi), %rcx
movq 0x8(%rcx,%rax,8), %rdi
callq 0x22d0
movl %eax, 0x1b8(%rbx)
popq %rbx
retq
movslq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x10(%rdi)
addq $0x1bc, %rbx            # imm = 0x1BC
movq 0x8(%rdi), %rcx
movq 0x8(%rcx,%rax,8), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]rbtree/example/example2.c
// Function: main
int main(int argc, char **argv)
{
	rbtree_t tree = RBTREE_INIT(keycmp);
	int i;
	info_t *info;
	rbnode_t *n;
	
	/* insert */
	for(i = 0; i < 10; i++) {
		info = malloc(sizeof(info_t));
		info->entry.key = itop(i);
		info->value = i;
		rbtree_insert(&tree, &info->entry);
	}
	
	/* lookup */
	n = rbtree_lookup(&tree, itop(5));
	if (n)
		printf("Find %d.\n", rbtree_container_of(n, info_t, entry)->value);
	else
		printf("5 not exist.\n");
	
	/* delete */
	rbtree_remove(&tree, n);
	
	/* print */
	printf("parent node color   dir value\n");
	rbtree_foreach_inorder(&tree, print_node, NULL);
	
	free_rbtree(&tree);
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movups 0x2548(%rip), %xmm0     # 0x3dd8
movq %rsp, %rbx
movaps %xmm0, (%rbx)
xorl %r15d, %r15d
pushq $0x30
popq %r14
cmpq $0xa, %r15
je 0x18c3
movq %r14, %rdi
callq 0x1070
leaq 0x8(%rax), %rsi
movq %r15, 0x8(%rax)
movl %r15d, (%rax)
movq %rbx, %rdi
callq 0x117c
incq %r15
jmp 0x189d
movq %rsp, %rdi
pushq $0x5
popq %rsi
callq 0x12df
movq %rax, %rbx
testq %rax, %rax
je 0x18e9
movl -0x8(%rbx), %esi
leaq 0x724(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x18f5
leaq 0x762(%rip), %rdi       # 0x2052
callq 0x1050
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x131c
leaq 0x755(%rip), %rdi       # 0x205f
callq 0x1050
leaq 0x2d(%rip), %rsi        # 0x1943
movq %r14, %rdi
xorl %edx, %edx
callq 0x160b
leaq 0x9b(%rip), %rsi        # 0x19c2
movq %r14, %rdi
xorl %edx, %edx
callq 0x1669
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/GangZhuo[P]rbtree/example/example2.c
// Function: print_node
static int print_node(rbtree_t *tree, rbnode_t *n, void *state)
{
	info_t *info = rbtree_container_of(n, info_t, entry);
	if (rbnode_is_root(n)) {
		printf("       %4d %5s       %5d\n",
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black",
			info->value);
	}
	else {
		printf("%6d %4d %5s %5s %5d\n",
			ptoi(n->parent->key),
			ptoi(n->key),
			rbnode_is_red(n) ? "red" : "black",
			rbnode_is_right(n) ? "right" : "left",
			info->value);
	}
	return 0;
}

// Assembly:
pushq %rax
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0x1993
movl (%rdi), %eax
movl -0x8(%rsi), %r9d
movl (%rsi), %edx
cmpl $0x1, 0x8(%rsi)
leaq 0x6c8(%rip), %r8        # 0x2028
leaq 0x6c5(%rip), %rcx       # 0x202c
cmoveq %r8, %rcx
cmpq %rsi, 0x18(%rdi)
leaq 0x6d1(%rip), %rsi       # 0x2047
leaq 0x6d0(%rip), %r8        # 0x204d
cmoveq %rsi, %r8
leaq 0x6aa(%rip), %rdi       # 0x2032
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
jmp 0x19be
movl -0x8(%rsi), %ecx
movl (%rsi), %eax
cmpl $0x1, 0x8(%rsi)
leaq 0x685(%rip), %rsi       # 0x2028
leaq 0x682(%rip), %rdx       # 0x202c
cmoveq %rsi, %rdx
leaq 0x659(%rip), %rdi       # 0x200e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/util.c
// Function: do_debugf
void
do_debugf(int level, const char *format, ...)
{
    va_list args;
    va_start(args, format);
    if(debug_level >= level) {
        vfprintf(stderr, format, args);
        fflush(stderr);
    }
    va_end(args);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x2418
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r10, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0xee19(%rip), %rax      # 0x11258
cmpl %edi, (%rax)
jge 0x244c
addq $0xd0, %rsp
popq %rbx
retq
movq 0xeba5(%rip), %rbx      # 0x10ff8
movq (%rbx), %rdi
movq %rsp, %rdx
callq 0x2310
movq (%rbx), %rdi
callq 0x2260
jmp 0x2443
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/shncpd.c
// Function: check_interface
static int
check_interface(struct interface *iif)
{
    int ifindex, rc;
    struct ipv6_mreq mreq;

    ifindex = if_nametoindex(iif->ifname);
    if(ifindex != iif->ifindex) {
        iif->ifindex = ifindex;
        if(iif->ifindex > 0) {
            memset(&mreq, 0, sizeof(mreq));
            memcpy(&mreq.ipv6mr_multiaddr, &protocol_group, 16);
            mreq.ipv6mr_interface = iif->ifindex;
            rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_JOIN_GROUP,
                            (char*)&mreq, sizeof(mreq));
            if(rc < 0) {
                perror("setsockopt(IPV6_JOIN_GROUP)");
                iif->ifindex = 0;
                goto fail;
            }
            schedule_ra(iif, 1, 0);
            return 1;
        }
    }
 fail:
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x2200
xorl %ebx, %ebx
cmpl 0x8(%r14), %eax
je 0x3832
movl %eax, 0x8(%r14)
testl %eax, %eax
jle 0x3832
movups 0xda5e(%rip), %xmm0     # 0x11260
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movl %eax, 0x10(%rcx)
movl 0xda73(%rip), %edi      # 0x11284
pushq $0x29
popq %rsi
pushq $0x14
popq %rdx
movl %edx, %r8d
callq 0x20a0
testl %eax, %eax
js 0x383c
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x6832
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x8bcf(%rip), %rdi      # 0xc412
callq 0x22f0
andl $0x0, 0x8(%r14)
jmp 0x3832
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/shncpd.c
// Function: check_routing
static int
check_routing()
{
    int is_now_a_router = kernel_router();

    if(is_now_a_router != was_a_router) {
        debugf("Change in routing status: %d -> %d\n",
               was_a_router, is_now_a_router);
        was_a_router = is_now_a_router;
        ra_routing_change(is_now_a_router);
        republish(0, 0);
        return 1;
    }

    return 0;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
callq 0xa656
movl 0xd9ff(%rip), %edx      # 0x1125c
cmpl %edx, %eax
jne 0x3863
popq %rbx
retq
movl %eax, %ebx
cmpl $0x2, 0xd9ec(%rip)      # 0x11258
jge 0x3885
movl %ebx, 0xd9e8(%rip)      # 0x1125c
movl %ebx, %edi
callq 0x6d6f
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x3b1d
leaq 0x8ba2(%rip), %rsi      # 0xc42e
pushq $0x2
popq %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x23c0
jmp 0x386e
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/state.c
// Function: flush_neighbour
void
flush_neighbour(struct neighbour *neigh)
{
    int i = neigh - neighs;

    assert(i >= 0 && i < numneighs);

    if(i < numneighs - 1)
        neighs[i] = neighs[numneighs - 1];
    MEM_UNDEFINED(neighs + numneighs - 1, sizeof(struct neighbour));

    numneighs--;
    republish(1, 1);
}

// Assembly:
leaq 0xe1ed(%rip), %rax      # 0x11e90
subq %rax, %rdi
shrq $0x6, %rdi
testl %edi, %edi
js 0x3d04
movl 0xd5f4(%rip), %ecx      # 0x112a8
cmpl %edi, %ecx
jle 0x3d04
decl %ecx
cmpl %edi, %ecx
jbe 0x3cf4
andl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
shlq $0x6, %rdi
movl %ecx, %edx
shlq $0x6, %rdx
movaps (%rdx,%rax), %xmm0
movaps 0x10(%rdx,%rax), %xmm1
movaps 0x20(%rdx,%rax), %xmm2
movaps 0x30(%rdx,%rax), %xmm3
movaps %xmm3, 0x30(%rdi,%rax)
movaps %xmm2, 0x20(%rdi,%rax)
movaps %xmm1, 0x10(%rdi,%rax)
movaps %xmm0, (%rdi,%rax)
movl %ecx, 0xd5ae(%rip)      # 0x112a8
pushq $0x1
popq %rdi
movl %edi, %esi
jmp 0x3b1d
pushq %rax
leaq 0x87ca(%rip), %rdi      # 0xc4d6
leaq 0x87db(%rip), %rsi      # 0xc4ee
leaq 0x87dc(%rip), %rcx      # 0xc4f6
movl $0x80, %edx
callq 0x2150
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/state.c
// Function: find_node
struct node *
find_node(const unsigned char *id, int create)
{
    int p = 0;

    if(numnodes > 0) {
        int m, g = numnodes - 1, c;

        do {
            m = (p + g) / 2;
            c = memcmp(id, nodes[m].id, 4);
            if(c == 0)
                return &nodes[m];
            else if(c < 0)
                g = m - 1;
            else
                p = m + 1;
        } while(p <= g);
    }

    if(!create || numnodes >= MAXNODES)
        return NULL;

    if(p < numnodes)
        memmove(nodes + p + 1, nodes + p,
                (numnodes - p) * sizeof(struct node));
    memset(&nodes[p], 0, sizeof(struct node));
    memcpy(nodes[p].id, id, 4);
    numnodes++;

    return &nodes[p];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %rbx
movl 0xd565(%rip), %eax      # 0x112a4
leaq 0xeb4a(%rip), %r12      # 0x12890
testl %eax, %eax
movq %rax, 0x10(%rsp)
jle 0x3d92
leal -0x1(%rax), %ebp
xorl %r15d, %r15d
leal (%r15,%rbp), %r13d
shrl %r13d
imulq $0x70, %r13, %r14
leaq (%r14,%r12), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
pushq $0x4
popq %rdx
callq 0x21b0
testl %eax, %eax
je 0x3e1e
js 0x3d85
incl %r13d
movl %r13d, %r15d
jmp 0x3d8b
decl %r13d
movl %r13d, %ebp
cmpl %ebp, %r15d
jle 0x3d55
jmp 0x3d95
xorl %r15d, %r15d
cmpl $0x0, 0xc(%rsp)
sete %al
movq 0x10(%rsp), %r13
cmpl $0x64, %r13d
setge %cl
orb %al, %cl
je 0x3db1
xorl %eax, %eax
jmp 0x3e24
movl %r13d, %eax
movl %r15d, %r14d
subl %r15d, %eax
jle 0x3dd7
imulq $0x70, %r14, %rcx
leaq (%r12,%rcx), %rsi
leaq (%rcx,%r12), %rdi
addq $0x70, %rdi
cltq
imulq $0x70, %rax, %rdx
callq 0x22c0
imulq $0x70, %r14, %rcx
leaq (%r12,%rcx), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rcx,%r12)
movaps %xmm0, 0x50(%rcx,%r12)
movaps %xmm0, 0x40(%rcx,%r12)
movaps %xmm0, 0x30(%rcx,%r12)
movaps %xmm0, 0x20(%rcx,%r12)
movaps %xmm0, 0x10(%rcx,%r12)
movaps %xmm0, (%rcx,%r12)
movl (%rbx), %edx
movl %edx, 0x8(%rcx,%r12)
incl %r13d
movl %r13d, 0xd488(%rip)     # 0x112a4
jmp 0x3e24
addq %r14, %r12
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jech[P]shncpd/state.c
// Function: flush_node
void
flush_node(struct node *node)
{
    int i = node - nodes;
    int j;

    assert(i >= 0 && i < numnodes);

    free(node->neighs);
    free(node->data);
    destroy_prefix_list(node->assigned);
    destroy_prefix_list(node->addresses);
    for(j = 0; j < node->numexts; j++)
        destroy_external(node->exts[j]);
    free(node->exts);

    if(i < numnodes - 1)
        memmove(nodes + i, nodes + i + 1,
                (numnodes - i - 1) * sizeof(struct node));
    MEM_UNDEFINED(nodes + numnodes - 1, sizeof(struct node));

    numnodes--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xea4e(%rip), %r15      # 0x12890
movq %rdi, %rax
subq %r15, %rax
pushq $0x70
popq %rcx
cqto
idivq %rcx
movq %rax, %rbx
testl %ebx, %ebx
js 0x3ef4
cmpl %ebx, 0xd443(%rip)      # 0x112a4
jle 0x3ef4
movq %rdi, %r14
movq 0x40(%rdi), %rdi
callq 0x2040
movq 0x10(%r14), %rdi
callq 0x2040
movq 0x50(%r14), %rdi
callq 0x8624
movq 0x58(%r14), %rdi
callq 0x8624
xorl %r12d, %r12d
movslq 0x68(%r14), %rax
movq 0x60(%r14), %rdi
cmpq %rax, %r12
jge 0x3eac
movq (%rdi,%r12,8), %rdi
callq 0x3f13
incq %r12
jmp 0x3e91
callq 0x2040
movl 0xd3ed(%rip), %eax      # 0x112a4
leal -0x1(%rax), %ebp
cmpl %ebx, %ebp
jle 0x3ee5
movl %ebx, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
imulq $0x70, %rcx, %rcx
leaq (%r15,%rcx), %rdi
leaq (%rcx,%r15), %rsi
addq $0x70, %rsi
notl %ebx
addl %ebx, %eax
cltq
imulq $0x70, %rax, %rdx
callq 0x22c0
movl %ebp, 0xd3b9(%rip)      # 0x112a4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8624(%rip), %rdi      # 0xc51f
leaq 0x85ec(%rip), %rsi      # 0xc4ee
leaq 0x862d(%rip), %rcx      # 0xc536
movl $0xb3, %edx
callq 0x2150