// File: /workspace/github_c_makefile_star2_O2/Cotix[P]cReddit/libreddit/comment.c
// Function: getCommentListHelper
DEF_TOKEN_CALLBACK(getCommentListHelper)
{
    ARG_COMMENT_LISTING
    RedditComment *reply = NULL;

    TokenIdent more_ids[] = {
        ADD_TOKEN_IDENT_INT   ("count",    comment->totalReplyCount),
        ADD_TOKEN_IDENT_STRING("id",       comment->childrenId),
        ADD_TOKEN_IDENT_FUNC  ("children", getCommentRepliesMore),
        {0}
    };

    int i;
    for (i = 0; idents[i].name != NULL; i++) {
        if (strcmp(idents[i].name, "kind") == 0) {
            if (idents[i].value != NULL) {
                if (strcmp(*((char**)idents[i].value), "t3") == 0) {
                    /* This is the reddit_link data -- free the old and
                     * grab the new link data */
                    redditLinkFree(list->post);
                    list->post = redditGetLink(parser);
                } else if (strcmp(*((char**)idents[i].value), "t1") == 0) {
                    /* A reply to 'comment' -- Send the 'data' field along to be parsed
                     * and add the result as a reply to the current comment */
                    reply = redditGetComment(parser, list);
                    redditCommentAddReply(comment, reply);
                } else if (strcmp(*((char**)idents[i].value), "more") == 0) {
                    parseTokens(parser, more_ids, list, comment);
                }
            } else {
                break;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movl (%rdx), %ecx
cmpq $0x29, %rcx
jae 0x2b3c
movq 0x10(%rdx), %rsi
movq %rcx, %rax
addq $0x8, %rax
movl %eax, (%rdx)
movq (%rsi,%rcx), %r15
cmpl $0x20, %ecx
ja 0x2b4b
addq 0x10(%rdx), %rax
addl $0x10, %ecx
movl %ecx, (%rdx)
jmp 0x2b57
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r12
leaq 0x361e(%rip), %rax      # 0x617f
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq $0x1, 0x8(%r13)
leaq 0x5c(%r12), %rax
movq %rax, 0x10(%r13)
andq $0x0, 0x30(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
andq $0x0, 0x25(%r13)
leaq 0x3521(%rip), %rax      # 0x60b5
movq %rax, 0x38(%r13)
movq $0x2, 0x40(%r13)
leaq 0x68(%r12), %rax
movq %rax, 0x48(%r13)
movaps %xmm0, 0x50(%r13)
andl $0x0, 0x60(%r13)
movb $0x1, 0x64(%r13)
andq $0x0, 0x68(%r13)
leaq 0x35c1(%rip), %rax      # 0x6185
movq %rax, 0x70(%r13)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x78(%r13)
movaps %xmm0, 0x80(%r13)
movups %xmm0, 0x8d(%r13)
leaq 0x375(%rip), %rax       # 0x2f62
movq %rax, 0xa0(%r13)
movups %xmm0, 0xc8(%r13)
movups %xmm0, 0xb8(%r13)
andq $0x0, 0xd8(%r13)
movups %xmm0, 0xa8(%r13)
addq $0x10, %rbx
leaq 0x34e7(%rip), %rbp      # 0x6106
leaq 0x3568(%rip), %r14      # 0x618e
movq -0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x2cc4
movq %rbp, %rsi
callq 0x2160
testl %eax, %eax
jne 0x2cbb
movq (%rbx), %rax
testq %rax, %rax
je 0x2cc4
movq (%rax), %rdi
cmpb $0x74, (%rdi)
jne 0x2c67
cmpb $0x33, 0x1(%rdi)
jne 0x2c5b
cmpb $0x0, 0x2(%rdi)
je 0x2c8a
cmpb $0x31, 0x1(%rdi)
jne 0x2c67
cmpb $0x0, 0x2(%rdi)
je 0x2ca3
movq %r14, %rsi
callq 0x2160
testl %eax, %eax
jne 0x2cbb
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x47af
jmp 0x2cbb
movq 0x8(%r15), %rdi
callq 0x21b0
movq 0x8(%rsp), %rdi
callq 0x3a27
movq %rax, 0x8(%r15)
jmp 0x2cbb
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2518
movq %r12, %rdi
movq %rax, %rsi
callq 0x2190
addq $0x38, %rbx
jmp 0x2c26
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq