	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_net_init                   ## -- Begin function nfp_net_init
	.p2align	4, 0x90
_nfp_net_init:                          ## @nfp_net_init
	.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	%rdi, %r15
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rdi)
	callq	_nfp_net_read_caps
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.1:
	leaq	16(%r15), %r14
	movq	%r15, %rdi
	callq	_nfp_net_is_data_vnic
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	(%r15), %rax
	movq	_NFP_NET_DEFAULT_MTU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_6
## %bb.5:
	movq	%rax, (%r14)
	jmp	LBB0_7
LBB0_6:
	movq	%rcx, (%r14)
	jmp	LBB0_7
LBB0_2:
	movq	64(%r15), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rsi
	callq	_min
	movq	%rax, 16(%r15)
LBB0_7:
	movq	%r14, %rdi
	callq	_nfp_net_calc_fl_bufsz
	movl	%eax, 40(%r15)
	movq	64(%r15), %rdi
	callq	_nfp_app_ctrl_uses_data_vnics
	movl	8(%r15), %ecx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_NFP_NET_CFG_CTRL_CMSG_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	orl	%eax, 24(%r15)
LBB0_9:
	movq	_NFP_NET_CFG_CTRL_RSS_ANY@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_13
## %bb.10:
	movq	%r15, %rdi
	callq	_nfp_net_rss_init
	movl	8(%r15), %ecx
	movq	_NFP_NET_CFG_CTRL_RSS2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	jne	LBB0_12
## %bb.11:
	movq	_NFP_NET_CFG_CTRL_RSS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	orl	%eax, 24(%r15)
LBB0_13:
	movq	_NFP_NET_CFG_CTRL_L2BC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_15
## %bb.14:
	orl	%eax, 24(%r15)
LBB0_15:
	movq	_NFP_NET_CFG_CTRL_IRQMOD@GOTPCREL(%rip), %rbx
	testl	%ecx, (%rbx)
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_nfp_net_irqmod_init
	movl	(%rbx), %eax
	orl	%eax, 24(%r15)
LBB0_17:
	movq	_NFP_QCP_QUEUE_ADDR_SZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	48(%r15), %rax
	movq	%rax, 56(%r15)
	movq	_NFP_NET_CFG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_nn_writel
	movq	_NFP_NET_CFG_TXRS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_nn_writeq
	movq	_NFP_NET_CFG_RXRS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_nn_writeq
	movq	_NFP_NET_CFG_UPDATE_RING@GOTPCREL(%rip), %rax
	movq	_NFP_NET_CFG_UPDATE_GEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nfp_net_reconfig
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_18
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpq	$0, 32(%r15)
	je	LBB0_21
## %bb.19:
	movq	%r15, %rdi
	callq	_nfp_net_netdev_init
	movq	%r15, %rdi
	callq	_nfp_ccm_mbox_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.20:
	movq	%r15, %rdi
	callq	_nfp_net_tls_init
	testl	%eax, %eax
	je	LBB0_21
## %bb.24:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_nfp_ccm_mbox_clean
	jmp	LBB0_25
