	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_pcib_attach
_fsl_pcib_attach:                       ## @fsl_pcib_attach
	.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
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r12
	movl	%r14d, 40(%rax)
	movl	$0, (%rax)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%r14d, %edi
	movq	%r12, %rdx
	callq	_bus_alloc_resource_any
	movq	%rax, 48(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, 68(%r12)
	movq	48(%r12), %rdi
	callq	_rman_get_bushandle
	movl	%eax, 64(%r12)
	movq	$0, 56(%r12)
	movq	48(%r12), %rdi
	movq	_REG_PEX_IP_BLK_REV1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bus_read_4
	movq	_IP_MN_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	movq	_IP_MN_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movl	%edx, 4(%r12)
	movq	_IP_MJ_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_IP_MJ_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, 8(%r12)
	leaq	44(%r12), %rdi
	movq	_MTX_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	callq	_mtx_init
	movq	_PCIR_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$2, %r9d
	callq	_fsl_pcib_cfgread
	cmpl	$6487, %eax                     ## imm = 0x1957
	je	LBB0_4
## %bb.3:
	cmpl	$4183, %eax                     ## imm = 0x1057
	jne	LBB0_19
LBB0_4:
	movq	_PCIR_CAP_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_fsl_pcib_cfgread
	movq	%rax, %rbx
	testl	%ebx, %ebx
	jne	LBB0_5
LBB0_8:
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_ofw_pci_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.9:
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_fsl_pcib_decode_win
	testq	%rax, %rax
	jne	LBB0_19
## %bb.10:
	movq	_PCIR_COMMAND@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$2, %r9d
	callq	_fsl_pcib_cfgread
	movq	_PCIM_CMD_SERRESPEN@GOTPCREL(%rip), %rcx
	movq	_PCIM_CMD_BUSMASTEREN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	orl	(%rcx), %r9d
	movq	_PCIM_CMD_MEMEN@GOTPCREL(%rip), %rcx
	orl	%eax, %r9d
	orl	(%rcx), %r9d
	movq	_PCIM_CMD_PORTEN@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movl	(%rbx), %r8d
	movl	$2, (%rsp)
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_fsl_pcib_cfgwrite
	movl	40(%r12), %edi
	movq	_PCIR_BRIDGECTL_1@GOTPCREL(%rip), %r15
	movl	(%r15), %r8d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_fsl_pcib_read_config
	movl	%eax, %ebx
	movq	_PCIB_BCR_SECBUS_RESET@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	40(%r12), %edi
	movl	(%r15), %r8d
	movl	$1, (%rsp)
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r9d
	callq	_fsl_pcib_write_config
	movl	$100000, %edi                   ## imm = 0x186A0
	callq	_DELAY
	movq	_PCIB_BCR_SECBUS_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	notl	%r9d
	andl	%ebx, %r9d
	movl	40(%r12), %edi
	movl	(%r15), %r8d
	movl	$1, (%rsp)
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_fsl_pcib_write_config
	movl	$100000, %edi                   ## imm = 0x186A0
	callq	_DELAY
	cmpl	$0, 12(%r12)
	je	LBB0_14
## %bb.11:
	movq	_PCIR_LTSSM@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_fsl_pcib_cfgread
	movq	_LTSSM_STAT_L0@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jle	LBB0_14
## %bb.12:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.13:
	movl	%r14d, %edi
	callq	_device_get_unit
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	shrl	$8, %eax
	andl	$255, %eax
	movl	%eax, %ebx
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%ebx, %r8d
	movl	$2, %r9d
	callq	_fsl_pcib_cfgread
	cmpb	$-127, %al
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, 12(%r12)
	movl	%ebx, 16(%r12)
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_19:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	$0, -44(%rbp)
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RF_SHAREABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%r13), %ecx
	leaq	-44(%rbp), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resource_any
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_fsl_pcib_err_intr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	addq	$24, %r12
	movq	%r12, (%rsp)
	movl	%r14d, %edi
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	movl	%r14d, %r9d
	callq	_bus_setup_intr
	testl	%eax, %eax
	je	LBB0_21
