	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_abm_init
_nfp_abm_init:                          ## @nfp_abm_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rdi), %rbx
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	(%rbx), %rdx
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_14
## %bb.2:
	movq	%rdi, %r14
	cmpl	$0, 8(%rbx)
	je	LBB0_16
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %r15
	movq	%rax, (%r14)
	movq	%r14, 32(%rax)
	movq	%rax, %rdi
	callq	_nfp_abm_ctrl_find_addrs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movl	28(%r15), %edi
	movq	_NFP_NET_MAX_RX_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_array_size
	movl	%eax, 24(%r15)
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_bitmap_zalloc
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_12
## %bb.6:
	movl	24(%r15), %edi
	movl	(%r13), %edx
	movl	$1, %esi
	callq	_kvcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movl	24(%r15), %edi
	movl	(%r13), %edx
	movl	$1, %esi
	callq	_kvcalloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	%r15, %rdi
	callq	_nfp_abm_fw_init_reset
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_21
LBB0_9:
	movq	16(%r15), %rdi
	callq	_kvfree
LBB0_10:
	movq	8(%r15), %rdi
	callq	_kvfree
LBB0_11:
	movl	(%r15), %edi
	callq	_bitmap_free
LBB0_12:
	movq	%r15, %rdi
	callq	_kfree
	movq	$0, (%r14)
	jmp	LBB0_20
LBB0_13:
	movl	24(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_nfp_err
	jmp	LBB0_15
LBB0_14:
	movl	24(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_nfp_err
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_16:
	movl	16(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_nfp_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%r12d, %r12d
LBB0_19:
	subl	(%rax), %r12d
LBB0_20:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	xorl	%r12d, %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	(%rbx), %rdi
	callq	_nfp_reprs_alloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.22:
	movq	8(%r14), %rcx
	movq	_NFP_REPR_TYPE_PHYS_PORT@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rax, %rsi
	callq	_RCU_INIT_POINTER
	movq	(%rbx), %rdi
	callq	_nfp_reprs_alloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	8(%r14), %rcx
	movq	_NFP_REPR_TYPE_PF@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %edi
	movq	%rax, %rsi
	callq	_RCU_INIT_POINTER
	xorl	%r12d, %r12d
	jmp	LBB0_20
LBB0_24:
	movq	(%r13), %rsi
	movq	%r14, %rdi
	callq	_nfp_reprs_clean_and_free_by_type
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ABM NIC requires ETH table\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"ETH entries don't match vNICs (%d vs %d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"ABM NIC requires mac_stats symbol\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NFP_NET_MAX_RX_RINGS,4,2       ## @NFP_NET_MAX_RX_RINGS
	.comm	_NFP_REPR_TYPE_PHYS_PORT,8,3    ## @NFP_REPR_TYPE_PHYS_PORT
	.comm	_NFP_REPR_TYPE_PF,8,3           ## @NFP_REPR_TYPE_PF
	.no_dead_strip	_nfp_abm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_abm_init
_nfp_abm_init:                          ; @nfp_abm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x22, [x0, #24]
	ldr	x9, [x22, #16]
	cbz	x9, LBB0_13
; %bb.1:
	ldr	x8, [x22]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.2:
	mov	x19, x0
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_19
; %bb.3:
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_20
; %bb.4:
	mov	x21, x0
	str	x0, [x19]
	str	x19, [x0, #32]
	bl	_nfp_abm_ctrl_find_addrs
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.5:
Lloh2:
	adrp	x24, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ENOMEM@GOTPAGEOFF]
	ldr	w8, [x24]
	neg	w20, w8
	ldr	w0, [x21, #28]
Lloh4:
	adrp	x8, _NFP_NET_MAX_RX_RINGS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NFP_NET_MAX_RX_RINGS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_array_size
	str	w0, [x21, #24]
	ldr	w1, [x23]
	bl	_bitmap_zalloc
	str	w0, [x21]
	cbz	w0, LBB0_12
; %bb.6:
	ldr	w0, [x21, #24]
	ldr	w2, [x23]
	mov	w1, #1
	bl	_kvcalloc
	str	x0, [x21, #8]
	cbz	x0, LBB0_11
; %bb.7:
	ldr	w0, [x21, #24]
	ldr	w2, [x23]
	mov	w1, #1
	bl	_kvcalloc
	str	x0, [x21, #16]
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x21
	bl	_nfp_abm_fw_init_reset
	mov	x20, x0
	cbz	w0, LBB0_21
LBB0_9:
	ldr	x0, [x21, #16]
	bl	_kvfree
LBB0_10:
	ldr	x0, [x21, #8]
	bl	_kvfree
LBB0_11:
	ldr	w0, [x21]
	bl	_bitmap_free
LBB0_12:
	mov	x0, x21
	bl	_kfree
	str	xzr, [x19]
	b	LBB0_18
LBB0_13:
	ldr	w0, [x22, #24]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_14:
	ldr	w0, [x22, #24]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:
	bl	_nfp_err
LBB0_16:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_18:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_19:
	ldr	w0, [x19, #16]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_nfp_warn
	b	LBB0_16
LBB0_20:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_17
LBB0_21:
	ldr	w8, [x24]
	neg	w20, w8
	ldr	x0, [x22]
	bl	_nfp_reprs_alloc
	cbz	x0, LBB0_9
; %bb.22:
	mov	x1, x0
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x23, _NFP_REPR_TYPE_PHYS_PORT@GOTPAGE
Lloh18:
	ldr	x23, [x23, _NFP_REPR_TYPE_PHYS_PORT@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	w0, [x8, x9, lsl #2]
	bl	_RCU_INIT_POINTER
	ldr	x0, [x22]
	bl	_nfp_reprs_alloc
	cbz	x0, LBB0_24
; %bb.23:
	mov	x1, x0
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _NFP_REPR_TYPE_PF@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NFP_REPR_TYPE_PF@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_RCU_INIT_POINTER
	mov	w20, #0
	b	LBB0_18
LBB0_24:
	ldr	x1, [x23]
	mov	x0, x19
	bl	_nfp_reprs_clean_and_free_by_type
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ABM NIC requires ETH table\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"ETH entries don't match vNICs (%d vs %d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"ABM NIC requires mac_stats symbol\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NFP_NET_MAX_RX_RINGS,4,2       ; @NFP_NET_MAX_RX_RINGS
	.comm	_NFP_REPR_TYPE_PHYS_PORT,8,3    ; @NFP_REPR_TYPE_PHYS_PORT
	.comm	_NFP_REPR_TYPE_PF,8,3           ; @NFP_REPR_TYPE_PF
	.no_dead_strip	_nfp_abm_init
.subsections_via_symbols
