	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ts_open
_ts_open:                               ## @ts_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_video_devdata
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_video_device_node_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_dprintk
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mutex_trylock
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%r15, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_SAA7134_AUDIO_MUTE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_saa_readb
	andl	$-65, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_saa_writeb
	movq	%r12, %rdi
	callq	_atomic_inc
	movq	%r15, (%r14)
	xorl	%ebx, %ebx
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_4:
	movl	%ebx, %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	"open dev=%s\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SAA7134_AUDIO_MUTE_CTRL,4,2    ## @SAA7134_AUDIO_MUTE_CTRL
	.no_dead_strip	_ts_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ts_open
_ts_open:                               ; @ts_open
	.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, x0
	bl	_video_devdata
	mov	x21, x0
	mov	x0, x19
	bl	_video_drvdata
	mov	x20, x0
	mov	x0, x21
	bl	_video_device_node_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x20
	bl	_mutex_trylock
	cbz	w0, LBB0_4
; %bb.1:
	add	x22, x20, #4
	mov	x0, x22
	bl	_atomic_read
	cbnz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _SAA7134_AUDIO_MUTE_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SAA7134_AUDIO_MUTE_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_saa_readb
	and	w1, w0, #0xffffffbf
	mov	x0, x21
	bl	_saa_writeb
	mov	x0, x22
	bl	_atomic_inc
	mov	w21, #0
	str	x20, [x19]
LBB0_3:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_4:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open dev=%s\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SAA7134_AUDIO_MUTE_CTRL,4,2    ; @SAA7134_AUDIO_MUTE_CTRL
	.no_dead_strip	_ts_open
.subsections_via_symbols
