	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jbusppm_attach
_jbusppm_attach:                        ## @jbusppm_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_device_get_softc
	movq	%rax, %r15
	movq	_JBUSPPM_DEVID@GOTPCREL(%rip), %rax
	movslq	(%rax), %r14
	movq	_JBUSPPM_ESTAR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	cmpl	%edx, %r14d
	jle	LBB0_1
LBB0_37:
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_38
## %bb.39:
	movq	_JBUSPPM_DEVID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_JBUSPPM_DEVID_JID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_JBUSPPM_READ
	movq	_JBUSPPM_DEVID_JID_MASTER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_41
## %bb.40:
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_41:
	leaq	L_.str.7(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_JBUSPPM_ESTAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_JBUSPPM_ESTAR_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_JBUSPPM_READ
	movq	_JBUSPPM_ESTAR_CTRL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_42
## %bb.43:
	cltq
	leaq	l_reltable.jbusppm_attach(%rip), %rcx
	movslq	(%rcx,%rax,4), %rdi
	addq	%rcx, %rdi
	jmp	LBB0_44
LBB0_1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	1(%r14), %rax
	movslq	%edx, %rcx
	cmpq	%rcx, %r14
	movq	%rax, %r14
	jge	LBB0_37
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	%r14d, -56(%rbp)
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%r14d, %edx
	jne	LBB0_31
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %r8
	callq	_bus_get_resource
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_device_get_parent
	movl	%eax, %edi
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_device_get_children
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -52(%rbp)
	jle	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	movq	_OFW_TYPE_PCI@GOTPCREL(%rip), %r12
	leaq	L_.str.2(%rip), %r13
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=2
	incq	%rbx
	movslq	-52(%rbp), %rax
	cmpq	%rax, %rbx
	jge	LBB0_19
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_ofw_bus_get_type
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_ofw_bus_get_type
	movq	(%r12), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_ofw_bus_get_compat
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_ofw_bus_get_compat
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_bus_get_resource_start
	testl	$1048576, %eax                  ## imm = 0x100000
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax,%rbx,8), %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	leaq	-56(%rbp), %rdx
	callq	_bus_alloc_resource_any
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_JBUSPPM_ESTAR@GOTPCREL(%rip), %rbx
	jmp	LBB0_21
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	movq	_M_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	testq	%r13, %r13
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	leaq	-72(%rbp), %rcx
	leaq	-96(%rbp), %r8
	callq	_bus_get_resource
	testq	%rax, %rax
	jne	LBB0_24
## %bb.30:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %esi
	movq	-72(%rbp), %rcx
	movq	-96(%rbp), %r9
	leaq	(%rcx,%r9), %r8
	decq	%r8
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_RF_SHAREABLE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rsp)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	leaq	-56(%rbp), %rdx
	callq	_bus_alloc_resource
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_33
## %bb.34:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_rman_get_bustag
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	callq	_rman_get_bushandle
	movq	8(%r15), %rcx
	movq	%rax, (%rcx,%r14,8)
	movl	(%rbx), %edx
	cmpl	%r14d, %edx
	jne	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movq	(%rcx,%r14,8), %rdi
	leaq	(%rax,%r14,8), %r8
	movq	(%rax,%r14,8), %rsi
	movq	-80(%rbp), %rdx
	subq	-72(%rbp), %rdx
	movq	-88(%rbp), %rcx
	callq	_bus_space_subregion
	movl	(%rbx), %edx
	jmp	LBB0_36
LBB0_38:
	xorl	%ebx, %ebx
	jmp	LBB0_45
LBB0_42:
	leaq	L_.str.11(%rip), %rdi
LBB0_44:
	callq	_printf
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_45
LBB0_33:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_device_printf
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r12
	jmp	LBB0_25
LBB0_4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_22:
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_5:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_device_printf
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r12
	jmp	LBB0_25
LBB0_24:
	leaq	L_.str.4(%rip), %rsi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_25:
	movq	_JBUSPPM_DEVID@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	_JBUSPPM_ESTAR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_29
