	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_set_battery_regulation_voltage
_bq2415x_set_battery_regulation_voltage: ## @bq2415x_set_battery_regulation_voltage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%edx, %edx
	cmpl	$3490, %esi                     ## imm = 0xDA2
	jl	LBB0_3
## %bb.1:
	cmpl	$4460, %esi                     ## imm = 0x116C
	jb	LBB0_2
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	movl	%esi, %eax
	movl	$3435973837, %ecx               ## imm = 0xCCCCCCCD
	imulq	%rax, %rcx
	shrq	$35, %rcx
	movl	%ecx, %eax
	addl	$-350, %eax                     ## imm = 0xFEA2
	shrl	$31, %eax
	leal	(%rcx,%rax), %edx
	addl	$-350, %edx                     ## imm = 0xFEA2
	sarl	%edx
LBB0_3:
	movq	_BQ2415X_REG_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BQ2415X_MASK_VO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BQ2415X_SHIFT_VO@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	popq	%rbp
	jmp	_bq2415x_i2c_write_mask         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BQ2415X_REG_VOLTAGE,4,2        ## @BQ2415X_REG_VOLTAGE
	.comm	_BQ2415X_MASK_VO,4,2            ## @BQ2415X_MASK_VO
	.comm	_BQ2415X_SHIFT_VO,4,2           ## @BQ2415X_SHIFT_VO
	.no_dead_strip	_bq2415x_set_battery_regulation_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_set_battery_regulation_voltage
_bq2415x_set_battery_regulation_voltage: ; @bq2415x_set_battery_regulation_voltage
	.cfi_startproc
; %bb.0:
	cmp	w1, #3490
	b.ge	LBB0_2
; %bb.1:
	mov	w2, #0
	b	LBB0_5
LBB0_2:
	mov	w8, #52429
	movk	w8, #52428, lsl #16
	umull	x8, w1, w8
	lsr	x8, x8, #35
	sub	w9, w8, #350
	sub	w8, w8, #349
	cmp	w9, #0
	csel	w8, w8, w9, lt
	lsr	w9, w1, #2
	cmp	w9, #1115
	b.lo	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_4:
	asr	w2, w8, #1
LBB0_5:
Lloh3:
	adrp	x8, _BQ2415X_REG_VOLTAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BQ2415X_REG_VOLTAGE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BQ2415X_MASK_VO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BQ2415X_MASK_VO@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _BQ2415X_SHIFT_VO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BQ2415X_SHIFT_VO@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	b	_bq2415x_i2c_write_mask
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BQ2415X_REG_VOLTAGE,4,2        ; @BQ2415X_REG_VOLTAGE
	.comm	_BQ2415X_MASK_VO,4,2            ; @BQ2415X_MASK_VO
	.comm	_BQ2415X_SHIFT_VO,4,2           ; @BQ2415X_SHIFT_VO
	.no_dead_strip	_bq2415x_set_battery_regulation_voltage
.subsections_via_symbols
