	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_apply_destination     ## -- Begin function iwl_pcie_apply_destination
	.p2align	4, 0x90
_iwl_pcie_apply_destination:            ## @iwl_pcie_apply_destination
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	callq	_iwl_trans_dbg_ini_valid
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$0, 16(%rbx)
	je	LBB0_26
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_DEBUG_FW
	movq	_MON_BUFF_BASE_ADDR_VER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movq	_MON_BUFF_SHIFT_VER2@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	callq	_iwl_write_umac_prph
	movq	_MON_BUFF_END_ADDR_VER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %eax
	leal	(%rcx,%rax), %edx
	addl	$-256, %edx
	movb	(%r14), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iwl_write_umac_prph            ## TAILCALL
LBB0_3:
	movq	(%r14), %rdi
	callq	_get_fw_dbg_mode_string
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_IWL_INFO
	movq	(%r14), %rax
	movq	_EXTERNAL_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_5
## %bb.4:
	movl	32(%r14), %esi
	movq	%rbx, %rdi
	callq	_iwl_pcie_alloc_fw_monitor
	cmpl	$0, (%rbx)
	jg	LBB0_7
	jmp	LBB0_20
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_WARN
	cmpl	$0, (%rbx)
	jle	LBB0_20
LBB0_7:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_iwl_write32
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r15
	movslq	(%rbx), %rax
	addq	$12, %r13
	cmpq	%rax, %r15
	jge	LBB0_20
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	24(%r12), %rax
	movl	8(%rax,%r13), %edi
	callq	_le32_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rax
	movl	4(%rax,%r13), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movq	24(%r12), %rax
	movl	(%rax,%r13), %edx
	leal	-128(%rdx), %eax
	cmpl	$6, %eax
	ja	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_iwl_set_bits_prph
	jmp	LBB0_19
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_IWL_ERR
	jmp	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_iwl_clear_bits_prph
	jmp	LBB0_19
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	_iwl_read_prph
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	callq	_BIT
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_19
	jmp	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_iwl_write_prph
	jmp	LBB0_19
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_iwl_set_bit
	jmp	LBB0_19
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r14d, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_iwl_clear_bit
	jmp	LBB0_19
LBB0_17:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_IWL_ERR
LBB0_20:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	movq	_EXTERNAL_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
## %bb.21:
	movq	8(%rbx), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_26
## %bb.22:
	movl	20(%r12), %edi
	callq	_le32_to_cpu
	movq	8(%rbx), %rcx
	movl	(%rcx), %edx
	movb	8(%r12), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_iwl_write_prph
	movq	32(%rbx), %rax
	movq	(%rax), %r15
	movq	_IWL_DEVICE_FAMILY_8000@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	16(%r12), %edi
	callq	_le32_to_cpu
	movq	8(%rbx), %rdx
	movl	(%rdx), %ecx
	movl	4(%rdx), %edx
	cmpq	%r14, %r15
	jge	LBB0_23
## %bb.25:
	addl	%ecx, %edx
	movb	12(%r12), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_24
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	addl	%ecx, %edx
	addl	$-256, %edx
	movb	12(%r12), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iwl_write_prph                 ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_16
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WRT: Applying DRAM buffer[0] destination\n"

	.comm	_MON_BUFF_BASE_ADDR_VER2,4,2    ## @MON_BUFF_BASE_ADDR_VER2
	.comm	_MON_BUFF_SHIFT_VER2,4,2        ## @MON_BUFF_SHIFT_VER2
	.comm	_MON_BUFF_END_ADDR_VER2,4,2     ## @MON_BUFF_END_ADDR_VER2
L_.str.1:                               ## @.str.1
	.asciz	"Applying debug destination %s\n"

	.comm	_EXTERNAL_MODE,8,3              ## @EXTERNAL_MODE
L_.str.2:                               ## @.str.2
	.asciz	"PCI should have external buffer debug\n"

L_.str.3:                               ## @.str.3
	.asciz	"BIT(%u) in address 0x%x is 1, stopping FW configuration\n"

L_.str.4:                               ## @.str.4
	.asciz	"FW debug - unknown OP %d\n"

	.comm	_IWL_DEVICE_FAMILY_8000,8,3     ## @IWL_DEVICE_FAMILY_8000
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_apply_destination     ; -- Begin function iwl_pcie_apply_destination
	.p2align	2
