	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_read_bridge_mmio
_pci_read_bridge_mmio:                  ## @pci_read_bridge_mmio
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rbx
	movq	(%rdi), %rax
	movq	8(%rax), %r14
	movq	_PCI_MEMORY_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_MEMORY_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movslq	-24(%rbp), %rax
	movq	_PCI_MEMORY_RANGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movslq	-20(%rbp), %rcx
	andq	%rdx, %rcx
	andq	%rax, %rdx
	shlq	$16, %rdx
	shlq	$16, %rcx
	cmpq	%rcx, %rdx
	ja	LBB0_2
## %bb.1:
	movq	_PCI_MEMORY_RANGE_TYPE_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %eax
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	movl	%eax, (%r14)
	movq	%rdx, -40(%rbp)
	addq	$1048575, %rcx                  ## imm = 0xFFFFF
	movq	%rcx, -32(%rbp)
	movl	(%rbx), %edi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rsi
	callq	_pcibios_bus_to_resource
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_pci_info
LBB0_2:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_MEMORY_BASE,4,2            ## @PCI_MEMORY_BASE
	.comm	_PCI_MEMORY_LIMIT,4,2           ## @PCI_MEMORY_LIMIT
	.comm	_PCI_MEMORY_RANGE_MASK,8,3      ## @PCI_MEMORY_RANGE_MASK
	.comm	_PCI_MEMORY_RANGE_TYPE_MASK,4,2 ## @PCI_MEMORY_RANGE_TYPE_MASK
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"  bridge window %pR\n"

	.no_dead_strip	_pci_read_bridge_mmio
.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_mmio
_pci_read_bridge_mmio:                  ; @pci_read_bridge_mmio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	ldp	x8, x19, [x0]
	ldr	x20, [x8, #8]
Lloh0:
	adrp	x8, _PCI_MEMORY_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_MEMORY_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #20
	mov	x0, x19
	bl	_pci_read_config_word
Lloh3:
	adrp	x8, _PCI_MEMORY_LIMIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_MEMORY_LIMIT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x19
	bl	_pci_read_config_word
	ldursw	x10, [x29, #-20]
Lloh6:
	adrp	x8, _PCI_MEMORY_RANGE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_MEMORY_RANGE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x8]
	and	x8, x9, x10
	lsl	x8, x8, #16
	ldrsw	x11, [sp, #24]
	and	x9, x9, x11
	lsl	x9, x9, #16
	cmp	x8, x9
	b.hi	LBB0_2
; %bb.1:
Lloh9:
	adrp	x11, _PCI_MEMORY_RANGE_TYPE_MASK@GOTPAGE
Lloh10:
	ldr	x11, [x11, _PCI_MEMORY_RANGE_TYPE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	and	w10, w11, w10
Lloh12:
	adrp	x11, _IORESOURCE_MEM@GOTPAGE
Lloh13:
	ldr	x11, [x11, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	orr	w10, w10, w11
	str	w10, [x20]
	mov	w10, #1048575
	add	x9, x9, x10
	stp	x8, x9, [sp, #8]
	ldr	w0, [x19]
	add	x2, sp, #8
	mov	x1, x20
	bl	_pcibios_bus_to_resource
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_pci_info
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_MEMORY_BASE,4,2            ; @PCI_MEMORY_BASE
	.comm	_PCI_MEMORY_LIMIT,4,2           ; @PCI_MEMORY_LIMIT
	.comm	_PCI_MEMORY_RANGE_MASK,8,3      ; @PCI_MEMORY_RANGE_MASK
	.comm	_PCI_MEMORY_RANGE_TYPE_MASK,4,2 ; @PCI_MEMORY_RANGE_TYPE_MASK
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"  bridge window %pR\n"

	.no_dead_strip	_pci_read_bridge_mmio
.subsections_via_symbols
