	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq2415x_get_termination_current
_bq2415x_get_termination_current:       ## @bq2415x_get_termination_current
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpl	$0, (%rdi)
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_BQ2415X_REG_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BQ2415X_MASK_VI_TERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BQ2415X_SHIFT_VI_TERM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_bq2415x_i2c_read_mask
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	imull	$3400, %eax, %eax               ## imm = 0xD48
	addl	$3400, %eax                     ## imm = 0xD48
	cltd
	idivl	(%rbx)
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	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_TERM,4,2       ## @BQ2415X_MASK_VI_TERM
	.comm	_BQ2415X_SHIFT_VI_TERM,4,2      ## @BQ2415X_SHIFT_VI_TERM
	.no_dead_strip	_bq2415x_get_termination_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq2415x_get_termination_current
_bq2415x_get_termination_current:       ; @bq2415x_get_termination_current
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	cmp	w8, #0
	b.le	LBB0_3
; %bb.1:
	mov	x19, x0
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_TERM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BQ2415X_MASK_VI_TERM@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _BQ2415X_SHIFT_VI_TERM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BQ2415X_SHIFT_VI_TERM@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_bq2415x_i2c_read_mask
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	w8, #3400
	mul	w8, w0, w8
	add	w8, w8, #3400
	ldr	w9, [x19]
	sdiv	w0, w8, w9
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BQ2415X_REG_CURRENT,4,2        ; @BQ2415X_REG_CURRENT
	.comm	_BQ2415X_MASK_VI_TERM,4,2       ; @BQ2415X_MASK_VI_TERM
	.comm	_BQ2415X_SHIFT_VI_TERM,4,2      ; @BQ2415X_SHIFT_VI_TERM
	.no_dead_strip	_bq2415x_get_termination_current
.subsections_via_symbols
