// File: /workspace/github_c_makefile_star2_O0/tomka[P]cliaspora/cliaspora.c
// Function: show_post
static void
show_post(json_node_t *pnode)
{
	post_t	    postb;
	json_node_t *jp, *jp2, *jp3, *comments;

	(void)memset(&postb, 0, sizeof(postb));
	comments = NULL;
	for (jp = pnode; jp != NULL; jp = jp->next) {
		if (strcmp(jp->var, "id") == 0)
			postb.id = *(int *)jp->val;
		else if (strcmp(jp->var, "created_at") == 0)
			postb.date = (char *)jp->val;
		else if (strcmp(jp->var, "text") == 0)
			postb.text = (char *)jp->val;
		else if (strcmp(jp->var, "root") == 0 &&
		    jp->type == JSON_TYPE_OBJECT) {
			for (jp2 = jp->val; jp2 != NULL; jp2 = jp2->next) {
				if (strcmp(jp2->var, "created_at") == 0)
					postb.root_date = (char *)jp2->val;
				else if (strcmp(jp2->var, "id") == 0)
					postb.root_id = *(int *)jp2->val;
				else if (strcmp(jp2->var, "author") == 0) {
					for (jp3 = jp2->val; jp3 != NULL;
					    jp3 = jp3->next) {
						if (strcmp(jp3->var, "name")
						    == 0) {
							postb.root_author =
							    (char *)jp3->val;
						} else if (strcmp(jp3->var,
						    "diaspora_id") == 0) {
							postb.root_handle =
							    (char *)jp3->val;
						}
					}
				}
			}
		} else if (strcmp(jp->var, "post_type") == 0) {
			if (strcmp((char *)jp->val, "Reshare") == 0)
				postb.type = POST_TYPE_RESHARE;
			else
				postb.type = POST_TYPE_STATUS;
		} else if (strcmp(jp->var, "author") == 0) {
			for (jp2 = jp->val; jp2 != NULL; jp2 = jp2->next) {
				if (strcmp(jp2->var, "name") == 0)
					postb.author = (char *)jp2->val;
				else if (strcmp(jp2->var, "diaspora_id") == 0)
					postb.handle = (char *)jp2->val;
			}
		} else if (strcmp(jp->var, "interactions") == 0) {
			for (jp2 = jp->val; jp2 != NULL; jp2 = jp2->next) {
				if (strcmp(jp2->var, "likes_count") == 0)
					postb.likes = *(int *)jp2->val;
				else if (strcmp(jp2->var, "reshares_count")
				    == 0)
					postb.reshares = *(int *)jp2->val;
				else if (strcmp(jp2->var, "comments_count")
				    == 0)
					postb.comments = *(int *)jp2->val;
				else if (strcmp(jp2->var, "comments") == 0)
					comments = jp2->val;
			}
		}
	}	
	(void)puts(".PGNH");
	groff_printf("\\fB%s <%s> on %s POST-ID: %d\\fP\n.br\n",
	    postb.author, postb.handle, postb.date, postb.id);

	if (postb.type == POST_TYPE_RESHARE) {
		groff_printf(".in 2\n\\fB%s <%s> on %s POST-ID: %d" \
		    "\\fP\n.br\n", postb.root_author, postb.root_handle,
		    postb.root_date, postb.root_id);
	}
	groff_printf("%s\n", postb.text);
	if (postb.type == POST_TYPE_RESHARE)
		(void)puts(".in");
	(void)printf(".rj 1\n\\fBCOMMENTS: %d LIKES: %d RESHARES: %d\\fP",
	    postb.comments, postb.likes, postb.reshares);
	if (comments == NULL || postb.comments == 0) {
		(void)puts("\n\n\n");
	} else {
		for (jp = comments; jp != NULL; jp = jp->next)
			show_comment(jp->val);
		(void)puts("\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x21d0
movq $0x0, -0x78(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x82c5
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6e0a(%rip), %rsi      # 0xed43
callq 0x2460
cmpl $0x0, %eax
jne 0x7f55
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x82b2
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6e4d(%rip), %rsi      # 0xedb1
callq 0x2460
cmpl $0x0, %eax
jne 0x7f7f
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x82b0
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6e4c(%rip), %rsi      # 0xedda
callq 0x2460
cmpl $0x0, %eax
jne 0x7fa9
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x82ae
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6e27(%rip), %rsi      # 0xeddf
callq 0x2460
cmpl $0x0, %eax
jne 0x80ea
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4, %eax
jne 0x80ea
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x80e5
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6db5(%rip), %rsi      # 0xedb1
callq 0x2460
cmpl $0x0, %eax
jne 0x8017
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x80d2
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6d1d(%rip), %rsi      # 0xed43
callq 0x2460
cmpl $0x0, %eax
jne 0x8042
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
jmp 0x80d0
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6d93(%rip), %rsi      # 0xede4
callq 0x2460
cmpl $0x0, %eax
jne 0x80ce
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x80cc
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x698f(%rip), %rsi      # 0xea0c
callq 0x2460
cmpl $0x0, %eax
jne 0x8095
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x80bc
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6c96(%rip), %rsi      # 0xed3a
callq 0x2460
cmpl $0x0, %eax
jne 0x80ba
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x80bc
jmp 0x80be
movq -0x70(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x8067
jmp 0x80ce
jmp 0x80d0
jmp 0x80d2
jmp 0x80d4
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x7fe2
jmp 0x82ac
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6cf2(%rip), %rsi      # 0xedeb
callq 0x2460
cmpl $0x0, %eax
jne 0x812b
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x6ce3(%rip), %rsi      # 0xedf5
callq 0x2460
cmpl $0x0, %eax
jne 0x8122
movb $0x2, -0x44(%rbp)
jmp 0x8126
movb $0x1, -0x44(%rbp)
jmp 0x82aa
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6caa(%rip), %rsi      # 0xede4
callq 0x2460
cmpl $0x0, %eax
jne 0x81ba
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x81b5
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x68a6(%rip), %rsi      # 0xea0c
callq 0x2460
cmpl $0x0, %eax
jne 0x817e
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x81a5
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6bad(%rip), %rsi      # 0xed3a
callq 0x2460
cmpl $0x0, %eax
jne 0x81a3
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x81a5
jmp 0x81a7
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x8150
jmp 0x82a8
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6c34(%rip), %rsi      # 0xedfd
callq 0x2460
cmpl $0x0, %eax
jne 0x82a6
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x82a4
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6c0d(%rip), %rsi      # 0xee0a
callq 0x2460
cmpl $0x0, %eax
jne 0x8216
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x8291
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6bf1(%rip), %rsi      # 0xee16
callq 0x2460
cmpl $0x0, %eax
jne 0x823e
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0x828f
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6bd8(%rip), %rsi      # 0xee25
callq 0x2460
cmpl $0x0, %eax
jne 0x8266
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x828d
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x6893(%rip), %rsi      # 0xeb08
callq 0x2460
cmpl $0x0, %eax
jne 0x828b
movq -0x68(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x828d
jmp 0x828f
jmp 0x8291
jmp 0x8293
movq -0x68(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x81e3
jmp 0x82a6
jmp 0x82a8
jmp 0x82aa
jmp 0x82ac
jmp 0x82ae
jmp 0x82b0
jmp 0x82b2
jmp 0x82b4
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x7f1f
leaq 0x6b68(%rip), %rdi      # 0xee34
callq 0x24f0
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl -0x58(%rbp), %r8d
leaq 0x6b58(%rip), %rdi      # 0xee40
movb $0x0, %al
callq 0x83b0
movsbl -0x44(%rbp), %eax
cmpl $0x2, %eax
jne 0x8316
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x48(%rbp), %r8d
leaq 0x6b2b(%rip), %rdi      # 0xee3a
movb $0x0, %al
callq 0x83b0
movq -0x28(%rbp), %rsi
leaq 0x7384(%rip), %rdi      # 0xf6a5
movb $0x0, %al
callq 0x83b0
movsbl -0x44(%rbp), %eax
cmpl $0x2, %eax
jne 0x833d
leaq 0x6b2d(%rip), %rdi      # 0xee65
callq 0x24f0
movl -0x4c(%rbp), %esi
movl -0x54(%rbp), %edx
movl -0x50(%rbp), %ecx
leaq 0x6b1c(%rip), %rdi      # 0xee69
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x78(%rbp)
je 0x8361
cmpl $0x0, -0x4c(%rbp)
jne 0x836f
leaq 0x6b31(%rip), %rdi      # 0xee99
callq 0x24f0
jmp 0x83a5
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x8399
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x86f0
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x8377
leaq 0x7236(%rip), %rdi      # 0xf5d6
callq 0x24f0
addq $0x80, %rsp
popq %rbp
retq
nop