	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_vitclk_ctl
_stv090x_vitclk_ctl:                    ## @stv090x_vitclk_ctl
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_8
## %bb.2:
	movq	8(%rbx), %rdi
	callq	_mutex_lock
	movq	_STV090x_STOPCLK2@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %r15d
	movq	_STOP_CLKVIT1_FIELD@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	8(%rbx), %rdi
	callq	_mutex_lock
	movq	_STV090x_STOPCLK2@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %r15d
	movq	_STOP_CLKVIT2_FIELD@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movl	%r15d, %edi
	movl	%r14d, %edx
	callq	_STV090x_SETFIELD
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_stv090x_write_reg
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movq	8(%rbx), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_8:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	movq	8(%rbx), %rdi
	callq	_mutex_unlock
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STV090x_STOPCLK2,4,2           ## @STV090x_STOPCLK2
	.comm	_STOP_CLKVIT1_FIELD,4,2         ## @STOP_CLKVIT1_FIELD
	.comm	_STOP_CLKVIT2_FIELD,4,2         ## @STOP_CLKVIT2_FIELD
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wrong demodulator!"

L_.str.1:                               ## @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_vitclk_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_vitclk_ctl
_stv090x_vitclk_ctl:                    ; @stv090x_vitclk_ctl
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.2:
	ldr	x0, [x19, #8]
	bl	_mutex_lock
Lloh0:
	adrp	x22, _STV090x_STOPCLK2@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STV090x_STOPCLK2@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x21, x0
Lloh2:
	adrp	x8, _STOP_CLKVIT1_FIELD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STOP_CLKVIT1_FIELD@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19, #8]
	bl	_mutex_lock
Lloh4:
	adrp	x22, _STV090x_STOPCLK2@GOTPAGE
Lloh5:
	ldr	x22, [x22, _STV090x_STOPCLK2@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x21, x0
Lloh6:
	adrp	x8, _STOP_CLKVIT2_FIELD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STOP_CLKVIT2_FIELD@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_STV090x_SETFIELD
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_stv090x_write_reg
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_mutex_unlock
Lloh13:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_STV090x_STOPCLK2,4,2           ; @STV090x_STOPCLK2
	.comm	_STOP_CLKVIT1_FIELD,4,2         ; @STOP_CLKVIT1_FIELD
	.comm	_STOP_CLKVIT2_FIELD,4,2         ; @STOP_CLKVIT2_FIELD
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wrong demodulator!"

l_.str.1:                               ; @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_vitclk_ctl
.subsections_via_symbols
