	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0903_set_tspath
_stv0903_set_tspath:                    ## @stv0903_set_tspath
	.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
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movl	(%rax), %eax
	andl	$-2, %eax
	cmpl	$32, (%rcx)
	jl	LBB0_4
## %bb.1:
	movq	_STV090x_TSGENERAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	cmpl	$130, %eax
	jne	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_7
LBB0_4:
	movq	_STV090x_TSGENERAL1X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	cmpl	$130, %eax
	jne	LBB0_6
## %bb.5:
	movl	$16, %edx
	jmp	LBB0_7
LBB0_3:
	movl	$12, %edx
	jmp	LBB0_7
LBB0_6:
	movl	$20, %edx
LBB0_7:
	callq	_stv090x_write_reg
	movq	(%r14), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_16
## %bb.8:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	movq	_STV090x_P1_TSCFGH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %ebx
	movq	_TSFIFO_SERIAL_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	jmp	LBB0_10
LBB0_13:
	movq	_STV090x_P1_TSCFGH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %ebx
	movq	_TSFIFO_SERIAL_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
	jmp	LBB0_14
LBB0_9:
	movq	_STV090x_P1_TSCFGH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %ebx
	movq	_TSFIFO_SERIAL_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
LBB0_10:
	callq	_STV090x_SETFIELD_Px
	movq	_TSFIFO_DVBCI_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	jmp	LBB0_15
LBB0_11:
	movq	_STV090x_P1_TSCFGH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %ebx
	movq	_TSFIFO_SERIAL_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
LBB0_14:
	callq	_STV090x_SETFIELD_Px
	movq	_TSFIFO_DVBCI_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$1, %edx
LBB0_15:
	callq	_STV090x_SETFIELD_Px
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_stv090x_write_reg
	testq	%rax, %rax
	js	LBB0_30
LBB0_16:
	movq	(%r14), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_28
## %bb.17:
	movl	(%rax), %edx
	andl	$-2, %edx
	movq	8(%r14), %rax
	movslq	4(%rax), %rax
	cmpl	$128, %edx
	jne	LBB0_18
## %bb.22:
	shrq	$5, %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_23
## %bb.24:
	cqto
	idivq	%rcx
	jmp	LBB0_25
LBB0_18:
	shrq	$2, %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_19
## %bb.20:
	cqto
	idivq	%rcx
	jmp	LBB0_21
LBB0_23:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_25:
	cmpl	$33, %eax
	movl	$32, %r15d
	jmp	LBB0_26
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_21:
	cmpl	$9, %eax
	movl	$8, %r15d
LBB0_26:
	cmovgel	%eax, %r15d
	movq	_STV090x_P1_TSCFGM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %ebx
	movq	_TSFIFO_MANSPEED_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$3, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_stv090x_write_reg
	testq	%rax, %rax
	js	LBB0_30
## %bb.27:
	cmpl	$255, %r15d
	movl	$255, %edx
	cmovbl	%r15d, %edx
	movq	_STV090x_P1_TSSPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_stv090x_write_reg
	testq	%rax, %rax
	js	LBB0_30
LBB0_28:
	movq	_STV090x_P1_TSCFGH@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_stv090x_read_reg
	movl	%eax, %r15d
	movq	_RST_HWARE_FIELD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%eax, %edi
	movl	$1, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_stv090x_write_reg
	testq	%rax, %rax
	js	LBB0_30
## %bb.29:
	movl	(%rbx), %esi
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_stv090x_write_reg
	testq	%rax, %rax
	jns	LBB0_31
LBB0_30:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %ebx
LBB0_31:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_STV090x_TSGENERAL,4,2          ## @STV090x_TSGENERAL
	.comm	_STV090x_TSGENERAL1X,4,2        ## @STV090x_TSGENERAL1X
	.comm	_STV090x_P1_TSCFGH,4,2          ## @STV090x_P1_TSCFGH
	.comm	_TSFIFO_SERIAL_FIELD,4,2        ## @TSFIFO_SERIAL_FIELD
	.comm	_TSFIFO_DVBCI_FIELD,4,2         ## @TSFIFO_DVBCI_FIELD
	.comm	_STV090x_P1_TSCFGM,4,2          ## @STV090x_P1_TSCFGM
	.comm	_TSFIFO_MANSPEED_FIELD,4,2      ## @TSFIFO_MANSPEED_FIELD
	.comm	_STV090x_P1_TSSPEED,4,2         ## @STV090x_P1_TSSPEED
	.comm	_RST_HWARE_FIELD,4,2            ## @RST_HWARE_FIELD
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv0903_set_tspath
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0903_set_tspath
_stv0903_set_tspath:                    ; @stv0903_set_tspath
	.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
	ldp	x9, x8, [x0]
	ldr	w10, [x8]
	ldr	w8, [x9]
	and	w8, w8, #0xfffffffe
	cmp	w10, #32
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _STV090x_TSGENERAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STV090x_TSGENERAL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #130
	b.ne	LBB0_5
; %bb.2:
	mov	w2, #0
	b	LBB0_7
LBB0_3:
Lloh3:
	adrp	x9, _STV090x_TSGENERAL1X@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STV090x_TSGENERAL1X@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #130
	b.ne	LBB0_6
; %bb.4:
	mov	w2, #16
	b	LBB0_7
LBB0_5:
	mov	w2, #12
	b	LBB0_7
LBB0_6:
	mov	w2, #20
