	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tfrc_calc_x_reverse_lookup     ## -- Begin function tfrc_calc_x_reverse_lookup
	.p2align	4, 0x90
_tfrc_calc_x_reverse_lookup:            ## @tfrc_calc_x_reverse_lookup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rsi
	movq	_tfrc_calc_x_lookup@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	cmpq	%rdi, 8(%rcx)
	jle	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DCCP_WARN
	movq	_TFRC_SMALLEST_P@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	_TFRC_CALC_X_ARRSIZE@GOTPCREL(%rip), %rbx
	movslq	(%rbx), %rcx
	movq	-8(%rax,%rcx,8), %rax
	cmpq	%rsi, (%rax)
	jge	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_DCCP_WARN
	movl	$1000000, %eax                  ## imm = 0xF4240
	jmp	LBB0_10
LBB0_6:
	cmpq	%rsi, 8(%rax)
	jge	LBB0_7
## %bb.8:
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_tfrc_binsearch
	imull	$1000000, %eax, %eax            ## imm = 0xF4240
	addl	$1000000, %eax                  ## imm = 0xF4240
	jmp	LBB0_9
LBB0_7:
	movq	%rsi, %rdi
	movl	$1, %esi
	callq	_tfrc_binsearch
	incl	%eax
	movq	_TFRC_CALC_X_SPLIT@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
LBB0_9:
	cltd
	idivl	(%rbx)
	cltq
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tfrc_calc_x_lookup,8,3         ## @tfrc_calc_x_lookup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fvalue %u smaller than resolution\n"

	.comm	_TFRC_SMALLEST_P,8,3            ## @TFRC_SMALLEST_P
	.comm	_TFRC_CALC_X_ARRSIZE,4,2        ## @TFRC_CALC_X_ARRSIZE
L_.str.1:                               ## @.str.1
	.asciz	"fvalue %u exceeds bounds!\n"

	.comm	_TFRC_CALC_X_SPLIT,4,2          ## @TFRC_CALC_X_SPLIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tfrc_calc_x_reverse_lookup     ; -- Begin function tfrc_calc_x_reverse_lookup
	.p2align	2
_tfrc_calc_x_reverse_lookup:            ; @tfrc_calc_x_reverse_lookup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_9
; %bb.1:
	mov	x1, x0
Lloh0:
	adrp	x8, _tfrc_calc_x_lookup@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tfrc_calc_x_lookup@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x8]
	ldr	x9, [x9, #8]
	cmp	x9, x0
	b.le	LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DCCP_WARN
Lloh5:
	adrp	x8, _TFRC_SMALLEST_P@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TFRC_SMALLEST_P@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x19, _TFRC_CALC_X_ARRSIZE@GOTPAGE
Lloh9:
	ldr	x19, [x19, _TFRC_CALC_X_ARRSIZE@GOTPAGEOFF]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #3
	ldur	x8, [x8, #-8]
	ldr	x9, [x8]
	cmp	x9, x1
	b.ge	LBB0_5
; %bb.4:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DCCP_WARN
	mov	w0, #16960
	movk	w0, #15, lsl #16
	b	LBB0_9
LBB0_5:
	ldr	x8, [x8, #8]
	mov	x0, x1
	cmp	x8, x1
	b.ge	LBB0_7
; %bb.6:
	mov	w1, #0
	bl	_tfrc_binsearch
	mov	w8, #16960
	movk	w8, #15, lsl #16
	madd	w8, w0, w8, w8
	b	LBB0_8
LBB0_7:
	mov	w1, #1
	bl	_tfrc_binsearch
Lloh12:
	adrp	x8, _TFRC_CALC_X_SPLIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TFRC_CALC_X_SPLIT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	madd	w8, w8, w0, w8
LBB0_8:
	ldr	w9, [x19]
	sdiv	w8, w8, w9
	sxtw	x0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_tfrc_calc_x_lookup,8,3         ; @tfrc_calc_x_lookup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fvalue %u smaller than resolution\n"

	.comm	_TFRC_SMALLEST_P,8,3            ; @TFRC_SMALLEST_P
	.comm	_TFRC_CALC_X_ARRSIZE,4,2        ; @TFRC_CALC_X_ARRSIZE
l_.str.1:                               ; @.str.1
	.asciz	"fvalue %u exceeds bounds!\n"

	.comm	_TFRC_CALC_X_SPLIT,4,2          ; @TFRC_CALC_X_SPLIT
.subsections_via_symbols
