	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_dma_blit_sync              ## -- Begin function via_dma_blit_sync
	.p2align	4, 0x90
_via_dma_blit_sync:                     ## @via_dma_blit_sync
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rsi), %rdx
	movq	_VIA_NUM_BLIT_ENGINES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_1
## %bb.2:
	movl	8(%rsi), %esi
	callq	_via_dmablit_sync
	movl	%eax, %ecx
	movq	_EINTR@GOTPCREL(%rip), %rdx
	movq	_EAGAIN@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	movl	(%rdx), %edx
	addl	%ecx, %edx
	cmovnel	%ecx, %eax
	popq	%rbp
	retq
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_NUM_BLIT_ENGINES,8,3       ## @VIA_NUM_BLIT_ENGINES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_via_dma_blit_sync              ; -- Begin function via_dma_blit_sync
	.p2align	2
_via_dma_blit_sync:                     ; @via_dma_blit_sync
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x2, [x1]
Lloh0:
	adrp	x8, _VIA_NUM_BLIT_ENGINES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_NUM_BLIT_ENGINES@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_2
; %bb.1:
	ldr	w1, [x1, #8]
	bl	_via_dmablit_sync
Lloh3:
	adrp	x8, _EINTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmn	w0, w8
	csneg	w0, w0, w9, ne
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_NUM_BLIT_ENGINES,8,3       ; @VIA_NUM_BLIT_ENGINES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
