	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_disable_acs_redir
_pci_disable_acs_redir:                 ## @pci_disable_acs_redir
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_disable_acs_redir_param@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.1:
	movq	%rsi, -40(%rbp)
	cmpb	$0, (%rsi)
	je	LBB0_13
## %bb.2:
	movq	%rdi, %rbx
	leaq	-40(%rbp), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	1(%rax), %rsi
	movq	%rsi, -40(%rbp)
	cmpb	$0, 1(%rax)
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_pci_dev_str_match
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1, %eax
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-40(%rbp), %rax
	movzbl	(%rax), %ecx
	cmpb	$59, %cl
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$44, %cl
	je	LBB0_8
	jmp	LBB0_13
LBB0_4:
	movq	(%r15), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_pr_info_once
	jmp	LBB0_13
LBB0_9:
	movq	%rbx, %rdi
	callq	_pci_dev_specific_disable_acs_redir
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:
	movq	_PCI_EXT_CAP_ID_ACS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_find_ext_capability
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movslq	%eax, %r14
	movq	_PCI_ACS_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	addq	%r14, %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_ACS_RR@GOTPCREL(%rip), %rax
	movq	_PCI_ACS_CR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_PCI_ACS_EC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	addq	(%r15), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pci_write_config_word
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_warn
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_disable_acs_redir_param,8,3    ## @disable_acs_redir_param
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI: Can't parse disable_acs_redir parameter: %s\n"

	.comm	_PCI_EXT_CAP_ID_ACS,4,2         ## @PCI_EXT_CAP_ID_ACS
L_.str.1:                               ## @.str.1
	.asciz	"cannot disable ACS redirect for this hardware as it does not have ACS capabilities\n"

	.comm	_PCI_ACS_CTRL,8,3               ## @PCI_ACS_CTRL
	.comm	_PCI_ACS_RR,4,2                 ## @PCI_ACS_RR
	.comm	_PCI_ACS_CR,4,2                 ## @PCI_ACS_CR
	.comm	_PCI_ACS_EC,4,2                 ## @PCI_ACS_EC
L_.str.2:                               ## @.str.2
	.asciz	"disabled ACS redirect\n"

	.no_dead_strip	_pci_disable_acs_redir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_disable_acs_redir
_pci_disable_acs_redir:                 ; @pci_disable_acs_redir
	.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
Lloh0:
	adrp	x20, _disable_acs_redir_param@GOTPAGE
Lloh1:
	ldr	x20, [x20, _disable_acs_redir_param@GOTPAGEOFF]
	ldr	x1, [x20]
	cbz	x1, LBB0_13
; %bb.1:
	str	x1, [sp, #8]
	ldrb	w8, [x1]
	cbz	w8, LBB0_13
; %bb.2:
	mov	x19, x0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, x8, #1
	str	x1, [sp, #8]
	ldrb	w8, [x8, #1]
	cbz	w8, LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_dev_str_match
	tbnz	w0, #31, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	ldrb	w9, [x8]
	cmp	w9, #59
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #44
	b.eq	LBB0_3
	b	LBB0_13
LBB0_8:
	ldr	x1, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info_once
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_pci_dev_specific_disable_acs_redir
	cbz	w0, LBB0_13
; %bb.10:
Lloh4:
	adrp	x8, _PCI_EXT_CAP_ID_ACS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_EXT_CAP_ID_ACS@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_find_ext_capability
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_12
; %bb.11:
	sxtw	x20, w0
Lloh7:
	adrp	x21, _PCI_ACS_CTRL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _PCI_ACS_CTRL@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x1, x8, x20
	add	x2, sp, #4
	mov	x0, x19
	bl	_pci_read_config_word
Lloh9:
	adrp	x8, _PCI_ACS_RR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_ACS_RR@GOTPAGEOFF]
Lloh11:
	adrp	x9, _PCI_ACS_CR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PCI_ACS_CR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _PCI_ACS_EC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PCI_ACS_EC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #4]
	bic	w2, w9, w8
	str	w2, [sp, #4]
	ldr	x8, [x21]
	add	x1, x8, x20
	mov	x0, x19
	bl	_pci_write_config_word
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	b	LBB0_13
LBB0_12:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_warn
LBB0_13:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_disable_acs_redir_param,8,3    ; @disable_acs_redir_param
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI: Can't parse disable_acs_redir parameter: %s\n"

	.comm	_PCI_EXT_CAP_ID_ACS,4,2         ; @PCI_EXT_CAP_ID_ACS
l_.str.1:                               ; @.str.1
	.asciz	"cannot disable ACS redirect for this hardware as it does not have ACS capabilities\n"

	.comm	_PCI_ACS_CTRL,8,3               ; @PCI_ACS_CTRL
	.comm	_PCI_ACS_RR,4,2                 ; @PCI_ACS_RR
	.comm	_PCI_ACS_CR,4,2                 ; @PCI_ACS_CR
	.comm	_PCI_ACS_EC,4,2                 ; @PCI_ACS_EC
l_.str.2:                               ; @.str.2
	.asciz	"disabled ACS redirect\n"

	.no_dead_strip	_pci_disable_acs_redir
.subsections_via_symbols
