	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_net_xdp_setup_drv
_nfp_net_xdp_setup_drv:                 ## @nfp_net_xdp_setup_drv
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rbx
	callq	_xdp_attachment_flags_ok
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	testq	%rbx, %rbx
	sete	%al
	movl	24(%r15), %edi
	testl	%edi, %edi
	setne	%cl
	cmpb	%cl, %al
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rsi
	callq	_WRITE_ONCE
LBB0_13:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_xdp_attachment_setup
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movq	%r15, %rdi
	callq	_nfp_net_clone_dp
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rbx, 16(%rax)
	movl	16(%r15), %ecx
	movl	%ecx, %edx
	negl	%edx
	testq	%rbx, %rbx
	cmovnel	%ecx, %edx
	addl	%edx, 12(%rax)
	xorl	%ecx, %ecx
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.9:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rdx
	jmp	LBB0_10
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rdx
LBB0_10:
	movl	(%rdx), %edx
	movl	%edx, 8(%rax)
	je	LBB0_12
## %bb.11:
	movq	_XDP_PACKET_HEADROOM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	subq	8(%r15), %rcx
LBB0_12:
	movq	%rcx, (%rax)
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_nfp_net_ring_reconfig
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_XDP_PACKET_HEADROOM,8,3        ## @XDP_PACKET_HEADROOM
	.no_dead_strip	_nfp_net_xdp_setup_drv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_net_xdp_setup_drv
_nfp_net_xdp_setup_drv:                 ; @nfp_net_xdp_setup_drv
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x20, x0
	ldr	x21, [x1, #8]
	bl	_xdp_attachment_flags_ok
	cbz	w0, LBB0_4
; %bb.1:
	cmp	x21, #0
	cset	w8, eq
	ldr	w0, [x20, #24]
	cmp	w0, #0
	cset	w9, ne
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.2:
	mov	x1, x21
	bl	_WRITE_ONCE
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_xdp_attachment_setup
	mov	w0, #0
	b	LBB0_12
LBB0_4:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	x0, x20
	bl	_nfp_net_clone_dp
	cbz	x0, LBB0_8
; %bb.6:
	mov	x1, x0
	str	x21, [x0, #16]
	ldr	w8, [x20, #16]
	ldr	w9, [x0, #12]
Lloh2:
	adrp	x10, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh4:
	adrp	x11, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _DMA_FROM_DEVICE@GOTPAGEOFF]
	cmp	x21, #0
	csel	x10, x11, x10, eq
	cneg	w8, w8, eq
	add	w8, w9, w8
	str	w8, [x0, #12]
	ldr	w8, [x10]
	str	w8, [x0, #8]
	cbz	x21, LBB0_10
; %bb.7:
Lloh6:
	adrp	x8, _XDP_PACKET_HEADROOM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XDP_PACKET_HEADROOM@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	sub	x8, x8, x9
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	mov	x8, #0
LBB0_11:
	str	x8, [x1]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_nfp_net_ring_reconfig
	cbz	w0, LBB0_3
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_XDP_PACKET_HEADROOM,8,3        ; @XDP_PACKET_HEADROOM
	.no_dead_strip	_nfp_net_xdp_setup_drv
.subsections_via_symbols
