// File: /workspace/github_c_makefile_star2_O3/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 $0xe8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdx), %ecx
cmpq $0x29, %rcx
jae 0x2b15
movq 0x10(%rdx), %rsi
movq %rcx, %rax
addq $0x8, %rax
movl %eax, (%rdx)
movq (%rsi,%rcx), %r15
cmpl $0x20, %ecx
ja 0x2b24
addq 0x10(%rdx), %rax
addl $0x10, %ecx
movl %ecx, (%rdx)
jmp 0x2b30
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 0x3645(%rip), %rax      # 0x617f
movq %rax, (%rsp)
movq $0x1, 0x8(%rsp)
leaq 0x5c(%r12), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq %rax, 0x25(%rsp)
leaq 0x3549(%rip), %rcx      # 0x60b5
movq %rcx, 0x38(%rsp)
movq $0x2, 0x40(%rsp)
leaq 0x68(%r12), %rcx
movq %rcx, 0x48(%rsp)
movaps %xmm0, 0x50(%rsp)
movl $0x0, 0x60(%rsp)
movb $0x1, 0x64(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x35e3(%rip), %rcx      # 0x6185
movq %rcx, 0x70(%rsp)
movabsq $0x200000003, %rcx      # imm = 0x200000003
movq %rcx, 0x78(%rsp)
movaps %xmm0, 0x80(%rsp)
movups %xmm0, 0x8d(%rsp)
leaq 0x3a2(%rip), %rcx       # 0x2f6f
movq %rcx, 0xa0(%rsp)
movq %rax, 0xd8(%rsp)
movups %xmm0, 0xc8(%rsp)
movups %xmm0, 0xb8(%rsp)
movups %xmm0, 0xa8(%rsp)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2ca6
addq $0x38, %rbx
leaq 0x34fa(%rip), %r13      # 0x6106
leaq 0x357b(%rip), %rbp      # 0x618e
movq %r13, %rsi
callq 0x2120
testl %eax, %eax
jne 0x2c96
movq -0x28(%rbx), %rax
testq %rax, %rax
je 0x2ca6
movq (%rax), %rdi
cmpb $0x74, (%rdi)
jne 0x2c48
cmpb $0x33, 0x1(%rdi)
jne 0x2c3c
cmpb $0x0, 0x2(%rdi)
je 0x2c69
cmpb $0x31, 0x1(%rdi)
jne 0x2c48
cmpb $0x0, 0x2(%rdi)
je 0x2c80
movq %rbp, %rsi
callq 0x2120
testl %eax, %eax
jne 0x2c96
movq %r14, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x495b
jmp 0x2c96
movq 0x8(%r15), %rdi
callq 0x2170
movq %r14, %rdi
callq 0x3afa
movq %rax, 0x8(%r15)
jmp 0x2c96
movq %r14, %rdi
movq %r15, %rsi
callq 0x24cc
movq %r12, %rdi
movq %rax, %rsi
callq 0x2150
movq (%rbx), %rdi
addq $0x38, %rbx
testq %rdi, %rdi
jne 0x2c13
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq