LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_ctrl.c
// Function: genl_ctrl_resolve_grp
int genl_ctrl_resolve_grp(struct nl_sock *sk, const char *family_name,
	const char *grp_name)
{
	struct nl_cache *cache;
	struct genl_family *family;
	int err;

	if ((err = genl_ctrl_alloc_cache(sk, &cache)) < 0)
		return err;

	family = genl_ctrl_search_by_name(cache, family_name);
	if (family == NULL) {
		err = -NLE_OBJ_NOTFOUND;
		goto errout;
	}

	err = genl_ctrl_grp_by_name(family, grp_name);
	genl_family_put(family);
errout:
	nl_cache_free(cache);

	return err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
leaq 0x8(%rsp), %rsi
callq 0x31c0
testl %eax, %eax
js 0x58f4
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x34d0
testq %rax, %rax
je 0x58f8
movq %rax, %r15
movq %rax, %r12
addq $0x68, %r12
pushq $-0xc
popq %rbx
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x58ea
leaq 0x10(%r13), %rdi
movq %r14, %rsi
callq 0x32b0
testl %eax, %eax
jne 0x58cd
movl 0x20(%r13), %ebx
movq %r15, %rdi
callq 0x3110
jmp 0x58fb
movl %eax, %ebx
jmp 0x5905
pushq $-0xc
popq %rbx
movq 0x8(%rsp), %rdi
callq 0x3050
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_mngt.c
// Function: genl_msg_parser
static int genl_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
			   struct nlmsghdr *nlh, struct nl_parser_param *pp)
{
	int i, err;
	struct genlmsghdr *ghdr;
	struct genl_cmd *cmd;

	ghdr = nlmsg_data(nlh);

	if (ops->co_genl == NULL)
		BUG();

	for (i = 0; i < ops->co_genl->o_ncmds; i++) {
		cmd = &ops->co_genl->o_cmds[i];
		if (cmd->c_id == ghdr->cmd)
			goto found;
	}

