	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_verify_command_stream      ## -- Begin function via_verify_command_stream
	.p2align	4, 0x90
_via_verify_command_stream:             ## @via_verify_command_stream
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)
	movq	(%rdx), %r14
	movq	48(%r14), %rax
	movq	%rax, -80(%rbp)
	movups	16(%r14), %xmm0
	movups	32(%r14), %xmm1
	movaps	%xmm1, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	(%r14), %r13
	movq	_VIA_PRO_GROUP_A@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	sete	-41(%rbp)                       ## 1-byte Folded Spill
	movq	_VIA_DX9_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %r13
	sete	%al
	movq	%rdx, 48(%r14)
	movq	_no_sequence@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 40(%r14)
	movq	$0, 32(%r14)
	movl	%ecx, 16(%r14)
	movq	%rdi, 24(%r14)
	movq	$0, 8(%r14)
	xorl	%ecx, %ecx
	cmpl	$4, %esi
	jb	LBB0_23
## %bb.1:
	movl	%esi, %ebx
	addq	$16, %r14
	andl	$-4, %ebx
	addq	%rdi, %rbx
	orb	%al, -41(%rbp)                  ## 1-byte Folded Spill
	movl	$133, %eax
	leaq	LJTI0_0(%rip), %r12
	leaq	-64(%rbp), %r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_via_check_vheader6
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rdi
	cmpq	%rbx, %rdi
	jae	LBB0_21
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_via_check_vheader5
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_via_check_header2
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_via_check_header1
	jmp	LBB0_3
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_HALCYON_HEADER2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%rdi), %esi
	cmpl	%esi, %ecx
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$130, %eax
	cmpq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_4
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_HALCYON_HEADER1MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%esi, %edx
	movl	$131, %eax
	movq	_HALCYON_HEADER1@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	je	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_VIA_VIDEOMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%esi, %edx
	movl	$129, %eax
	movq	_VIA_VIDEO_HEADER5@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	je	LBB0_4
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$128, %eax
	movq	_VIA_VIDEO_HEADER6@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	je	LBB0_4
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%ecx, %esi
	jne	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	-56(%rbp), %r13                 ## 8-byte Folded Reload
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$132, %eax
	jmp	LBB0_4
LBB0_21:
	xorl	%ecx, %ecx
	cmpl	$132, %eax
	jne	LBB0_23
LBB0_22:
	movq	-80(%rbp), %rax
	movq	%rax, 32(%r14)
	movaps	-112(%rbp), %xmm0
	movaps	-96(%rbp), %xmm1
	movups	%xmm1, 16(%r14)
	movups	%xmm0, (%r14)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_23:
	movl	%ecx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_22
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_VIA_PRO_GROUP_A,8,3            ## @VIA_PRO_GROUP_A
	.comm	_VIA_DX9_0,8,3                  ## @VIA_DX9_0
	.comm	_no_sequence,4,2                ## @no_sequence
	.comm	_HALCYON_HEADER2,4,2            ## @HALCYON_HEADER2
	.comm	_HALCYON_HEADER1MASK,4,2        ## @HALCYON_HEADER1MASK
	.comm	_HALCYON_HEADER1,4,2            ## @HALCYON_HEADER1
	.comm	_VIA_VIDEOMASK,4,2              ## @VIA_VIDEOMASK
	.comm	_VIA_VIDEO_HEADER5,4,2          ## @VIA_VIDEO_HEADER5
	.comm	_VIA_VIDEO_HEADER6,4,2          ## @VIA_VIDEO_HEADER6
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Accelerated 3D is not supported on this chipset yet.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid / Unimplemented DMA HEADER command. 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_verify_command_stream      ; -- Begin function via_verify_command_stream
	.p2align	2
