	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elan_i2c_get_baseline_data
_elan_i2c_get_baseline_data:            ## @elan_i2c_get_baseline_data
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_ETP_I2C_MIN_BASELINE_CMD@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ETP_I2C_MAX_BASELINE_CMD@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_elan_i2c_read_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	-36(%rbp), %rdi
	callq	_le16_to_cpup
	movl	%eax, (%r14)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETP_I2C_MAX_BASELINE_CMD,4,2   ## @ETP_I2C_MAX_BASELINE_CMD
	.comm	_ETP_I2C_MIN_BASELINE_CMD,4,2   ## @ETP_I2C_MIN_BASELINE_CMD
	.no_dead_strip	_elan_i2c_get_baseline_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elan_i2c_get_baseline_data
_elan_i2c_get_baseline_data:            ; @elan_i2c_get_baseline_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ETP_I2C_MAX_BASELINE_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETP_I2C_MAX_BASELINE_CMD@GOTPAGEOFF]
	str	x8, [sp, #24]
Lloh5:
	adrp	x8, _ETP_I2C_MIN_BASELINE_CMD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETP_I2C_MIN_BASELINE_CMD@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_elan_i2c_read_cmd
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	add	x0, sp, #12
	bl	_le16_to_cpup
	str	w0, [x19]
LBB0_2:
	ldr	x8, [sp, #24]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ETP_I2C_MAX_BASELINE_CMD,4,2   ; @ETP_I2C_MAX_BASELINE_CMD
	.comm	_ETP_I2C_MIN_BASELINE_CMD,4,2   ; @ETP_I2C_MIN_BASELINE_CMD
	.no_dead_strip	_elan_i2c_get_baseline_data
.subsections_via_symbols