## %bb.16:
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	movq	$0, (%r12)
LBB0_17:
	movl	%r14d, %edi
	callq	_fsl_pcib_detach
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_19
LBB0_21:
	movl	%r14d, %edi
	callq	_fsl_pcib_err_init
	movl	%r14d, %edi
	callq	_ofw_pci_attach
	movl	%eax, %r15d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not map I/O memory\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_REG_PEX_IP_BLK_REV1,4,2        ## @REG_PEX_IP_BLK_REV1
	.comm	_IP_MN_M,4,2                    ## @IP_MN_M
	.comm	_IP_MN_S,4,2                    ## @IP_MN_S
	.comm	_IP_MJ_M,4,2                    ## @IP_MJ_M
	.comm	_IP_MJ_S,4,2                    ## @IP_MJ_S
L_.str.1:                               ## @.str.1
	.asciz	"pcicfg"

	.comm	_MTX_SPIN,4,2                   ## @MTX_SPIN
	.comm	_PCIR_VENDOR,4,2                ## @PCIR_VENDOR
	.comm	_PCIR_CAP_PTR,4,2               ## @PCIR_CAP_PTR
	.comm	_PCIR_COMMAND,4,2               ## @PCIR_COMMAND
	.comm	_PCIM_CMD_SERRESPEN,4,2         ## @PCIM_CMD_SERRESPEN
	.comm	_PCIM_CMD_BUSMASTEREN,4,2       ## @PCIM_CMD_BUSMASTEREN
	.comm	_PCIM_CMD_MEMEN,4,2             ## @PCIM_CMD_MEMEN
	.comm	_PCIM_CMD_PORTEN,4,2            ## @PCIM_CMD_PORTEN
	.comm	_PCIR_BRIDGECTL_1,4,2           ## @PCIR_BRIDGECTL_1
	.comm	_PCIB_BCR_SECBUS_RESET,4,2      ## @PCIB_BCR_SECBUS_RESET
	.comm	_PCIR_LTSSM,4,2                 ## @PCIR_LTSSM
	.comm	_LTSSM_STAT_L0,4,2              ## @LTSSM_STAT_L0
	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.2:                               ## @.str.2
	.asciz	"PCI %d: no PCIE link, skipping\n"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_RF_SHAREABLE,4,2               ## @RF_SHAREABLE
L_.str.3:                               ## @.str.3
	.asciz	"Detach of the driver failed with error %d\n"

	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_fsl_pcib_err_intr,4,2          ## @fsl_pcib_err_intr
L_.str.4:                               ## @.str.4
	.asciz	"Could not setup irq, %d\n"

	.no_dead_strip	_fsl_pcib_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_pcib_attach
_fsl_pcib_attach:                       ; @fsl_pcib_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #40]
	str	wzr, [x0]
