	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm45_get_cdclk
_gm45_get_cdclk:                        ## @gm45_get_cdclk
	.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
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movl	$0, -20(%rbp)
	callq	_intel_hpll_vco
	movl	%eax, (%r14)
	movq	_GCFGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	-20(%rbp), %edx
	movl	%edx, %eax
	shrl	$12, %eax
	movl	(%r14), %esi
	cmpl	$3999999, %esi                  ## imm = 0x3D08FF
	jg	LBB0_4
## %bb.1:
	cmpl	$2666667, %esi                  ## imm = 0x28B0AB
	je	LBB0_6
## %bb.2:
	cmpl	$3200000, %esi                  ## imm = 0x30D400
	jne	LBB0_7
## %bb.3:
	testb	$1, %al
	movl	$228571, %ecx                   ## imm = 0x37CDB
	movl	$320000, %eax                   ## imm = 0x4E200
	cmovel	%ecx, %eax
	jmp	LBB0_8
LBB0_4:
	cmpl	$5333333, %esi                  ## imm = 0x516155
	je	LBB0_6
## %bb.5:
	cmpl	$4000000, %esi                  ## imm = 0x3D0900
	jne	LBB0_7
LBB0_6:
	testb	$1, %al
	movl	$222222, %ecx                   ## imm = 0x3640E
	movl	$333333, %eax                   ## imm = 0x51615
	cmovel	%ecx, %eax
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	$222222, %eax                   ## imm = 0x3640E
LBB0_8:
	movl	%eax, 4(%r14)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCFGC,4,2                      ## @GCFGC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to determine CDCLK. HPLL VCO=%u, CFGC=0x%04x\n"

	.no_dead_strip	_gm45_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm45_get_cdclk
_gm45_get_cdclk:                        ; @gm45_get_cdclk
	.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
	ldr	x20, [x0]
	str	wzr, [sp, #12]
	bl	_intel_hpll_vco
	str	w0, [x19]
Lloh0:
	adrp	x8, _GCFGC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GCFGC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_pci_read_config_word
	ldr	w2, [sp, #12]
	ldr	w1, [x19]
	mov	w8, #2303
	movk	w8, #61, lsl #16
	cmp	w1, w8
	b.gt	LBB0_4
; %bb.1:
	mov	w8, #45227
	movk	w8, #40, lsl #16
	cmp	w1, w8
	b.eq	LBB0_5
; %bb.2:
	mov	w8, #54272
	movk	w8, #48, lsl #16
	cmp	w1, w8
	b.ne	LBB0_7
; %bb.3:
	mov	w8, #1
	tst	w8, w2, lsr #12
	mov	w8, #57856
	movk	w8, #4, lsl #16
	mov	w9, #31963
	b	LBB0_6
LBB0_4:
	mov	w8, #24917
	movk	w8, #81, lsl #16
	cmp	w1, w8
	mov	w8, #2304
	movk	w8, #61, lsl #16
	ccmp	w1, w8, #4, ne
	b.ne	LBB0_7
LBB0_5:
	mov	w8, #1
	tst	w8, w2, lsr #12
	mov	w8, #5653
	movk	w8, #5, lsl #16
	mov	w9, #25614
LBB0_6:
	movk	w9, #3, lsl #16
	csel	w20, w9, w8, eq
	b	LBB0_8
LBB0_7:
	mov	w20, #25614
	movk	w20, #3, lsl #16
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_8:
	str	w20, [x19, #4]
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GCFGC,4,2                      ; @GCFGC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to determine CDCLK. HPLL VCO=%u, CFGC=0x%04x\n"

	.no_dead_strip	_gm45_get_cdclk
.subsections_via_symbols
