	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zet6223_query_device
_zet6223_query_device:                  ## @zet6223_query_device
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_ZET6223_CMD_INFO_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_ZET6223_CMD_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	24(%r15), %rdi
	leaq	-36(%rbp), %rsi
	movl	$4, %edx
	callq	_i2c_master_send
	cmpl	$4, %eax
	jne	LBB0_1
## %bb.3:
	movq	24(%r15), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_i2c_master_recv
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jne	LBB0_4
## %bb.5:
	movl	60(%r14), %edx
	andl	$127, %edx
	movl	%edx, (%r15)
	movq	_ZET6223_MAX_FINGERS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_7
## %bb.6:
	movq	24(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movl	(%rbx), %eax
	movl	%eax, (%r15)
LBB0_7:
	leaq	32(%r14), %rdi
	callq	_get_unaligned_le16
	movq	%rax, 16(%r15)
	addq	$40, %r14
	movq	%r14, %rdi
	callq	_get_unaligned_le16
	movq	%rax, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	movq	24(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	movq	24(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%ebx, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ZET6223_CMD_INFO_LENGTH,4,2    ## @ZET6223_CMD_INFO_LENGTH
	.comm	_ZET6223_CMD_INFO,4,2           ## @ZET6223_CMD_INFO
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"touchpanel info cmd failed: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to retrieve touchpanel info: %d\n"

	.comm	_ZET6223_MAX_FINGERS,4,2        ## @ZET6223_MAX_FINGERS
L_.str.2:                               ## @.str.2
	.asciz	"touchpanel reports %d fingers, limiting to %d\n"

	.no_dead_strip	_zet6223_query_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zet6223_query_device
_zet6223_query_device:                  ; @zet6223_query_device
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _ZET6223_CMD_INFO_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ZET6223_CMD_INFO_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x21, x8, #2
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x7fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh8:
	adrp	x8, _ZET6223_CMD_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ZET6223_CMD_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stur	w8, [x29, #-44]
	ldr	x0, [x0, #24]
	sub	x1, x29, #44
	mov	w2, #4
	bl	_i2c_master_send
	cmp	w0, #4
	b.ne	LBB0_5
; %bb.1:
	ldr	x0, [x19, #24]
	mov	x1, x20
	mov	x2, x21
	bl	_i2c_master_recv
	cmp	x21, w0, sxtw
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x20, #60]
	and	w2, w8, #0x7f
	str	w2, [x19]
Lloh11:
	adrp	x21, _ZET6223_MAX_FINGERS@GOTPAGE
Lloh12:
	ldr	x21, [x21, _ZET6223_MAX_FINGERS@GOTPAGEOFF]
	ldr	w3, [x21]
	cmp	w2, w3
	b.le	LBB0_4
; %bb.3:
	ldr	x0, [x19, #24]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	ldr	w8, [x21]
	str	w8, [x19]
LBB0_4:
	add	x0, x20, #32
	bl	_get_unaligned_le16
	str	x0, [x19, #16]
	add	x0, x20, #40
	bl	_get_unaligned_le16
	mov	w20, #0
	str	x0, [x19, #8]
	b	LBB0_8
LBB0_5:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w20, w0, w8, lt
	ldr	x0, [x19, #24]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w20, w0, w8, lt
	ldr	x0, [x19, #24]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x2, x20
	bl	_dev_err
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ZET6223_CMD_INFO_LENGTH,4,2    ; @ZET6223_CMD_INFO_LENGTH
	.comm	_ZET6223_CMD_INFO,4,2           ; @ZET6223_CMD_INFO
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"touchpanel info cmd failed: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to retrieve touchpanel info: %d\n"

	.comm	_ZET6223_MAX_FINGERS,4,2        ; @ZET6223_MAX_FINGERS
l_.str.2:                               ; @.str.2
	.asciz	"touchpanel reports %d fingers, limiting to %d\n"

	.no_dead_strip	_zet6223_query_device
.subsections_via_symbols