Lloh0:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x22, _RF_ACTIVE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RF_ACTIVE@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_bus_alloc_resource_any
	str	x0, [x20, #48]
	cbz	x0, LBB0_13
; %bb.1:
	bl	_rman_get_bustag
	str	w0, [x20, #68]
	ldr	x0, [x20, #48]
	bl	_rman_get_bushandle
	str	w0, [x20, #64]
	str	xzr, [x20, #56]
	ldr	x0, [x20, #48]
Lloh5:
	adrp	x8, _REG_PEX_IP_BLK_REV1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_PEX_IP_BLK_REV1@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_bus_read_4
Lloh8:
	adrp	x8, _IP_MN_M@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IP_MN_M@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh11:
	adrp	x9, _IP_MN_S@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IP_MN_S@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh14:
	adrp	x9, _IP_MJ_M@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IP_MJ_M@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w9, w9, w0
Lloh17:
	adrp	x10, _IP_MJ_S@GOTPAGE
Lloh18:
	ldr	x10, [x10, _IP_MJ_S@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	asr	w9, w9, w10
	stp	w8, w9, [x20, #4]
	add	x0, x20, #44
Lloh20:
	adrp	x8, _MTX_SPIN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MTX_SPIN@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
Lloh25:
	adrp	x8, _PCIR_VENDOR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PCIR_VENDOR@GOTPAGEOFF]
Lloh27:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w5, #2
	bl	_fsl_pcib_cfgread
	mov	w8, #6487
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w8, #4183
	cmp	w0, w8
	b.ne	LBB0_15
LBB0_3:
Lloh28:
	adrp	x8, _PCIR_CAP_PTR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PCIR_CAP_PTR@GOTPAGEOFF]
Lloh30:
	ldr	w4, [x8]
	mov	w23, #1
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w5, #1
	bl	_fsl_pcib_cfgread
	mov	x21, x0
	cbnz	w21, LBB0_11
LBB0_4:
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x21, x0
	mov	x0, x19
	bl	_ofw_pci_init
	cbnz	w0, LBB0_16
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	bl	_fsl_pcib_decode_win
	cbnz	x0, LBB0_15
; %bb.6:
Lloh31:
	adrp	x21, _PCIR_COMMAND@GOTPAGE
Lloh32:
	ldr	x21, [x21, _PCIR_COMMAND@GOTPAGEOFF]
	ldr	w4, [x21]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w5, #2
	bl	_fsl_pcib_cfgread
Lloh33:
	adrp	x8, _PCIM_CMD_SERRESPEN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCIM_CMD_SERRESPEN@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _PCIM_CMD_BUSMASTEREN@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PCIM_CMD_BUSMASTEREN@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh39:
	adrp	x9, _PCIM_CMD_MEMEN@GOTPAGE
Lloh40:
	ldr	x9, [x9, _PCIM_CMD_MEMEN@GOTPAGEOFF]
Lloh41:
	adrp	x10, _PCIM_CMD_PORTEN@GOTPAGE
Lloh42:
	ldr	x10, [x10, _PCIM_CMD_PORTEN@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
Lloh44:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w5, w8, w10
	ldr	w4, [x21]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w6, #2
	bl	_fsl_pcib_cfgwrite
	ldr	w0, [x20, #40]
Lloh45:
	adrp	x23, _PCIR_BRIDGECTL_1@GOTPAGE
Lloh46:
	ldr	x23, [x23, _PCIR_BRIDGECTL_1@GOTPAGEOFF]
	ldr	w4, [x23]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w5, #1
	bl	_fsl_pcib_read_config
Lloh47:
	adrp	x24, _PCIB_BCR_SECBUS_RESET@GOTPAGE
Lloh48:
	ldr	x24, [x24, _PCIB_BCR_SECBUS_RESET@GOTPAGEOFF]
	ldr	w8, [x24]
	orr	w21, w8, w0
	ldr	w0, [x20, #40]
	ldr	w4, [x23]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x5, x21
	mov	w6, #1
	bl	_fsl_pcib_write_config
	mov	w0, #34464
	movk	w0, #1, lsl #16
	bl	_DELAY
	ldr	w8, [x24]
	bic	w5, w21, w8
	ldr	w0, [x20, #40]
	ldr	w4, [x23]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w6, #1
	bl	_fsl_pcib_write_config
	mov	w0, #34464
	movk	w0, #1, lsl #16
	bl	_DELAY
	ldr	w8, [x20, #12]
	cbz	w8, LBB0_17
; %bb.7:
Lloh49:
	adrp	x8, _PCIR_LTSSM@GOTPAGE
Lloh50:
	ldr	x8, [x8, _PCIR_LTSSM@GOTPAGEOFF]
Lloh51:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w5, #1
	bl	_fsl_pcib_cfgread
Lloh52:
	adrp	x8, _LTSSM_STAT_L0@GOTPAGE
Lloh53:
	ldr	x8, [x8, _LTSSM_STAT_L0@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_17
; %bb.8:
Lloh55:
	adrp	x8, _bootverbose@GOTPAGE
Lloh56:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
	cbz	x8, LBB0_23
; %bb.9:
	mov	x0, x19
	bl	_device_get_unit
	mov	x1, x0
Lloh58:
	adrp	x0, l_.str.2@PAGE
Lloh59:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	mov	w0, #0
	b	LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ubfx	w21, w0, #8, #8
	cbz	w21, LBB0_4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, x21
	mov	w5, #2
	bl	_fsl_pcib_cfgread
	and	w8, w0, #0xff
	cmp	w8, #129
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	stp	w23, w21, [x20, #12]
	b	LBB0_10
LBB0_13:
Lloh60:
	adrp	x1, l_.str@PAGE
Lloh61:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_device_printf
LBB0_15:
Lloh62:
	adrp	x8, _ENXIO@GOTPAGE
Lloh63:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh64:
	ldr	w0, [x8]
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_17:
	str	wzr, [sp, #12]
Lloh65:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh66:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh67:
	ldr	w1, [x8]
	ldr	w8, [x22]
Lloh68:
	adrp	x9, _RF_SHAREABLE@GOTPAGE
Lloh69:
	ldr	x9, [x9, _RF_SHAREABLE@GOTPAGEOFF]
Lloh70:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x2, sp, #12
	mov	x0, x19
	bl	_bus_alloc_resource_any
	str	x0, [x20, #32]
	cbz	x0, LBB0_20
; %bb.18:
	mov	x1, x0
Lloh71:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh72:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
Lloh74:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh75:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh76:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh77:
	adrp	x8, _fsl_pcib_err_intr@GOTPAGE
Lloh78:
	ldr	x8, [x8, _fsl_pcib_err_intr@GOTPAGEOFF]
Lloh79:
	ldr	w4, [x8]
	add	x20, x20, #24
	mov	x0, x19
	mov	x3, #0
	mov	x5, x19
	mov	x6, x20
	bl	_bus_setup_intr
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_22
; %bb.19:
	str	x0, [sp]
Lloh80:
	adrp	x1, l_.str.4@PAGE
Lloh81:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	str	xzr, [x20]
LBB0_20:
	mov	x0, x19
	bl	_fsl_pcib_detach
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_15
; %bb.21:
	str	x0, [sp]
Lloh82:
	adrp	x1, l_.str.3@PAGE
Lloh83:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_22:
	mov	x0, x19
	bl	_fsl_pcib_err_init
	mov	x0, x19
	bl	_ofw_pci_attach
	b	LBB0_16
LBB0_23:
	mov	w0, #0
	b	LBB0_16
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh82, Lloh83
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not map I/O memory\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_REG_PEX_IP_BLK_REV1,4,2        ; @REG_PEX_IP_BLK_REV1
	.comm	_IP_MN_M,4,2                    ; @IP_MN_M
	.comm	_IP_MN_S,4,2                    ; @IP_MN_S
	.comm	_IP_MJ_M,4,2                    ; @IP_MJ_M
	.comm	_IP_MJ_S,4,2                    ; @IP_MJ_S
l_.str.1:                               ; @.str.1
	.asciz	"pcicfg"

	.comm	_MTX_SPIN,4,2                   ; @MTX_SPIN
	.comm	_PCIR_VENDOR,4,2                ; @PCIR_VENDOR
	.comm	_PCIR_CAP_PTR,4,2               ; @PCIR_CAP_PTR
	.comm	_PCIR_COMMAND,4,2               ; @PCIR_COMMAND
	.comm	_PCIM_CMD_SERRESPEN,4,2         ; @PCIM_CMD_SERRESPEN
	.comm	_PCIM_CMD_BUSMASTEREN,4,2       ; @PCIM_CMD_BUSMASTEREN
	.comm	_PCIM_CMD_MEMEN,4,2             ; @PCIM_CMD_MEMEN
	.comm	_PCIM_CMD_PORTEN,4,2            ; @PCIM_CMD_PORTEN
	.comm	_PCIR_BRIDGECTL_1,4,2           ; @PCIR_BRIDGECTL_1
	.comm	_PCIB_BCR_SECBUS_RESET,4,2      ; @PCIB_BCR_SECBUS_RESET
	.comm	_PCIR_LTSSM,4,2                 ; @PCIR_LTSSM
	.comm	_LTSSM_STAT_L0,4,2              ; @LTSSM_STAT_L0
	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.2:                               ; @.str.2
	.asciz	"PCI %d: no PCIE link, skipping\n"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_RF_SHAREABLE,4,2               ; @RF_SHAREABLE
l_.str.3:                               ; @.str.3
	.asciz	"Detach of the driver failed with error %d\n"

	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_fsl_pcib_err_intr,4,2          ; @fsl_pcib_err_intr
l_.str.4:                               ; @.str.4
	.asciz	"Could not setup irq, %d\n"

	.no_dead_strip	_fsl_pcib_attach
.subsections_via_symbols
