	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda9874a_setup
_tda9874a_setup:                        ## @tda9874a_setup
	.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, %rbx
	movq	_TDA9874A_AGCGR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_chip_write
	movq	_TDA9874A_GCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tda9874a_GCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_TDA9874A_MSR@GOTPCREL(%rip), %rax
	movq	_tda9874a_mode@GOTPCREL(%rip), %r15
	cmpq	$1, (%r15)
	movl	(%rax), %esi
	movl	$3, %edx
	sbbl	$0, %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_tda9874a_dic@GOTPCREL(%rip), %r12
	movl	$128, %edx
	cmpl	$17, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_tda9874a_modelist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_tda9874a_STD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx,8), %rdx
	addq	$4, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_chip_cmd
	xorl	%edx, %edx
LBB0_2:
	movq	_TDA9874A_FMMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_TDA9874A_C1OLAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_chip_write
	movq	_TDA9874A_C2OLAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_chip_write
	movq	_TDA9874A_NCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tda9874a_NCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_TDA9874A_NOLAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_chip_write
	movq	_TDA9874A_NLELR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$20, %edx
	callq	_chip_write
	movq	_TDA9874A_NUELR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$80, %edx
	callq	_chip_write
	cmpl	$17, (%r12)
	movq	_TDA9874A_AMCONR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	jne	LBB0_4
## %bb.3:
	movl	$249, %edx
	callq	_chip_write
	movq	_TDA9874A_SDACOSR@GOTPCREL(%rip), %rax
	cmpq	$1, (%r15)
	movl	(%rax), %esi
	movl	$129, %edx
	sbbl	$0, %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_TDA9874A_AOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_chip_write
	movq	_TDA9874A_MDACOSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	cmpq	$0, (%r15)
	setne	%al
	leal	(%rax,%rax), %edx
	addl	$128, %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_tda9874a_ESP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_TDA9874A_ESP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movl	$251, %edx
	callq	_chip_write
	movq	_TDA9874A_SDACOSR@GOTPCREL(%rip), %rax
	cmpq	$1, (%r15)
	movl	(%rax), %esi
	movl	$129, %edx
	sbbl	$0, %edx
	movq	%rbx, %rdi
	callq	_chip_write
	movq	_TDA9874A_AOSR@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_chip_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_tda9874a_modelist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_tda9874a_STD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	movl	(%rax,%r9,8), %r8d
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_v4l2_dbg
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TDA9874A_AGCGR,4,2             ## @TDA9874A_AGCGR
	.comm	_TDA9874A_GCONR,4,2             ## @TDA9874A_GCONR
	.comm	_tda9874a_GCONR,4,2             ## @tda9874a_GCONR
	.comm	_TDA9874A_MSR,4,2               ## @TDA9874A_MSR
	.comm	_tda9874a_mode,8,3              ## @tda9874a_mode
	.comm	_tda9874a_dic,4,2               ## @tda9874a_dic
	.comm	_TDA9874A_FMMR,4,2              ## @TDA9874A_FMMR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tda9874_modelist"

	.comm	_tda9874a_modelist,8,3          ## @tda9874a_modelist
	.comm	_tda9874a_STD,8,3               ## @tda9874a_STD
	.comm	_TDA9874A_C1OLAR,4,2            ## @TDA9874A_C1OLAR
	.comm	_TDA9874A_C2OLAR,4,2            ## @TDA9874A_C2OLAR
	.comm	_TDA9874A_NCONR,4,2             ## @TDA9874A_NCONR
	.comm	_tda9874a_NCONR,4,2             ## @tda9874a_NCONR
	.comm	_TDA9874A_NOLAR,4,2             ## @TDA9874A_NOLAR
	.comm	_TDA9874A_NLELR,4,2             ## @TDA9874A_NLELR
	.comm	_TDA9874A_NUELR,4,2             ## @TDA9874A_NUELR
	.comm	_TDA9874A_AMCONR,4,2            ## @TDA9874A_AMCONR
	.comm	_TDA9874A_SDACOSR,4,2           ## @TDA9874A_SDACOSR
	.comm	_TDA9874A_AOSR,4,2              ## @TDA9874A_AOSR
	.comm	_TDA9874A_MDACOSR,4,2           ## @TDA9874A_MDACOSR
	.comm	_TDA9874A_ESP,4,2               ## @TDA9874A_ESP
	.comm	_tda9874a_ESP,4,2               ## @tda9874a_ESP
	.comm	_debug,4,2                      ## @debug
