	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_gen2_nic_init
_iwl_pcie_gen2_nic_init:                ## @iwl_pcie_gen2_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	%rdi, %r12
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IWL_CMD_QUEUE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rax
	movl	(%rax), %edx
	callq	_max_t
	movl	%eax, %r15d
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	%r12, %rdi
	callq	_iwl_pcie_gen2_apm_init
	movq	%rbx, %rdi
	callq	_spin_unlock
	movl	(%r12), %edi
	callq	_iwl_op_mode_nic_config
	movq	%r12, %rdi
	callq	_iwl_pcie_gen2_rx_init
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_iwl_pcie_gen2_tx_init
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_CSR_MAC_SHADOW_REG_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$-2146435073, %edx              ## imm = 0x800FFFFF
	callq	_iwl_set_bit
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_DEBUG_INFO
	xorl	%eax, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_u32,4,2                        ## @u32
	.comm	_IWL_CMD_QUEUE_SIZE,4,2         ## @IWL_CMD_QUEUE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CSR_MAC_SHADOW_REG_CTRL,4,2    ## @CSR_MAC_SHADOW_REG_CTRL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling shadow registers in device\n"

	.no_dead_strip	_iwl_pcie_gen2_nic_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_gen2_nic_init
_iwl_pcie_gen2_nic_init:                ; @iwl_pcie_gen2_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
	bl	_IWL_TRANS_GET_PCIE_TRANS
	mov	x20, x0
Lloh0:
	adrp	x8, _u32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _IWL_CMD_QUEUE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IWL_CMD_QUEUE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	bl	_max_t
	mov	x21, x0
	add	x22, x20, #4
	mov	x0, x22
	bl	_spin_lock
	mov	x0, x19
	bl	_iwl_pcie_gen2_apm_init
	mov	x0, x22
	bl	_spin_unlock
	ldr	w0, [x19]
	bl	_iwl_op_mode_nic_config
	mov	x0, x19
	bl	_iwl_pcie_gen2_rx_init
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	bl	_iwl_pcie_gen2_tx_init
	cbz	x0, LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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_4:
Lloh9:
	adrp	x8, _CSR_MAC_SHADOW_REG_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CSR_MAC_SHADOW_REG_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-2146435073
	bl	_iwl_set_bit
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_INFO
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_u32,4,2                        ; @u32
	.comm	_IWL_CMD_QUEUE_SIZE,4,2         ; @IWL_CMD_QUEUE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CSR_MAC_SHADOW_REG_CTRL,4,2    ; @CSR_MAC_SHADOW_REG_CTRL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling shadow registers in device\n"

	.no_dead_strip	_iwl_pcie_gen2_nic_init
.subsections_via_symbols
