	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_validate_dma_pkt_no_mmu
_goya_validate_dma_pkt_no_mmu:          ## @goya_validate_dma_pkt_no_mmu
	.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, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r15), %ebx
	movl	20(%r13), %edi
	callq	_le64_to_cpu
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r15), %ebx
	movl	16(%r13), %edi
	callq	_le64_to_cpu
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r15), %ebx
	movq	(%r13), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	8(%r13), %rdi
	callq	_le32_to_cpu
	cmpq	$0, (%r13)
	je	LBB0_4
## %bb.1:
	movq	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_DMA_DRAM_TO_SRAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.2:
	movq	_DMA_SRAM_TO_DRAM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_goya_validate_dma_pkt_host     ## TAILCALL
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_goya_validate_dma_pkt_no_host  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA packet details:\n"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"size == %u\n"

	.comm	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK,4,2 ## @GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK
	.comm	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT,4,2 ## @GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT
L_.str.4:                               ## @.str.4
	.asciz	"Got DMA with size 0, might reset the device\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_DRAM_TO_SRAM,4,2           ## @DMA_DRAM_TO_SRAM
	.comm	_DMA_SRAM_TO_DRAM,4,2           ## @DMA_SRAM_TO_DRAM
	.no_dead_strip	_goya_validate_dma_pkt_no_mmu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goya_validate_dma_pkt_no_mmu
_goya_validate_dma_pkt_no_mmu:          ; @goya_validate_dma_pkt_no_mmu
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w22, [x21]
	ldr	w0, [x19, #20]
	bl	_le64_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	ldr	w22, [x21]
	ldr	w0, [x19, #16]
	bl	_le64_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	ldr	w22, [x21]
	ldr	x0, [x19]
	bl	_le32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	bl	_dev_dbg
	ldr	x0, [x19, #8]
	bl	_le32_to_cpu
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh11:
	adrp	x9, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh14:
	adrp	x9, _DMA_DRAM_TO_SRAM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMA_DRAM_TO_SRAM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _DMA_SRAM_TO_DRAM@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DMA_SRAM_TO_DRAM@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w8, w9
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_4
; %bb.2:
	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
	b	_goya_validate_dma_pkt_no_host
LBB0_3:
	ldr	w0, [x21]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_4:
	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
	b	_goya_validate_dma_pkt_host
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA packet details:\n"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"size == %u\n"

	.comm	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK,4,2 ; @GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK
	.comm	_GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT,4,2 ; @GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT
l_.str.4:                               ; @.str.4
	.asciz	"Got DMA with size 0, might reset the device\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_DRAM_TO_SRAM,4,2           ; @DMA_DRAM_TO_SRAM
	.comm	_DMA_SRAM_TO_DRAM,4,2           ; @DMA_SRAM_TO_DRAM
	.no_dead_strip	_goya_validate_dma_pkt_no_mmu
.subsections_via_symbols
