	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LM93_IN_FROM_REG
_LM93_IN_FROM_REG:                      ## @LM93_IN_FROM_REG
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_lm93_vin_val_max@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rdx
	movslq	(%rax,%rdx,4), %rax
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	movq	_lm93_vin_val_min@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rdx,4), %rcx
	imulq	$1000, %rcx, %r8                ## imm = 0x3E8
	subq	%r8, %rax
	movq	_lm93_vin_reg_max@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rdx,8), %rcx
	movq	_lm93_vin_reg_min@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	(%rdi,%rdx,8), %rdi
	subq	%rdi, %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	subq	%rdi, %rsi
	imulq	%rax, %rsi
	leaq	(%r8,%rsi), %rax
	addq	$500, %rax                      ## imm = 0x1F4
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	imulq	%rcx
	movq	%rdx, %rax
	shrq	$63, %rax
	shrq	$7, %rdx
	addl	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lm93_vin_val_max,8,3           ## @lm93_vin_val_max
	.comm	_lm93_vin_val_min,8,3           ## @lm93_vin_val_min
	.comm	_lm93_vin_reg_max,8,3           ## @lm93_vin_reg_max
	.comm	_lm93_vin_reg_min,8,3           ## @lm93_vin_reg_min
	.no_dead_strip	_LM93_IN_FROM_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LM93_IN_FROM_REG
_LM93_IN_FROM_REG:                      ; @LM93_IN_FROM_REG
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _lm93_vin_val_max@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lm93_vin_val_max@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sbfiz	x9, x0, #2, #32
	ldrsw	x8, [x8, x9]
	mov	w10, #1000
	mul	x8, x8, x10
Lloh3:
	adrp	x11, _lm93_vin_val_min@GOTPAGE
Lloh4:
	ldr	x11, [x11, _lm93_vin_val_min@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	ldrsw	x9, [x11, x9]
Lloh6:
	adrp	x11, _lm93_vin_reg_max@GOTPAGE
Lloh7:
	ldr	x11, [x11, _lm93_vin_reg_max@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	sbfiz	x12, x0, #3, #32
	ldr	x11, [x11, x12]
	mul	x9, x9, x10
Lloh9:
	adrp	x10, _lm93_vin_reg_min@GOTPAGE
Lloh10:
	ldr	x10, [x10, _lm93_vin_reg_min@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	ldr	x10, [x10, x12]
	sub	x8, x8, x9
	sub	x11, x11, x10
	sdiv	x8, x8, x11
	sub	x10, x1, x10
	madd	x8, x10, x8, x9
	add	x8, x8, #500
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	smulh	x8, x8, x9
	lsr	x9, x8, #63
	lsr	x8, x8, #7
	add	w0, w8, w9
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_lm93_vin_val_max,8,3           ; @lm93_vin_val_max
	.comm	_lm93_vin_val_min,8,3           ; @lm93_vin_val_min
	.comm	_lm93_vin_reg_max,8,3           ; @lm93_vin_reg_max
	.comm	_lm93_vin_reg_min,8,3           ; @lm93_vin_reg_min
	.no_dead_strip	_LM93_IN_FROM_REG
.subsections_via_symbols
