	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_set_charge_current
_bq2415x_set_charge_current:            ## @bq2415x_set_charge_current
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	imull	%esi, %eax
	xorl	%edx, %edx
	cmpl	$30601, %eax                    ## imm = 0x7789
	jl	LBB0_3
## %bb.2:
	addl	$-37400, %eax                   ## imm = 0xFFFF6DE8
	cltq
	imulq	$323385773, %rax, %rax          ## imm = 0x134679AD
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$41, %rax
	addl	%ecx, %eax
	cmpl	$7, %eax
	movl	$7, %edx
	cmovll	%eax, %edx
LBB0_3:
	movq	_BQ2415X_REG_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BQ2415X_MASK_VI_CHRG@GOTPCREL(%rip), %rax
	movq	_BQ2415X_MASK_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BQ2415X_SHIFT_VI_CHRG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	popq	%rbp
	jmp	_bq2415x_i2c_write_mask         ## TAILCALL
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BQ2415X_REG_CURRENT,4,2        ## @BQ2415X_REG_CURRENT
	.comm	_BQ2415X_MASK_VI_CHRG,4,2       ## @BQ2415X_MASK_VI_CHRG
	.comm	_BQ2415X_MASK_RESET,4,2         ## @BQ2415X_MASK_RESET
	.comm	_BQ2415X_SHIFT_VI_CHRG,4,2      ## @BQ2415X_SHIFT_VI_CHRG
	.no_dead_strip	_bq2415x_set_charge_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_set_charge_current
_bq2415x_set_charge_current:            ; @bq2415x_set_charge_current
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #0
	b.le	LBB0_2
; %bb.1:
	mul	w8, w8, w1
	mov	w9, #30601
	mov	w10, #-37400
	add	w10, w8, w10
	mov	w11, #31149
	movk	w11, #4934, lsl #16
	smull	x10, w10, w11
	lsr	x11, x10, #63
	asr	x10, x10, #41
	add	w10, w10, w11
	mov	w11, #7
	cmp	w10, #7
	csel	w10, w10, w11, lt
	cmp	w8, w9
	csel	w2, wzr, w10, lt
Lloh0:
	adrp	x8, _BQ2415X_REG_CURRENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BQ2415X_REG_CURRENT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BQ2415X_MASK_VI_CHRG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BQ2415X_MASK_VI_CHRG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BQ2415X_MASK_RESET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BQ2415X_MASK_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh9:
	adrp	x8, _BQ2415X_SHIFT_VI_CHRG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BQ2415X_SHIFT_VI_CHRG@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	b	_bq2415x_i2c_write_mask
LBB0_2:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BQ2415X_REG_CURRENT,4,2        ; @BQ2415X_REG_CURRENT
	.comm	_BQ2415X_MASK_VI_CHRG,4,2       ; @BQ2415X_MASK_VI_CHRG
	.comm	_BQ2415X_MASK_RESET,4,2         ; @BQ2415X_MASK_RESET
	.comm	_BQ2415X_SHIFT_VI_CHRG,4,2      ; @BQ2415X_SHIFT_VI_CHRG
	.no_dead_strip	_bq2415x_set_charge_current
.subsections_via_symbols
