	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_validate_wreg32
_goya_validate_wreg32:                  ## @goya_validate_wreg32
	.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	%rdx, %r15
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	_GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %r13d
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_mmDMA_CH_0_WR_COMP_ADDR_LO@GOTPCREL(%rip), %rax
	movl	$8191, %ecx                     ## imm = 0x1FFF
	andl	(%rax), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_1
## %bb.2:
	movq	_HW_CAP_MMU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	jne	LBB0_7
## %bb.3:
	movq	_CFG_BASE@GOTPCREL(%rip), %r13
	movq	_mmSYNC_MNGR_SOB_OBJ_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_lower_32_bits
	movl	%eax, %ebx
	movq	_mmSYNC_MNGR_SOB_OBJ_1023@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_lower_32_bits
	movl	%eax, %r13d
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	cmpl	%ebx, %eax
	jl	LBB0_5
## %bb.4:
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	cmpl	%r13d, %eax
	jle	LBB0_7
LBB0_5:
	movl	(%r12), %edi
	movl	4(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK,4,2 ## @GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WREG32 packet details:\n"

L_.str.1:                               ## @.str.1
	.asciz	"reg_offset == 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"value      == 0x%x\n"

	.comm	_mmDMA_CH_0_WR_COMP_ADDR_LO,4,2 ## @mmDMA_CH_0_WR_COMP_ADDR_LO
L_.str.3:                               ## @.str.3
	.asciz	"WREG32 packet with illegal address 0x%x\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_HW_CAP_MMU,4,2                 ## @HW_CAP_MMU
	.comm	_CFG_BASE,8,3                   ## @CFG_BASE
	.comm	_mmSYNC_MNGR_SOB_OBJ_0,8,3      ## @mmSYNC_MNGR_SOB_OBJ_0
	.comm	_mmSYNC_MNGR_SOB_OBJ_1023,8,3   ## @mmSYNC_MNGR_SOB_OBJ_1023
L_.str.4:                               ## @.str.4
	.asciz	"WREG32 packet with illegal value 0x%x\n"

	.no_dead_strip	_goya_validate_wreg32
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_validate_wreg32
_goya_validate_wreg32:                  ; @goya_validate_wreg32
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x19, x0
	ldr	x23, [x0, #8]
	ldr	w0, [x2]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w21, w8, w0
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19]
	str	x21, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w22, [x19]
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
Lloh9:
	adrp	x8, _mmDMA_CH_0_WR_COMP_ADDR_LO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mmDMA_CH_0_WR_COMP_ADDR_LO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, #0x1fff
	cmp	w21, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x23]
Lloh12:
	adrp	x9, _HW_CAP_MMU@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HW_CAP_MMU@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x21
	b	LBB0_7
LBB0_4:
Lloh17:
	adrp	x21, _CFG_BASE@GOTPAGE
Lloh18:
	ldr	x21, [x21, _CFG_BASE@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh19:
	adrp	x9, _mmSYNC_MNGR_SOB_OBJ_0@GOTPAGE
Lloh20:
	ldr	x9, [x9, _mmSYNC_MNGR_SOB_OBJ_0@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_lower_32_bits
	mov	x22, x0
	ldr	x8, [x21]
Lloh22:
	adrp	x9, _mmSYNC_MNGR_SOB_OBJ_1023@GOTPAGE
Lloh23:
	ldr	x9, [x9, _mmSYNC_MNGR_SOB_OBJ_1023@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_lower_32_bits
	mov	x21, x0
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	cmp	w0, w22
	b.lt	LBB0_6
; %bb.5:
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	cmp	w0, w21
	b.le	LBB0_2
LBB0_6:
	ldr	w0, [x19]
	ldr	w2, [x20, #4]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_7:
	bl	_dev_err
Lloh27:
	adrp	x8, _EPERM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK,4,2 ; @GOYA_PKT_WREG32_CTL_REG_OFFSET_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WREG32 packet details:\n"

l_.str.1:                               ; @.str.1
	.asciz	"reg_offset == 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"value      == 0x%x\n"

	.comm	_mmDMA_CH_0_WR_COMP_ADDR_LO,4,2 ; @mmDMA_CH_0_WR_COMP_ADDR_LO
l_.str.3:                               ; @.str.3
	.asciz	"WREG32 packet with illegal address 0x%x\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_HW_CAP_MMU,4,2                 ; @HW_CAP_MMU
	.comm	_CFG_BASE,8,3                   ; @CFG_BASE
	.comm	_mmSYNC_MNGR_SOB_OBJ_0,8,3      ; @mmSYNC_MNGR_SOB_OBJ_0
	.comm	_mmSYNC_MNGR_SOB_OBJ_1023,8,3   ; @mmSYNC_MNGR_SOB_OBJ_1023
l_.str.4:                               ; @.str.4
	.asciz	"WREG32 packet with illegal value 0x%x\n"

	.no_dead_strip	_goya_validate_wreg32
.subsections_via_symbols
