	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_save_ltr_state
_pci_save_ltr_state:                    ## @pci_save_ltr_state
	.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	_pci_is_pcie
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_PCI_EXT_CAP_ID_LTR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_pci_find_saved_ext_cap
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	(%rax), %edx
	movslq	%r14d, %r14
	movq	_PCI_LTR_MAX_SNOOP_LAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r14, %rsi
	leal	4(%rdx), %r15d
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_pci_read_config_word
	movq	_PCI_LTR_MAX_NOSNOOP_LAT@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_read_config_word           ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXT_CAP_ID_LTR,4,2         ## @PCI_EXT_CAP_ID_LTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no suspend buffer for LTR; ASPM issues possible after resume\n"

	.comm	_PCI_LTR_MAX_SNOOP_LAT,8,3      ## @PCI_LTR_MAX_SNOOP_LAT
	.comm	_PCI_LTR_MAX_NOSNOOP_LAT,8,3    ## @PCI_LTR_MAX_NOSNOOP_LAT
	.no_dead_strip	_pci_save_ltr_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_save_ltr_state
_pci_save_ltr_state:                    ; @pci_save_ltr_state
	.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	_pci_is_pcie
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x21, _PCI_EXT_CAP_ID_LTR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_EXT_CAP_ID_LTR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_find_ext_capability
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_find_saved_ext_cap
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w2, [x0]
	sxtw	x21, w20
Lloh2:
	adrp	x8, _PCI_LTR_MAX_SNOOP_LAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_LTR_MAX_SNOOP_LAT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x1, x8, x21
	add	w20, w2, #4
	mov	x0, x19
	bl	_pci_read_config_word
Lloh5:
	adrp	x8, _PCI_LTR_MAX_NOSNOOP_LAT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_LTR_MAX_NOSNOOP_LAT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x1, x8, x21
	mov	x0, x19
	mov	x2, x20
	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
	b	_pci_read_config_word
LBB0_4:
	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_5:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_pci_err
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXT_CAP_ID_LTR,4,2         ; @PCI_EXT_CAP_ID_LTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no suspend buffer for LTR; ASPM issues possible after resume\n"

	.comm	_PCI_LTR_MAX_SNOOP_LAT,8,3      ; @PCI_LTR_MAX_SNOOP_LAT
	.comm	_PCI_LTR_MAX_NOSNOOP_LAT,8,3    ; @PCI_LTR_MAX_NOSNOOP_LAT
	.no_dead_strip	_pci_save_ltr_state
.subsections_via_symbols
