	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_pcie_load_given_ucode
_iwl_pcie_load_given_ucode:             ## @iwl_pcie_load_given_ucode
	.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	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, (%rsi)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_IWL_DEBUG_FW
	leaq	-28(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_iwl_pcie_load_cpu_sections
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.2:
	movq	_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LMPM_SECURE_CPU2_HDR_MEM_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_iwl_write_prph
	leaq	-28(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_iwl_pcie_load_cpu_sections
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
LBB0_3:
	movq	_iwlwifi_mod_params@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.4:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	_IWL_DEVICE_FAMILY_7000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_iwl_pcie_alloc_fw_monitor
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.6:
	movq	_MON_BUFF_BASE_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	4(%rax), %edx
	sarl	$4, %edx
	movq	%r14, %rdi
	callq	_iwl_write_prph
	movq	_MON_BUFF_END_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rax
	movl	(%rax), %edx
	addl	4(%rax), %edx
	sarl	$4, %edx
	movq	%r14, %rdi
	callq	_iwl_write_prph
	jmp	LBB0_9
LBB0_7:
	movq	%r14, %rdi
	callq	_iwl_pcie_dbg_on
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_iwl_pcie_apply_destination
LBB0_9:
	movq	%r14, %rdi
	callq	_iwl_enable_interrupts
	movq	_CSR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_iwl_write32
LBB0_10:
	movl	%ebx, %eax
	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	"working with %s CPU\n"

L_.str.1:                               ## @.str.1
	.asciz	"Dual"

L_.str.2:                               ## @.str.2
	.asciz	"Single"

	.comm	_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR,4,2 ## @LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR
	.comm	_LMPM_SECURE_CPU2_HDR_MEM_SPACE,4,2 ## @LMPM_SECURE_CPU2_HDR_MEM_SPACE
	.comm	_iwlwifi_mod_params,8,3         ## @iwlwifi_mod_params
	.comm	_IWL_DEVICE_FAMILY_7000,8,3     ## @IWL_DEVICE_FAMILY_7000
	.comm	_MON_BUFF_BASE_ADDR,4,2         ## @MON_BUFF_BASE_ADDR
	.comm	_MON_BUFF_END_ADDR,4,2          ## @MON_BUFF_END_ADDR
	.comm	_CSR_RESET,4,2                  ## @CSR_RESET
	.no_dead_strip	_iwl_pcie_load_given_ucode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_pcie_load_given_ucode
_iwl_pcie_load_given_ucode:             ; @iwl_pcie_load_given_ucode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x2, x10, x9, eq
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_IWL_DEBUG_FW
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_iwl_pcie_load_cpu_sections
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _LMPM_SECURE_CPU2_HDR_MEM_SPACE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LMPM_SECURE_CPU2_HDR_MEM_SPACE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_iwl_write_prph
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	w2, #2
	bl	_iwl_pcie_load_cpu_sections
	cbnz	w0, LBB0_10
LBB0_3:
Lloh12:
	adrp	x8, _iwlwifi_mod_params@GOTPAGE
Lloh13:
	ldr	x8, [x8, _iwlwifi_mod_params@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _IWL_DEVICE_FAMILY_7000@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IWL_DEVICE_FAMILY_7000@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_iwl_pcie_alloc_fw_monitor
	ldr	x8, [x19]
	ldr	w9, [x8]
	cbz	w9, LBB0_9
; %bb.6:
Lloh18:
	adrp	x9, _MON_BUFF_BASE_ADDR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MON_BUFF_BASE_ADDR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x9]
	ldr	w8, [x8, #4]
	asr	w2, w8, #4
	mov	x0, x19
	bl	_iwl_write_prph
Lloh21:
	adrp	x8, _MON_BUFF_END_ADDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MON_BUFF_END_ADDR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldp	w8, w9, [x8]
	add	w8, w8, w9
	asr	w2, w8, #4
	mov	x0, x19
	bl	_iwl_write_prph
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_iwl_pcie_dbg_on
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_iwl_pcie_apply_destination
LBB0_9:
	mov	x0, x19
	bl	_iwl_enable_interrupts
Lloh24:
	adrp	x8, _CSR_RESET@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CSR_RESET@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_iwl_write32
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"working with %s CPU\n"

l_.str.1:                               ; @.str.1
	.asciz	"Dual"

l_.str.2:                               ; @.str.2
	.asciz	"Single"

	.comm	_LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR,4,2 ; @LMPM_SECURE_UCODE_LOAD_CPU2_HDR_ADDR
	.comm	_LMPM_SECURE_CPU2_HDR_MEM_SPACE,4,2 ; @LMPM_SECURE_CPU2_HDR_MEM_SPACE
	.comm	_iwlwifi_mod_params,8,3         ; @iwlwifi_mod_params
	.comm	_IWL_DEVICE_FAMILY_7000,8,3     ; @IWL_DEVICE_FAMILY_7000
	.comm	_MON_BUFF_BASE_ADDR,4,2         ; @MON_BUFF_BASE_ADDR
	.comm	_MON_BUFF_END_ADDR,4,2          ; @MON_BUFF_END_ADDR
	.comm	_CSR_RESET,4,2                  ; @CSR_RESET
	.no_dead_strip	_iwl_pcie_load_given_ucode
.subsections_via_symbols
