	.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_host
_goya_validate_dma_pkt_no_host:         ## @goya_validate_dma_pkt_no_host
	.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, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	12(%rdx), %edi
	callq	_le32_to_cpu
	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
	movl	(%r14), %edi
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	8(%rbx), %edi
	callq	_le64_to_cpu
	movl	%eax, %r12d
	movl	4(%rbx), %edi
	callq	_le64_to_cpu
	movl	%eax, %r13d
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	8(%rbx), %edi
	callq	_le64_to_cpu
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	callq	_le64_to_cpu
	movl	%eax, %r12d
LBB0_3:
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movl	12(%r14), %ecx
	movl	16(%r14), %edx
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_hl_mem_area_inside_range
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_hl_mem_area_inside_range
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	addl	$16, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	(%r14), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	jmp	LBB0_5
LBB0_7:
	movl	(%r14), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.3(%rip), %rsi
	movl	%r12d, %edx
LBB0_5:
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.comm	_DMA_DRAM_TO_SRAM,4,2           ## @DMA_DRAM_TO_SRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA direction is DRAM --> SRAM\n"

L_.str.1:                               ## @.str.1
	.asciz	"DMA direction is SRAM --> DRAM\n"

L_.str.2:                               ## @.str.2
	.asciz	"SRAM address 0x%llx + 0x%x is invalid\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.3:                               ## @.str.3
	.asciz	"DRAM address 0x%llx + 0x%x is invalid\n"

	.no_dead_strip	_goya_validate_dma_pkt_no_host
.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_host
_goya_validate_dma_pkt_no_host:         ; @goya_validate_dma_pkt_no_host
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x2, #12]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh3:
	adrp	x9, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GOYA_PKT_LIN_DMA_CTL_DMA_DIR_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh6:
	adrp	x9, _DMA_DRAM_TO_SRAM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_DRAM_TO_SRAM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	w0, [x21]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #8]
	bl	_le64_to_cpu
	mov	x22, x0
	ldr	w0, [x19, #4]
	bl	_le64_to_cpu
	mov	x23, x0
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #8]
	bl	_le64_to_cpu
	mov	x23, x0
	ldr	w0, [x19, #4]
	bl	_le64_to_cpu
	mov	x22, x0
LBB0_3:
	ldr	w0, [x19]
	bl	_le32_to_cpu
	mov	x1, x0
	ldp	w3, w2, [x21, #12]
	mov	x0, x23
	bl	_hl_mem_area_inside_range
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x19]
	bl	_le32_to_cpu
	mov	x1, x0
	ldp	w3, w2, [x21, #4]
	mov	x0, x22
	bl	_hl_mem_area_inside_range
	cbz	w0, LBB0_7
; %bb.5:
	mov	w0, #0
	ldr	w8, [x20]
	add	w8, w8, #16
	str	w8, [x20]
	b	LBB0_9
LBB0_6:
	ldr	w0, [x21]
	ldr	w3, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	b	LBB0_8
LBB0_7:
	ldr	w0, [x21]
	ldr	w3, [x19]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x22
LBB0_8:
	bl	_dev_err
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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
	.comm	_DMA_DRAM_TO_SRAM,4,2           ; @DMA_DRAM_TO_SRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA direction is DRAM --> SRAM\n"

l_.str.1:                               ; @.str.1
	.asciz	"DMA direction is SRAM --> DRAM\n"

l_.str.2:                               ; @.str.2
	.asciz	"SRAM address 0x%llx + 0x%x is invalid\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.3:                               ; @.str.3
	.asciz	"DRAM address 0x%llx + 0x%x is invalid\n"

	.no_dead_strip	_goya_validate_dma_pkt_no_host
.subsections_via_symbols
