	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_get_xclk                 ## -- Begin function rv770_get_xclk
	.p2align	4, 0x90
_rv770_get_xclk:                        ## @rv770_get_xclk
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %ebx
	movq	_CG_CLKPIN_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_MUX_TCLK_TO_XCLK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_TCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_XTALIN_DIVIDE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	leal	3(%rbx), %eax
	testl	%ebx, %ebx
	cmovnsl	%ebx, %eax
	sarl	$2, %eax
	movl	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CG_CLKPIN_CNTL,4,2             ## @CG_CLKPIN_CNTL
	.comm	_MUX_TCLK_TO_XCLK,4,2           ## @MUX_TCLK_TO_XCLK
	.comm	_TCLK,4,2                       ## @TCLK
	.comm	_XTALIN_DIVIDE,4,2              ## @XTALIN_DIVIDE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_get_xclk                 ; -- Begin function rv770_get_xclk
	.p2align	2
_rv770_get_xclk:                        ; @rv770_get_xclk
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w19, [x0]
Lloh0:
	adrp	x8, _CG_CLKPIN_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CG_CLKPIN_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
Lloh3:
	adrp	x8, _MUX_TCLK_TO_XCLK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MUX_TCLK_TO_XCLK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _TCLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCLK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _XTALIN_DIVIDE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XTALIN_DIVIDE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w9, w19, #3
	cmp	w19, #0
	csel	w9, w9, w19, lt
	asr	w9, w9, #2
	tst	w8, w0
	csel	w0, w19, w9, eq
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CG_CLKPIN_CNTL,4,2             ; @CG_CLKPIN_CNTL
	.comm	_MUX_TCLK_TO_XCLK,4,2           ; @MUX_TCLK_TO_XCLK
	.comm	_TCLK,4,2                       ; @TCLK
	.comm	_XTALIN_DIVIDE,4,2              ; @XTALIN_DIVIDE
.subsections_via_symbols
