// File: /workspace/github_c_makefile_star2_O0/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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8d70
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x8b98
jmp 0x8b55
movq 0x549c(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x14db(%rip), %rsi      # 0xa041
leaq 0x1cbe(%rip), %rdx      # 0xa82b
movl $0x67, %ecx
movb $0x0, %al
callq 0x32e0
leaq 0x14d8(%rip), %rdi      # 0xa058
leaq 0x1ca4(%rip), %rsi      # 0xa82b
movl $0x67, %edx
leaq 0x1ca4(%rip), %rcx      # 0xa837
callq 0x3210
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rcx
cmpl 0x20(%rcx), %eax
jge 0x8bea
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x30(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x8bdd
jmp 0x8bf6
jmp 0x8bdf
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8b9f
movl $0xffffffea, -0x28(%rbp) # imm = 0xFFFFFFEA
jmp 0x8cd2
movq -0x38(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x8c0d
movl $0xfffffff6, -0x28(%rbp) # imm = 0xFFFFFFF6
jmp 0x8cd0
movq -0x38(%rbp), %rax
movl 0x10(%rax), %eax
incl %eax
movq %rsp, %rcx
movq %rcx, -0x40(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x80(%rbp)
movq %rcx, %rsp
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3260
movq -0x80(%rbp), %rdx
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
movq 0x20(%rax), %r8
callq 0x36c0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jge 0x8c98
movl $0x8, -0x74(%rbp)
jmp 0x8cbc
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq -0x70(%rbp), %rdx
callq *%rax
movl %eax, -0x28(%rbp)
movl $0x0, -0x74(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rsp
movl -0x74(%rbp), %eax
testl %eax, %eax
je 0x8cce
jmp 0x8ccc
jmp 0x8cd2
jmp 0x8cd0
jmp 0x8cd2
movl -0x28(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)