	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function localbus_attach
_localbus_attach:                       ## @localbus_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_device_get_softc
	movq	%r15, 8(%rax)
	movq	_localbus_banks@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%rax)
	movq	%r15, %rdi
	callq	_ofw_bus_get_node
	movq	%rax, %rdi
	callq	_OF_child
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %rbx
	movq	_M_LOCALBUS@GOTPCREL(%rip), %r14
	movq	_M_WAITOK@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_free
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_OF_peer
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ofw_bus_node_status_okay
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_mv_fdt_pm
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movl	$8, %edi
	callq	_malloc
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ofw_bus_gen_setup_devinfo
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_resource_list_init
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_fdt_localbus_reg_decode
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_ofw_bus_gen_destroy_devinfo
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_free
	jmp	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_device_set_ivars
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_M_WAITOK@GOTPCREL(%rip), %r12
	jmp	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edx
	movq	%r15, %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movq	%r12, %rdi
	callq	_resource_list_free
	jmp	LBB0_8
LBB0_14:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_attach             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_localbus_banks,4,2             ## @localbus_banks
	.comm	_M_LOCALBUS,4,2                 ## @M_LOCALBUS
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not set up devinfo\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not process 'reg' property\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not add child: %s\n"

	.no_dead_strip	_localbus_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function localbus_attach
_localbus_attach:                       ; @localbus_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	str	x19, [x0, #8]
Lloh0:
	adrp	x8, _localbus_banks@GOTPAGE
Lloh1:
	ldr	x8, [x8, _localbus_banks@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0]
	mov	x0, x19
	bl	_ofw_bus_get_node
	bl	_OF_child
	cbz	x0, LBB0_13
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x27, _M_LOCALBUS@GOTPAGE
Lloh4:
	ldr	x27, [x27, _M_LOCALBUS@GOTPAGEOFF]
Lloh5:
	adrp	x28, _M_WAITOK@GOTPAGE
Lloh6:
	ldr	x28, [x28, _M_WAITOK@GOTPAGEOFF]
Lloh7:
	adrp	x22, _M_ZERO@GOTPAGE
Lloh8:
	ldr	x22, [x22, _M_ZERO@GOTPAGEOFF]
Lloh9:
	adrp	x23, l_.str.1@PAGE
Lloh10:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh11:
	adrp	x24, l_.str@PAGE
Lloh12:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x27]
	mov	x0, x25
	bl	_free
	mov	x0, x19
	mov	x1, x24
	bl	_device_printf
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_OF_peer
	mov	x21, x0
	cbz	x0, LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ofw_bus_node_status_okay
	cbz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_mv_fdt_pm
	cbz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x27]
	ldr	w8, [x28]
	ldr	w9, [x22]
	orr	w2, w9, w8
	mov	w0, #8
	bl	_malloc
	mov	x25, x0
	mov	x1, x21
	bl	_ofw_bus_gen_setup_devinfo
	cbnz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x25, #4
	mov	x0, x26
	bl	_resource_list_init
	mov	x0, x21
	mov	x1, x20
	mov	x2, x25
	bl	_fdt_localbus_reg_decode
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_device_printf
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x25
	bl	_ofw_bus_gen_destroy_devinfo
	ldr	w1, [x27]
	mov	x0, x25
	bl	_free
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, #0
	mov	w2, #-1
	bl	_device_add_child
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x25
	bl	_device_set_ivars
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	str	x8, [sp]
	mov	x0, x19
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
	mov	x0, x26
	bl	_resource_list_free
	b	LBB0_9
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_bus_generic_attach
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_localbus_banks,4,2             ; @localbus_banks
	.comm	_M_LOCALBUS,4,2                 ; @M_LOCALBUS
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not set up devinfo\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not process 'reg' property\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not add child: %s\n"

	.no_dead_strip	_localbus_attach
.subsections_via_symbols
