	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_cmdbuf_start
_via_cmdbuf_start:                      ## @via_cmdbuf_start
	.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, %r14
	movq	$0, 48(%rdi)
	movl	(%rdi), %eax
	addl	32(%rdi), %eax
	movl	4(%rdi), %ebx
	addl	%eax, %ebx
	movq	_HC_SubA_HAGPBstL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$24, %ecx
	movl	%eax, %r15d
	andl	$16777215, %r15d                ## imm = 0xFFFFFF
	orl	%ecx, %r15d
	movq	_HC_SubA_HAGPBendL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$24, %ecx
	movl	%ebx, %r12d
	andl	$16777215, %r12d                ## imm = 0xFFFFFF
	orl	%ecx, %r12d
	movq	_HC_SubA_HAGPCMNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$24, %ecx
	sarl	$24, %eax
	shrl	$16, %ebx
	andl	$65280, %ebx                    ## imm = 0xFF00
	orl	%eax, %ebx
	orl	%ecx, %ebx
	movq	_HC_HAGPBpID_PAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %r8
	xorl	%edx, %edx
	movl	$1, %r9d
	callq	_via_align_cmd
	decq	%rax
	movq	%rax, 40(%r14)
	xorl	%eax, %eax
	callq	_via_flush_write_combine
	movq	40(%r14), %rax
	movl	(%rax), %eax
	movq	_VIA_REG_TRANSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HC_ParaType_PreCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %esi
	callq	_VIA_WRITE
	movq	_VIA_REG_TRANSPACE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_VIA_WRITE
	movl	(%r13), %edi
	movl	%r15d, %esi
	callq	_VIA_WRITE
	movl	(%r13), %edi
	movl	%r12d, %esi
	callq	_VIA_WRITE
	movl	(%r13), %edi
	movl	-44(%rbp), %esi
	callq	_VIA_WRITE
	movl	(%r13), %edi
	movl	-48(%rbp), %esi
	callq	_VIA_WRITE
	xorl	%eax, %eax
	callq	_DRM_WRITEMEMORYBARRIER
	movl	(%r13), %edi
	movq	_HC_HAGPCMNT_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_VIA_WRITE
	movl	(%r13), %edi
	callq	_VIA_READ
	movl	$0, 8(%r14)
	movl	$-10000000, %ebx                ## imm = 0xFF676980
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1052, %edi                     ## imm = 0x41C
	callq	_VIA_READ
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_1
LBB0_3:
	movq	16(%r14), %rax
	movl	40(%r14), %ecx
	subl	24(%r14), %ecx
	addl	(%r14), %ecx
	addl	32(%r14), %ecx
	subl	(%rax), %ecx
	addl	$4, %ecx
	movl	%ecx, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HC_SubA_HAGPBstL,4,2           ## @HC_SubA_HAGPBstL
	.comm	_HC_SubA_HAGPBendL,4,2          ## @HC_SubA_HAGPBendL
	.comm	_HC_SubA_HAGPCMNT,4,2           ## @HC_SubA_HAGPCMNT
	.comm	_HC_HAGPBpID_PAUSE,4,2          ## @HC_HAGPBpID_PAUSE
	.comm	_VIA_REG_TRANSET,4,2            ## @VIA_REG_TRANSET
	.comm	_HC_ParaType_PreCR,4,2          ## @HC_ParaType_PreCR
	.comm	_VIA_REG_TRANSPACE,4,2          ## @VIA_REG_TRANSPACE
	.comm	_HC_HAGPCMNT_MASK,4,2           ## @HC_HAGPCMNT_MASK
	.no_dead_strip	_via_cmdbuf_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_cmdbuf_start
