	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdt_localbus_devmap            ## -- Begin function fdt_localbus_devmap
	.p2align	4, 0x90
_fdt_localbus_devmap:                   ## @fdt_localbus_devmap
	.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	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r12
	movl	%edi, %r13d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MV_LOCALBUS_MAX_BANKS@GOTPCREL(%rip), %rax
	movq	_MV_LOCALBUS_MAX_BANK_CELLS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	imull	(%rax), %r15d
	leaq	(,%r15,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	-60(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	movl	%r13d, %edi
	callq	_fdt_addrsize_cells
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movl	%r13d, %edi
	callq	_fdt_parent_addr_cells
	cmpl	$3, %eax
	jge	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movl	-60(%rbp), %r14d
	addl	%eax, %r14d
	addl	-52(%rbp), %r14d
	movq	_MV_LOCALBUS_MAX_BANK_CELLS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jle	LBB0_8
LBB0_4:
	movq	_ERANGE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_24
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	shll	$2, %r15d
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_OF_getprop
	testl	%eax, %eax
	jle	LBB0_1
## %bb.9:
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	shll	$2, %r14d
	cltd
	idivl	%r14d
	movl	%eax, %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_MIN
	movl	%eax, %r15d
	movl	$0, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	_MV_LOCALBUS_MAX_BANKS@GOTPCREL(%rip), %r13
	jle	LBB0_23
## %bb.10:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movslq	%eax, %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	decl	%eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	%r15d, -64(%rbp)                ## 4-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-60(%rbp), %eax
	addl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	addl	-52(%rbp), %eax
	cltq
	leaq	(%rbx,%rax,4), %rbx
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%r12d
	cmpl	%r15d, %r12d
	je	LBB0_23
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_fdt_data_get
	addq	$4, %rbx
	cmpl	%eax, (%r13)
	jl	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_localbus_virtmap@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	js	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movslq	%eax, %r15
	addq	$24, %rcx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r15, %rdx
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	incq	%r14
	movq	(%rcx), %rdx
	addq	$24, %rcx
	testq	%rdx, %rdx
	jns	LBB0_16
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-60(%rbp), %eax
	addl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	addl	-52(%rbp), %eax
	cltq
	leaq	(%rbx,%rax,4), %rbx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movslq	-60(%rbp), %rax
	leaq	(%rbx,%rax,4), %r13
	leaq	(%rbx,%rax,4), %rdi
	addq	$-4, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_fdt_data_get
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	-4(,%rax,4), %rbx
	addq	%r13, %rbx
	movl	-52(%rbp), %esi
	movq	%rbx, %rdi
	callq	_fdt_data_get
	movslq	-52(%rbp), %rcx
	leaq	(%rbx,%rcx,4), %rbx
	movq	_localbus_virtmap@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r14d, %edx
	leaq	(%rdx,%rdx,2), %rdx
	cmpq	%rax, 8(%rcx,%rdx,8)
	jl	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	16(%rcx,%rdx,8), %r8d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movslq	%edi, %rdi
	leaq	(%rdi,%rdi,2), %rdx
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	%r8d, 16(%rsi,%rdx,8)
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, 8(%rsi,%rdx,8)
	movq	%rax, (%rsi,%rdx,8)
	movq	_localbus_banks@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdx
	shlq	$5, %r15
	movl	%r8d, 24(%rdx,%r15)
	movq	%rcx, 16(%rdx,%r15)
	movq	(%rsi), %rcx
	movq	%rax, 8(%rcx,%r15)
	movl	$1, (%rcx,%r15)
	incl	%edi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	_MV_LOCALBUS_MAX_BANKS@GOTPCREL(%rip), %r13
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-64(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_12
LBB0_23:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_LOCALBUS_MAX_BANKS,4,2      ## @MV_LOCALBUS_MAX_BANKS
	.comm	_MV_LOCALBUS_MAX_BANK_CELLS,4,2 ## @MV_LOCALBUS_MAX_BANK_CELLS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERANGE,4,2                     ## @ERANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ranges"

	.comm	_localbus_virtmap,8,3           ## @localbus_virtmap
	.comm	_localbus_banks,8,3             ## @localbus_banks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdt_localbus_devmap            ; -- Begin function fdt_localbus_devmap
	.p2align	2
_fdt_localbus_devmap:                   ; @fdt_localbus_devmap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	mov	x28, x3
	mov	x22, x2
	mov	x20, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x25, _MV_LOCALBUS_MAX_BANKS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MV_LOCALBUS_MAX_BANKS@GOTPAGEOFF]
Lloh5:
	adrp	x26, _MV_LOCALBUS_MAX_BANK_CELLS@GOTPAGE
Lloh6:
	ldr	x26, [x26, _MV_LOCALBUS_MAX_BANK_CELLS@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	w9, [x26]
	mul	w19, w9, w8
	lsl	x9, x19, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x23, x9, x8
	mov	sp, x23
	sub	x1, x29, #92
	sub	x2, x29, #96
	bl	_fdt_addrsize_cells
	cbz	x0, LBB0_2
LBB0_1:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x0, x24
	bl	_fdt_parent_addr_cells
	cmp	w0, #3
	b.ge	LBB0_4
; %bb.3:
	mov	x21, x0
	stur	x20, [x29, #-112]               ; 8-byte Folded Spill
	ldp	w9, w8, [x29, #-96]
	add	w8, w8, w0
	add	w27, w8, w9
	ldr	w8, [x26]
	cmp	w27, w8
	b.le	LBB0_8
LBB0_4:
Lloh11:
	adrp	x8, _ERANGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
LBB0_6:
	ldur	x8, [x29, #-88]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.7:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	lsl	w3, w19, #2
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	bl	_OF_getprop
	cmp	w0, #0
	b.le	LBB0_1
; %bb.9:
	stur	x28, [x29, #-128]               ; 8-byte Folded Spill
	lsl	w8, w27, #2
	sdiv	w0, w0, w8
	mov	x1, x22
	bl	_MIN
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.10:
	mov	x22, x0
	stur	wzr, [x29, #-100]               ; 4-byte Folded Spill
	mov	w27, #0
	sub	w28, w21, #1
	sxtw	x8, w21
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
Lloh18:
	adrp	x24, _localbus_virtmap@GOTPAGE
Lloh19:
	ldr	x24, [x24, _localbus_virtmap@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	ldp	w10, w9, [x29, #-96]
	add	w9, w28, w9
	add	w9, w9, w10
	add	x23, x8, w9, sxtw #2
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w27, w27, #1
	cmp	w27, w22
	b.eq	LBB0_22
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x0, x23
	mov	w1, #1
	bl	_fdt_data_get
	add	x8, x23, #4
	ldr	w9, [x25]
	cmp	w9, w0
	b.lt	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x9, [x24]
	ldr	x10, [x9]
	tbnz	x10, #63, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x19, #0
	sxtw	x26, w0
	add	x9, x9, #24
LBB0_16:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x10, x26
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x19, x19, #1
	ldr	x10, [x9], #24
	tbz	x10, #63, LBB0_16
	b	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	ldursw	x9, [x29, #-92]
	add	x8, x8, x9, lsl #2
	sub	x23, x8, #4
	mov	x0, x23
	mov	x1, x21
	bl	_fdt_data_get
	mov	x20, x0
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	add	x23, x23, x8, lsl #2
	ldur	w1, [x29, #-96]
	mov	x0, x23
	bl	_fdt_data_get
	ldursw	x8, [x29, #-96]
	add	x23, x23, x8, lsl #2
	mov	x12, x24
	ldr	x8, [x24]
	and	x9, x19, #0xffffffff
	mov	w13, #24
	madd	x10, x9, x13, x8
	ldr	x10, [x10, #8]
	cmp	x10, x0
	b.lt	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
	madd	x8, x9, x13, x8
	ldr	w8, [x8, #16]
	ldur	w11, [x29, #-100]               ; 4-byte Folded Reload
	ldur	x9, [x29, #-112]                ; 8-byte Folded Reload
	smaddl	x9, w11, w13, x9
	str	w8, [x9, #16]
	stp	x0, x20, [x9]
Lloh20:
	adrp	x13, _localbus_banks@GOTPAGE
Lloh21:
	ldr	x13, [x13, _localbus_banks@GOTPAGEOFF]
	ldr	x9, [x13]
	lsl	x10, x26, #5
	add	x9, x9, x10
	str	w8, [x9, #24]
	str	x20, [x9, #16]
	ldr	x8, [x13]
	add	x8, x8, x10
	str	x0, [x8, #8]
	mov	w9, #1
	str	w9, [x8]
	add	w11, w11, #1
	stur	w11, [x29, #-100]               ; 4-byte Folded Spill
LBB0_20:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x24, x12
	b	LBB0_12
LBB0_21:
	stur	wzr, [x29, #-100]               ; 4-byte Folded Spill
LBB0_22:
	mov	w0, #0
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	ldur	w9, [x29, #-100]                ; 4-byte Folded Reload
	str	w9, [x8]
	b	LBB0_6
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_LOCALBUS_MAX_BANKS,4,2      ; @MV_LOCALBUS_MAX_BANKS
	.comm	_MV_LOCALBUS_MAX_BANK_CELLS,4,2 ; @MV_LOCALBUS_MAX_BANK_CELLS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERANGE,4,2                     ; @ERANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ranges"

	.comm	_localbus_virtmap,8,3           ; @localbus_virtmap
	.comm	_localbus_banks,8,3             ; @localbus_banks
.subsections_via_symbols
