	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_apm_config            ## -- Begin function iwl_pcie_apm_config
	.p2align	4, 0x90
_iwl_pcie_apm_config:                   ## @iwl_pcie_apm_config
	.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
	callq	_IWL_TRANS_GET_PCIE_TRANS
	movq	%rax, %r14
	movl	(%rax), %edi
	movq	_PCI_EXP_LNKCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_LNKCTL_ASPM_L1@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movq	_CSR_GIO_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CSR_GIO_REG_VAL_L0S_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, -28(%rbp)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_iwl_set_bit
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_iwl_clear_bit
LBB0_3:
	movq	_PCI_EXP_LNKCTL_ASPM_L0S@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	-28(%rbp), %eax
	sete	%cl
	movl	%ecx, (%rbx)
	movl	(%r14), %edi
	movq	_PCI_EXP_DEVCTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_DEVCTL2_LTR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-32(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	(%r15), %eax
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%rdx, %rcx
	cmoveq	%rsi, %rcx
	andl	-28(%rbp), %eax
	cmoveq	%rsi, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_IWL_DEBUG_POWER
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_LNKCTL,4,2             ## @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_ASPM_L1,4,2     ## @PCI_EXP_LNKCTL_ASPM_L1
	.comm	_CSR_GIO_REG,4,2                ## @CSR_GIO_REG
	.comm	_CSR_GIO_REG_VAL_L0S_ENABLED,4,2 ## @CSR_GIO_REG_VAL_L0S_ENABLED
	.comm	_PCI_EXP_LNKCTL_ASPM_L0S,4,2    ## @PCI_EXP_LNKCTL_ASPM_L0S
	.comm	_PCI_EXP_DEVCTL2,4,2            ## @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_LTR_EN,4,2     ## @PCI_EXP_DEVCTL2_LTR_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"L1 %sabled - LTR %sabled\n"

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

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_pcie_apm_config            ; -- Begin function iwl_pcie_apm_config
	.p2align	2
_iwl_pcie_apm_config:                   ; @iwl_pcie_apm_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _PCI_EXP_LNKCTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_EXP_LNKCTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x21, _PCI_EXP_LNKCTL_ASPM_L1@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PCI_EXP_LNKCTL_ASPM_L1@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CSR_GIO_REG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CSR_GIO_REG@GOTPAGEOFF]
	ldr	w10, [x21]
Lloh7:
	ldr	w1, [x9]
Lloh8:
	adrp	x9, _CSR_GIO_REG_VAL_L0S_ENABLED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CSR_GIO_REG_VAL_L0S_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x9]
	mov	x0, x19
	tst	w10, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_iwl_set_bit
	b	LBB0_3
LBB0_2:
	bl	_iwl_clear_bit
LBB0_3:
	ldr	w8, [sp, #12]
Lloh11:
	adrp	x9, _PCI_EXP_LNKCTL_ASPM_L0S@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PCI_EXP_LNKCTL_ASPM_L0S@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	str	w8, [x19]
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _PCI_EXP_DEVCTL2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_EXP_DEVCTL2@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_pcie_capability_read_word
	ldp	w8, w10, [sp, #8]
Lloh17:
	adrp	x9, _PCI_EXP_DEVCTL2_LTR_EN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PCI_EXP_DEVCTL2_LTR_EN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x11, l_.str.1@PAGE
Lloh21:
	add	x11, x11, l_.str.1@PAGEOFF
Lloh22:
	adrp	x12, l_.str.2@PAGE
Lloh23:
	add	x12, x12, l_.str.2@PAGEOFF
	ldr	w13, [x21]
	tst	w13, w10
	csel	x2, x12, x11, eq
	ands	w8, w9, w8
	str	w8, [x19, #4]
	csel	x3, x12, x11, eq
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_POWER
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_LNKCTL,4,2             ; @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_ASPM_L1,4,2     ; @PCI_EXP_LNKCTL_ASPM_L1
	.comm	_CSR_GIO_REG,4,2                ; @CSR_GIO_REG
	.comm	_CSR_GIO_REG_VAL_L0S_ENABLED,4,2 ; @CSR_GIO_REG_VAL_L0S_ENABLED
	.comm	_PCI_EXP_LNKCTL_ASPM_L0S,4,2    ; @PCI_EXP_LNKCTL_ASPM_L0S
	.comm	_PCI_EXP_DEVCTL2,4,2            ; @PCI_EXP_DEVCTL2
	.comm	_PCI_EXP_DEVCTL2_LTR_EN,4,2     ; @PCI_EXP_DEVCTL2_LTR_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"L1 %sabled - LTR %sabled\n"

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

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

.subsections_via_symbols
