// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rcx
ja 0x2b04
movq %rcx, %rax
addq 0x10(%rdx), %rax
addl $0x8, %ecx
movl %ecx, (%rdx)
jmp 0x2b10
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r15
movl (%rdx), %ecx
cmpq $0x28, %rcx
ja 0x2b29
movq %rcx, %rax
addq 0x10(%rdx), %rax
addl $0x8, %ecx
movl %ecx, (%rdx)
jmp 0x2b35
movq 0x8(%rdx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdx)
movq (%rax), %r12
leaq 0x3640(%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 0x3544(%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 0x35de(%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 0x3bb(%rip), %rcx       # 0x2f8d
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 0x2cc1
addq $0x38, %rbx
leaq 0x34f5(%rip), %r13      # 0x6106
movq %r13, %rsi
callq 0x2120
testl %eax, %eax
je 0x2c2e
movq (%rbx), %rdi
addq $0x38, %rbx
testq %rdi, %rdi
jne 0x2c11
jmp 0x2cc1
movq -0x28(%rbx), %rax
testq %rax, %rax
je 0x2cc1
movq (%rax), %rbp
movq %rbp, %rdi
leaq 0x3546(%rip), %rsi      # 0x618e
callq 0x2120
testl %eax, %eax
je 0x2c8c
movq %rbp, %rdi
leaq 0x3536(%rip), %rsi      # 0x6191
callq 0x2120
testl %eax, %eax
je 0x2ca6
movq %rbp, %rdi
leaq 0x3526(%rip), %rsi      # 0x6194
callq 0x2120
testl %eax, %eax
jne 0x2c1d
movq %r14, %rdi
movq %rsp, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x4a54
jmp 0x2c1d
movq 0x8(%r15), %rdi
callq 0x2170
movq %r14, %rdi
callq 0x3bea
movq %rax, 0x8(%r15)
jmp 0x2c1d
movq %r14, %rdi
movq %r15, %rsi
callq 0x24ca
movq %r12, %rdi
movq %rax, %rsi
callq 0x2150
jmp 0x2c1d
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq