	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vino_check_buffer
_vino_check_buffer:                     ## @vino_check_buffer
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	leaq	16(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %eax
	cmpl	$129, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_vino_sync_buffer
	movq	_VINO_FRAMEBUFFER_UNUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_6
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.9:
	movl	%ebx, %r15d
	negl	%r15d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	movq	_vino_drvdata@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	callq	_vino_dma_stop
	movq	%r14, %rdi
	callq	_vino_clear_interrupt
	movq	(%rbx), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_11
LBB0_6:
	movq	_vino_pixel_conversion@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movq	8(%r12), %rax
	movq	_VINO_DATA_FMT_RGB32@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_vino_convert_to_rgba
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vino_check_buffer():\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_VINO_FRAMEBUFFER_UNUSED,4,2    ## @VINO_FRAMEBUFFER_UNUSED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_vino_pixel_conversion,8,3      ## @vino_pixel_conversion
	.comm	_VINO_DATA_FMT_RGB32,8,3        ## @VINO_DATA_FMT_RGB32
L_.str.1:                               ## @.str.1
	.asciz	"vino_check_buffer(): buffer not ready\n"

	.comm	_vino_drvdata,8,3               ## @vino_drvdata
	.no_dead_strip	_vino_check_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vino_check_buffer
_vino_check_buffer:                     ; @vino_check_buffer
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_vino_sync_buffer
Lloh2:
	adrp	x8, _VINO_FRAMEBUFFER_UNUSED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VINO_FRAMEBUFFER_UNUSED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_3:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	w22, LBB0_8
; %bb.6:
	neg	w19, w22
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_12
; %bb.7:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh14:
	adrp	x21, _vino_drvdata@GOTPAGE
Lloh15:
	ldr	x21, [x21, _vino_drvdata@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_spin_lock_irqsave
	mov	x0, x20
	bl	_vino_dma_stop
	mov	x0, x20
	bl	_vino_clear_interrupt
	ldr	x0, [x21]
	bl	_spin_unlock_irqrestore
	b	LBB0_12
LBB0_8:
Lloh16:
	adrp	x8, _vino_pixel_conversion@GOTPAGE
Lloh17:
	ldr	x8, [x8, _vino_pixel_conversion@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _VINO_DATA_FMT_RGB32@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VINO_DATA_FMT_RGB32@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_vino_convert_to_rgba
LBB0_11:
	mov	w19, #0
LBB0_12:
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vino_check_buffer():\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_VINO_FRAMEBUFFER_UNUSED,4,2    ; @VINO_FRAMEBUFFER_UNUSED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_vino_pixel_conversion,8,3      ; @vino_pixel_conversion
	.comm	_VINO_DATA_FMT_RGB32,8,3        ; @VINO_DATA_FMT_RGB32
l_.str.1:                               ; @.str.1
	.asciz	"vino_check_buffer(): buffer not ready\n"

	.comm	_vino_drvdata,8,3               ; @vino_drvdata
	.no_dead_strip	_vino_check_buffer
.subsections_via_symbols