_iwl_pcie_apply_destination:            ; @iwl_pcie_apply_destination
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x24, [x0, #24]
	bl	_iwl_trans_dbg_ini_valid
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_24
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_FW
Lloh2:
	adrp	x8, _MON_BUFF_BASE_ADDR_VER2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MON_BUFF_BASE_ADDR_VER2@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh5:
	adrp	x20, _MON_BUFF_SHIFT_VER2@GOTPAGE
Lloh6:
	ldr	x20, [x20, _MON_BUFF_SHIFT_VER2@GOTPAGEOFF]
	ldr	w9, [x20]
	asr	w2, w8, w9
	mov	x0, x19
	bl	_iwl_write_umac_prph
Lloh7:
	adrp	x8, _MON_BUFF_END_ADDR_VER2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MON_BUFF_END_ADDR_VER2@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldp	w9, w8, [x8]
	add	w8, w9, w8
	sub	w8, w8, #256
	ldr	w9, [x20]
	asr	w2, w8, w9
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_iwl_write_umac_prph
LBB0_3:
	ldr	x0, [x24]
	bl	_get_fw_dbg_mode_string
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_INFO
	ldr	x8, [x24]
Lloh12:
	adrp	x25, _EXTERNAL_MODE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _EXTERNAL_MODE@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w1, [x24, #32]
	mov	x0, x19
	bl	_iwl_pcie_alloc_fw_monitor
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_WARN
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.7:
	mov	x26, #0
	mov	x27, #0
Lloh16:
	adrp	x20, l_.str.4@PAGE
Lloh17:
	add	x20, x20, l_.str.4@PAGEOFF
Lloh18:
	adrp	x28, lJTI0_0@PAGE
Lloh19:
	add	x28, x28, lJTI0_0@PAGEOFF
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_iwl_write32
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x19]
	add	x26, x26, #12
	cmp	x27, x8
	b.ge	LBB0_20
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #24]
	add	x8, x8, x26
	ldr	w0, [x8, #8]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	x8, [x24, #24]
	add	x8, x8, x26
	ldr	w0, [x8, #4]
	bl	_le32_to_cpu
	ldr	x8, [x24, #24]
	ldr	w2, [x8, x26]
	sub	w8, w2, #128
	cmp	w8, #6
	b.hi	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x22, x0
	adr	x9, LBB0_8
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_12:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_set_bits_prph
	b	LBB0_9
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_IWL_ERR
	b	LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_clear_bits_prph
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_read_prph
	mov	x23, x0
	mov	x0, x22
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_9
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_iwl_write_prph
	b	LBB0_9
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_set_bit
	b	LBB0_9
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_clear_bit
	b	LBB0_9
LBB0_19:
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_IWL_ERR
LBB0_20:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_24
; %bb.21:
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	cbz	w8, LBB0_24
; %bb.22:
	ldr	w0, [x24, #20]
	bl	_le32_to_cpu
	mov	x1, x0
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	w9, [x24, #8]
	asr	w2, w8, w9
	mov	x0, x19
	bl	_iwl_write_prph
	ldr	x8, [x19, #32]
	ldr	x20, [x8]
Lloh22:
	adrp	x8, _IWL_DEVICE_FAMILY_8000@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IWL_DEVICE_FAMILY_8000@GOTPAGEOFF]
Lloh24:
	ldr	x21, [x8]
	ldr	w0, [x24, #16]
	bl	_le32_to_cpu
	mov	x1, x0
	ldr	x9, [x19, #8]
	ldp	w8, w9, [x9]
	cmp	x20, x21
	b.ge	LBB0_25
; %bb.23:
	add	w8, w9, w8
	b	LBB0_26
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
	add	w8, w8, w9
	sub	w8, w8, #256
LBB0_26:
	ldr	w9, [x24, #12]
	asr	w2, w8, w9
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_iwl_write_prph
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_16-LBB0_8)>>2
	.byte	(LBB0_17-LBB0_8)>>2
	.byte	(LBB0_18-LBB0_8)>>2
	.byte	(LBB0_8-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WRT: Applying DRAM buffer[0] destination\n"

	.comm	_MON_BUFF_BASE_ADDR_VER2,4,2    ; @MON_BUFF_BASE_ADDR_VER2
	.comm	_MON_BUFF_SHIFT_VER2,4,2        ; @MON_BUFF_SHIFT_VER2
	.comm	_MON_BUFF_END_ADDR_VER2,4,2     ; @MON_BUFF_END_ADDR_VER2
l_.str.1:                               ; @.str.1
	.asciz	"Applying debug destination %s\n"

	.comm	_EXTERNAL_MODE,8,3              ; @EXTERNAL_MODE
l_.str.2:                               ; @.str.2
	.asciz	"PCI should have external buffer debug\n"

l_.str.3:                               ; @.str.3
	.asciz	"BIT(%u) in address 0x%x is 1, stopping FW configuration\n"

l_.str.4:                               ; @.str.4
	.asciz	"FW debug - unknown OP %d\n"

	.comm	_IWL_DEVICE_FAMILY_8000,8,3     ; @IWL_DEVICE_FAMILY_8000
.subsections_via_symbols
