	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_clk
_read_clk:                              ## @read_clk
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_nouveau_dev
	movq	%rax, %rbx
	leal	1274448(,%r12,4), %esi
	movq	%rax, %rdi
	callq	_nv_rd32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$1274112, %esi                  ## imm = 0x137100
	callq	_nv_rd32
	btl	%r12d, %eax
	jae	LBB0_2
## %bb.1:
	movl	%r12d, %eax
	shll	$5, %eax
	addl	$1273856, %eax                  ## imm = 0x137000
	cmpl	$7, %r12d
	movl	$1274080, %esi                  ## imm = 0x1370E0
	cmovll	%eax, %esi
	movq	%r15, %rdi
	callq	_read_pll
	movl	%r14d, %ecx
	shrl	$8, %ecx
	testl	%r14d, %r14d
	jns	LBB0_5
LBB0_4:
	andl	$63, %ecx
	addl	$2, %ecx
	addl	%eax, %eax
	cltd
	idivl	%ecx
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1274208, %edx                  ## imm = 0x137160
	movl	$1274320, %ecx                  ## imm = 0x1371D0
	callq	_read_div
	movl	%r14d, %ecx
	testl	%r14d, %r14d
	jns	LBB0_5
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_read_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_clk
_read_clk:                              ; @read_clk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	mov	w23, #28672
	movk	w23, #19, lsl #16
	bl	_nouveau_dev
	mov	x22, x0
	lsl	w8, w21, #2
	add	w8, w8, #311, lsl #12           ; =1273856
	add	w1, w8, #592
	bl	_nv_rd32
	mov	x19, x0
	orr	w1, w23, #0x100
	mov	x0, x22
	bl	_nv_rd32
	lsr	w8, w0, w21
	tbz	w8, #0, LBB0_4
; %bb.1:
	add	w8, w23, w21, lsl #5
	add	w9, w23, #224
	cmp	w21, #7
	csel	w1, w8, w9, lt
	mov	x0, x20
	bl	_read_pll
	lsr	w8, w19, #8
	tbz	w19, #31, LBB0_3
LBB0_2:
	and	w8, w8, #0x3f
	add	w8, w8, #2
	lsl	w9, w0, #1
	sdiv	w0, w9, w8
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	add	w2, w23, #352
	add	w3, w23, #464
	mov	x0, x20
	mov	x1, x21
	bl	_read_div
	mov	x8, x19
	tbz	w19, #31, LBB0_3
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_read_clk
.subsections_via_symbols
