	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i965gm_get_cdclk
_i965gm_get_cdclk:                      ## @i965gm_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	$8, %ebx
	andl	$31, %ebx
	decl	%ebx
	leaq	_i965gm_get_cdclk.div_3200(%rip), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	(%r14), %esi
	cmpl	%eax, %ebx
	jae	LBB0_7
## %bb.1:
	cmpl	$3200000, %esi                  ## imm = 0x30D400
	je	LBB0_6
## %bb.2:
	cmpl	$5333333, %esi                  ## imm = 0x516155
	je	LBB0_5
## %bb.3:
	cmpl	$4000000, %esi                  ## imm = 0x3D0900
	jne	LBB0_7
## %bb.4:
	leaq	_i965gm_get_cdclk.div_4000(%rip), %r15
	jmp	LBB0_6
LBB0_7:
	movl	-28(%rbp), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	$200000, %eax                   ## imm = 0x30D40
	jmp	LBB0_8
LBB0_5:
	leaq	_i965gm_get_cdclk.div_5333(%rip), %r15
LBB0_6:
	movl	%ebx, %eax
	movl	(%r15,%rax,4), %eax
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_DIV_ROUND_CLOSEST
LBB0_8:
	movl	%eax, 4(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @i965gm_get_cdclk.div_3200
_i965gm_get_cdclk.div_3200:
	.long	16                              ## 0x10
	.long	10                              ## 0xa
	.long	8                               ## 0x8

	.p2align	2                               ## @i965gm_get_cdclk.div_4000
_i965gm_get_cdclk.div_4000:
	.long	20                              ## 0x14
	.long	12                              ## 0xc
	.long	10                              ## 0xa

	.p2align	2                               ## @i965gm_get_cdclk.div_5333
_i965gm_get_cdclk.div_5333:
	.long	24                              ## 0x18
	.long	16                              ## 0x10
	.long	14                              ## 0xe

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

	.no_dead_strip	_i965gm_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i965gm_get_cdclk
_i965gm_get_cdclk:                      ; @i965gm_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	w8, w8, #8, #5
	sub	w20, w8, #1
Lloh3:
	adrp	x0, _i965gm_get_cdclk.div_3200@PAGE
Lloh4:
	add	x0, x0, _i965gm_get_cdclk.div_3200@PAGEOFF
	bl	_ARRAY_SIZE
	ldr	w1, [x19]
	cmp	w20, w0
	b.hs	LBB0_5
; %bb.1:
	mov	w8, #54272
	movk	w8, #48, lsl #16
	cmp	w1, w8
	b.eq	LBB0_6
; %bb.2:
	mov	w8, #24917
	movk	w8, #81, lsl #16
	cmp	w1, w8
	b.eq	LBB0_7
; %bb.3:
	mov	w8, #2304
	movk	w8, #61, lsl #16
	cmp	w1, w8
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _i965gm_get_cdclk.div_4000@PAGE
Lloh6:
	add	x8, x8, _i965gm_get_cdclk.div_4000@PAGEOFF
	b	LBB0_8
LBB0_5:
	ldr	w2, [sp, #12]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	w0, #3392
	movk	w0, #3, lsl #16
	b	LBB0_9
LBB0_6:
Lloh9:
	adrp	x8, _i965gm_get_cdclk.div_3200@PAGE
Lloh10:
	add	x8, x8, _i965gm_get_cdclk.div_3200@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _i965gm_get_cdclk.div_5333@PAGE
Lloh12:
	add	x8, x8, _i965gm_get_cdclk.div_5333@PAGEOFF
LBB0_8:
	ldr	w8, [x8, w20, uxtw #2]
	mov	x0, x1
	mov	x1, x8
	bl	_DIV_ROUND_CLOSEST
LBB0_9:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @i965gm_get_cdclk.div_3200
_i965gm_get_cdclk.div_3200:
	.long	16                              ; 0x10
	.long	10                              ; 0xa
	.long	8                               ; 0x8

	.p2align	2                               ; @i965gm_get_cdclk.div_4000
_i965gm_get_cdclk.div_4000:
	.long	20                              ; 0x14
	.long	12                              ; 0xc
	.long	10                              ; 0xa

	.p2align	2                               ; @i965gm_get_cdclk.div_5333
_i965gm_get_cdclk.div_5333:
	.long	24                              ; 0x18
	.long	16                              ; 0x10
	.long	14                              ; 0xe

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

	.no_dead_strip	_i965gm_get_cdclk
.subsections_via_symbols
