	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function plld2_set_freq
_plld2_set_freq:                        ## @plld2_set_freq
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	(%rdi), %rcx
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	(%rcx), %r8
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%r8, %r8
	je	LBB0_1
## %bb.2:
	movq	_PLLD2_VCO_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_PLLD2_VCO_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r14d, %eax
	shrl	$31, %eax
	addl	%r14d, %eax
	sarl	%eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_PLLD2_PFD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	_PLLD2_PFD_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	8(%rax,%r15,8), %r8
	incq	%r15
	testq	%r8, %r8
	je	LBB0_18
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	-56(%rbp), %r12                 ## 8-byte Reload
                                        ## kill: def $r12d killed $r12d killed $r12 def $r12
	imull	%r8d, %r12d
	cmpl	%r10d, %r12d
	jl	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r13d, %r12d
	jg	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	8(%rdi), %cl
	movl	$1, %r9d
	shll	%cl, %r9d
	cmpl	$2, %r9d
	jl	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r12), %ebx
	movl	$1, %r11d
	jmp	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=2
	cmpl	%eax, -56(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r11d
	addl	%r12d, %ebx
	cmpl	%r11d, %r9d
	je	LBB0_17
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, %esi
	movzbl	12(%rdi), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, %esi
	jge	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%esi, %eax
	imull	%r14d, %eax
	cltd
	idivl	%r11d
	cmpl	%r13d, %eax
	jg	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, %ecx
	cmpl	%r10d, %eax
	jl	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%r14d, %eax
	cltd
	idivl	%r11d
	cmpl	-80(%rbp), %eax                 ## 4-byte Folded Reload
	jg	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	-76(%rbp), %ecx                 ## 4-byte Folded Reload
	jl	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%ecx, %eax
	cltd
	idivl	%r8d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %edx
	subl	%eax, %edx
	movl	%edx, %ecx
	negl	%ecx
	cmovsl	%edx, %ecx
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%r8d, %edx
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%esi, -72(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r11d, -68(%rbp)                ## 4-byte Spill
	jmp	LBB0_15
LBB0_1:
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
                                        ## implicit-def: $eax
                                        ## kill: killed $eax
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rax,4), %eax
	leal	(%rax,%rax,4), %eax
	cmpl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_20
## %bb.19:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_22
LBB0_20:
	movq	_CLK_SET_DRYRUN@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rdx)
	jne	LBB0_22
## %bb.21:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movl	%r14d, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	-68(%rbp), %r8d                 ## 4-byte Reload
	movl	-72(%rbp), %r9d                 ## 4-byte Reload
	callq	_pll_set_std
LBB0_22:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT64_MAX,4,2                  ## @INT64_MAX
	.comm	_PLLD2_VCO_MIN,4,2              ## @PLLD2_VCO_MIN
	.comm	_PLLD2_VCO_MAX,4,2              ## @PLLD2_VCO_MAX
	.comm	_PLLD2_PFD_MAX,4,2              ## @PLLD2_PFD_MAX
	.comm	_PLLD2_PFD_MIN,4,2              ## @PLLD2_PFD_MIN
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_CLK_SET_DRYRUN,4,2             ## @CLK_SET_DRYRUN
	.no_dead_strip	_plld2_set_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function plld2_set_freq
_plld2_set_freq:                        ; @plld2_set_freq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	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
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	.cfi_offset w25, -56
	.cfi_offset w26, -64
	ldr	x10, [x0]
Lloh0:
	adrp	x8, _INT64_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT64_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x7, [x10]
	ldr	w9, [x2]
	cbz	x7, LBB0_14
; %bb.1:
	mov	x11, #0
Lloh3:
	adrp	x12, _PLLD2_VCO_MIN@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PLLD2_VCO_MIN@GOTPAGEOFF]
Lloh5:
	adrp	x13, _PLLD2_VCO_MAX@GOTPAGE
Lloh6:
	ldr	x13, [x13, _PLLD2_VCO_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
Lloh8:
	ldr	w13, [x13]
	cmp	w1, #0
	cinc	w14, w1, lt
Lloh9:
	adrp	x15, _PLLD2_PFD_MAX@GOTPAGE
Lloh10:
	ldr	x15, [x15, _PLLD2_PFD_MAX@GOTPAGEOFF]
	asr	w14, w14, #1
Lloh11:
	ldr	w15, [x15]
Lloh12:
	adrp	x16, _PLLD2_PFD_MIN@GOTPAGE
Lloh13:
	ldr	x16, [x16, _PLLD2_PFD_MIN@GOTPAGEOFF]
Lloh14:
	ldr	w16, [x16]
	mov	w17, #1
                                        ; implicit-def: $w4
                                        ; implicit-def: $w5
                                        ; implicit-def: $w6
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	ldr	x7, [x10, x11, lsl #3]
	cbz	x7, LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mul	w19, w9, w7
	cmp	w19, w12
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w19, w13
	b.gt	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w20, [x0, #8]
	lsl	w20, w17, w20
	cmp	w20, #2
	b.lt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w14, w19
	mov	w22, #1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w22, w22, #1
	add	w21, w21, w19
	cmp	w20, w22
	b.eq	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sdiv	w23, w21, w1
	cbz	w23, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	w24, [x0, #12]
	lsl	w24, w17, w24
	cmp	w23, w24
	b.ge	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	mul	w24, w23, w1
	sdiv	w24, w24, w22
	cmp	w24, w13
	ccmp	w24, w12, #8, le
	b.lt	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	sdiv	w25, w1, w22
	cmp	w25, w15
	b.gt	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	cmp	w24, w16
	b.lt	LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	sdiv	w24, w24, w7
	subs	w25, w9, w24
	cneg	w25, w25, mi
	cmp	w25, w8
	csel	w6, w6, w7, ge
	csel	w5, w5, w23, ge
	csel	w8, w8, w25, ge
	csel	w4, w4, w22, ge
	cmp	w9, w24
	b.ne	LBB0_7
	b	LBB0_15
LBB0_14:
                                        ; implicit-def: $w6
                                        ; implicit-def: $w5
                                        ; implicit-def: $w4
LBB0_15:
	mov	w10, #25
	mul	w9, w9, w10
	cmp	w8, w9
	b.le	LBB0_17
; %bb.16:
Lloh15:
	adrp	x8, _ERANGE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_17:
Lloh18:
	adrp	x8, _CLK_SET_DRYRUN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CLK_SET_DRYRUN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_20
; %bb.18:
	mov	w0, #0
LBB0_19:
	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], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	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], #64             ; 16-byte Folded Reload
	b	_pll_set_std
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_INT64_MAX,4,2                  ; @INT64_MAX
	.comm	_PLLD2_VCO_MIN,4,2              ; @PLLD2_VCO_MIN
	.comm	_PLLD2_VCO_MAX,4,2              ; @PLLD2_VCO_MAX
	.comm	_PLLD2_PFD_MAX,4,2              ; @PLLD2_PFD_MAX
	.comm	_PLLD2_PFD_MIN,4,2              ; @PLLD2_PFD_MIN
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_CLK_SET_DRYRUN,4,2             ; @CLK_SET_DRYRUN
	.no_dead_strip	_plld2_set_freq
.subsections_via_symbols
