	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function upa_setup_dinfo
_upa_setup_dinfo:                       ## @upa_setup_dinfo
	.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	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r14
	movl	%edi, %r12d
	movq	_M_DEVBUF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$8, %edi
	callq	_malloc
	movq	%rax, %r15
	leaq	4(%rax), %rdi
	movl	%r13d, %esi
	callq	_ofw_bus_gen_setup_devinfo
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_free
LBB0_8:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_2:
	movq	%r15, %rdi
	callq	_resource_list_init
	leaq	L_.str(%rip), %rsi
	leaq	-56(%rbp), %rcx
	movl	%r13d, %edi
	movl	$8, %edx
	callq	_OF_getprop_alloc_multi
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.3:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	-56(%rbp), %rax
	movl	(%rax,%rbx,8), %ecx
	movl	4(%rax,%rbx,8), %r9d
	leal	(%rcx,%r9), %r8d
	decl	%r8d
	movq	%r15, %rdi
	movl	%ebx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_resource_list_add
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_5
LBB0_6:
	movq	-56(%rbp), %rdi
	callq	_OF_prop_free
	movl	(%r14), %edi
	movq	_UPA_INO_BASE@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addl	(%rax), %esi
	callq	_INTMAP_VEC
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movl	%eax, %ecx
	movl	%eax, %r8d
	movl	$1, %r9d
	callq	_resource_list_add
LBB0_9:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	4(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	callq	_device_printf
	movq	%r15, %rdi
	callq	_upa_destroy_dinfo
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"<%s>: incomplete\n"

	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_UPA_INO_BASE,4,2               ## @UPA_INO_BASE
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.no_dead_strip	_upa_setup_dinfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function upa_setup_dinfo
_upa_setup_dinfo:                       ; @upa_setup_dinfo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _M_DEVBUF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _M_DEVBUF@GOTPAGEOFF]
Lloh2:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #8
	bl	_malloc
	mov	x19, x0
	add	x0, x0, #4
	mov	x1, x23
	bl	_ofw_bus_gen_setup_devinfo
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_free
LBB0_2:
	mov	x19, #0
	b	LBB0_8
LBB0_3:
	mov	x0, x19
	bl	_resource_list_init
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	x0, x23
	mov	w2, #8
	bl	_OF_getprop_alloc_multi
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.4:
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x23, #0
	mov	w22, #0
	mov	w8, w0
	lsl	x24, x8, #3
Lloh10:
	adrp	x25, _SYS_RES_MEMORY@GOTPAGE
Lloh11:
	ldr	x25, [x25, _SYS_RES_MEMORY@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldr	x8, [sp, #8]
	add	x8, x8, x23
	ldp	w3, w5, [x8]
	add	w8, w3, w5
	sub	w4, w8, #1
	mov	x0, x19
	mov	x2, x22
	bl	_resource_list_add
	add	w22, w22, #1
	add	x23, x23, #8
	cmp	x24, x23
	b.ne	LBB0_6
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_OF_prop_free
	ldr	w0, [x21]
Lloh12:
	adrp	x8, _UPA_INO_BASE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _UPA_INO_BASE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	add	w1, w8, w20
	bl	_INTMAP_VEC
	mov	x3, x0
Lloh15:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x4, x3
	mov	w5, #1
	bl	_resource_list_add
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	ldr	w2, [x19, #4]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_device_printf
	mov	x0, x19
	bl	_upa_destroy_dinfo
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"<%s>: incomplete\n"

	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_UPA_INO_BASE,4,2               ; @UPA_INO_BASE
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.no_dead_strip	_upa_setup_dinfo
.subsections_via_symbols