## %bb.26:
	decq	%rbx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	8(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movl	(%r12), %r14d
	callq	_rman_get_rid
	movq	(%r15), %rcx
	movq	8(%rcx,%rbx,8), %rcx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_bus_release_resource
	movq	_JBUSPPM_ESTAR@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	incq	%rbx
	cmpq	%rax, %rbx
	jl	LBB0_27
LBB0_29:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_45:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JBUSPPM_DEVID,4,2              ## @JBUSPPM_DEVID
	.comm	_JBUSPPM_ESTAR,4,2              ## @JBUSPPM_ESTAR
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not determine Estar resource\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not get children\n"

	.comm	_OFW_TYPE_PCI,8,3               ## @OFW_TYPE_PCI
L_.str.2:                               ## @.str.2
	.asciz	"pci108e,a801"

	.comm	_M_TEMP,4,2                     ## @M_TEMP
L_.str.3:                               ## @.str.3
	.asciz	"could not find Tomatillo\n"

L_.str.4:                               ## @.str.4
	.asciz	"could not determine Tomatillo resource\n"

	.comm	_RF_SHAREABLE,4,2               ## @RF_SHAREABLE
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.5:                               ## @.str.5
	.asciz	"could not allocate resource %d\n"

	.comm	_bootverbose,8,3                ## @bootverbose
	.comm	_JBUSPPM_DEVID_JID,4,2          ## @JBUSPPM_DEVID_JID
	.comm	_JBUSPPM_DEVID_JID_MASTER,4,2   ## @JBUSPPM_DEVID_JID_MASTER
L_.str.6:                               ## @.str.6
	.asciz	"master I/O bridge\n"

L_.str.7:                               ## @.str.7
	.asciz	"running at "

	.comm	_JBUSPPM_ESTAR_CTRL,4,2         ## @JBUSPPM_ESTAR_CTRL
	.comm	_JBUSPPM_ESTAR_CTRL_MASK,4,2    ## @JBUSPPM_ESTAR_CTRL_MASK
L_.str.8:                               ## @.str.8
	.asciz	"full"

L_.str.9:                               ## @.str.9
	.asciz	"half"

L_.str.10:                              ## @.str.10
	.asciz	"1/32"

L_.str.11:                              ## @.str.11
	.asciz	"unknown"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_str:                                  ## @str
	.asciz	" speed"

	.no_dead_strip	_jbusppm_attach
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.jbusppm_attach
l_reltable.jbusppm_attach:
	.long	L_.str.10-l_reltable.jbusppm_attach
	.long	L_.str.9-l_reltable.jbusppm_attach
	.long	L_.str.8-l_reltable.jbusppm_attach

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jbusppm_attach
_jbusppm_attach:                        ; @jbusppm_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x0
	bl	_device_get_softc
	mov	x19, x0
Lloh0:
	adrp	x8, _JBUSPPM_DEVID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JBUSPPM_DEVID@GOTPAGEOFF]
Lloh2:
	ldrsw	x26, [x8]
Lloh3:
	adrp	x23, _JBUSPPM_ESTAR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _JBUSPPM_ESTAR@GOTPAGEOFF]
	ldr	w2, [x23]
	cmp	w26, w2
	b.le	LBB0_6
LBB0_1:
Lloh5:
	adrp	x8, _bootverbose@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.2:
Lloh8:
	adrp	x8, _JBUSPPM_DEVID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JBUSPPM_DEVID@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _JBUSPPM_DEVID_JID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JBUSPPM_DEVID_JID@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_JBUSPPM_READ
Lloh14:
	adrp	x8, _JBUSPPM_DEVID_JID_MASTER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _JBUSPPM_DEVID_JID_MASTER@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh17:
	adrp	x1, l_.str.6@PAGE
Lloh18:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_device_printf
LBB0_4:
Lloh19:
	adrp	x1, l_.str.7@PAGE
Lloh20:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	ldr	w1, [x23]
Lloh21:
	adrp	x8, _JBUSPPM_ESTAR_CTRL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _JBUSPPM_ESTAR_CTRL@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_JBUSPPM_READ
Lloh24:
	adrp	x8, _JBUSPPM_ESTAR_CTRL_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _JBUSPPM_ESTAR_CTRL_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_28
; %bb.5:
Lloh27:
	adrp	x9, l_switch.table.jbusppm_attach@PAGE
