LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x271d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x2706
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x26a2
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x26ed
movq 0x10(%rbx), %rdi
callq 0x2220
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x273e
pushq %rbx
movq %rdi, %rbx
callq 0x26d8
movq 0x10(%rbx), %rdi
callq 0x2220
movq %rbx, %rdi
popq %rbx
jmp 0x2220
retq
// File: /workspace/github_c_makefile_star2_O1/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
jl 0x2776
leaq 0x64(%rax), %rcx
movl %ecx, 0xc(%r14)
movq 0x10(%r14), %rdi
leaq 0x320(,%rax,8), %rsi
callq 0x2310
movq %rax, 0x10(%r14)
movq 0x10(%r14), %rax
movslq 0x8(%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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, %ebx
movq %rdi, %r14
movslq %esi, %r13
leaq 0x4(,%r13,4), %rdi
callq 0x2250
movq %rax, %r15
leal (%r12,%r12,2), %ebp
movq 0x48(%r14), %rdi
callq 0x21a0
movq %rax, %r12
leaq (,%r13,4), %rdx
movq %r15, %rdi
movl $0x20, %esi
callq 0x2110
movl $0x0, (%r15,%r13,4)
subl %ebp, %r13d
incl %r13d
cmpl $0x0, 0x60(%r14)
movslq %ebp, %rax
leaq (%r15,%rax,4), %rdi
movslq %r13d, %rsi
movq 0x20(%r14), %rcx
jle 0x280d
movl 0x5c(%r14), %r8d
leaq 0x3ba8(%rip), %rdx      # 0x63ac
xorl %eax, %eax
callq 0x2280
jmp 0x281b
leaq 0x3be0(%rip), %rdx      # 0x63f4
xorl %eax, %eax
callq 0x2280
movq %r15, %rdi
callq 0x21a0
cmpl %ebx, %eax
jns 0x2855
movslq %r12d, %rcx
subl %eax, %ebx
cltq
leaq (%r15,%rax,4), %rax
xorl %edx, %edx
cmpq %rcx, %rdx
jge 0x2845
movq 0x48(%r14), %rsi
movl (%rsi,%rdx,4), %esi
cmpl $0xa, %esi
jne 0x284a
movl $0x20, %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rbx
jne 0x2834
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, (%rsi)
jle 0x2920
movl %ecx, %ebx
movq %rdi, 0x8(%rsp)
movl %edx, 0x4(%rsp)
incl %ebx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %rsi, 0x10(%rsp)
movl %ebx, (%rsp)
movl 0x4(%rsp), %r14d
movq 0x8(%rsi), %rax
movq (%rax,%r15,8), %rbp
movl $0x20, %edi
callq 0x2250
movq %rax, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rbp, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x278b
movq %rax, (%r13)
movl %ebx, 0x18(%r13)
movq %rbp, 0x8(%r13)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x273f
cmpl $0x0, (%rbp)
je 0x2908
movq %rbx, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl (%rsp), %ebx
movl %ebx, %ecx
callq 0x2867
movl %eax, 0x14(%r13)
addl %eax, %r12d
jmp 0x290b
movl (%rsp), %ebx
incl %r12d
incq %r15
movq 0x10(%rsp), %rsi
movslq (%rsi), %rax
cmpq %rax, %r15
jl 0x289e
jmp 0x2923
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Cotix[P]cReddit/src/main.c
// Function: getCommentScreenFromCommentList
CommentScreen *getCommentScreenFromCommentList(RedditCommentList *list, int width)
{
    CommentScreen *screen;
    if (list == NULL)
        return NULL;

    screen = commentScreenNew();

    getCommentScreenRecurse(screen, list->baseComment, width, -1);

    return screen;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x299c
movl %esi, %ebp
movq %rdi, %r14
movl $0x30, %edi
callq 0x2250
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq (%r14), %rsi
movq %rax, %rdi
movl %ebp, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x2867
jmp 0x299e
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x29c5
movl 0x8(%rdi), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x29d2
retq
incl %edx
cmpl 0x8(%rdi), %edx
jge 0x29d2
incl %ecx
movl %ecx, 0x1c(%rdi)
retq
movl %eax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a1f
movq (%rdx,%rsi,8), %r10
movl 0x18(%r10), %r10d
cmpl %r8d, %r10d
jl 0x2a1f
incq %rsi
cmpl %r8d, %r10d
jne 0x29f9
addl %esi, %eax
addl %esi, 0x1c(%rdi)
movl %eax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a6d
movq (%rsi), %r8
movl 0x18(%r8), %r8d
cmpl %edx, %r8d
jl 0x2a6d
decl %ecx
addq $-0x8, %rsi
cmpl %edx, %r8d
jne 0x2a3b
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_O1/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 0x2a89
decl %eax
movl %eax, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movslq 0x20(%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %r15
movslq 0x84(%r15), %r12
leaq (,%r12,4), %r14
addq 0x48(%r15), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2070
testq %rax, %rax
je 0x2ad8
subq %r14, %rax
shrq $0x2, %rax
incl %eax
cmpl 0x24(%rbx), %eax
jb 0x2aec
movq %r14, %rdi
callq 0x21a0
movq %rax, %rcx
movslq 0x24(%rbx), %rax
cmpq %rax, %rcx
jbe 0x2af6
addl %eax, %r12d
movl %r12d, 0x84(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2b76
movq %rdi, %rbx
movq 0x48(%r14), %r12
leaq -0x1(%r15), %rsi
leaq (%r12,%r15,4), %rdi
addq $-0x8, %rdi
movl $0xa, %edx
callq 0x258d
testq %rax, %rax
je 0x2b5c
movq %rax, %rcx
leaq (%r12,%r15,4), %rax
addq $-0x4, %rax
subq %rcx, %rax
shrq $0x2, %rax
jmp 0x2b63
movl 0x84(%r14), %eax
movl 0x24(%rbx), %ecx
xorl %edx, %edx
divl %ecx
testl %edx, %edx
cmovel %ecx, %edx
subl %edx, 0x84(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x30a7
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 0x30a7
subl %eax, %ecx
movl %ecx, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x333a
leal 0x64(%r12), %eax
movl %eax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
leaq 0x320(,%r12,8), %rsi
callq 0x2310
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 0x3342
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 0x2310
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 0x30ea(%rip), %rdx      # 0x6478
xorl %r13d, %r13d
movq %r14, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2280
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r14
movq %r14, %rdi
callq 0x21a0
movq %rax, %r15
movq (%rbx), %rax
movq 0x18(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x48(%rax), %rbx
movq %rbx, %rdi
callq 0x21a0
movq (%rsp), %rdi
movq %rdi, %rcx
subq %r15, %rcx
leaq (%r14,%r15,4), %rdx
movl $0x20, %esi
cmpq %rax, %r13
jae 0x33e3
movl (%rbx,%r13,4), %esi
movl %esi, (%rdx,%r13,4)
leaq 0x1(%r13), %rsi
cmpq %rcx, %r13
movq %rsi, %r13
jb 0x33d5
movl $0x0, (%r14,%rdi,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testl %edx, %edx
jle 0x3519
movl %edx, %ecx
leal 0x3(%rdx), %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
shlq $0x4, %rax
movdqa 0x1bd4(%rip), %xmm1     # 0x5010
movdqa 0x1bdc(%rip), %xmm2     # 0x5020
xorl %ecx, %ecx
movdqa 0x1be2(%rip), %xmm3     # 0x5030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x1be2(%rip), %xmm5     # 0x5040
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0x349a
movl $0x2d, (%rbx,%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x34b1
movl $0x2d, 0x4(%rbx,%rcx)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0x34f1
movl $0x2d, 0x8(%rbx,%rcx)
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x3504
movl $0x2d, 0xc(%rbx,%rcx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x345e
movslq %edx, %rax
movl $0x0, (%rbx,%rax,4)
movq 0x5ab6(%rip), %r14      # 0x8fe0
movq (%r14), %rdi
movl $0x200, %esi            # imm = 0x200
xorl %edx, %edx
callq 0x22d0
movq (%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x355e
movq (%r14), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
jmp 0x22a0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x340a
movq 0x5a55(%rip), %r12      # 0x8fe0
movq (%r12), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x22d0
movq (%r15), %rax
movslq 0x10(%r15), %rcx
cmpl %ecx, 0x14(%rax)
jl 0x3676
movq 0x18(%rax), %rax
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0x3676
movslq %r14d, %r14
movq 0x18(%r15), %rcx
movl 0x58(%r15), %r8d
movl 0x64(%r15), %r9d
movq 0x70(%r15), %rax
movq %rax, (%rsp)
leaq 0x2eea(%rip), %rdx      # 0x64c4
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2280
movq (%r12), %rdi
incl %ebp
movl %ebp, %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x360c
movq (%r12), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq (%r12), %rdi
movq 0x48(%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
movq (%r12), %rdi
movl $0xa, %esi
callq 0x22b0
leaq 0x2f39(%rip), %rdx      # 0x656c
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2280
movq (%r12), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
testb $0x1, 0x78(%r15)
movq (%r12), %rdi
jne 0x3683
movq 0x20(%r15), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2340
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
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdi, %r14
subl 0xc(%rdi), %ebx
movl %ebx, %ecx
callq 0x340a
movq 0x591d(%rip), %r15      # 0x8fe0
movq (%r15), %rdi
movl $0x100, %esi            # imm = 0x100
xorl %edx, %edx
callq 0x22d0
cmpl $0x0, 0x30(%r14)
jle 0x3712
incl %ebx
xorl %r12d, %r12d
movq (%r15), %rdi
leal (%rbx,%r12), %esi
xorl %edx, %edx
callq 0x2160
cmpl $-0x1, %eax
je 0x3706
movq (%r15), %rdi
movq 0x38(%r14), %rax
movq (%rax,%r12,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22a0
incq %r12
movslq 0x30(%r14), %rax
cmpq %rax, %r12
jl 0x36de
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3a1d
leal 0x2(%rax), %ecx
cmpl %esi, %ecx
jg 0x3a29
retq
incl %edx
cmpl %esi, %edx
jge 0x3a29
incl %ecx
movl %ecx, 0xc(%rdi)
retq
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3a48
decl %eax
movl %eax, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3ab5
movl 0x7c(%r14), %r15d
leaq (%rax,%r15,4), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2070
movq 0x5543(%rip), %rcx      # 0x8fc8
movl (%rcx), %ebp
testq %rax, %rax
je 0x3a99
subq %rbx, %rax
shrq $0x2, %rax
incl %eax
cmpl %ebp, %eax
jb 0x3aae
movslq %ebp, %r12
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rcx
movl %ebp, %eax
cmpq %r12, %rcx
jbe 0x3ab5
addl %eax, %r15d
movl %r15d, 0x7c(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3b26
movq 0x54e5(%rip), %rax      # 0x8fc8
movl (%rax), %ebp
movq 0x50(%r14), %r15
decl %ebx
leaq (%r15,%rbx,4), %rdi
addq $-0x4, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x258d
testq %rax, %rax
je 0x3b15
movq %rax, %rcx
leaq (%r15,%rbx,4), %rax
subq %rcx, %rax
shrq $0x2, %rax
jmp 0x3b19
movl 0x7c(%r14), %eax
xorl %edx, %edx
divl %ebp
testl %edx, %edx
cmovel %ebp, %edx
subl %edx, 0x7c(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3b59
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 0x3b59
subl %eax, %ecx
movl %ecx, 0xc(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2250
movq %rax, %rbx
movq 0x4f89(%rip), %r14      # 0x8fe0
movq (%r14), %rdi
callq 0x22e0
leaq 0x2533(%rip), %rdx      # 0x6599
xorl %edi, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2370
movq (%r14), %rdi
callq 0x2210
movq (%r14), %rdi
movq %rbx, %rsi
movl $0xc8, %edx
callq 0x2380
movb $0x0, 0xc7(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1031(%rip), %r12      # 0x50e4
leaq 0x51f6(%rip), %r13      # 0x92b0
movq %rbx, %rdi
callq 0x44bf
movl %eax, %ebp
cmpl $0x2, %eax
jne 0x4104
cmpl $0x2, %r15d
ja 0x4101
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 0x21d0
orb $0x1, -0x7(%r14)
incl %r15d
testl %ebp, %ebp
jne 0x40ba
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2495(%rip), %rdi      # 0x65b7
xorl %eax, %eax
callq 0x2030
cmpb $0x0, (%rbx)
je 0x4141
leaq 0x246f(%rip), %rdi      # 0x65a4
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
jmp 0x414f
leaq 0x2465(%rip), %rdi      # 0x65ad
xorl %eax, %eax
callq 0x2030
movsbl 0x1f(%rbx), %esi
testl %esi, %esi
je 0x4167
leaq 0x245d(%rip), %rdi      # 0x65bb
xorl %eax, %eax
callq 0x2030
jmp 0x4175
leaq 0x2449(%rip), %rdi      # 0x65b7
xorl %eax, %eax
callq 0x2030
movl 0x20(%rbx), %eax
cmpq $0x2, %rax
ja 0x4193
leaq 0xf6b(%rip), %rcx       # 0x50f0
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
xorl %eax, %eax
callq 0x2030
addq $0x24, %rbx
leaq 0x2436(%rip), %rdi      # 0x65d4
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O1/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 0x2420(%rip), %rdi      # 0x65db
xorl %eax, %eax
callq 0x2030
leaq 0x245b(%rip), %rdi      # 0x6624
callq 0x2290
leaq 0x2486(%rip), %rdi      # 0x665b
callq 0x2290
leaq 0x24a0(%rip), %rdi      # 0x6681
callq 0x2290
movl $0xa, %edi
callq 0x2260
movq 0x20(%rbx), %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4211
addq $0x8, %rbx
callq 0x4117
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x4200
leaq 0x2497(%rip), %rdi      # 0x66af
callq 0x2290
leaq 0x24c9(%rip), %rdi      # 0x66ed
callq 0x2290
leaq 0x2506(%rip), %rdi      # 0x6736
popq %rbx
jmp 0x2290
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x18(%rdi), %r12
leal (%r12,%r15), %eax
movl %eax, 0x18(%rdi)
leal (%r12,%r15), %eax
incl %eax
cmpl 0x1c(%rdi), %eax
jl 0x448b
movslq 0x1c(%r14), %rax
leaq 0x64(%rax), %rcx
movl %ecx, 0x1c(%r14)
movq 0x20(%r14), %rdi
leaq 0x320(,%rax,8), %rsi
callq 0x2310
movq %rax, 0x20(%r14)
movl $0x320, %edx            # imm = 0x320
movq %rax, %rdi
xorl %esi, %esi
callq 0x2110
movl 0x18(%r14), %eax
incl %eax
cmpl 0x1c(%r14), %eax
jge 0x444f
testl %r15d, %r15d
jle 0x44aa
movl %r15d, %eax
movq 0x20(%r14), %rcx
movq %rbx, (%rcx,%r12,8)
incq %r12
addq $0x1f0, %rbx            # imm = 0x1F0
decq %rax
jne 0x4493
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x44f0
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl (%rdi), %edx
movl 0x10(%rdi), %ecx
incl %ecx
movl %ecx, 0x10(%rdi)
cmpl %edx, %ecx
jne 0x44f3
movb $0x1, %sil
movl $0x3, %ebp
jmp 0x4605
xorl %eax, %eax
retq
movq %rsp, %r14
movq 0x8(%rbx), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movl $0x2, %ebp
cmpb $0x2d, (%rdi)
jne 0x45ef
cmpb $0x2d, 0x1(%rdi)
jne 0x4564
movq 0x20(%rbx), %r12
movq (%rax,%rcx,8), %rsi
addq $0x2, %rsi
movq %r14, %rdi
callq 0x21d0
movq (%r12), %r15
movl $0x1, %ebp
testq %r15, %r15
je 0x45ec
addq $0x8, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2270
testl %eax, %eax
je 0x45dc
movq (%r12), %r15
addq $0x8, %r12
testq %r15, %r15
jne 0x453f
jmp 0x45ec
callq 0x20d0
movq %rax, %r15
movl $0x1, 0x14(%rbx)
cmpl $0x2, %r15d
jl 0x45e7
movl $0x1, %ecx
movq 0x20(%rbx), %rax
movq (%rax), %rsi
testq %rsi, %rsi
je 0x45b1
movq 0x8(%rbx), %rdx
movslq 0x10(%rbx), %rdi
movq (%rdx,%rdi,8), %rdx
movslq %ecx, %rcx
movb (%rdx,%rcx), %cl
addq $0x8, %rax
cmpb %cl, 0x1f(%rsi)
je 0x45ba
movq (%rax), %rsi
addq $0x8, %rax
testq %rsi, %rsi
jne 0x45a0
xorl %eax, %eax
movl $0x1, %ebp
jmp 0x45c9
movq %rbx, %rdi
callq 0x461f
movl $0x3, %ebp
movb $0x1, %al
testb %al, %al
je 0x45ec
movl 0x14(%rbx), %ecx
incl %ecx
movl %ecx, 0x14(%rbx)
cmpl %r15d, %ecx
jl 0x457e
jmp 0x45e7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x461f
movl $0x3, %ebp
incl 0x10(%rbx)
movl (%rbx), %edx
movl 0x10(%rbx), %ecx
cmpl $0x3, %ebp
sete %sil
jne 0x4605
cmpl %edx, %ecx
jne 0x44f6
xorl %eax, %eax
cmpl %edx, %ecx
cmovnel %ebp, %eax
testb %sil, %sil
cmovel %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4658
cmpl $0x1, %eax
jne 0x4656
movslq 0x10(%rdi), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x10(%rdi)
movq 0x8(%rdi), %rcx
movq 0x8(%rcx,%rax,8), %rdi
callq 0x22c0
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 0x21d0
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x18, %rsp
movups 0x24ee(%rip), %xmm0     # 0x3dd8
movq %rsp, %rbx
movaps %xmm0, (%rbx)
xorl %r14d, %r14d
movl $0x30, %edi
callq 0x1070
leaq 0x8(%rax), %rsi
movq %r14, 0x8(%rax)
movl %r14d, (%rax)
movq %rbx, %rdi
callq 0x117c
incq %r14
cmpq $0xa, %r14
jne 0x18f3
movq %rsp, %rdi
movl $0x5, %esi
callq 0x12ec
movq %rax, %rbx
testq %rax, %rax
je 0x1941
movl -0x8(%rbx), %esi
leaq 0x6cc(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
jmp 0x194d
leaq 0x70a(%rip), %rdi       # 0x2052
callq 0x1050
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1326
leaq 0x6fd(%rip), %rdi       # 0x205f
callq 0x1050
leaq 0x2b(%rip), %rsi        # 0x1999
movq %r14, %rdi
xorl %edx, %edx
callq 0x1644
leaq 0x99(%rip), %rsi        # 0x1a18
movq %r14, %rdi
xorl %edx, %edx
callq 0x16b4
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x19e9
movl (%rdi), %eax
movl -0x8(%rsi), %r9d
movl (%rsi), %edx
cmpl $0x1, 0x8(%rsi)
leaq 0x672(%rip), %r8        # 0x2028
leaq 0x66f(%rip), %rcx       # 0x202c
cmoveq %r8, %rcx
cmpq %rsi, 0x18(%rdi)
leaq 0x67b(%rip), %rsi       # 0x2047
leaq 0x67a(%rip), %r8        # 0x204d
cmoveq %rsi, %r8
leaq 0x654(%rip), %rdi       # 0x2032
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
jmp 0x1a14
movl -0x8(%rsi), %ecx
movl (%rsi), %eax
cmpl $0x1, 0x8(%rsi)
leaq 0x62f(%rip), %rsi       # 0x2028
leaq 0x62c(%rip), %rdx       # 0x202c
cmoveq %rsi, %rdx
leaq 0x603(%rip), %rdi       # 0x200e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x31f6
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 0x1003b(%rip), %rax     # 0x13258
cmpl %edi, (%rax)
jge 0x322a
addq $0xd0, %rsp
popq %rbx
retq
movq 0xfdc7(%rip), %rbx      # 0x12ff8
movq (%rbx), %rdi
movq %rsp, %rdx
callq 0x2300
movq (%rbx), %rdi
callq 0x2250
jmp 0x3221
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x21f0
xorl %ebx, %ebx
cmpl 0x8(%r14), %eax
je 0x46a0
movl %eax, 0x8(%r14)
testl %eax, %eax
jle 0x46a0
movups 0xebfc(%rip), %xmm0     # 0x13260
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movl %eax, 0x10(%rcx)
movl 0xec11(%rip), %edi      # 0x13284
movl $0x29, %esi
movl $0x14, %edx
movl $0x14, %r8d
callq 0x20a0
testl %eax, %eax
js 0x46aa
movl $0x1, %ebx
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x781f
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x8d61(%rip), %rdi      # 0xd412
callq 0x22e0
movl $0x0, 0x8(%r14)
jmp 0x46a0
// File: /workspace/github_c_makefile_star2_O1/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 0xb943
movl 0xeb8e(%rip), %edx      # 0x1325c
cmpl %edx, %eax
jne 0x46d4
popq %rbx
retq
movl %eax, %ebx
cmpl $0x2, 0xeb7b(%rip)      # 0x13258
jge 0x46f6
movl %ebx, 0xeb77(%rip)      # 0x1325c
movl %ebx, %edi
callq 0x7e10
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x492a
leaq 0x8d31(%rip), %rsi      # 0xd42e
movl $0x2, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x319e
jmp 0x46df
// File: /workspace/github_c_makefile_star2_O1/jech[P]shncpd/state.c
// Function: find_neighbour
struct neighbour *
find_neighbour(struct interface *interface, const unsigned char *id,
               unsigned int eid, const struct sockaddr_in6 *create)
{
    int i;

    if(id_eq(id, myid)) {
        fprintf(stderr, "Attempting to find myself.\n");
        return NULL;
    }

    for(i = 0; i < numneighs; i++) {
        if(neighs[i].interface == interface &&
           id_eq(neighs[i].id, id) && neighs[i].eid == eid) {
            if(create &&
               memcmp(&neighs[i].addr,
                      &create->sin6_addr, sizeof(create->sin6_addr)) != 0 &&
               neighs[i].port == ntohs(create->sin6_port)) {
                debugf("Neighbour changed address.\n");
                memcpy(&neighs[i].addr, create, sizeof(*create));
                neighs[i].port = ntohs(create->sin6_port);
            }
            return &neighs[i];
        }
    }

    if(!create || numneighs >= MAXNEIGHS)
        return NULL;

    memset(&neighs[i], 0, sizeof(struct neighbour));
    neighs[i].interface = interface;
    memcpy(neighs[i].id, id, 4);
    neighs[i].eid = eid;
    memcpy(&neighs[i].addr, &create->sin6_addr, sizeof(create->sin6_addr));
    neighs[i].port = ntohs(create->sin6_port);
    neighs[i].last_contact = now;

    numneighs++;

    republish(1, 1);
    return &neighs[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl (%rsi), %eax
leaq 0xeaa9(%rip), %rcx      # 0x13280
cmpl (%rcx), %eax
je 0x4919
movslq 0xeac2(%rip), %rax      # 0x132a8
testq %rax, %rax
jle 0x481c
leaq 0xf6b2(%rip), %r15      # 0x13ea4
movq %rax, %rcx
cmpq %rdi, -0x14(%r15)
jne 0x480e
movl -0xc(%r15), %r8d
cmpl (%rsi), %r8d
jne 0x480e
cmpl %edx, -0x8(%r15)
je 0x48b9
addq $0x40, %r15
decq %rcx
jne 0x47f5
movq %rax, %rcx
jmp 0x481e
xorl %ecx, %ecx
testq %rbx, %rbx
sete %r8b
cmpl $0x28, %eax
setge %r9b
orb %r8b, %r9b
je 0x4836
xorl %r14d, %r14d
jmp 0x48b0
shlq $0x6, %rcx
leaq 0xf64f(%rip), %r8       # 0x13e90
leaq (%r8,%rcx), %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx,%r8)
movaps %xmm0, 0x30(%rcx,%r8)
movaps %xmm0, 0x20(%rcx,%r8)
movaps %xmm0, 0x10(%rcx,%r8)
movq %rdi, (%rcx,%r8)
movl (%rsi), %esi
movl %esi, 0x8(%rcx,%r8)
movl %edx, 0xc(%rcx,%r8)
movups 0x8(%rbx), %xmm0
movups %xmm0, 0x14(%rcx,%r8)
movzwl 0x2(%rbx), %edx
rolw $0x8, %dx
movw %dx, 0x10(%rcx,%r8)
leaq 0xe9e2(%rip), %rdx      # 0x13270
movdqu (%rdx), %xmm0
movdqu %xmm0, 0x28(%rcx,%r8)
incl %eax
movl %eax, 0xea07(%rip)      # 0x132a8
movl $0x1, %edi
movl $0x1, %esi
callq 0x492a
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq -0x14(%r15), %r14
testq %rbx, %rbx
je 0x48b0
movdqu (%r15), %xmm0
movdqu 0x8(%rbx), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x48b0
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
cmpw %ax, -0x4(%r15)
jne 0x48b0
leaq 0xe967(%rip), %rax      # 0x13258
cmpl $0x2, (%rax)
jge 0x4923
movdqu (%rbx), %xmm0
movdqu 0xc(%rbx), %xmm1
movdqu %xmm1, 0xc(%r15)
movdqu %xmm0, (%r15)
movzwl 0x2(%rbx), %eax
rolw $0x8, %ax
movw %ax, -0x4(%r15)
jmp 0x48b0
callq 0x25c9
jmp 0x4831
callq 0x25b8
jmp 0x48f6