	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_align_cmd
_via_align_cmd:                         ## @via_align_cmd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r12
	testl	%r9d, %r9d
	jne	LBB0_2
## %bb.1:
	movq	_CMDBUF_ALIGNMENT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	%r12, %rdi
	callq	_via_cmdbuf_wait
LBB0_2:
	movq	%r12, %rdi
	callq	_via_get_dma
	movq	_HC_HEADER2@GOTPCREL(%rip), %rcx
	movq	_VIA_REG_TRANSET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	$-4, %edx
	shll	$10, %edx
	orl	(%rcx), %edx
	movq	%rax, %r14
	movq	_VIA_REG_TRANSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	sarl	$2, %edi
	orl	%edx, %edi
	movq	_HC_ParaType_PreCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %esi
	callq	_VIA_OUT_RING_QW
	movq	_CMDBUF_ALIGNMENT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	sarl	$3, %edx
	movl	4(%r12), %eax
	movq	_CMDBUF_ALIGNMENT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	sarl	$3, %ecx
	subl	%ecx, %edx
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movl	8(%r12), %ecx
	leal	(%rax,%rdx,8), %eax
	addl	(%r12), %eax
	leal	(%rcx,%rax), %ebx
	addl	$-8, %ebx
LBB0_4:
	movq	_HC_SubA_HAGPBpL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_HC_HAGPBpID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r13d
	shll	$24, %eax
	orl	%eax, %r13d
	movq	_HC_HAGPBpL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	%ebx, %r15d
	orl	%r13d, %r15d
	movq	_HC_SubA_HAGPBpH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$24, %eax
	sarl	$24, %ebx
	orl	%eax, %ebx
	decl	%edx
	movq	%r12, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_via_align_buffer
	movq	%rax, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_VIA_OUT_RING_QW
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMDBUF_ALIGNMENT_SIZE,4,2      ## @CMDBUF_ALIGNMENT_SIZE
	.comm	_HC_HEADER2,4,2                 ## @HC_HEADER2
	.comm	_VIA_REG_TRANSET,4,2            ## @VIA_REG_TRANSET
	.comm	_VIA_REG_TRANSPACE,4,2          ## @VIA_REG_TRANSPACE
	.comm	_HC_ParaType_PreCR,4,2          ## @HC_ParaType_PreCR
	.comm	_CMDBUF_ALIGNMENT_MASK,4,2      ## @CMDBUF_ALIGNMENT_MASK
	.comm	_HC_SubA_HAGPBpL,4,2            ## @HC_SubA_HAGPBpL
	.comm	_HC_HAGPBpID_MASK,4,2           ## @HC_HAGPBpID_MASK
	.comm	_HC_HAGPBpL_MASK,4,2            ## @HC_HAGPBpL_MASK
	.comm	_HC_SubA_HAGPBpH,4,2            ## @HC_SubA_HAGPBpH
	.no_dead_strip	_via_align_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_align_cmd
_via_align_cmd:                         ; @via_align_cmd
	.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	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x25, _CMDBUF_ALIGNMENT_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _CMDBUF_ALIGNMENT_SIZE@GOTPAGEOFF]
	cbnz	w5, LBB0_2
; %bb.1:
	ldr	w8, [x25]
	lsl	w1, w8, #1
	mov	x0, x21
	bl	_via_cmdbuf_wait
LBB0_2:
	mov	x0, x21
	bl	_via_get_dma
	mov	x24, x0
Lloh2:
	adrp	x8, _HC_HEADER2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HC_HEADER2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _VIA_REG_TRANSET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VIA_REG_TRANSET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w9, #10
	and	w9, w9, #0xfffff000
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _VIA_REG_TRANSPACE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VIA_REG_TRANSPACE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w0, w8, w9, asr #2
Lloh11:
	adrp	x8, _HC_ParaType_PreCR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HC_ParaType_PreCR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	w1, w8, #16
	bl	_VIA_OUT_RING_QW
	ldr	w8, [x25]
	asr	w8, w8, #3
	ldr	w9, [x21, #4]
Lloh14:
	adrp	x10, _CMDBUF_ALIGNMENT_MASK@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CMDBUF_ALIGNMENT_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w10, w10, w9
	sub	w8, w8, w10, asr #3
	cbnz	w22, LBB0_4
; %bb.3:
	ldr	w10, [x21]
	ldr	w11, [x21, #8]
	add	w9, w9, w8, lsl #3
	add	w9, w9, w10
	add	w9, w9, w11
	sub	w22, w9, #8
LBB0_4:
Lloh17:
	adrp	x9, _HC_SubA_HAGPBpL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _HC_SubA_HAGPBpL@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _HC_HAGPBpID_MASK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _HC_HAGPBpID_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	and	w10, w10, w23
	orr	w9, w10, w9, lsl #24
Lloh23:
	adrp	x10, _HC_HAGPBpL_MASK@GOTPAGE
Lloh24:
	ldr	x10, [x10, _HC_HAGPBpL_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	and	w10, w10, w22
	orr	w23, w9, w10
Lloh26:
	adrp	x9, _HC_SubA_HAGPBpH@GOTPAGE
Lloh27:
	ldr	x9, [x9, _HC_SubA_HAGPBpH@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	lsl	w9, w9, #24
	orr	w22, w9, w22, asr #24
	sub	w2, w8, #1
	mov	x0, x21
	mov	x1, x24
	bl	_via_align_buffer
	mov	x21, x0
	str	w22, [x20]
	str	w23, [x19]
	mov	x0, x22
	mov	x1, x23
	bl	_VIA_OUT_RING_QW
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CMDBUF_ALIGNMENT_SIZE,4,2      ; @CMDBUF_ALIGNMENT_SIZE
	.comm	_HC_HEADER2,4,2                 ; @HC_HEADER2
	.comm	_VIA_REG_TRANSET,4,2            ; @VIA_REG_TRANSET
	.comm	_VIA_REG_TRANSPACE,4,2          ; @VIA_REG_TRANSPACE
	.comm	_HC_ParaType_PreCR,4,2          ; @HC_ParaType_PreCR
	.comm	_CMDBUF_ALIGNMENT_MASK,4,2      ; @CMDBUF_ALIGNMENT_MASK
	.comm	_HC_SubA_HAGPBpL,4,2            ; @HC_SubA_HAGPBpL
	.comm	_HC_HAGPBpID_MASK,4,2           ; @HC_HAGPBpID_MASK
	.comm	_HC_HAGPBpL_MASK,4,2            ; @HC_HAGPBpL_MASK
	.comm	_HC_SubA_HAGPBpH,4,2            ; @HC_SubA_HAGPBpH
	.no_dead_strip	_via_align_cmd
.subsections_via_symbols
