	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_pll_src
_read_pll_src:                          ## @read_pll_src
	.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, %r12d
	movq	%rdi, %rbx
	callq	_nouveau_dev
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_drm
	movq	%rax, %r13
	movq	_clk_src_crystal@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_read_clk
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	$57740, %esi                    ## imm = 0xE18C
	callq	_nv_rd32
	movl	%eax, %r14d
	movl	(%r13), %edi
	callq	_nv_device
	movl	(%rax), %eax
	leal	-132(%rax), %ecx
	cmpl	$28, %ecx
	ja	LBB0_8
## %bb.1:
	movl	$16389, %edx                    ## imm = 0x4005
	btl	%ecx, %edx
	jb	LBB0_6
## %bb.2:
	movl	$1376256, %edx                  ## imm = 0x150000
	btl	%ecx, %edx
	jae	LBB0_7
## %bb.3:
	movq	%r15, %rdi
	movl	$49232, %esi                    ## imm = 0xC050
	callq	_nv_rd32
                                        ## kill: def $eax killed $eax def $rax
	leal	-16392(%r12), %ecx
	roll	$29, %ecx
	cmpl	$5, %ecx
	ja	LBB0_14
## %bb.4:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_5:
	shrl	$2, %eax
	andl	$3, %eax
	movl	$40, %r14d
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	%r15, %rdi
	movl	$59420, %esi                    ## imm = 0xE81C
	callq	_nv_rd32
	movl	%eax, %ebx
	movl	%eax, %ecx
	shrl	$16, %ecx
	andl	$7, %ecx
	jmp	LBB0_23
LBB0_7:
	cmpl	$28, %ecx
	je	LBB0_9
LBB0_8:
	cmpl	$80, %eax
	jne	LBB0_13
