	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce112_set_clock               ## -- Begin function dce112_set_clock
	.p2align	4, 0x90
_dce112_set_clock:                      ## @dce112_set_clock
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_TO_CLK_MGR_INTERNAL
	movq	%rax, %r13
	movq	(%r12), %rax
	movq	8(%rax), %r15
	movq	16(%rax), %r14
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	testl	%ebx, %ebx
	jle	LBB0_2
## %bb.1:
	movslq	(%r13), %rax
	imulq	$-2078209981, %rax, %rsi        ## imm = 0x84210843
	shrq	$32, %rsi
	addl	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	sarl	$5, %esi
	addl	%eax, %esi
	movl	%ebx, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_max
	movl	%eax, %ebx
LBB0_2:
	movl	%ebx, -64(%rbp)
	movq	_CLOCK_SOURCE_ID_DFS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	_DCECLOCK_TYPE_DISPLAY_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	(%r14), %rax
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_DM_PP_CLOCKS_STATE_NOMINAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
LBB0_4:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %r13d
	movl	$0, -64(%rbp)
	movq	_DCECLOCK_TYPE_DPREFCLK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_ASICREV_IS_VEGA20_P
	testl	%eax, %eax
	sete	%al
	movq	-56(%rbp), %rcx
	movq	_CLOCK_SOURCE_COMBO_DISPLAY_PLL0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, -48(%rbp)
	movq	(%r14), %rax
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	*(%rax)
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_IS_FPGA_MAXIMUS_DC
	testl	%eax, %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_9
## %bb.5:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.6:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	%r13d, 4(%rax)
	je	LBB0_9
## %bb.8:
	movq	(%rbx), %rax
	movslq	%r13d, %rcx
	imulq	$628292359, %rcx, %rsi          ## imm = 0x2572FB07
	movq	%rsi, %rcx
	shrq	$63, %rcx
	sarq	$42, %rsi
	addl	%ecx, %esi
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	*(%rax)
LBB0_9:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 4(%rax)
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOCK_SOURCE_ID_DFS,8,3        ## @CLOCK_SOURCE_ID_DFS
	.comm	_DCECLOCK_TYPE_DISPLAY_CLOCK,4,2 ## @DCECLOCK_TYPE_DISPLAY_CLOCK
	.comm	_DM_PP_CLOCKS_STATE_NOMINAL,4,2 ## @DM_PP_CLOCKS_STATE_NOMINAL
	.comm	_DCECLOCK_TYPE_DPREFCLK,4,2     ## @DCECLOCK_TYPE_DPREFCLK
	.comm	_CLOCK_SOURCE_COMBO_DISPLAY_PLL0,8,3 ## @CLOCK_SOURCE_COMBO_DISPLAY_PLL0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce112_set_clock               ; -- Begin function dce112_set_clock
	.p2align	2
_dce112_set_clock:                      ; @dce112_set_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x1
	mov	x23, x0
	bl	_TO_CLK_MGR_INTERNAL
	mov	x19, x0
	ldr	x8, [x23]
	ldp	x25, x21, [x8, #8]
	ldr	x8, [x25, #8]
	ldr	x20, [x8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	cmp	w24, #1
	b.lt	LBB0_2
; %bb.1:
	ldrsw	x8, [x19]
	mov	x9, #-63421
	movk	x9, #33825, lsl #16
	mul	x9, x8, x9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #5
	add	w1, w9, w8, lsr #31
	mov	x0, x24
	bl	_max
	mov	x24, x0
LBB0_2:
	str	w24, [sp, #8]
Lloh0:
	adrp	x8, _CLOCK_SOURCE_ID_DFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLOCK_SOURCE_ID_DFS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #16]
Lloh3:
	adrp	x8, _DCECLOCK_TYPE_DISPLAY_CLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DCECLOCK_TYPE_DISPLAY_CLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #28]
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x21
	blr	x8
	ldr	w22, [sp, #8]
	cbnz	w24, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _DM_PP_CLOCKS_STATE_NOMINAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DM_PP_CLOCKS_STATE_NOMINAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
LBB0_4:
Lloh9:
	adrp	x8, _DCECLOCK_TYPE_DPREFCLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DCECLOCK_TYPE_DPREFCLK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	wzr, [sp, #8]
	str	w8, [sp, #28]
	ldr	x8, [x23]
	ldr	w0, [x8]
	bl	_ASICREV_IS_VEGA20_P
	cmp	w0, #0
	ldr	x8, [sp, #16]
Lloh12:
	adrp	x9, _CLOCK_SOURCE_COMBO_DISPLAY_PLL0@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CLOCK_SOURCE_COMBO_DISPLAY_PLL0@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ccmp	x8, x9, #0, eq
	cset	w8, eq
	str	w8, [sp, #24]
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x21
	blr	x8
	ldr	x8, [x25]
	ldr	w0, [x8]
	bl	_IS_FPGA_MAXIMUS_DC
	cmp	w0, #0
	ccmp	x20, #0, #4, eq
	b.eq	LBB0_8
; %bb.5:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w8, [x19, #4]
	cmp	w8, w22
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	w9, #64263
	movk	w9, #9586, lsl #16
	smull	x9, w22, w9
	lsr	x10, x9, #63
	asr	x9, x9, #42
	add	w1, w9, w10
	mov	x0, x20
	blr	x8
LBB0_8:
	str	w22, [x19, #4]
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOCK_SOURCE_ID_DFS,8,3        ; @CLOCK_SOURCE_ID_DFS
	.comm	_DCECLOCK_TYPE_DISPLAY_CLOCK,4,2 ; @DCECLOCK_TYPE_DISPLAY_CLOCK
	.comm	_DM_PP_CLOCKS_STATE_NOMINAL,4,2 ; @DM_PP_CLOCKS_STATE_NOMINAL
	.comm	_DCECLOCK_TYPE_DPREFCLK,4,2     ; @DCECLOCK_TYPE_DPREFCLK
	.comm	_CLOCK_SOURCE_COMBO_DISPLAY_PLL0,8,3 ; @CLOCK_SOURCE_COMBO_DISPLAY_PLL0
.subsections_via_symbols
