	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi2500_set_usb_adc
_msi2500_set_usb_adc:                   ## @msi2500_set_usb_adc
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %r12d
	leaq	12(%rdi), %rbx
	movq	_V4L2_CID_RF_TUNER_BANDWIDTH_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_find
	movq	%rax, %rdi
	callq	_v4l2_ctrl_g_ctrl
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_V4L2_CID_RF_TUNER_BANDWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_v4l2_ctrl_find
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_v4l2_ctrl_s_ctrl
LBB0_2:
	movl	$-129, %eax
	addl	4(%r15), %eax
	movl	$824327, %ecx                   ## imm = 0xC9407
	cmpl	$4, %eax
	ja	LBB0_4
## %bb.3:
	cltq
	leaq	l_switch.table.msi2500_set_usb_adc(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_4:
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	$17826563, %r13d                ## imm = 0x1100303
	cmpl	$6000000, %r12d                 ## imm = 0x5B8D80
	jb	LBB0_7
## %bb.5:
	movl	$22020867, %r13d                ## imm = 0x1500303
	cmpl	$7000000, %r12d                 ## imm = 0x6ACFC0
	jb	LBB0_7
## %bb.6:
	xorl	%r13d, %r13d
	cmpl	$8500000, %r12d                 ## imm = 0x81B320
	setae	%r13b
	shll	$22, %r13d
	orl	$26215171, %r13d                ## imm = 0x1900303
LBB0_7:
	movl	%r12d, %r14d
	shll	$4, %r14d
	leal	(%r14,%r14,2), %ebx
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$4, %r12d
	movl	$4, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$201999999, %ebx                ## imm = 0xC0A467F
	ja	LBB0_13
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(,%rax,8), %eax
	leal	(%rax,%rax,8), %ebx
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$6, %r12d
	movl	$6, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$201999999, %ebx                ## imm = 0xC0A467F
	ja	LBB0_13
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax def $rax
	shll	$5, %eax
	leal	(%rax,%rax,2), %ebx
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$8, %r12d
	movl	$8, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$201999999, %ebx                ## imm = 0xC0A467F
	ja	LBB0_13
## %bb.10:
	imull	$120, -48(%rbp), %ebx           ## 4-byte Folded Reload
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$10, %r12d
	movl	$10, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$201999999, %ebx                ## imm = 0xC0A467F
	ja	LBB0_13
## %bb.11:
	leal	(%r14,%r14,8), %ebx
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$12, %r12d
	movl	$12, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpl	$201999999, %ebx                ## imm = 0xC0A467F
	ja	LBB0_13
## %bb.12:
	imull	$168, -48(%rbp), %ebx           ## 4-byte Folded Reload
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$14, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	xorl	%eax, %eax
	cmpl	$202000000, %ebx                ## imm = 0xC0A4680
	setb	%al
	leal	(%rax,%rax), %r12d
	addl	$14, %r12d
LBB0_13:
	leaq	-52(%rbp), %rdx
	movl	%ebx, %edi
	movl	$48000000, %esi                 ## imm = 0x2DC6C00
	callq	_div_u64_rem
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
	movl	-52(%rbp), %edi
	shll	$21, %edi
	movl	$48000000, %esi                 ## imm = 0x2DC6C00
	callq	_div_u64
	movl	%ebx, %ecx
	movl	%eax, %r14d
	movl	%r15d, %eax
	shll	$16, %eax
	movl	%r12d, %edx
	shll	$9, %edx
	addl	$-1024, %edx                    ## imm = 0xFC00
	orl	%r13d, %edx
	orl	%eax, %edx
	movl	%r14d, %r13d
	shrl	$5, %r13d
	andl	$32768, %r13d                   ## imm = 0x8000
	orl	%edx, %r13d
	shll	$8, %r14d
	andl	$268435200, %r14d               ## imm = 0xFFFFF00
	orl	$4, %r14d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	movl	-52(%rbp), %r9d
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	pushq	%r14
	pushq	%r13
	pushq	%r12
	movq	%rbx, %r12
	callq	_dev_dbg
	addq	$32, %rsp
	movq	_CMD_WREG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$6324232, %edx                  ## imm = 0x608008
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.14:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$3077, %edx                     ## imm = 0xC05
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$131072, %edx                   ## imm = 0x20000
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.16:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$4718850, %edx                  ## imm = 0x480102
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.17:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	$15958024, %edx                 ## imm = 0xF38008
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_msi2500_ctrl_msg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movl	(%r15), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_msi2500_ctrl_msg
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_RF_TUNER_BANDWIDTH_AUTO,4,2 ## @V4L2_CID_RF_TUNER_BANDWIDTH_AUTO
	.comm	_V4L2_CID_RF_TUNER_BANDWIDTH,4,2 ## @V4L2_CID_RF_TUNER_BANDWIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"div_out=%u f_vco=%u\n"

L_.str.1:                               ## @.str.1
	.asciz	"f_sr=%u f_vco=%u div_n=%u k=%u div_out=%u reg3=%08x reg4=%08x\n"

	.comm	_CMD_WREG,4,2                   ## @CMD_WREG
	.comm	_DIV_LO_OUT,4,2                 ## @DIV_LO_OUT
	.comm	_DIV_PRE_N,4,2                  ## @DIV_PRE_N
	.comm	_F_REF,4,2                      ## @F_REF
	.no_dead_strip	_msi2500_set_usb_adc
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.msi2500_set_usb_adc
l_switch.table.msi2500_set_usb_adc:
	.long	37895                           ## 0x9407
	.long	824327                          ## 0xc9407
	.long	37895                           ## 0x9407
	.long	34055                           ## 0x8507
	.long	42247                           ## 0xa507

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msi2500_set_usb_adc
_msi2500_set_usb_adc:                   ; @msi2500_set_usb_adc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	mov	x20, x0
	ldr	w22, [x20], #12
Lloh0:
	adrp	x8, _V4L2_CID_RF_TUNER_BANDWIDTH_AUTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CID_RF_TUNER_BANDWIDTH_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_ctrl_find
	bl	_v4l2_ctrl_g_ctrl
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _V4L2_CID_RF_TUNER_BANDWIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_CID_RF_TUNER_BANDWIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_v4l2_ctrl_find
	ldr	w1, [x19]
	bl	_v4l2_ctrl_s_ctrl
LBB0_2:
	ldr	w8, [x19, #4]
	sub	w8, w8, #129
	cmp	w8, #4
	b.hi	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, l_switch.table.msi2500_set_usb_adc@PAGE
Lloh7:
	add	x9, x9, l_switch.table.msi2500_set_usb_adc@PAGEOFF
	ldr	w20, [x9, w8, sxtw #2]
	b	LBB0_5
LBB0_4:
	mov	w20, #37895
	movk	w20, #12, lsl #16
LBB0_5:
	mov	w24, #771
	movk	w24, #272, lsl #16
	mov	w8, #36224
	movk	w8, #91, lsl #16
	cmp	w22, w8
	b.lo	LBB0_7
; %bb.6:
	add	w8, w24, #1024, lsl #12         ; =4194304
	mov	w9, #53184
	movk	w9, #106, lsl #16
	add	w10, w24, #2048, lsl #12        ; =8388608
	add	w11, w24, #3072, lsl #12        ; =12582912
	mov	w12, #45856
	movk	w12, #129, lsl #16
	cmp	w22, w12
	csel	w10, w10, w11, lo
	cmp	w22, w9
	csel	w24, w8, w10, lo
LBB0_7:
	mov	w25, #18047
	movk	w25, #3082, lsl #16
	add	w8, w22, w22, lsl #1
	lsl	w23, w8, #4
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	w21, #4
	mov	w2, #4
	mov	x3, x23
	bl	_dev_dbg
	cmp	w23, w25
	b.ls	LBB0_9
; %bb.8:
	mov	x26, x21
	b	LBB0_14
LBB0_9:
	add	w8, w22, w22, lsl #3
	lsl	w23, w8, #3
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w26, #6
	mov	w2, #6
	mov	x3, x23
	bl	_dev_dbg
	cmp	w23, w25
	b.hi	LBB0_14
; %bb.10:
	add	w8, w22, w22, lsl #1
	lsl	w23, w8, #5
	ldr	w0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w26, #8
	mov	w2, #8
	mov	x3, x23
	bl	_dev_dbg
	cmp	w23, w25
	b.hi	LBB0_14
; %bb.11:
	mov	w8, #120
	mul	w23, w22, w8
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w26, #10
	mov	w2, #10
	mov	x3, x23
	bl	_dev_dbg
	cmp	w23, w25
	b.hi	LBB0_14
; %bb.12:
	add	w8, w22, w22, lsl #3
	lsl	w23, w8, #4
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	w26, #12
	mov	w2, #12
	mov	x3, x23
	bl	_dev_dbg
	cmp	w23, w25
	b.hi	LBB0_14
; %bb.13:
	mov	w8, #168
	mul	w23, w22, w8
	ldr	w0, [x19, #8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	w26, #14
	mov	w2, #14
	mov	x3, x23
	bl	_dev_dbg
	mov	w8, #16
	cmp	w23, w25
	csel	w26, w26, w8, hi
LBB0_14:
	add	x2, sp, #44
	mov	x0, x23
	mov	w1, #27648
	movk	w1, #732, lsl #16
	bl	_div_u64_rem
	mov	x25, x0
	ldr	w8, [sp, #44]
	lsl	w0, w8, #21
	mov	w1, #27648
	movk	w1, #732, lsl #16
	bl	_div_u64
	lsl	w8, w26, #9
	sub	w8, w8, #1024
	lsr	w9, w0, #5
	and	w9, w9, #0x8000
	orr	w8, w8, w24
	orr	w8, w8, w25, lsl #16
	orr	w24, w8, w9
	bfi	w21, w0, #8, #20
	ldr	w0, [x19, #8]
	ldr	w8, [sp, #44]
	stp	x24, x21, [sp, #24]
	stp	x8, x26, [sp, #8]
	str	x25, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x22
	mov	x3, x23
	bl	_dev_dbg
Lloh22:
	adrp	x22, _CMD_WREG@GOTPAGE
Lloh23:
	ldr	x22, [x22, _CMD_WREG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #32776
	movk	w2, #96, lsl #16
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.15:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #3077
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.16:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #131072
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.17:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #258
	movk	w2, #72, lsl #16
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.18:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #32776
	movk	w2, #243, lsl #16
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.19:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.20:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_msi2500_ctrl_msg
	cbnz	w0, LBB0_22
; %bb.21:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x24
	bl	_msi2500_ctrl_msg
LBB0_22:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_RF_TUNER_BANDWIDTH_AUTO,4,2 ; @V4L2_CID_RF_TUNER_BANDWIDTH_AUTO
	.comm	_V4L2_CID_RF_TUNER_BANDWIDTH,4,2 ; @V4L2_CID_RF_TUNER_BANDWIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"div_out=%u f_vco=%u\n"

l_.str.1:                               ; @.str.1
	.asciz	"f_sr=%u f_vco=%u div_n=%u k=%u div_out=%u reg3=%08x reg4=%08x\n"

	.comm	_CMD_WREG,4,2                   ; @CMD_WREG
	.comm	_DIV_LO_OUT,4,2                 ; @DIV_LO_OUT
	.comm	_DIV_PRE_N,4,2                  ; @DIV_PRE_N
	.comm	_F_REF,4,2                      ; @F_REF
	.no_dead_strip	_msi2500_set_usb_adc
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.msi2500_set_usb_adc
l_switch.table.msi2500_set_usb_adc:
	.long	37895                           ; 0x9407
	.long	824327                          ; 0xc9407
	.long	37895                           ; 0x9407
	.long	34055                           ; 0x8507
	.long	42247                           ; 0xa507

.subsections_via_symbols
