	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv0367cab_get_mclk
_stv0367cab_get_mclk:                   ## @stv0367cab_get_mclk
	.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
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	movq	_F367CAB_BYPASS_PLLXN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stv0367_readbits
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_F367CAB_PLL_NDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stv0367_readbits
	movq	%rax, %r14
	testl	%r14d, %r14d
	movl	$1, %r13d
	cmovel	%r13d, %r14d
	movq	_F367CAB_PLL_MDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stv0367_readbits
	movq	%rax, %r12
	testl	%r12d, %r12d
	cmovel	%r13d, %r12d
	movq	_F367CAB_PLL_PDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_stv0367_readbits
	cmpl	$5, %eax
	movl	$5, %ecx
	cmovll	%eax, %ecx
	movl	%r15d, %eax
	shrl	$31, %eax
	addl	%r15d, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r12d
	sarl	%eax
	imull	%r14d, %eax
	cltd
	idivl	%r12d
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_dprintk
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_dprintk
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_F367CAB_BYPASS_PLLXN,4,2       ## @F367CAB_BYPASS_PLLXN
	.comm	_F367CAB_PLL_NDIV,4,2           ## @F367CAB_PLL_NDIV
	.comm	_F367CAB_PLL_MDIV,4,2           ## @F367CAB_PLL_MDIV
	.comm	_F367CAB_PLL_PDIV,4,2           ## @F367CAB_PLL_PDIV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stv0367cab_get_mclk BYPASS_PLLXN mclk_Hz=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"stv0367cab_get_mclk final mclk_Hz=%d\n"

	.no_dead_strip	_stv0367cab_get_mclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv0367cab_get_mclk
_stv0367cab_get_mclk:                   ; @stv0367cab_get_mclk
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _F367CAB_BYPASS_PLLXN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F367CAB_BYPASS_PLLXN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_stv0367_readbits
	cbnz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _F367CAB_PLL_NDIV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _F367CAB_PLL_NDIV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_stv0367_readbits
	cmp	w0, #0
	csinc	w21, w0, wzr, ne
Lloh6:
	adrp	x8, _F367CAB_PLL_MDIV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _F367CAB_PLL_MDIV@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_stv0367_readbits
	cmp	w0, #0
	csinc	w22, w0, wzr, ne
Lloh9:
	adrp	x8, _F367CAB_PLL_PDIV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _F367CAB_PLL_PDIV@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_stv0367_readbits
	mov	w8, #5
	cmp	w0, #5
	csel	w8, w0, w8, lt
	cmp	w19, #0
	cinc	w9, w19, lt
	asr	w9, w9, #1
	mul	w9, w21, w9
	lsl	w8, w22, w8
	sdiv	w19, w9, w8
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_dprintk
LBB0_2:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_dprintk
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_F367CAB_BYPASS_PLLXN,4,2       ; @F367CAB_BYPASS_PLLXN
	.comm	_F367CAB_PLL_NDIV,4,2           ; @F367CAB_PLL_NDIV
	.comm	_F367CAB_PLL_MDIV,4,2           ; @F367CAB_PLL_MDIV
	.comm	_F367CAB_PLL_PDIV,4,2           ; @F367CAB_PLL_PDIV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stv0367cab_get_mclk BYPASS_PLLXN mclk_Hz=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"stv0367cab_get_mclk final mclk_Hz=%d\n"

	.no_dead_strip	_stv0367cab_get_mclk
.subsections_via_symbols