LBB0_21:
	movq	%r15, %rdi
	callq	_nfp_net_vecs_init
	movq	32(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_register_netdev                ## TAILCALL
LBB0_22:
	xorl	%ebx, %ebx
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_NFP_NET_DEFAULT_MTU,8,3        ## @NFP_NET_DEFAULT_MTU
	.comm	_NFP_NET_CFG_CTRL_CMSG_DATA,4,2 ## @NFP_NET_CFG_CTRL_CMSG_DATA
	.comm	_NFP_NET_CFG_CTRL_RSS_ANY,4,2   ## @NFP_NET_CFG_CTRL_RSS_ANY
	.comm	_NFP_NET_CFG_CTRL_RSS2,4,2      ## @NFP_NET_CFG_CTRL_RSS2
	.comm	_NFP_NET_CFG_CTRL_RSS,4,2       ## @NFP_NET_CFG_CTRL_RSS
	.comm	_NFP_NET_CFG_CTRL_L2BC,4,2      ## @NFP_NET_CFG_CTRL_L2BC
	.comm	_NFP_NET_CFG_CTRL_IRQMOD,4,2    ## @NFP_NET_CFG_CTRL_IRQMOD
	.comm	_NFP_QCP_QUEUE_ADDR_SZ,8,3      ## @NFP_QCP_QUEUE_ADDR_SZ
	.comm	_NFP_NET_CFG_CTRL,4,2           ## @NFP_NET_CFG_CTRL
	.comm	_NFP_NET_CFG_TXRS_ENABLE,4,2    ## @NFP_NET_CFG_TXRS_ENABLE
	.comm	_NFP_NET_CFG_RXRS_ENABLE,4,2    ## @NFP_NET_CFG_RXRS_ENABLE
	.comm	_NFP_NET_CFG_UPDATE_RING,4,2    ## @NFP_NET_CFG_UPDATE_RING
	.comm	_NFP_NET_CFG_UPDATE_GEN,4,2     ## @NFP_NET_CFG_UPDATE_GEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nfp_net_init                   ; -- Begin function nfp_net_init
	.p2align	2
_nfp_net_init:                          ; @nfp_net_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #44]
	bl	_nfp_net_read_caps
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.1:
	add	x20, x19, #16
	mov	x0, x19
	bl	_nfp_net_is_data_vnic
	cbz	w0, LBB0_5
LBB0_2:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _NFP_NET_DEFAULT_MTU@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NFP_NET_DEFAULT_MTU@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.3:
	str	x8, [x20]
	b	LBB0_7
LBB0_4:
	str	x9, [x20]
	b	LBB0_7
LBB0_5:
	ldr	x8, [x19, #64]
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.6:
	ldr	x1, [x19]
	bl	_min
	str	x0, [x19, #16]
LBB0_7:
	mov	x0, x20
	bl	_nfp_net_calc_fl_bufsz
	str	w0, [x19, #40]
	ldr	x0, [x19, #64]
	bl	_nfp_app_ctrl_uses_data_vnics
	ldr	w8, [x19, #8]
	cbz	x0, LBB0_9
; %bb.8:
Lloh6:
	adrp	x9, _NFP_NET_CFG_CTRL_CMSG_DATA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NFP_NET_CFG_CTRL_CMSG_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
	ldr	w10, [x19, #24]
	orr	w9, w10, w9
	str	w9, [x19, #24]
LBB0_9:
Lloh9:
	adrp	x9, _NFP_NET_CFG_CTRL_RSS_ANY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NFP_NET_CFG_CTRL_RSS_ANY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_nfp_net_rss_init
	ldr	w8, [x19, #8]
Lloh12:
	adrp	x9, _NFP_NET_CFG_CTRL_RSS2@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NFP_NET_CFG_CTRL_RSS2@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _NFP_NET_CFG_CTRL_RSS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NFP_NET_CFG_CTRL_RSS@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	ands	w9, w9, w8
	csel	w9, w10, w9, eq
	ldr	w10, [x19, #24]
	orr	w9, w9, w10
	str	w9, [x19, #24]
LBB0_11:
Lloh18:
	adrp	x9, _NFP_NET_CFG_CTRL_L2BC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NFP_NET_CFG_CTRL_L2BC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	ldr	w10, [x19, #24]
	orr	w9, w10, w9
	str	w9, [x19, #24]
LBB0_13:
Lloh21:
	adrp	x20, _NFP_NET_CFG_CTRL_IRQMOD@GOTPAGE
Lloh22:
	ldr	x20, [x20, _NFP_NET_CFG_CTRL_IRQMOD@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_nfp_net_irqmod_init
	ldr	w8, [x20]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
LBB0_15:
	ldr	x8, [x19, #48]
Lloh23:
	adrp	x9, _NFP_QCP_QUEUE_ADDR_SZ@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NFP_QCP_QUEUE_ADDR_SZ@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19, #56]
Lloh26:
	adrp	x8, _NFP_NET_CFG_CTRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NFP_NET_CFG_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nn_writel
Lloh29:
	adrp	x8, _NFP_NET_CFG_TXRS_ENABLE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NFP_NET_CFG_TXRS_ENABLE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nn_writeq
Lloh32:
	adrp	x8, _NFP_NET_CFG_RXRS_ENABLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NFP_NET_CFG_RXRS_ENABLE@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_nn_writeq
Lloh35:
	adrp	x8, _NFP_NET_CFG_UPDATE_RING@GOTPAGE
Lloh36:
	ldr	x8, [x8, _NFP_NET_CFG_UPDATE_RING@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _NFP_NET_CFG_UPDATE_GEN@GOTPAGE
Lloh39:
	ldr	x9, [x9, _NFP_NET_CFG_UPDATE_GEN@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_nfp_net_reconfig
	mov	x20, x0
	cbz	w0, LBB0_17
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_21
; %bb.18:
	mov	x0, x19
	bl	_nfp_net_netdev_init
	mov	x0, x19
	bl	_nfp_ccm_mbox_init
	mov	x20, x0
	cbnz	w0, LBB0_16
; %bb.19:
	mov	x0, x19
	bl	_nfp_net_tls_init
	cbz	w0, LBB0_21
; %bb.20:
	mov	x20, x0
	mov	x0, x19
	bl	_nfp_ccm_mbox_clean
	b	LBB0_16
LBB0_21:
	mov	x0, x19
	bl	_nfp_net_vecs_init
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_23
; %bb.22:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_register_netdev
LBB0_23:
	mov	w20, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_NFP_NET_DEFAULT_MTU,8,3        ; @NFP_NET_DEFAULT_MTU
	.comm	_NFP_NET_CFG_CTRL_CMSG_DATA,4,2 ; @NFP_NET_CFG_CTRL_CMSG_DATA
	.comm	_NFP_NET_CFG_CTRL_RSS_ANY,4,2   ; @NFP_NET_CFG_CTRL_RSS_ANY
	.comm	_NFP_NET_CFG_CTRL_RSS2,4,2      ; @NFP_NET_CFG_CTRL_RSS2
	.comm	_NFP_NET_CFG_CTRL_RSS,4,2       ; @NFP_NET_CFG_CTRL_RSS
	.comm	_NFP_NET_CFG_CTRL_L2BC,4,2      ; @NFP_NET_CFG_CTRL_L2BC
	.comm	_NFP_NET_CFG_CTRL_IRQMOD,4,2    ; @NFP_NET_CFG_CTRL_IRQMOD
	.comm	_NFP_QCP_QUEUE_ADDR_SZ,8,3      ; @NFP_QCP_QUEUE_ADDR_SZ
	.comm	_NFP_NET_CFG_CTRL,4,2           ; @NFP_NET_CFG_CTRL
	.comm	_NFP_NET_CFG_TXRS_ENABLE,4,2    ; @NFP_NET_CFG_TXRS_ENABLE
	.comm	_NFP_NET_CFG_RXRS_ENABLE,4,2    ; @NFP_NET_CFG_RXRS_ENABLE
	.comm	_NFP_NET_CFG_UPDATE_RING,4,2    ; @NFP_NET_CFG_UPDATE_RING
	.comm	_NFP_NET_CFG_UPDATE_GEN,4,2     ; @NFP_NET_CFG_UPDATE_GEN
.subsections_via_symbols
