	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g33_get_cdclk
_g33_get_cdclk:                         ## @g33_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movl	$0, -28(%rbp)
	callq	_intel_hpll_vco
	movl	%eax, (%r14)
	movq	_GCFGC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	-28(%rbp), %ebx
	shrl	$4, %ebx
	andl	$7, %ebx
	leaq	_g33_get_cdclk.div_3200(%rip), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	(%r14), %esi
	cmpl	%eax, %ebx
	jae	LBB0_9
## %bb.1:
	cmpl	$4799999, %esi                  ## imm = 0x493DFF
	jg	LBB0_5
## %bb.2:
	cmpl	$3200000, %esi                  ## imm = 0x30D400
	je	LBB0_8
## %bb.3:
	cmpl	$4000000, %esi                  ## imm = 0x3D0900
	jne	LBB0_9
## %bb.4:
	leaq	_g33_get_cdclk.div_4000(%rip), %r15
	jmp	LBB0_8
LBB0_5:
	cmpl	$4800000, %esi                  ## imm = 0x493E00
	je	LBB0_11
## %bb.6:
	cmpl	$5333333, %esi                  ## imm = 0x516155
	jne	LBB0_9
## %bb.7:
	leaq	_g33_get_cdclk.div_5333(%rip), %r15
	jmp	LBB0_8
LBB0_9:
	movl	-28(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	$190476, %eax                   ## imm = 0x2E80C
	jmp	LBB0_10
LBB0_11:
	leaq	_g33_get_cdclk.div_4800(%rip), %r15
LBB0_8:
	movl	(%r15,%rbx,4), %eax
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_DIV_ROUND_CLOSEST
LBB0_10:
	movl	%eax, 4(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @g33_get_cdclk.div_3200
_g33_get_cdclk.div_3200:
	.long	12                              ## 0xc
	.long	10                              ## 0xa
	.long	8                               ## 0x8
	.long	7                               ## 0x7
	.long	5                               ## 0x5
	.long	16                              ## 0x10

	.p2align	4                               ## @g33_get_cdclk.div_4000
_g33_get_cdclk.div_4000:
	.long	14                              ## 0xe
	.long	12                              ## 0xc
	.long	10                              ## 0xa
	.long	8                               ## 0x8
	.long	6                               ## 0x6
	.long	20                              ## 0x14

	.p2align	4                               ## @g33_get_cdclk.div_4800
_g33_get_cdclk.div_4800:
	.long	20                              ## 0x14
	.long	14                              ## 0xe
	.long	12                              ## 0xc
	.long	10                              ## 0xa
	.long	8                               ## 0x8
	.long	24                              ## 0x18

	.p2align	4                               ## @g33_get_cdclk.div_5333
_g33_get_cdclk.div_5333:
	.long	20                              ## 0x14
	.long	16                              ## 0x10
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	8                               ## 0x8
	.long	28                              ## 0x1c

	.comm	_GCFGC,4,2                      ## @GCFGC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to determine CDCLK. HPLL VCO=%u kHz, CFGC=0x%08x\n"

	.no_dead_strip	_g33_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g33_get_cdclk
_g33_get_cdclk:                         ; @g33_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	w8, [sp, #12]
	ubfx	x20, x8, #4, #3
Lloh3:
	adrp	x0, _g33_get_cdclk.div_3200@PAGE
Lloh4:
	add	x0, x0, _g33_get_cdclk.div_3200@PAGEOFF
	bl	_ARRAY_SIZE
	ldr	w1, [x19]
	cmp	w20, w0
	b.hs	LBB0_8
; %bb.1:
	mov	w8, #15871
	movk	w8, #73, lsl #16
	cmp	w1, w8
	b.gt	LBB0_5
; %bb.2:
	mov	w8, #54272
	movk	w8, #48, lsl #16
	cmp	w1, w8
	b.eq	LBB0_9
; %bb.3:
	mov	w8, #2304
	movk	w8, #61, lsl #16
	cmp	w1, w8
	b.ne	LBB0_8
; %bb.4:
Lloh5:
	adrp	x8, _g33_get_cdclk.div_4000@PAGE
Lloh6:
	add	x8, x8, _g33_get_cdclk.div_4000@PAGEOFF
	b	LBB0_11
LBB0_5:
	mov	w8, #15872
	movk	w8, #73, lsl #16
	cmp	w1, w8
	b.eq	LBB0_10
; %bb.6:
	mov	w8, #24917
	movk	w8, #81, lsl #16
	cmp	w1, w8
	b.ne	LBB0_8
; %bb.7:
Lloh7:
	adrp	x8, _g33_get_cdclk.div_5333@PAGE
Lloh8:
	add	x8, x8, _g33_get_cdclk.div_5333@PAGEOFF
	b	LBB0_11
LBB0_8:
	ldr	w2, [sp, #12]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	w0, #59404
	movk	w0, #2, lsl #16
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _g33_get_cdclk.div_3200@PAGE
Lloh12:
	add	x8, x8, _g33_get_cdclk.div_3200@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x8, _g33_get_cdclk.div_4800@PAGE
Lloh14:
	add	x8, x8, _g33_get_cdclk.div_4800@PAGEOFF
LBB0_11:
	ldr	w8, [x8, x20, lsl #2]
	mov	x0, x1
	mov	x1, x8
	bl	_DIV_ROUND_CLOSEST
LBB0_12:
	str	w0, [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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @g33_get_cdclk.div_3200
_g33_get_cdclk.div_3200:
	.long	12                              ; 0xc
	.long	10                              ; 0xa
	.long	8                               ; 0x8
	.long	7                               ; 0x7
	.long	5                               ; 0x5
	.long	16                              ; 0x10

	.p2align	2                               ; @g33_get_cdclk.div_4000
_g33_get_cdclk.div_4000:
	.long	14                              ; 0xe
	.long	12                              ; 0xc
	.long	10                              ; 0xa
	.long	8                               ; 0x8
	.long	6                               ; 0x6
	.long	20                              ; 0x14

	.p2align	2                               ; @g33_get_cdclk.div_4800
_g33_get_cdclk.div_4800:
	.long	20                              ; 0x14
	.long	14                              ; 0xe
	.long	12                              ; 0xc
	.long	10                              ; 0xa
	.long	8                               ; 0x8
	.long	24                              ; 0x18

	.p2align	2                               ; @g33_get_cdclk.div_5333
_g33_get_cdclk.div_5333:
	.long	20                              ; 0x14
	.long	16                              ; 0x10
	.long	12                              ; 0xc
	.long	12                              ; 0xc
	.long	8                               ; 0x8
	.long	28                              ; 0x1c

	.comm	_GCFGC,4,2                      ; @GCFGC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to determine CDCLK. HPLL VCO=%u kHz, CFGC=0x%08x\n"

	.no_dead_strip	_g33_get_cdclk
.subsections_via_symbols
