#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
struct nfulnl_msg_config_cmd {
  int /*<<< orphan*/ command;
};
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ NFULA_CFG_CMD;
int /*<<< orphan*/ __nflog_sendcmd(int, int /*<<< orphan*/,
                                   struct nfulnl_msg_config_cmd *, int,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ memset(struct nfulnl_msg_config_cmd *, int /*<<< orphan*/,
                          int);
void nflog_sendcmd(int fd, uint8_t cmd, uint16_t family, uint16_t group_id) {
  struct nfulnl_msg_config_cmd msg;
  memset(&msg, 0, sizeof(msg));
  msg.command = cmd;
  __nflog_sendcmd(fd, NFULA_CFG_CMD, &msg, sizeof(msg), family, group_id);
}


x86 assembly (clang, -O0):
<nflog_sendcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    -0x18(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <__nflog_sendcmd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nflog_sendcmd>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0x8(%rsp),%r12
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %ebx,0x8(%rsp)
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    %r12,%rdx
mov    $0x4,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1030 <__nflog_sendcmd@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.nfulnl_msg_config_cmd = type { i32 }
@NFULA_CFG_CMD = global i32 0
define void @nflog_sendcmd(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.nfulnl_msg_config_cmd
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = call i32 @memset(%struct.nfulnl_msg_config_cmd* %9, i32 0, i32 4)
%11 = load i32, i32* %6
%12 = getelementptr inbounds %struct.nfulnl_msg_config_cmd, %struct.nfulnl_msg_config_cmd* %9, i32 0, i32 0
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* @NFULA_CFG_CMD
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @__nflog_sendcmd(i32 %13, i32 %14, %struct.nfulnl_msg_config_cmd* %9, i32 4, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.nfulnl_msg_config_cmd = type { i32 }
@NFULA_CFG_CMD = global i32 0
define void @nflog_sendcmd(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.nfulnl_msg_config_cmd
%6 = bitcast %struct.nfulnl_msg_config_cmd* %5 to i8*
%7 = call i32 @memset(%struct.nfulnl_msg_config_cmd* %5, i32 0, i32 4)
%8 = getelementptr inbounds %struct.nfulnl_msg_config_cmd, %struct.nfulnl_msg_config_cmd* %5, i64 0, i32 0
store i32 %1, i32* %8
%9 = load i32, i32* @NFULA_CFG_CMD
%10 = call i32 @__nflog_sendcmd(i32 %0, i32 %9, %struct.nfulnl_msg_config_cmd* %5, i32 4, i32 %2, i32 %3)
ret void
}