LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_free
void nlmsg_free(struct nl_msg *msg)
{
	if (!msg)
		return;

	msg->nm_refcnt--;
	NL_DBG(4, "Returned message reference %p, %d remaining\n",
	       msg, msg->nm_refcnt);

	if (msg->nm_refcnt < 0)
		BUG();

	if (msg->nm_refcnt <= 0) {
		free(msg->nm_nlh);
		free(msg);
		NL_DBG(2, "msg %p: Freed\n", msg);
	}
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x42aa
movq %rdi, %rbx
movl 0x40(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x40(%rdi)
testl %eax, %eax
jle 0x42ac
cmpl $0x1, %eax
jne 0x42aa
movq 0x30(%rbx), %rdi
callq 0x3070
movq %rbx, %rdi
popq %rbx
jmp 0x3070
popq %rbx
retq
movq 0x6d45(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2d94(%rip), %rsi      # 0x7051
leaq 0x2dc5(%rip), %rbx      # 0x7089
movq %rbx, %rdx
movl $0x1ff, %ecx            # imm = 0x1FF
xorl %eax, %eax
callq 0x32c0
leaq 0x2d8e(%rip), %rdi      # 0x7068
leaq 0x2dfd(%rip), %rcx      # 0x70de
movq %rbx, %rsi
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_reserve
void *nlmsg_reserve(struct nl_msg *n, size_t len, int pad)
{
	void *buf = n->nm_nlh;
	size_t nlmsg_len = n->nm_nlh->nlmsg_len;
	size_t tlen;

	tlen = pad ? ((len + (pad - 1)) & ~(pad - 1)) : len;

	if ((tlen + nlmsg_len) > n->nm_size)
		return NULL;

	buf += nlmsg_len;
	n->nm_nlh->nlmsg_len += tlen;

	if (tlen > len)
		memset(buf + len, 0, tlen - len);

	NL_DBG(2, "msg %p: Reserved %zu bytes, pad=%d, nlmsg_len=%d\n",
		  n, len, pad, n->nm_nlh->nlmsg_len);

	return buf;
}

// Assembly:
pushq %rbx
movl %edx, %eax
movq 0x30(%rdi), %rcx
movl (%rcx), %ebx
movq %rsi, %rdx
testl %eax, %eax
je 0x4310
movslq %eax, %rdx
leaq (%rdx,%rsi), %r8
decq %r8
negl %eax
movslq %eax, %rdx
andq %r8, %rdx
leaq (%rdx,%rbx), %rax
cmpq 0x38(%rdi), %rax
jbe 0x431e
xorl %ebx, %ebx
jmp 0x4339
movl %ebx, %eax
addq %rcx, %rbx
addl %edx, %eax
movl %eax, (%rcx)
subq %rsi, %rdx
jbe 0x4339
addq %rbx, %rsi
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3230
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: nlmsg_put
struct nlmsghdr *nlmsg_put(struct nl_msg *n, uint32_t pid, uint32_t seq,
			   int type, int payload, int flags)
{
	struct nlmsghdr *nlh;

	if (n->nm_nlh->nlmsg_len < NLMSG_HDRLEN)
		BUG();

	nlh = (struct nlmsghdr *) n->nm_nlh;
	nlh->nlmsg_type = type;
	nlh->nlmsg_flags = flags;
	nlh->nlmsg_pid = pid;
	nlh->nlmsg_seq = seq;

	NL_DBG(2, "msg %p: Added netlink header type=%d, flags=%d, pid=%d, "
		  "seq=%d\n", n, type, flags, pid, seq);

	if (payload > 0 &&
	    nlmsg_reserve(n, payload, NLMSG_ALIGNTO) == NULL)
		return NULL;

	return nlh;
}

// Assembly:
pushq %rbx
movq 0x30(%rdi), %rbx
cmpl $0xf, (%rbx)
jbe 0x43a9
movw %cx, 0x4(%rbx)
movw %r9w, 0x6(%rbx)
movl %esi, 0xc(%rbx)
movl %edx, 0x8(%rbx)
testl %r8d, %r8d
jle 0x43a4
movl %r8d, %esi
pushq $0x4
popq %rdx
callq 0x3090
testq %rax, %rax
jne 0x43a4
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
movq 0x6c48(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2c97(%rip), %rsi      # 0x7051
leaq 0x2cc8(%rip), %rbx      # 0x7089
movq %rbx, %rdx
movl $0x1dd, %ecx            # imm = 0x1DD
xorl %eax, %eax
callq 0x32c0
leaq 0x2c91(%rip), %rdi      # 0x7068
leaq 0x2cb1(%rip), %rcx      # 0x708f
movq %rbx, %rsi
movl $0x1dd, %edx            # imm = 0x1DD
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/msg.c
// Function: nl_msg_parse
int nl_msg_parse(struct nl_msg *msg, void (*cb)(struct nl_object *, void *),
		 void *arg)
{
	struct nl_cache_ops *ops;
	struct nl_parser_param p = {
		.pp_cb = parse_cb
	};
	struct dp_xdata x = {
		.cb = cb,
		.arg = arg,
	};

	ops = nl_cache_ops_associate(nlmsg_get_proto(msg),
				     nlmsg_hdr(msg)->nlmsg_type);
	if (ops == NULL)
		return -NLE_MSGTYPE_NOSUPPORT;
	p.pp_arg = &x;

	return nl_cache_parse(ops, NULL, nlmsg_hdr(msg), &p);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x47(%rip), %rax        # 0x4441
movq %rax, 0x10(%rsp)
movq %rsi, (%rsp)
movq %rdx, 0x8(%rsp)
movl (%rdi), %edi
movq 0x30(%rbx), %rax
movzwl 0x4(%rax), %esi
callq 0x3570
testq %rax, %rax
je 0x4438
movq %rsp, %rdx
leaq 0x10(%rsp), %rcx
movq %rdx, 0x8(%rcx)
movq 0x30(%rbx), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x34e0
jmp 0x443b
pushq $-0x16
popq %rax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_ok
int nla_ok(const struct nlattr *nla, int remaining)
{
	size_t r = remaining;

	return r >= sizeof(*nla) &&
	       nla->nla_len >= sizeof(*nla) &&
	       nla->nla_len <= r;
}

// Assembly:
xorl %eax, %eax
cmpl $0x4, %esi
jb 0x446b
movzwl (%rdi), %ecx
cmpq $0x4, %rcx
jb 0x446b
movslq %esi, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
setbe %al
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_parse
int nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, int len,
	      struct nla_policy *policy)
{
	struct nlattr *nla;
	int rem, err;

	memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));

	nla_for_each_attr(nla, head, len, rem) {
		int type = nla_type(nla);

		if (type == 0) {
			fprintf(stderr, "Illegal nla->nla_type == 0\n");
			continue;
		}

		if (type <= maxtype) {
			if (policy) {
				err = validate_nla(nla, maxtype, policy);
				if (err < 0)
					goto errout;
			}

			tb[type] = nla;
		}
	}

	if (rem > 0)
		fprintf(stderr, "netlink: %d bytes leftover after parsing "
		       "attributes.\n", rem);

	err = 0;
errout:
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebx
movq %rdx, %r15
movl %esi, %ebp
movslq %esi, %rax
leaq 0x8(,%rax,8), %rdx
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x3230
cmpl $0x4, %ebx
jb 0x451d
movzwl (%r15), %eax
cmpq $0x4, %rax
jb 0x451d
movslq %ebx, %rcx
cmpq %rcx, %rax
ja 0x451d
movzwl 0x2(%r15), %r12d
andl $0x3fff, %r12d          # imm = 0x3FFF
je 0x44ff
cmpl %ebp, %r12d
jg 0x44ee
testq %r14, %r14
je 0x44e6
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x455a
testl %eax, %eax
js 0x4536
movq (%rsp), %rax
movq %r15, (%rax,%r12,8)
movzwl (%r15), %eax
addl $0x3, %eax
andl $-0x4, %eax
subl %eax, %ebx
addq %rax, %r15
jmp 0x44a6
movq 0x6af2(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x2bef(%rip), %rdi      # 0x70ff
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x35b0
jmp 0x44ee
xorl %r13d, %r13d
testl %ebx, %ebx
jg 0x453b
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r13d
jmp 0x4524
movq 0x6ab6(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2bcf(%rip), %rsi      # 0x711b
xorl %r13d, %r13d
movl %ebx, %edx
xorl %eax, %eax
callq 0x32c0
jmp 0x4524
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: validate_nla
static int validate_nla(struct nlattr *nla, int maxtype,
			struct nla_policy *policy)
{
	struct nla_policy *pt;
	int minlen = 0, type = nla_type(nla);

	if (type <= 0 || type > maxtype)
		return 0;

	pt = &policy[type];

	if (pt->type > NLA_TYPE_MAX)
		BUG();

	if (pt->minlen)
		minlen = pt->minlen;
	else if (pt->type != NLA_UNSPEC)
		minlen = nla_attr_minlen[pt->type];

	if (pt->type == NLA_FLAG && nla_len(nla) > 0)
		return -NLE_RANGE;

	if (nla_len(nla) < minlen)
		return -NLE_RANGE;

	if (pt->maxlen && nla_len(nla) > pt->maxlen)
		return -NLE_RANGE;

	if (pt->type == NLA_STRING) {
		char *data = nla_data(nla);
		if (data[nla_len(nla) - 1] != '\0')
			return -NLE_INVAL;
	}

	return 0;
}

// Assembly:
movzwl 0x2(%rdi), %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
sete %r8b
cmpl %esi, %ecx
setg %sil
xorl %eax, %eax
orb %r8b, %sil
jne 0x45bb
imulq $0x6, %rcx, %rax
movzwl (%rdx,%rax), %ecx
cmpq $0x9, %rcx
jae 0x45fb
addq %rax, %rdx
movzwl 0x2(%rdx), %esi
pushq $-0x8
popq %rax
testw %si, %si
jne 0x45a2
testq %rcx, %rcx
je 0x45bc
leaq 0x2c02(%rip), %rsi      # 0x71a0
movzwl (%rsi,%rcx,2), %esi
cmpl $0x6, %ecx
sete %r9b
movzwl (%rdi), %r8d
cmpw $0x5, %r8w
setae %r10b
testb %r10b, %r9b
je 0x45c2
retq
movzwl (%rdi), %r8d
xorl %esi, %esi
movzwl %si, %r9d
movzwl %r8w, %esi
addl $-0x4, %esi
cmpl %r9d, %esi
jl 0x45bb
movzwl 0x4(%rdx), %edx
testl %edx, %edx
setne %r8b
cmpl %edx, %esi
seta %dl
testb %dl, %r8b
jne 0x45bb
cmpl $0x5, %ecx
jne 0x45f8
movl %esi, %eax
cmpb $0x0, 0x3(%rdi,%rax)
je 0x45f8
pushq $-0x7
popq %rax
retq
xorl %eax, %eax
retq
pushq %rbx
movq 0x69f5(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2a44(%rip), %rsi      # 0x7051
leaq 0x2b3d(%rip), %rbx      # 0x7151
movq %rbx, %rdx
movl $0x1c6, %ecx            # imm = 0x1C6
xorl %eax, %eax
callq 0x32c0
leaq 0x2a3e(%rip), %rdi      # 0x7068
leaq 0x2b27(%rip), %rcx      # 0x7158
movq %rbx, %rsi
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_validate
int nla_validate(struct nlattr *head, int len, int maxtype,
		 struct nla_policy *policy)
{
	struct nlattr *nla;
	int rem, err;

	nla_for_each_attr(nla, head, len, rem) {
		err = validate_nla(nla, maxtype, policy);
		if (err < 0)
			goto errout;
	}

	err = 0;
errout:
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
xorl %eax, %eax
cmpl $0x4, %r14d
jb 0x468d
movzwl (%r15), %ecx
cmpq $0x4, %rcx
jb 0x468d
movslq %r14d, %rdx
cmpq %rdx, %rcx
ja 0x468d
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x455a
testl %eax, %eax
js 0x468d
movzwl (%r15), %eax
addl $0x3, %eax
andl $-0x4, %eax
subl %eax, %r14d
addq %rax, %r15
jmp 0x4650
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_find
struct nlattr *nla_find(struct nlattr *head, int len, int attrtype)
{
	struct nlattr *nla;
	int rem;

	nla_for_each_attr(nla, head, len, rem)
		if (nla_type(nla) == attrtype)
			return nla;

	return NULL;
}

// Assembly:
xorl %eax, %eax
cmpl $0x4, %esi
jb 0x46d1
movzwl (%rdi), %ecx
cmpq $0x4, %rcx
jb 0x46d1
movslq %esi, %r8
cmpq %r8, %rcx
ja 0x46d1
movzwl 0x2(%rdi), %r8d
andl $0x3fff, %r8d           # imm = 0x3FFF
cmpl %edx, %r8d
je 0x46ce
addl $0x3, %ecx
andl $-0x4, %ecx
subl %ecx, %esi
addq %rcx, %rdi
jmp 0x469a
movq %rdi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_reserve
struct nlattr *nla_reserve(struct nl_msg *msg, int attrtype, int attrlen)
{
	struct nlattr *nla;
	int tlen;
	
	tlen = NLMSG_ALIGN(msg->nm_nlh->nlmsg_len) + nla_total_size(attrlen);

	if ((tlen + msg->nm_nlh->nlmsg_len) > msg->nm_size)
		return NULL;

	nla = (struct nlattr *) nlmsg_tail(msg->nm_nlh);
	nla->nla_type = attrtype;
	nla->nla_len = nla_attr_size(attrlen);

	memset((unsigned char *) nla + nla->nla_len, 0, nla_padlen(attrlen));
	msg->nm_nlh->nlmsg_len = tlen;

	NL_DBG(2, "msg %p: Reserved %d bytes at offset +%td for attr %d "
		  "nlmsg_len=%d\n", msg, attrlen,
		  (void *) nla - nlmsg_data(msg->nm_nlh),
		  attrtype, msg->nm_nlh->nlmsg_len);

	return nla;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rcx
movl (%rcx), %r8d
leal 0x3(%r8), %edi
andl $-0x4, %edi
leal 0x7(%rdx), %eax
andl $-0x4, %eax
leal (%rdi,%rax), %ebp
addl %ebp, %r8d
cmpq %r8, 0x38(%rbx)
jae 0x46fe
xorl %r14d, %r14d
jmp 0x4729
leaq (%rcx,%rdi), %r14
movw %si, 0x2(%rcx,%rdi)
leal 0x4(%rdx), %esi
movw %si, (%rcx,%rdi)
movzwl %si, %edi
addq %r14, %rdi
subl %edx, %eax
addl $-0x4, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x3230
movq 0x30(%rbx), %rax
movl %ebp, (%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/attr.c
// Function: nla_put
int nla_put(struct nl_msg *msg, int attrtype, int datalen, const void *data)
{
	struct nlattr *nla;

	nla = nla_reserve(msg, attrtype, datalen);
	if (!nla)
		return -NLE_NOMEM;

	memcpy(nla_data(nla), data, datalen);
	NL_DBG(2, "msg %p: Wrote %d bytes at offset +%td for attr %d\n",
	       msg, datalen, (void *) nla - nlmsg_data(msg->nm_nlh), attrtype);

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
callq 0x3600
testq %rax, %rax
je 0x4759
addq $0x4, %rax
movslq %ebp, %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3310
xorl %eax, %eax
jmp 0x475c
pushq $-0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_alloc
struct nl_cache *nl_cache_alloc(struct nl_cache_ops *ops)
{
	struct nl_cache *cache;

	cache = calloc(1, sizeof(*cache));
	if (!cache)
		return NULL;

	nl_init_list_head(&cache->c_items);
	cache->c_ops = ops;

	NL_DBG(2, "Allocated cache %p <%s>.\n", cache, nl_cache_name(cache));

	return cache;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x32a0
testq %rax, %rax
je 0x4783
movq %rax, (%rax)
movq %rax, 0x8(%rax)
movq %rbx, 0x20(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_alloc_and_fill
int nl_cache_alloc_and_fill(struct nl_cache_ops *ops, struct nl_sock *sock,
			    struct nl_cache **result)
{
	struct nl_cache *cache;
	int err;
	
	if (!(cache = nl_cache_alloc(ops)))
		return -NLE_NOMEM;

	if (sock && (err = nl_cache_refill(sock, cache)) < 0) {
		nl_cache_free(cache);
		return err;
	}

	*result = cache;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
callq 0x3500
testq %rax, %rax
je 0x47ba
movq %rax, %r14
testq %r15, %r15
je 0x47b3
movq %r15, %rdi
movq %r14, %rsi
callq 0x3630
testl %eax, %eax
js 0x47bf
movq %r14, (%rbx)
xorl %ebp, %ebp
jmp 0x47c9
pushq $-0x5
popq %rbp
jmp 0x47c9
movl %eax, %ebp
movq %r14, %rdi
callq 0x3050
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_refill
int nl_cache_refill(struct nl_sock *sk, struct nl_cache *cache)
{
	int err;

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

	NL_DBG(2, "Upading cache %p <%s>, request sent, waiting for dump...\n",
	       cache, nl_cache_name(cache));
	nl_cache_clear(cache);

	return nl_cache_pickup(sk, cache);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rsi), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x4813
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq *%rax
testl %eax, %eax
js 0x4816
movq %rbx, %rdi
callq 0x3210
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x31d0
pushq $-0xa
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_remove
void nl_cache_remove(struct nl_object *obj)
{
	struct nl_cache *cache = obj->ce_cache;

	if (cache == NULL)
		return;

	nl_list_del(&obj->ce_list);
	obj->ce_cache = NULL;
	nl_object_put(obj);
	cache->c_nitems--;

	NL_DBG(1, "Deleted %p from cache %p <%s>.\n",
	       obj, cache, nl_cache_name(cache));
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
je 0x4890
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
andq $0x0, 0x10(%rdi)
movl (%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdi)
cmpl $0x1, %eax
jg 0x488d
callq 0x3120
decl 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_add
int nl_cache_add(struct nl_cache *cache, struct nl_object *obj)
{
	struct nl_object *new;

	if (cache->c_ops->co_obj_ops != obj->ce_ops)
		return -NLE_OBJ_MISMATCH;

	if (!nl_list_empty(&obj->ce_list)) {
		new = nl_object_clone(obj);
		if (!new)
			return -NLE_NOMEM;
	} else {
		nl_object_get(obj);
		new = obj;
	}

	return __cache_add(cache, new);
}

// Assembly:
pushq %rbx
movq 0x20(%rdi), %rax
movq 0x28(%rax), %rax
cmpq 0x8(%rsi), %rax
je 0x48a6
pushq $-0x17
popq %rax
jmp 0x48e9
movq %rdi, %rbx
leaq 0x18(%rsi), %rax
cmpq %rax, 0x18(%rsi)
je 0x48c7
movq %rsi, %rdi
callq 0x33e0
movq %rax, %rsi
testq %rax, %rax
jne 0x48c9
pushq $-0x5
jmp 0x48a3
incl (%rsi)
movq %rbx, 0x10(%rsi)
leaq 0x18(%rsi), %rax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %rcx, 0x20(%rsi)
movq %rax, 0x8(%rbx)
movq %rbx, 0x18(%rsi)
incl 0x10(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: _cache_pickup
int __cache_pickup(struct nl_sock *sk, struct nl_cache *cache,
		   struct nl_parser_param *param)
{
	int err;
	struct nl_cb *cb;
	struct update_xdata x = {
		.ops = cache->c_ops,
		.params = param,
	};

	NL_DBG(1, "Picking up answer for cache %p <%s>...\n",
		  cache, nl_cache_name(cache));

	cb = nl_cb_clone(sk->s_cb);
	if (cb == NULL)
		return -NLE_NOMEM;

	nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, update_msg_parser, &x);

	err = nl_recvmsgs(sk, cb);
	if (err < 0)
		NL_DBG(2, "While picking up for %p <%s>, recvmsgs() returned " \
		       "%d: %s", cache, nl_cache_name(cache),
		       err, nl_geterror(err));

	nl_cb_put(cb);

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x30(%rdi), %rdi
callq 0x3420
testq %rax, %rax
je 0x4960
movq %rax, %r14
leaq 0x36(%rip), %rcx        # 0x496d
pushq $0x3
popq %rdx
leaq 0x8(%rsp), %r8
movq %rax, %rdi
xorl %esi, %esi
callq 0x3640
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3180
movl %eax, %ebx
movq %r14, %rdi
callq 0x32e0
jmp 0x4963
pushq $-0x5
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache.c
// Function: nl_cache_parse
int nl_cache_parse(struct nl_cache_ops *ops, struct sockaddr_nl *who,
		   struct nlmsghdr *nlh, struct nl_parser_param *params)
{
	int i, err;

	if (!nlmsg_valid_hdr(nlh, ops->co_hdrsize))
		return -NLE_MSG_TOOSHORT;

	for (i = 0; ops->co_msgtypes[i].mt_id >= 0; i++) {
		if (ops->co_msgtypes[i].mt_id == nlh->nlmsg_type) {
			err = ops->co_msg_parser(ops, who, nlh, params);
			if (err != -NLE_OPNOTSUPP)
				goto errout;
		}
	}


	err = -NLE_MSGTYPE_NOSUPPORT;
errout:
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
addl $0x10, %eax
cmpl %eax, (%rdx)
jae 0x49ce
pushq $-0x15
popq %rbp
jmp 0x4a10
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x48(%rdi), %r13
pushq $-0x16
popq %rbp
movl (%r13), %eax
testl %eax, %eax
js 0x4a10
movzwl 0x4(%r14), %ecx
cmpl %ecx, %eax
jne 0x4a08
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x20(%r12)
cmpl $-0xa, %eax
jne 0x4a0e
addq $0x10, %r13
jmp 0x49e1
movl %eax, %ebp
movl %ebp, %eax
addq $0x8, %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/cache.c
// Function: nl_cache_parse_and_add
int nl_cache_parse_and_add(struct nl_cache *cache, struct nl_msg *msg)
{
	struct nl_parser_param p = {
		.pp_cb = pickup_cb,
		.pp_arg = cache,
	};

	return nl_cache_parse(cache->c_ops, NULL, nlmsg_hdr(msg), &p);
}

// Assembly:
subq $0x18, %rsp
leaq -0x87(%rip), %rax       # 0x49a5
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdi, 0x8(%rcx)
movq 0x20(%rdi), %rdi
movq 0x30(%rsi), %rdx
xorl %esi, %esi
callq 0x34e0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache_mngt.c
// Function: nl_cache_ops_associate
struct nl_cache_ops *nl_cache_ops_associate(int protocol, int msgtype)
{
	int i;
	struct nl_cache_ops *ops;

	for (ops = cache_ops; ops; ops = ops->co_next) {
		if (ops->co_protocol != protocol)
			continue;

		for (i = 0; ops->co_msgtypes[i].mt_id >= 0; i++)
			if (ops->co_msgtypes[i].mt_id == msgtype)
				return ops;
	}

	return NULL;
}

// Assembly:
leaq 0x6b4f(%rip), %rax      # 0xb5d8
movq (%rax), %rax
testq %rax, %rax
je 0x4ab0
cmpl %edi, 0xc(%rax)
jne 0x4aaa
leaq 0x48(%rax), %rcx
movl (%rcx), %edx
testl %edx, %edx
js 0x4aaa
addq $0x10, %rcx
cmpl %esi, %edx
jne 0x4a9a
jmp 0x4ab0
addq $0x30, %rax
jmp 0x4a89
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/cache_mngt.c
// Function: nl_cache_mngt_register
int nl_cache_mngt_register(struct nl_cache_ops *ops)
{
	if (!ops->co_name || !ops->co_obj_ops)
		return -NLE_INVAL;

	if (nl_cache_ops_lookup(ops->co_name))
		return -NLE_EXIST;

	ops->co_next = cache_ops;
	cache_ops = ops;

	NL_DBG(1, "Registered cache operations %s\n", ops->co_name);

	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
pushq $-0x7
popq %rax
testq %rdi, %rdi
je 0x4aea
cmpq $0x0, 0x28(%rbx)
je 0x4aea
callq 0x34c0
testq %rax, %rax
je 0x4ad6
pushq $-0x6
popq %rax
jmp 0x4aea
movq 0x6afb(%rip), %rax      # 0xb5d8
movq %rax, 0x30(%rbx)
movq %rbx, 0x6af0(%rip)      # 0xb5d8
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/object.c
// Function: nl_object_alloc
struct nl_object *nl_object_alloc(struct nl_object_ops *ops)
{
	struct nl_object *new;

	if (ops->oo_size < sizeof(*new))
		BUG();

	new = calloc(1, ops->oo_size);
	if (!new)
		return NULL;

	new->ce_refcnt = 1;
	nl_init_list_head(&new->ce_list);

	new->ce_ops = ops;
	if (ops->oo_constructor)
		ops->oo_constructor(new);

	NL_DBG(4, "Allocated new object %p\n", new);

	return new;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rsi
cmpq $0x37, %rsi
jbe 0x4b6d
movq %rdi, %rbx
pushq $0x1
popq %rdi
callq 0x32a0
movq %rax, %r14
testq %rax, %rax
je 0x4b65
movl $0x1, (%r14)
movq %r14, %rax
addq $0x18, %rax
movq %rax, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %rbx, 0x8(%r14)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x4b65
movq %r14, %rdi
callq *%rax
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x6484(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x24d3(%rip), %rsi      # 0x7051
leaq 0x262d(%rip), %rbx      # 0x71b2
pushq $0x2f
popq %rbp
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x24cd(%rip), %rdi      # 0x7068
leaq 0x2619(%rip), %rcx      # 0x71bb
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/object.c
// Function: nl_object_clone
struct nl_object *nl_object_clone(struct nl_object *obj)
{
	struct nl_object *new;
	struct nl_object_ops *ops = obj_ops(obj);
	int doff = offsetof(struct nl_derived_object, data);
	int size;

	new = nl_object_alloc(ops);
	if (!new)
		return NULL;

	size = ops->oo_size - doff;
	if (size < 0)
		BUG();

	new->ce_ops = obj->ce_ops;
	new->ce_msgtype = obj->ce_msgtype;

	if (size)
		memcpy((void *)new + doff, (void *)obj + doff, size);

	if (ops->oo_clone) {
		if (ops->oo_clone(new, obj) < 0) {
			nl_object_free(new);
			return NULL;
		}
	} else if (size && ops->oo_free_data)
		BUG();

	return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x4c92
movq %rax, %r15
movq %rax, %rdi
callq 0x3270
testq %rax, %rax
je 0x4c43
movq %rax, %rbx
movl 0x8(%r15), %eax
addl $-0x34, %eax
js 0x4c53
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movl 0x28(%r14), %ecx
movl %ecx, 0x28(%rbx)
je 0x4c26
movq %rbx, %rdi
addq $0x34, %rdi
leaq 0x34(%r14), %rsi
movl %eax, %edx
callq 0x3310
movq 0x28(%r15), %rax
testq %rax, %rax
jne 0x4c2f
cmpq $0x0, 0x20(%r15)
je 0x4c45
movq 0x63e7(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2436(%rip), %rsi      # 0x7051
leaq 0x2590(%rip), %rbx      # 0x71b2
pushq $0x66
jmp 0x4c6d
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x4c45
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
testl %eax, %eax
jns 0x4c45
movq %rbx, %rdi
callq 0x3120
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x639e(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x23ed(%rip), %rsi      # 0x7051
leaq 0x2547(%rip), %rbx      # 0x71b2
pushq $0x58
popq %rbp
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x23e7(%rip), %rdi      # 0x7068
leaq 0x256d(%rip), %rcx      # 0x71f5
movq %rbx, %rsi
movl %ebp, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/object.c
// Function: nl_object_free
void nl_object_free(struct nl_object *obj)
{
	struct nl_object_ops *ops = obj_ops(obj);

	if (obj->ce_refcnt > 0)
		NL_DBG(1, "Warning: Freeing object in use...\n");

	if (obj->ce_cache)
		nl_cache_remove(obj);

	if (ops->oo_free_data)
		ops->oo_free_data(obj);

	free(obj);

	NL_DBG(4, "Freed object %p\n", obj);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4c92
movq %rax, %r14
cmpq $0x0, 0x10(%rbx)
je 0x4cfc
movq %rbx, %rdi
callq 0x33f0
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x4d0a
movq %rbx, %rdi
callq *%rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3070
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: _alloc_socket
static struct nl_sock *__alloc_socket(struct nl_cb *cb)
{
	struct nl_sock *sk;

	sk = calloc(1, sizeof(*sk));
	if (!sk)
		return NULL;

	sk->s_fd = -1;
	sk->s_cb = cb;
	sk->s_local.nl_family = AF_NETLINK;
	sk->s_peer.nl_family = AF_NETLINK;
	sk->s_seq_expect = sk->s_seq_next = time(0);
	sk->s_local.nl_pid = generate_local_port();
	if (sk->s_local.nl_pid == UINT_MAX) {
		nl_socket_free(sk);
		return NULL;
	}

	return sk;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x32a0
testq %rax, %rax
je 0x4d82
movq %rax, %rbx
orl $-0x1, 0x18(%rax)
movq %r14, 0x30(%rax)
movw $0x10, %ax
movw %ax, (%rbx)
movw %ax, 0xc(%rbx)
xorl %edi, %edi
callq 0x3360
movl %eax, 0x20(%rbx)
movl %eax, 0x24(%rbx)
callq 0x4e88
movl %eax, 0x4(%rbx)
cmpl $-0x1, %eax
jne 0x4d84
movq %rbx, %rdi
callq 0x3540
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_free
void nl_socket_free(struct nl_sock *sk)
{
	if (!sk)
		return;

	if (sk->s_fd >= 0)
		close(sk->s_fd);

	if (!(sk->s_flags & NL_OWN_PORT))
		release_local_port(sk->s_local.nl_pid);

	nl_cb_put(sk->s_cb);
	free(sk);
}

// Assembly:
testq %rdi, %rdi
je 0x4e13
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %edi
testl %edi, %edi
js 0x4df3
callq 0x3260
testb $0x4, 0x28(%rbx)
jne 0x4e01
movl 0x4(%rbx), %edi
callq 0x4e14
movq 0x30(%rbx), %rdi
callq 0x32e0
movq %rbx, %rdi
popq %rbx
jmp 0x3070
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_set_local_port
void nl_socket_set_local_port(struct nl_sock *sk, uint32_t port)
{
	if (port == 0) {
		port = generate_local_port(); 
		sk->s_flags &= ~NL_OWN_PORT;
	} else  {
		if (!(sk->s_flags & NL_OWN_PORT))
			release_local_port(sk->s_local.nl_pid);
		sk->s_flags |= NL_OWN_PORT;
	}

	sk->s_local.nl_pid = port;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4e73
movl %esi, %ebp
movl 0x28(%rbx), %eax
testb $0x4, %al
jne 0x4e6b
movl 0x4(%rbx), %edi
callq 0x4e14
movl 0x28(%rbx), %eax
orl $0x4, %eax
movl %eax, 0x28(%rbx)
jmp 0x4e7e
callq 0x4e88
movl %eax, %ebp
andb $-0x5, 0x28(%rbx)
movl %ebp, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: generate_local_port
static uint32_t generate_local_port(void)
{
	int i, n;
	uint32_t pid = getpid() & 0x3FFFFF;

	for (i = 0; i < 32; i++) {
		if (used_ports_map[i] == 0xFFFFFFFF)
			continue;

		for (n = 0; n < 32; n++) {
			if (1UL & (used_ports_map[i] >> n))
				continue;

			used_ports_map[i] |= (1UL << n);
			n += (i * 32);

			/* PID_MAX_LIMIT is currently at 2^22, leaving 10 bit
			 * to, i.e. 1024 unique ports per application. */
			return pid + (n << 22);

		}
	}

	/* Out of sockets in our own PID namespace, what to do? FIXME */
	return UINT_MAX;
}

// Assembly:
pushq %rax
callq 0x3160
andl $0x3fffff, %eax         # imm = 0x3FFFFF
xorl %esi, %esi
pushq $-0x1
popq %r8
leaq 0x6740(%rip), %rdi      # 0xb5e0
cmpq $0x20, %rsi
je 0x4ee5
movl (%rdi,%rsi,4), %r9d
cmpl $-0x1, %r9d
je 0x4eca
xorl %ecx, %ecx
movl %eax, %edx
cmpl $0x20, %ecx
je 0x4eca
btl %ecx, %r9d
jae 0x4ed4
addl $0x400000, %edx         # imm = 0x400000
incq %rcx
jmp 0x4eb4
incq %rsi
addl $0x8000000, %eax        # imm = 0x8000000
jmp 0x4ea0
pushq $0x1
popq %rax
shlq %cl, %rax
orl %eax, %r9d
movl %r9d, (%rdi,%rsi,4)
movl %edx, %eax
popq %rcx
retq
movl %r8d, %edx
jmp 0x4ee1
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_add_memberships
int nl_socket_add_memberships(struct nl_sock *sk, int group, ...)
{
	int err;
	va_list ap;

	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;

	va_start(ap, group);

	while (group != 0) {
		if (group < 0)
			return -NLE_INVAL;

		err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
						 &group, sizeof(group));
		if (err < 0)
			return -nl_syserr2nlerr(errno);

		group = va_arg(ap, int);
	}

	va_end(ap);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
testb %al, %al
je 0x4f37
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
movl %esi, 0xc(%rsp)
cmpl $-0x1, 0x18(%rdi)
je 0x4fe3
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x18(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, 0x10(%rsp)
pushq $-0x7
popq %rbp
pushq $0x1
popq %r14
leaq 0xc(%rsp), %r15
pushq $0x4
popq %r12
testl %esi, %esi
je 0x4fe8
js 0x4ffc
movl 0x18(%rbx), %edi
movl $0x10e, %esi            # imm = 0x10E
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3130
testl %eax, %eax
js 0x4fec
movl 0x10(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x4fcd
movq %rcx, %rax
addq 0x20(%rsp), %rax
addl $0x8, %ecx
movl %ecx, 0x10(%rsp)
jmp 0x4fdb
movq 0x18(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl (%rax), %esi
movl %esi, 0xc(%rsp)
jmp 0x4f92
pushq $-0x3
popq %rbp
jmp 0x4ffc
xorl %ebp, %ebp
jmp 0x4ffc
callq 0x30a0
movl (%rax), %edi
callq 0x3370
movl %eax, %ebp
negl %ebp
movl %ebp, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_drop_memberships
int nl_socket_drop_memberships(struct nl_sock *sk, int group, ...)
{
	int err;
	va_list ap;

	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;

	va_start(ap, group);

	while (group != 0) {
		if (group < 0)
			return -NLE_INVAL;

		err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP,
						 &group, sizeof(group));
		if (err < 0)
			return -nl_syserr2nlerr(errno);

		group = va_arg(ap, int);
	}

	va_end(ap);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
testb %al, %al
je 0x505b
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
movl %esi, 0xc(%rsp)
cmpl $-0x1, 0x18(%rdi)
je 0x5107
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x18(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, 0x10(%rsp)
pushq $-0x7
popq %rbp
pushq $0x2
popq %r14
leaq 0xc(%rsp), %r15
pushq $0x4
popq %r12
testl %esi, %esi
je 0x510c
js 0x5120
movl 0x18(%rbx), %edi
movl $0x10e, %esi            # imm = 0x10E
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3130
testl %eax, %eax
js 0x5110
movl 0x10(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x50f1
movq %rcx, %rax
addq 0x20(%rsp), %rax
addl $0x8, %ecx
movl %ecx, 0x10(%rsp)
jmp 0x50ff
movq 0x18(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl (%rax), %esi
movl %esi, 0xc(%rsp)
jmp 0x50b6
pushq $-0x3
popq %rbp
jmp 0x5120
xorl %ebp, %ebp
jmp 0x5120
callq 0x30a0
movl (%rax), %edi
callq 0x3370
movl %eax, %ebp
negl %ebp
movl %ebp, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_set_buffer_size
int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
{
	int err;

	if (rxbuf <= 0)
		rxbuf = 32768;

	if (txbuf <= 0)
		txbuf = 32768;

	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;
	
	err = setsockopt(sk->s_fd, SOL_SOCKET, SO_SNDBUF,
			 &txbuf, sizeof(txbuf));
	if (err < 0)
		return -nl_syserr2nlerr(errno);

	err = setsockopt(sk->s_fd, SOL_SOCKET, SO_RCVBUF,
			 &rxbuf, sizeof(rxbuf));
	if (err < 0)
		return -nl_syserr2nlerr(errno);

	sk->s_flags |= NL_SOCK_BUFSIZE_SET;

	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
testl %esi, %esi
jg 0x5185
movl $0x8000, 0xc(%rsp)      # imm = 0x8000
testl %edx, %edx
jg 0x5191
movl $0x8000, 0x8(%rsp)      # imm = 0x8000
movl 0x18(%rbx), %edi
cmpl $-0x1, %edi
je 0x51e4
pushq $0x1
popq %rsi
pushq $0x7
popq %rdx
leaq 0x8(%rsp), %rcx
pushq $0x4
popq %r8
callq 0x3130
testl %eax, %eax
js 0x51d4
movl 0x18(%rbx), %edi
pushq $0x1
popq %rsi
pushq $0x8
popq %rdx
leaq 0xc(%rsp), %rcx
pushq $0x4
popq %r8
callq 0x3130
testl %eax, %eax
js 0x51d4
orb $0x1, 0x28(%rbx)
xorl %eax, %eax
jmp 0x51e7
callq 0x30a0
movl (%rax), %edi
callq 0x3370
negl %eax
jmp 0x51e7
pushq $-0x3
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_set_passcred
int nl_socket_set_passcred(struct nl_sock *sk, int state)
{
	int err;

	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;

	err = setsockopt(sk->s_fd, SOL_SOCKET, SO_PASSCRED,
			 &state, sizeof(state));
	if (err < 0)
		return -nl_syserr2nlerr(errno);

	if (state)
		sk->s_flags |= NL_SOCK_PASSCRED;
	else
		sk->s_flags &= ~NL_SOCK_PASSCRED;

	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl 0x18(%rdi), %edi
cmpl $-0x1, %edi
je 0x5228
pushq $0x1
popq %rsi
pushq $0x10
popq %rdx
leaq 0xc(%rsp), %rcx
pushq $0x4
popq %r8
callq 0x3130
testl %eax, %eax
js 0x522d
cmpl $0x0, 0xc(%rsp)
movl 0x28(%rbx), %eax
je 0x523d
orl $0x2, %eax
jmp 0x5240
pushq $-0x3
popq %rax
jmp 0x5245
callq 0x30a0
movl (%rax), %edi
callq 0x3370
negl %eax
jmp 0x5245
andl $-0x3, %eax
movl %eax, 0x28(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/socket.c
// Function: nl_socket_recv_pktinfo
int nl_socket_recv_pktinfo(struct nl_sock *sk, int state)
{
	int err;

	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;

	err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO,
			 &state, sizeof(state));
	if (err < 0)
		return -nl_syserr2nlerr(errno);

	return 0;
}

// Assembly:
pushq %rax
movl %esi, 0x4(%rsp)
movl 0x18(%rdi), %edi
cmpl $-0x1, %edi
je 0x5286
pushq $0x3
popq %rdx
leaq 0x4(%rsp), %rcx
pushq $0x4
popq %r8
movl $0x10e, %esi            # imm = 0x10E
callq 0x3130
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x5289
callq 0x30a0
movl (%rax), %edi
callq 0x3370
negl %eax
jmp 0x5289
pushq $-0x3
popq %rax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/error.c
// Function: nl_perror
void nl_perror(int error, const char *s)
{
	if (s && *s)
		fprintf(stderr, "%s: %s\n", s, nl_geterror(error));
	else
		fprintf(stderr, "%s\n", nl_geterror(error));
}

// Assembly:
testq %rsi, %rsi
je 0x52b5
movq %rsi, %rdx
cmpb $0x0, (%rsi)
jne 0x52e8
movq 0x5d3c(%rip), %rax      # 0xaff8
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
cmpl $0x22, %ecx
pushq $0x1
popq %rdx
cmovbl %ecx, %edx
movq (%rax), %rdi
leaq 0x5a2a(%rip), %rax      # 0xad00
movq (%rax,%rdx,8), %rdx
leaq 0x208f(%rip), %rsi      # 0x7370
xorl %eax, %eax
jmp 0x32c0
movq 0x5d09(%rip), %rax      # 0xaff8
movq (%rax), %rax
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
cmpl $0x22, %ecx
pushq $0x1
popq %rsi
cmovbl %ecx, %esi
leaq 0x59f7(%rip), %rcx      # 0xad00
movq (%rcx,%rsi,8), %rcx
leaq 0x2058(%rip), %rsi      # 0x736c
movq %rax, %rdi
xorl %eax, %eax
jmp 0x32c0
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/error.c
// Function: nl_syserr2nlerr
int nl_syserr2nlerr(int error)
{
	error = abs(error);

	switch (error) {
	case EBADF:		return NLE_BAD_SOCK;
	case EADDRINUSE:	return NLE_EXIST;
	case EEXIST:		return NLE_EXIST;
	case EADDRNOTAVAIL:	return NLE_NOADDR;
	case ESRCH:		/* fall through */
	case ENOENT:		return NLE_OBJ_NOTFOUND;
	case EINTR:		return NLE_INTR;
	case EAGAIN:		return NLE_AGAIN;
	case ENOTSOCK:		return NLE_BAD_SOCK;
	case ENOPROTOOPT:	return NLE_INVAL;
	case EFAULT:		return NLE_INVAL;
	case EACCES:		return NLE_NOACCESS;
	case EINVAL:		return NLE_INVAL;
	case ENOBUFS:		return NLE_NOMEM;
	case ENOMEM:		return NLE_NOMEM;
	case EAFNOSUPPORT:	return NLE_AF_NOSUPPORT;
	case EPROTONOSUPPORT:	return NLE_PROTO_MISMATCH;
	case EOPNOTSUPP:	return NLE_OPNOTSUPP;
	case EPERM:		return NLE_PERM;
	case EBUSY:		return NLE_BUSY;
	case ERANGE:		return NLE_RANGE;
	case ENODEV:		return NLE_NODEV;
	default:		return NLE_FAILURE;
	}
}

// Assembly:
movl %edi, %ecx
negl %ecx
cmovsl %edi, %ecx
pushq $0x3
popq %rax
leal -0x1(%rcx), %edx
cmpl $0x21, %edx
ja 0x5344
leaq 0x1f65(%rip), %rcx      # 0x729c
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
pushq $0xc
jmp 0x5396
addl $-0x58, %ecx
cmpl $0x11, %ecx
ja 0x5384
leaq 0x1fd1(%rip), %rdx      # 0x7324
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0x7
jmp 0x5396
pushq $0x5
jmp 0x5396
pushq $0x6
jmp 0x5396
pushq $0x2
jmp 0x5396
pushq $0x1c
jmp 0x5396
pushq $0x1b
jmp 0x5396
pushq $0x19
jmp 0x5396
pushq $0x4
jmp 0x5396
pushq $0x8
jmp 0x5396
pushq $0x1f
jmp 0x5396
pushq $0x1
popq %rax
retq
pushq $0xb
jmp 0x5396
pushq $0x1a
jmp 0x5396
pushq $0xa
jmp 0x5396
pushq $0x13
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl.c
// Function: genlmsg_validate
int genlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype,
		   struct nla_policy *policy)
{
	struct genlmsghdr *ghdr;

	if (!genlmsg_valid_hdr(nlh, hdrlen))
		return -NLE_MSG_TOOSHORT;

	ghdr = nlmsg_data(nlh);
	return nla_validate(genlmsg_attrdata(ghdr, hdrlen),
			    genlmsg_attrlen(ghdr, hdrlen), maxtype, policy);
}

// Assembly:
movl %esi, %eax
movl (%rdi), %esi
cmpl $0x14, %esi
jb 0x53fd
leal -0x14(%rsi), %r8d
addl $0x3, %eax
andl $-0x4, %eax
cmpl %eax, %r8d
jae 0x5401
pushq $-0x15
popq %rax
retq
movl %eax, %r8d
addq %r8, %rdi
addq $0x14, %rdi
subl %eax, %esi
addl $-0x14, %esi
jmp 0x3590
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_family.c
// Function: genl_family_add_op
int genl_family_add_op(struct genl_family *family, int id, int flags)
{
	struct genl_family_op *op;

	op = calloc(1, sizeof(*op));
	if (op == NULL)
		return -NLE_NOMEM;

	op->o_id = id;
	op->o_flags = flags;

	nl_list_add_tail(&op->o_list, &family->gf_ops);
	family->ce_mask |= FAMILY_ATTR_OPS;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x32a0
testq %rax, %rax
je 0x5506
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
movq %rax, %rcx
addq $0x8, %rcx
leaq 0x58(%rbx), %rdx
movq 0x60(%rbx), %rsi
movq %rcx, (%rsi)
movq %rsi, 0x10(%rax)
movq %rcx, 0x60(%rbx)
movq %rdx, 0x8(%rax)
orb $0x20, 0x30(%rbx)
xorl %eax, %eax
jmp 0x5509
pushq $-0x5
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_family.c
// Function: genl_family_add_grp
int genl_family_add_grp(struct genl_family *family, uint32_t id,
			const char *name)
{
	struct genl_family_grp *grp;

	grp = calloc(1, sizeof(*grp));
	if (grp == NULL)
		return -NLE_NOMEM;

	grp->id = id;
	strncpy(grp->name, name, GENL_NAMSIZ - 1);
	grp->name[GENL_NAMSIZ - 1] = '\0';

	nl_list_add_tail(&grp->list, &family->gf_mc_grps);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x32a0
testq %rax, %rax
je 0x5564
movq %rax, %r14
movl %ebp, 0x28(%rax)
leaq 0x18(%rax), %rdi
pushq $0xf
popq %rdx
movq %r15, %rsi
callq 0x30b0
movq %r14, %rax
addq $0x8, %rax
leaq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdx
movq %rax, (%rdx)
movq %rdx, 0x10(%r14)
movq %rax, 0x70(%rbx)
movq %rcx, 0x8(%r14)
xorl %eax, %eax
jmp 0x5567
pushq $-0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_family.c
// Function: family_free_data
static void family_free_data(struct nl_object *c)
{
	struct genl_family *family = (struct genl_family *) c;
	struct genl_family_op *ops, *tmp;
	struct genl_family_grp *grp, *t_grp;

	if (family == NULL)
		return;

	nl_list_for_each_entry_safe(ops, tmp, &family->gf_ops, o_list) {
		nl_list_del(&ops->o_list);
		free(ops);
	}

	nl_list_for_each_entry_safe(grp, t_grp, &family->gf_mc_grps, list) {
		nl_list_del(&grp->list);
		free(grp);
	}

}

// Assembly:
testq %rdi, %rdi
je 0x55ef
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
movq 0x58(%rdi), %rax
cmpq %r14, %rax
je 0x55c1
leaq -0x8(%rax), %rdi
movq (%rax), %r15
movq 0x8(%rax), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
callq 0x3070
movq %r15, %rax
jmp 0x55a0
movq 0x68(%rbx), %rax
addq $0x68, %rbx
cmpq %rbx, %rax
je 0x55ea
leaq -0x8(%rax), %rdi
movq (%rax), %r14
movq 0x8(%rax), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
callq 0x3070
movq %r14, %rax
jmp 0x55c9
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_family.c
// Function: family_clone
static int family_clone(struct nl_object *_dst, struct nl_object *_src)
{
	struct genl_family *dst = nl_object_priv(_dst);
	struct genl_family *src = nl_object_priv(_src);
	struct genl_family_op *ops;
	struct genl_family_grp *grp;
	int err;

	nl_list_for_each_entry(ops, &src->gf_ops, o_list) {
		err = genl_family_add_op(dst, ops->o_id, ops->o_flags);
		if (err < 0)
			return err;
	}

	nl_list_for_each_entry(grp, &src->gf_mc_grps, list) {
		err = genl_family_add_grp(dst, grp->id, grp->name);
		if (err < 0)
			return err;
	}

	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x58(%rsi), %r15
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x5626
movl -0x8(%r12), %esi
movl -0x4(%r12), %edx
movq %r14, %rdi
callq 0x3220
testl %eax, %eax
jns 0x5605
jmp 0x564d
addq $0x68, %rbx
movq %rbx, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0x564b
movl 0x20(%r15), %esi
leaq 0x10(%r15), %rdx
movq %r14, %rdi
callq 0x33a0
testl %eax, %eax
jns 0x562d
jmp 0x564d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_family.c
// Function: family_compare
static int family_compare(struct nl_object *_a, struct nl_object *_b,
			  uint32_t attrs, int flags)
{
	struct genl_family *a = (struct genl_family *) _a;
	struct genl_family *b = (struct genl_family *) _b;
	int diff = 0;

#define FAM_DIFF(ATTR, EXPR) ATTR_DIFF(attrs, FAMILY_ATTR_##ATTR, a, b, EXPR)

	diff |= FAM_DIFF(ID,		a->gf_id != b->gf_id);
	diff |= FAM_DIFF(VERSION,	a->gf_version != b->gf_version);
	diff |= FAM_DIFF(HDRSIZE,	a->gf_hdrsize != b->gf_hdrsize);
	diff |= FAM_DIFF(MAXATTR,	a->gf_maxattr != b->gf_maxattr);
	diff |= FAM_DIFF(NAME,		strcmp(a->gf_name, b->gf_name));

#undef FAM_DIFF

	return diff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebp, %ebp
movl $0x0, %r14d
testb $0x1, %dl
je 0x5686
movl 0x30(%rdi), %eax
andl 0x30(%rsi), %eax
testb $0x1, %al
je 0x5682
movzwl 0x34(%rdi), %eax
cmpw 0x34(%rsi), %ax
je 0x5686
pushq $0x1
popq %r14
testb $0x4, %dl
je 0x56a0
movl 0x30(%rdi), %eax
andl 0x30(%rsi), %eax
testb $0x4, %al
je 0x569d
movl 0x48(%rdi), %eax
cmpl 0x48(%rsi), %eax
je 0x56a0
pushq $0x4
popq %rbp
xorl %r15d, %r15d
movl $0x0, %ebx
testb $0x8, %dl
je 0x56c2
movl 0x30(%rdi), %eax
andl 0x30(%rsi), %eax
testb $0x8, %al
je 0x56bf
movl 0x4c(%rdi), %eax
cmpl 0x4c(%rsi), %eax
je 0x56c2
pushq $0x8
popq %rbx
testb $0x10, %dl
je 0x56dd
movl 0x30(%rdi), %eax
andl 0x30(%rsi), %eax
testb $0x10, %al
je 0x56d9
movl 0x50(%rdi), %eax
cmpl 0x50(%rsi), %eax
je 0x56dd
pushq $0x10
popq %r15
xorl %r12d, %r12d
testb $0x2, %dl
je 0x5704
movl 0x30(%rdi), %eax
andl 0x30(%rsi), %eax
testb $0x2, %al
je 0x5700
addq $0x36, %rdi
addq $0x36, %rsi
callq 0x32b0
testl %eax, %eax
je 0x5704
pushq $0x2
popq %r12
orl %r14d, %ebp
orl %r15d, %ebx
orl %ebp, %ebx
orl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_ctrl.c
// Function: genl_ctrl_search
struct genl_family *genl_ctrl_search(struct nl_cache *cache, int id)
{
	struct genl_family *fam;

	if (cache->c_ops != &genl_ctrl_ops)
		BUG();

	nl_list_for_each_entry(fam, &cache->c_items, ce_list) {
		if (fam->gf_id == id) {
			nl_object_get((struct nl_object *) fam);
			return fam;
		}
	}

	return NULL;
}

// Assembly:
pushq %rbx
leaq 0x5cc2(%rip), %rax      # 0xb3f8
cmpq %rax, 0x20(%rdi)
jne 0x575d
xorl %eax, %eax
movq %rdi, %rcx
movq (%rcx), %rcx
cmpq %rdi, %rcx
je 0x575b
movzwl 0x1c(%rcx), %edx
cmpl %esi, %edx
jne 0x5741
incl -0x18(%rcx)
addq $-0x18, %rcx
movq %rcx, %rax
popq %rbx
retq
movq 0x5894(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x18e3(%rip), %rsi      # 0x7051
leaq 0x1f48(%rip), %rbx      # 0x76bd
movq %rbx, %rdx
movl $0xcb, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x18dd(%rip), %rdi      # 0x7068
leaq 0x1f37(%rip), %rcx      # 0x76c9
movq %rbx, %rsi
movl $0xcb, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_ctrl.c
// Function: genl_ctrl_search_by_name
struct genl_family *genl_ctrl_search_by_name(struct nl_cache *cache,
					    const char *name)
{
	struct genl_family *fam;

	if (cache->c_ops != &genl_ctrl_ops)
		BUG();

	nl_list_for_each_entry(fam, &cache->c_items, ce_list) {
		if (!strcmp(name, fam->gf_name)) {
			nl_object_get((struct nl_object *) fam);
			return fam;
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5c4a(%rip), %rax      # 0xb3f8
cmpq %rax, 0x20(%rdi)
jne 0x57f4
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
movq %rdi, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x57e5
leaq 0x1e(%r12), %rsi
movq %r14, %rdi
callq 0x32b0
testl %eax, %eax
jne 0x57bf
incl -0x18(%r12)
addq $-0x18, %r12
movq %r12, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x57fd(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x184c(%rip), %rsi      # 0x7051
leaq 0x1eb1(%rip), %rbx      # 0x76bd
movq %rbx, %rdx
movl $0xee, %ecx
xorl %eax, %eax
callq 0x32c0
leaq 0x1846(%rip), %rdi      # 0x7068
leaq 0x1edd(%rip), %rcx      # 0x7706
movq %rbx, %rsi
movl $0xee, %edx
callq 0x3200
// File: /workspace/github_c_makefile_star2_O2/sabotage-linux[P]libnl-tiny/genl_ctrl.c
// Function: genl_ctrl_resolve
int genl_ctrl_resolve(struct nl_sock *sk, const char *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, name);
	if (family == NULL) {
		err = -NLE_OBJ_NOTFOUND;
		goto errout;
	}

	err = genl_family_get_id(family);
	genl_family_put(family);
errout:
	nl_cache_free(cache);

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rsp, %rsi
callq 0x31c0
testl %eax, %eax
js 0x5870
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x34d0
testq %rax, %rax
je 0x5874
xorl %ebx, %ebx
testb $0x1, 0x30(%rax)
je 0x5866
movzwl 0x34(%rax), %ebx
movq %rax, %rdi
callq 0x3110
jmp 0x5877
movl %eax, %ebx
jmp 0x5880
pushq $-0xc
popq %rbx
movq (%rsp), %rdi
callq 0x3050
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq