	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function redrat3_us_to_len
_redrat3_us_to_len:                     ## @redrat3_us_to_len
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_IR_MAX_DURATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edi, %eax
	cmovll	%eax, %edi
	movq	_RR3_CLK_CONV_FACTOR@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	imull	%edi, %ecx
	leal	999(%rcx), %edx
	movl	$1, %eax
	cmpl	$1999, %edx                     ## imm = 0x7CF
	jb	LBB0_2
## %bb.1:
	movslq	%ecx, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IR_MAX_DURATION,4,2            ## @IR_MAX_DURATION
	.comm	_RR3_CLK_CONV_FACTOR,4,2        ## @RR3_CLK_CONV_FACTOR
	.no_dead_strip	_redrat3_us_to_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function redrat3_us_to_len
_redrat3_us_to_len:                     ; @redrat3_us_to_len
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _IR_MAX_DURATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IR_MAX_DURATION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	csel	w8, w8, w0, lt
Lloh3:
	adrp	x9, _RR3_CLK_CONV_FACTOR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RR3_CLK_CONV_FACTOR@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x11, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w11
	mul	w8, w9, w8
	smull	x9, w8, w10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	w8, w8, #999
	cmp	w8, #1999
	csinc	w0, w9, wzr, hs
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IR_MAX_DURATION,4,2            ; @IR_MAX_DURATION
	.comm	_RR3_CLK_CONV_FACTOR,4,2        ; @RR3_CLK_CONV_FACTOR
	.no_dead_strip	_redrat3_us_to_len
.subsections_via_symbols
