	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_update_pll
_dib8000_update_pll:                    ## @dib8000_update_pll
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	(%rdi), %r12
	movq	%r12, %rdi
	movl	$1856, %esi                     ## imm = 0x740
	callq	_dib8000_read_word
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	%eax, %r13d
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movl	%r13d, %r14d
	andl	$63, %r14d
	movl	%r13d, %r15d
	shrl	$6, %r15d
	andl	$63, %r15d
	movl	(%rbx), %edx
	movl	4(%rbx), %r8d
	cmpl	%r14d, %edx
	jne	LBB0_4
## %bb.2:
	cmpl	%r15d, %r8d
	jne	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	cmpl	$32912, (%r12)                  ## imm = 0x8090
	jne	LBB0_9
## %bb.5:
	andl	$61440, %r13d                   ## imm = 0xF000
	movq	%r12, %rdi
	movl	$1857, %esi                     ## imm = 0x741
	callq	_dib8000_read_word
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	andl	$-32769, %edx                   ## imm = 0xFFFF7FFF
	movq	%r12, %rdi
	movl	$1857, %esi                     ## imm = 0x741
	callq	_dib8000_write_word
	movl	(%rbx), %edx
	movl	4(%rbx), %eax
	andl	$63, %eax
	shll	$6, %eax
	orl	%r13d, %eax
	andl	$63, %edx
	orl	%eax, %edx
	movq	%r12, %rdi
	movl	$1856, %esi                     ## imm = 0x740
	callq	_dib8000_write_word
	movq	%r12, %rdi
	movl	$23, %esi
	callq	_dib8000_read32
	cltq
	imulq	$274877907, %rax, %r13          ## imm = 0x10624DD3
	movq	%r13, %rax
	shrq	$63, %rax
	sarq	$38, %r13
	addl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%r13d, %eax
	cltd
	idivl	%r15d
	imull	%eax, %r14d
	addl	%r14d, %r14d
	movl	%r14d, %eax
	cltd
	idivl	(%rbx)
	imull	4(%rbx), %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movslq	%eax, %rbx
	imulq	$274877907, %rbx, %r8           ## imm = 0x10624DD3
	movq	%r8, %rdx
	sarq	$38, %rdx
	movq	%r8, %rax
	shrq	$63, %rax
	addl	%eax, %edx
	movq	%r8, %rcx
	sarq	$39, %rcx
	addl	%eax, %ecx
	sarq	$41, %r8
	addl	%eax, %r8d
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_dprintk
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dprintk
	sarl	%ebx
	movl	%ebx, %edx
	shrl	$16, %edx
	movq	%r12, %rdi
	movl	$23, %esi
	callq	_dib8000_write_word
	movzwl	%bx, %edx
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_dib8000_write_word
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	$32768, %edx                    ## imm = 0x8000
	movq	%r12, %rdi
	movl	$1857, %esi                     ## imm = 0x741
	callq	_dib8000_write_word
	movq	%r12, %rdi
	movl	$1856, %esi                     ## imm = 0x740
	callq	_dib8000_read_word
	testl	$32768, %eax                    ## imm = 0x8000
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.4(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r12, %rdi
	movl	$1856, %esi                     ## imm = 0x740
	callq	_dib8000_read_word
	testl	$32768, %eax                    ## imm = 0x8000
	je	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	movl	$1856, %esi                     ## imm = 0x740
	callq	_dib8000_read_word
	movl	%eax, %esi
	andl	$63, %esi
	shrl	$6, %eax
	andl	$63, %eax
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dprintk
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_9:
	movl	4(%r12), %eax
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %eax
	jne	LBB0_11
## %bb.10:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_16
LBB0_17:
	movq	8(%r12), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dprintk
	movq	8(%r12), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	%r14d, %edx
	movq	%r12, %rdi
	movl	$901, %esi                      ## imm = 0x385
	callq	_dib8000_write_word
	jmp	LBB0_18
LBB0_11:
	cltq
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movslq	%r15d, %rax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$38, %rbx
	addl	%eax, %ebx
	movq	8(%r12), %rax
	movl	(%rax), %r8d
	leaq	L_.str.6(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %edx
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	8(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	cmpl	%r14d, %edx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_13
## %bb.12:
	movl	%ecx, %r14d
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.7(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r12, %rdi
	movl	$902, %esi                      ## imm = 0x386
	callq	_dib8000_read_word
	orl	$8, %eax
	movq	%r12, %rdi
	movl	$902, %esi                      ## imm = 0x386
	movl	%eax, %edx
	callq	_dib8000_write_word
	movq	%r12, %rdi
	callq	_dib8000_reset_pll
	movq	%r12, %rdi
	movl	$898, %esi                      ## imm = 0x382
	movl	$4, %edx
	callq	_dib8000_write_word
LBB0_14:
	movl	%r15d, 4(%r12)
	testl	%r14d, %r14d
	jne	LBB0_17
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Updating pll (prediv: old =  %d new = %d ; loopdiv : old = %d new = %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Old Internal = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Xtal = %d , New Fmem = %d New Fdemod = %d, New Fsampling = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"New Internal = %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Waiting for PLL to lock\n"

L_.str.5:                               ## @.str.5
	.asciz	"PLL Updated with prediv = %d and loopdiv = %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"PLL: Bandwidth Change %d MHz -> %d MHz (prediv: %d->%d)\n"

L_.str.7:                               ## @.str.7
	.asciz	"PLL: New Setting for %d MHz Bandwidth (prediv: %d, ratio: %d)\n"

L_.str.8:                               ## @.str.8
	.asciz	"PLL: Update ratio (prediv: %d, ratio: %d)\n"

	.no_dead_strip	_dib8000_update_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_update_pll
_dib8000_update_pll:                    ; @dib8000_update_pll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	x19, [x0]
	mov	x0, x19
	mov	w1, #1856
	bl	_dib8000_read_word
	cbz	x22, LBB0_7
; %bb.1:
	mov	x23, x0
	and	w24, w0, #0x3f
	ubfx	w25, w0, #6, #6
	ldp	w8, w9, [x22]
	cmp	w8, w24
	ccmp	w9, w25, #0, eq
	b.eq	LBB0_7
; %bb.2:
	ldr	x10, [x19, #8]
	ldr	w26, [x10]
	stp	x25, x9, [sp, #16]
	stp	x24, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	ldr	w8, [x19]
	mov	w9, #32912
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.3:
	and	w21, w23, #0xf000
	mov	x0, x19
	mov	w1, #1857
	bl	_dib8000_read_word
	mov	x20, x0
	and	w2, w0, #0xffff7fff
	mov	x0, x19
	mov	w1, #1857
	bl	_dib8000_write_word
	ldp	w9, w8, [x22]
	bfi	w21, w8, #6, #6
	bfxil	w21, w9, #0, #6
	mov	x0, x19
	mov	w1, #1856
	mov	x2, x21
	bl	_dib8000_write_word
	mov	x0, x19
	mov	w1, #23
	bl	_dib8000_read32
	mov	w21, #19923
	movk	w21, #4194, lsl #16
	smull	x8, w0, w21
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w23, w8, w9
	str	x23, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	sdiv	w8, w23, w25
	mul	w8, w8, w24
	lsl	w8, w8, #1
	ldp	w9, w10, [x22]
	sdiv	w9, w8, w9
	mul	w9, w9, w10
	mov	w10, #1000
	mul	w22, w9, w10
	smull	x9, w22, w21
	asr	x10, x9, #38
	lsr	x11, x9, #63
	add	w10, w10, w11
	asr	x12, x9, #39
	add	w12, w12, w11
	asr	x9, x9, #41
	add	w9, w9, w11
	stp	x12, x9, [sp, #16]
	stp	x8, x10, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	str	x22, [sp]
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dprintk
	orr	w8, w22, #0x1
	cmp	w22, #0
	csel	w8, w8, w22, lt
	asr	w21, w8, #1
	lsr	w2, w21, #16
	mov	x0, x19
	mov	w1, #23
	bl	_dib8000_write_word
	and	w2, w21, #0xfffc
	mov	x0, x19
	mov	w1, #24
	bl	_dib8000_write_word
	orr	w2, w20, #0x8000
	mov	x0, x19
	mov	w1, #1857
	bl	_dib8000_write_word
	mov	x0, x19
	mov	w1, #1856
	bl	_dib8000_read_word
	tbnz	w0, #15, LBB0_6
; %bb.4:
Lloh8:
	adrp	x20, l_.str.4@PAGE
Lloh9:
	add	x20, x20, l_.str.4@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_dprintk
	mov	x0, x19
	mov	w1, #1856
	bl	_dib8000_read_word
	tbz	w0, #15, LBB0_5
LBB0_6:
	mov	x0, x19
	mov	w1, #1856
	bl	_dib8000_read_word
	and	w8, w0, #0x3f
	ubfx	w9, w0, #6, #6
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_dprintk
	b	LBB0_14
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_8:
	ldr	w8, [x19, #4]
	cmp	w8, w21
	b.eq	LBB0_12
; %bb.9:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	smull	x9, w21, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w22, w9, w10
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	stp	x26, x9, [sp, #16]
	stp	x8, x22, [sp]
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dprintk
	ldr	x9, [x19, #8]
	ldp	w8, w9, [x9]
	cmp	w8, w26
	b.eq	LBB0_11
; %bb.10:
	stp	x8, x9, [sp, #8]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_dprintk
	mov	x0, x19
	mov	w1, #902
	bl	_dib8000_read_word
	orr	w2, w0, #0x8
	mov	x0, x19
	mov	w1, #902
	bl	_dib8000_write_word
	mov	x0, x19
	bl	_dib8000_reset_pll
	mov	x0, x19
	mov	w1, #898
	mov	w2, #4
	bl	_dib8000_write_word
	mov	x9, x20
LBB0_11:
	str	w21, [x19, #4]
	mov	x20, x9
LBB0_12:
	cbz	w20, LBB0_14
; %bb.13:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	stp	x8, x20, [sp]
Lloh19:
	adrp	x0, l_.str.8@PAGE
Lloh20:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_dprintk
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	orr	w2, w20, w8, lsl #8
	mov	x0, x19
	mov	w1, #901
	bl	_dib8000_write_word
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Updating pll (prediv: old =  %d new = %d ; loopdiv : old = %d new = %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Old Internal = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Xtal = %d , New Fmem = %d New Fdemod = %d, New Fsampling = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"New Internal = %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Waiting for PLL to lock\n"

l_.str.5:                               ; @.str.5
	.asciz	"PLL Updated with prediv = %d and loopdiv = %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"PLL: Bandwidth Change %d MHz -> %d MHz (prediv: %d->%d)\n"

l_.str.7:                               ; @.str.7
	.asciz	"PLL: New Setting for %d MHz Bandwidth (prediv: %d, ratio: %d)\n"

l_.str.8:                               ; @.str.8
	.asciz	"PLL: Update ratio (prediv: %d, ratio: %d)\n"

	.no_dead_strip	_dib8000_update_pll
.subsections_via_symbols
