	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_vm_packet3_cp_dma_check
_si_vm_packet3_cp_dma_check:            ## @si_vm_packet3_cp_dma_check
	.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	%rdi, %r12
	movslq	%esi, %r15
	movl	16(%rdi,%r15,4), %r14d
	movl	4(%rdi,%r15,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PACKET3_CP_DMA_CMD_SAS@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_9
## %bb.1:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	andl	$1610612736, %eax               ## imm = 0x60000000
	jne	LBB0_9
## %bb.2:
	movl	(%r12,%r15,4), %ebx
	movq	_PACKET3_CP_DMA_CMD_SAIC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.3:
	shll	$2, %ebx
	movl	%ebx, %edi
	callq	_si_vm_reg_valid
	testl	%eax, %eax
	jne	LBB0_9
LBB0_18:
	leaq	L_.str(%rip), %r15
	jmp	LBB0_19
LBB0_5:
	movl	%r14d, %r13d
	andl	$2097151, %r13d                 ## imm = 0x1FFFFF
	je	LBB0_9
## %bb.6:
	shll	$2, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_si_vm_reg_valid
	testl	%eax, %eax
	je	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	addl	$4, %ebx
	decl	%r13d
	jne	LBB0_7
LBB0_9:
	movq	_PACKET3_CP_DMA_CMD_DAS@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	testl	%r14d, (%rax)
	je	LBB0_20
## %bb.10:
	andl	$3145728, -44(%rbp)             ## 4-byte Folded Spill
                                        ## imm = 0x300000
	jne	LBB0_20
## %bb.11:
	movl	8(%r12,%r15,4), %ebx
	movq	_PACKET3_CP_DMA_CMD_DAIC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_14
## %bb.12:
	movl	%ebx, %edi
	callq	_si_vm_reg_valid
	testl	%eax, %eax
	jne	LBB0_20
## %bb.13:
	leaq	L_.str.1(%rip), %r15
LBB0_19:
	movq	%r15, %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_20:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	andl	$2097151, %r14d                 ## imm = 0x1FFFFF
	je	LBB0_20
## %bb.15:
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_si_vm_reg_valid
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	addl	$4, %ebx
	decl	%r14d
	jne	LBB0_16
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET3_CP_DMA_CMD_SAS,4,2     ## @PACKET3_CP_DMA_CMD_SAS
	.comm	_PACKET3_CP_DMA_CMD_SAIC,4,2    ## @PACKET3_CP_DMA_CMD_SAIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CP DMA Bad SRC register\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PACKET3_CP_DMA_CMD_DAS,4,2     ## @PACKET3_CP_DMA_CMD_DAS
	.comm	_PACKET3_CP_DMA_CMD_DAIC,4,2    ## @PACKET3_CP_DMA_CMD_DAIC
L_.str.1:                               ## @.str.1
	.asciz	"CP DMA Bad DST register\n"

	.no_dead_strip	_si_vm_packet3_cp_dma_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_vm_packet3_cp_dma_check
_si_vm_packet3_cp_dma_check:            ; @si_vm_packet3_cp_dma_check
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	add	x8, x0, w1, sxtw #2
	ldr	w23, [x8, #16]
Lloh0:
	adrp	x9, _PACKET3_CP_DMA_CMD_SAS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PACKET3_CP_DMA_CMD_SAS@GOTPAGEOFF]
	ldr	w24, [x8, #4]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w23
	and	w10, w24, #0x60000000
	cmp	w9, #0
	ccmp	w10, #0, #0, ne
	b.ne	LBB0_8
; %bb.1:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PACKET3_CP_DMA_CMD_SAIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PACKET3_CP_DMA_CMD_SAIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w23
	b.eq	LBB0_4
; %bb.2:
	lsl	w0, w8, #2
	bl	_si_vm_reg_valid
	cbnz	w0, LBB0_8
; %bb.3:
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_12
LBB0_4:
	ands	w25, w23, #0x1fffff
	b.eq	LBB0_8
; %bb.5:
	lsl	w22, w8, #2
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_si_vm_reg_valid
	cbz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #4
	subs	w25, w25, #1
	b.ne	LBB0_6
LBB0_8:
Lloh10:
	adrp	x8, _PACKET3_CP_DMA_CMD_DAS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PACKET3_CP_DMA_CMD_DAS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w23
	and	w9, w24, #0x300000
	cmp	w8, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_17
; %bb.9:
	sxtw	x8, w20
	add	x8, x19, x8, lsl #2
	ldr	w19, [x8, #8]
Lloh13:
	adrp	x8, _PACKET3_CP_DMA_CMD_DAIC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PACKET3_CP_DMA_CMD_DAIC@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_13
; %bb.10:
	mov	x0, x19
	bl	_si_vm_reg_valid
	cbnz	w0, LBB0_17
; %bb.11:
Lloh16:
	adrp	x21, l_.str.1@PAGE
Lloh17:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_12:
	mov	x0, x21
	bl	_DRM_ERROR
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_13:
	ands	w20, w23, #0x1fffff
	b.eq	LBB0_17
; %bb.14:
Lloh21:
	adrp	x21, l_.str.1@PAGE
Lloh22:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_si_vm_reg_valid
	cbz	w0, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w19, w19, #4
	subs	w20, w20, #1
	b.ne	LBB0_15
LBB0_17:
	mov	w0, #0
LBB0_18:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET3_CP_DMA_CMD_SAS,4,2     ; @PACKET3_CP_DMA_CMD_SAS
	.comm	_PACKET3_CP_DMA_CMD_SAIC,4,2    ; @PACKET3_CP_DMA_CMD_SAIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CP DMA Bad SRC register\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PACKET3_CP_DMA_CMD_DAS,4,2     ; @PACKET3_CP_DMA_CMD_DAS
	.comm	_PACKET3_CP_DMA_CMD_DAIC,4,2    ; @PACKET3_CP_DMA_CMD_DAIC
l_.str.1:                               ; @.str.1
	.asciz	"CP DMA Bad DST register\n"

	.no_dead_strip	_si_vm_packet3_cp_dma_check
.subsections_via_symbols
