#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;

/* Variables and functions */
int /*<<< orphan*/ udp_open_packet_extended(
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
    int /*<<< orphan*/ *, int /*<<< orphan*/ *);
uint16_t udp_open_packet(uint8_t *src_out, uint16_t *src_port_out,
                         uint8_t *dst_out, uint16_t *dst_port_out,
                         uint8_t *payload_out, uint8_t *packet_in) {
  return udp_open_packet_extended(
      src_out, src_port_out, dst_out, dst_port_out, payload_out, packet_in,
      NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}


x86 assembly (clang, -O0):
<udp_open_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
xor    %eax,%eax
movq   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x38(%rsp)
movq   $0x0,0x40(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x50(%rsp)
call   1030 <udp_open_packet_extended@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udp_open_packet>:
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x40(%rsp)
movups %xmm0,0x30(%rsp)
movups %xmm0,0x20(%rsp)
movups %xmm0,0x10(%rsp)
movups %xmm0,(%rsp)
movq   $0x0,0x50(%rsp)
call   1030 <udp_open_packet_extended@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i32 @udp_open_packet(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32*, i32** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @udp_open_packet_extended(i32* %13, i32* %14, i32* %15, i32* %16, i32* %17, i32* %18, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null)
ret i32 %19
}

LLVM IR (-O2):
define i32 @udp_open_packet(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = tail call i32 @udp_open_packet_extended(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null, i32* null)
ret i32 %7
}