// File: /workspace/github_c_makefile_star2_O1/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 0x7828
testq %rax, %rax
je 0x3b55
movq %rax, %rbx
movq 0x8(%r15), %rdx
leaq 0x6969(%rip), %rcx      # 0xa485
leaq 0x68dd(%rip), %r8       # 0xa400
movq %rax, %rdi
movq %r14, %rsi
callq 0x833e
cmpl $-0x1, %eax
je 0x41bf
cmpl $0xc8, %eax
je 0x3b64
cmpl $0x191, %eax            # imm = 0x191
jne 0x418d
leaq 0x68ba(%rip), %rdi      # 0xa40a
jmp 0x41b8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x87ec
testq %rax, %rax
je 0x419f
movq %rax, %r14
movq %rbx, %rdi
callq 0x7e06
testq %rax, %rax
je 0x41a8
cmpb $0x5b, (%rax)
jne 0x3b75
movq %r14, %rdi
movq %rax, %rsi
callq 0x885e
testq %rax, %rax
je 0x41b1
movq %rbx, %rdi
callq 0x7a3f
movq %r14, 0x60(%rsp)
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0x4175
leaq 0x6c47(%rip), %rbp      # 0xa807
movq %rbx, 0x38(%rsp)
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x3f06
movq $0x0, 0x28(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x40(%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x24(%rsp)
xorl %r12d, %r12d
movq 0x8(%r14), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2450
testl %eax, %eax
je 0x3d5c
movq %rbx, %rdi
leaq 0x6c1a(%rip), %rsi      # 0xa875
callq 0x2450
testl %eax, %eax
je 0x3d68
movq %rbx, %rdi
leaq 0x6c2c(%rip), %rsi      # 0xa89e
callq 0x2450
testl %eax, %eax
je 0x3e55
movq %rbx, %rdi
leaq 0x6c1a(%rip), %rsi      # 0xa8a3
callq 0x2450
testl %eax, %eax
jne 0x3d76
cmpb $0x4, (%r14)
jne 0x3d76
movl %r12d, (%rsp)
movq %r13, %r12
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3ed0
movq 0x8(%r13), %rbx
movq %rbx, %rdi
leaq 0x6bb3(%rip), %rsi      # 0xa875
callq 0x2450
testl %eax, %eax
je 0x3d35
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2450
testl %eax, %eax
je 0x3d40
movq %rbx, %rdi
leaq 0x6bc4(%rip), %rsi      # 0xa8a8
callq 0x2450
testl %eax, %eax
jne 0x3d53
movq 0x10(%r13), %rbp
testq %rbp, %rbp
je 0x3d4c
movq 0x8(%rbp), %rbx
movq %rbx, %rdi
leaq 0x67cc(%rip), %rsi      # 0xa4d0
callq 0x2450
testl %eax, %eax
je 0x3d2b
movq %rbx, %rdi
leaq 0x6ae7(%rip), %rsi      # 0xa7fe
callq 0x2450
testl %eax, %eax
jne 0x3d2f
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
jmp 0x3d2f
movq 0x10(%rbp), %r15
movq 0x18(%rbp), %rbp
jmp 0x3cf1
movq 0x10(%r13), %rax
movq %rax, 0x40(%rsp)
jmp 0x3d53
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x20(%rsp)
jmp 0x3d53
leaq 0x6ab4(%rip), %rbp      # 0xa807
movq 0x18(%r13), %r13
jmp 0x3cab
movq 0x10(%r14), %rax
movl (%rax), %r12d
jmp 0x3ed7
movq 0x10(%r14), %rax
movq %rax, 0x50(%rsp)
jmp 0x3ed7
movq %rbx, %rdi
leaq 0x6b2f(%rip), %rsi      # 0xa8af
callq 0x2450
testl %eax, %eax
je 0x3e5b
movq %rbx, %rdi
leaq 0x6b11(%rip), %rsi      # 0xa8a8
callq 0x2450
testl %eax, %eax
je 0x3e7c
movq %rbx, %rdi
leaq 0x6b13(%rip), %rsi      # 0xa8c1
callq 0x2450
testl %eax, %eax
jne 0x3ed7
movl %r12d, (%rsp)
movq %r13, %r12
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3ed0
movq 0x8(%r13), %rbx
movq %rbx, %rdi
leaq 0x6af1(%rip), %rsi      # 0xa8ce
callq 0x2450
testl %eax, %eax
je 0x3e2a
movq %rbx, %rdi
leaq 0x6aea(%rip), %rsi      # 0xa8da
callq 0x2450
testl %eax, %eax
je 0x3e36
movq %rbx, %rdi
leaq 0x6ae6(%rip), %rsi      # 0xa8e9
callq 0x2450
testl %eax, %eax
je 0x3e42
movq %rbx, %rdi
leaq 0x67b6(%rip), %rsi      # 0xa5cc
callq 0x2450
testl %eax, %eax
jne 0x3e4c
movq 0x10(%r13), %rax
movq %rax, 0x28(%rsp)
jmp 0x3e4c
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x3e4c
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
jmp 0x3e4c
movq 0x10(%r13), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%r13), %r13
jmp 0x3dc6
movq 0x10(%r14), %r13
jmp 0x3ed7
movq 0x10(%r14), %rdi
leaq 0x6a53(%rip), %rsi      # 0xa8b9
callq 0x2450
cmpl $0x1, %eax
movl $0x0, %eax
adcb $0x1, %al
movq %rax, 0x30(%rsp)
jmp 0x3ed7
movl %r12d, (%rsp)
movq %r13, %r12
movq 0x10(%r14), %r13
testq %r13, %r13
je 0x3ed0
movq 0x8(%r13), %rbx
movq %rbx, %rdi
leaq 0x6636(%rip), %rsi      # 0xa4d0
callq 0x2450
testl %eax, %eax
je 0x3ec1
movq %rbx, %rdi
leaq 0x6951(%rip), %rsi      # 0xa7fe
callq 0x2450
testl %eax, %eax
jne 0x3eca
movq 0x10(%r13), %rax
movq %rax, 0x48(%rsp)
jmp 0x3eca
movq 0x10(%r13), %rax
movq %rax, 0x58(%rsp)
movq 0x18(%r13), %r13
jmp 0x3e87
movq %r12, %r13
movl (%rsp), %r12d
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x3c3a
movq %r13, (%rsp)
cmpb $0x2, 0x30(%rsp)
sete %al
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %r14
movq 0x48(%rsp), %rbx
movq 0x58(%rsp), %r13
jmp 0x3f60
xorl %r12d, %r12d
movl $0x0, 0x24(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r14d, %r14d
movq $0x0, (%rsp)
xorl %r15d, %r15d
movq $0x0, 0x40(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x6991(%rip), %rdi      # 0xa8f8
callq 0x24e0
leaq 0x6991(%rip), %rdi      # 0xa904
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x6757
cmpb $0x0, 0x30(%rsp)
je 0x3fcd
leaq 0x696a(%rip), %rdi      # 0xa8fe
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl 0x20(%rsp), %r8d
xorl %eax, %eax
callq 0x6757
leaq 0x766d(%rip), %rdi      # 0xb621
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x6757
leaq 0x6963(%rip), %rdi      # 0xa929
callq 0x24e0
jmp 0x3fdf
leaq 0x764d(%rip), %rdi      # 0xb621
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x6757
movq 0x38(%rsp), %rbx
leaq 0x688a(%rip), %r15      # 0xa875
movl 0xc(%rsp), %r14d
leaq 0x6936(%rip), %rdi      # 0xa92d
movl %r14d, %esi
movl 0x24(%rsp), %edx
movl 0x1c(%rsp), %ecx
xorl %eax, %eax
callq 0x2070
leaq 0x694d(%rip), %rdi      # 0xa95d
cmpq $0x0, 0x28(%rsp)
je 0x4163
leaq 0x693a(%rip), %rdi      # 0xa95d
testl %r14d, %r14d
je 0x4163
movq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rax), %rbp
testq %rbp, %rbp
je 0x40f7
movq $0x0, 0x10(%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 0x40d0
movq %r14, %rdi
leaq 0x682d(%rip), %rsi      # 0xa89e
callq 0x2450
testl %eax, %eax
je 0x40d6
movq %r14, %rdi
leaq 0x6824(%rip), %rsi      # 0xa8a8
callq 0x2450
testl %eax, %eax
jne 0x40e8
movq 0x10(%rbp), %r15
testq %r15, %r15
je 0x40e1
movq 0x8(%r15), %r14
movq %r14, %rdi
leaq 0x642c(%rip), %rsi      # 0xa4d0
callq 0x2450
testl %eax, %eax
je 0x40c6
movq %r14, %rdi
leaq 0x6747(%rip), %rsi      # 0xa7fe
callq 0x2450
testl %eax, %eax
jne 0x40ca
movq 0x10(%r15), %r12
jmp 0x40ca
movq 0x10(%r15), %r13
movq 0x18(%r15), %r15
jmp 0x4091
movq 0x10(%rbp), %rbx
jmp 0x40e8
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
jmp 0x40e8
leaq 0x678d(%rip), %r15      # 0xa875
movq 0x18(%rbp), %rbp
testq %rbp, %rbp
jne 0x4054
jmp 0x4108
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebx, %ebx
movq $0x0, 0x10(%rsp)
leaq 0x6862(%rip), %rdi      # 0xa971
callq 0x24e0
leaq 0x685e(%rip), %rdi      # 0xa979
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6757
leaq 0x6860(%rip), %rdi      # 0xa992
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x6757
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x4031
leaq 0x73fb(%rip), %rdi      # 0xb552
movq 0x38(%rsp), %rbx
leaq 0x66a4(%rip), %rbp      # 0xa807
callq 0x24e0
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
jne 0x3bc0
movq 0x60(%rsp), %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8814
leaq 0x6543(%rip), %rdi      # 0xa6d7
movl %eax, %esi
xorl %eax, %eax
callq 0x22d0
jmp 0x41bf
leaq 0x6498(%rip), %rdi      # 0xa63e
jmp 0x41b8
leaq 0x62ac(%rip), %rdi      # 0xa45b
jmp 0x41b8
leaq 0x66d2(%rip), %rdi      # 0xa88a
xorl %eax, %eax
callq 0x22d0
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7a3f