	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goya_validate_dma_pkt_mmu
_goya_validate_dma_pkt_mmu:             ## @goya_validate_dma_pkt_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %ebx
	movl	8(%r15), %edi
	callq	_le64_to_cpu
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %ebx
	movl	12(%r15), %edi
	callq	_le64_to_cpu
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%r12), %ebx
	movq	(%r15), %rdi
	callq	_le32_to_cpu
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r14), %rax
	movq	_GOYA_QUEUE_ID_DMA_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movl	8(%r15), %edi
	callq	_le64_to_cpu
	movl	%eax, %ebx
	movq	(%r15), %rdi
	callq	_le32_to_cpu
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_hl_mem_area_inside_range
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.6:
	addl	$16, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_QUEUE_ID_DMA_1,8,3        ## @GOYA_QUEUE_ID_DMA_1
L_.str.4:                               ## @.str.4
	.asciz	"Can't DMA from host on queue other then 1\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.5:                               ## @.str.5
	.asciz	"Got DMA with size 0, might reset the device\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_goya_validate_dma_pkt_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_mmu
_goya_validate_dma_pkt_mmu:             ; @goya_validate_dma_pkt_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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w22, [x20]
	ldr	w0, [x21, #8]
	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, [x20]
	ldr	w0, [x21, #12]
	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, [x20]
	ldr	x0, [x21]
	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	x8, [x19]
Lloh8:
	adrp	x9, _GOYA_QUEUE_ID_DMA_1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GOYA_QUEUE_ID_DMA_1@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x21, #8]
	bl	_le64_to_cpu
	mov	x22, x0
	ldr	x0, [x21]
	bl	_le32_to_cpu
	mov	x1, x0
	ldp	w3, w2, [x20, #4]
	mov	x0, x22
	bl	_hl_mem_area_inside_range
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EFAULT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.4:
	mov	w0, #0
	ldr	w8, [x19, #8]
	add	w8, w8, #16
	str	w8, [x19, #8]
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20]
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.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_QUEUE_ID_DMA_1,8,3        ; @GOYA_QUEUE_ID_DMA_1
l_.str.4:                               ; @.str.4
	.asciz	"Can't DMA from host on queue other then 1\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.5:                               ; @.str.5
	.asciz	"Got DMA with size 0, might reset the device\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_goya_validate_dma_pkt_mmu
.subsections_via_symbols
