	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_armada38x_mbus_optimization    ## -- Begin function armada38x_mbus_optimization
	.p2align	4, 0x90
_armada38x_mbus_optimization:           ## @armada38x_mbus_optimization
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_MV_MBUS_CTRL_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MV_MBUS_CTRL_REGS_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-28(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_bus_space_map
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	xorl	%edx, %edx
	movl	$102784, %ecx                   ## imm = 0x19180
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	$4, %edx
	movl	$196618, %ecx                   ## imm = 0x3000A
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	$8, %edx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	$12, %edx
	movl	$771, %ecx                      ## imm = 0x303
	callq	_bus_space_write_4
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%r15), %ecx
	movq	_BUS_SPACE_BARRIER_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edx, %edx
	callq	_bus_space_barrier
	movl	(%r14), %edi
	movl	-28(%rbp), %esi
	movl	(%r15), %edx
	callq	_bus_space_unmap
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_MV_MBUS_CTRL_BASE,8,3          ## @MV_MBUS_CTRL_BASE
	.comm	_MV_MBUS_CTRL_REGS_LEN,4,2      ## @MV_MBUS_CTRL_REGS_LEN
	.comm	_BUS_SPACE_BARRIER_WRITE,4,2    ## @BUS_SPACE_BARRIER_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_armada38x_mbus_optimization    ; -- Begin function armada38x_mbus_optimization
	.p2align	2
_armada38x_mbus_optimization:           ; @armada38x_mbus_optimization
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x20, _fdtbus_bs_tag@GOTPAGE
Lloh1:
	ldr	x20, [x20, _fdtbus_bs_tag@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _MV_MBUS_CTRL_BASE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MV_MBUS_CTRL_BASE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x21, _MV_MBUS_CTRL_REGS_LEN@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MV_MBUS_CTRL_REGS_LEN@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x4, sp, #12
	mov	w3, #0
	bl	_bus_space_map
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	mov	w2, #0
	mov	w3, #37248
	movk	w3, #1, lsl #16
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	mov	w2, #4
	mov	w3, #10
	movk	w3, #3, lsl #16
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	mov	w2, #8
	mov	w3, #65535
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	mov	w2, #12
	mov	w3, #771
	bl	_bus_space_write_4
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w3, [x21]
Lloh7:
	adrp	x8, _BUS_SPACE_BARRIER_WRITE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BUS_SPACE_BARRIER_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	w4, [x8]
	mov	w2, #0
	bl	_bus_space_barrier
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w2, [x21]
	bl	_bus_space_unmap
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_MV_MBUS_CTRL_BASE,8,3          ; @MV_MBUS_CTRL_BASE
	.comm	_MV_MBUS_CTRL_REGS_LEN,4,2      ; @MV_MBUS_CTRL_REGS_LEN
	.comm	_BUS_SPACE_BARRIER_WRITE,4,2    ; @BUS_SPACE_BARRIER_WRITE
.subsections_via_symbols
