	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bxt_get_cdclk
_bxt_get_cdclk:                         ## @bxt_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_bxt_de_pll_update
	movl	16(%rbx), %edi
	movl	%edi, 20(%rbx)
	movl	%edi, 8(%rbx)
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.1:
	movq	_CDCLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
                                        ## kill: def $eax killed $eax def $rax
	movq	_BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	ja	LBB0_5
## %bb.2:
	movl	$2, %esi
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_4:
	movl	$8, %esi
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_MISSING_CASE                   ## TAILCALL
LBB0_3:
	movl	$4, %esi
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_IS_GEMINILAKE
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_WARN
	movl	$3, %esi
LBB0_7:
	movq	(%rbx), %rdi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	movl	%eax, 8(%rbx)
LBB0_8:
	callq	_bxt_calc_voltage_level
	movl	%eax, 12(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_CDCLK_CTL,4,2                  ## @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ## @BXT_CDCLK_CD2X_DIV_SEL_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported divider\n"

	.no_dead_strip	_bxt_get_cdclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bxt_get_cdclk
_bxt_get_cdclk:                         ; @bxt_get_cdclk
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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
	bl	_bxt_de_pll_update
	ldr	w0, [x19, #16]
	str	w0, [x19, #20]
	str	w0, [x19, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _CDCLK_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDCLK_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh3:
	adrp	x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BXT_CDCLK_CD2X_DIV_SEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w0, w8, w0
	sub	w8, w0, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.2:
	mov	w1, #2
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	w1, #8
	b	LBB0_7
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_MISSING_CASE
LBB0_5:
	mov	w1, #4
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_IS_GEMINILAKE
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	mov	w1, #3
LBB0_7:
	ldr	x0, [x19]
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x19, #8]
LBB0_8:
	bl	_bxt_calc_voltage_level
	str	w0, [x19, #12]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
                                        ; -- End function
	.comm	_CDCLK_CTL,4,2                  ; @CDCLK_CTL
	.comm	_BXT_CDCLK_CD2X_DIV_SEL_MASK,4,2 ; @BXT_CDCLK_CD2X_DIV_SEL_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported divider\n"

	.no_dead_strip	_bxt_get_cdclk
.subsections_via_symbols
