	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_init
_stv090x_init:                          ## @stv090x_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	24(%rbx), %rax
	movq	32(%rbx), %r12
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_7:
	movq	%r14, %rdi
	callq	_stv090x_wakeup
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_stv090x_ldpc_mode
	testq	%rax, %rax
	js	LBB0_23
## %bb.10:
	movq	_TNRCFG2@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r15d
	movq	_TUN_IQSWAP_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%rbx), %edx
	movl	%r15d, %edi
	callq	_STV090x_SETFIELD_Px
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_23
## %bb.11:
	movq	_DEMOD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r15d
	movq	_ROLLOFF_CONTROL_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %edx
	movl	%r15d, %edi
	callq	_STV090x_SETFIELD_Px
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_23
## %bb.12:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_stv090x_i2c_gate_ctrl
	testq	%rax, %rax
	js	LBB0_23
## %bb.13:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_TUNER_WAKE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	callq	*%rax
	testq	%rax, %rax
	js	LBB0_22
LBB0_15:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	callq	*%rax
	testq	%rax, %rax
	js	LBB0_22
LBB0_17:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_stv090x_i2c_gate_ctrl
	testq	%rax, %rax
	js	LBB0_23
## %bb.18:
	movq	(%rbx), %rax
	movq	_STV0900@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	callq	_stv0900_set_tspath
	jmp	LBB0_20
LBB0_1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_stv090x_i2c_gate_ctrl
	testq	%rax, %rax
	js	LBB0_23
## %bb.2:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	*%rax
	testq	%rax, %rax
	js	LBB0_22
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_stv090x_i2c_gate_ctrl
	testq	%rax, %rax
	js	LBB0_23
## %bb.5:
	movl	24(%r12), %edx
	movq	%rbx, %rdi
	movl	$135000000, %esi                ## imm = 0x80BEFC0
	callq	_stv090x_set_mclk
	movl	$5, %edi
	callq	_msleep
	movq	_STV090x_SYNTCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r12), %edx
	orl	$32, %edx
	movq	%rbx, %rdi
	callq	_stv090x_write_reg
	testq	%rax, %rax
	js	LBB0_23
## %bb.6:
	movq	%rbx, %rdi
	callq	_stv090x_get_mclk
	jmp	LBB0_7
LBB0_8:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	jmp	LBB0_23
LBB0_22:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_stv090x_i2c_gate_ctrl
LBB0_23:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	%rbx, %rdi
	callq	_stv0903_set_tspath
LBB0_20:
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_24
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_STV090x_SYNTCTRL,4,2           ## @STV090x_SYNTCTRL
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error waking device"

	.comm	_TNRCFG2,4,2                    ## @TNRCFG2
	.comm	_TUN_IQSWAP_FIELD,4,2           ## @TUN_IQSWAP_FIELD
	.comm	_DEMOD,4,2                      ## @DEMOD
	.comm	_ROLLOFF_CONTROL_FIELD,4,2      ## @ROLLOFF_CONTROL_FIELD
	.comm	_TUNER_WAKE,4,2                 ## @TUNER_WAKE
	.comm	_STV0900,8,3                    ## @STV0900
L_.str.1:                               ## @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_init
_stv090x_init:                          ; @stv090x_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0]
	ldp	x8, x23, [x19, #24]
	ldr	x8, [x8]
Lloh0:
	adrp	x22, _FE_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FE_ERROR@GOTPAGEOFF]
	cbz	x8, LBB0_13
LBB0_1:
	mov	x0, x20
	bl	_stv090x_wakeup
	tbnz	x0, #63, LBB0_19
; %bb.2:
	ldr	w1, [x19, #16]
	mov	x0, x19
	bl	_stv090x_ldpc_mode
	tbnz	x0, #63, LBB0_21
; %bb.3:
Lloh2:
	adrp	x24, _TNRCFG2@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TNRCFG2@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh4:
	adrp	x8, _TUN_IQSWAP_FIELD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TUN_IQSWAP_FIELD@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x19, #12]
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_21
; %bb.4:
Lloh7:
	adrp	x24, _DEMOD@GOTPAGE
Lloh8:
	ldr	x24, [x24, _DEMOD@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh9:
	adrp	x8, _ROLLOFF_CONTROL_FIELD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ROLLOFF_CONTROL_FIELD@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_21
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_stv090x_i2c_gate_ctrl
	tbnz	x0, #63, LBB0_21
; %bb.6:
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_8
; %bb.7:
Lloh12:
	adrp	x9, _TUNER_WAKE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TUNER_WAKE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	tbnz	x0, #63, LBB0_20
LBB0_8:
	ldr	x8, [x23]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	blr	x8
	tbnz	x0, #63, LBB0_20
LBB0_10:
	mov	x0, x19
	mov	w1, #0
	bl	_stv090x_i2c_gate_ctrl
	tbnz	x0, #63, LBB0_21
; %bb.11:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _STV0900@GOTPAGE
Lloh16:
	ldr	x9, [x9, _STV0900@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	mov	x0, x19
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.12:
	bl	_stv0900_set_tspath
	tbz	x0, #63, LBB0_24
	b	LBB0_21
LBB0_13:
	mov	x0, x19
	mov	w1, #1
	bl	_stv090x_i2c_gate_ctrl
	tbnz	x0, #63, LBB0_21
; %bb.14:
	ldr	x8, [x23]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x20
	blr	x8
	tbnz	x0, #63, LBB0_20
LBB0_16:
	mov	x0, x19
	mov	w1, #0
	bl	_stv090x_i2c_gate_ctrl
	tbnz	x0, #63, LBB0_21
; %bb.17:
	ldr	w2, [x23, #24]
	mov	x0, x19
	mov	w1, #61376
	movk	w1, #2059, lsl #16
	bl	_stv090x_set_mclk
	mov	w0, #5
	bl	_msleep
Lloh18:
	adrp	x8, _STV090x_SYNTCTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STV090x_SYNTCTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [x23, #8]
	orr	w2, w8, #0x20
	mov	x0, x19
	bl	_stv090x_write_reg
	tbnz	x0, #63, LBB0_21
; %bb.18:
	mov	x0, x19
	bl	_stv090x_get_mclk
	b	LBB0_1
LBB0_19:
	ldr	w0, [x22]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	b	LBB0_21
LBB0_20:
	mov	x0, x19
	mov	w1, #0
	bl	_stv090x_i2c_gate_ctrl
LBB0_21:
	ldr	w0, [x22]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_22:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	_stv0903_set_tspath
	tbnz	x0, #63, LBB0_21
LBB0_24:
	mov	w0, #0
	b	LBB0_22
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_STV090x_SYNTCTRL,4,2           ; @STV090x_SYNTCTRL
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error waking device"

	.comm	_TNRCFG2,4,2                    ; @TNRCFG2
	.comm	_TUN_IQSWAP_FIELD,4,2           ; @TUN_IQSWAP_FIELD
	.comm	_DEMOD,4,2                      ; @DEMOD
	.comm	_ROLLOFF_CONTROL_FIELD,4,2      ; @ROLLOFF_CONTROL_FIELD
	.comm	_TUNER_WAKE,4,2                 ; @TUNER_WAKE
	.comm	_STV0900,8,3                    ; @STV0900
l_.str.1:                               ; @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_init
.subsections_via_symbols
