	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vino_open
_vino_open:                             ## @vino_open
	.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
	callq	_video_drvdata
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_VINO_CHANNEL_A@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	movl	$66, %esi
	subl	%edx, %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%rbx)
	je	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.4:
	negl	%r15d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_7
LBB0_1:
	movq	%rbx, %rdi
	callq	_vino_acquire_input
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_7
LBB0_5:
	incq	16(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_6:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open(): channel = %c\n"

	.comm	_VINO_CHANNEL_A,8,3             ## @VINO_CHANNEL_A
L_.str.1:                               ## @.str.1
	.asciz	"open(): driver busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"open(): vino_acquire_input() failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"open(): %s!\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed"

L_.str.5:                               ## @.str.5
	.asciz	"complete"

	.no_dead_strip	_vino_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vino_open
_vino_open:                             ; @vino_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_video_drvdata
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _VINO_CHANNEL_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VINO_CHANNEL_A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #65
	cinc	x8, x8, ne
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w19, LBB0_7
; %bb.2:
	neg	w19, w19
	b	LBB0_5
LBB0_3:
	mov	x0, x21
	bl	_vino_acquire_input
	cbz	w0, LBB0_6
; %bb.4:
	mov	x19, x0
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	mov	x0, x20
	bl	_mutex_unlock
LBB0_5:
Lloh12:
	adrp	x8, l_.str.4@PAGE
Lloh13:
	add	x8, x8, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_6:
	ldr	x8, [x21, #16]
	add	x8, x8, #1
	str	x8, [x21, #16]
	mov	x0, x20
	bl	_mutex_unlock
LBB0_7:
	mov	w19, #0
Lloh14:
	adrp	x8, l_.str.5@PAGE
Lloh15:
	add	x8, x8, l_.str.5@PAGEOFF
LBB0_8:
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dprintk
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open(): channel = %c\n"

	.comm	_VINO_CHANNEL_A,8,3             ; @VINO_CHANNEL_A
l_.str.1:                               ; @.str.1
	.asciz	"open(): driver busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"open(): vino_acquire_input() failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"open(): %s!\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed"

l_.str.5:                               ; @.str.5
	.asciz	"complete"

	.no_dead_strip	_vino_open
.subsections_via_symbols
