	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function simple_set_radio_freq
_simple_set_radio_freq:                 ## @simple_set_radio_freq
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r14
	movl	(%rsi), %r12d
	movq	8(%r14), %rsi
	movl	(%rsi), %eax
	movq	_TUNER_PARAM_TYPE_RADIO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testl	%eax, %eax
	movl	$1, %ecx
	cmovlel	%eax, %ecx
	decl	%ecx
	movq	8(%rsi), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	decq	%rax
	movl	%eax, %esi
	imulq	$88, %rsi, %rsi
	cmpq	%rdx, (%rbx,%rsi)
	jne	LBB0_1
## %bb.3:
	movl	%eax, %ecx
LBB0_4:
	movslq	%ecx, %rax
	imulq	$88, %rax, %r15
	movslq	8(%rbx,%r15), %rsi
	cmpq	$3, %rsi
	jae	LBB0_5
## %bb.6:
	leaq	l_switch.table.simple_set_radio_freq(%rip), %rax
	movl	(%rax,%rsi,4), %r13d
	movq	80(%rbx,%r15), %rax
	movq	_TUNER_RATIO_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	(%rax), %ecx
	movq	_TUNER_RATIO_SELECT_50@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -56(%rbp)
	leaq	-64(%rbp), %rsi
	callq	_simple_radio_bandswitch
	leal	(%r12,%r13), %eax
	addl	$400, %eax                      ## imm = 0x190
	imulq	$1374389535, %rax, %r12         ## imm = 0x51EB851F
	shrq	$40, %r12
	cmpq	$0, 72(%rbx,%r15)
	je	LBB0_9
## %bb.7:
	cmpl	(%r14), %r12d
	jge	LBB0_9
## %bb.8:
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	%esi, -64(%rbp)
	movl	%edx, -60(%rbp)
	movl	%r12d, %ecx
	shrl	$8, %ecx
	andl	$127, %ecx
	movl	%ecx, -56(%rbp)
	movzbl	%r12b, %r8d
	movl	%r8d, -52(%rbp)
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	jmp	LBB0_26
LBB0_9:
	movl	%r12d, %esi
	shrl	$8, %esi
	andl	$127, %esi
	movl	%esi, -64(%rbp)
	movzbl	%r12b, %edx
	movl	%edx, -60(%rbp)
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %r8d
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	callq	_tuner_dbg
	movl	%r12d, (%r14)
	cmpq	$0, 64(%rbx,%r15)
	je	LBB0_24
## %bb.11:
	movl	$0, -68(%rbp)
	movq	_TUNER_TDA9887@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, -88(%rbp)
	xorl	%eax, %eax
	cmpq	$0, 56(%rbx,%r15)
	je	LBB0_14
## %bb.12:
	cmpl	$0, 48(%rbx,%r15)
	jne	LBB0_14
## %bb.13:
	movq	_TDA9887_PORT1_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
LBB0_14:
	cmpq	$0, 40(%rbx,%r15)
	je	LBB0_17
## %bb.15:
	cmpl	$0, 32(%rbx,%r15)
	jne	LBB0_17
## %bb.16:
	movq	_TDA9887_PORT2_ACTIVE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -68(%rbp)
LBB0_17:
	cmpq	$0, 24(%rbx,%r15)
	je	LBB0_19
## %bb.18:
	movq	_TDA9887_INTERCARRIER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -68(%rbp)
LBB0_19:
	leaq	(%rbx,%r15), %rcx
	addq	$8, %rcx
	cmpq	$0, 16(%rbx,%r15)
	je	LBB0_21
## %bb.20:
	movq	_TDA9887_GAIN_NORMAL@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, -68(%rbp)
LBB0_21:
	cmpl	$2, (%rcx)
	jne	LBB0_23
## %bb.22:
	movq	_TDA9887_RIF_41_3@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -68(%rbp)
LBB0_23:
	movl	4(%r14), %edi
	movq	_TUNER_SET_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdx
	callq	_i2c_clients_command
LBB0_24:
	addq	$4, %r14
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_tuner_i2c_xfer_send
	cmpl	$4, %eax
	je	LBB0_27
## %bb.25:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
LBB0_26:
	callq	_tuner_warn
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.28:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TUNER_PARAM_TYPE_RADIO,8,3     ## @TUNER_PARAM_TYPE_RADIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported radio_if value %d\n"

	.comm	_TUNER_RATIO_MASK,4,2           ## @TUNER_RATIO_MASK
	.comm	_TUNER_RATIO_SELECT_50,4,2      ## @TUNER_RATIO_SELECT_50
