	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_setup_device               ## -- Begin function pci_setup_device
	.p2align	4, 0x90
_pci_setup_device:                      ## @pci_setup_device
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_pci_hdr_type
	movq	32(%rbx), %rcx
	movl	8(%rcx), %edx
	movl	%edx, 108(%rbx)
	movl	4(%rcx), %ecx
	leaq	88(%rbx), %r14
	movl	%ecx, 96(%rbx)
	movq	_pci_bus_type@GOTPCREL(%rip), %rcx
	movq	%rcx, 88(%rbx)
	movl	%eax, %ecx
	andl	$127, %ecx
	movl	%ecx, (%rbx)
	shrl	$7, %eax
	andl	$1, %eax
	movl	%eax, 4(%rbx)
	movq	_pci_channel_io_normal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 104(%rbx)
	movq	%rbx, %rdi
	callq	_set_pcie_port_type
	movq	%rbx, %rdi
	callq	_pci_dev_assign_slot
	movl	$-1, 8(%rbx)
	movq	32(%rbx), %rdi
	callq	_pci_domain_nr
	movl	%eax, %r15d
	movq	32(%rbx), %rax
	movl	(%rax), %r12d
	movl	80(%rbx), %edi
	callq	_PCI_SLOT
	movl	%eax, %r13d
	movl	80(%rbx), %edi
	callq	_PCI_FUNC
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%eax, %r9d
	callq	_dev_set_name
	movq	%rbx, %rdi
	callq	_pci_class
	movzbl	%al, %ecx
	movl	%ecx, 12(%rbx)
	sarl	$8, %eax
	movl	%eax, 16(%rbx)
	movl	76(%rbx), %edx
	movl	(%rbx), %r8d
	movl	72(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_pci_info
	movq	_pci_early_dump@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_early_dump_pci_device
LBB0_2:
	movq	%rbx, %rdi
	callq	_pci_cfg_space_size
	movl	%eax, 68(%rbx)
	movq	%rbx, %rdi
	callq	_set_pcie_thunderbolt
	movq	%rbx, %rdi
	callq	_set_pcie_untrusted
	movq	_PCI_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_pci_fixup_early@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_pci_fixup_device
	movl	16(%rbx), %r15d
	cmpq	$0, 56(%rbx)
	je	LBB0_5
## %bb.3:
	movq	_PCI_COMMAND@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_COMMAND_IO@GOTPCREL(%rip), %r13
	movq	_PCI_COMMAND_MEMORY@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	orl	(%r13), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pci_info
	movl	(%r13), %edx
	orl	(%r12), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
LBB0_5:
	movq	%rbx, %rdi
	callq	_pci_intx_mask_broken
	movl	%eax, 48(%rbx)
	movl	(%rbx), %ecx
	cmpl	$130, %ecx
	je	LBB0_14
## %bb.6:
	sarl	$8, %r15d
	cmpl	$129, %ecx
	je	LBB0_16
## %bb.7:
	cmpl	$128, %ecx
	jne	LBB0_18
## %bb.8:
	movq	_PCI_CLASS_BRIDGE_PCI@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_19
## %bb.9:
	movq	%rbx, %rdi
	callq	_pci_read_irq
	movq	_PCI_ROM_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_pci_read_bases
	leaq	20(%rbx), %rsi
	leaq	24(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_pci_subsystem_ids
	movq	_PCI_CLASS_STORAGE_IDE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	(%rax), %r15d
	jne	LBB0_20
## %bb.10:
	movq	_PCI_CLASS_PROG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_byte
	movl	-60(%rbp), %eax
	testb	$1, %al
	jne	LBB0_12
## %bb.11:
	movabsq	$2160368550384, %rax            ## imm = 0x1F7000001F0
	movq	%rax, -56(%rbp)
	movq	40(%rbx), %r15
	movq	_LEGACY_IO_RESOURCE@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, (%r15)
	movq	32(%rbx), %rdi
	leaq	-56(%rbp), %r12
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_pcibios_bus_to_resource
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pci_info
	movabsq	$4355096839158, %rax            ## imm = 0x3F6000003F6
	movq	%rax, -56(%rbp)
	movq	40(%rbx), %r15
	movq	(%r13), %rax
	movq	%rax, 8(%r15)
	addq	$8, %r15
	movq	32(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_pcibios_bus_to_resource
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pci_info
	movl	-60(%rbp), %eax
LBB0_12:
	testb	$4, %al
	jne	LBB0_20
## %bb.13:
	movabsq	$1610612736368, %rax            ## imm = 0x17700000170
	movq	%rax, -56(%rbp)
	movq	40(%rbx), %r15
	movq	_LEGACY_IO_RESOURCE@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, 16(%r15)
	addq	$16, %r15
	movq	32(%rbx), %rdi
	leaq	-56(%rbp), %r12
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_pcibios_bus_to_resource
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pci_info
	movabsq	$3805341025142, %rax            ## imm = 0x37600000376
	movq	%rax, -56(%rbp)
	movq	40(%rbx), %r15
	movq	(%r13), %rax
	movq	%rax, 24(%r15)
	addq	$24, %r15
	movq	32(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_pcibios_bus_to_resource
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_pci_info
	jmp	LBB0_20
LBB0_14:
	movq	%rbx, %rdi
	callq	_pci_read_irq
	xorl	%eax, %eax
	cmpb	$1, 16(%rbx)
	sete	%al
	movl	%eax, 28(%rbx)
	movq	_PCI_ROM_ADDRESS1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_pci_read_bases
	movq	%rbx, %rdi
	callq	_pci_read_bridge_windows
	movq	%rbx, %rdi
	callq	_set_pcie_hotplug_bridge
	movq	_PCI_CAP_ID_SSVID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_find_capability
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_20
## %bb.15:
	movl	%eax, %r15d
	movq	_PCI_SSVID_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%r15d, %esi
	leaq	20(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_SSVID_DEVICE_ID@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	leaq	24(%rbx), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_pci_read_config_word
	jmp	LBB0_20
LBB0_16:
	movq	_PCI_CLASS_BRIDGE_CARDBUS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_19
## %bb.17:
	movq	%rbx, %rdi
	callq	_pci_read_irq
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_pci_read_bases
	movq	_PCI_CB_SUBSYSTEM_VENDOR_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	20(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_CB_SUBSYSTEM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	24(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	jmp	LBB0_20
LBB0_19:
	movl	16(%rbx), %edx
	leaq	L_.str.8(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_pci_err
	movq	_PCI_CLASS_NOT_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$8, %eax
	movl	%eax, 16(%rbx)
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str.7(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%ecx, %edx
	xorl	%eax, %eax
	callq	_pci_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pci_bus_type,4,2               ## @pci_bus_type
	.comm	_pci_channel_io_normal,4,2      ## @pci_channel_io_normal
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%04x:%02x:%02x.%d"

L_.str.1:                               ## @.str.1
	.asciz	"[%04x:%04x] type %02x class %#08x\n"

	.comm	_pci_early_dump,8,3             ## @pci_early_dump
	.comm	_PCI_UNKNOWN,4,2                ## @PCI_UNKNOWN
	.comm	_pci_fixup_early,4,2            ## @pci_fixup_early
	.comm	_PCI_COMMAND,4,2                ## @PCI_COMMAND
	.comm	_PCI_COMMAND_IO,4,2             ## @PCI_COMMAND_IO
	.comm	_PCI_COMMAND_MEMORY,4,2         ## @PCI_COMMAND_MEMORY
L_.str.2:                               ## @.str.2
	.asciz	"device has non-compliant BARs; disabling IO/MEM decoding\n"

	.comm	_PCI_CLASS_BRIDGE_PCI,4,2       ## @PCI_CLASS_BRIDGE_PCI
	.comm	_PCI_ROM_ADDRESS,4,2            ## @PCI_ROM_ADDRESS
	.comm	_PCI_CLASS_STORAGE_IDE,4,2      ## @PCI_CLASS_STORAGE_IDE
	.comm	_PCI_CLASS_PROG,4,2             ## @PCI_CLASS_PROG
	.comm	_LEGACY_IO_RESOURCE,8,3         ## @LEGACY_IO_RESOURCE
L_.str.3:                               ## @.str.3
	.asciz	"legacy IDE quirk: reg 0x10: %pR\n"

L_.str.4:                               ## @.str.4
	.asciz	"legacy IDE quirk: reg 0x14: %pR\n"

L_.str.5:                               ## @.str.5
	.asciz	"legacy IDE quirk: reg 0x18: %pR\n"

L_.str.6:                               ## @.str.6
	.asciz	"legacy IDE quirk: reg 0x1c: %pR\n"

	.comm	_PCI_ROM_ADDRESS1,4,2           ## @PCI_ROM_ADDRESS1
	.comm	_PCI_CAP_ID_SSVID,4,2           ## @PCI_CAP_ID_SSVID
	.comm	_PCI_SSVID_VENDOR_ID,4,2        ## @PCI_SSVID_VENDOR_ID
	.comm	_PCI_SSVID_DEVICE_ID,4,2        ## @PCI_SSVID_DEVICE_ID
	.comm	_PCI_CLASS_BRIDGE_CARDBUS,4,2   ## @PCI_CLASS_BRIDGE_CARDBUS
	.comm	_PCI_CB_SUBSYSTEM_VENDOR_ID,4,2 ## @PCI_CB_SUBSYSTEM_VENDOR_ID
	.comm	_PCI_CB_SUBSYSTEM_ID,4,2        ## @PCI_CB_SUBSYSTEM_ID
L_.str.7:                               ## @.str.7
	.asciz	"unknown header type %02x, ignoring device\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.8:                               ## @.str.8
	.asciz	"ignoring class %#08x (doesn't match header type %02x)\n"

	.comm	_PCI_CLASS_NOT_DEFINED,4,2      ## @PCI_CLASS_NOT_DEFINED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pci_setup_device
lCPI0_0:
	.long	496                             ; 0x1f0
	.long	503                             ; 0x1f7
lCPI0_1:
	.long	368                             ; 0x170
	.long	375                             ; 0x177
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_pci_setup_device
	.p2align	2
_pci_setup_device:                      ; @pci_setup_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	bl	_pci_hdr_type
	ldr	x8, [x19, #32]
	ldr	w9, [x8, #8]
	str	w9, [x19, #108]
	ldr	w8, [x8, #4]
Lloh0:
	adrp	x9, _pci_bus_type@GOTPAGE
Lloh1:
	ldr	x9, [x9, _pci_bus_type@GOTPAGEOFF]
	str	w8, [x19, #96]
	mov	x20, x19
	str	x9, [x20, #88]!
	and	w8, w0, #0x7f
	ubfx	w9, w0, #7, #1
	stp	w8, w9, [x19]
Lloh2:
	adrp	x8, _pci_channel_io_normal@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pci_channel_io_normal@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #104]
	mov	x0, x19
	bl	_set_pcie_port_type
	mov	x0, x19
	bl	_pci_dev_assign_slot
	mov	w8, #-1
	str	w8, [x19, #8]
	ldr	x0, [x19, #32]
	bl	_pci_domain_nr
	mov	x21, x0
	ldr	x8, [x19, #32]
	ldr	w22, [x8]
	ldr	w0, [x19, #80]
	bl	_PCI_SLOT
	mov	x23, x0
	ldr	w0, [x19, #80]
	bl	_PCI_FUNC
	mov	x5, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	bl	_dev_set_name
	mov	x0, x19
	bl	_pci_class
	and	w8, w0, #0xff
	asr	w9, w0, #8
	stp	w8, w9, [x19, #12]
	ldp	w10, w8, [x19, #72]
	ldr	w11, [x19]
	stp	x11, x9, [sp, #16]
	stp	x8, x10, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh9:
	adrp	x8, _pci_early_dump@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pci_early_dump@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_early_dump_pci_device
LBB0_2:
	mov	x0, x19
	bl	_pci_cfg_space_size
	str	w0, [x19, #68]
	mov	x0, x19
	bl	_set_pcie_thunderbolt
	mov	x0, x19
	bl	_set_pcie_untrusted
Lloh12:
	adrp	x8, _PCI_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_UNKNOWN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #64]
Lloh15:
	adrp	x8, _pci_fixup_early@GOTPAGE
Lloh16:
	ldr	x8, [x8, _pci_fixup_early@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_pci_fixup_device
	ldr	w20, [x19, #16]
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_5
; %bb.3:
Lloh18:
	adrp	x21, _PCI_COMMAND@GOTPAGE
Lloh19:
	ldr	x21, [x21, _PCI_COMMAND@GOTPAGEOFF]
	ldr	w1, [x21]
	sub	x2, x29, #52
	mov	x0, x19
	bl	_pci_read_config_word
	ldur	w8, [x29, #-52]
Lloh20:
	adrp	x22, _PCI_COMMAND_IO@GOTPAGE
Lloh21:
	ldr	x22, [x22, _PCI_COMMAND_IO@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh22:
	adrp	x23, _PCI_COMMAND_MEMORY@GOTPAGE
Lloh23:
	ldr	x23, [x23, _PCI_COMMAND_MEMORY@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	ldr	w8, [x22]
	ldur	w9, [x29, #-52]
	ldr	w10, [x23]
	orr	w8, w8, w10
	bic	w2, w9, w8
	stur	w2, [x29, #-52]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_pci_write_config_word
LBB0_5:
	mov	x0, x19
	bl	_pci_intx_mask_broken
	str	w0, [x19, #48]
	ldr	w2, [x19]
	cmp	w2, #130
	b.eq	LBB0_15
; %bb.6:
	asr	w20, w20, #8
	cmp	w2, #129
	b.eq	LBB0_17
; %bb.7:
	cmp	w2, #128
	b.ne	LBB0_21
; %bb.8:
Lloh26:
	adrp	x8, _PCI_CLASS_BRIDGE_PCI@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PCI_CLASS_BRIDGE_PCI@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w20, w8
	b.eq	LBB0_20
; %bb.9:
	mov	x0, x19
	bl	_pci_read_irq
Lloh29:
	adrp	x8, _PCI_ROM_ADDRESS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PCI_ROM_ADDRESS@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #6
	bl	_pci_read_bases
	add	x1, x19, #20
	add	x2, x19, #24
	mov	x0, x19
	bl	_pci_subsystem_ids
Lloh32:
	adrp	x8, _PCI_CLASS_STORAGE_IDE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PCI_CLASS_STORAGE_IDE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_14
; %bb.10:
Lloh35:
	adrp	x8, _PCI_CLASS_PROG@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PCI_CLASS_PROG@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	add	x2, sp, #44
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	w8, [sp, #44]
	tbnz	w8, #0, LBB0_12
; %bb.11:
Lloh38:
	adrp	x8, lCPI0_0@PAGE
Lloh39:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #48]
	ldr	x20, [x19, #40]
Lloh40:
	adrp	x21, _LEGACY_IO_RESOURCE@GOTPAGE
Lloh41:
	ldr	x21, [x21, _LEGACY_IO_RESOURCE@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x20]
	ldr	x0, [x19, #32]
	add	x2, sp, #48
	mov	x1, x20
	bl	_pcibios_bus_to_resource
	str	x20, [sp]
Lloh42:
	adrp	x1, l_.str.3@PAGE
Lloh43:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	mov	w8, #1014
	dup.2s	v0, w8
	str	d0, [sp, #48]
	ldr	x20, [x19, #40]
	ldr	x8, [x21]
	str	x8, [x20, #8]!
	ldr	x0, [x19, #32]
	add	x2, sp, #48
	mov	x1, x20
	bl	_pcibios_bus_to_resource
	str	x20, [sp]
Lloh44:
	adrp	x1, l_.str.4@PAGE
Lloh45:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	ldr	w8, [sp, #44]
LBB0_12:
	tbnz	w8, #2, LBB0_14
; %bb.13:
Lloh46:
	adrp	x8, lCPI0_1@PAGE
Lloh47:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #48]
	ldr	x20, [x19, #40]
Lloh48:
	adrp	x21, _LEGACY_IO_RESOURCE@GOTPAGE
Lloh49:
	ldr	x21, [x21, _LEGACY_IO_RESOURCE@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x20, #16]!
	ldr	x0, [x19, #32]
	add	x2, sp, #48
	mov	x1, x20
	bl	_pcibios_bus_to_resource
	str	x20, [sp]
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	mov	w8, #886
	dup.2s	v0, w8
	str	d0, [sp, #48]
	ldr	x20, [x19, #40]
	ldr	x8, [x21]
	str	x8, [x20, #24]!
	ldr	x0, [x19, #32]
	add	x2, sp, #48
	mov	x1, x20
	bl	_pcibios_bus_to_resource
	str	x20, [sp]
Lloh52:
	adrp	x1, l_.str.6@PAGE
Lloh53:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_pci_info
LBB0_14:
	mov	w0, #0
	b	LBB0_22
LBB0_15:
	mov	x0, x19
	bl	_pci_read_irq
	ldrb	w8, [x19, #16]
	cmp	w8, #1
	cset	w8, eq
	str	w8, [x19, #28]
Lloh54:
	adrp	x8, _PCI_ROM_ADDRESS1@GOTPAGE
Lloh55:
	ldr	x8, [x8, _PCI_ROM_ADDRESS1@GOTPAGEOFF]
Lloh56:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #2
	bl	_pci_read_bases
	mov	x0, x19
	bl	_pci_read_bridge_windows
	mov	x0, x19
	bl	_set_pcie_hotplug_bridge
Lloh57:
	adrp	x8, _PCI_CAP_ID_SSVID@GOTPAGE
Lloh58:
	ldr	x8, [x8, _PCI_CAP_ID_SSVID@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_find_capability
	cbz	w0, LBB0_22
; %bb.16:
	mov	x20, x0
Lloh60:
	adrp	x8, _PCI_SSVID_VENDOR_ID@GOTPAGE
Lloh61:
	ldr	x8, [x8, _PCI_SSVID_VENDOR_ID@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
	add	w1, w8, w0
	add	x2, x19, #20
	mov	x0, x19
	bl	_pci_read_config_word
Lloh63:
	adrp	x8, _PCI_SSVID_DEVICE_ID@GOTPAGE
Lloh64:
	ldr	x8, [x8, _PCI_SSVID_DEVICE_ID@GOTPAGEOFF]
Lloh65:
	ldr	w8, [x8]
	add	w1, w8, w20
	b	LBB0_19
LBB0_17:
Lloh66:
	adrp	x8, _PCI_CLASS_BRIDGE_CARDBUS@GOTPAGE
Lloh67:
	ldr	x8, [x8, _PCI_CLASS_BRIDGE_CARDBUS@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_20
; %bb.18:
	mov	x0, x19
	bl	_pci_read_irq
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_pci_read_bases
Lloh69:
	adrp	x8, _PCI_CB_SUBSYSTEM_VENDOR_ID@GOTPAGE
Lloh70:
	ldr	x8, [x8, _PCI_CB_SUBSYSTEM_VENDOR_ID@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	add	x2, x19, #20
	mov	x0, x19
	bl	_pci_read_config_word
Lloh72:
	adrp	x8, _PCI_CB_SUBSYSTEM_ID@GOTPAGE
Lloh73:
	ldr	x8, [x8, _PCI_CB_SUBSYSTEM_ID@GOTPAGEOFF]
Lloh74:
	ldr	w1, [x8]
LBB0_19:
	add	x2, x19, #24
	mov	x0, x19
	bl	_pci_read_config_word
	mov	w0, #0
	b	LBB0_22
LBB0_20:
	ldr	w8, [x19, #16]
	str	x2, [sp]
Lloh75:
	adrp	x1, l_.str.8@PAGE
Lloh76:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	mov	x2, x8
	bl	_pci_err
	mov	w0, #0
Lloh77:
	adrp	x8, _PCI_CLASS_NOT_DEFINED@GOTPAGE
Lloh78:
	ldr	x8, [x8, _PCI_CLASS_NOT_DEFINED@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
	lsl	w8, w8, #8
	str	w8, [x19, #16]
	b	LBB0_22
LBB0_21:
Lloh80:
	adrp	x1, l_.str.7@PAGE
Lloh81:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pci_err
Lloh82:
	adrp	x8, _EIO@GOTPAGE
Lloh83:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh84:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_22:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdr	Lloh38, Lloh39
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdr	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpAdd	Lloh80, Lloh81
	.cfi_endproc
                                        ; -- End function
	.comm	_pci_bus_type,4,2               ; @pci_bus_type
	.comm	_pci_channel_io_normal,4,2      ; @pci_channel_io_normal
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%04x:%02x:%02x.%d"

l_.str.1:                               ; @.str.1
	.asciz	"[%04x:%04x] type %02x class %#08x\n"

	.comm	_pci_early_dump,8,3             ; @pci_early_dump
	.comm	_PCI_UNKNOWN,4,2                ; @PCI_UNKNOWN
	.comm	_pci_fixup_early,4,2            ; @pci_fixup_early
	.comm	_PCI_COMMAND,4,2                ; @PCI_COMMAND
	.comm	_PCI_COMMAND_IO,4,2             ; @PCI_COMMAND_IO
	.comm	_PCI_COMMAND_MEMORY,4,2         ; @PCI_COMMAND_MEMORY
l_.str.2:                               ; @.str.2
	.asciz	"device has non-compliant BARs; disabling IO/MEM decoding\n"

	.comm	_PCI_CLASS_BRIDGE_PCI,4,2       ; @PCI_CLASS_BRIDGE_PCI
	.comm	_PCI_ROM_ADDRESS,4,2            ; @PCI_ROM_ADDRESS
	.comm	_PCI_CLASS_STORAGE_IDE,4,2      ; @PCI_CLASS_STORAGE_IDE
	.comm	_PCI_CLASS_PROG,4,2             ; @PCI_CLASS_PROG
	.comm	_LEGACY_IO_RESOURCE,8,3         ; @LEGACY_IO_RESOURCE
l_.str.3:                               ; @.str.3
	.asciz	"legacy IDE quirk: reg 0x10: %pR\n"

l_.str.4:                               ; @.str.4
	.asciz	"legacy IDE quirk: reg 0x14: %pR\n"

l_.str.5:                               ; @.str.5
	.asciz	"legacy IDE quirk: reg 0x18: %pR\n"

l_.str.6:                               ; @.str.6
	.asciz	"legacy IDE quirk: reg 0x1c: %pR\n"

	.comm	_PCI_ROM_ADDRESS1,4,2           ; @PCI_ROM_ADDRESS1
	.comm	_PCI_CAP_ID_SSVID,4,2           ; @PCI_CAP_ID_SSVID
	.comm	_PCI_SSVID_VENDOR_ID,4,2        ; @PCI_SSVID_VENDOR_ID
	.comm	_PCI_SSVID_DEVICE_ID,4,2        ; @PCI_SSVID_DEVICE_ID
	.comm	_PCI_CLASS_BRIDGE_CARDBUS,4,2   ; @PCI_CLASS_BRIDGE_CARDBUS
	.comm	_PCI_CB_SUBSYSTEM_VENDOR_ID,4,2 ; @PCI_CB_SUBSYSTEM_VENDOR_ID
	.comm	_PCI_CB_SUBSYSTEM_ID,4,2        ; @PCI_CB_SUBSYSTEM_ID
l_.str.7:                               ; @.str.7
	.asciz	"unknown header type %02x, ignoring device\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.8:                               ; @.str.8
	.asciz	"ignoring class %#08x (doesn't match header type %02x)\n"

	.comm	_PCI_CLASS_NOT_DEFINED,4,2      ; @PCI_CLASS_NOT_DEFINED
.subsections_via_symbols
