	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_dce_clock_v2_1
_set_dce_clock_v2_1:                    ## @set_dce_clock_v2_1
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_BP_RESULT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rdi), %rbx
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	44(%r15), %edi
	leaq	-64(%rbp), %rsi
	callq	*8(%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	40(%r15), %edi
	leaq	-56(%rbp), %rsi
	callq	*(%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	movq	-56(%rbp), %rax
	movq	%rax, -40(%rbp)
	movl	40(%r15), %eax
	movq	_DCECLOCK_TYPE_DPREFCLK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.4:
	cmpq	$0, 32(%r15)
	je	LBB0_6
## %bb.5:
	movq	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
LBB0_6:
	cmpq	$0, 24(%r15)
	je	LBB0_8
## %bb.7:
	movq	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
LBB0_8:
	cmpq	$0, 16(%r15)
	je	LBB0_10
## %bb.9:
	movq	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
LBB0_10:
	cmpq	$0, 8(%r15)
	je	LBB0_13
## %bb.11:
	movq	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
	jmp	LBB0_13
LBB0_2:
	movq	_BP_RESULT_BADINPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movslq	(%r15), %rax
	imulq	$1717986919, %rax, %rdi         ## imm = 0x66666667
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$34, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le32
	movl	%eax, -48(%rbp)
LBB0_13:
	movq	_SetDCEClock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-32(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-48(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_EXEC_BIOS_CMD_TABLE
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, (%r15)
	movq	_BP_RESULT_OK@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ## @BP_RESULT_FAILURE
	.comm	_BP_RESULT_BADINPUT,4,2         ## @BP_RESULT_BADINPUT
	.comm	_DCECLOCK_TYPE_DPREFCLK,4,2     ## @DCECLOCK_TYPE_DPREFCLK
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK,4,2 ## @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE,4,2 ## @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN,4,2 ## @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA,4,2 ## @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA
	.comm	_SetDCEClock,4,2                ## @SetDCEClock
	.comm	_BP_RESULT_OK,4,2               ## @BP_RESULT_OK
	.no_dead_strip	_set_dce_clock_v2_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_dce_clock_v2_1
_set_dce_clock_v2_1:                    ; @set_dce_clock_v2_1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
Lloh0:
	adrp	x8, _BP_RESULT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BP_RESULT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	ldr	x21, [x0]
	add	x0, sp, #40
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x21, #8]
	ldr	w0, [x20, #44]
	add	x1, sp, #32
	blr	x8
	cbz	w0, LBB0_11
; %bb.1:
	ldr	x8, [x21]
	ldr	w0, [x20, #40]
	add	x1, sp, #24
	blr	x8
	cbz	w0, LBB0_11
; %bb.2:
	ldp	x9, x8, [sp, #24]
	stp	x9, x8, [sp, #48]
	ldr	w8, [x20, #40]
Lloh3:
	adrp	x9, _DCECLOCK_TYPE_DPREFCLK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DCECLOCK_TYPE_DPREFCLK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.3:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]
	orr	w8, w9, w8
	str	w8, [sp, #44]
LBB0_5:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
; %bb.6:
Lloh9:
	adrp	x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]
	orr	w8, w9, w8
	str	w8, [sp, #44]
LBB0_7:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]
	orr	w8, w9, w8
	str	w8, [sp, #44]
LBB0_9:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.10:
Lloh15:
	adrp	x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [sp, #44]
	orr	w8, w9, w8
	str	w8, [sp, #44]
	b	LBB0_13
LBB0_11:
Lloh18:
	adrp	x8, _BP_RESULT_BADINPUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BP_RESULT_BADINPUT@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
	ldrsw	x8, [x20]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w0, w8, w9
	bl	_cpu_to_le32
	str	w0, [sp, #40]
LBB0_13:
Lloh20:
	adrp	x8, _SetDCEClock@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SetDCEClock@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldur	q0, [sp, #40]
	str	q0, [sp]
	ldr	x8, [sp, #56]
	str	x8, [sp, #16]
	mov	x1, sp
	bl	_EXEC_BIOS_CMD_TABLE
	cbz	x0, LBB0_16
; %bb.14:
	ldr	w0, [sp, #40]
	bl	_le32_to_cpu
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #1
	str	w8, [x20]
Lloh23:
	adrp	x8, _BP_RESULT_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BP_RESULT_OK@GOTPAGEOFF]
LBB0_15:
	ldr	w19, [x8]
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ; @BP_RESULT_FAILURE
	.comm	_BP_RESULT_BADINPUT,4,2         ; @BP_RESULT_BADINPUT
	.comm	_DCECLOCK_TYPE_DPREFCLK,4,2     ; @DCECLOCK_TYPE_DPREFCLK
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK,4,2 ; @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENLK
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE,4,2 ; @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_PCIE
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN,4,2 ; @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_XTALIN
	.comm	_DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA,4,2 ; @DCE_CLOCK_FLAG_PLL_REFCLK_SRC_GENERICA
	.comm	_SetDCEClock,4,2                ; @SetDCEClock
	.comm	_BP_RESULT_OK,4,2               ; @BP_RESULT_OK
	.no_dead_strip	_set_dce_clock_v2_1
.subsections_via_symbols
