// File: /workspace/github_c_makefile_star2_O3/tomka[P]cliaspora/cliaspora.c
// Function: read_stream
static int
read_stream(session_t *sp, const char *url)
{
	int	   status;
	char	   *p;
	ssl_conn_t *cp;
	json_node_t *node, *pstp;

	if ((cp = ssl_connect(sp->host, sp->port)) == NULL)
		return (-1);
	status = http_get(cp, url, sp->cookie,
	    "application/json, */*", USER_AGENT);
	if (status == HTTP_UNAUTHORIZED) {
		warnx("You're not logged in. Please create a new session");
		ssl_disconnect(cp); return (-1);
	} else if (status == -1) {
		ssl_disconnect(cp); return (-1);
	} else if (status != HTTP_OK) {
		warnx("Server replied with code %d", status);
		ssl_disconnect(cp); return (-1);
	}
	if ((node = new_json_node()) == NULL) {
		warnx("new_json_node()");
		ssl_disconnect(cp); return (-1);
	}
	while ((p = ssl_readln(cp)) != NULL && *p != '[')
		;
	if (p == NULL) {
		warnx("Unexpected server reply");
		ssl_disconnect(cp); return (-1);
	}
	if (parse_json(node, p) == NULL) {
		warnx("parse_json() failed");
		ssl_disconnect(cp); return (-1);
	}
	ssl_disconnect(cp);
	for (pstp = node->val; pstp != NULL; pstp = pstp->next)
		show_post(pstp->val);
	free_json_node(node);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
movzwl 0x10(%r15), %esi
callq 0x7710
testq %rax, %rax
je 0x3bef
movq %rax, %rbx
movq 0x8(%r15), %rdx
leaq 0x68cf(%rip), %rcx      # 0xa485
leaq 0x6843(%rip), %r8       # 0xa400
movq %rax, %rdi
movq %r14, %rsi
callq 0x81ee
cmpl $-0x1, %eax
je 0x4260
cmpl $0xc8, %eax
je 0x3bfe
cmpl $0x191, %eax            # imm = 0x191
jne 0x422e
leaq 0x6820(%rip), %rdi      # 0xa40a
jmp 0x4259
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x868c
testq %rax, %rax
je 0x4240
movq %rax, %r12
movq %rbx, %rdi
callq 0x7ce0
testq %rax, %rax
je 0x4249
cmpb $0x5b, (%rax)
jne 0x3c0f
movq %r12, %rdi
movq %rax, %rsi
callq 0x86fd
testq %rax, %rax
je 0x4252
movq %rbx, %rdi
callq 0x7921
movq 0x10(%r12), %rbx
testq %rbx, %rbx
je 0x4218
movq %r12, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x3fb0
movq $0x0, 0x30(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x58(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x38(%rsp)
xorl %ebp, %ebp
xorl %eax, %eax
movq $0x0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0x2c(%rsp)
xorl %r13d, %r13d
movq %rax, %r12
movq 0x8(%r14), %rbx
cmpb $0x69, (%rbx)
jne 0x3ce2
cmpb $0x64, 0x1(%rbx)
jne 0x3ce2
cmpb $0x0, 0x2(%rbx)
je 0x3f13
movq %rbx, %rdi
leaq 0x6b6d(%rip), %rsi      # 0xa859
callq 0x2450
testl %eax, %eax
je 0x3de9
movq %rbx, %rdi
leaq 0x6b7f(%rip), %rsi      # 0xa882
callq 0x2450
testl %eax, %eax
je 0x3ee7
movq %rbx, %rdi
leaq 0x6b6d(%rip), %rsi      # 0xa887
callq 0x2450
testl %eax, %eax
jne 0x3df2
cmpb $0x4, (%r14)
jne 0x3df2
movq %rbp, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3edb
movq 0x8(%r13), %rbx
movq %rbx, %rdi
leaq 0x6b03(%rip), %rsi      # 0xa859
callq 0x2450
testl %eax, %eax
je 0x3dcb
cmpb $0x69, (%rbx)
jne 0x3d70
cmpb $0x64, 0x1(%rbx)
jne 0x3d70
cmpb $0x0, 0x2(%rbx)
je 0x3ddd
movq %rbx, %rdi
leaq 0x6b12(%rip), %rsi      # 0xa88c
callq 0x2450
testl %eax, %eax
jne 0x3dd4
movq 0x10(%r13), %rbp
testq %rbp, %rbp
je 0x3dd4
movq 0x8(%rbp), %rbx
movq %rbx, %rdi
leaq 0x671a(%rip), %rsi      # 0xa4b4
callq 0x2450
testl %eax, %eax
je 0x3dc1
movq %rbx, %rdi
leaq 0x6a35(%rip), %rsi      # 0xa7e2
callq 0x2450
testl %eax, %eax
jne 0x3dc5
movq 0x10(%rbp), %rax
movq %rax, 0x18(%rsp)
jmp 0x3dc5
movq 0x10(%rbp), %r15
movq 0x18(%rbp), %rbp
jmp 0x3d87
movq 0x10(%r13), %rax
movq %rax, 0x58(%rsp)
movq 0x18(%r13), %r13
jmp 0x3d3f
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x3dd4
movq 0x10(%r14), %rbp
jmp 0x3f1a
movq %rbx, %rdi
leaq 0x6a97(%rip), %rsi      # 0xa893
callq 0x2450
testl %eax, %eax
je 0x3ef2
movq %rbx, %rdi
leaq 0x6a79(%rip), %rsi      # 0xa88c
callq 0x2450
testl %eax, %eax
je 0x3f2c
movq %rbx, %rdi
leaq 0x6a7b(%rip), %rsi      # 0xa8a5
callq 0x2450
testl %eax, %eax
jne 0x3f1a
movq %rbp, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3edb
leaq 0x6a5d(%rip), %rbp      # 0xa8b2
movq 0x8(%r13), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2450
testl %eax, %eax
je 0x3eac
movq %rbx, %rdi
leaq 0x6a4c(%rip), %rsi      # 0xa8be
callq 0x2450
testl %eax, %eax
je 0x3eb8
movq %rbx, %rdi
leaq 0x6a48(%rip), %rsi      # 0xa8cd
callq 0x2450
testl %eax, %eax
je 0x3ec4
movq %rbx, %rdi
leaq 0x6718(%rip), %rsi      # 0xa5b0
callq 0x2450
testl %eax, %eax
jne 0x3ece
movq 0x10(%r13), %rax
movq %rax, 0x30(%rsp)
jmp 0x3ece
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
jmp 0x3ece
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x28(%rsp)
jmp 0x3ece
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x3e55
movl 0x8(%rsp), %r13d
movq 0x10(%rsp), %rbp
jmp 0x3f1a
movq 0x10(%r14), %rax
movq %rax, 0x38(%rsp)
jmp 0x3f1a
movq 0x10(%r14), %rdi
leaq 0x69a0(%rip), %rsi      # 0xa89d
callq 0x2450
cmpl $0x1, %eax
movl $0x0, %eax
adcb $0x1, %al
movq %rax, 0x60(%rsp)
jmp 0x3f1a
movq 0x10(%r14), %rax
movl (%rax), %r13d
movq %r12, %rax
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x3cc6
jmp 0x3f9b
movq %rbp, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movq 0x10(%r14), %r13
testq %r13, %r13
movq %r12, %rax
je 0x3f8f
movq 0x50(%rsp), %rbp
movq %rax, %r12
movq 0x8(%r13), %rbx
movq %rbx, %rdi
leaq 0x655c(%rip), %rsi      # 0xa4b4
callq 0x2450
testl %eax, %eax
je 0x3f7a
movq %rbx, %rdi
leaq 0x6877(%rip), %rsi      # 0xa7e2
callq 0x2450
testl %eax, %eax
jne 0x3f7e
movq 0x10(%r13), %rax
jmp 0x3f81
movq 0x10(%r13), %rbp
movq %r12, %rax
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x3f47
movq %rbp, 0x50(%rsp)
movl 0x8(%rsp), %r13d
movq 0x10(%rsp), %rbp
jmp 0x3f1d
cmpb $0x2, 0x60(%rsp)
sete %bl
movq %rbp, %r12
movq %rax, %r14
movq 0x50(%rsp), %rbp
jmp 0x4004
xorl %r13d, %r13d
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x24(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r12d, %r12d
movq $0x0, 0x38(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x58(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x68d1(%rip), %rdi      # 0xa8dc
callq 0x24e0
leaq 0x68d1(%rip), %rdi      # 0xa8e8
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x66a0
testb %bl, %bl
je 0x406f
leaq 0x68ad(%rip), %rdi      # 0xa8e2
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movq 0x58(%rsp), %rcx
movl 0x24(%rsp), %r8d
xorl %eax, %eax
callq 0x66a0
leaq 0x75ac(%rip), %rdi      # 0xb601
movq 0x38(%rsp), %rsi
xorl %eax, %eax
callq 0x66a0
leaq 0x68a5(%rip), %rdi      # 0xa90d
callq 0x24e0
jmp 0x4082
leaq 0x758b(%rip), %rdi      # 0xb601
movq 0x38(%rsp), %rsi
xorl %eax, %eax
callq 0x66a0
movq 0x48(%rsp), %rbx
leaq 0x67cb(%rip), %r15      # 0xa859
movq 0x40(%rsp), %r12
movl 0xc(%rsp), %ebp
leaq 0x6873(%rip), %rdi      # 0xa911
movl %ebp, %esi
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
xorl %eax, %eax
callq 0x2070
leaq 0x688b(%rip), %rdi      # 0xa941
cmpq $0x0, 0x30(%rsp)
je 0x4206
leaq 0x6878(%rip), %rdi      # 0xa941
testl %ebp, %ebp
je 0x4206
movq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rax), %rbp
testq %rbp, %rbp
je 0x419c
movq $0x0, 0x18(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x2450
testl %eax, %eax
je 0x4175
movq %r14, %rdi
leaq 0x676c(%rip), %rsi      # 0xa882
callq 0x2450
testl %eax, %eax
je 0x417b
movq %r14, %rdi
leaq 0x6763(%rip), %rsi      # 0xa88c
callq 0x2450
testl %eax, %eax
jne 0x418d
movq 0x10(%rbp), %r15
testq %r15, %r15
je 0x4186
movq 0x8(%r15), %r14
movq %r14, %rdi
leaq 0x636b(%rip), %rsi      # 0xa4b4
callq 0x2450
testl %eax, %eax
je 0x416b
movq %r14, %rdi
leaq 0x6686(%rip), %rsi      # 0xa7e2
callq 0x2450
testl %eax, %eax
jne 0x416f
movq 0x10(%r15), %r12
jmp 0x416f
movq 0x10(%r15), %r13
movq 0x18(%r15), %r15
jmp 0x4136
movq 0x10(%rbp), %rbx
jmp 0x418d
movq 0x10(%rbp), %rax
movq %rax, 0x18(%rsp)
jmp 0x418d
leaq 0x66cc(%rip), %r15      # 0xa859
movq 0x18(%rbp), %rbp
testq %rbp, %rbp
jne 0x40f9
jmp 0x41ad
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq $0x0, 0x18(%rsp)
leaq 0x67a1(%rip), %rdi      # 0xa955
callq 0x24e0
leaq 0x679d(%rip), %rdi      # 0xa95d
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x66a0
leaq 0x679f(%rip), %rdi      # 0xa976
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x66a0
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x40d6
leaq 0x7336(%rip), %rdi      # 0xb532
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %rbx
callq 0x24e0
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x3c54
movq %r12, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x86b0
leaq 0x6486(%rip), %rdi      # 0xa6bb
movl %eax, %esi
xorl %eax, %eax
callq 0x22d0
jmp 0x4260
leaq 0x63db(%rip), %rdi      # 0xa622
jmp 0x4259
leaq 0x620b(%rip), %rdi      # 0xa45b
jmp 0x4259
leaq 0x6615(%rip), %rdi      # 0xa86e
xorl %eax, %eax
callq 0x22d0
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7921