	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt2050_set_if_freq
_mt2050_set_if_freq:                    ## @mt2050_set_if_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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	$1218000000, %edx               ## imm = 0x48993480
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_tuner_dbg
	leal	1218000000(%rbx), %eax
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	shrq	$50, %rax
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	addl	%ebx, %r14d
	imulq	$1125899907, %rax, %rsi         ## imm = 0x431BDE83
	shrq	$52, %rsi
	imull	$1069741824, %esi, %r8d         ## imm = 0x3FC2F700
	addl	%eax, %r8d
	imulq	$375299969, %rax, %rdi          ## imm = 0x165E9F81
                                        ## kill: def $eax killed $eax killed $rax def $rax
	subl	%r14d, %eax
	shrl	$4, %eax
	imulq	$175921861, %rax, %rax          ## imm = 0xA7C5AC5
	shrq	$39, %rax
	imull	$50000, %eax, %eax              ## imm = 0xC350
	imulq	$1125899907, %rax, %rbx         ## imm = 0x431BDE83
	movq	%rbx, %rdx
	shrq	$52, %rdx
	imull	$-4000000, %edx, %ecx           ## imm = 0xFFC2F700
	addl	%eax, %ecx
	shll	$2, %r8d
	imulq	$1125899907, %r8, %r14          ## imm = 0x431BDE83
	shrq	$52, %r14
	imulq	$274877907, %rcx, %r15          ## imm = 0x10624DD3
	shrq	$32, %r15
	andl	$-64, %r15d
	shll	$6, %r15d
	imulq	$274877907, %r15, %r8           ## imm = 0x10624DD3
	shrq	$40, %r8
	shrq	$54, %rdi
	leal	-1(%rdi), %r10d
	shll	$2, %edi
	leal	(%rdi,%rdi,2), %eax
	movl	%esi, %r13d
	subl	%eax, %r13d
	shrq	$55, %rbx
	leal	-1(%rbx), %r9d
	shll	$3, %ebx
	movl	%edx, %r12d
	subl	%ebx, %r12d
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$2, %eax
	jl	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r10d, %ebx
	callq	_tuner_dbg
	movl	%r12d, (%rsp)
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_tuner_dbg
	movl	%ebx, %r10d
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	movb	$1, -46(%rbp)
	leal	(%r14,%r13,4), %ecx
	movl	%ecx, %edx
	orb	$-128, %dl
	cmpl	$275000000, -72(%rbp)           ## 4-byte Folded Reload
                                        ## imm = 0x10642AC0
	movzbl	%dl, %edx
	cmovael	%ecx, %edx
	movb	%dl, -45(%rbp)
	movb	%r10b, -44(%rbp)
	shll	$5, %r12d
	movl	%r15d, %ecx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	shrq	$48, %rcx
	addl	%r12d, %ecx
	movb	%cl, -43(%rbp)
	movb	%r8b, -42(%rbp)
	movl	%r9d, %ecx
	orb	$64, %cl
	testl	%r15d, %r15d
	movzbl	%cl, %ecx
	cmovel	%r9d, %ecx
	movb	%cl, -41(%rbp)
	cmpl	$2, %eax
	jl	LBB0_4
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	leaq	-46(%rbp), %rdx
	movl	$6, %esi
	xorl	%eax, %eax
	callq	_tuner_dbg
LBB0_4:
	leaq	-46(%rbp), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	$6, %edx
	callq	_tuner_i2c_xfer_send
	cmpl	$6, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	callq	_tuner_warn
LBB0_6:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mt2050_set_if_freq freq=%d if1=%d if2=%d\n"

	.comm	_debug,4,2                      ## @debug
L_.str.1:                               ## @.str.1
	.asciz	"lo1 lo2 = %d %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"bufs is: %*ph\n"

L_.str.4:                               ## @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 6)\n"

	.no_dead_strip	_mt2050_set_if_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt2050_set_if_freq
