	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_afmt_calc_cts
_amdgpu_afmt_calc_cts:                  ## @amdgpu_afmt_calc_cts
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	shll	$7, %ebx
	imull	$1000, %edi, %esi               ## imm = 0x3E8
	movl	%ebx, %edi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_gcd
	movq	%rax, %r13
	movslq	%ebx, %r12
	movq	%r12, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %r15d
LBB0_3:
	imulq	$274877907, %r12, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	addl	%r15d, %eax
	decl	%eax
	cltd
	idivl	%r15d
	movl	%eax, %r14d
	imull	%eax, %r15d
	imulq	$91625969, %r12, %rax           ## imm = 0x57619F1
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	cmpl	%eax, %r15d
	jge	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_5:
	imulq	$458129845, %r12, %rax          ## imm = 0x1B4E81B5
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	cmpl	%eax, %r15d
	jle	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
LBB0_7:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movslq	%edx, %rax
	movq	%r13, %rcx
	orq	%rax, %rcx
	shrq	$32, %rcx
	je	LBB0_8
## %bb.9:
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_10
LBB0_8:
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $eax killed $eax def $rax
LBB0_10:
	imull	%eax, %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, (%rcx)
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Calculated ACR N value is too small. You may experience audio problems.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Calculated ACR N value is too large. You may experience audio problems.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Calculated ACR timing N=%d CTS=%d for frequency %d\n"

	.no_dead_strip	_amdgpu_afmt_calc_cts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_afmt_calc_cts
_amdgpu_afmt_calc_cts:                  ; @amdgpu_afmt_calc_cts
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	lsl	w24, w3, #7
	mov	w8, #1000
	mul	w22, w0, w8
	mov	x0, x24
	mov	x1, x22
	bl	_gcd
	mov	x23, x0
	sxtw	x8, w24
	udiv	x8, x8, x0
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w24, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	w9, w9, w8
	sub	w9, w9, #1
	sdiv	w26, w9, w8
	mul	w25, w26, w8
	mov	w8, #6641
	movk	w8, #1398, lsl #16
	smull	x8, w24, w8
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	cmp	w25, w8
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_2:
	mov	w8, #33205
	movk	w8, #6990, lsl #16
	smull	x8, w24, w8
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w9
	cmp	w25, w8
	b.le	LBB0_4
; %bb.3:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_4:
	sxtw	x8, w22
	udiv	x8, x8, x23
	mul	w2, w26, w8
	str	w25, [x20]
	str	w2, [x21]
	ldr	w1, [x20]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x3, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_DRM_DEBUG
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Calculated ACR N value is too small. You may experience audio problems.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Calculated ACR N value is too large. You may experience audio problems.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Calculated ACR timing N=%d CTS=%d for frequency %d\n"

	.no_dead_strip	_amdgpu_afmt_calc_cts
.subsections_via_symbols