L_.str.1:                               ## @.str.1
	.asciz	"tda9874a_setup(): %s [0x%02X].\n"

	.no_dead_strip	_tda9874a_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda9874a_setup
_tda9874a_setup:                        ; @tda9874a_setup
	.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	x19, x0
Lloh0:
	adrp	x8, _TDA9874A_AGCGR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TDA9874A_AGCGR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_chip_write
Lloh3:
	adrp	x8, _TDA9874A_GCONR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TDA9874A_GCONR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _tda9874a_GCONR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tda9874a_GCONR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_chip_write
Lloh9:
	adrp	x8, _TDA9874A_MSR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TDA9874A_MSR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x22, _tda9874a_mode@GOTPAGE
Lloh13:
	ldr	x22, [x22, _tda9874a_mode@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w8, #2
	cinc	w2, w8, ne
	mov	x0, x19
	bl	_chip_write
Lloh14:
	adrp	x23, _tda9874a_dic@GOTPAGE
Lloh15:
	ldr	x23, [x23, _tda9874a_dic@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh16:
	adrp	x20, _tda9874a_modelist@GOTPAGE
Lloh17:
	ldr	x20, [x20, _tda9874a_modelist@GOTPAGEOFF]
Lloh18:
	adrp	x21, _tda9874a_STD@GOTPAGE
Lloh19:
	ldr	x21, [x21, _tda9874a_STD@GOTPAGEOFF]
	cmp	w8, #17
	b.ne	LBB0_2
; %bb.1:
	mov	w2, #128
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x8, x8, x9, lsl #3
	add	x2, x8, #4
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_chip_cmd
	mov	w2, #0
LBB0_3:
Lloh22:
	adrp	x8, _TDA9874A_FMMR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TDA9874A_FMMR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_chip_write
Lloh25:
	adrp	x8, _TDA9874A_C1OLAR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TDA9874A_C1OLAR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_chip_write
Lloh28:
	adrp	x8, _TDA9874A_C2OLAR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TDA9874A_C2OLAR@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_chip_write
Lloh31:
	adrp	x8, _TDA9874A_NCONR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TDA9874A_NCONR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _tda9874a_NCONR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _tda9874a_NCONR@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_chip_write
Lloh37:
	adrp	x8, _TDA9874A_NOLAR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TDA9874A_NOLAR@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_chip_write
Lloh40:
	adrp	x8, _TDA9874A_NLELR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _TDA9874A_NLELR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #20
	bl	_chip_write
Lloh43:
	adrp	x8, _TDA9874A_NUELR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _TDA9874A_NUELR@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #80
	bl	_chip_write
	ldr	w8, [x23]
Lloh46:
	adrp	x9, _TDA9874A_AMCONR@GOTPAGE
Lloh47:
	ldr	x9, [x9, _TDA9874A_AMCONR@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x9]
	mov	x0, x19
	cmp	w8, #17
	b.ne	LBB0_5
; %bb.4:
	mov	w2, #249
	bl	_chip_write
Lloh49:
	adrp	x8, _TDA9874A_SDACOSR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _TDA9874A_SDACOSR@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w23, #128
	cinc	w2, w23, ne
	mov	x0, x19
	bl	_chip_write
Lloh52:
	adrp	x8, _TDA9874A_AOSR@GOTPAGE
Lloh53:
	ldr	x8, [x8, _TDA9874A_AOSR@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_chip_write
Lloh55:
	adrp	x8, _TDA9874A_MDACOSR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _TDA9874A_MDACOSR@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w8, #130
	csel	w2, w23, w8, eq
	mov	x0, x19
	bl	_chip_write
Lloh58:
	adrp	x8, _tda9874a_ESP@GOTPAGE
Lloh59:
	ldr	x8, [x8, _tda9874a_ESP@GOTPAGEOFF]
Lloh60:
	ldr	w2, [x8]
Lloh61:
	adrp	x8, _TDA9874A_ESP@GOTPAGE
Lloh62:
	ldr	x8, [x8, _TDA9874A_ESP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	w2, #251
	bl	_chip_write
Lloh63:
	adrp	x8, _TDA9874A_SDACOSR@GOTPAGE
Lloh64:
	ldr	x8, [x8, _TDA9874A_SDACOSR@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w8, #128
	cinc	w2, w8, ne
	mov	x0, x19
	bl	_chip_write
	mov	w2, #0
Lloh66:
	adrp	x8, _TDA9874A_AOSR@GOTPAGE
Lloh67:
	ldr	x8, [x8, _TDA9874A_AOSR@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_chip_write
Lloh68:
	adrp	x8, _debug@GOTPAGE
Lloh69:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	x5, [x21]
	lsl	x9, x5, #3
	ldr	w4, [x8, x9]
Lloh71:
	adrp	x3, l_.str.1@PAGE
Lloh72:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #1
	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
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_TDA9874A_AGCGR,4,2             ; @TDA9874A_AGCGR
	.comm	_TDA9874A_GCONR,4,2             ; @TDA9874A_GCONR
	.comm	_tda9874a_GCONR,4,2             ; @tda9874a_GCONR
	.comm	_TDA9874A_MSR,4,2               ; @TDA9874A_MSR
	.comm	_tda9874a_mode,8,3              ; @tda9874a_mode
	.comm	_tda9874a_dic,4,2               ; @tda9874a_dic
	.comm	_TDA9874A_FMMR,4,2              ; @TDA9874A_FMMR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tda9874_modelist"

	.comm	_tda9874a_modelist,8,3          ; @tda9874a_modelist
	.comm	_tda9874a_STD,8,3               ; @tda9874a_STD
	.comm	_TDA9874A_C1OLAR,4,2            ; @TDA9874A_C1OLAR
	.comm	_TDA9874A_C2OLAR,4,2            ; @TDA9874A_C2OLAR
	.comm	_TDA9874A_NCONR,4,2             ; @TDA9874A_NCONR
	.comm	_tda9874a_NCONR,4,2             ; @tda9874a_NCONR
	.comm	_TDA9874A_NOLAR,4,2             ; @TDA9874A_NOLAR
	.comm	_TDA9874A_NLELR,4,2             ; @TDA9874A_NLELR
	.comm	_TDA9874A_NUELR,4,2             ; @TDA9874A_NUELR
	.comm	_TDA9874A_AMCONR,4,2            ; @TDA9874A_AMCONR
	.comm	_TDA9874A_SDACOSR,4,2           ; @TDA9874A_SDACOSR
	.comm	_TDA9874A_AOSR,4,2              ; @TDA9874A_AOSR
	.comm	_TDA9874A_MDACOSR,4,2           ; @TDA9874A_MDACOSR
	.comm	_TDA9874A_ESP,4,2               ; @TDA9874A_ESP
	.comm	_tda9874a_ESP,4,2               ; @tda9874a_ESP
	.comm	_debug,4,2                      ; @debug
l_.str.1:                               ; @.str.1
	.asciz	"tda9874a_setup(): %s [0x%02X].\n"

	.no_dead_strip	_tda9874a_setup
.subsections_via_symbols
