	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_mmu_update_asid_hop0_addr
_goya_mmu_update_asid_hop0_addr:        ## @goya_mmu_update_asid_hop0_addr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r12
	cmpq	$0, 8(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_MMU_CONFIG_TIMEOUT_USEC@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GOYA_PLDM_MMU_TIMEOUT_USEC@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movq	_MMU_HOP0_PA43_12@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MMU_HOP0_PA43_12_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %esi
	sarl	%cl, %esi
	callq	_WREG32
	movq	_MMU_HOP0_PA49_44@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MMU_HOP0_PA49_44_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movl	%ebx, %esi
	callq	_WREG32
	movq	_MMU_ASID_BUSY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	%r14d, %esi
	orl	$-2147483648, %esi              ## imm = 0x80000000
	callq	_WREG32
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$1, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	%r15d, %r9d
	callq	_hl_poll_timeout
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GOYA_PLDM_MMU_TIMEOUT_USEC,4,2 ## @GOYA_PLDM_MMU_TIMEOUT_USEC
	.comm	_MMU_CONFIG_TIMEOUT_USEC,4,2    ## @MMU_CONFIG_TIMEOUT_USEC
	.comm	_MMU_HOP0_PA43_12,4,2           ## @MMU_HOP0_PA43_12
	.comm	_MMU_HOP0_PA43_12_SHIFT,4,2     ## @MMU_HOP0_PA43_12_SHIFT
	.comm	_MMU_HOP0_PA49_44,4,2           ## @MMU_HOP0_PA49_44
	.comm	_MMU_HOP0_PA49_44_SHIFT,4,2     ## @MMU_HOP0_PA49_44_SHIFT
	.comm	_MMU_ASID_BUSY,4,2              ## @MMU_ASID_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout during MMU hop0 config of asid %d\n"

	.no_dead_strip	_goya_mmu_update_asid_hop0_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_mmu_update_asid_hop0_addr
_goya_mmu_update_asid_hop0_addr:        ; @goya_mmu_update_asid_hop0_addr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _MMU_CONFIG_TIMEOUT_USEC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMU_CONFIG_TIMEOUT_USEC@GOTPAGEOFF]
Lloh2:
	adrp	x10, _GOYA_PLDM_MMU_TIMEOUT_USEC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GOYA_PLDM_MMU_TIMEOUT_USEC@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
Lloh4:
	adrp	x9, _MMU_HOP0_PA43_12@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MMU_HOP0_PA43_12@GOTPAGEOFF]
	ldr	w22, [x8]
Lloh6:
	ldr	w0, [x9]
Lloh7:
	adrp	x8, _MMU_HOP0_PA43_12_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMU_HOP0_PA43_12_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	asr	w1, w2, w8
	bl	_WREG32
Lloh10:
	adrp	x8, _MMU_HOP0_PA49_44@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMU_HOP0_PA49_44@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _MMU_HOP0_PA49_44_SHIFT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMU_HOP0_PA49_44_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	asr	w1, w21, w8
	bl	_WREG32
Lloh16:
	adrp	x21, _MMU_ASID_BUSY@GOTPAGE
Lloh17:
	ldr	x21, [x21, _MMU_ASID_BUSY@GOTPAGEOFF]
	ldr	w0, [x21]
	orr	w1, w19, #0x80000000
	bl	_WREG32
	ldr	w1, [x21]
	mov	x0, x20
	mov	w3, #1
	mov	w4, #1000
	mov	x5, x22
	bl	_hl_poll_timeout
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_2:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GOYA_PLDM_MMU_TIMEOUT_USEC,4,2 ; @GOYA_PLDM_MMU_TIMEOUT_USEC
	.comm	_MMU_CONFIG_TIMEOUT_USEC,4,2    ; @MMU_CONFIG_TIMEOUT_USEC
	.comm	_MMU_HOP0_PA43_12,4,2           ; @MMU_HOP0_PA43_12
	.comm	_MMU_HOP0_PA43_12_SHIFT,4,2     ; @MMU_HOP0_PA43_12_SHIFT
	.comm	_MMU_HOP0_PA49_44,4,2           ; @MMU_HOP0_PA49_44
	.comm	_MMU_HOP0_PA49_44_SHIFT,4,2     ; @MMU_HOP0_PA49_44_SHIFT
	.comm	_MMU_ASID_BUSY,4,2              ; @MMU_ASID_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout during MMU hop0 config of asid %d\n"

	.no_dead_strip	_goya_mmu_update_asid_hop0_addr
.subsections_via_symbols
