	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acquire_store
_acquire_store:                         ## @acquire_store
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdi, %r12
	callq	_to_i2c_client
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %rbx
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	callq	_disable_irq
	movl	$0, (%rbx)
	movq	_ETP_ENABLE_CALIBRATE@GOTPCREL(%rip), %rax
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	orl	(%rax), %esi
	movl	%esi, 8(%rbx)
	movq	16(%rbx), %rax
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_10
LBB0_3:
	movl	$250, %edi
	callq	_msleep
	movq	16(%rbx), %rax
	movl	12(%rbx), %edi
	leaq	28(%rbx), %rdx
	movl	$1, %esi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_8
LBB0_5:
	movq	16(%rbx), %rax
	movl	12(%rbx), %edi
	movq	%rbx, %rdx
	addq	$24, %rdx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%eax, %r14d
	callq	_dev_err
	jmp	LBB0_8
LBB0_7:
	movl	$1, (%rbx)
LBB0_8:
	movq	_ETP_ENABLE_CALIBRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	8(%rbx), %esi
	movl	%esi, 8(%rbx)
	movq	16(%rbx), %rax
	movl	12(%rbx), %edi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_err
	testl	%r14d, %r14d
	cmovel	%ebx, %r14d
LBB0_10:
	movl	(%r13), %edi
	callq	_enable_irq
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmovnel	%r14d, %eax
                                        ## kill: def $eax killed $eax killed $rax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETP_ENABLE_CALIBRATE,4,2       ## @ETP_ENABLE_CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to enable calibration mode to get baseline: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to read max baseline form device: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to read min baseline form device: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to disable calibration mode after acquiring baseline: %d\n"

	.no_dead_strip	_acquire_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acquire_store
_acquire_store:                         ; @acquire_store
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x22, x0
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x23, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_mutex_lock_interruptible
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w0, [x20]
	bl	_disable_irq
	str	wzr, [x23]
Lloh0:
	adrp	x25, _ETP_ENABLE_CALIBRATE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ETP_ENABLE_CALIBRATE@GOTPAGEOFF]
	ldr	w8, [x25]
	ldp	w9, w0, [x23, #8]
	orr	w1, w9, w8
	str	w1, [x23, #8]
	ldr	x8, [x23, #16]
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_3
; %bb.2:
	mov	x24, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x24
	bl	_dev_err
	b	LBB0_10
LBB0_3:
	mov	w0, #250
	bl	_msleep
	ldr	x8, [x23, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x23, #12]
	add	x2, x23, #28
	mov	w1, #1
	blr	x8
	cbz	w0, LBB0_5
; %bb.4:
	mov	x24, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	x8, [x23, #16]
	ldr	x8, [x8, #8]
	ldr	w0, [x23, #12]
	add	x2, x23, #24
	mov	w1, #0
	blr	x8
	mov	x24, x0
	cbz	w0, LBB0_12
; %bb.6:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x22
	mov	x2, x24
	bl	_dev_err
LBB0_8:
	ldr	w8, [x25]
	ldp	w9, w0, [x23, #8]
	bic	w1, w9, w8
	str	w1, [x23, #8]
	ldr	x8, [x23, #16]
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_10
; %bb.9:
	mov	x23, x0
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_dev_err
	cmp	w24, #0
	csel	w24, w23, w24, eq
LBB0_10:
	ldr	w0, [x20]
	bl	_enable_irq
	mov	x0, x21
	bl	_mutex_unlock
	cmp	w24, #0
	csel	w0, w19, w24, eq
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	w8, #1
	str	w8, [x23]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ETP_ENABLE_CALIBRATE,4,2       ; @ETP_ENABLE_CALIBRATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to enable calibration mode to get baseline: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to read max baseline form device: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to read min baseline form device: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to disable calibration mode after acquiring baseline: %d\n"

	.no_dead_strip	_acquire_store
.subsections_via_symbols
