	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc2945_val_to_reg
_ltc2945_val_to_reg:                    ## @ltc2945_val_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
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_dev_get_drvdata
	addl	$-128, %ebx
	cmpl	$19, %ebx
	ja	LBB0_12
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movabsq	$5165088340638674453, %rcx      ## imm = 0x47AE147AE147AE15
	movq	%r14, %rax
	mulq	%rcx
	subq	%rdx, %r14
	shrq	%r14
	addq	%rdx, %r14
	shrq	$4, %r14
	jmp	LBB0_9
LBB0_3:
	movq	%r14, %rdi
	movl	$25, %esi
	jmp	LBB0_7
LBB0_4:
	movq	_LTC2945_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-20(%rbp), %rdx
	movq	%rax, %rdi
	callq	_regmap_read
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movq	_CONTROL_MULT_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -20(%rbp)
	je	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	movl	$625, %esi                      ## imm = 0x271
LBB0_7:
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	addq	%r14, %r14
LBB0_9:
	movq	%r14, %rax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	movl	$25, %esi
	callq	_DIV_ROUND_CLOSEST
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	jmp	LBB0_10
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_LTC2945_CONTROL,4,2            ## @LTC2945_CONTROL
	.comm	_CONTROL_MULT_SELECT,4,2        ## @CONTROL_MULT_SELECT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ltc2945_val_to_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc2945_val_to_reg
_ltc2945_val_to_reg:                    ; @ltc2945_val_to_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	bl	_dev_get_drvdata
	sub	w8, w20, #128
	cmp	w8, #19
	b.hi	LBB0_11
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x8, #44565
	movk	x8, #57671, lsl #16
	movk	x8, #5242, lsl #32
	movk	x8, #18350, lsl #48
	umulh	x8, x19, x8
	sub	x9, x19, x8
	add	x8, x8, x9, lsr #1
	lsr	x0, x8, #4
	b	LBB0_9
LBB0_3:
	mov	x0, x19
	mov	w1, #25
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _LTC2945_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LTC2945_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_9
; %bb.5:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _CONTROL_MULT_SELECT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CONTROL_MULT_SELECT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	mov	x0, x19
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
	mov	w1, #625
LBB0_7:
	bl	_DIV_ROUND_CLOSEST
	mov	w0, w0
	b	LBB0_9
LBB0_8:
	lsl	x0, x19, #1
LBB0_9:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	mov	w1, #25
	bl	_DIV_ROUND_CLOSEST
	lsl	w0, w0, #1
	b	LBB0_9
LBB0_11:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_LTC2945_CONTROL,4,2            ; @LTC2945_CONTROL
	.comm	_CONTROL_MULT_SELECT,4,2        ; @CONTROL_MULT_SELECT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ltc2945_val_to_reg
.subsections_via_symbols
