	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_calc_upll_dividers  ## -- Begin function radeon_uvd_calc_upll_dividers
	.p2align	4, 0x90
_radeon_uvd_calc_upll_dividers:         ## @radeon_uvd_calc_upll_dividers
	.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	%r9d, %r15d
	movl	%r8d, %ebx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movl	(%rdi), %r14d
	movl	%ecx, %edi
	callq	_max
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_max
	cmpl	%ebx, %eax
	ja	LBB0_10
## %bb.1:
	movl	%eax, %ecx
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	40(%rbp), %r14d
	movl	32(%rbp), %edi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leal	(%r12,%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r12d
	imull	%r15d, %r12d
	imull	$100, %r15d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	movl	%ecx, %ebx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	$100, %ebx
	addl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	ja	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edi, %r15d
	movl	%r12d, %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_do_div
	cmpl	16(%rbp), %r12d
	ja	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	24(%rbp), %edx
	movl	%r14d, %ecx
	callq	_radeon_uvd_calc_upll_post_div
	cmpl	%r15d, %eax
	ja	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %ecx
	movl	%eax, %r13d
	movl	%ebx, %edi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	24(%rbp), %edx
	callq	_radeon_uvd_calc_upll_post_div
	cmpl	%r15d, %eax
	ja	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	movl	%r15d, %edi
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r13d
	movl	%eax, %esi
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	addl	%esi, %eax
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	subl	%eax, %edx
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	-64(%rbp), %r12d                ## 4-byte Reload
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %eax
	andl	16(%rbp), %eax
	movq	48(%rbp), %rsi
	movl	%eax, (%rsi)
	movq	56(%rbp), %rax
	movl	%r13d, (%rax)
	movq	64(%rbp), %rax
	movl	%ecx, (%rax)
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	cmpl	$-1, -44(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_11
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_calc_upll_dividers  ; -- Begin function radeon_uvd_calc_upll_dividers
	.p2align	2
_radeon_uvd_calc_upll_dividers:         ; @radeon_uvd_calc_upll_dividers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x20, x6
	mov	x27, x5
	mov	x28, x4
	mov	x21, x2
	mov	x23, x1
	ldr	w22, [x0]
	mov	x0, x3
	bl	_max
	mov	x1, x21
	bl	_max
	cmp	w0, w28
	b.hi	LBB0_10
; %bb.1:
	mov	x25, x0
	ldr	x8, [x29, #40]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	stp	w21, w23, [sp, #40]             ; 8-byte Folded Spill
	add	w8, w21, w23
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	ldr	x8, [x29, #32]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x8, [x29, #24]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mul	w26, w0, w27
	mov	w8, #100
	mul	w8, w27, w8
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
	mov	w24, #-1
	ldp	w21, w27, [x29, #16]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w25, w25, #100
	ldr	w8, [sp, #32]                   ; 4-byte Folded Reload
	add	w26, w26, w8
	mov	x28, x22
	cmp	w25, w22
	mov	x22, x23
	b.hi	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	mov	x1, x22
	bl	_do_div
	cmp	w26, w20
	b.hi	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x22
	mov	x22, x28
	mov	x0, x25
	ldr	w1, [sp, #44]                   ; 4-byte Folded Reload
	mov	x2, x19
	mov	x3, x27
	bl	_radeon_uvd_calc_upll_post_div
	cmp	w0, w21
	b.hi	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x28, x0
	mov	x0, x25
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	mov	x2, x19
	mov	x3, x27
	bl	_radeon_uvd_calc_upll_post_div
	cmp	w0, w21
	b.hi	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	udiv	w8, w25, w28
	udiv	w9, w25, w0
	add	w8, w8, w9
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	sub	w8, w9, w8
	cmp	w8, w24
	b.hs	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w9, w26, w20
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	str	w9, [x10]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	str	w28, [x9]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w0, [x9]
	mov	x24, x8
	cbnz	w8, LBB0_2
	b	LBB0_9
LBB0_8:
	cmn	w24, #1
	b.eq	LBB0_10
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
