	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce4_dp_audio_set_dto          ## -- Begin function dce4_dp_audio_set_dto
	.p2align	4, 0x90
_dce4_dp_audio_set_dto:                 ## @dce4_dp_audio_set_dto
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_DCCG_AUDIO_DTO1_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	movq	_DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_DCCG_AUDIO_DTO1_USE_512FBR_DTO@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%rbx), %edi
	callq	_WREG32
	movq	_DCCG_AUDIO_DTO_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	callq	_DCCG_AUDIO_DTO0_SOURCE_SEL
	orl	%eax, %ebx
LBB0_2:
	movq	_DCCG_AUDIO_DTO_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	%r15, %rdi
	callq	_ASIC_IS_DCE41
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_DCE41_DENTIST_DISPCLK_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_DENTIST_DPREFCLK_WDIVIDER_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_DENTIST_DPREFCLK_WDIVIDER_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	movl	%eax, %edi
	callq	_radeon_audio_decode_dfs_div
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ecx
	imull	$100, %r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r14d
LBB0_5:
	movq	_DCCG_AUDIO_DTO1_PHASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$24000, %esi                    ## imm = 0x5DC0
	callq	_WREG32
	movq	_DCCG_AUDIO_DTO1_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DCCG_AUDIO_DTO1_CNTL,4,2       ## @DCCG_AUDIO_DTO1_CNTL
	.comm	_DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK,4,2 ## @DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK
	.comm	_DCCG_AUDIO_DTO1_USE_512FBR_DTO,4,2 ## @DCCG_AUDIO_DTO1_USE_512FBR_DTO
	.comm	_DCCG_AUDIO_DTO_SEL,4,2         ## @DCCG_AUDIO_DTO_SEL
	.comm	_DCCG_AUDIO_DTO_SOURCE,4,2      ## @DCCG_AUDIO_DTO_SOURCE
	.comm	_DCE41_DENTIST_DISPCLK_CNTL,4,2 ## @DCE41_DENTIST_DISPCLK_CNTL
	.comm	_DENTIST_DPREFCLK_WDIVIDER_MASK,4,2 ## @DENTIST_DPREFCLK_WDIVIDER_MASK
	.comm	_DENTIST_DPREFCLK_WDIVIDER_SHIFT,4,2 ## @DENTIST_DPREFCLK_WDIVIDER_SHIFT
	.comm	_DCCG_AUDIO_DTO1_PHASE,4,2      ## @DCCG_AUDIO_DTO1_PHASE
	.comm	_DCCG_AUDIO_DTO1_MODULE,4,2     ## @DCCG_AUDIO_DTO1_MODULE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce4_dp_audio_set_dto          ; -- Begin function dce4_dp_audio_set_dto
	.p2align	2
_dce4_dp_audio_set_dto:                 ; @dce4_dp_audio_set_dto
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _DCCG_AUDIO_DTO1_CNTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DCCG_AUDIO_DTO1_CNTL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG32
Lloh2:
	adrp	x8, _DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh5:
	adrp	x9, _DCCG_AUDIO_DTO1_USE_512FBR_DTO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DCCG_AUDIO_DTO1_USE_512FBR_DTO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x22]
	bl	_WREG32
Lloh8:
	adrp	x8, _DCCG_AUDIO_DTO_SEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DCCG_AUDIO_DTO_SEL@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	bl	_DCCG_AUDIO_DTO0_SOURCE_SEL
	orr	w22, w0, w22
LBB0_2:
Lloh11:
	adrp	x8, _DCCG_AUDIO_DTO_SOURCE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DCCG_AUDIO_DTO_SOURCE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_WREG32
	mov	x0, x20
	bl	_ASIC_IS_DCE41
	cbz	x0, LBB0_5
; %bb.3:
Lloh14:
	adrp	x8, _DCE41_DENTIST_DISPCLK_CNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DCE41_DENTIST_DISPCLK_CNTL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_RREG32
Lloh17:
	adrp	x8, _DENTIST_DPREFCLK_WDIVIDER_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DENTIST_DPREFCLK_WDIVIDER_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh20:
	adrp	x9, _DENTIST_DPREFCLK_WDIVIDER_SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DENTIST_DPREFCLK_WDIVIDER_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsr	w0, w8, w9
	bl	_radeon_audio_decode_dfs_div
	cbz	w0, LBB0_5
; %bb.4:
	mov	w8, #100
	mul	w8, w19, w8
	udiv	w19, w8, w0
LBB0_5:
Lloh23:
	adrp	x8, _DCCG_AUDIO_DTO1_PHASE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DCCG_AUDIO_DTO1_PHASE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	w1, #24000
	bl	_WREG32
Lloh26:
	adrp	x8, _DCCG_AUDIO_DTO1_MODULE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DCCG_AUDIO_DTO1_MODULE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DCCG_AUDIO_DTO1_CNTL,4,2       ; @DCCG_AUDIO_DTO1_CNTL
	.comm	_DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK,4,2 ; @DCCG_AUDIO_DTO_WALLCLOCK_RATIO_MASK
	.comm	_DCCG_AUDIO_DTO1_USE_512FBR_DTO,4,2 ; @DCCG_AUDIO_DTO1_USE_512FBR_DTO
	.comm	_DCCG_AUDIO_DTO_SEL,4,2         ; @DCCG_AUDIO_DTO_SEL
	.comm	_DCCG_AUDIO_DTO_SOURCE,4,2      ; @DCCG_AUDIO_DTO_SOURCE
	.comm	_DCE41_DENTIST_DISPCLK_CNTL,4,2 ; @DCE41_DENTIST_DISPCLK_CNTL
	.comm	_DENTIST_DPREFCLK_WDIVIDER_MASK,4,2 ; @DENTIST_DPREFCLK_WDIVIDER_MASK
	.comm	_DENTIST_DPREFCLK_WDIVIDER_SHIFT,4,2 ; @DENTIST_DPREFCLK_WDIVIDER_SHIFT
	.comm	_DCCG_AUDIO_DTO1_PHASE,4,2      ; @DCCG_AUDIO_DTO1_PHASE
	.comm	_DCCG_AUDIO_DTO1_MODULE,4,2     ; @DCCG_AUDIO_DTO1_MODULE
.subsections_via_symbols
