	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_nic_init             ## -- Begin function il3945_hw_nic_init
	.p2align	4, 0x90
_il3945_hw_nic_init:                    ## @il3945_hw_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	callq	_il3945_apm_init
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_il3945_set_pwr_vmain
	movq	%rbx, %rdi
	callq	_il3945_nic_config
	cmpl	$0, 12(%rbx)
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_il3945_rx_queue_reset
LBB0_4:
	movq	%rbx, %rdi
	callq	_il3945_rx_replenish
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_il3945_rx_init
	xorl	%edi, %edi
	callq	_FH39_RCSR_WPTR
	movl	8(%rbx), %edx
	andl	$-8, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_il_wr
	movq	%rbx, %rdi
	callq	_il3945_txq_ctx_reset
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_S_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	%rbx, %rdi
	callq	_il_rx_queue_alloc
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_IL_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to initialize Rx queue\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_S_INIT,4,2                     ## @S_INIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_nic_init             ; -- Begin function il3945_hw_nic_init
	.p2align	2
_il3945_hw_nic_init:                    ; @il3945_hw_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, x0
	add	x20, x0, #8
	add	x21, x0, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_il3945_apm_init
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_il3945_set_pwr_vmain
	mov	x0, x19
	bl	_il3945_nic_config
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_il3945_rx_queue_reset
LBB0_2:
	mov	x0, x19
	bl	_il3945_rx_replenish
	mov	x0, x19
	mov	x1, x20
	bl	_il3945_rx_init
	mov	w0, #0
	bl	_FH39_RCSR_WPTR
	mov	x1, x0
	ldr	w8, [x19, #8]
	and	w2, w8, #0xfffffff8
	mov	x0, x19
	bl	_il_wr
	mov	x0, x19
	bl	_il3945_txq_ctx_reset
	cbnz	w0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _S_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_il_rx_queue_alloc
	cbz	w0, LBB0_2
; %bb.5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IL_ERR
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to initialize Rx queue\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_S_INIT,4,2                     ; @S_INIT
.subsections_via_symbols