LBB0_9:
	leal	-16392(%r12), %eax
	roll	$29, %eax
	movl	$59420, %esi                    ## imm = 0xE81C
	leal	-3(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_15
## %bb.10:
	cmpl	$5, %eax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_17
## %bb.11:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	testb	$8, %r14b
	jne	LBB0_16
	jmp	LBB0_17
LBB0_13:
	movl	$1, %edi
	callq	_BUG_ON
                                        ## implicit-def: $esi
                                        ## implicit-def: $eax
                                        ## implicit-def: $ecx
	jmp	LBB0_25
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_NV_ERROR
	jmp	LBB0_27
LBB0_15:
	testb	$4, %r14b
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_17
LBB0_16:
	movl	$59432, %esi                    ## imm = 0xE828
LBB0_17:
	movq	%r15, %rdi
	callq	_nv_rd32
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	$16777216, %ecx                 ## imm = 0x1000000
	sete	%al
	addl	%eax, %eax
	addl	$2, %eax
	imull	%eax, %ebx
	movzbl	%ch, %eax
	movzbl	%cl, %esi
	shrl	$16, %ecx
	andl	$7, %ecx
	incl	%eax
	incl	%esi
	jmp	LBB0_26
LBB0_18:
	andl	$3, %eax
	movl	$40, %r14d
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_19:
	shrl	$11, %eax
	andl	$3, %eax
	movl	$40, %r14d
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_20:
	movq	_clk_src_crystal@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_21:
	xorl	%r14d, %r14d
LBB0_22:
	leal	59420(%r14), %esi
	movq	%r15, %rdi
	callq	_nv_rd32
	movl	%eax, %ebx
	addl	$59428, %r14d                   ## imm = 0xE824
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_nv_rd32
	shrl	$16, %eax
	andl	$7, %eax
	movl	%ebx, %ecx
	shrl	$16, %ecx
	andl	$7, %ecx
	addl	%eax, %ecx
LBB0_23:
	movl	%ebx, %esi
	andl	$255, %esi
	je	LBB0_27
## %bb.24:
	movzbl	%bh, %eax
LBB0_25:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_26:
	imull	%ebx, %eax
	cltd
	idivl	%esi
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	jmp	LBB0_28
LBB0_27:
	xorl	%eax, %eax
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	movq	_clk_src_href@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_read_clk                       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_18
	.long	L0_0_set_19
	.long	L0_0_set_21
.set L0_1_set_22, LBB0_22-LJTI0_1
.set L0_1_set_20, LBB0_20-LJTI0_1
.set L0_1_set_29, LBB0_29-LJTI0_1
.set L0_1_set_21, LBB0_21-LJTI0_1
LJTI0_1:
	.long	L0_1_set_22
	.long	L0_1_set_20
	.long	L0_1_set_29
	.long	L0_1_set_21
	.end_data_region
                                        ## -- End function
	.comm	_clk_src_crystal,4,2            ## @clk_src_crystal
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ref: bad pll 0x%06x\n"

	.comm	_clk_src_href,4,2               ## @clk_src_href
	.no_dead_strip	_read_pll_src
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_pll_src
_read_pll_src:                          ; @read_pll_src
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x22, x0
	bl	_nouveau_dev
	mov	x20, x0
	mov	x0, x22
	bl	_nouveau_drm
	mov	x23, x0
Lloh0:
	adrp	x25, _clk_src_crystal@GOTPAGE
Lloh1:
	ldr	x25, [x25, _clk_src_crystal@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_read_clk
	mov	x19, x0
	mov	x0, x20
	mov	w1, #57740
	bl	_nv_rd32
	mov	x24, x0
	ldr	w0, [x23]
	bl	_nv_device
	ldr	w8, [x0]
	sub	w9, w8, #132
	cmp	w9, #28
	b.hi	LBB0_8
; %bb.1:
	mov	w10, #1
	lsl	w10, w10, w9
	mov	w11, #16389
	tst	w10, w11
	b.ne	LBB0_6
; %bb.2:
	mov	w11, #1376256
	tst	w10, w11
	b.eq	LBB0_7
; %bb.3:
	mov	x0, x20
	mov	w1, #49232
	bl	_nv_rd32
	mov	w8, #-16392
	add	w8, w21, w8
	ror	w8, w8, #3
	cmp	w8, #5
	b.hi	LBB0_15
; %bb.4:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	lsr	w0, w0, #2
	b	LBB0_20
LBB0_6:
	mov	x0, x20
	mov	w1, #59420
	bl	_nv_rd32
	mov	x21, x0
	ubfx	w8, w0, #16, #3
	ands	w9, w21, #0xff
	b.ne	LBB0_24
	b	LBB0_26
LBB0_7:
	cmp	w9, #28
	b.eq	LBB0_9
LBB0_8:
	cmp	w8, #80
	b.ne	LBB0_14
LBB0_9:
	mov	w8, #-16392
	add	w8, w21, w8
	ror	w8, w8, #3
	sub	w9, w8, #3
	cmp	w9, #2
	b.lo	LBB0_16
; %bb.10:
	cmp	w8, #5
	b.eq	LBB0_17
; %bb.11:
	cbnz	w8, LBB0_15
; %bb.12:
	tbz	w24, #3, LBB0_17
LBB0_13:
	mov	w1, #59432
	b	LBB0_18
LBB0_14:
	mov	w0, #1
	bl	_BUG_ON
                                        ; implicit-def: $w9
                                        ; implicit-def: $w10
                                        ; implicit-def: $w8
	b	LBB0_25
LBB0_15:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x21
	bl	_NV_ERROR
	b	LBB0_26
LBB0_16:
	tbnz	w24, #2, LBB0_13
LBB0_17:
	mov	w1, #59420
LBB0_18:
	mov	x0, x20
	bl	_nv_rd32
	tst	w0, #0x1000000
	mov	w8, #2
	mov	w9, #4
	csel	w8, w9, w8, eq
	mul	w19, w8, w19
	ubfx	w8, w0, #16, #3
	ubfx	w9, w0, #8, #8
	add	w10, w9, #1
	and	w9, w0, #0xff
	add	w9, w9, #1
	b	LBB0_25
LBB0_19:
	lsr	w0, w0, #11
LBB0_20:
	and	w8, w0, #0x3
	mov	w23, #40
Lloh6:
	adrp	x9, lJTI0_1@PAGE
Lloh7:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_21
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_21:
	ldr	w1, [x25]
	b	LBB0_29
LBB0_22:
	mov	w23, #0
LBB0_23:
	mov	w8, #59420
	add	w1, w23, w8
	mov	x0, x20
	bl	_nv_rd32
	mov	x21, x0
	mov	w8, #59428
	add	w1, w23, w8
	mov	x0, x20
	bl	_nv_rd32
	ubfx	w8, w0, #16, #3
	ubfx	w9, w21, #16, #3
	add	w8, w8, w9
	ands	w9, w21, #0xff
	b.eq	LBB0_26
LBB0_24:
	ubfx	w10, w21, #8, #8
LBB0_25:
	mul	w10, w19, w10
	sdiv	w9, w10, w9
	asr	w0, w9, w8
	b	LBB0_27
LBB0_26:
	mov	w0, #0
LBB0_27:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_28:
Lloh8:
	adrp	x8, _clk_src_href@GOTPAGE
Lloh9:
	ldr	x8, [x8, _clk_src_href@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
LBB0_29:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_read_clk
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_20-LBB0_5)>>2
	.byte	(LBB0_19-LBB0_5)>>2
	.byte	(LBB0_22-LBB0_5)>>2
lJTI0_1:
	.byte	(LBB0_23-LBB0_21)>>2
	.byte	(LBB0_21-LBB0_21)>>2
	.byte	(LBB0_28-LBB0_21)>>2
	.byte	(LBB0_22-LBB0_21)>>2
                                        ; -- End function
	.comm	_clk_src_crystal,4,2            ; @clk_src_crystal
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ref: bad pll 0x%06x\n"

	.comm	_clk_src_href,4,2               ; @clk_src_href
	.no_dead_strip	_read_pll_src
.subsections_via_symbols
