	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_crtc_set_pll   ## -- Begin function amdgpu_atombios_crtc_set_pll
	.p2align	4, 0x90
_amdgpu_atombios_crtc_set_pll:          ## @amdgpu_atombios_crtc_set_pll
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_to_amdgpu_crtc
	movq	%rax, %r13
	movq	%rax, %r15
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	84(%r13), %edi
	callq	_to_amdgpu_encoder
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ebx
	movl	%ebx, -84(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -56(%rbp)
	movl	84(%r13), %edi
	callq	_amdgpu_atombios_encoder_get_encoder_mode
	movq	_ATOM_ENCODER_MODE_HDMI@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.1:
	cmpl	$9, (%r15)
	jl	LBB0_3
## %bb.2:
	movl	4(%r15), %ebx
LBB0_3:
	movl	8(%r15), %ecx
	cmpl	$129, %ecx
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movl	%ebx, -80(%rbp)                 ## 4-byte Spill
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	je	LBB0_6
## %bb.4:
	cmpl	$130, %ecx
	jne	LBB0_7
## %bb.5:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %r14
	jmp	LBB0_8
LBB0_6:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %r14
	addq	$16, %r14
	jmp	LBB0_8
LBB0_7:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %r14
	addq	$32, %r14
LBB0_8:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	80(%r15), %eax
	movl	%eax, 12(%r14)
	movl	76(%r15), %eax
	movl	%eax, 8(%r14)
	movl	72(%r15), %eax
	movl	%eax, 4(%r14)
	movl	4(%r15), %esi
	subq	$8, %rsp
	leaq	-56(%rbp), %rax
	leaq	-84(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	leaq	-52(%rbp), %r9
	movq	%r14, %rdi
	pushq	%rax
	callq	_amdgpu_pll_compute
	addq	$16, %rsp
	movq	_ATOM_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movl	56(%r15), %ecx
	addq	$16, %r13
	movq	%r12, %rdi
	movq	%r13, %r8
	callq	_amdgpu_atombios_crtc_program_ss
	movl	56(%r15), %esi
	movl	(%r15), %eax
	movl	8(%r15), %edx
	movl	(%rbx), %r8d
	movl	-52(%rbp), %r10d
	movl	-48(%rbp), %r11d
	movl	-44(%rbp), %ebx
	movl	-56(%rbp), %r12d
	subq	$8, %rsp
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	movl	-80(%rbp), %r9d                 ## 4-byte Reload
	pushq	%r13
	pushq	64(%r15)
	pushq	%rax
	pushq	%r12
	pushq	%rbx
	pushq	%r11
	pushq	%r10
	callq	_amdgpu_atombios_crtc_program_pll
	addq	$64, %rsp
	cmpq	$0, 64(%r15)
	je	LBB0_10
## %bb.9:
	movl	-48(%rbp), %eax
	leal	(%rax,%rax,4), %eax
	addl	%eax, %eax
	addl	-44(%rbp), %eax
	imull	48(%r15), %eax
	imull	$100, 40(%r15), %ecx
	cltd
	idivl	%ecx
	cltq
	imulq	$1717986919, %rax, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	sarl	$2, %ecx
	addl	%edx, %ecx
	movq	_ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	movl	%eax, %esi
	subl	%ecx, %esi
	movq	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	orl	%edx, %esi
	movl	%esi, 16(%r15)
	movq	_ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	20(%r15), %ecx
	cmpl	$1, %ecx
	movb	$13, %cl
	sbbb	$0, %cl
	shll	%cl, %eax
	imull	-52(%rbp), %eax
	imull	32(%r15), %eax
	imull	$3125, (%r14), %ecx             ## imm = 0xC35
	movslq	%ecx, %rcx
	imulq	$1374389535, %rcx, %rcx         ## imm = 0x51EB851F
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	sarl	$5, %ecx
	addl	%edx, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
	movl	%eax, 24(%r15)
	movq	_ATOM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	movl	56(%r15), %ecx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %r8
	callq	_amdgpu_atombios_crtc_program_ss
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ## @ATOM_ENCODER_MODE_HDMI
	.comm	_ATOM_DISABLE,4,2               ## @ATOM_DISABLE
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK,4,2 ## @ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT,4,2 ## @ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK,4,2 ## @ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK
	.comm	_ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD,4,2 ## @ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD
	.comm	_ATOM_ENABLE,4,2                ## @ATOM_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_crtc_set_pll   ; -- Begin function amdgpu_atombios_crtc_set_pll
	.p2align	2
_amdgpu_atombios_crtc_set_pll:          ; @amdgpu_atombios_crtc_set_pll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x22, x1
	mov	x21, x0
	bl	_to_amdgpu_crtc
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x20, [x8]
	ldr	w0, [x0, #84]
	bl	_to_amdgpu_encoder
	mov	x26, x0
	ldr	w23, [x22]
	stp	wzr, w23, [sp, #56]
	str	xzr, [sp, #48]
	str	wzr, [sp, #44]
	ldr	w0, [x19, #84]
	bl	_amdgpu_atombios_encoder_get_encoder_mode
	mov	x25, x0
Lloh0:
	adrp	x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATOM_ENCODER_MODE_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #9
	b.lt	LBB0_3
; %bb.2:
	ldr	w23, [x19, #4]
LBB0_3:
	ldr	w8, [x19, #8]
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.5:
	ldr	x22, [x20]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x20]
	add	x22, x8, #16
	b	LBB0_8
LBB0_7:
	ldr	x8, [x20]
	add	x22, x8, #32
LBB0_8:
	ldr	w8, [x19, #80]
	str	w8, [x22, #12]
	ldr	d0, [x19, #72]
	stur	d0, [x22, #4]
	ldr	w1, [x19, #4]
	add	x2, sp, #60
	add	x3, sp, #52
	add	x4, sp, #48
	add	x5, sp, #56
	add	x6, sp, #44
	mov	x0, x22
	bl	_amdgpu_pll_compute
Lloh3:
	adrp	x8, _ATOM_DISABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATOM_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	ldr	w3, [x19, #56]
	add	x24, x19, #16
	mov	x0, x20
	mov	x4, x24
	bl	_amdgpu_atombios_crtc_program_ss
	ldr	w1, [x19, #56]
	ldr	w2, [x19, #8]
	ldr	w4, [x26]
	ldp	w7, w6, [sp, #52]
	ldp	w9, w8, [sp, #44]
	ldr	w10, [x19]
	ldr	x11, [x19, #64]
	stp	x11, x24, [sp, #16]
	stp	w9, w10, [sp, #4]
	str	w8, [sp]
	mov	x0, x21
	mov	x3, x25
	mov	x5, x23
	bl	_amdgpu_atombios_crtc_program_pll
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_10
; %bb.9:
	ldp	w10, w8, [sp, #48]
	mov	w9, #10
	madd	w8, w8, w9, w10
	ldr	w9, [x19, #48]
	mul	w8, w8, w9
	ldr	w9, [x19, #40]
	mov	w10, #100
	mul	w9, w9, w10
	sdiv	w8, w8, w9
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #2
Lloh6:
	adrp	x10, _ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	and	w10, w9, w10
Lloh9:
	adrp	x11, _ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT@GOTPAGEOFF]
	sub	w9, w8, w9
Lloh11:
	ldr	w11, [x11]
	lsl	w9, w9, w11
Lloh12:
	adrp	x11, _ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	and	w9, w9, w11
	orr	w9, w9, w10
	str	w9, [x19, #16]
	ldr	w9, [x19, #20]
Lloh15:
	adrp	x10, _ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	ldr	w11, [sp, #56]
	ldr	w12, [x19, #32]
	tst	w10, w9
	mov	w9, #12
	cinc	w9, w9, ne
	lsl	w8, w8, w9
	mul	w8, w8, w11
	mul	w8, w8, w12
	ldr	w9, [x22]
	mov	w10, #3125
	mul	w9, w9, w10
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #5
	sdiv	w8, w8, w9
	str	w8, [x19, #24]
Lloh18:
	adrp	x8, _ATOM_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATOM_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w2, [x19, #8]
	ldr	w3, [x19, #56]
	mov	x0, x20
	mov	x4, x24
	bl	_amdgpu_atombios_crtc_program_ss
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_ENCODER_MODE_HDMI,4,2     ; @ATOM_ENCODER_MODE_HDMI
	.comm	_ATOM_DISABLE,4,2               ; @ATOM_DISABLE
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK,4,2 ; @ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT,4,2 ; @ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT
	.comm	_ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK,4,2 ; @ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK
	.comm	_ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD,4,2 ; @ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD
	.comm	_ATOM_ENABLE,4,2                ; @ATOM_ENABLE
.subsections_via_symbols