_via_cmdbuf_start:                      ; @via_cmdbuf_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	str	xzr, [x0, #48]
	ldr	w8, [x0, #32]
	ldp	w9, w10, [x0]
Lloh0:
	adrp	x11, _HC_SubA_HAGPBstL@GOTPAGE
Lloh1:
	ldr	x11, [x11, _HC_SubA_HAGPBstL@GOTPAGEOFF]
	add	w22, w9, w8
	add	w21, w22, w10
Lloh2:
	ldr	w8, [x11]
Lloh3:
	adrp	x9, _HC_SubA_HAGPBendL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HC_SubA_HAGPBendL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _HC_SubA_HAGPCMNT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _HC_SubA_HAGPCMNT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	lsl	w10, w10, #24
	orr	w10, w10, w22, asr #24
	bfi	w22, w8, #24, #8
	lsr	w8, w21, #16
	bfi	w21, w9, #24, #8
	and	w8, w8, #0xff00
	orr	w20, w10, w8
Lloh9:
	adrp	x8, _HC_HAGPBpID_PAUSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HC_HAGPBpID_PAUSE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x3, sp, #8
	add	x4, sp, #12
	mov	w2, #0
	mov	w5, #1
	bl	_via_align_cmd
	sub	x8, x0, #1
	str	x8, [x19, #40]
	bl	_via_flush_write_combine
	ldr	x8, [x19, #40]
Lloh12:
	adrp	x9, _VIA_REG_TRANSET@GOTPAGE
Lloh13:
	ldr	x9, [x9, _VIA_REG_TRANSET@GOTPAGEOFF]
	ldr	wzr, [x8]
Lloh14:
	ldr	w0, [x9]
Lloh15:
	adrp	x8, _HC_ParaType_PreCR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HC_ParaType_PreCR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	lsl	w1, w8, #16
	bl	_VIA_WRITE
Lloh18:
	adrp	x23, _VIA_REG_TRANSPACE@GOTPAGE
Lloh19:
	ldr	x23, [x23, _VIA_REG_TRANSPACE@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x20
	bl	_VIA_WRITE
	ldr	w0, [x23]
	mov	x1, x22
	bl	_VIA_WRITE
	ldr	w0, [x23]
	mov	x1, x21
	bl	_VIA_WRITE
	ldr	w0, [x23]
	ldr	w1, [sp, #8]
	bl	_VIA_WRITE
	ldr	w0, [x23]
	ldr	w1, [sp, #12]
	bl	_VIA_WRITE
	bl	_DRM_WRITEMEMORYBARRIER
	ldr	w0, [x23]
Lloh20:
	adrp	x8, _HC_HAGPCMNT_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _HC_HAGPCMNT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w1, w8, w20
	bl	_VIA_WRITE
	ldr	w0, [x23]
	bl	_VIA_READ
	str	wzr, [x19, #8]
	mov	w8, #27008
	movk	w8, #65383, lsl #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x8
	mov	w0, #1052
	bl	_VIA_READ
	tbnz	w0, #31, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w20, #1
	cbnz	w20, LBB0_1
LBB0_3:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	ldr	w10, [x19, #24]
	ldr	w11, [x19]
	sub	w9, w9, w10
	add	w9, w9, w11
	ldr	w10, [x19, #32]
	add	w9, w9, w10
	sub	w8, w9, w8
	add	w8, w8, #4
	str	w8, [x19, #8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HC_SubA_HAGPBstL,4,2           ; @HC_SubA_HAGPBstL
	.comm	_HC_SubA_HAGPBendL,4,2          ; @HC_SubA_HAGPBendL
	.comm	_HC_SubA_HAGPCMNT,4,2           ; @HC_SubA_HAGPCMNT
	.comm	_HC_HAGPBpID_PAUSE,4,2          ; @HC_HAGPBpID_PAUSE
	.comm	_VIA_REG_TRANSET,4,2            ; @VIA_REG_TRANSET
	.comm	_HC_ParaType_PreCR,4,2          ; @HC_ParaType_PreCR
	.comm	_VIA_REG_TRANSPACE,4,2          ; @VIA_REG_TRANSPACE
	.comm	_HC_HAGPCMNT_MASK,4,2           ; @HC_HAGPCMNT_MASK
	.no_dead_strip	_via_cmdbuf_start
.subsections_via_symbols