LBB0_7:
	bl	_stv090x_write_reg
	ldr	x8, [x19]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_16
; %bb.8:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh8:
	adrp	x21, _STV090x_P1_TSCFGH@GOTPAGE
Lloh9:
	ldr	x21, [x21, _STV090x_P1_TSCFGH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh10:
	adrp	x8, _TSFIFO_SERIAL_FIELD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TSFIFO_SERIAL_FIELD@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #1
	b	LBB0_12
LBB0_10:
Lloh13:
	adrp	x21, _STV090x_P1_TSCFGH@GOTPAGE
Lloh14:
	ldr	x21, [x21, _STV090x_P1_TSCFGH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh15:
	adrp	x8, _TSFIFO_SERIAL_FIELD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TSFIFO_SERIAL_FIELD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w2, #1
	b	LBB0_14
LBB0_11:
Lloh18:
	adrp	x21, _STV090x_P1_TSCFGH@GOTPAGE
Lloh19:
	ldr	x21, [x21, _STV090x_P1_TSCFGH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh20:
	adrp	x8, _TSFIFO_SERIAL_FIELD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TSFIFO_SERIAL_FIELD@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	w2, #0
LBB0_12:
	bl	_STV090x_SETFIELD_Px
Lloh23:
	adrp	x8, _TSFIFO_DVBCI_FIELD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TSFIFO_DVBCI_FIELD@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	b	LBB0_15
LBB0_13:
Lloh26:
	adrp	x21, _STV090x_P1_TSCFGH@GOTPAGE
Lloh27:
	ldr	x21, [x21, _STV090x_P1_TSCFGH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh28:
	adrp	x8, _TSFIFO_SERIAL_FIELD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TSFIFO_SERIAL_FIELD@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	w2, #0
LBB0_14:
	bl	_STV090x_SETFIELD_Px
Lloh31:
	adrp	x8, _TSFIFO_DVBCI_FIELD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TSFIFO_DVBCI_FIELD@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
LBB0_15:
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stv090x_write_reg
	tbnz	x0, #63, LBB0_21
LBB0_16:
	ldr	x9, [x19]
	ldr	x8, [x9, #8]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.17:
	ldr	w9, [x9]
	and	w9, w9, #0xfffffffe
	ldr	x10, [x19, #8]
	ldrsw	x10, [x10, #4]
	lsr	x11, x8, #5
	sdiv	x11, x10, x11
	mov	w12, #32
	cmp	w11, #32
	csel	w11, w11, w12, gt
	lsr	x8, x8, #2
	mov	w12, #8
	sdiv	x8, x10, x8
	cmp	w8, #8
	csel	w8, w8, w12, gt
	cmp	w9, #128
	csel	w21, w11, w8, eq
Lloh34:
	adrp	x22, _STV090x_P1_TSCFGM@GOTPAGE
Lloh35:
	ldr	x22, [x22, _STV090x_P1_TSCFGM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh36:
	adrp	x8, _TSFIFO_MANSPEED_FIELD@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TSFIFO_MANSPEED_FIELD@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	w2, #3
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_stv090x_write_reg
	tbnz	x0, #63, LBB0_21
; %bb.18:
	mov	w8, #255
	cmp	w21, #255
	csel	w2, w21, w8, lo
Lloh39:
	adrp	x8, _STV090x_P1_TSSPEED@GOTPAGE
Lloh40:
	ldr	x8, [x8, _STV090x_P1_TSSPEED@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_stv090x_write_reg
	tbnz	x0, #63, LBB0_21
LBB0_19:
Lloh42:
	adrp	x21, _STV090x_P1_TSCFGH@GOTPAGE
Lloh43:
	ldr	x21, [x21, _STV090x_P1_TSCFGH@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_stv090x_read_reg
	mov	x20, x0
Lloh44:
	adrp	x22, _RST_HWARE_FIELD@GOTPAGE
Lloh45:
	ldr	x22, [x22, _RST_HWARE_FIELD@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #1
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stv090x_write_reg
	tbnz	x0, #63, LBB0_21
; %bb.20:
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_stv090x_write_reg
	mov	x8, x0
	mov	w0, #0
	tbz	x8, #63, LBB0_22
LBB0_21:
Lloh46:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh47:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
Lloh49:
	adrp	x2, l_.str@PAGE
Lloh50:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_22:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_10-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
                                        ; -- End function
	.comm	_STV090x_TSGENERAL,4,2          ; @STV090x_TSGENERAL
	.comm	_STV090x_TSGENERAL1X,4,2        ; @STV090x_TSGENERAL1X
	.comm	_STV090x_P1_TSCFGH,4,2          ; @STV090x_P1_TSCFGH
	.comm	_TSFIFO_SERIAL_FIELD,4,2        ; @TSFIFO_SERIAL_FIELD
	.comm	_TSFIFO_DVBCI_FIELD,4,2         ; @TSFIFO_DVBCI_FIELD
	.comm	_STV090x_P1_TSCFGM,4,2          ; @STV090x_P1_TSCFGM
	.comm	_TSFIFO_MANSPEED_FIELD,4,2      ; @TSFIFO_MANSPEED_FIELD
	.comm	_STV090x_P1_TSSPEED,4,2         ; @STV090x_P1_TSSPEED
	.comm	_RST_HWARE_FIELD,4,2            ; @RST_HWARE_FIELD
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv0903_set_tspath
.subsections_via_symbols
