	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_finish_nic_init            ## -- Begin function iwl_finish_nic_init
	.p2align	4, 0x90
_iwl_finish_nic_init:                   ## @iwl_finish_nic_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movl	$2, %edi
	callq	_mdelay
LBB0_2:
	movq	_CSR_GP_CNTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	16(%r15), %rax
	movl	4(%rax), %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_iwl_set_bit
	movq	(%r15), %rax
	movq	_IWL_DEVICE_FAMILY_8000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movl	$2, %edi
	callq	_udelay
LBB0_4:
	movl	(%r12), %r12d
	movq	16(%r15), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	16(%r15), %rax
	movl	(%rax), %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	movl	$25000, %r8d                    ## imm = 0x61A8
	callq	_iwl_poll_bit
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	cmpq	$0, 8(%r15)
	je	LBB0_8
LBB0_7:
	movl	$200, %edi
	callq	_udelay
LBB0_8:
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_IWL_DEBUG_INFO
	cmpq	$0, 8(%r15)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR_GP_CNTRL,4,2               ## @CSR_GP_CNTRL
	.comm	_IWL_DEVICE_FAMILY_8000,8,3     ## @IWL_DEVICE_FAMILY_8000
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to wake NIC\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_finish_nic_init            ; -- Begin function iwl_finish_nic_init
	.p2align	2
_iwl_finish_nic_init:                   ; @iwl_finish_nic_init
	.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	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #2
	bl	_mdelay
LBB0_2:
Lloh0:
	adrp	x22, _CSR_GP_CNTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CSR_GP_CNTRL@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_iwl_set_bit
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _IWL_DEVICE_FAMILY_8000@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IWL_DEVICE_FAMILY_8000@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #2
	bl	_udelay
LBB0_4:
	ldr	w21, [x22]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_BIT
	mov	x22, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_BIT
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	w4, #25000
	bl	_iwl_poll_bit
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
LBB0_6:
	mov	w0, #200
	bl	_udelay
LBB0_7:
	cmp	w21, #0
	csel	w0, w21, wzr, lt
	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_8:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_IWL_DEBUG_INFO
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR_GP_CNTRL,4,2               ; @CSR_GP_CNTRL
	.comm	_IWL_DEVICE_FAMILY_8000,8,3     ; @IWL_DEVICE_FAMILY_8000
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to wake NIC\n"

.subsections_via_symbols
