	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_hdr_set_and_get
_port_hdr_set_and_get:                  ## @port_hdr_set_and_get
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movq	(%r14), %rsi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_nmreq_hdr_init
	movq	_NETMAP_REQ_PORT_HDR_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	leaq	-32(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%r14), %rax
	movq	%rax, -32(%rbp)
	movl	16(%r14), %edi
	movq	_NIOCCTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	-32(%rbp), %rax
	movl	$-1, %ebx
	cmpq	8(%r14), %rax
	jne	LBB0_5
## %bb.3:
	movq	(%r14), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_printf
	movq	_NETMAP_REQ_PORT_HDR_GET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -32(%rbp)
	movl	16(%r14), %edi
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	jne	LBB0_1
## %bb.4:
	movq	-32(%rbp), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_printf
	movq	-32(%rbp), %rax
	xorl	%ebx, %ebx
	cmpq	8(%r14), %rax
	setne	%bl
	negl	%ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Testing NETMAP_REQ_PORT_HDR_SET on '%s'\n"

	.comm	_NETMAP_REQ_PORT_HDR_SET,4,2    ## @NETMAP_REQ_PORT_HDR_SET
	.comm	_NIOCCTRL,4,2                   ## @NIOCCTRL
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(/dev/netmap, NIOCCTRL, PORT_HDR_SET)"

L_.str.2:                               ## @.str.2
	.asciz	"Testing NETMAP_REQ_PORT_HDR_GET on '%s'\n"

	.comm	_NETMAP_REQ_PORT_HDR_GET,4,2    ## @NETMAP_REQ_PORT_HDR_GET
L_.str.3:                               ## @.str.3
	.asciz	"nr_hdr_len %u\n"

	.no_dead_strip	_port_hdr_set_and_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_hdr_set_and_get
_port_hdr_set_and_get:                  ; @port_hdr_set_and_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	x1, [x19]
	add	x0, sp, #8
	bl	_nmreq_hdr_init
Lloh2:
	adrp	x8, _NETMAP_REQ_PORT_HDR_SET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NETMAP_REQ_PORT_HDR_SET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x8, sp, #24
	str	x8, [sp, #8]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #8]
	str	x8, [sp, #24]
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x21, _NIOCCTRL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _NIOCCTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_ioctl
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x8, [sp, #24]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x1, [x19]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
Lloh9:
	adrp	x8, _NETMAP_REQ_PORT_HDR_GET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETMAP_REQ_PORT_HDR_GET@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	str	xzr, [sp, #24]
	ldr	w0, [x19, #16]
	ldr	w1, [x21]
	add	x2, sp, #8
	bl	_ioctl
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	x1, [sp, #24]
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	ldr	x8, [sp, #24]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	csetm	w20, ne
	b	LBB0_5
LBB0_4:
	mov	w20, #-1
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_5
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Testing NETMAP_REQ_PORT_HDR_SET on '%s'\n"

	.comm	_NETMAP_REQ_PORT_HDR_SET,4,2    ; @NETMAP_REQ_PORT_HDR_SET
	.comm	_NIOCCTRL,4,2                   ; @NIOCCTRL
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(/dev/netmap, NIOCCTRL, PORT_HDR_SET)"

l_.str.2:                               ; @.str.2
	.asciz	"Testing NETMAP_REQ_PORT_HDR_GET on '%s'\n"

	.comm	_NETMAP_REQ_PORT_HDR_GET,4,2    ; @NETMAP_REQ_PORT_HDR_GET
l_.str.3:                               ; @.str.3
	.asciz	"nr_hdr_len %u\n"

	.no_dead_strip	_port_hdr_set_and_get
.subsections_via_symbols
