// File: /workspace/github_c_makefile_star2_O3/tomka[P]cliaspora/cliaspora.c
// Function: reshare
static int
reshare(session_t *sp, int id)
{
	int	   status, ret;
	char	   *rq, *guid;
	ssl_conn_t *cp;
	const char tmpl[] = "{\"root_guid\":\"%s\"}";

	errno = 0;
	if ((guid = get_post_guid(sp, id)) == NULL)
		return (-1);
	if ((rq = strduprintf(tmpl, guid)) == NULL)
		return (-1);
	if ((cp = ssl_connect(sp->host, sp->port)) == NULL) {
		free(rq); return (-1);
	}
	status = http_post(cp, "/reshares", sp->cookie, NULL,
	    USER_AGENT, HTTP_POST_TYPE_JSON, rq);
	free(rq);
	if (status == HTTP_UNAUTHORIZED) {
		warnx("You're not logged in. Please create a new session");
		ret = -1;
	} else if (status == HTTP_CREATED)
		ret = 0;
	else if (status == -1)
		ret = -1;
	else {
		warnx("Server replied with code %d", status);
		ret = -1;
	}
	ssl_disconnect(cp);

	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movaps 0x5a0f(%rip), %xmm0     # 0xafc0
movaps %xmm0, 0x10(%rsp)
movl $0x7d2273, 0x1f(%rsp)   # imm = 0x7D2273
callq 0x2060
movq %rax, %r12
movl $0x0, (%rax)
leaq 0x4ff9(%rip), %rdi      # 0xa5cc
movl %ebx, %esi
xorl %eax, %eax
callq 0x9772
movq %rax, 0x9dd5(%rip)      # 0xf3b8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x573a
movq (%r14), %rdi
movzwl 0x10(%r14), %esi
callq 0x7710
testq %rax, %rax
je 0x573a
movq %rax, %r15
movq 0x9da7(%rip), %rsi      # 0xf3b8
movq 0x8(%r14), %rdx
leaq 0x4f45(%rip), %rcx      # 0xa561
leaq 0x4ddd(%rip), %r8       # 0xa400
movq %rax, %rdi
callq 0x81ee
movl %eax, %ebp
movq 0x9d84(%rip), %rdi      # 0xf3b8
callq 0x23c0
cmpl $-0x1, %ebp
je 0x5732
cmpl $0x191, %ebp            # imm = 0x191
je 0x56f2
cmpl $0xc8, %ebp
jne 0x5702
movq %r15, %rdi
callq 0x7ce0
movq %rax, 0x9d47(%rip)      # 0xf3b0
testq %rax, %rax
je 0x5714
cmpb $0x7b, (%rax)
jne 0x565a
callq 0x868c
testq %rax, %rax
je 0x5724
movq %rax, %r12
movq 0x9d21(%rip), %rsi      # 0xf3b0
movq %rax, %rdi
callq 0x86fd
movq %rax, %r13
movq %r15, %rdi
callq 0x7921
testq %r13, %r13
je 0x573a
movq 0x10(%r12), %r13
testq %r13, %r13
je 0x56da
leaq 0x4f8b(%rip), %r15      # 0xa647
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x56d1
movq %r15, %rsi
callq 0x2450
testl %eax, %eax
je 0x574b
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x56bc
movq %r12, %rdi
callq 0x86b0
leaq 0x4f49(%rip), %rdi      # 0xa632
xorl %eax, %eax
callq 0x22d0
jmp 0x573a
leaq 0x4d11(%rip), %rdi      # 0xa40a
xorl %eax, %eax
callq 0x22d0
jmp 0x5732
leaq 0x4fb2(%rip), %rdi      # 0xa6bb
movl %ebp, %esi
xorl %eax, %eax
callq 0x22d0
jmp 0x5732
cmpl $0x0, (%r12)
jne 0x5732
leaq 0x4d39(%rip), %rdi      # 0xa45b
jmp 0x56f9
leaq 0x4ef7(%rip), %rdi      # 0xa622
xorl %eax, %eax
callq 0x2110
movq %r15, %rdi
callq 0x7921
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r13), %rsi
leaq 0x9c6a(%rip), %r15      # 0xf3c0
movl $0x40, %edx
movq %r15, %rdi
callq 0x21a0
movq %r12, %rdi
callq 0x86b0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9772
testq %rax, %rax
je 0x573a
movq %rax, %r12
movq (%r14), %rdi
movzwl 0x10(%r14), %esi
callq 0x7710
testq %rax, %rax
je 0x57f2
movq %rax, %r15
movq 0x8(%r14), %rdx
movq %r12, (%rsp)
leaq 0x4e72(%rip), %rsi      # 0xa618
leaq 0x4c53(%rip), %r8       # 0xa400
xorl %ebx, %ebx
movq %rax, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x8281
movl %eax, %ebp
movq %r12, %rdi
callq 0x23c0
cmpl $-0x1, %ebp
je 0x580f
cmpl $0xc9, %ebp
je 0x5732
cmpl $0x191, %ebp            # imm = 0x191
jne 0x57ff
leaq 0x4c21(%rip), %rdi      # 0xa40a
xorl %eax, %eax
callq 0x22d0
jmp 0x580f
movq %r12, %rdi
callq 0x23c0
jmp 0x573a
leaq 0x4eb5(%rip), %rdi      # 0xa6bb
movl %ebp, %esi
xorl %eax, %eax
callq 0x22d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5732