	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trinity_get_sleep_divider_id_from_clock
_trinity_get_sleep_divider_id_from_clock: ## @trinity_get_sleep_divider_id_from_clock
	.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	%rdx, %r14
	movq	%rsi, %r15
	callq	_trinity_get_pi
	movq	_TRINITY_MINIMUM_ENGINE_CLOCK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%r14, %rcx
	cmovgq	%rcx, %r14
	xorl	%ebx, %ebx
	cmpq	%r15, %r14
	jg	LBB0_9
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.2:
	movq	_TRINITY_MAX_DEEPSLEEP_DIVIDER_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_sumo_get_sleep_divider_from_id
	movq	%rax, %rcx
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rax
	cqto
	idivq	%rcx
	subq	$1, %rbx
	jae	LBB0_7
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	subq	$1, %rbx
	jb	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, %rax
	jl	LBB0_3
LBB0_8:
	incl	%ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRINITY_MINIMUM_ENGINE_CLOCK,8,3 ## @TRINITY_MINIMUM_ENGINE_CLOCK
	.comm	_TRINITY_MAX_DEEPSLEEP_DIVIDER_ID,8,3 ## @TRINITY_MAX_DEEPSLEEP_DIVIDER_ID
	.no_dead_strip	_trinity_get_sleep_divider_id_from_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trinity_get_sleep_divider_id_from_clock
_trinity_get_sleep_divider_id_from_clock: ; @trinity_get_sleep_divider_id_from_clock
	.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	x20, x2
	mov	x19, x1
	bl	_trinity_get_pi
Lloh0:
	adrp	x8, _TRINITY_MINIMUM_ENGINE_CLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRINITY_MINIMUM_ENGINE_CLOCK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	csel	x21, x8, x20, gt
	cmp	x21, x19
	b.gt	LBB0_6
; %bb.1:
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _TRINITY_MAX_DEEPSLEEP_DIVIDER_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRINITY_MAX_DEEPSLEEP_DIVIDER_ID@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x8
	mov	x0, x8
	bl	_sumo_get_sleep_divider_from_id
	sub	x8, x20, #1
	cbz	x20, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sdiv	x9, x19, x0
	cmp	x9, x21
	b.lt	LBB0_3
LBB0_5:
	add	w0, w8, #1
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TRINITY_MINIMUM_ENGINE_CLOCK,8,3 ; @TRINITY_MINIMUM_ENGINE_CLOCK
	.comm	_TRINITY_MAX_DEEPSLEEP_DIVIDER_ID,8,3 ; @TRINITY_MAX_DEEPSLEEP_DIVIDER_ID
	.no_dead_strip	_trinity_get_sleep_divider_id_from_clock
.subsections_via_symbols
