	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_read_bridge_io
_pci_read_bridge_io:                    ## @pci_read_bridge_io
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r12
	movq	8(%r12), %r15
	testq	%r15, %r15
	jne	LBB0_1
## %bb.2:
	movq	_PCI_IO_RANGE_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PCI_IO_1K_RANGE_MASK@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_PCI_IO_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_byte
	movq	_PCI_IO_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_byte
	movq	-48(%rbp), %rax
	movq	%rax, %r13
	andq	%rbx, %r13
	andq	-80(%rbp), %rbx
	shlq	$8, %r13
	movq	_PCI_IO_RANGE_TYPE_MASK@GOTPCREL(%rip), %rdx
	andq	(%rdx), %rax
	shlq	$8, %rbx
	movq	_PCI_IO_RANGE_TYPE_32@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_PCI_IO_BASE_UPPER16@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movq	_PCI_IO_LIMIT_UPPER16@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movq	_PCI_IO_RANGE_TYPE_MASK@GOTPCREL(%rip), %rdx
	movq	-64(%rbp), %rax
	shlq	$16, %rax
	orq	%rax, %r13
	movq	-72(%rbp), %rax
	shlq	$16, %rax
	orq	%rax, %rbx
LBB0_5:
	cmpq	%rbx, %r13
	ja	LBB0_7
## %bb.6:
	movq	(%rdx), %rax
	andq	-48(%rbp), %rax
	movq	_IORESOURCE_IO@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	leaq	1023(%rbx), %rcx
	addq	$4095, %rbx                     ## imm = 0xFFF
	testq	%r15, %r15
	movq	%rax, (%r14)
	movq	%r13, -64(%rbp)
	cmovneq	%rcx, %rbx
	movq	%rbx, -56(%rbp)
	movl	(%r12), %edi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rsi
	callq	_pcibios_bus_to_resource
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_pci_info
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_IO_RANGE_MASK,8,3          ## @PCI_IO_RANGE_MASK
	.comm	_PCI_IO_1K_RANGE_MASK,8,3       ## @PCI_IO_1K_RANGE_MASK
	.comm	_PCI_IO_BASE,4,2                ## @PCI_IO_BASE
	.comm	_PCI_IO_LIMIT,4,2               ## @PCI_IO_LIMIT
	.comm	_PCI_IO_RANGE_TYPE_MASK,8,3     ## @PCI_IO_RANGE_TYPE_MASK
	.comm	_PCI_IO_RANGE_TYPE_32,8,3       ## @PCI_IO_RANGE_TYPE_32
	.comm	_PCI_IO_BASE_UPPER16,4,2        ## @PCI_IO_BASE_UPPER16
	.comm	_PCI_IO_LIMIT_UPPER16,4,2       ## @PCI_IO_LIMIT_UPPER16
	.comm	_IORESOURCE_IO,8,3              ## @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  bridge window %pR\n"

	.no_dead_strip	_pci_read_bridge_io
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_read_bridge_io
_pci_read_bridge_io:                    ; @pci_read_bridge_io
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	ldp	x8, x19, [x0]
	ldr	x21, [x19, #8]
Lloh0:
	adrp	x9, _PCI_IO_RANGE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_IO_RANGE_MASK@GOTPAGEOFF]
Lloh2:
	adrp	x10, _PCI_IO_1K_RANGE_MASK@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PCI_IO_1K_RANGE_MASK@GOTPAGEOFF]
	cmp	x21, #0
	csel	x9, x9, x10, eq
	ldr	x23, [x9]
	ldr	x20, [x8]
Lloh4:
	adrp	x8, _PCI_IO_BASE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_IO_BASE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x2, sp, #40
	mov	x0, x19
	bl	_pci_read_config_byte
Lloh7:
	adrp	x8, _PCI_IO_LIMIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_IO_LIMIT@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #32
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	x8, [sp, #40]
	and	x9, x8, x23
	lsl	x22, x9, #8
	ldr	x9, [sp, #32]
	and	x9, x9, x23
	lsl	x23, x9, #8
Lloh10:
	adrp	x24, _PCI_IO_RANGE_TYPE_MASK@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PCI_IO_RANGE_TYPE_MASK@GOTPAGEOFF]
	ldr	x9, [x24]
	and	x8, x9, x8
Lloh12:
	adrp	x9, _PCI_IO_RANGE_TYPE_32@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PCI_IO_RANGE_TYPE_32@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _PCI_IO_BASE_UPPER16@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_IO_BASE_UPPER16@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	_pci_read_config_word
Lloh18:
	adrp	x8, _PCI_IO_LIMIT_UPPER16@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_IO_LIMIT_UPPER16@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	x8, [sp, #16]
	orr	x22, x22, x8, lsl #16
	ldr	x8, [sp, #8]
	orr	x23, x23, x8, lsl #16
LBB0_2:
	cmp	x22, x23
	b.hi	LBB0_4
; %bb.3:
	ldr	x8, [sp, #40]
	ldr	x9, [x24]
Lloh21:
	adrp	x10, _IORESOURCE_IO@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IORESOURCE_IO@GOTPAGEOFF]
	and	x8, x9, x8
Lloh23:
	ldr	x9, [x10]
	orr	x8, x8, x9
	str	x8, [x20]
	mov	w8, #1023
	mov	w9, #4095
	cmp	x21, #0
	csel	x8, x9, x8, eq
	add	x8, x8, x23
	stp	x22, x8, [sp, #16]
	ldr	w0, [x19]
	add	x2, sp, #16
	mov	x1, x20
	bl	_pcibios_bus_to_resource
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_pci_info
LBB0_4:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_IO_RANGE_MASK,8,3          ; @PCI_IO_RANGE_MASK
	.comm	_PCI_IO_1K_RANGE_MASK,8,3       ; @PCI_IO_1K_RANGE_MASK
	.comm	_PCI_IO_BASE,4,2                ; @PCI_IO_BASE
	.comm	_PCI_IO_LIMIT,4,2               ; @PCI_IO_LIMIT
	.comm	_PCI_IO_RANGE_TYPE_MASK,8,3     ; @PCI_IO_RANGE_TYPE_MASK
	.comm	_PCI_IO_RANGE_TYPE_32,8,3       ; @PCI_IO_RANGE_TYPE_32
	.comm	_PCI_IO_BASE_UPPER16,4,2        ; @PCI_IO_BASE_UPPER16
	.comm	_PCI_IO_LIMIT_UPPER16,4,2       ; @PCI_IO_LIMIT_UPPER16
	.comm	_IORESOURCE_IO,8,3              ; @IORESOURCE_IO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  bridge window %pR\n"

	.no_dead_strip	_pci_read_bridge_io
.subsections_via_symbols