L_.str.1:                               ## @.str.1
	.asciz	"radio 0x%02x 0x%02x 0x%02x 0x%02x\n"

	.comm	_TUNER_TDA9887,4,2              ## @TUNER_TDA9887
	.comm	_TDA9887_PORT1_ACTIVE,4,2       ## @TDA9887_PORT1_ACTIVE
	.comm	_TDA9887_PORT2_ACTIVE,4,2       ## @TDA9887_PORT2_ACTIVE
	.comm	_TDA9887_INTERCARRIER,4,2       ## @TDA9887_INTERCARRIER
	.comm	_TDA9887_GAIN_NORMAL,4,2        ## @TDA9887_GAIN_NORMAL
	.comm	_TDA9887_RIF_41_3,4,2           ## @TDA9887_RIF_41_3
	.comm	_TUNER_SET_CONFIG,4,2           ## @TUNER_SET_CONFIG
L_.str.2:                               ## @.str.2
	.asciz	"i2c i/o error: rc == %d (should be 4)\n"

	.no_dead_strip	_simple_set_radio_freq
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.simple_set_radio_freq
l_switch.table.simple_set_radio_freq:
	.long	171200                          ## 0x29cc0
	.long	532800                          ## 0x82140
	.long	660800                          ## 0xa1540

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function simple_set_radio_freq
_simple_set_radio_freq:                 ; @simple_set_radio_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x19, [x0]
	ldr	w8, [x1]
	ldr	x12, [x19, #8]
	ldr	w10, [x12]
Lloh3:
	adrp	x9, _TUNER_PARAM_TYPE_RADIO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TUNER_PARAM_TYPE_RADIO@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x9]
	cmp	w10, #1
	csinc	w9, w10, wzr, lt
	sub	w9, w9, #1
	ldr	x20, [x12, #8]
	mov	w12, #88
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w10, #2
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x10, x10, #1
	and	x13, x10, #0xffffffff
	mul	x13, x13, x12
	ldr	x13, [x20, x13]
	cmp	x13, x11
	b.ne	LBB0_1
; %bb.3:
	mov	x9, x10
LBB0_4:
	mov	w10, #88
	smaddl	x21, w9, w10, x20
	ldrsw	x1, [x21, #8]!
	cmp	w1, #3
	b.hs	LBB0_8
; %bb.5:
	sxtw	x22, w9
Lloh6:
	adrp	x9, l_switch.table.simple_set_radio_freq@PAGE
Lloh7:
	add	x9, x9, l_switch.table.simple_set_radio_freq@PAGEOFF
	ldr	w9, [x9, x1, lsl #2]
	add	w23, w8, w9
	mov	w8, #88
	madd	x24, x22, x8, x20
	ldr	x8, [x24, #80]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _TUNER_RATIO_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _TUNER_RATIO_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh11:
	adrp	x9, _TUNER_RATIO_SELECT_50@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TUNER_RATIO_SELECT_50@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #32]
	add	x1, sp, #24
	bl	_simple_radio_bandswitch
	add	w8, w23, #400
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x23, x8, #40
	ldr	x8, [x24, #72]
	cbz	x8, LBB0_9
; %bb.6:
	ldr	w8, [x19]
	cmp	w23, w8
	b.ge	LBB0_9
; %bb.7:
	ldp	w1, w2, [sp, #32]
	stp	w1, w2, [sp, #24]
	ubfx	w3, w23, #8, #7
	and	w4, w23, #0xff
	stp	w3, w4, [sp, #32]
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_27
LBB0_9:
	ubfx	w1, w23, #8, #7
	and	w2, w23, #0xff
	stp	w1, w2, [sp, #24]
	ldp	w3, w4, [sp, #32]
LBB0_10:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tuner_dbg
	str	w23, [x19]
	mov	w8, #88
	madd	x8, x22, x8, x20
	ldr	x8, [x8, #64]
	cbz	x8, LBB0_25
; %bb.11:
	str	wzr, [sp, #20]
Lloh18:
	adrp	x8, _TUNER_TDA9887@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TUNER_TDA9887@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x8, sp, #20
	str	x8, [sp]
	mov	w8, #88
	madd	x8, x22, x8, x20
	ldr	x8, [x8, #56]
	cbz	x8, LBB0_15
; %bb.12:
	mov	w8, #88
	madd	x8, x22, x8, x20
	ldr	w8, [x8, #48]
	cbz	w8, LBB0_14
; %bb.13:
	mov	w8, #0
	b	LBB0_15
LBB0_14:
Lloh21:
	adrp	x8, _TDA9887_PORT1_ACTIVE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TDA9887_PORT1_ACTIVE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [sp, #20]
LBB0_15:
	mov	w9, #88
	madd	x9, x22, x9, x20
	ldr	x9, [x9, #40]
	cbz	x9, LBB0_18
; %bb.16:
	mov	w9, #88
	madd	x9, x22, x9, x20
	ldr	w9, [x9, #32]
	cbnz	w9, LBB0_18
; %bb.17:
Lloh24:
	adrp	x9, _TDA9887_PORT2_ACTIVE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _TDA9887_PORT2_ACTIVE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #20]
LBB0_18:
	mov	w9, #88
	madd	x9, x22, x9, x20
	ldr	x9, [x9, #24]
	cbz	x9, LBB0_20
; %bb.19:
Lloh27:
	adrp	x9, _TDA9887_INTERCARRIER@GOTPAGE
Lloh28:
	ldr	x9, [x9, _TDA9887_INTERCARRIER@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #20]
LBB0_20:
	mov	w9, #88
	madd	x9, x22, x9, x20
	ldr	x9, [x9, #16]
	cbz	x9, LBB0_22
; %bb.21:
Lloh30:
	adrp	x9, _TDA9887_GAIN_NORMAL@GOTPAGE
Lloh31:
	ldr	x9, [x9, _TDA9887_GAIN_NORMAL@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #20]
LBB0_22:
	ldr	w9, [x21]
	cmp	w9, #2
	b.ne	LBB0_24
; %bb.23:
Lloh33:
	adrp	x9, _TDA9887_RIF_41_3@GOTPAGE
Lloh34:
	ldr	x9, [x9, _TDA9887_RIF_41_3@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #20]
LBB0_24:
	ldr	w0, [x19, #4]
Lloh36:
	adrp	x8, _TUNER_SET_CONFIG@GOTPAGE
Lloh37:
	ldr	x8, [x8, _TUNER_SET_CONFIG@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_i2c_clients_command
LBB0_25:
	add	x0, x19, #4
	add	x1, sp, #24
	mov	w2, #4
	bl	_tuner_i2c_xfer_send
	cmp	w0, #4
	b.eq	LBB0_28
; %bb.26:
	mov	x1, x0
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_27:
	bl	_tuner_warn
LBB0_28:
	ldr	x8, [sp, #40]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.29:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_TUNER_PARAM_TYPE_RADIO,8,3     ; @TUNER_PARAM_TYPE_RADIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported radio_if value %d\n"

	.comm	_TUNER_RATIO_MASK,4,2           ; @TUNER_RATIO_MASK
	.comm	_TUNER_RATIO_SELECT_50,4,2      ; @TUNER_RATIO_SELECT_50
l_.str.1:                               ; @.str.1
	.asciz	"radio 0x%02x 0x%02x 0x%02x 0x%02x\n"

	.comm	_TUNER_TDA9887,4,2              ; @TUNER_TDA9887
	.comm	_TDA9887_PORT1_ACTIVE,4,2       ; @TDA9887_PORT1_ACTIVE
	.comm	_TDA9887_PORT2_ACTIVE,4,2       ; @TDA9887_PORT2_ACTIVE
	.comm	_TDA9887_INTERCARRIER,4,2       ; @TDA9887_INTERCARRIER
	.comm	_TDA9887_GAIN_NORMAL,4,2        ; @TDA9887_GAIN_NORMAL
	.comm	_TDA9887_RIF_41_3,4,2           ; @TDA9887_RIF_41_3
	.comm	_TUNER_SET_CONFIG,4,2           ; @TUNER_SET_CONFIG
l_.str.2:                               ; @.str.2
	.asciz	"i2c i/o error: rc == %d (should be 4)\n"

	.no_dead_strip	_simple_set_radio_freq
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.simple_set_radio_freq
l_switch.table.simple_set_radio_freq:
	.long	171200                          ; 0x29cc0
	.long	532800                          ; 0x82140
	.long	660800                          ; 0xa1540

.subsections_via_symbols
