	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_dispatch_pci_cmdbuffer
_via_dispatch_pci_cmdbuffer:            ## @via_dispatch_pci_cmdbuffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %edx
	movq	_VIA_PCI_BUF_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_3
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	(%r15), %rdi
	movl	4(%rsi), %esi
	callq	_DRM_COPY_FROM_USER
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%r15), %rdi
	movl	(%rbx), %esi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_via_verify_command_stream
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:
	movq	(%r15), %rsi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_via_parse_command_stream       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_PCI_BUF_SIZE,4,2           ## @VIA_PCI_BUF_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_via_dispatch_pci_cmdbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_dispatch_pci_cmdbuffer
_via_dispatch_pci_cmdbuffer:            ; @via_dispatch_pci_cmdbuffer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w2, [x1]
Lloh0:
	adrp	x8, _VIA_PCI_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_PCI_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0]
	ldr	x0, [x21]
	ldr	w1, [x1, #4]
	bl	_DRM_COPY_FROM_USER
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _EFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x0, [x21]
	ldr	w1, [x20]
	mov	x2, x19
	mov	w3, #0
	bl	_via_verify_command_stream
	cbnz	w0, LBB0_5
; %bb.7:
	ldr	x1, [x21]
	ldr	w2, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_via_parse_command_stream
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_PCI_BUF_SIZE,4,2           ; @VIA_PCI_BUF_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_via_dispatch_pci_cmdbuffer
.subsections_via_symbols
