	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_scan_bridge_extend
_pci_scan_bridge_extend:                ## @pci_scan_bridge_extend
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, -132(%rbp)                ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	_PCI_HEADER_TYPE_CARDBUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	8(%rsi), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_pm_runtime_get_sync
	movq	_PCI_PRIMARY_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_pci_read_config_dword
	movl	-48(%rbp), %eax
	movl	%eax, %r15d
	shrl	$8, %r15d
	movzbl	%r15b, %edx
	movl	%eax, %r14d
	shrl	$16, %r14d
	movzbl	%r14b, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, -128(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movl	%eax, %r13d
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	movl	%r12d, %r8d
	callq	_pci_dbg
	andl	$255, %r13d
	jne	LBB0_5
## %bb.1:
	xorl	%r13d, %r13d
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$0, -96(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.3:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_pci_warn
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
LBB0_5:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movl	%ebx, -100(%rbp)                ## 4-byte Spill
	je	LBB0_7
## %bb.6:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-128(%rbp), %r12                ## 8-byte Reload
	jmp	LBB0_12
LBB0_7:
	movl	-96(%rbp), %edx                 ## 4-byte Reload
	cmpl	%ebx, %edx
	movq	-128(%rbp), %r12                ## 8-byte Reload
	ja	LBB0_11
## %bb.8:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jne	LBB0_11
## %bb.9:
	cmpl	%eax, %edx
	jbe	LBB0_11
## %bb.10:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_pci_info
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_12:
	movq	_PCI_BRIDGE_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	movl	(%rbx), %esi
	movq	_PCI_BRIDGE_CTL_MASTER_ABORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-52(%rbp), %edx
	movq	%r12, %rdi
	callq	_pci_write_config_word
	movq	%r12, %rdi
	callq	_pci_enable_crs
	orb	%r14b, %r15b
	je	LBB0_14
## %bb.13:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -120(%rbp)                ## 8-byte Folded Reload
	sete	%bl
	xorl	%eax, %eax
	callq	_pcibios_assign_all_busses
	testq	%rax, %rax
	setne	%al
	orb	%bl, %al
	orb	-44(%rbp), %al                  ## 1-byte Folded Reload
	je	LBB0_31
LBB0_14:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_33
## %bb.15:
	movq	_PCI_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_pci_write_config_word
	leaq	-140(%rbp), %rsi
	leaq	-136(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_ea_fixed_busnrs
	movl	%eax, %ecx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %r15d
	movl	%r15d, %r13d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.16:
	movl	-140(%rbp), %r13d
LBB0_17:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_pci_domain_nr
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_pci_find_bus
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_20
## %bb.18:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	callq	_pci_add_new_bus
	testq	%rax, %rax
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_57
## %bb.19:
	movq	%rax, %r14
	movl	24(%rbx), %edx
	movq	%rax, %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_bus_insert_busn_res
LBB0_20:
	movzbl	-45(%rbp), %eax
	shll	$24, %eax
	orl	4(%r14), %eax
	movl	24(%r14), %edx
	movl	32(%r14), %ecx
	shll	$8, %ecx
	orl	%eax, %ecx
	shll	$16, %edx
	orl	%ecx, %edx
	movl	%edx, -48(%rbp)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_36
## %bb.21:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	andl	$16777215, %edx                 ## imm = 0xFFFFFF
	movq	_CARDBUS_LATENCY_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$24, %eax
	orl	%edx, %eax
	movl	%eax, -48(%rbp)
	movq	_PCI_PRIMARY_BUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_pci_write_config_dword
	movq	_CARDBUS_RESERVE_BUSNR@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_43
## %bb.22:
	leaq	16(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_25 Depth=1
	testl	%r13d, %r13d
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_44
LBB0_24:                                ##   in Loop: Header=BB0_25 Depth=1
	incl	%r13d
	movq	_CARDBUS_RESERVE_BUSNR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_45
LBB0_25:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_29 Depth 2
	movq	%rbx, %rdi
	callq	_pci_domain_nr
	leal	(%r15,%r13), %esi
	incl	%esi
	movl	%eax, %edi
	callq	_pci_find_bus
	testq	%rax, %rax
	jne	LBB0_45
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	leal	(%r15,%r13), %r14d
	xorl	%r13d, %r13d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=2
	movq	(%r12), %rbx
	leaq	16(%rbx), %r12
	cmpq	$0, 16(%rbx)
	je	LBB0_23
LBB0_29:                                ##   Parent Loop BB0_25 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_pcibios_assign_all_busses
	testq	%rax, %rax
	jne	LBB0_28
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=2
	movl	24(%rbx), %eax
	cmpl	%r14d, %eax
	movl	$1, %ecx
	cmoval	%r13d, %ecx
	cmpl	%r15d, %eax
	cmoval	%ecx, %r13d
	jmp	LBB0_28
LBB0_31:
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_37
LBB0_56:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_57
LBB0_33:
	xorl	%eax, %eax
	callq	_pcibios_assign_all_busses
	testq	%rax, %rax
	setne	%al
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	orb	%al, %cl
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_35
## %bb.34:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_57
LBB0_35:
	movq	_PCI_PRIMARY_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	-45(%rbp), %edx
	shll	$24, %edx
	movq	%r12, %rdi
	callq	_pci_write_config_dword
	jmp	LBB0_57
LBB0_36:
	xorl	%eax, %eax
	movl	-132(%rbp), %r15d               ## 4-byte Reload
	subl	$1, %r15d
	cmovbl	%eax, %r15d
	movq	_PCI_PRIMARY_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_pci_write_config_dword
	movl	-52(%rbp), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_pci_scan_child_bus_extend
	movl	%eax, %r13d
	movq	%r14, %r15
	jmp	LBB0_46
LBB0_37:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_pci_domain_nr
	movl	%eax, %edi
	movl	-96(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_pci_find_bus
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_40
## %bb.38:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_pci_add_new_bus
	testq	%rax, %rax
	je	LBB0_56
## %bb.39:
	movq	%rax, %r15
	movl	%r13d, 4(%rax)
	movq	%rax, %rdi
	movl	%r14d, %esi
	movl	-100(%rbp), %edx                ## 4-byte Reload
	callq	_pci_bus_insert_busn_res
	movl	-52(%rbp), %eax
	movl	%eax, 8(%r15)
LBB0_40:
	movq	%r15, %rdi
	callq	_pci_scan_child_bus
	movl	-100(%rbp), %r14d               ## 4-byte Reload
	cmpl	%r14d, %eax
	jbe	LBB0_42
## %bb.41:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_pci_warn
LBB0_42:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	%eax, %r14d
	cmoval	%r14d, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_49
LBB0_43:
	xorl	%r13d, %r13d
	jmp	LBB0_45
LBB0_44:
	shrl	%r13d
LBB0_45:
	addl	%r15d, %r13d
	movq	-96(%rbp), %r15                 ## 8-byte Reload
LBB0_46:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_48
## %bb.47:
	movl	-136(%rbp), %r13d
LBB0_48:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_pci_bus_update_busn_res_end
	movq	_PCI_SUBORDINATE_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edx
	callq	_pci_write_config_byte
LBB0_49:
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -120(%rbp)                ## 8-byte Folded Reload
	movl	40(%r15), %r13d
	leaq	L_.str.4(%rip), %rax
	movq	%r15, %r14
	leaq	L_.str.5(%rip), %r15
	cmoveq	%rax, %r15
	movq	%rbx, %rdi
	callq	_pci_domain_nr
	movl	(%r14), %ecx
	movl	%r13d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_sprintf
	leaq	24(%r14), %rdx
	.p2align	4, 0x90
LBB0_50:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_56
## %bb.51:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	(%rdx), %ecx
	movl	24(%rbx), %esi
	cmpl	%esi, %ecx
	ja	LBB0_55
## %bb.52:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	(%r14), %edi
	cmpl	%esi, %edi
	ja	LBB0_55
## %bb.53:                              ##   in Loop: Header=BB0_50 Depth=1
	movl	(%rbx), %esi
	cmpl	%esi, %edi
	jb	LBB0_55
## %bb.54:                              ##   in Loop: Header=BB0_50 Depth=1
	movq	%rax, %rbx
	cmpl	%esi, %ecx
	jae	LBB0_50
LBB0_55:
	leaq	L_.str.6(%rip), %rsi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_dev_info
LBB0_57:
	movq	_PCI_BRIDGE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %edx
	movq	%r12, %rdi
	callq	_pci_write_config_word
	movq	%r13, %rdi
	callq	_pm_runtime_put
	movq	-72(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_HEADER_TYPE_CARDBUS,8,3    ## @PCI_HEADER_TYPE_CARDBUS
	.comm	_PCI_PRIMARY_BUS,4,2            ## @PCI_PRIMARY_BUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scanning [bus %02x-%02x] behind bridge, pass %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Primary bus is hard wired to 0\n"

L_.str.2:                               ## @.str.2
	.asciz	"bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n"

	.comm	_PCI_BRIDGE_CONTROL,4,2         ## @PCI_BRIDGE_CONTROL
	.comm	_PCI_BRIDGE_CTL_MASTER_ABORT,4,2 ## @PCI_BRIDGE_CTL_MASTER_ABORT
L_.str.3:                               ## @.str.3
	.asciz	"bridge has subordinate %02x but max busn %02x\n"

	.comm	_PCI_STATUS,4,2                 ## @PCI_STATUS
	.comm	_CARDBUS_LATENCY_TIMER,4,2      ## @CARDBUS_LATENCY_TIMER
	.comm	_CARDBUS_RESERVE_BUSNR,4,2      ## @CARDBUS_RESERVE_BUSNR
	.comm	_PCI_SUBORDINATE_BUS,4,2        ## @PCI_SUBORDINATE_BUS
L_.str.4:                               ## @.str.4
	.asciz	"PCI CardBus %04x:%02x"

L_.str.5:                               ## @.str.5
	.asciz	"PCI Bus %04x:%02x"

L_.str.6:                               ## @.str.6
	.asciz	"devices behind bridge are unusable because %pR cannot be assigned for them\n"

	.no_dead_strip	_pci_scan_bridge_extend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_scan_bridge_extend
_pci_scan_bridge_extend:                ; @pci_scan_bridge_extend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	stp	w3, w2, [sp, #40]               ; 8-byte Folded Spill
	mov	x26, x1
	mov	x19, x0
	mov	x21, x1
	ldr	x24, [x21], #8
Lloh0:
	adrp	x8, _PCI_HEADER_TYPE_CARDBUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_HEADER_TYPE_CARDBUS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	mov	x0, x21
	bl	_pm_runtime_get_sync
Lloh3:
	adrp	x8, _PCI_PRIMARY_BUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_PRIMARY_BUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #76
	mov	x0, x26
	bl	_pci_read_config_dword
	ldr	w22, [sp, #76]
	and	w27, w22, #0xff
	ubfx	w20, w22, #8, #8
	ubfx	w25, w22, #16, #8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x26
	mov	x2, x20
	mov	x3, x25
	mov	x4, x23
	bl	_pci_dbg
	cbnz	w27, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	cmp	w25, #0
	ccmp	w20, #0, #4, ne
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	w27, #0
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x26
	bl	_pci_warn
	ldr	w27, [x19]
LBB0_4:
	str	x24, [sp, #48]                  ; 8-byte Folded Spill
	lsr	w28, w22, #8
	lsr	w22, w22, #16
	str	x25, [sp, #32]                  ; 8-byte Folded Spill
	cbnz	w23, LBB0_7
; %bb.5:
	ldr	w8, [x19]
	cmp	w20, w25
	ccmp	w27, w8, #0, ls
	ccmp	w20, w8, #0, eq
	b.hi	LBB0_7
; %bb.6:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x26
	mov	x2, x20
	mov	x3, x25
	bl	_pci_info
	mov	w24, #1
	b	LBB0_8
LBB0_7:
	mov	w24, #0
LBB0_8:
Lloh12:
	adrp	x25, _PCI_BRIDGE_CONTROL@GOTPAGE
Lloh13:
	ldr	x25, [x25, _PCI_BRIDGE_CONTROL@GOTPAGEOFF]
	ldr	w1, [x25]
	add	x2, sp, #72
	mov	x0, x26
	bl	_pci_read_config_word
	ldr	w1, [x25]
	ldr	w8, [sp, #72]
Lloh14:
	adrp	x9, _PCI_BRIDGE_CTL_MASTER_ABORT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_BRIDGE_CTL_MASTER_ABORT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	bic	w2, w8, w9
	mov	x0, x26
	bl	_pci_write_config_word
	mov	x0, x26
	bl	_pci_enable_crs
	orr	w8, w28, w22
	tst	w8, #0xff
	ldr	x28, [sp, #48]                  ; 8-byte Folded Reload
	b.eq	LBB0_10
; %bb.9:
	bl	_pcibios_assign_all_busses
	cmp	x0, #0
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ccmp	x28, x8, #4, eq
	cset	w8, eq
	orr	w8, w24, w8
	tbz	w8, #0, LBB0_25
LBB0_10:
	cbz	w23, LBB0_27
; %bb.11:
Lloh17:
	adrp	x8, _PCI_STATUS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCI_STATUS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x26
	mov	w2, #65535
	bl	_pci_write_config_word
	add	x1, sp, #68
	add	x2, sp, #64
	mov	x0, x26
	bl	_pci_ea_fixed_busnrs
	mov	x24, x0
	ldr	w8, [sp, #68]
	cmp	w0, #0
	ldr	w22, [sp, #44]                  ; 4-byte Folded Reload
	csinc	w20, w8, w22, ne
	mov	x0, x19
	bl	_pci_domain_nr
	mov	x1, x20
	bl	_pci_find_bus
	mov	x23, x0
	cbnz	x0, LBB0_14
; %bb.12:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x20
	bl	_pci_add_new_bus
	cbz	x0, LBB0_47
; %bb.13:
	mov	x23, x0
	ldr	w2, [x19, #24]
	mov	x1, x20
	bl	_pci_bus_insert_busn_res
LBB0_14:
	ldrb	w8, [sp, #79]
	ldr	w9, [x23, #4]
	orr	w8, w9, w8, lsl #24
	ldr	w9, [x23, #32]
	orr	w8, w8, w9, lsl #8
	ldr	w9, [x23, #24]
	orr	w2, w8, w9, lsl #16
	str	w2, [sp, #76]
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	cmp	x28, x8
	b.ne	LBB0_30
; %bb.15:
	str	w24, [sp, #40]                  ; 4-byte Folded Spill
	add	w22, w22, #1
Lloh20:
	adrp	x8, _CARDBUS_LATENCY_TIMER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CARDBUS_LATENCY_TIMER@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	bfi	w2, w8, #24, #8
	str	w2, [sp, #76]
Lloh23:
	adrp	x8, _PCI_PRIMARY_BUS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PCI_PRIMARY_BUS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_pci_write_config_dword
Lloh26:
	adrp	x8, _CARDBUS_RESERVE_BUSNR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CARDBUS_RESERVE_BUSNR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_37
; %bb.16:
	mov	w24, #0
	add	x27, x19, #16
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x21, [sp, #24]                  ; 8-byte Folded Reload
	mov	x27, x20
	cbnz	w25, LBB0_38
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	w24, w24, #1
Lloh29:
	adrp	x8, _CARDBUS_RESERVE_BUSNR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CARDBUS_RESERVE_BUSNR@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ge	LBB0_39
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
	mov	x0, x19
	bl	_pci_domain_nr
	add	w28, w24, w22
	add	w1, w28, #1
	bl	_pci_find_bus
	cbnz	x0, LBB0_39
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x27]
	cbz	x8, LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w25, #0
	mov	x20, x27
	mov	x21, x19
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=2
	ldr	x21, [x27]
	mov	x27, x21
	ldr	x8, [x27, #16]!
	cbz	x8, LBB0_17
LBB0_23:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_pcibios_assign_all_busses
	cbnz	x0, LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	w8, [x21, #24]
	cmp	w8, w28
	ccmp	w8, w22, #0, ls
	csinc	w25, w25, wzr, ls
	b	LBB0_22
LBB0_25:
	cbz	w23, LBB0_31
; %bb.26:
Lloh32:
	adrp	x8, _PCI_BRIDGE_CONTROL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PCI_BRIDGE_CONTROL@GOTPAGEOFF]
	ldr	w22, [sp, #44]                  ; 4-byte Folded Reload
	b	LBB0_48
LBB0_27:
	bl	_pcibios_assign_all_busses
	cmp	x0, #0
	cset	w8, ne
	orr	w8, w24, w8
	ldr	w22, [sp, #44]                  ; 4-byte Folded Reload
	tbnz	w8, #0, LBB0_29
; %bb.28:
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	cmp	x28, x8
	b.ne	LBB0_47
LBB0_29:
Lloh34:
	adrp	x8, _PCI_PRIMARY_BUS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PCI_PRIMARY_BUS@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldrb	w8, [sp, #79]
	lsl	w2, w8, #24
	mov	x0, x26
	bl	_pci_write_config_dword
	b	LBB0_47
LBB0_30:
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	sub	w8, w9, #1
	cmp	w9, #0
	csel	w22, wzr, w8, eq
Lloh37:
	adrp	x8, _PCI_PRIMARY_BUS@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PCI_PRIMARY_BUS@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_pci_write_config_dword
	ldr	w8, [sp, #72]
	str	w8, [x23, #8]
	mov	x0, x23
	mov	x1, x22
	bl	_pci_scan_child_bus_extend
	b	LBB0_40
LBB0_31:
	mov	x0, x19
	bl	_pci_domain_nr
	mov	x1, x20
	bl	_pci_find_bus
	mov	x23, x0
	ldr	w22, [sp, #44]                  ; 4-byte Folded Reload
	ldr	x24, [sp, #32]                  ; 8-byte Folded Reload
	cbnz	x0, LBB0_34
; %bb.32:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x20
	bl	_pci_add_new_bus
	cbz	x0, LBB0_47
; %bb.33:
	mov	x23, x0
	str	w27, [x0, #4]
	mov	x1, x20
	mov	x2, x24
	bl	_pci_bus_insert_busn_res
	ldr	w8, [sp, #72]
	str	w8, [x23, #8]
LBB0_34:
	mov	x0, x23
	bl	_pci_scan_child_bus
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, w24
	b.ls	LBB0_36
; %bb.35:
	stp	x24, x0, [sp]
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x26
	bl	_pci_warn
LBB0_36:
	cmp	w24, w22
	csel	w22, w24, w22, hi
	b	LBB0_41
LBB0_37:
	mov	w24, #0
	b	LBB0_39
LBB0_38:
	lsr	w24, w24, #1
LBB0_39:
	add	w0, w24, w22
	ldr	x28, [sp, #48]                  ; 8-byte Folded Reload
	ldr	w24, [sp, #40]                  ; 4-byte Folded Reload
LBB0_40:
	ldr	w8, [sp, #64]
	cmp	w24, #0
	csel	w22, w0, w8, eq
	mov	x0, x23
	mov	x1, x22
	bl	_pci_bus_update_busn_res_end
Lloh42:
	adrp	x8, _PCI_SUBORDINATE_BUS@GOTPAGE
Lloh43:
	ldr	x8, [x8, _PCI_SUBORDINATE_BUS@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x26
	mov	x2, x22
	bl	_pci_write_config_byte
LBB0_41:
	ldr	w24, [x23, #40]
Lloh45:
	adrp	x8, l_.str.5@PAGE
Lloh46:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh47:
	adrp	x9, l_.str.4@PAGE
Lloh48:
	add	x9, x9, l_.str.4@PAGEOFF
	ldr	x10, [sp, #56]                  ; 8-byte Folded Reload
	cmp	x28, x10
	csel	x25, x9, x8, eq
	mov	x0, x19
	bl	_pci_domain_nr
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x24
	mov	x1, x25
	bl	_sprintf
	add	x2, x23, #24
LBB0_42:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_47
; %bb.43:                               ;   in Loop: Header=BB0_42 Depth=1
	ldr	w9, [x2]
	ldr	w11, [x19, #24]
	cmp	w9, w11
	b.hi	LBB0_46
; %bb.44:                               ;   in Loop: Header=BB0_42 Depth=1
	ldr	w10, [x23]
	cmp	w10, w11
	b.hi	LBB0_46
; %bb.45:                               ;   in Loop: Header=BB0_42 Depth=1
	ldr	w11, [x19]
	cmp	w10, w11
	ccmp	w9, w11, #0, hs
	mov	x19, x8
	b.hs	LBB0_42
LBB0_46:
Lloh49:
	adrp	x1, l_.str.6@PAGE
Lloh50:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_dev_info
LBB0_47:
Lloh51:
	adrp	x8, _PCI_BRIDGE_CONTROL@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PCI_BRIDGE_CONTROL@GOTPAGEOFF]
LBB0_48:
	ldr	w1, [x8]
	ldr	w2, [sp, #72]
	mov	x0, x26
	bl	_pci_write_config_word
	mov	x0, x21
	bl	_pm_runtime_put
	mov	x0, x22
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_HEADER_TYPE_CARDBUS,8,3    ; @PCI_HEADER_TYPE_CARDBUS
	.comm	_PCI_PRIMARY_BUS,4,2            ; @PCI_PRIMARY_BUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scanning [bus %02x-%02x] behind bridge, pass %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Primary bus is hard wired to 0\n"

l_.str.2:                               ; @.str.2
	.asciz	"bridge configuration invalid ([bus %02x-%02x]), reconfiguring\n"

	.comm	_PCI_BRIDGE_CONTROL,4,2         ; @PCI_BRIDGE_CONTROL
	.comm	_PCI_BRIDGE_CTL_MASTER_ABORT,4,2 ; @PCI_BRIDGE_CTL_MASTER_ABORT
l_.str.3:                               ; @.str.3
	.asciz	"bridge has subordinate %02x but max busn %02x\n"

	.comm	_PCI_STATUS,4,2                 ; @PCI_STATUS
	.comm	_CARDBUS_LATENCY_TIMER,4,2      ; @CARDBUS_LATENCY_TIMER
	.comm	_CARDBUS_RESERVE_BUSNR,4,2      ; @CARDBUS_RESERVE_BUSNR
	.comm	_PCI_SUBORDINATE_BUS,4,2        ; @PCI_SUBORDINATE_BUS
l_.str.4:                               ; @.str.4
	.asciz	"PCI CardBus %04x:%02x"

l_.str.5:                               ; @.str.5
	.asciz	"PCI Bus %04x:%02x"

l_.str.6:                               ; @.str.6
	.asciz	"devices behind bridge are unusable because %pR cannot be assigned for them\n"

	.no_dead_strip	_pci_scan_bridge_extend
.subsections_via_symbols
