// File: /workspace/github_c_makefile_star2_O0/Cotix[P]cReddit/libreddit/comment.c
// Function: readChild
DEF_TOKEN_CALLBACK(readChild)
{
    ARG_MORECHILDREN

    struct MoreChildren child = {0};
    RedditComment *comment, *foundParent;

    TokenIdent ids[] = {
        ADD_TOKEN_IDENT_STRING("parent_id",child.parent),
        ADD_TOKEN_IDENT_INT   ("count",    child.count),
        ADD_TOKEN_IDENT_FUNC  ("children", readMore),
        {0}
    };

    /* Note: Requires 'kind' to be the first key in the ids array */
    if (strcmp(*((char**)idents[0].value), "more") == 0) {
        parseTokens(parser, ids, parent, &child);
        free(child.parent);
    } else {
        comment = redditGetComment(parser, list);

        foundParent = redditCommentFindParent(parent, comment->parentId);
        if (foundParent == NULL)
            free(foundParent);
        else
            redditCommentAddReply(foundParent, comment);
    }
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x20(%rsp)
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x28, %eax
ja 0x3b83
movq 0x20(%rsp), %rcx
movl 0x2c(%rsp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, 0x18(%rsp)
jmp 0x3b9c
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x138(%rsp)
movq 0x140(%rsp), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %eax
movl %eax, 0x14(%rsp)
cmpl $0x28, %eax
ja 0x3bdf
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, (%rsp)
jmp 0x3bf7
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, (%rsp)
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, 0x130(%rsp)
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2100
leaq 0x473f(%rip), %rax      # 0x8360
movq %rax, 0x30(%rsp)
movl $0x2, 0x38(%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movl $0x0, 0x58(%rsp)
movb $0x1, 0x5c(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x47b7(%rip), %rax      # 0x8429
movq %rax, 0x68(%rsp)
movl $0x1, 0x70(%rsp)
movl $0x0, 0x74(%rsp)
leaq 0x120(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
movl $0x0, 0x90(%rsp)
movb $0x0, 0x94(%rsp)
movq $0x0, 0x98(%rsp)
leaq 0x4759(%rip), %rax      # 0x842f
movq %rax, 0xa0(%rsp)
movl $0x3, 0xa8(%rsp)
movl $0x2, 0xac(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movl $0x0, 0xc8(%rsp)
movb $0x0, 0xcc(%rsp)
leaq 0xee(%rip), %rax        # 0x3e20
movq %rax, 0xd0(%rsp)
leaq 0x30(%rsp), %rdi
addq $0xa8, %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x2100
movq 0x148(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq 0x46d6(%rip), %rsi      # 0x843e
callq 0x2160
cmpl $0x0, %eax
jne 0x3da5
movq 0x150(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq 0x130(%rsp), %rdx
leaq 0x120(%rsp), %rcx
movb $0x0, %al
callq 0x69c0
movq 0x120(%rsp), %rdi
callq 0x2040
jmp 0x3e14
movq 0x150(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x2660
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rdi
movq 0x118(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x3f50
movq %rax, 0x110(%rsp)
cmpq $0x0, 0x110(%rsp)
jne 0x3dfd
movq 0x110(%rsp), %rdi
callq 0x2040
jmp 0x3e12
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x2190
jmp 0x3e14
addq $0x158, %rsp            # imm = 0x158
retq
nopl (%rax)