	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc294x_get_current
_ltc294x_get_current:                   ## @ltc294x_get_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movl	12(%rdi), %edi
	movq	_LTC2943_REG_CURRENT_MSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movl	$2, %ecx
	callq	_ltc294x_read_regs
	movl	-32(%rbp), %esi
	shll	$8, %esi
	orl	-28(%rbp), %esi
	addl	$-32767, %esi                   ## imm = 0x8001
	movq	(%rbx), %rcx
	movq	_LTC2944_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movl	$64000, %ecx                    ## imm = 0xFA00
	movl	$60000, %edx                    ## imm = 0xEA60
	cmovel	%ecx, %edx
	movl	%eax, %ecx
	imull	%esi, %edx
	movl	8(%rbx), %eax
	movl	%eax, %esi
	shll	$15, %esi
	subl	%eax, %esi
	movl	%edx, %eax
	cltd
	idivl	%esi
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, (%r14)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LTC2943_REG_CURRENT_MSB,4,2    ## @LTC2943_REG_CURRENT_MSB
	.comm	_LTC2944_ID,8,3                 ## @LTC2944_ID
	.no_dead_strip	_ltc294x_get_current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc294x_get_current
_ltc294x_get_current:                   ; @ltc294x_get_current
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	w0, [x0, #12]
Lloh3:
	adrp	x8, _LTC2943_REG_CURRENT_MSB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LTC2943_REG_CURRENT_MSB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, sp
	mov	w3, #2
	bl	_ltc294x_read_regs
	ldp	w8, w9, [sp]
	orr	w8, w9, w8, lsl #8
	mov	w9, #-32767
	add	w8, w8, w9
	ldr	x9, [x20]
Lloh6:
	adrp	x10, _LTC2944_ID@GOTPAGE
Lloh7:
	ldr	x10, [x10, _LTC2944_ID@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	mov	w9, #60000
	mov	w10, #64000
	csel	w9, w10, w9, eq
	mul	w8, w9, w8
	ldr	w9, [x20, #8]
	lsl	w10, w9, #15
	sub	w9, w10, w9
	sdiv	w8, w8, w9
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [x19]
	ldr	x8, [sp, #8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LTC2943_REG_CURRENT_MSB,4,2    ; @LTC2943_REG_CURRENT_MSB
	.comm	_LTC2944_ID,8,3                 ; @LTC2944_ID
	.no_dead_strip	_ltc294x_get_current
.subsections_via_symbols
