	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __set_radio_freq
___set_radio_freq:                      ## @__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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	(%rdi), %r15
	movl	$0, -37(%rbp)
	movl	$0, -40(%rbp)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	movq	_TEA5761_TNCTRL_MU@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movl	$5, %ecx
	movl	%eax, %ebx
	jmp	LBB0_3
LBB0_2:
	movq	_TEA5761_TNCTRL_PUPD_0@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movl	$4, %ecx
	xorl	%ebx, %ebx
LBB0_3:
	movb	%al, -40(%rbp,%rcx)
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
	movq	_TEA5761_TNCTRL_MST@GOTPCREL(%rip), %rax
	orb	(%rax), %bl
	movb	%bl, -35(%rbp)
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_tuner_dbg
LBB0_6:
	movl	%r14d, %eax
	shrl	$2, %eax
	andl	$268435455, %eax                ## imm = 0xFFFFFFF
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	addl	$925000, %eax                   ## imm = 0xE1D48
	movl	%eax, %ecx
	shrl	$15, %ecx
	shrl	$23, %eax
	andb	$63, %al
	movb	%al, -39(%rbp)
	movb	%cl, -38(%rbp)
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rdi
	callq	_tea5761_status_dump
LBB0_8:
	leaq	4(%r15), %rdi
	leaq	-40(%rbp), %rsi
	movl	$7, %edx
	callq	_tuner_i2c_xfer_send
	cmpl	$7, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_tuner_warn
LBB0_10:
	imull	$125, %r14d, %eax
	shrl	%eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radio freq counter %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"TEA5761 set to standby mode\n"

	.comm	_TEA5761_TNCTRL_MU,1,0          ## @TEA5761_TNCTRL_MU
	.comm	_TEA5761_TNCTRL_PUPD_0,1,0      ## @TEA5761_TNCTRL_PUPD_0
L_.str.2:                               ## @.str.2
	.asciz	"TEA5761 set to mono\n"

	.comm	_TEA5761_TNCTRL_MST,1,0         ## @TEA5761_TNCTRL_MST
L_.str.3:                               ## @.str.3
	.asciz	"TEA5761 set to stereo\n"

	.comm	_debug,8,3                      ## @debug
L_.str.4:                               ## @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 5)\n"

	.no_dead_strip	___set_radio_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __set_radio_freq
___set_radio_freq:                      ; @__set_radio_freq
	.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	x20, x2
	mov	x19, x1
	ldr	x21, [x0]
	stur	wzr, [sp, #11]
	str	wzr, [sp, #8]
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_dbg
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_tuner_dbg
Lloh4:
	adrp	x8, _TEA5761_TNCTRL_MU@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TEA5761_TNCTRL_MU@GOTPAGEOFF]
	ldrb	w8, [x8]
	mov	w9, #5
	mov	x22, x8
	b	LBB0_3
LBB0_2:
	mov	w22, #0
Lloh6:
	adrp	x8, _TEA5761_TNCTRL_PUPD_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TEA5761_TNCTRL_PUPD_0@GOTPAGEOFF]
	ldrb	w8, [x8]
	mov	w9, #4
LBB0_3:
	add	x10, sp, #8
	strb	w8, [x10, x9]
	cbz	w20, LBB0_5
; %bb.4:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tuner_dbg
Lloh10:
	adrp	x8, _TEA5761_TNCTRL_MST@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TEA5761_TNCTRL_MST@GOTPAGEOFF]
	ldrb	w8, [x8]
	orr	w8, w22, w8
	strb	w8, [sp, #13]
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tuner_dbg
LBB0_6:
	ubfx	w8, w19, #2, #28
	mov	w9, #1000
	mov	w10, #7496
	movk	w10, #14, lsl #16
	madd	w8, w8, w9, w10
	lsr	w9, w8, #15
	ubfx	w8, w8, #23, #6
	strb	w8, [sp, #9]
	strb	w9, [sp, #10]
Lloh14:
	adrp	x8, _debug@GOTPAGE
Lloh15:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	add	x0, sp, #8
	bl	_tea5761_status_dump
LBB0_8:
	add	x0, x21, #4
	add	x1, sp, #8
	mov	w2, #7
	bl	_tuner_i2c_xfer_send
	cmp	w0, #7
	b.eq	LBB0_10
; %bb.9:
	mov	x1, x0
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tuner_warn
LBB0_10:
	mov	w8, #125
	mul	w8, w19, w8
	lsr	w8, w8, #1
	str	w8, [x21]
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radio freq counter %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"TEA5761 set to standby mode\n"

	.comm	_TEA5761_TNCTRL_MU,1,0          ; @TEA5761_TNCTRL_MU
	.comm	_TEA5761_TNCTRL_PUPD_0,1,0      ; @TEA5761_TNCTRL_PUPD_0
l_.str.2:                               ; @.str.2
	.asciz	"TEA5761 set to mono\n"

	.comm	_TEA5761_TNCTRL_MST,1,0         ; @TEA5761_TNCTRL_MST
l_.str.3:                               ; @.str.3
	.asciz	"TEA5761 set to stereo\n"

	.comm	_debug,8,3                      ; @debug
l_.str.4:                               ; @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 5)\n"

	.no_dead_strip	___set_radio_freq
.subsections_via_symbols
