	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm6000_init_analog_mode        ## -- Begin function tm6000_init_analog_mode
	.p2align	4, 0x90
_tm6000_init_analog_mode:               ## @tm6000_init_analog_mode
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_TM6010@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	_TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE@GOTPCREL(%rip), %rax
	cmpl	$0, 32(%rbx)
	movl	$0, %edx
	jne	LBB0_3
## %bb.2:
	movq	_TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_3:
	orl	(%rax), %edx
	movq	_TM6010_REQ07_RCC_ACTIVE_IF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$96, %ecx
	callq	_tm6000_set_reg_mask
	movq	_TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$64, %ecx
	callq	_tm6000_set_reg_mask
	jmp	LBB0_5
LBB0_4:
	movq	_TM6010_REQ07_R3F_RESET@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	cmpq	$0, 24(%rbx)
	movq	_TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$128, %eax
	movl	$32, %edx
	cmovel	%eax, %edx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6010_REQ07_RC3_HSTART1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$136, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6000_REQ07_RDA_CLK_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$35, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6010_REQ07_RD1_ADDR_FOR_REQ1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$192, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6010_REQ07_RD2_ADDR_FOR_REQ2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$216, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6010_REQ07_RD6_ENDP_REQ1_REQ2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$6, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6000_REQ07_RDF_PWDOWN_ACLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$31, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	_TM6010_REQ07_RFF_SOFT_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$8, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
	movq	%rbx, %rdi
	callq	_tm6000_set_fourcc_format
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
LBB0_5:
	movl	$20, %edi
	callq	_msleep
	movl	16(%rbx), %eax
	movl	%eax, -32(%rbp)
	leaq	12(%rbx), %rdi
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-32(%rbp), %r8
	xorl	%esi, %esi
	callq	_v4l2_device_call_all
	movl	$100, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_tm6000_set_standard
	movq	%rbx, %rdi
	callq	_tm6000_set_vbi
	movq	%rbx, %rdi
	movl	$48000, %esi                    ## imm = 0xBB80
	callq	_tm6000_set_audio_bitrate
	movl	8(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	movq	_REQ_03_SET_GET_MCU_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %ecx
	xorl	%eax, %eax
	callq	_tm6000_set_reg
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TM6010,8,3                     ## @TM6010
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE,4,2 ## @TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE,4,2 ## @TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF,4,2 ## @TM6010_REQ07_RCC_ACTIVE_IF
	.comm	_TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,4,2 ## @TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE
	.comm	_TM6010_REQ07_R3F_RESET,4,2     ## @TM6010_REQ07_R3F_RESET
	.comm	_TM6010_REQ07_RC3_HSTART1,4,2   ## @TM6010_REQ07_RC3_HSTART1
	.comm	_TM6000_REQ07_RDA_CLK_SEL,4,2   ## @TM6000_REQ07_RDA_CLK_SEL
	.comm	_TM6010_REQ07_RD1_ADDR_FOR_REQ1,4,2 ## @TM6010_REQ07_RD1_ADDR_FOR_REQ1
	.comm	_TM6010_REQ07_RD2_ADDR_FOR_REQ2,4,2 ## @TM6010_REQ07_RD2_ADDR_FOR_REQ2
	.comm	_TM6010_REQ07_RD6_ENDP_REQ1_REQ2,4,2 ## @TM6010_REQ07_RD6_ENDP_REQ1_REQ2
	.comm	_TM6000_REQ07_RDF_PWDOWN_ACLK,4,2 ## @TM6000_REQ07_RDF_PWDOWN_ACLK
	.comm	_TM6010_REQ07_RFF_SOFT_RESET,4,2 ## @TM6010_REQ07_RFF_SOFT_RESET
	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_frequency,4,2                ## @s_frequency
	.comm	_REQ_03_SET_GET_MCU_PIN,4,2     ## @REQ_03_SET_GET_MCU_PIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tm6000_init_analog_mode        ; -- Begin function tm6000_init_analog_mode
	.p2align	2
_tm6000_init_analog_mode:               ; @tm6000_init_analog_mode
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _TM6010@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TM6010@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
Lloh6:
	adrp	x10, _TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, w10, wzr, eq
	orr	w2, w9, w8
Lloh9:
	adrp	x8, _TM6010_REQ07_RCC_ACTIVE_IF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TM6010_REQ07_RCC_ACTIVE_IF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #96
	bl	_tm6000_set_reg_mask
Lloh12:
	adrp	x8, _TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #64
	bl	_tm6000_set_reg_mask
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x20, _TM6010_REQ07_R3F_RESET@GOTPAGE
Lloh16:
	ldr	x20, [x20, _TM6010_REQ07_R3F_RESET@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_tm6000_set_reg
Lloh17:
	adrp	x8, _TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE@GOTPAGEOFF]
	ldr	x9, [x19, #24]
Lloh19:
	ldr	w1, [x8]
	cmp	x9, #0
	mov	w8, #32
	mov	w9, #128
	csel	w2, w9, w8, eq
	mov	x0, x19
	bl	_tm6000_set_reg
Lloh20:
	adrp	x8, _TM6010_REQ07_RC3_HSTART1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TM6010_REQ07_RC3_HSTART1@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #136
	bl	_tm6000_set_reg
Lloh23:
	adrp	x8, _TM6000_REQ07_RDA_CLK_SEL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TM6000_REQ07_RDA_CLK_SEL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #35
	bl	_tm6000_set_reg
Lloh26:
	adrp	x8, _TM6010_REQ07_RD1_ADDR_FOR_REQ1@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TM6010_REQ07_RD1_ADDR_FOR_REQ1@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #192
	bl	_tm6000_set_reg
Lloh29:
	adrp	x8, _TM6010_REQ07_RD2_ADDR_FOR_REQ2@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TM6010_REQ07_RD2_ADDR_FOR_REQ2@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #216
	bl	_tm6000_set_reg
Lloh32:
	adrp	x8, _TM6010_REQ07_RD6_ENDP_REQ1_REQ2@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TM6010_REQ07_RD6_ENDP_REQ1_REQ2@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #6
	bl	_tm6000_set_reg
Lloh35:
	adrp	x8, _TM6000_REQ07_RDF_PWDOWN_ACLK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TM6000_REQ07_RDF_PWDOWN_ACLK@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #31
	bl	_tm6000_set_reg
Lloh38:
	adrp	x21, _TM6010_REQ07_RFF_SOFT_RESET@GOTPAGE
Lloh39:
	ldr	x21, [x21, _TM6010_REQ07_RFF_SOFT_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #8
	bl	_tm6000_set_reg
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_tm6000_set_reg
	mov	x0, x19
	bl	_tm6000_set_fourcc_format
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_tm6000_set_reg
LBB0_3:
	mov	w0, #20
	bl	_msleep
	ldr	w8, [x19, #16]
	str	w8, [sp, #8]
	add	x0, x19, #12
Lloh40:
	adrp	x8, _tuner@GOTPAGE
Lloh41:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
Lloh43:
	adrp	x8, _s_frequency@GOTPAGE
Lloh44:
	ldr	x8, [x8, _s_frequency@GOTPAGEOFF]
Lloh45:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	w1, #0
	bl	_v4l2_device_call_all
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_tm6000_set_standard
	mov	x0, x19
	bl	_tm6000_set_vbi
	mov	x0, x19
	mov	w1, #48000
	bl	_tm6000_set_audio_bitrate
	ldr	w2, [x19, #8]
	cbz	w2, LBB0_5
; %bb.4:
Lloh46:
	adrp	x8, _REQ_03_SET_GET_MCU_PIN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _REQ_03_SET_GET_MCU_PIN@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	w8, #1
	str	x8, [sp]
	mov	x0, x19
	bl	_tm6000_set_reg
LBB0_5:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_TM6010,8,3                     ; @TM6010
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE,4,2 ; @TM6010_REQ07_RCC_ACTIVE_IF_AUDIO_ENABLE
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE,4,2 ; @TM6010_REQ07_RCC_ACTIVE_IF_VIDEO_ENABLE
	.comm	_TM6010_REQ07_RCC_ACTIVE_IF,4,2 ; @TM6010_REQ07_RCC_ACTIVE_IF
	.comm	_TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE,4,2 ; @TM6010_REQ07_RC0_ACTIVE_VIDEO_SOURCE
	.comm	_TM6010_REQ07_R3F_RESET,4,2     ; @TM6010_REQ07_R3F_RESET
	.comm	_TM6010_REQ07_RC3_HSTART1,4,2   ; @TM6010_REQ07_RC3_HSTART1
	.comm	_TM6000_REQ07_RDA_CLK_SEL,4,2   ; @TM6000_REQ07_RDA_CLK_SEL
	.comm	_TM6010_REQ07_RD1_ADDR_FOR_REQ1,4,2 ; @TM6010_REQ07_RD1_ADDR_FOR_REQ1
	.comm	_TM6010_REQ07_RD2_ADDR_FOR_REQ2,4,2 ; @TM6010_REQ07_RD2_ADDR_FOR_REQ2
	.comm	_TM6010_REQ07_RD6_ENDP_REQ1_REQ2,4,2 ; @TM6010_REQ07_RD6_ENDP_REQ1_REQ2
	.comm	_TM6000_REQ07_RDF_PWDOWN_ACLK,4,2 ; @TM6000_REQ07_RDF_PWDOWN_ACLK
	.comm	_TM6010_REQ07_RFF_SOFT_RESET,4,2 ; @TM6010_REQ07_RFF_SOFT_RESET
	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_frequency,4,2                ; @s_frequency
	.comm	_REQ_03_SET_GET_MCU_PIN,4,2     ; @REQ_03_SET_GET_MCU_PIN
.subsections_via_symbols
