	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_sleep_time_to_pwr_cmd    ## -- Begin function cyapa_sleep_time_to_pwr_cmd
	.p2align	4, 0x90
_cyapa_sleep_time_to_pwr_cmd:           ## @cyapa_sleep_time_to_pwr_cmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$20, %esi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_clamp_val
	cmpl	$99, %eax
	jg	LBB0_2
## %bb.1:
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	jmp	LBB0_3
LBB0_2:
	movl	%eax, %ecx
	movl	$3435973837, %eax               ## imm = 0xCCCCCCCD
	imulq	%rcx, %rax
	shrq	$36, %rax
	addl	$5, %eax
LBB0_3:
	shll	$2, %eax
	movq	_PWR_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PWR_MODE_MASK,4,2              ## @PWR_MODE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cyapa_sleep_time_to_pwr_cmd    ; -- Begin function cyapa_sleep_time_to_pwr_cmd
	.p2align	2
_cyapa_sleep_time_to_pwr_cmd:           ; @cyapa_sleep_time_to_pwr_cmd
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	w1, #20
	mov	w2, #1000
	bl	_clamp_val
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x9, w0, w9
	lsr	x9, x9, #36
	add	w9, w9, #5
	cmp	w0, #99
	csel	w8, w9, w8, gt
Lloh0:
	adrp	x9, _PWR_MODE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PWR_MODE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w0, w9, w8, lsl #2
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PWR_MODE_MASK,4,2              ; @PWR_MODE_MASK
.subsections_via_symbols
