	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda829x_find_tuner
_tda829x_find_tuner:                    ## @tda829x_find_tuner
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	leaq	-68(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$1, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_2:
	movl	$96, -52(%rbp)
	movl	8(%r12), %edi
	leaq	-64(%rbp), %r13
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
	cmpl	$1, %eax
	sete	%r14b
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	$96, %r15d
	cmovnel	%ecx, %r15d
	movl	$97, -52(%rbp)
	movl	8(%r12), %edi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%r15d, %ebx
	shll	$8, %ebx
	orl	$97, %ebx
	xorl	%r13d, %r13d
	cmpl	$1, %eax
	cmovnel	%r15d, %ebx
	sete	%r13b
	addl	%r14d, %r13d
	movl	$98, -52(%rbp)
	movl	8(%r12), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%ebx, %r14d
	shll	$8, %r14d
	orl	$98, %r14d
	xorl	%r15d, %r15d
	cmpl	$1, %eax
	cmovnel	%ebx, %r14d
	sete	%r15b
	addl	%r13d, %r15d
	movl	$99, -52(%rbp)
	movl	8(%r12), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	movl	%r14d, %r13d
	shll	$8, %r13d
	orl	$99, %r13d
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	cmovnel	%r14d, %r13d
	sete	%bl
	addl	%r15d, %ebx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_4:
	cmpl	$2, %ebx
	jb	LBB0_8
## %bb.5:
	leaq	-64(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%r13b, %eax
	movl	%eax, -52(%rbp)
	movl	8(%r12), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	sarl	$8, %r13d
	decl	%ebx
	jne	LBB0_6
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.10:
	movzbl	%r13b, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movl	$96, %ebx
	movl	$96, %esi
LBB0_11:
	callq	_tuner_info
	movl	%ebx, (%r12)
	movl	%ebx, -52(%rbp)
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	*%rax
LBB0_13:
	movl	8(%r12), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.17:
	movl	-68(%rbp), %eax
	leal	-131(%rax), %ecx
	cmpl	$1, %ecx
	ja	LBB0_19
## %bb.18:
	movq	_TDA18271@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 24(%r12)
	movl	20(%r12), %eax
	movq	_tda829x_tda18271_config@GOTPCREL(%rip), %r8
	movl	%eax, 8(%r8)
	movl	28(%r12), %eax
	movl	%eax, 4(%r8)
	movq	_tda18271_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movl	8(%r12), %ecx
	movq	%r15, %rsi
	callq	_dvb_attach
	jmp	LBB0_23
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	callq	_tuner_warn
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*%rax
LBB0_16:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_29
LBB0_19:
	testb	$60, %al
	jne	LBB0_20
## %bb.21:
	movq	_TDA8275@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_20:
	movq	_TDA8275A@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	orl	%eax, 24(%r12)
	movq	_tda827x_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movl	8(%r12), %ecx
	leaq	12(%r12), %r8
	movq	%r15, %rsi
	callq	_dvb_attach
	movl	4(%r12), %eax
	movl	%eax, 12(%r12)
LBB0_23:
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	%r15, %rdi
	callq	*%rax
LBB0_25:
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	%r15, %rdi
	callq	*%rax
LBB0_27:
	movq	(%r15), %rcx
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_29
## %bb.28:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*%rcx
LBB0_29:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not clearly identify tuner address, defaulting to %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"setting tuner address to %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"tuner access failed!\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_TDA18271,4,2                   ## @TDA18271
	.comm	_tda829x_tda18271_config,12,2   ## @tda829x_tda18271_config
	.comm	_tda18271_attach,4,2            ## @tda18271_attach
	.comm	_TDA8275,4,2                    ## @TDA8275
	.comm	_TDA8275A,4,2                   ## @TDA8275A
	.comm	_tda827x_attach,4,2             ## @tda827x_attach
	.no_dead_strip	_tda829x_find_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda829x_find_tuner
_tda829x_find_tuner:                    ; @tda829x_find_tuner
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x21, [x0, #24]
	add	x8, sp, #28
	str	x8, [sp]
	mov	w8, #1
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w8, [sp, #8]
	str	w9, [sp, #16]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_2:
	mov	w22, #96
	str	w22, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	mov	x20, x0
	mov	w23, #97
	str	w23, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	cset	w8, eq
	cmp	w20, #1
	csel	w9, w22, wzr, eq
	cinc	w20, w8, eq
	lsr	w8, w9, #5
	bfi	w23, w8, #13, #2
	cmp	w0, #1
	csel	w22, w23, w9, eq
	mov	w23, #98
	str	w23, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	orr	w8, w23, w22, lsl #8
	cmp	w0, #1
	csel	w22, w8, w22, eq
	cinc	w23, w20, eq
	mov	w20, #99
	str	w20, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	orr	w8, w20, w22, lsl #8
	cmp	w0, #1
	csel	w20, w8, w22, eq
	cinc	w23, w23, eq
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_4:
	cmp	w23, #2
	b.lo	LBB0_12
; %bb.5:
	mov	w8, #99
	and	w8, w20, w8
	str	w8, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	mov	x22, x20
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.6:
	asr	w22, w20, #8
	cmp	w23, #1
	b.eq	LBB0_13
; %bb.7:
	ubfx	w8, w20, #8, #8
	str	w8, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.8:
	asr	w22, w20, #16
	cmp	w23, #2
	b.eq	LBB0_13
; %bb.9:
	ubfx	w8, w20, #16, #8
	str	w8, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.10:
	asr	w22, w20, #24
	cmp	w23, #3
	b.eq	LBB0_13
; %bb.11:
	lsr	w8, w20, #24
	str	w8, [sp, #12]
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	asr	w8, w20, #31
	cmp	w0, #1
	csel	w22, w8, w22, eq
	b	LBB0_13
LBB0_12:
	mov	x22, x20
LBB0_13:
	cbz	w22, LBB0_15
; %bb.14:
	and	w20, w22, #0xff
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	b	LBB0_16
LBB0_15:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	w20, #96
	mov	w1, #96
LBB0_16:
	bl	_tuner_info
	str	w20, [x21]
	str	w20, [sp, #12]
	ldr	x8, [x19]
	cbz	x8, LBB0_18
; %bb.17:
	mov	x0, x19
	mov	w1, #1
	blr	x8
LBB0_18:
	ldr	w0, [x21, #8]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_21
; %bb.19:
	ldr	w8, [sp, #28]
	sub	w9, w8, #131
	cmp	w9, #1
	b.hi	LBB0_24
; %bb.20:
Lloh7:
	adrp	x8, _TDA18271@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TDA18271@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldp	w10, w9, [x21, #20]
	orr	w8, w9, w8
	str	w8, [x21, #24]
Lloh10:
	adrp	x4, _tda829x_tda18271_config@GOTPAGE
Lloh11:
	ldr	x4, [x4, _tda829x_tda18271_config@GOTPAGEOFF]
	ldr	w8, [x21, #28]
	stp	w8, w10, [x4, #4]
Lloh12:
	adrp	x8, _tda18271_attach@GOTPAGE
Lloh13:
	ldr	x8, [x8, _tda18271_attach@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w2, [x21]
	ldr	w3, [x21, #8]
	mov	x1, x19
	bl	_dvb_attach
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_25
	b	LBB0_26
LBB0_21:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tuner_warn
	ldr	x8, [x19]
	cbz	x8, LBB0_23
; %bb.22:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_23:
Lloh17:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_31
LBB0_24:
Lloh20:
	adrp	x9, _TDA8275@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TDA8275@GOTPAGEOFF]
Lloh22:
	adrp	x10, _TDA8275A@GOTPAGE
Lloh23:
	ldr	x10, [x10, _TDA8275A@GOTPAGEOFF]
	tst	w8, #0x3c
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	ldr	w9, [x21, #24]
	orr	w8, w9, w8
	str	w8, [x21, #24]
Lloh24:
	adrp	x8, _tda827x_attach@GOTPAGE
Lloh25:
	ldr	x8, [x8, _tda827x_attach@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldr	w2, [x21]
	ldr	w3, [x21, #8]
	add	x4, x21, #12
	mov	x1, x19
	bl	_dvb_attach
	ldr	w8, [x21, #4]
	str	w8, [x21, #12]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_26
LBB0_25:
	mov	x0, x19
	blr	x8
LBB0_26:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_28
; %bb.27:
	mov	x0, x19
	blr	x8
LBB0_28:
	ldr	x8, [x19]
	cbz	x8, LBB0_30
; %bb.29:
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_30:
	mov	w0, #0
LBB0_31:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not clearly identify tuner address, defaulting to %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"setting tuner address to %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"tuner access failed!\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_TDA18271,4,2                   ; @TDA18271
	.comm	_tda829x_tda18271_config,12,2   ; @tda829x_tda18271_config
	.comm	_tda18271_attach,4,2            ; @tda18271_attach
	.comm	_TDA8275,4,2                    ; @TDA8275
	.comm	_TDA8275A,4,2                   ; @TDA8275A
	.comm	_tda827x_attach,4,2             ; @tda827x_attach
	.no_dead_strip	_tda829x_find_tuner
.subsections_via_symbols