_via_verify_command_stream:             ; @via_verify_command_stream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x2]
	ldp	q0, q1, [x8, #16]
	stp	q0, q1, [sp, #16]
	ldr	x9, [x8, #48]
	stp	x9, x0, [sp, #48]
Lloh0:
	adrp	x9, _VIA_PRO_GROUP_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VIA_PRO_GROUP_A@GOTPAGEOFF]
	ldr	x23, [x8]
Lloh2:
	ldr	x9, [x9]
	cmp	x23, x9
Lloh3:
	adrp	x9, _VIA_DX9_0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VIA_DX9_0@GOTPAGEOFF]
Lloh5:
	ldr	x24, [x9]
	ccmp	x23, x24, #4, ne
	cset	w25, eq
	str	x2, [x8, #48]
Lloh6:
	adrp	x9, _no_sequence@GOTPAGE
Lloh7:
	ldr	x9, [x9, _no_sequence@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x8, #40]
	str	w3, [x8, #16]
	stp	x0, xzr, [x8, #24]
	str	xzr, [x8, #8]
	cmp	w1, #4
	b.lo	LBB0_25
; %bb.1:
	add	x19, x8, #16
	and	w8, w1, #0xfffffffc
	add	x20, x0, x8
	mov	w8, #133
Lloh9:
	adrp	x26, lJTI0_0@PAGE
Lloh10:
	add	x26, x26, lJTI0_0@PAGEOFF
Lloh11:
	adrp	x27, _HALCYON_HEADER2@GOTPAGE
Lloh12:
	ldr	x27, [x27, _HALCYON_HEADER2@GOTPAGEOFF]
Lloh13:
	adrp	x28, _HALCYON_HEADER1MASK@GOTPAGE
Lloh14:
	ldr	x28, [x28, _HALCYON_HEADER1MASK@GOTPAGEOFF]
Lloh15:
	adrp	x21, _HALCYON_HEADER1@GOTPAGE
Lloh16:
	ldr	x21, [x21, _HALCYON_HEADER1@GOTPAGEOFF]
Lloh17:
	adrp	x22, _VIA_VIDEO_HEADER5@GOTPAGE
Lloh18:
	ldr	x22, [x22, _VIA_VIDEO_HEADER5@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #56
	mov	x1, x20
	bl	_via_check_vheader6
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x0
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #56]
	cmp	x0, x20
	b.hs	LBB0_23
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_24
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x26, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #56
	mov	x1, x20
	bl	_via_check_vheader5
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #56
	mov	x1, x20
	mov	x2, x19
	bl	_via_check_header2
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #56
	mov	x1, x20
	bl	_via_check_header1
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x27]
	ldr	w8, [x0]
	cmp	w9, w8
	ccmp	x23, x24, #4, eq
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x28]
	and	w10, w10, w8
	ldr	w11, [x21]
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #131
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #130
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w25, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh19:
	adrp	x10, _VIA_VIDEOMASK@GOTPAGE
Lloh20:
	ldr	x10, [x10, _VIA_VIDEOMASK@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	and	w10, w10, w8
	ldr	w11, [x22]
	cmp	w10, w11
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #129
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh22:
	adrp	x11, _VIA_VIDEO_HEADER6@GOTPAGE
Lloh23:
	ldr	x11, [x11, _VIA_VIDEO_HEADER6@GOTPAGEOFF]
Lloh24:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #128
	b	LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, w9
	ccmp	x23, x24, #0, eq
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_DRM_ERROR
	mov	w8, #132
	b	LBB0_4
LBB0_23:
	cmp	w8, #132
	b.ne	LBB0_25
LBB0_24:
	ldp	q0, q1, [sp, #16]
	stp	q0, q1, [x19]
	ldr	x8, [sp, #48]
	str	x8, [x19, #32]
Lloh29:
	adrp	x8, _EINVAL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_26
LBB0_25:
	mov	w0, #0
LBB0_26:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_24-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_VIA_PRO_GROUP_A,8,3            ; @VIA_PRO_GROUP_A
	.comm	_VIA_DX9_0,8,3                  ; @VIA_DX9_0
	.comm	_no_sequence,4,2                ; @no_sequence
	.comm	_HALCYON_HEADER2,4,2            ; @HALCYON_HEADER2
	.comm	_HALCYON_HEADER1MASK,4,2        ; @HALCYON_HEADER1MASK
	.comm	_HALCYON_HEADER1,4,2            ; @HALCYON_HEADER1
	.comm	_VIA_VIDEOMASK,4,2              ; @VIA_VIDEOMASK
	.comm	_VIA_VIDEO_HEADER5,4,2          ; @VIA_VIDEO_HEADER5
	.comm	_VIA_VIDEO_HEADER6,4,2          ; @VIA_VIDEO_HEADER6
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Accelerated 3D is not supported on this chipset yet.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid / Unimplemented DMA HEADER command. 0x%x\n"

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