	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function in_to_reg
_in_to_reg:                             ## @in_to_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	_MON_SRC_VCC@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	sete	%al
	movq	_MON_SRC_VSB@GOTPCREL(%rip), %rcx
	cmpq	%rsi, (%rcx)
	sete	%cl
	orb	%al, %cl
	movq	_MON_SRC_AVSB@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	sete	%al
	movq	_MON_SRC_VBAT@GOTPCREL(%rip), %rdx
	cmpq	%rsi, (%rdx)
	sete	%dl
	orb	%al, %dl
	orb	%cl, %dl
	movzbl	%dl, %esi
	shll	$4, %esi
	addl	$16, %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$127, %edx
	popq	%rbp
	jmp	_clamp_val                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MON_SRC_VCC,8,3                ## @MON_SRC_VCC
	.comm	_MON_SRC_VSB,8,3                ## @MON_SRC_VSB
	.comm	_MON_SRC_AVSB,8,3               ## @MON_SRC_AVSB
	.comm	_MON_SRC_VBAT,8,3               ## @MON_SRC_VBAT
	.no_dead_strip	_in_to_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function in_to_reg
_in_to_reg:                             ; @in_to_reg
	.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
Lloh0:
	adrp	x8, _MON_SRC_VCC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MON_SRC_VCC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _MON_SRC_VSB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MON_SRC_VSB@GOTPAGEOFF]
Lloh5:
	adrp	x10, _MON_SRC_AVSB@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MON_SRC_AVSB@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _MON_SRC_VBAT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MON_SRC_VBAT@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	x11, x1
	ccmp	x10, x1, #4, ne
	ccmp	x9, x1, #4, ne
	ccmp	x8, x1, #4, ne
	mov	w8, #16
	mov	w9, #32
	csel	w1, w9, w8, eq
	bl	_DIV_ROUND_CLOSEST
	mov	w1, #0
	mov	w2, #127
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_clamp_val
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MON_SRC_VCC,8,3                ; @MON_SRC_VCC
	.comm	_MON_SRC_VSB,8,3                ; @MON_SRC_VSB
	.comm	_MON_SRC_AVSB,8,3               ; @MON_SRC_AVSB
	.comm	_MON_SRC_VBAT,8,3               ; @MON_SRC_VBAT
	.no_dead_strip	_in_to_reg
.subsections_via_symbols