Lloh28:
	add	x9, x9, l_switch.table.jbusppm_attach@PAGEOFF
	ldr	x0, [x9, w8, sxtw #3]
	b	LBB0_29
LBB0_6:
Lloh29:
	adrp	x24, _SYS_RES_MEMORY@GOTPAGE
Lloh30:
	ldr	x24, [x24, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh31:
	adrp	x27, _OFW_TYPE_PCI@GOTPAGE
Lloh32:
	ldr	x27, [x27, _OFW_TYPE_PCI@GOTPAGEOFF]
Lloh33:
	adrp	x21, l_.str.2@PAGE
Lloh34:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh35:
	adrp	x28, _M_TEMP@GOTPAGE
Lloh36:
	ldr	x28, [x28, _M_TEMP@GOTPAGEOFF]
Lloh37:
	adrp	x25, _RF_ACTIVE@GOTPAGE
Lloh38:
	ldr	x25, [x25, _RF_ACTIVE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	cmp	x26, w2, sxtw
	add	x26, x26, #1
	b.ge	LBB0_1
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	str	w26, [sp, #60]
	ldr	w1, [x24]
	cmp	w2, w26
	b.ne	LBB0_20
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x0, x20
	bl	_bus_get_resource
	cbnz	x0, LBB0_32
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_device_get_parent
	add	x1, sp, #48
	add	x2, sp, #12
	bl	_device_get_children
	cbnz	x0, LBB0_33
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x22, x22, #1
	ldrsw	x8, [sp, #12]
	cmp	x22, x8
	b.ge	LBB0_21
LBB0_14:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [sp, #48]
	ldr	x0, [x8, x22, lsl #3]
	bl	_ofw_bus_get_type
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [sp, #48]
	ldr	x0, [x8, x22, lsl #3]
	bl	_ofw_bus_get_type
	ldr	x1, [x27]
	bl	_strcmp
	cbnz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [sp, #48]
	ldr	x0, [x8, x22, lsl #3]
	bl	_ofw_bus_get_compat
	cbz	x0, LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [sp, #48]
	ldr	x0, [x8, x22, lsl #3]
	bl	_ofw_bus_get_compat
	mov	x1, x21
	bl	_strcmp
	cbnz	x0, LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [sp, #48]
	ldr	x0, [x8, x22, lsl #3]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_bus_get_resource_start
	tbnz	w0, #20, LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #48]
	ldr	x22, [x8, x22, lsl #3]
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w3, [x25]
	add	x2, sp, #60
	mov	x0, x20
	bl	_bus_alloc_resource_any
	b	LBB0_25
LBB0_21:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, #0
LBB0_22:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #48]
	ldr	w1, [x28]
	bl	_free
	cbz	x22, LBB0_34
; %bb.23:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x24]
	add	x3, sp, #32
	add	x4, sp, #40
	mov	x0, x22
	mov	w2, #1
	bl	_bus_get_resource
	cbnz	x0, LBB0_35
; %bb.24:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x24]
	ldp	x3, x5, [sp, #32]
	add	x8, x3, x5
	sub	x4, x8, #1
Lloh39:
	adrp	x8, _RF_SHAREABLE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RF_SHAREABLE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldr	w9, [x25]
	orr	w6, w9, w8
	add	x2, sp, #60
	mov	x0, x20
	bl	_bus_alloc_resource
LBB0_25:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19]
	str	x0, [x8, x26, lsl #3]
	ldr	x8, [x19]
	ldr	x0, [x8, x26, lsl #3]
	cbz	x0, LBB0_31
; %bb.26:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_rman_get_bustag
	ldr	x8, [x19, #16]
	lsl	x22, x26, #3
	str	x0, [x8, x22]
	ldr	x8, [x19]
	ldr	x0, [x8, x22]
	bl	_rman_get_bushandle
	ldr	x8, [x19, #8]
	str	x0, [x8, x22]
	ldr	w2, [x23]
	cmp	w2, w26
	b.ne	LBB0_7
; %bb.27:                               ;   in Loop: Header=BB0_8 Depth=1
	ldp	x9, x8, [x19, #8]
	ldr	x0, [x8, x22]
	add	x4, x9, x22
	ldr	x1, [x4]
	ldp	x8, x3, [sp, #16]
	ldr	x9, [sp, #32]
	sub	x2, x8, x9
	bl	_bus_space_subregion
	ldr	w2, [x23]
	b	LBB0_7
LBB0_28:
Lloh42:
	adrp	x0, l_.str.11@PAGE
Lloh43:
	add	x0, x0, l_.str.11@PAGEOFF
LBB0_29:
	bl	_printf
Lloh44:
	adrp	x0, l_str@PAGE
Lloh45:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_30:
	mov	w0, #0
	b	LBB0_40
LBB0_31:
	str	x26, [sp]
Lloh46:
	adrp	x1, l_.str.5@PAGE
Lloh47:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_36
LBB0_32:
Lloh48:
	adrp	x1, l_.str@PAGE
Lloh49:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_36
LBB0_33:
Lloh50:
	adrp	x1, l_.str.1@PAGE
Lloh51:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_36
LBB0_34:
Lloh52:
	adrp	x1, l_.str.3@PAGE
Lloh53:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_36
LBB0_35:
Lloh54:
	adrp	x1, l_.str.4@PAGE
Lloh55:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_36:
	mov	x0, x20
	bl	_device_printf
Lloh56:
	adrp	x8, _JBUSPPM_DEVID@GOTPAGE
Lloh57:
	ldr	x8, [x8, _JBUSPPM_DEVID@GOTPAGEOFF]
Lloh58:
	ldrsw	x22, [x8]
	ldr	w8, [x23]
	cmp	w22, w8
	b.gt	LBB0_39
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x22, lsl #3]
	cbz	x0, LBB0_39
; %bb.38:                               ;   in Loop: Header=BB0_37 Depth=1
	ldr	w21, [x24]
	bl	_rman_get_rid
	mov	x2, x0
	ldr	x8, [x19]
	ldr	x3, [x8, x22, lsl #3]
	mov	x0, x20
	mov	x1, x21
	bl	_bus_release_resource
	add	x8, x22, #1
	ldrsw	x9, [x23]
	cmp	x22, x9
	mov	x22, x8
	b.lt	LBB0_37
LBB0_39:
Lloh59:
	adrp	x8, _ENXIO@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh61:
	ldr	w0, [x8]
LBB0_40:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_JBUSPPM_DEVID,4,2              ; @JBUSPPM_DEVID
	.comm	_JBUSPPM_ESTAR,4,2              ; @JBUSPPM_ESTAR
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not determine Estar resource\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not get children\n"

	.comm	_OFW_TYPE_PCI,8,3               ; @OFW_TYPE_PCI
l_.str.2:                               ; @.str.2
	.asciz	"pci108e,a801"

	.comm	_M_TEMP,4,2                     ; @M_TEMP
l_.str.3:                               ; @.str.3
	.asciz	"could not find Tomatillo\n"

l_.str.4:                               ; @.str.4
	.asciz	"could not determine Tomatillo resource\n"

	.comm	_RF_SHAREABLE,4,2               ; @RF_SHAREABLE
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.5:                               ; @.str.5
	.asciz	"could not allocate resource %d\n"

	.comm	_bootverbose,8,3                ; @bootverbose
	.comm	_JBUSPPM_DEVID_JID,4,2          ; @JBUSPPM_DEVID_JID
	.comm	_JBUSPPM_DEVID_JID_MASTER,4,2   ; @JBUSPPM_DEVID_JID_MASTER
l_.str.6:                               ; @.str.6
	.asciz	"master I/O bridge\n"

l_.str.7:                               ; @.str.7
	.asciz	"running at "

	.comm	_JBUSPPM_ESTAR_CTRL,4,2         ; @JBUSPPM_ESTAR_CTRL
	.comm	_JBUSPPM_ESTAR_CTRL_MASK,4,2    ; @JBUSPPM_ESTAR_CTRL_MASK
l_.str.8:                               ; @.str.8
	.asciz	"full"

l_.str.9:                               ; @.str.9
	.asciz	"half"

l_.str.10:                              ; @.str.10
	.asciz	"1/32"

l_.str.11:                              ; @.str.11
	.asciz	"unknown"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_str:                                  ; @str
	.asciz	" speed"

	.no_dead_strip	_jbusppm_attach
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.jbusppm_attach
l_switch.table.jbusppm_attach:
	.quad	l_.str.10
	.quad	l_.str.9
	.quad	l_.str.8

.subsections_via_symbols
