	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_hw_get_clock           ## -- Begin function nouveau_hw_get_clock
	.p2align	4, 0x90
_nouveau_hw_get_clock:                  ## @nouveau_hw_get_clock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	4(%rax), %edi
	callq	_pci_domain_nr
	movq	_PLL_MEMORY@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_5
## %bb.1:
	movq	(%rbx), %rdx
	movl	$4080, %ecx                     ## imm = 0xFF0
	andl	(%rdx), %ecx
	movq	_CHIPSET_NFORCE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_3
## %bb.2:
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$3, %edx
	callq	_pci_get_domain_bus_and_slot
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	movl	$108, %esi
	callq	_pci_read_config_dword
	movl	-32(%rbp), %eax
	shrl	$8, %eax
	andl	$15, %eax
	movl	$4, %ecx
	cmovnel	%eax, %ecx
	movl	$400000, %eax                   ## imm = 0x61A80
	xorl	%edx, %edx
	divl	%ecx
	jmp	LBB0_7
LBB0_3:
	movq	_CHIPSET_NFORCE2@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.4:
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$5, %edx
	callq	_pci_get_domain_bus_and_slot
	leaq	-28(%rbp), %rdx
	movl	%eax, %edi
	movl	$76, %esi
	callq	_pci_read_config_dword
	movslq	-28(%rbp), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	jmp	LBB0_8
LBB0_5:
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_nouveau_hw_get_pllvals
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	leaq	-24(%rbp), %rdi
	callq	_nouveau_hw_pllvals_to_clk
LBB0_7:
                                        ## kill: def $eax killed $eax def $rax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLL_MEMORY,4,2                 ## @PLL_MEMORY
	.comm	_CHIPSET_NFORCE,4,2             ## @CHIPSET_NFORCE
	.comm	_CHIPSET_NFORCE2,4,2            ## @CHIPSET_NFORCE2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_hw_get_clock           ; -- Begin function nouveau_hw_get_clock
	.p2align	2
_nouveau_hw_get_clock:                  ; @nouveau_hw_get_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #4]
	bl	_pci_domain_nr
Lloh0:
	adrp	x8, _PLL_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PLL_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x20]
	ldr	w8, [x8]
	and	w8, w8, #0xff0
Lloh3:
	adrp	x9, _CHIPSET_NFORCE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIPSET_NFORCE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	w1, #0
	mov	w2, #3
	bl	_pci_get_domain_bus_and_slot
	add	x2, sp, #4
	mov	w1, #108
	bl	_pci_read_config_dword
	ldr	w8, [sp, #4]
	mov	w9, #15
	ands	w8, w9, w8, lsr #8
	mov	w9, #4
	csel	w8, w9, w8, eq
	mov	w9, #6784
	movk	w9, #6, lsl #16
	udiv	w0, w9, w8
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x9, _CHIPSET_NFORCE2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CHIPSET_NFORCE2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	mov	w1, #0
	mov	w2, #5
	bl	_pci_get_domain_bus_and_slot
	mov	x2, sp
	mov	w1, #76
	bl	_pci_read_config_dword
	ldrsw	x8, [sp]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	b	LBB0_7
LBB0_5:
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_nouveau_hw_get_pllvals
	cbnz	w0, LBB0_7
; %bb.6:
	add	x0, sp, #8
	bl	_nouveau_hw_pllvals_to_clk
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PLL_MEMORY,4,2                 ; @PLL_MEMORY
	.comm	_CHIPSET_NFORCE,4,2             ; @CHIPSET_NFORCE
	.comm	_CHIPSET_NFORCE2,4,2            ; @CHIPSET_NFORCE2
.subsections_via_symbols
