	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_gic_add_children
_arm_gic_add_children:                  ## @arm_gic_add_children
	.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	%rax, %r14
	movq	%r15, %rdi
	callq	_ofw_bus_get_node
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_OF_child
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_arm_gic_fill_ranges
	testq	%rax, %rax
	js	LBB0_12
## %bb.3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_M_DEVBUF@GOTPCREL(%rip), %r12
	movq	_M_WAITOK@GOTPCREL(%rip), %r14
	jmp	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r13), %edx
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_device_printf
	movq	%r12, %rdi
	callq	_resource_list_free
	movq	%r13, %rdi
	callq	_ofw_bus_gen_destroy_devinfo
	movq	_M_DEVBUF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_free
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_OF_peer
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r14), %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_4 Depth=1
	movq	%r13, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_resource_list_init
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %r8
	callq	_ofw_bus_reg_to_rl
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_device_set_ivars
	movq	_M_DEVBUF@GOTPCREL(%rip), %r12
	jmp	LBB0_9
LBB0_10:
	movl	$1, %ebx
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_12:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Have a child, but no ranges\n"

	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
L_.str.1:                               ## @.str.1
	.asciz	"<%s>: device_add_child failed\n"

	.no_dead_strip	_arm_gic_add_children
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_gic_add_children
_arm_gic_add_children:                  ; @arm_gic_add_children
	.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
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x22, x0
	bl	_OF_child
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
	mov	x0, x22
	mov	x1, x20
	bl	_arm_gic_fill_ranges
	tbnz	x0, #63, LBB0_10
; %bb.2:
Lloh0:
	adrp	x25, _M_DEVBUF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _M_DEVBUF@GOTPAGEOFF]
Lloh2:
	adrp	x26, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _M_WAITOK@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh6:
	adrp	x27, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x27, [x27, _M_ZERO@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x22
	bl	_device_printf
	mov	x0, x24
	bl	_resource_list_free
	mov	x0, x23
	bl	_ofw_bus_gen_destroy_devinfo
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x25]
	mov	x0, x23
	bl	_free
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_OF_peer
	mov	x21, x0
	cbz	x0, LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	w0, #8
	bl	_malloc
	mov	x23, x0
	mov	x1, x21
	bl	_ofw_bus_gen_setup_devinfo
	cbnz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x23, #4
	mov	x0, x24
	bl	_resource_list_init
	ldp	w3, w2, [x20]
	mov	x0, x19
	mov	x1, x21
	mov	x4, x24
	bl	_ofw_bus_reg_to_rl
	mov	x0, x19
	mov	x1, #0
	mov	w2, #-1
	bl	_device_add_child
	cbz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x23
	bl	_device_set_ivars
	b	LBB0_5
LBB0_9:
	mov	w0, #1
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	mov	w0, #0
LBB0_11:
	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
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Have a child, but no ranges\n"

	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
l_.str.1:                               ; @.str.1
	.asciz	"<%s>: device_add_child failed\n"

	.no_dead_strip	_arm_gic_add_children
.subsections_via_symbols
