	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_set_DIF_bandpass       ## -- Begin function cx231xx_set_DIF_bandpass
	.p2align	4, 0x90
_cx231xx_set_DIF_bandpass:              ## @cx231xx_set_DIF_bandpass
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	%r12, %r8
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_TUNER_MODE_FM_RADIO@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_DIF_PLL_FREQ_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2421824684, %edx               ## imm = 0x905A1CAC
	movq	%r14, %rdi
	callq	_vid_blk_write_word
	jmp	LBB0_6
LBB0_2:
	movq	%r13, %r12
	shlq	$28, %r12
	movq	%r12, %rdi
	movl	$50000000, %esi                 ## imm = 0x2FAF080
	callq	_do_div
	movq	_DIF_PLL_FREQ_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_vid_blk_write_word
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	addq	$-400000, %r13                  ## imm = 0xFFF9E580
	movq	_DIF_MISC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_vid_blk_read_word
	movl	$2097152, %edx                  ## imm = 0x200000
	orq	-48(%rbp), %rdx
	jmp	LBB0_5
LBB0_4:
	addq	$400000, %r13                   ## imm = 0x61A80
	movq	_DIF_MISC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_vid_blk_read_word
	movq	-48(%rbp), %rdx
	andl	$-2097153, %edx                 ## imm = 0xFFDFFFFF
LBB0_5:
	movq	%rdx, -48(%rbp)
	movq	_DIF_MISC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vid_blk_write_word
	movabsq	$3022314549036572937, %rcx      ## imm = 0x29F16B11C6D1E109
	movq	%r13, %rax
	imulq	%rcx
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$14, %rdx
	addq	%rax, %rdx
	imulq	$100000, %rdx, %rax             ## imm = 0x186A0
	cmpq	$3000001, %rax                  ## imm = 0x2DC6C1
	movl	$3000000, %ecx                  ## imm = 0x2DC6C0
	cmovgeq	%rax, %rcx
	cmpq	$16000000, %rcx                 ## imm = 0xF42400
	movl	$16000000, %r13d                ## imm = 0xF42400
	cmovbq	%rcx, %r13
LBB0_6:
	movl	(%r14), %r15d
	movq	_Dif_set_array@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testq	%rax, %rax
	jle	LBB0_11
## %bb.7:
	movl	$16, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r15
	callq	_ARRAY_SIZE
	addq	$24, %rbx
	cmpq	%rax, %r15
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpq	%r13, -16(%rdi,%rbx)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rdi,%rbx), %esi
	movq	-8(%rdi,%rbx), %rdx
	movq	%r14, %rdi
	callq	_vid_blk_write_word
	movq	(%r12), %rdi
	jmp	LBB0_10
LBB0_11:
	addq	$8, %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	"if_freq=%d;spectral_invert=0x%x;mode=0x%x\n"

	.comm	_TUNER_MODE_FM_RADIO,8,3        ## @TUNER_MODE_FM_RADIO
	.comm	_DIF_PLL_FREQ_WORD,4,2          ## @DIF_PLL_FREQ_WORD
	.comm	_DIF_MISC_CTRL,4,2              ## @DIF_MISC_CTRL
L_.str.1:                               ## @.str.1
	.asciz	"Enter IF=%zu\n"

	.comm	_Dif_set_array,8,3              ## @Dif_set_array
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_set_DIF_bandpass       ; -- Begin function cx231xx_set_DIF_bandpass
	.p2align	2
_cx231xx_set_DIF_bandpass:              ; @cx231xx_set_DIF_bandpass
	.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	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #24]
	ldr	w0, [x0]
	stp	x2, x3, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh2:
	adrp	x8, _TUNER_MODE_FM_RADIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TUNER_MODE_FM_RADIO@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _DIF_PLL_FREQ_WORD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIF_PLL_FREQ_WORD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #7340
	movk	w2, #36954, lsl #16
	bl	_vid_blk_write_word
	b	LBB0_6
LBB0_2:
	lsl	x22, x20, #28
	mov	x0, x22
	mov	w1, #61568
	movk	w1, #762, lsl #16
	bl	_do_div
Lloh8:
	adrp	x8, _DIF_PLL_FREQ_WORD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DIF_PLL_FREQ_WORD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_vid_blk_write_word
Lloh11:
	adrp	x22, _DIF_MISC_CTRL@GOTPAGE
Lloh12:
	ldr	x22, [x22, _DIF_MISC_CTRL@GOTPAGEOFF]
	cbz	x21, LBB0_4
; %bb.3:
	sub	x8, x20, #97, lsl #12           ; =397312
	sub	x20, x8, #2688
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x19
	bl	_vid_blk_read_word
	ldr	x8, [sp, #24]
	orr	x2, x8, #0x200000
	b	LBB0_5
LBB0_4:
	add	x8, x20, #97, lsl #12           ; =397312
	add	x20, x8, #2688
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x19
	bl	_vid_blk_read_word
	ldr	x8, [sp, #24]
	and	x8, x8, #0xffffffff
	and	x2, x8, #0xffffffffffdfffff
LBB0_5:
	str	x2, [sp, #24]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_vid_blk_write_word
	mov	x8, #57609
	movk	x8, #50897, lsl #16
	movk	x8, #27409, lsl #32
	movk	x8, #10737, lsl #48
	smulh	x8, x20, x8
	asr	x9, x8, #14
	add	x8, x9, x8, lsr #63
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mul	x8, x8, x9
	mov	w9, #50880
	movk	w9, #45, lsl #16
	cmp	x8, x9
	csel	x8, x8, x9, gt
	mov	w9, #9216
	movk	w9, #244, lsl #16
	cmp	x8, x9
	csel	x20, x8, x9, lo
LBB0_6:
	ldr	w21, [x19]
Lloh13:
	adrp	x22, _Dif_set_array@GOTPAGE
Lloh14:
	ldr	x22, [x22, _Dif_set_array@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	mov	x2, x0
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	x0, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x21, #0
	mov	x23, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x21, x21, #24
	cmp	x23, x0
	b.ge	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	x8, [x0, x21]
	cmp	x8, x20
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x0, x21
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
	mov	x0, x19
	bl	_vid_blk_write_word
	ldr	x0, [x22]
	b	LBB0_8
LBB0_11:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"if_freq=%d;spectral_invert=0x%x;mode=0x%x\n"

	.comm	_TUNER_MODE_FM_RADIO,8,3        ; @TUNER_MODE_FM_RADIO
	.comm	_DIF_PLL_FREQ_WORD,4,2          ; @DIF_PLL_FREQ_WORD
	.comm	_DIF_MISC_CTRL,4,2              ; @DIF_MISC_CTRL
l_.str.1:                               ; @.str.1
	.asciz	"Enter IF=%zu\n"

	.comm	_Dif_set_array,8,3              ; @Dif_set_array
.subsections_via_symbols
