	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8096_set_param_override
_dib8096_set_param_override:            ## @dib8096_set_param_override
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r14
	movslq	(%rsi), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BAND_OF_FREQUENCY
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	*(%r14)
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	$129, %r15d
	movl	$550, %eax                      ## imm = 0x226
	cmovnel	%r14d, %eax
	cmpl	$128, %r15d
	movl	$100, %ebx
	cmovnel	%eax, %ebx
	movq	%r12, %rdi
	callq	_dib0090_get_wbd_offset
                                        ## kill: def $eax killed $eax def $rax
	shll	$4, %eax
	leal	(%rax,%rax,8), %eax
	cltq
	imulq	$1041204193, %rax, %rax         ## imm = 0x3E0F83E1
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$35, %rax
	leal	(%rax,%rcx), %edx
	addl	%ecx, %eax
	incl	%eax
	shrl	$31, %eax
	leal	(%rax,%rdx), %esi
	incl	%esi
	sarl	%esi
	addl	%ebx, %esi
	movq	%r12, %rdi
	callq	_dib8000_set_wbd_ref
	movq	_BAND_CBAND@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_deb_info
	movq	_CT_AGC_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dib0090_set_tune_state
	movq	_CT_AGC_STEP_0@GOTPCREL(%rip), %r14
	movq	_CT_AGC_STOP@GOTPCREL(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	callq	_dib8000_set_gpio
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	(%r15), %ebx
	jae	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_dib0090_gain_control
	movl	%eax, %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_dib0090_get_tune_state
	movl	%eax, %ebx
	movl	$1, %r13d
	cmpl	(%r14), %eax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_CT_AGC_STEP_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	leaq	-44(%rbp), %rcx
	leaq	-48(%rbp), %r8
	callq	_dib0090_get_current_gain
	cmpl	$0, -44(%rbp)
	jne	LBB0_8
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	callq	_deb_info
	movq	%r12, %rdi
	callq	_dib0090_pwm_gain_reset
	jmp	LBB0_11
LBB0_9:
	movq	%r12, %rdi
	callq	_dib0090_pwm_gain_reset
	movq	%r12, %rdi
	callq	_dib8000_pwm_agc_reset
	movq	_CT_DEMOD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_dib8000_set_tune_state
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CT_SHUTDOWN,4,2                ## @CT_SHUTDOWN
	.comm	_BAND_CBAND,4,2                 ## @BAND_CBAND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tuning in CBAND - soft-AGC startup\n"

	.comm	_CT_AGC_START,4,2               ## @CT_AGC_START
	.comm	_CT_AGC_STEP_0,4,2              ## @CT_AGC_STEP_0
	.comm	_CT_AGC_STEP_1,4,2              ## @CT_AGC_STEP_1
	.comm	_CT_AGC_STOP,4,2                ## @CT_AGC_STOP
	.comm	_CT_DEMOD_START,4,2             ## @CT_DEMOD_START
L_.str.1:                               ## @.str.1
	.asciz	"not tuning in CBAND - standard AGC startup\n"

	.no_dead_strip	_dib8096_set_param_override
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8096_set_param_override
_dib8096_set_param_override:            ; @dib8096_set_param_override
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldrsw	x8, [x1]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_BAND_OF_FREQUENCY
	mov	x20, x0
	ldr	x8, [x22]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	tbnz	w0, #31, LBB0_13
; %bb.1:
	mov	w8, #550
	cmp	w20, #129
	csel	w8, w8, wzr, eq
	mov	w9, #100
	cmp	w20, #128
	csel	w21, w9, w8, eq
	mov	x0, x19
	bl	_dib0090_get_wbd_offset
	add	w8, w0, w0, lsl #3
	lsl	w8, w8, #4
	mov	w9, #33761
	movk	w9, #15887, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #35
	add	w8, w8, w9
	add	w9, w8, #1
	add	w10, w8, #2
	cmp	w9, #0
	csinc	w8, w10, w8, lt
	add	w1, w21, w8, asr #1
	mov	x0, x19
	bl	_dib8000_set_wbd_ref
Lloh0:
	adrp	x8, _BAND_CBAND@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAND_CBAND@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
Lloh5:
	adrp	x8, _CT_AGC_START@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CT_AGC_START@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib0090_set_tune_state
Lloh8:
	adrp	x21, _CT_AGC_STEP_0@GOTPAGE
Lloh9:
	ldr	x21, [x21, _CT_AGC_STEP_0@GOTPAGEOFF]
Lloh10:
	adrp	x22, _CT_AGC_STOP@GOTPAGE
Lloh11:
	ldr	x22, [x22, _CT_AGC_STOP@GOTPAGEOFF]
Lloh12:
	adrp	x23, _CT_AGC_STEP_1@GOTPAGE
Lloh13:
	ldr	x23, [x23, _CT_AGC_STEP_1@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w3, #1
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	bl	_dib8000_set_gpio
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	cmp	w20, w8
	b.hs	LBB0_11
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_dib0090_gain_control
	bl	_msleep
	mov	x0, x19
	bl	_dib0090_get_tune_state
	mov	x20, x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	cmp	w20, w8
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x3, sp, #8
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	bl	_dib0090_get_current_gain
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w3, #0
	b	LBB0_4
LBB0_10:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_deb_info
	mov	x0, x19
	bl	_dib0090_pwm_gain_reset
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_dib0090_pwm_gain_reset
	mov	x0, x19
	bl	_dib8000_pwm_agc_reset
Lloh16:
	adrp	x8, _CT_DEMOD_START@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CT_DEMOD_START@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dib8000_set_tune_state
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CT_SHUTDOWN,4,2                ; @CT_SHUTDOWN
	.comm	_BAND_CBAND,4,2                 ; @BAND_CBAND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tuning in CBAND - soft-AGC startup\n"

	.comm	_CT_AGC_START,4,2               ; @CT_AGC_START
	.comm	_CT_AGC_STEP_0,4,2              ; @CT_AGC_STEP_0
	.comm	_CT_AGC_STEP_1,4,2              ; @CT_AGC_STEP_1
	.comm	_CT_AGC_STOP,4,2                ; @CT_AGC_STOP
	.comm	_CT_DEMOD_START,4,2             ; @CT_DEMOD_START
l_.str.1:                               ; @.str.1
	.asciz	"not tuning in CBAND - standard AGC startup\n"

	.no_dead_strip	_dib8096_set_param_override
.subsections_via_symbols