_mt2050_set_if_freq:                    ; @mt2050_set_if_freq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	ldr	x8, [x0]
	str	x8, [sp, #48]                   ; 8-byte Folded Spill
	mov	w19, #13440
	movk	w19, #18585, lsl #16
	stp	x19, x21, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_tuner_dbg
	add	w8, w20, w19
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #50
	mov	w10, #16960
	movk	w10, #15, lsl #16
	mul	w10, w8, w10
	add	w8, w21, w20
	sub	w8, w10, w8
	lsr	w8, w8, #4
	mov	w11, #23237
	movk	w11, #2684, lsl #16
	umull	x8, w8, w11
	lsr	x8, x8, #39
	mov	w11, #50000
	mul	w11, w8, w11
	umull	x8, w10, w9
	lsr	x1, x8, #52
	umull	x12, w11, w9
	lsr	x8, x12, #52
	mov	w13, #63232
	movk	w13, #16322, lsl #16
	madd	w13, w1, w13, w10
	mov	w14, #63232
	movk	w14, #65474, lsl #16
	madd	w11, w8, w14, w11
	lsl	w13, w13, #2
	umull	x9, w13, w9
	lsr	x21, x9, #52
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	umull	x11, w11, w9
	lsr	x11, x11, #32
	lsl	w11, w11, #6
	and	w22, w11, #0xfffff000
	umull	x24, w22, w9
	lsr	x23, x24, #40
	mov	w9, #40833
	movk	w9, #5726, lsl #16
	umull	x9, w10, w9
	lsr	x9, x9, #54
	sub	w26, w9, #1
	mov	w10, #-12
	madd	w28, w9, w10, w1
	lsr	x9, x12, #55
	sub	w25, w9, #1
	sub	w27, w8, w9, lsl #3
Lloh2:
	adrp	x19, _debug@GOTPAGE
Lloh3:
	ldr	x19, [x19, _debug@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	w9, #2
	b.lt	LBB0_2
; %bb.1:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_tuner_dbg
	stp	x25, x27, [sp, #24]
	stp	x26, x28, [sp, #8]
	mov	x8, x23
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_tuner_dbg
	ldr	w9, [x19]
LBB0_2:
	mov	w8, #1
	strb	w8, [sp, #58]
	add	w8, w21, w28, lsl #2
	orr	w10, w8, #0x80
	mov	w11, #10944
	movk	w11, #4196, lsl #16
	cmp	w20, w11
	csel	w8, w10, w8, lo
	strb	w8, [sp, #59]
	strb	w26, [sp, #60]
	lsr	x8, x24, #48
	add	w8, w8, w27, lsl #5
	strb	w8, [sp, #61]
	strb	w23, [sp, #62]
	orr	w8, w25, #0x40
	cmp	w22, #0
	csel	w8, w25, w8, eq
	strb	w8, [sp, #63]
	cmp	w9, #2
	b.lt	LBB0_4
; %bb.3:
	add	x8, sp, #58
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	w1, #6
	bl	_tuner_dbg
LBB0_4:
	add	x1, sp, #58
	ldr	x0, [sp, #48]                   ; 8-byte Folded Reload
	mov	w2, #6
	bl	_tuner_i2c_xfer_send
	cmp	w0, #6
	b.eq	LBB0_6
; %bb.5:
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_tuner_warn
LBB0_6:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mt2050_set_if_freq freq=%d if1=%d if2=%d\n"

	.comm	_debug,4,2                      ; @debug
l_.str.1:                               ; @.str.1
	.asciz	"lo1 lo2 = %d %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"num1 num2 div1a div1b div2a div2b= %x %x %x %x %x %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"bufs is: %*ph\n"

l_.str.4:                               ; @.str.4
	.asciz	"i2c i/o error: rc == %d (should be 6)\n"

	.no_dead_strip	_mt2050_set_if_freq
.subsections_via_symbols
