	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltc294x_reset
_ltc294x_reset:                         ## @ltc294x_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	movq	_LTC294X_REG_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movl	$1, %ecx
	callq	_ltc294x_read_regs
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	callq	_LTC294X_REG_CONTROL_PRESCALER_SET
	movq	_LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -36(%rbp)
	movl	(%r14), %ecx
	leal	-128(%rcx), %edx
	cmpl	$2, %edx
	jae	LBB0_3
## %bb.5:
	movq	_LTC2943_REG_CONTROL_MODE_SCAN@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_3:
	cmpl	$130, %ecx
	jne	LBB0_7
## %bb.4:
	movq	_LTC2942_REG_CONTROL_MODE_SCAN@GOTPCREL(%rip), %rcx
LBB0_6:
	orl	(%rcx), %eax
	movl	%eax, -36(%rbp)
LBB0_7:
	xorl	%ebx, %ebx
	cmpl	%eax, -40(%rbp)
	je	LBB0_11
## %bb.8:
	movq	8(%r14), %rdi
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movl	$1, %ecx
	callq	_ltc294x_write_regs
	testl	%eax, %eax
	jns	LBB0_11
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %ebx
LBB0_10:
	movq	8(%r14), %rdi
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTC294X_REG_CONTROL,4,2        ## @LTC294X_REG_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not read registers from device\n"

	.comm	_LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED,4,2 ## @LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED
	.comm	_LTC2942_REG_CONTROL_MODE_SCAN,4,2 ## @LTC2942_REG_CONTROL_MODE_SCAN
	.comm	_LTC2943_REG_CONTROL_MODE_SCAN,4,2 ## @LTC2943_REG_CONTROL_MODE_SCAN
L_.str.1:                               ## @.str.1
	.asciz	"Could not write register\n"

	.no_dead_strip	_ltc294x_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltc294x_reset
_ltc294x_reset:                         ; @ltc294x_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x22, _LTC294X_REG_CONTROL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _LTC294X_REG_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	w3, #1
	bl	_ltc294x_read_regs
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_LTC294X_REG_CONTROL_PRESCALER_SET
Lloh2:
	adrp	x8, _LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w8, w0
	str	w8, [sp, #8]
	ldr	w9, [x19]
	sub	w10, w9, #128
	cmp	w10, #2
	b.hs	LBB0_4
; %bb.2:
Lloh5:
	adrp	x9, _LTC2943_REG_CONTROL_MODE_SCAN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LTC2943_REG_CONTROL_MODE_SCAN@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	mov	x20, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_4:
	cmp	w9, #130
	b.ne	LBB0_7
; %bb.5:
Lloh9:
	adrp	x9, _LTC2942_REG_CONTROL_MODE_SCAN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LTC2942_REG_CONTROL_MODE_SCAN@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
LBB0_7:
	ldr	w9, [sp, #12]
	cmp	w9, w8
	b.eq	LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	w3, #1
	bl	_ltc294x_write_regs
	tbnz	w0, #31, LBB0_10
LBB0_9:
	mov	w20, #0
	b	LBB0_12
LBB0_10:
	mov	x20, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	ldr	x0, [x19, #8]
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_LTC294X_REG_CONTROL,4,2        ; @LTC294X_REG_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not read registers from device\n"

	.comm	_LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED,4,2 ; @LTC294X_REG_CONTROL_ALCC_CONFIG_DISABLED
	.comm	_LTC2942_REG_CONTROL_MODE_SCAN,4,2 ; @LTC2942_REG_CONTROL_MODE_SCAN
	.comm	_LTC2943_REG_CONTROL_MODE_SCAN,4,2 ; @LTC2943_REG_CONTROL_MODE_SCAN
l_.str.1:                               ; @.str.1
	.asciz	"Could not write register\n"

	.no_dead_strip	_ltc294x_reset
.subsections_via_symbols