	err = -NLE_MSGTYPE_NOSUPPORT;
	goto errout;

found:
	if (cmd->c_msg_parser == NULL)
		err = -NLE_OPNOTSUPP;
	else {
		struct nlattr *tb[cmd->c_maxattr + 1];
		struct genl_info info = {
			.who = who,
			.nlh = nlh,
			.genlhdr = ghdr,
			.userhdr = genlmsg_data(ghdr),
			.attrs = tb,
		};

		err = nlmsg_parse(nlh, ops->co_hdrsize, tb, cmd->c_maxattr,
				  cmd->c_attr_policy);
		if (err < 0)
			goto errout;

		err = cmd->c_msg_parser(ops, cmd, &info, pp);
	}
errout:
	return err;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x40(%rdi), %r10
testq %r10, %r10
je 0x5cd4
movq %rdx, %r15
movq %rdi, %r14
movl 0x20(%r10), %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
leaq 0x10(%r15), %rdi
imulq $0x28, %rdx, %rdx
pushq $-0x28
popq %r8
pushq $-0x16
popq %rax
leaq 0x28(%r8), %r13
cmpq %r13, %rdx
je 0x5cc5
movq 0x18(%r10), %rbx
movzbl (%rdi), %r9d
cmpl %r9d, 0x28(%rbx,%r8)
movq %r13, %r8
jne 0x5c27
cmpq $0x0, 0x18(%rbx,%r13)
je 0x5cc2
movq %rcx, -0x30(%rbp)
movq %rsp, -0x38(%rbp)
movl 0x10(%rbx,%r13), %eax
incl %eax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq %rsi, -0x60(%rbp)
movq %r15, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
callq 0x3250
movq %rax, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl 0x8(%r14), %esi
movl 0x10(%rbx,%r13), %ecx
movq 0x20(%rbx,%r13), %r8
movq %r15, %rdi
movq %r12, %rdx
callq 0x3670
testl %eax, %eax
js 0x5cbc
leaq (%rbx,%r13), %rsi
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movq -0x30(%rbp), %rcx
callq *0x18(%rbx,%r13)
movq -0x38(%rbp), %rsp
jmp 0x5cc5
pushq $-0xa
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x531d(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x136c(%rip), %rsi      # 0x7051
leaq 0x1a9b(%rip), %rbx      # 0x7787
pushq $0x67
popq %r14
movq %rbx, %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x1364(%rip), %rdi      # 0x7068
leaq 0x1a88(%rip), %rcx      # 0x7793
movq %rbx, %rsi
movl %r14d, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_genl_init
int unl_genl_init(struct unl *unl, const char *family)
{
	if (unl_init(unl))
		goto error_out;

	unl->hdrlen = NLMSG_ALIGN(sizeof(struct genlmsghdr));
	unl->family_name = strdup(family);
	if (!unl->family_name)
		goto error;

	if (genl_connect(unl->sock))
		goto error;

	if (genl_ctrl_alloc_cache(unl->sock, &unl->cache))
		goto error;

	unl->family = genl_ctrl_search_by_name(unl->cache, family);
	if (!unl->family)
		goto error;

	return 0;

error:
	unl_free(unl);
error_out:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5da9
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x5d86
movl $0x4, 0x20(%rbx)
movq %r14, %rdi
callq 0x3620
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x5d7e
movq (%rbx), %rdi
callq 0x3300
testl %eax, %eax
jne 0x5d7e
movq (%rbx), %rdi
leaq 0x8(%rbx), %rsi
callq 0x31c0
testl %eax, %eax
je 0x5d8d
movq %rbx, %rdi
callq 0x3280
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x34d0
movq %rax, %rcx
movq %rax, 0x10(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x5d88
jmp 0x5d7e
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_free
void unl_free(struct unl *unl)
{
	if (unl->family_name)
		free(unl->family_name);

	if (unl->sock)
		nl_socket_free(unl->sock);

	if (unl->cache)
		nl_cache_free(unl->cache);

	memset(unl, 0, sizeof(*unl));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x3070
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5dea
callq 0x3540
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x5df8
callq 0x3050
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
andq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_rtnl_init
int unl_rtnl_init(struct unl *unl)
{
	if (unl_init(unl))
		goto error_out;

	unl->hdrlen = 0;
	if (nl_connect(unl->sock, NETLINK_ROUTE))
		goto error;

	return 0;

error:
	unl_free(unl);
error_out:
	return -1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x5da9
pushq $-0x1
popq %r14
testl %eax, %eax
jne 0x5e39
andl $0x0, 0x20(%rbx)
movq (%rbx), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x3040
testl %eax, %eax
je 0x5e3c
movq %rbx, %rdi
callq 0x3280
movl %r14d, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_genl_msg
struct nl_msg *unl_genl_msg(struct unl *unl, int cmd, bool dump)
{
	struct nl_msg *msg;
	int flags = 0;

	msg = nlmsg_alloc();
	if (!msg)
		goto out;

	if (dump)
		flags |= NLM_F_DUMP;

	genlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ,
		    genl_family_get_id(unl->family), 0, flags, cmd, 0);

out:
	return msg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
callq 0x3580
movq %rax, %rbx
testq %rax, %rax
je 0x5e9a
xorl %ecx, %ecx
testb %r15b, %r15b
movl $0x300, %r9d            # imm = 0x300
cmovel %ecx, %r9d
movq 0x10(%r14), %rax
testb $0x1, 0x30(%rax)
je 0x5e7f
movzwl 0x34(%rax), %ecx
andl $0x0, 0x8(%rsp)
movzbl %bpl, %eax
movl %eax, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x3520
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_rtnl_msg
struct nl_msg *unl_rtnl_msg(struct unl *unl, int cmd, bool dump)
{
	struct nl_msg *msg;
	int flags = 0;

	msg = nlmsg_alloc();
	if (!msg)
		goto out;

	if (dump)
		flags |= NLM_F_DUMP;

	nlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ, cmd, 0, flags);

out:
	return msg;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
callq 0x3580
movq %rax, %rbx
testq %rax, %rax
je 0x5ede
xorl %eax, %eax
testb %r14b, %r14b
movl $0x300, %r9d            # imm = 0x300
cmovel %eax, %r9d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x3380
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_request
int unl_request(struct unl *unl, struct nl_msg *msg, unl_cb handler, void *arg)
{
	struct nl_cb *cb;
	int err;

	cb = nl_cb_alloc(NL_CB_CUSTOM);
	err = nl_send_auto_complete(unl->sock, msg);
	if (err < 0)
		goto out;

	err = 1;
	nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
	nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
	nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_handler, &err);
	if (handler)
		nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, handler, arg);

	while (err > 0)
		nl_recvmsgs(unl->sock, cb);

out:
	nlmsg_free(msg);
	nl_cb_put(cb);
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x3
popq %rdi
callq 0x30f0
movq %rax, %r14
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x3550
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x5faa
movq %r12, 0x10(%rsp)
leaq 0xc(%rsp), %rbp
movl $0x1, (%rbp)
leaq 0x93(%rip), %rdx        # 0x5fcd
pushq $0x3
popq %r12
movq %r14, %rdi
movl %r12d, %esi
movq %rbp, %rcx
callq 0x35a0
leaq 0x82(%rip), %rcx        # 0x5fd5
pushq $0x1
popq %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %rbp, %r8
callq 0x3640
leaq 0x71(%rip), %rcx        # 0x5fdc
pushq $0x4
popq %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %rbp, %r8
callq 0x3640
testq %r13, %r13
je 0x5fa3
pushq $0x3
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rcx
movq 0x10(%rsp), %r8
callq 0x3640
jmp 0x5fa3
movq (%r15), %rdi
movq %r14, %rsi
callq 0x3180
cmpl $0x0, 0xc(%rsp)
jg 0x5f98
movq %rbx, %rdi
callq 0x35f0
movq %r14, %rdi
callq 0x32e0
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_loop
void unl_loop(struct unl *unl, unl_cb handler, void *arg)
{
	struct nl_cb *cb;

	cb = nl_cb_alloc(NL_CB_CUSTOM);
	unl->loop_done = false;
	nl_cb_set(cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM, no_seq_check, NULL);
	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, handler, arg);

	while (!unl->loop_done)
		nl_recvmsgs(unl->sock, cb);

	nl_cb_put(cb);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x3
popq %rbp
movl %ebp, %edi
callq 0x30f0
movq %rax, %r14
movb $0x0, 0x24(%rbx)
leaq 0x45(%rip), %rcx        # 0x6074
pushq $0x8
popq %rsi
movq %rax, %rdi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x3640
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movq %r12, %rcx
movq %r15, %r8
callq 0x3640
cmpb $0x0, 0x24(%rbx)
jne 0x6064
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3180
jmp 0x6051
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x32e0
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_genl_multicast_id
int unl_genl_multicast_id(struct unl *unl, const char *name)
{
	struct nlattr *tb[CTRL_ATTR_MCAST_GRP_MAX + 1];
	struct nlattr *groups, *group;
	struct nl_msg *msg;
	int ctrlid;
	int ret = -1;
	int rem;

	msg = nlmsg_alloc();
	if (!msg)
		return -1;

	ctrlid = genl_ctrl_resolve(unl->sock, "nlctrl");
	genlmsg_put(msg, 0, 0, ctrlid, 0, 0, CTRL_CMD_GETFAMILY, 0);
	NLA_PUT_STRING(msg, CTRL_ATTR_FAMILY_NAME, unl->family_name);
	unl_request_single(unl, msg, &msg);
	if (!msg)
		return -1;

	groups = unl_find_attr(unl, msg, CTRL_ATTR_MCAST_GROUPS);
	if (!groups)
		goto nla_put_failure;

	nla_for_each_nested(group, groups, rem) {
		const char *gn;

		nla_parse(tb, CTRL_ATTR_MCAST_GRP_MAX, nla_data(group),
			  nla_len(group), NULL);

		if (!tb[CTRL_ATTR_MCAST_GRP_NAME] ||
		    !tb[CTRL_ATTR_MCAST_GRP_ID])
			continue;

		gn = nla_data(tb[CTRL_ATTR_MCAST_GRP_NAME]);
		if (strcmp(gn, name) != 0)
			continue;

		ret = nla_get_u32(tb[CTRL_ATTR_MCAST_GRP_ID]);
		break;
	}

nla_put_failure:
	nlmsg_free(msg);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, %r14
callq 0x3580
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x61b4
movq %rax, %r15
movq (%r14), %rdi
leaq 0x16a7(%rip), %rsi      # 0x7754
callq 0x35c0
andl $0x0, 0x8(%rsp)
movl $0x3, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3520
movq 0x18(%r14), %r12
movq %r12, %rdi
callq 0x31b0
leal 0x1(%rax), %edx
pushq $0x2
popq %rsi
movq %r15, %rdi
movq %r12, %rcx
callq 0x33d0
testl %eax, %eax
js 0x61b9
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3320
movq (%r12), %rsi
testq %rsi, %rsi
je 0x61b4
pushq $0x7
popq %rdx
movq %r14, %rdi
callq 0x61dc
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x61bc
movq %rax, %r14
addq $0x4, %r14
movzwl (%rax), %esi
addl $-0x4, %esi
leaq 0x1c(%rsp), %r15
movl %esi, (%r15)
leaq 0x30(%rsp), %r12
pushq $0x2
popq %r13
movq %r14, %rdi
callq 0x3340
testl %eax, %eax
je 0x61bc
leaq 0x4(%r14), %rdx
movzwl (%r14), %ecx
addl $-0x4, %ecx
movq %r12, %rdi
movl %r13d, %esi
xorl %r8d, %r8d
callq 0x3350
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rbx
testq %rdi, %rdi
setne %al
testq %rbx, %rbx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x61a0
addq $0x4, %rdi
movq 0x28(%rsp), %rsi
callq 0x32b0
testl %eax, %eax
je 0x61d7
movq %r14, %rdi
movq %r15, %rsi
callq 0x34f0
movq %rax, %r14
movl 0x1c(%rsp), %esi
jmp 0x614c
pushq $-0x1
popq %rbp
jmp 0x61c6
pushq $-0x1
popq %rbp
movq 0x20(%rsp), %rdi
callq 0x35f0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rbx), %ebp
jmp 0x61bc
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_genl_subscribe
int unl_genl_subscribe(struct unl *unl, const char *name)
{
	int mcid;

	mcid = unl_genl_multicast_id(unl, name);
	if (mcid < 0)
		return mcid;

	return nl_socket_add_membership(unl->sock, mcid);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3450
testl %eax, %eax
js 0x6219
movq (%rbx), %rdi
movl %eax, %esi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
jmp 0x3480
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_genl_unsubscribe
int unl_genl_unsubscribe(struct unl *unl, const char *name)
{
	int mcid;

	mcid = unl_genl_multicast_id(unl, name);
	if (mcid < 0)
		return mcid;

	return nl_socket_drop_membership(unl->sock, mcid);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3450
testl %eax, %eax
js 0x6237
movq (%rbx), %rdi
movl %eax, %esi
xorl %edx, %edx
xorl %eax, %eax
popq %rbx
jmp 0x3170
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_nl80211_phy_lookup
int unl_nl80211_phy_lookup(const char *name)
{
	char buf[32];
	int fd, pos;

	snprintf(buf, sizeof(buf), "/sys/class/ieee80211/%s/index", name);

	fd = open(buf, O_RDONLY);
	if (fd < 0)
		return -1;
	pos = read(fd, buf, sizeof(buf) - 1);
	if (pos < 0) {
		close(fd);
		return -1;
	}
	buf[pos] = '\0';
	close(fd);
	return atoi(buf);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rcx
leaq 0x15b8(%rip), %rdx      # 0x7801
movq %rsp, %rbx
pushq $0x20
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x31f0
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x34a0
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0x62a2
movl %eax, %ebp
movq %rsp, %rsi
pushq $0x1f
popq %rdx
movl %eax, %edi
callq 0x3290
testl %eax, %eax
js 0x629b
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movb $0x0, (%rsp,%rax)
movl %ebp, %edi
callq 0x3260
movq %rsp, %rdi
callq 0x3530
movl %eax, %ebx
jmp 0x62a2
movl %ebp, %edi
callq 0x3260
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/unl.c
// Function: unl_nl80211_wdev_to_phy
int unl_nl80211_wdev_to_phy(struct unl *unl, int wdev)
{
	struct nl_msg *msg;
	struct nlattr *attr;
	int ret = -1;

	msg = unl_genl_msg(unl, NL80211_CMD_GET_INTERFACE, false);
	if (!msg)
		return -1;

	NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, wdev);
	if (unl_request_single(unl, msg, &msg) < 0)
		return -1;

	attr = unl_find_attr(unl, msg, NL80211_ATTR_WIPHY);
	if (!attr)
		goto out;

	ret = nla_get_u32(attr);
out:
nla_put_failure:
	nlmsg_free(msg);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x5
popq %rsi
xorl %edx, %edx
callq 0x31e0
movq %rax, (%rsp)
testq %rax, %rax
je 0x6312
movq %rax, %r14
leaq 0xc(%rsp), %rcx
movl %ebp, (%rcx)
pushq $0x3
popq %rsi
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x33d0
testl %eax, %eax
js 0x6317
movq %rsp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3320
testl %eax, %eax
js 0x6312
movq (%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x61dc
testq %rax, %rax
je 0x6317
movl 0x4(%rax), %ebx
jmp 0x631a
pushq $-0x1
popq %rbx
jmp 0x6323
pushq $-0x1
popq %rbx
movq (%rsp), %rdi
callq 0x35f0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: create_session
static session_t *
create_session()
{
	session_t *sp;

	errno = 0;
	if (cfg.host == NULL || cfg.host[0] == '\0') {
		warnx("Host not defined. Corrupted config file?");
		return (NULL);
	}
	if (cfg.cookie == NULL || cfg.cookie[0] == '\0') {
		warnx("Cookie not defined. Corrupted config file?");
		return (NULL);
	}
	if ((sp = malloc(sizeof(session_t))) == NULL)
		return (NULL);

	sp->host	 = cfg.host;
	sp->port	 = cfg.port;
	sp->cookie	 = cfg.cookie; 
	sp->attr.name	 = sp->attr.did = NULL;
	sp->attr.aspects = NULL;

	if (get_attributs(sp) == -1) {
		free_session(sp); return (NULL);
	}
	return (sp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x2060
andl $0x0, (%rax)
leaq 0xa552(%rip), %r14      # 0xf410
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x4f21
cmpb $0x0, (%r15)
je 0x4f21
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x4f2a
cmpb $0x0, (%r12)
je 0x4f2a
pushq $0x60
popq %rdi
callq 0x2430
testq %rax, %rax
je 0x4f1d
movq %rax, %rbx
movq %r15, (%rax)
movzwl (%r14), %eax
movw %ax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
andq $0x0, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x5d5b
cmpl $-0x1, %eax
jne 0x4f3a
movq %rbx, %rdi
callq 0x5d3d
xorl %ebx, %ebx
jmp 0x4f3a
leaq 0x58c6(%rip), %rdi      # 0xa7ee
jmp 0x4f31
leaq 0x58e6(%rip), %rdi      # 0xa817
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: show_contacts
static void
show_contacts(contact_t *contacts)
{
	wchar_t	  w[50];
	contact_t *ctp;

	(void)wprintf(L"ID       NAME                     HANDLE\n");
	for (ctp = contacts; ctp != NULL; ctp = ctp->next) {
		(void)wprintf(L"%-8d ", ctp->id);
		(void)mbstowcs(w, ctp->name, 50); w[24] = L'\0';
		(void)wprintf(L"%-24S ", w);
		(void)mbstowcs(w, ctp->handle, 50); w[40] = L'\0';
		(void)wprintf(L"%-40S\n", w);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x5aa3(%rip), %rdi      # 0xb31c
xorl %eax, %eax
callq 0x24d0
leaq 0x5b3d(%rip), %r14      # 0xb3c4
movq %rsp, %r15
pushq $0x32
popq %r12
leaq 0x5b47(%rip), %r13      # 0xb3dc
leaq 0x5b5c(%rip), %rbp      # 0xb3f8
testq %rbx, %rbx
je 0x58f8
movl (%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x24d0
movq 0x8(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2050
andl $0x0, 0x60(%rsp)
movq %r13, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x24d0
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2050
andl $0x0, 0xa0(%rsp)
movq %rbp, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x24d0
movq 0x28(%rbx), %rbx
jmp 0x589c
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: show_msg_index
static void
show_msg_index(session_t *sp)
{
	char	  *name;
	wchar_t   w[50];
	contact_t *ctp;
	msg_idx_t *idx;

	(void)wprintf(L"DATE                 MSG ID  " \
	    "FROM ID FROM            SUBJECT\n");
	for (idx = sp->midx; idx != NULL; idx = idx->next) {
		name = NULL;
		if (sp->contacts != NULL &&
		    (ctp = find_contact_by_id(sp->contacts,
			idx->aid)) != NULL) {
			name = ctp->name;
		} else if (sp->attr.id == idx->aid)
			name = sp->attr.name;
		(void)wprintf(L"%-20s ", idx->date);
		(void)wprintf(L"%-7d %-7d ", idx->mid, idx->aid);
		(void)mbstowcs(w, name != NULL ? name : "?", 50);
		w[15] = L'\0';
		(void)wprintf(L"%-15S ", w);
		(void)mbstowcs(w, idx->subject, 50); w[27] = L'\0';
		(void)wprintf(L"%-27S\n", w);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
leaq 0x5615(%rip), %rdi      # 0xb1a4
xorl %eax, %eax
callq 0x24d0
leaq 0x40(%r14), %rbp
movq %rsp, %r12
pushq $0x32
popq %r13
movq %r14, %rbx
movq 0x18(%rbx), %rbx
testq %rbx, %rbx
je 0x5c61
movq 0x20(%r14), %rax
movl (%rbx), %ecx
testq %rax, %rax
je 0x5bcb
testq %rax, %rax
je 0x5bcb
cmpl %ecx, (%rax)
je 0x5bd9
movq 0x28(%rax), %rax
jmp 0x5bbc
movq %rbp, %rax
cmpl %ecx, 0x28(%r14)
je 0x5bdd
xorl %r15d, %r15d
jmp 0x5be0
addq $0x8, %rax
movq (%rax), %r15
movq 0x10(%rbx), %rsi
leaq 0x56b1(%rip), %rdi      # 0xb29c
xorl %eax, %eax
callq 0x24d0
movl (%rbx), %edx
movl 0x4(%rbx), %esi
leaq 0x56ba(%rip), %rdi      # 0xb2b8
xorl %eax, %eax
callq 0x24d0
testq %r15, %r15
leaq 0x4c31(%rip), %rax      # 0xa840
cmoveq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2050
andl $0x0, 0x3c(%rsp)
leaq 0x56b7(%rip), %rdi      # 0xb2e4
movq %r12, %rsi
xorl %eax, %eax
callq 0x24d0
movq 0x8(%rbx), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x2050
andl $0x0, 0x6c(%rsp)
leaq 0x56ae(%rip), %rdi      # 0xb300
movq %r12, %rsi
xorl %eax, %eax
callq 0x24d0
jmp 0x5ba4
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: get_aspect_id
static int
get_aspect_id(session_t *sp, const char *name)
{
	aspect_t *ap;

	for (ap = sp->attr.aspects; ap != NULL; ap = ap->next) {
		if (strcmp(ap->name, name) == 0)
			return (ap->id);
	}
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x58, %r14
pushq $-0x1
popq %rbx
movq (%r14), %r14
testq %r14, %r14
je 0x5ca6
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x2460
testl %eax, %eax
je 0x5ca3
addq $0x10, %r14
jmp 0x5c85
movl (%r14), %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: new_contact_node
static contact_t *
new_contact_node(contact_t *ctp)
{
	if (ctp == NULL) {
		if ((ctp = malloc(sizeof(contact_t))) == NULL)
			return (NULL);
	} else {
		for (; ctp->next != NULL; ctp = ctp->next)
			;
		if ((ctp->next = malloc(sizeof(contact_t))) == NULL)
			return (NULL);
		ctp = ctp->next;
	}
	ctp->id   = -1;
	ctp->next = NULL;
	ctp->name = ctp->handle = NULL;
	ctp->url  = ctp->avatar = NULL;

	return (ctp);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x5cce
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
jne 0x5cb4
pushq $0x30
popq %rdi
callq 0x2430
movq %rax, 0x28(%rbx)
jmp 0x5cd6
pushq $0x30
popq %rdi
callq 0x2430
testq %rax, %rax
je 0x5cf0
orl $-0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
andq $0x0, 0x28(%rax)
jmp 0x5cf2
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: free_contacts
static void
free_contacts(contact_t *ctp)
{

	contact_t *next;

	for (; ctp != NULL; ctp = next) {
		free(ctp->name); free(ctp->handle); 
		free(ctp->url);  free(ctp->avatar);
		next = ctp->next; free(ctp);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0x5d35
movq 0x8(%rbx), %rdi
callq 0x23d0
movq 0x10(%rbx), %rdi
callq 0x23d0
movq 0x18(%rbx), %rdi
callq 0x23d0
movq 0x20(%rbx), %rdi
callq 0x23d0
movq 0x28(%rbx), %r14
movq %rbx, %rdi
callq 0x23d0
movq %r14, %rbx
jmp 0x5cfb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: free_aspects
static void
free_aspects(aspect_t *aspect)
{
	aspect_t *next;

	while (aspect != NULL) {
		next = aspect->next;
		free(aspect->name); free(aspect);
		aspect = next;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0x6186
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x23d0
movq %rbx, %rdi
callq 0x23d0
movq %r14, %rbx
jmp 0x6167
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: new_msg_idx_node
static msg_idx_t *
new_msg_idx_node(msg_idx_t *node)
{
	
	if (node == NULL) {
		if ((node = malloc(sizeof(msg_idx_t))) == NULL)
			return (NULL);
	} else {
		for (; node->next != NULL; node = node->next)
			;
		if ((node->next = malloc(sizeof(msg_idx_t))) == NULL)
			return (NULL);
		node = node->next;
	}
	node->aid  = node->mid  = -1;
	node->next = NULL;
	node->date = node->subject = NULL;

	return (node);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x61ae
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x6194
pushq $0x20
popq %rdi
callq 0x2430
movq %rax, 0x18(%rbx)
jmp 0x61b6
pushq $0x20
popq %rdi
callq 0x2430
testq %rax, %rax
je 0x61cd
orq $-0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
andq $0x0, 0x18(%rax)
jmp 0x61cf
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/cliaspora.c
// Function: groff_printf
static void
groff_printf(const char *fmt, ...)
{
	char	*str;
	va_list ap;

	va_start(ap, fmt);
	while (*fmt != '\0') {
		if (*fmt == '%') {
			if (*++fmt == '\0') {
				va_end(ap); return;
			}
		} else {
			putchar(*fmt++);
			continue;
		}
		switch(*fmt++) {
		case '%':
			putchar('%');
			break;	
		case 'c':
			(void)printf("%c", va_arg(ap, int));
			break;
		case 'd':
			(void)printf("%d", va_arg(ap, int));
			break;
		case 's':
			for (str = va_arg(ap, char *); *str != '\0'; str++) {
				if (*str == '.')
					(void)fputs("\\\[char46]", stdout);
				else if (*str == '\'')
					(void)fputs("\\\'", stdout);
				else if (*str == '\\')
					(void)fputs("\\\\", stdout);
				else 
					(void)putchar(*str);
			}
			break;
		}
	}
	va_end(ap);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x6239
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x8d50(%rip), %r13      # 0xefb0
leaq 0x46e8(%rip), %r14      # 0xa94f
leaq 0x46d7(%rip), %r15      # 0xa945
leaq 0x46dd(%rip), %r12      # 0xa952
movzbl (%rbx), %eax
cmpl $0x25, %eax
je 0x6292
testl %eax, %eax
je 0x63a1
movsbl %al, %edi
incq %rbx
callq 0x2450
jmp 0x6275
movzbl 0x1(%rbx), %eax
testl %eax, %eax
je 0x63a1
addq $0x2, %rbx
cmpl $0x73, %eax
je 0x62f2
cmpl $0x63, %eax
je 0x62c0
cmpl $0x64, %eax
je 0x62d9
cmpl $0x25, %eax
jne 0x6275
pushq $0x25
popq %rdi
callq 0x2450
jmp 0x6275
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x630b
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x6319
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x6325
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x6333
movl (%rsp), %ecx
cmpq $0x28, %rcx
ja 0x6348
movq %rcx, %rax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x6356
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %edi
callq 0x2450
jmp 0x6275
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
leaq 0x5427(%rip), %rdi      # 0xb763
xorl %eax, %eax
callq 0x2070
jmp 0x6275
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rbp
movzbl (%rbp), %eax
cmpl $0x27, %eax
je 0x6387
cmpl $0x2e, %eax
je 0x637e
cmpl $0x5c, %eax
je 0x6390
movsbl %al, %edi
testl %eax, %eax
je 0x6275
callq 0x2450
jmp 0x639c
movq (%r13), %rsi
movq %r15, %rdi
jmp 0x6397
movq (%r13), %rsi
movq %r14, %rdi
jmp 0x6397
movq (%r13), %rsi
movq %r12, %rdi
callq 0x2360
incq %rbp
jmp 0x6359
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: cfgpath
char *
cfgpath()
{
	int	      len;
	char	      *path;
	struct passwd *pw;
	
	if ((pw = getpwuid(getuid())) == NULL) {
		warnx("Couldn't find you in the password file");
		return (NULL);
	}
	endpwent();
	len = strlen(pw->pw_dir) + sizeof(PATH_CONFIG) + 1;
	if ((path = malloc(len)) == NULL) {
		warn("malloc()"); return (NULL);
	}
	(void)snprintf(path, len, "%s/%s", pw->pw_dir, PATH_CONFIG);

	return (path);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x2180
movl %eax, %edi
callq 0x2390
testq %rax, %rax
je 0x6414
movq %rax, %rbx
callq 0x2380
movq 0x20(%rbx), %r14
movq %r14, %rdi
callq 0x2150
addl $0xe, %eax
movslq %eax, %r15
movq %r15, %rdi
callq 0x2430
testq %rax, %rax
je 0x6426
movq %rax, %rbx
leaq 0x508d(%rip), %rdx      # 0xb488
leaq 0x508c(%rip), %r8       # 0xb48e
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2540
jmp 0x6436
leaq 0x5046(%rip), %rdi      # 0xb461
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22e0
jmp 0x6436
leaq 0x4259(%rip), %rdi      # 0xa686
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: is_label
static bool
is_label(const char *str)
{
	const char *p;

	if (!isspace(str[0]) && str[0] != ':') {
		if ((p = strchr(str, ':')) != NULL) {
			while (isspace(*(++p)))
				;
			if (*p == '\0')
				/* Match. */
				return (true);
		}
	}
	/* No match. */
        return (false);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22f0
movsbq (%rbx), %rcx
cmpq $0x3a, %rcx
je 0x6654
movq (%rax), %r14
movzwl (%r14,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
jne 0x6654
pushq $0x3a
popq %rsi
movq %rbx, %rdi
callq 0x2120
testq %rax, %rax
je 0x6654
incq %rax
movsbq (%rax), %rcx
incq %rax
testb $0x20, 0x1(%r14,%rcx,2)
jne 0x6641
testb %cl, %cl
je 0x665e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x1
popq %rax
jmp 0x6656
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: cmp_label
static bool
cmp_label(const char *l0, const char *l1)
{
	while (*l0 != ':' && *l1 != ':' && *l0 == *l1)
		l0++, l1++;
	if (*l0 == ':')
		l0++;
	if (*l1 == ':')
		l1++;
	if ((*l0 != '\0' && !isspace(*l0)) || (*l1 != '\0' && !isspace(*l1)))
		/* No match */
		return (false);
	/* Ignore trailing whitespaces */
	while (*l0 != '\0' && isspace(*l0))
		l0++;
	while (*l1 != '\0' && isspace(*l1))
		l1++;
	if (*l0 == *l1)
		/* == */
		return (true);
	/* != */
	return (false);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb (%r14), %cl
movb (%rbx), %al
cmpb $0x3a, %cl
je 0x698b
cmpb %al, %cl
jne 0x698b
incq %r14
incq %rbx
jmp 0x6975
xorl %r15d, %r15d
cmpb $0x3a, %cl
sete %r15b
xorl %r12d, %r12d
cmpb $0x3a, %al
sete %bpl
movsbq (%r14,%r15), %r13
testq %r13, %r13
je 0x69b8
callq 0x22f0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r13,2)
je 0x69d7
movb %bpl, %r12b
addq %r12, %rbx
movsbq (%rbx), %r12
testq %r12, %r12
je 0x69db
callq 0x22f0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
jne 0x69db
xorl %eax, %eax
jmp 0x6a20
addq %r15, %r14
movsbq (%r14), %r15
testq %r15, %r15
je 0x6a0f
callq 0x22f0
movq (%rax), %rax
incq %r14
testb $0x20, 0x1(%rax,%r15,2)
jne 0x69de
jmp 0x6a0f
callq 0x22f0
movq (%rax), %rax
incq %rbx
testb $0x20, 0x1(%rax,%r14,2)
je 0x6a18
movsbq (%rbx), %r14
testq %r14, %r14
jne 0x69fc
xorl %eax, %eax
cmpb %r14b, %r15b
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: write_var
static int
write_var(var_t *var, FILE *fp)
{
	char *p, **s;

	if (var == NULL)
		return (0);

	switch (var->type) {
	case VAR_STRING:
		if (*var->val.string == NULL)
			return (0);
		p = escape_str(*var->val.string);
		if (p == NULL)
			return (-1);
		(void)fprintf(fp, "%s = \"%s\"\n",
		    var->name, p);
		free(p);
		break;
	case VAR_STRINGS:
		(void)fprintf(fp, "%s = ", var->name);
		for (s = *var->val.strings;
		    s != NULL && *s != NULL; s++) {
			if (s != *var->val.strings)
				(void)fputc(' ', fp);
			p = escape_str(*s);
			if (p == NULL)
				return (-1);
			(void)fprintf(fp, "\"%s\"", p);
			free(p);
		}
		(void)fputc('\n', fp);
		break;
	case VAR_INTEGER:
		(void)fprintf(fp, "%s = %d\n", var->name, *var->val.integer);
		break;
	case VAR_BOOLEAN:
		(void)fprintf(fp, "%s = %s\n", var->name,
		    *var->val.boolean ? "true" : "false");
		break;
	}
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6ee8
movq %rdi, %r14
movl 0xc(%rdi), %eax
cmpq $0x3, %rax
ja 0x6ee8
movq %rsi, %rbx
leaq 0x4687(%rip), %rcx      # 0xb440
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6ee8
callq 0x7094
testq %rax, %rax
je 0x6ee8
movq %rax, %r15
movq (%r14), %rdx
leaq 0x47f0(%rip), %rsi      # 0xb5dd
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x24a0
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23d0
movq (%r14), %rdx
movq 0x10(%r14), %rax
movl (%rax), %ecx
leaq 0x47d3(%rip), %rsi      # 0xb5f3
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24a0
movq (%r14), %rdx
movq 0x10(%r14), %rax
cmpl $0x0, (%rax)
leaq 0x4715(%rip), %rax      # 0xb55e
leaq 0x47b5(%rip), %rcx      # 0xb605
cmoveq %rax, %rcx
leaq 0x47a1(%rip), %rsi      # 0xb5fc
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24a0
movq (%r14), %rdx
leaq 0x476b(%rip), %rsi      # 0xb5e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x24a0
movq 0x10(%r14), %rax
movq (%rax), %r13
leaq 0x4759(%rip), %r15      # 0xb5ee
pushq $0x20
popq %rbp
testq %r13, %r13
je 0x6ef7
movq (%r13), %rdi
testq %rdi, %rdi
je 0x6ef7
movq 0x10(%r14), %rax
cmpq (%rax), %r13
je 0x6ebd
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2410
movq (%r13), %rdi
callq 0x7094
testq %rax, %rax
je 0x6ee8
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x24a0
movq %r12, %rdi
callq 0x23d0
addq $0x8, %r13
jmp 0x6e98
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: cutok
static char *
cutok(char *str, bool *error)
{
	static int   quote;
	static char *p, *start = NULL;

	if (str != NULL)
		start = str;
	while (*start != '\0' && isspace(*start))
		start++;
	if (*start == '"') {
		start++; quote = 1;
	} else
		quote = 0;
	if (*start == '\0') {
		if (quote == 1) {
			warnx("Syntax error: Unterminated quoted string:");
			*error = true;
		} else
			*error = false;
		return (NULL);
	}
	*error = true;
	for (p = str = start; *str != '\0'; str++) {
		if (*str == '\\') {
			if (*(str + 1) == '\0') {
				warnx("Syntax error: " \
				    "Incomplete escape sequence:");
				return (NULL);
			}
			*p++ = *++str;
		} else if (*str == '"' || isspace(*str)) {
			if (*str == '"')
				quote ^= 1;
			if (quote == 0) {
				*p++ = '\0'; p = start; start = str + 1;
				*error = false;
				return (p);
			} else
				*p++ = *str;
		} else
			*p++ = *str;
	}
	*p = '\0'; p = start; start = str;
	if (quote == 1) {
		warnx("Syntax error: Unterminated quoted string:");
		return (NULL);
	}
	*error = false;
	return (p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testq %rdi, %rdi
je 0x6f28
movq %rdi, %rbx
jmp 0x6f31
movq 0x8d21(%rip), %rbx      # 0xfc50
jmp 0x6f38
movq %rbx, 0x8d18(%rip)      # 0xfc50
incq %rbx
movsbq -0x1(%rbx), %r15
testq %r15, %r15
je 0x6f7a
callq 0x22f0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
jne 0x6f31
cmpb $0x22, %r15b
jne 0x6f8d
movq %rbx, 0x8cee(%rip)      # 0xfc50
cmpb $0x0, (%rbx)
movl $0x1, 0x8cd1(%rip)      # 0xfc40
je 0x707e
pushq $0x1
popq %rbp
jmp 0x6f99
andl $0x0, 0x8cbf(%rip)      # 0xfc40
xorl %eax, %eax
movl %eax, (%r14)
xorl %ebx, %ebx
jmp 0x706c
decq %rbx
andl $0x0, 0x8ca9(%rip)      # 0xfc40
xorl %ebp, %ebp
movq %r14, (%rsp)
movl $0x1, (%r14)
movq %rbx, 0x8c9d(%rip)      # 0xfc48
leaq 0x1(%rbx), %r12
movq %rbx, %r15
movzbl (%r15), %r13d
cmpl $0x22, %r13d
je 0x6feb
cmpl $0x5c, %r13d
je 0x6fdd
testl %r13d, %r13d
je 0x7029
movsbq %r13b, %r14
callq 0x22f0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r14,2)
jne 0x6ff4
jmp 0x6ff8
movb 0x1(%r15), %r13b
testb %r13b, %r13b
je 0x705c
incq %r15
jmp 0x6ff8
xorl $0x1, %ebp
movl %ebp, 0x8c4c(%rip)      # 0xfc40
testl %ebp, %ebp
je 0x700c
movq %r12, 0x8c49(%rip)      # 0xfc48
movb %r13b, -0x1(%r12)
incq %r15
incq %r12
jmp 0x6fb2
movq 0x8c35(%rip), %rax      # 0xfc48
movb $0x0, (%rax)
movq %rbx, 0x8c2b(%rip)      # 0xfc48
incq %r15
movq %r15, 0x8c29(%rip)      # 0xfc50
jmp 0x7053
movq 0x8c18(%rip), %rax      # 0xfc48
movb $0x0, (%rax)
movq %rbx, 0x8c0e(%rip)      # 0xfc48
movq %r15, 0x8c0f(%rip)      # 0xfc50
cmpl $0x1, 0x8bf8(%rip)      # 0xfc40
jne 0x7053
leaq 0x4538(%rip), %rdi      # 0xb589
jmp 0x7063
movq (%rsp), %rax
andl $0x0, (%rax)
jmp 0x706c
leaq 0x4550(%rip), %rdi      # 0xb5b3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4504(%rip), %rdi      # 0xb589
xorl %eax, %eax
callq 0x22e0
pushq $0x1
popq %rax
jmp 0x6f83
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/config.c
// Function: escape_str
static char *
escape_str(const char *str)
{
	char *p, *esc;

	if ((esc = malloc(2 * strlen(str) + 1)) == NULL)
		return (NULL);
	for (p = esc; *str != '\0'; str++) {
		if (*str == '"' || *str == '\\')
			*p++ = '\\';
		*p++ = *str;
	}
	*p = '\0';

	return (esc);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2150
leaq 0x1(,%rax,2), %rdi
callq 0x2430
testq %rax, %rax
je 0x70da
movq %rax, %rcx
movzbl (%rbx), %edx
cmpl $0x22, %edx
je 0x70c5
cmpl $0x5c, %edx
je 0x70c5
testl %edx, %edx
jne 0x70cd
jmp 0x70d7
movb $0x5c, (%rcx)
incq %rcx
movb (%rbx), %dl
movb %dl, (%rcx)
incq %rcx
incq %rbx
jmp 0x70b2
movb $0x0, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/ssl.c
// Function: ssl_disconnect
void
ssl_disconnect(ssl_conn_t *cp)
{
	int saved_errno;

	saved_errno = errno;
	(void)close(cp->sock);
	SSL_shutdown(cp->handle);
	SSL_free(cp->handle);
	SSL_CTX_free(cp->ctx);
	free(cp->host);
	free(cp->lnbuf);
	free(cp);
	errno = saved_errno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2060
movq %rax, %r14
movl (%rax), %ebp
movl 0xc(%rbx), %edi
callq 0x25d0
movq 0x28(%rbx), %rdi
callq 0x2350
movq 0x28(%rbx), %rdi
callq 0x21c0
movq 0x30(%rbx), %rdi
callq 0x2090
movq 0x18(%rbx), %rdi
callq 0x23d0
movq 0x20(%rbx), %rdi
callq 0x23d0
movq %rbx, %rdi
callq 0x23d0
movl %ebp, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/ssl.c
// Function: ssl_write
int
ssl_write(ssl_conn_t *cp, const void *buf, size_t size)
{
	int	       n, ec;
	fd_set	       wset;
	struct timeval tv;

	for (n = -1; n < 0;) {
		tv.tv_sec = 20; tv.tv_usec = 0;
		FD_ZERO(&wset); FD_SET(cp->sock, &wset);
		while (select(cp->sock + 1, NULL, &wset, NULL, &tv) == -1) {
			if (errno != EINTR) {
				warn("ssl_write(): select()");
				return (-1);
			}
		}
		if (!FD_ISSET(cp->sock, &wset)) {
			warnx("ssl_write(): Timeout");
			return (TIMEOUT);
		}
		if ((n = SSL_write(cp->handle, buf, size)) < 0) {
			switch ((ec = SSL_get_error(cp->handle, n))) {
			case SSL_ERROR_WANT_READ:
			case SSL_ERROR_WANT_WRITE:
				/* FALLTHROUGH */
				break;
			default:
				if (errno != 0) {
					warn("SSL_write() returned with %d," \
					     "SSL-error code %d", n, ec);
				} else {
					warnx("SSL_write() returned with %d," \
					      "SSL-error code %d", n, ec);
				}
				ERR_print_errors_fp(stderr);
				return (-1);
			}
		}
	}
	if (n == 0)
		cp->state = SSL_STATE_DISCONNECTED;
	return (n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
pushq $-0x1
popq %rbp
pushq $0x40
popq %r15
leaq 0x28(%rsp), %r12
leaq 0x18(%rsp), %r13
testl %ebp, %ebp
jns 0x760f
movq $0x14, 0x18(%rsp)
andq $0x0, 0x20(%rsp)
xorl %eax, %eax
cmpq $0x10, %rax
je 0x753b
andq $0x0, 0x28(%rsp,%rax,8)
incq %rax
jmp 0x752a
movl 0xc(%rbx), %ecx
movl %ecx, %eax
cltd
idivl %r15d
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
orq %rax, 0x28(%rsp,%rdx,8)
movl 0xc(%rbx), %edi
incl %edi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x2270
cmpl $-0x1, %eax
jne 0x757c
callq 0x2060
cmpl $0x4, (%rax)
je 0x7557
jmp 0x75ea
movl 0xc(%rbx), %eax
cltd
idivl %r15d
cltq
movq 0x28(%rsp,%rax,8), %rax
btq %rdx, %rax
jae 0x7619
movq 0x28(%rbx), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x25b0
movl %eax, %ebp
testl %eax, %eax
jns 0x7511
movq 0x28(%rbx), %rdi
movl %ebp, %esi
callq 0x2040
movl %eax, %r14d
andl $-0x2, %eax
cmpl $0x2, %eax
je 0x7511
callq 0x2060
cmpl $0x0, (%rax)
je 0x762b
leaq 0x40c0(%rip), %rdi      # 0xb69c
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2110
jmp 0x763e
leaq 0x4080(%rip), %rdi      # 0xb671
xorl %eax, %eax
callq 0x2110
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jne 0x75fb
andl $0x0, 0x10(%rbx)
xorl %ebp, %ebp
jmp 0x75fb
leaq 0x4067(%rip), %rdi      # 0xb687
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x22e0
jmp 0x75fb
leaq 0x406a(%rip), %rdi      # 0xb69c
movl %ebp, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x22e0
movq 0x7993(%rip), %rax      # 0xefd8
movq (%rax), %rdi
callq 0x21b0
jmp 0x75f8
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/ssl.c
// Function: ssl_readln
char *
ssl_readln(ssl_conn_t *cp)
{
	int  i, n;
	char *p;
	
	if (cp->lnbuf == NULL) {
		if ((cp->lnbuf = malloc(_POSIX2_LINE_MAX)) == NULL)
			return (NULL);
		cp->bufsz = _POSIX2_LINE_MAX;
	}
	n = 0;
	do {
		cp->rd += n;
		if (cp->slen > 0) {
			for (i = 0; i < cp->rd - cp->slen; i++)
				cp->lnbuf[i] = cp->lnbuf[i + cp->slen];
		}
		cp->rd	-= cp->slen;
		cp->slen = 0;
		for (i = 0; i < cp->rd && cp->lnbuf[i] != '\n'; i++)
			;
		if (i < cp->rd && cp->lnbuf[i] == '\n') {
			if (i > 0 && cp->lnbuf[i - 1] == '\r')
				cp->lnbuf[i - 1] = '\0';
			cp->slen = i + 1;
			if (cp->slen >= cp->bufsz)
				cp->slen = cp->rd = 0;
			cp->lnbuf[i] = '\0';
			return (cp->lnbuf);
		}
		if (cp->rd >= cp->bufsz) {
			p = realloc(cp->lnbuf, cp->bufsz + _POSIX2_LINE_MAX);
			if (p == NULL)
				return (NULL);
			cp->lnbuf  = p;
			cp->bufsz += _POSIX2_LINE_MAX;
		}
	} while ((n = ssl_read(cp, 20, cp->lnbuf + cp->rd,
	    cp->bufsz - cp->rd)) > 0);
	if (cp->rd > 0) {
		cp->lnbuf[cp->rd] = '\0';
		cp->slen = cp->rd = 0;
		return (cp->lnbuf);
	}
	cp->slen = cp->rd = 0;

	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x767d
movl $0x800, %edi            # imm = 0x800
callq 0x2430
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x777f
movl $0x800, (%rbx)          # imm = 0x800
xorl %r14d, %r14d
pushq $0x14
popq %rbp
movl $0x800, %r15d           # imm = 0x800
xorl %eax, %eax
addl 0x4(%rbx), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
jle 0x76be
xorl %edx, %edx
subl %ecx, %eax
movslq %eax, %rsi
cmpq %rsi, %rdx
jge 0x76c0
movq 0x20(%rbx), %rax
addl %edx, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movb %cl, (%rax,%rdx)
incq %rdx
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %ecx
jmp 0x769a
subl %ecx, %eax
movl %eax, 0x4(%rbx)
andl $0x0, 0x8(%rbx)
testl %eax, %eax
movl $0x0, %esi
cmovgl %eax, %esi
movq 0x20(%rbx), %rdx
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x76ed
cmpb $0xa, (%rdx,%rcx)
je 0x76e7
incq %rcx
jmp 0x76d7
cmpb $0xa, (%rdx,%rcx)
je 0x774c
movl (%rbx), %ecx
cmpl %ecx, %eax
jl 0x771b
movslq %ecx, %rsi
addq $0x800, %rsi            # imm = 0x800
movq %rdx, %rdi
callq 0x2550
testq %rax, %rax
je 0x7782
movq %rax, %rdx
movq %rax, 0x20(%rbx)
movl (%rbx), %ecx
addl %r15d, %ecx
movl %ecx, (%rbx)
movl 0x4(%rbx), %eax
cltq
addq %rax, %rdx
subl %eax, %ecx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x732e
testl %eax, %eax
jg 0x768b
movslq 0x4(%rbx), %rax
testq %rax, %rax
jle 0x777a
movq 0x20(%rbx), %rcx
movb $0x0, (%rcx,%rax)
andq $0x0, 0x4(%rbx)
jmp 0x7774
testq %rcx, %rcx
je 0x775d
cmpb $0xd, -0x1(%rdx,%rcx)
jne 0x775d
movb $0x0, -0x1(%rdx,%rcx)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
cmpl (%rbx), %eax
jl 0x776c
andq $0x0, 0x4(%rbx)
movq 0x20(%rbx), %rax
movb $0x0, (%rax,%rcx)
movq 0x20(%rbx), %r14
jmp 0x7782
andq $0x0, 0x4(%rbx)
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/http.c
// Function: urlencode
char *
urlencode(const char *url)
{
	int	   n, buflen = 0;
	char	   *buf = NULL;
	const char nores[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
			     "abcdefghijklmnopqrstuvwxyz" \
			     "0123456789-_.~";

	if (url == NULL)
		return (NULL);
	buflen = strlen(url) * 3 + 1;
	if ((buf = malloc(buflen)) == NULL)
		return (NULL);
	for (n = 0; *url != '\0'; n++, url++) {
		if (strchr(nores, (int)*url) == NULL) {
			(void)snprintf(&buf[n], buflen - n, "%%%02x",
			    (u_char)*url);
			n += 2;
		} else
			buf[n] = *url;
	}
	buf[n] = '\0';
	return (buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x3eb3(%rip), %rsi      # 0xb8b0
pushq $0x43
popq %rcx
leaq 0x10(%rsp), %rdi
rep  movsb (%rsi), %es:(%rdi)
testq %rbx, %rbx
je 0x7a82
movq %rbx, %rdi
callq 0x2150
leal (%rax,%rax,2), %eax
incl %eax
movl %eax, 0xc(%rsp)
movslq %eax, %rdi
callq 0x2430
testq %rax, %rax
je 0x7a82
movq %rax, %r14
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movsbl (%rbx), %ebp
movslq %r12d, %r13
testl %ebp, %ebp
je 0x7a87
movq %r15, %rdi
movl %ebp, %esi
callq 0x2120
addq %r14, %r13
testq %rax, %rax
je 0x7a57
movb %bpl, (%r13)
jmp 0x7a7a
movzbl %bpl, %ecx
movl 0xc(%rsp), %eax
subl %r12d, %eax
movslq %eax, %rsi
movq %r13, %rdi
leaq 0x3d79(%rip), %rdx      # 0xb7e8
xorl %eax, %eax
callq 0x2540
addl $0x2, %r12d
incl %r12d
incq %rbx
jmp 0x7a35
xorl %r14d, %r14d
jmp 0x7a8c
movb $0x0, (%r14,%r13)
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/tomka[P]cliaspora/http.c
// Function: get_http_status
int
get_http_status(ssl_conn_t *cp)
{
	char *p, *q;

	while ((p = ssl_readln(cp)) != NULL) {
		if (strncmp(p, "HTTP/", 5) == 0) {
			for (q = p; (q = strtok(q, " ")) != NULL; q = NULL) {
				if (isdigit(*q))
					return (strtol(q, NULL, 10));
			}
			warnx("Unexpected server reply: %s", p);
			return (-1);
		}
	}
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r15
pushq $-0x1
popq %rbx
leaq 0x3d3b(%rip), %r12      # 0xb7ef
pushq $0x5
popq %r13
movq %r15, %rdi
callq 0x764f
testq %rax, %rax
je 0x7b30
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2170
testl %eax, %eax
jne 0x7ab8
leaq 0x2995(%rip), %r15      # 0xa476
movq %r14, %rdi
movq %r15, %rsi
callq 0x2510
testq %rax, %rax
je 0x7b1f
movq %rax, %r12
callq 0x22f0
movq (%rax), %rax
movsbq (%r12), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
movl $0x0, %edi
je 0x7ae4
pushq $0xa
popq %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2470
movq %rax, %rbx
jmp 0x7b30
leaq 0x3ccf(%rip), %rdi      # 0xb7f5
movq %r14, %rsi
xorl %eax, %eax
callq 0x22e0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq