	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_a38x_platform_devmap_init
_mv_a38x_platform_devmap_init:          ## @mv_a38x_platform_devmap_init
	.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	_fdt_devmap@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_devmap_register_table
	leaq	L_.str(%rip), %rdi
	callq	_OF_finddevice
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.1:
	movl	%eax, %ebx
	movq	_fdt_immr_va@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rdi
	movl	%eax, 8(%rdi)
	movq	_fdt_immr_pa@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	_fdt_immr_size@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movq	_FDT_DEVMAP_MAX@GOTPCREL(%rip), %rax
	movl	$1, %r14d
	cmpl	$2, (%rax)
	jl	LBB0_3
## %bb.2:
	addq	$12, %rdi
	callq	_platform_sram_devmap
	xorl	%r14d, %r14d
	cmpq	$1, %rax
	adcl	$1, %r14d
LBB0_3:
	movl	%ebx, %edi
	callq	_OF_child
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.4:
	leaq	L_.str.1(%rip), %r15
	movq	_MV_PCI_VA_IO_BASE@GOTPCREL(%rip), %r12
	movq	_MV_PCI_VA_MEM_BASE@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	addl	$2, %r14d
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	callq	_OF_peer
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_mv_fdt_is_type
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_mv_fdt_is_type
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	leal	1(%r14), %eax
	movq	_FDT_DEVMAP_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movslq	%r14d, %rax
	leaq	(%rax,%rax,2), %rsi
	shlq	$2, %rsi
	movq	_fdt_devmap@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movl	%ebx, %edi
	callq	_mv_pci_devmap
	testq	%rax, %rax
	je	LBB0_5
LBB0_11:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fdt_devmap,8,3                 ## @fdt_devmap
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_fdt_immr_va,4,2                ## @fdt_immr_va
	.comm	_fdt_immr_pa,4,2                ## @fdt_immr_pa
	.comm	_fdt_immr_size,4,2              ## @fdt_immr_size
	.comm	_FDT_DEVMAP_MAX,4,2             ## @FDT_DEVMAP_MAX
L_.str.1:                               ## @.str.1
	.asciz	"pci"

L_.str.2:                               ## @.str.2
	.asciz	"pciep"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MV_PCI_VA_IO_BASE,4,2          ## @MV_PCI_VA_IO_BASE
	.comm	_MV_PCI_VA_MEM_BASE,4,2         ## @MV_PCI_VA_MEM_BASE
	.no_dead_strip	_mv_a38x_platform_devmap_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv_a38x_platform_devmap_init
_mv_a38x_platform_devmap_init:          ; @mv_a38x_platform_devmap_init
	.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
Lloh0:
	adrp	x22, _fdt_devmap@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fdt_devmap@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_devmap_register_table
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_OF_finddevice
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.1:
	mov	x19, x0
Lloh4:
	adrp	x8, _fdt_immr_va@GOTPAGE
Lloh5:
	ldr	x8, [x8, _fdt_immr_va@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x8]
	ldr	x8, [x22]
Lloh7:
	adrp	x10, _fdt_immr_pa@GOTPAGE
Lloh8:
	ldr	x10, [x10, _fdt_immr_pa@GOTPAGEOFF]
	str	w9, [x8, #8]
Lloh9:
	ldr	w9, [x10]
Lloh10:
	adrp	x10, _fdt_immr_size@GOTPAGE
Lloh11:
	ldr	x10, [x10, _fdt_immr_size@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	stp	w10, w9, [x8]
Lloh13:
	adrp	x23, _FDT_DEVMAP_MAX@GOTPAGE
Lloh14:
	ldr	x23, [x23, _FDT_DEVMAP_MAX@GOTPAGEOFF]
	ldr	w9, [x23]
	mov	w24, #1
	cmp	w9, #2
	b.lt	LBB0_3
; %bb.2:
	add	x0, x8, #12
	bl	_platform_sram_devmap
	cmp	x0, #0
	cinc	w24, w24, eq
LBB0_3:
	mov	x0, x19
	bl	_OF_child
	cbz	w0, LBB0_14
; %bb.4:
	mov	x19, x0
Lloh15:
	adrp	x20, l_.str.1@PAGE
Lloh16:
	add	x20, x20, l_.str.1@PAGEOFF
	mov	w25, #12
Lloh17:
	adrp	x26, _MV_PCI_VA_IO_BASE@GOTPAGE
Lloh18:
	ldr	x26, [x26, _MV_PCI_VA_IO_BASE@GOTPAGEOFF]
Lloh19:
	adrp	x27, _MV_PCI_VA_MEM_BASE@GOTPAGE
Lloh20:
	ldr	x27, [x27, _MV_PCI_VA_MEM_BASE@GOTPAGEOFF]
Lloh21:
	adrp	x21, l_.str.2@PAGE
Lloh22:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w24, w24, #2
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_OF_peer
	mov	x19, x0
	cbz	w0, LBB0_14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mv_fdt_is_type
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_mv_fdt_is_type
	cbz	x0, LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w8, w24, #1
	ldr	w9, [x23]
	cmp	w8, w9
	b.ge	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	smaddl	x1, w24, w25, x8
	ldr	w2, [x26]
	ldr	w3, [x27]
	mov	x0, x19
	bl	_mv_pci_devmap
	cbz	x0, LBB0_5
LBB0_11:
Lloh23:
	adrp	x8, _ENXIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
LBB0_14:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_fdt_devmap,8,3                 ; @fdt_devmap
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_fdt_immr_va,4,2                ; @fdt_immr_va
	.comm	_fdt_immr_pa,4,2                ; @fdt_immr_pa
	.comm	_fdt_immr_size,4,2              ; @fdt_immr_size
	.comm	_FDT_DEVMAP_MAX,4,2             ; @FDT_DEVMAP_MAX
l_.str.1:                               ; @.str.1
	.asciz	"pci"

l_.str.2:                               ; @.str.2
	.asciz	"pciep"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MV_PCI_VA_IO_BASE,4,2          ; @MV_PCI_VA_IO_BASE
	.comm	_MV_PCI_VA_MEM_BASE,4,2         ; @MV_PCI_VA_MEM_BASE
	.no_dead_strip	_mv_a38x_platform_devmap_init
.subsections_via_symbols
