	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psif_set_prescaler
_psif_set_prescaler:                    ## @psif_set_prescaler
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_clk_get_rate
	movabsq	$4835703278458516699, %rcx      ## imm = 0x431BDE82D7B634DB
	mulq	%rcx
	shrq	$18, %rdx
	movq	_PSIF_PSR_PRSCV_SIZE@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$-1, %eax
	shll	%cl, %eax
	imulq	$100, %rdx, %rbx
	notl	%eax
	movslq	%eax, %r15
	cmpq	%r15, %rbx
	jbe	LBB0_2
## %bb.1:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, %rbx
LBB0_2:
	movl	(%r14), %edi
	callq	_clk_enable
	movq	_PSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_psif_writel
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clk_disable                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PSIF_PSR_PRSCV_SIZE,4,2        ## @PSIF_PSR_PRSCV_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pclk too fast, prescaler set to max\n"

	.comm	_PSR,4,2                        ## @PSR
	.no_dead_strip	_psif_set_prescaler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psif_set_prescaler
_psif_set_prescaler:                    ; @psif_set_prescaler
	.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, x0
	ldr	w0, [x0]
	bl	_clk_get_rate
	mov	x8, #13531
	movk	x8, #55222, lsl #16
	movk	x8, #56962, lsl #32
	movk	x8, #17179, lsl #48
	umulh	x8, x0, x8
	lsr	x8, x8, #18
	mov	w9, #100
	mul	x20, x8, x9
Lloh0:
	adrp	x8, _PSIF_PSR_PRSCV_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSIF_PSR_PRSCV_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w8, w8
	sxtw	x21, w8
	cmp	x20, x21
	b.ls	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x20, x21
LBB0_2:
	ldr	w0, [x19]
	bl	_clk_enable
Lloh5:
	adrp	x8, _PSR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PSR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_psif_writel
	ldr	w0, [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	_clk_disable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PSIF_PSR_PRSCV_SIZE,4,2        ; @PSIF_PSR_PRSCV_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pclk too fast, prescaler set to max\n"

	.comm	_PSR,4,2                        ; @PSR
	.no_dead_strip	_psif_set_prescaler
.subsections_via_symbols
