	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_check_dma
_via_check_dma:                         ## @via_check_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	%esi, %eax
	addq	(%rdi), %rax
	movq	_CMDBUF_ALIGNMENT_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rax,%rcx,4), %rax
	cmpq	8(%rdi), %rax
	jle	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_via_cmdbuf_rewind
LBB0_2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_via_cmdbuf_wait
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_4:
	movq	(%rbx), %rax
	addq	16(%rbx), %rax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMDBUF_ALIGNMENT_SIZE,4,2      ## @CMDBUF_ALIGNMENT_SIZE
	.no_dead_strip	_via_check_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_check_dma
_via_check_dma:                         ; @via_check_dma
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldp	x8, x9, [x0]
	add	x8, x8, w1, uxtw
Lloh0:
	adrp	x10, _CMDBUF_ALIGNMENT_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CMDBUF_ALIGNMENT_SIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x10, [x10]
	add	x8, x8, x10, lsl #2
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_via_cmdbuf_rewind
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_via_cmdbuf_wait
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, #0
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x0, x9, x8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CMDBUF_ALIGNMENT_SIZE,4,2      ; @CMDBUF_ALIGNMENT_SIZE
	.no_dead_strip	_via_check_dma
.subsections_via_symbols
