	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_ndev_register           ## -- Begin function aq_nic_ndev_register
	.p2align	4, 0x90
_aq_nic_ndev_register:                  ## @aq_nic_ndev_register
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.4:
	movq	%rdi, %r12
	movl	28(%rdi), %edi
	leaq	32(%r12), %rsi
	callq	_hw_atl_utils_initfw
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_3
## %bb.5:
	leaq	24(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	32(%r12), %rax
	movl	28(%r12), %edi
	movq	8(%r12), %rcx
	movl	(%rcx), %esi
	callq	*(%rax)
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.6:
	movq	$0, (%r12)
	movq	%r12, %rdi
	callq	_aq_nic_get_cfg
	cmpq	$0, (%rax)
	je	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %r14
	movq	%r12, %rdi
	callq	_aq_nic_get_cfg
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_aq_vec_alloc
	movq	(%r12), %rbx
	movq	16(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movq	%rbx, (%r12)
	movq	%r12, %rdi
	callq	_aq_nic_get_cfg
	cmpq	(%rax), %rbx
	jb	LBB0_9
LBB0_7:
	movq	8(%r12), %rdi
	callq	_netif_carrier_off
	movq	8(%r12), %rdi
	callq	_netif_tx_disable
	movq	8(%r12), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_register_netdev                ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AQ_CFG_MAC_ADDR_PERMANENT,8,3  ## @AQ_CFG_MAC_ADDR_PERMANENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_nic_ndev_register           ; -- Begin function aq_nic_ndev_register
	.p2align	2
_aq_nic_ndev_register:                  ; @aq_nic_ndev_register
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #28]
	add	x1, x19, #32
	bl	_hw_atl_utils_initfw
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.2:
	add	x21, x19, #24
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w0, [x19, #28]
	ldr	x9, [x19, #8]
	ldr	w1, [x9]
	blr	x8
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w20, LBB0_9
; %bb.3:
	str	xzr, [x19]
	mov	x0, x19
	bl	_aq_nic_get_cfg
	ldr	x8, [x0]
	cbz	x8, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x19]
	mov	x0, x19
	bl	_aq_nic_get_cfg
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_aq_vec_alloc
	ldr	x9, [x19, #16]
	ldr	x8, [x19]
	str	w0, [x9, x8, lsl #2]
	cbz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x8, #1
	str	x20, [x19]
	mov	x0, x19
	bl	_aq_nic_get_cfg
	ldr	x8, [x0]
	cmp	x20, x8
	b.lo	LBB0_4
LBB0_6:
	ldr	x0, [x19, #8]
	bl	_netif_carrier_off
	ldr	x0, [x19, #8]
	bl	_netif_tx_disable
	ldr	x0, [x19, #8]
	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
	b	_register_netdev
LBB0_7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	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
LBB0_10:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AQ_CFG_MAC_ADDR_PERMANENT,8,3  ; @AQ_CFG_MAC_ADDR_PERMANENT
.subsections_via_symbols
