	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv_a38x_platform_late_init
_mv_a38x_platform_late_init:            ## @mv_a38x_platform_late_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_mv_check_soc_family
	movq	_MV_SOC_UNSUPPORTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	xorl	%eax, %eax
	callq	_soc_decode_win
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_str.7(%rip), %rdi
	callq	_puts
LBB0_4:
	xorl	%eax, %eax
	callq	_get_cpu_freq
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	callq	_arm_tmr_change_frequency
	movq	_VM_MEMATTR_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VM_MEMATTR_SO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pmap_remap_vm_attr
	xorl	%eax, %eax
	callq	_armada38x_win_set_iosync_barrier
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_str.6(%rip), %rdi
	callq	_puts
LBB0_6:
	xorl	%eax, %eax
	callq	_armada38x_mbus_optimization
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_str.5(%rip), %rdi
	callq	_puts
LBB0_8:
	xorl	%eax, %eax
	callq	_armada38x_scu_enable
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	L_str(%rip), %rdi
	popq	%rbp
	jmp	_puts                           ## TAILCALL
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV_SOC_UNSUPPORTED,8,3         ## @MV_SOC_UNSUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported SoC family\n"

	.comm	_VM_MEMATTR_DEVICE,4,2          ## @VM_MEMATTR_DEVICE
	.comm	_VM_MEMATTR_SO,4,2              ## @VM_MEMATTR_SO
L_str:                                  ## @str
	.asciz	"WARNING: could not enable SCU"

L_str.5:                                ## @str.5
	.asciz	"WARNING: could not enable mbus optimization"

L_str.6:                                ## @str.6
	.asciz	"WARNING: could not map CPU Subsystem registers"

L_str.7:                                ## @str.7
	.asciz	"WARNING: could not re-initialise decode windows! Running with existing settings..."

	.no_dead_strip	_mv_a38x_platform_late_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_late_init
_mv_a38x_platform_late_init:            ; @mv_a38x_platform_late_init
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_mv_check_soc_family
Lloh0:
	adrp	x8, _MV_SOC_UNSUPPORTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MV_SOC_UNSUPPORTED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	bl	_soc_decode_win
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_str.7@PAGE
Lloh6:
	add	x0, x0, l_str.7@PAGEOFF
	bl	_puts
LBB0_4:
	bl	_get_cpu_freq
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w0, w8, #1
	bl	_arm_tmr_change_frequency
Lloh7:
	adrp	x8, _VM_MEMATTR_DEVICE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VM_MEMATTR_DEVICE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _VM_MEMATTR_SO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VM_MEMATTR_SO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_pmap_remap_vm_attr
	bl	_armada38x_win_set_iosync_barrier
	cbz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x0, l_str.6@PAGE
Lloh14:
	add	x0, x0, l_str.6@PAGEOFF
	bl	_puts
LBB0_6:
	bl	_armada38x_mbus_optimization
	cbz	x0, LBB0_8
; %bb.7:
Lloh15:
	adrp	x0, l_str.5@PAGE
Lloh16:
	add	x0, x0, l_str.5@PAGEOFF
	bl	_puts
LBB0_8:
	bl	_armada38x_scu_enable
	cbz	x0, LBB0_10
; %bb.9:
Lloh17:
	adrp	x0, l_str@PAGE
Lloh18:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_puts
LBB0_10:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MV_SOC_UNSUPPORTED,8,3         ; @MV_SOC_UNSUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported SoC family\n"

	.comm	_VM_MEMATTR_DEVICE,4,2          ; @VM_MEMATTR_DEVICE
	.comm	_VM_MEMATTR_SO,4,2              ; @VM_MEMATTR_SO
l_str:                                  ; @str
	.asciz	"WARNING: could not enable SCU"

l_str.5:                                ; @str.5
	.asciz	"WARNING: could not enable mbus optimization"

l_str.6:                                ; @str.6
	.asciz	"WARNING: could not map CPU Subsystem registers"

l_str.7:                                ; @str.7
	.asciz	"WARNING: could not re-initialise decode windows! Running with existing settings..."

	.no_dead_strip	_mv_a38x_platform_late_init
.subsections_via_symbols
