	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_pll
_set_pll:                               ## @set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movslq	(%rdi), %rcx
	movl	4(%rdi), %eax
	cmpl	%eax, %ecx
	jne	LBB0_2
## %bb.25:
	movl	24(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dprintk                        ## TAILCALL
LBB0_2:
	movq	8(%rbx), %rdx
	cmpq	%rcx, %rdx
	jne	LBB0_8
## %bb.3:
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	_bttv_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movl	24(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_6:
	movq	_BT848_TGCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movq	_BT848_PLL_XCI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$0, 4(%rbx)
	jmp	LBB0_7
LBB0_8:
	movq	_bttv_verbose@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_10
## %bb.9:
	movl	24(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_pr_info
	movq	8(%rbx), %rdx
	movslq	(%rbx), %rcx
LBB0_10:
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movq	%rcx, %rdx
	callq	_set_pll_freq
	movl	$10, %edi
	callq	_msleep
	movq	_BT848_DSTATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_btread
	movq	_BT848_DSTATUS_PLOCK@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.11:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.12:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.13:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.14:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.15:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.16:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.17:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.18:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.19:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %edi
	callq	_btread
	testl	%eax, (%r12)
	je	LBB0_22
## %bb.20:
	movl	(%r15), %esi
	xorl	%edi, %edi
	callq	_btwrite
	movl	$-1, 4(%rbx)
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.21:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_24
LBB0_22:
	movq	_BT848_TGCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_btwrite
	movl	(%rbx), %eax
	movl	%eax, 4(%rbx)
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.23:
	leaq	L_.str.3(%rip), %rdi
LBB0_24:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: PLL: no change required\n"

	.comm	_bttv_verbose,8,3               ## @bttv_verbose
L_.str.1:                               ## @.str.1
	.asciz	"%d: PLL can sleep, using XTAL (%d)\n"

	.comm	_BT848_TGCTRL,4,2               ## @BT848_TGCTRL
	.comm	_BT848_PLL_XCI,4,2              ## @BT848_PLL_XCI
L_.str.2:                               ## @.str.2
	.asciz	"%d: Setting PLL: %d => %d (needs up to 100ms)\n"

	.comm	_BT848_DSTATUS,4,2              ## @BT848_DSTATUS
	.comm	_BT848_DSTATUS_PLOCK,4,2        ## @BT848_DSTATUS_PLOCK
L_.str.3:                               ## @.str.3
	.asciz	"PLL set ok\n"

L_.str.4:                               ## @.str.4
	.asciz	"Setting PLL failed\n"

	.no_dead_strip	_set_pll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_pll
_set_pll:                               ; @set_pll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_25
; %bb.1:
	mov	x19, x0
	ldp	w2, w8, [x0]
                                        ; kill: def $w2 killed $w2 def $x2
	sxtw	x2, w2
	cmp	w2, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w1, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #80
	b	_dprintk
LBB0_3:
	ldr	x1, [x19, #8]
	cmp	x1, x2
	b.ne	LBB0_8
; %bb.4:
	cbz	w8, LBB0_25
; %bb.5:
Lloh2:
	adrp	x8, _bttv_verbose@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bttv_verbose@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w8, [x19, #24]
	stp	x8, x1, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
LBB0_7:
Lloh7:
	adrp	x8, _BT848_TGCTRL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BT848_TGCTRL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_btwrite
Lloh10:
	adrp	x8, _BT848_PLL_XCI@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BT848_PLL_XCI@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_btwrite
	str	wzr, [x19, #4]
	b	LBB0_25
LBB0_8:
Lloh13:
	adrp	x20, _bttv_verbose@GOTPAGE
Lloh14:
	ldr	x20, [x20, _bttv_verbose@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w8, [x19, #24]
	stp	x1, x2, [sp, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	x1, [x19, #8]
	ldrsw	x2, [x19]
LBB0_10:
	mov	x0, x19
	bl	_set_pll_freq
	mov	w0, #10
	bl	_msleep
Lloh17:
	adrp	x21, _BT848_DSTATUS@GOTPAGE
Lloh18:
	ldr	x21, [x21, _BT848_DSTATUS@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_btread
Lloh19:
	adrp	x22, _BT848_DSTATUS_PLOCK@GOTPAGE
Lloh20:
	ldr	x22, [x22, _BT848_DSTATUS_PLOCK@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.11:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.12:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.13:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.14:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.15:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.16:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.17:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.18:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.19:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w0, #10
	bl	_msleep
	ldr	w0, [x21]
	bl	_btread
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_22
; %bb.20:
	ldr	w1, [x21]
	mov	w0, #0
	bl	_btwrite
	mov	w8, #-1
	str	w8, [x19, #4]
	ldr	x8, [x20]
	cbz	x8, LBB0_25
; %bb.21:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_24
LBB0_22:
Lloh23:
	adrp	x8, _BT848_TGCTRL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BT848_TGCTRL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_btwrite
	ldr	w8, [x19]
	str	w8, [x19, #4]
	ldr	x8, [x20]
	cbz	x8, LBB0_25
; %bb.23:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_24:
	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
	add	sp, sp, #80
	b	_pr_info
LBB0_25:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: PLL: no change required\n"

	.comm	_bttv_verbose,8,3               ; @bttv_verbose
l_.str.1:                               ; @.str.1
	.asciz	"%d: PLL can sleep, using XTAL (%d)\n"

	.comm	_BT848_TGCTRL,4,2               ; @BT848_TGCTRL
	.comm	_BT848_PLL_XCI,4,2              ; @BT848_PLL_XCI
l_.str.2:                               ; @.str.2
	.asciz	"%d: Setting PLL: %d => %d (needs up to 100ms)\n"

	.comm	_BT848_DSTATUS,4,2              ; @BT848_DSTATUS
	.comm	_BT848_DSTATUS_PLOCK,4,2        ; @BT848_DSTATUS_PLOCK
l_.str.3:                               ; @.str.3
	.asciz	"PLL set ok\n"

l_.str.4:                               ; @.str.4
	.asciz	"Setting PLL failed\n"

	.no_dead_strip	_set_pll
.subsections_via_symbols
