	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elants_i2c_query_bc_version
_elants_i2c_query_bc_version:           ## @elants_i2c_query_bc_version
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r15
	movq	_CMD_HEADER_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_E_ELAN_INFO_BC_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, -56(%rbp)
	movq	_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leal	(,%rbx,4), %r13d
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	movq	%r12, %rcx
	movl	%r13d, %r8d
	callq	_elants_i2c_execute_command
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movq	%r12, %r8
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movq	%r12, %rdi
	callq	_elants_i2c_parse_version
	movzbl	%al, %ecx
	sarl	$8, %eax
	movl	%eax, (%r14)
	movl	%ecx, 4(%r14)
LBB0_3:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_HEADER_READ,4,2            ## @CMD_HEADER_READ
	.comm	_E_ELAN_INFO_BC_VER,4,2         ## @E_ELAN_INFO_BC_VER
	.comm	_HEADER_SIZE,4,2                ## @HEADER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read BC version error=%d, buf=%*phC\n"

	.no_dead_strip	_elants_i2c_query_bc_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function elants_i2c_query_bc_version
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_elants_i2c_query_bc_version:           ; @elants_i2c_query_bc_version
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #32
	mov	x19, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x8, _CMD_HEADER_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_HEADER_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _E_ELAN_INFO_BC_VER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _E_ELAN_INFO_BC_VER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-72]
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x29, #-64]
Lloh11:
	adrp	x8, _HEADER_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HEADER_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	lsl	w23, w12, #2
	sub	x1, x29, #72
	mov	x0, x20
	mov	w2, #16
	mov	x3, x22
	mov	x4, x23
	bl	_elants_i2c_execute_command
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	mov	x0, x22
	bl	_elants_i2c_parse_version
	asr	w8, w0, #8
	and	w9, w0, #0xff
	stp	w8, w9, [x19]
LBB0_3:
	mov	sp, x24
	ldur	x8, [x29, #-56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdrp	Lloh9, Lloh11
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_HEADER_READ,4,2            ; @CMD_HEADER_READ
	.comm	_E_ELAN_INFO_BC_VER,4,2         ; @E_ELAN_INFO_BC_VER
	.comm	_HEADER_SIZE,4,2                ; @HEADER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read BC version error=%d, buf=%*phC\n"

	.no_dead_strip	_elants_i2c_query_bc_version
.subsections_via_symbols
