	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edt_ft5x06_register_read
_edt_ft5x06_register_read:              ## @edt_ft5x06_register_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movl	(%rdi), %eax
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_1
## %bb.5:
	movl	%esi, -24(%rbp)
	movq	8(%rbx), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-32(%rbp), %r8
	movl	$1, %esi
	movl	$1, %ecx
	callq	_edt_ft5x06_ts_readwrite
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	-32(%rbp), %eax
	jmp	LBB0_9
LBB0_1:
	cmpl	$132, %eax
	jne	LBB0_7
## %bb.2:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpl	$0, 16(%rbx)
	setne	%al
	sete	%cl
	leal	(%rcx,%rcx,8), %ecx
	addl	$243, %ecx
	movl	%ecx, -24(%rbp)
	shll	$6, %eax
	leal	63(%rax), %ecx
	andl	%esi, %ecx
	addl	$64, %eax
	orl	%ecx, %eax
	movl	%eax, -20(%rbp)
	movq	8(%rbx), %rdi
	leaq	-24(%rbp), %rdx
	leaq	-32(%rbp), %r8
	movl	$2, %esi
	movl	$2, %ecx
	callq	_edt_ft5x06_ts_readwrite
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	-20(%rbp), %edx
	xorl	-24(%rbp), %edx
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %ecx
	xorl	%eax, %edx
	cmpl	%ecx, %edx
	je	LBB0_9
## %bb.4:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crc error: 0x%02x expected, got 0x%02x\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_edt_ft5x06_register_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edt_ft5x06_register_read
_edt_ft5x06_register_read:              ; @edt_ft5x06_register_read
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hs	LBB0_2
; %bb.1:
	str	w1, [sp, #16]
	ldr	x0, [x19, #8]
	add	x2, sp, #16
	add	x4, sp, #8
	mov	w1, #1
	mov	w3, #1
	bl	_edt_ft5x06_ts_readwrite
	ldr	w8, [sp, #8]
	cmp	w0, #0
	csel	w0, w8, w0, eq
	b	LBB0_8
LBB0_2:
	cmp	w8, #132
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x19, #16]
	mov	w9, #243
	mov	w10, #252
	cmp	w8, #0
	csel	w8, w10, w9, eq
	mov	w9, #127
	mov	w10, #63
	csel	w9, w10, w9, eq
	and	w9, w9, w1
	mov	w10, #128
	mov	w11, #64
	csel	w10, w11, w10, eq
	orr	w9, w9, w10
	stp	w8, w9, [sp, #16]
	ldr	x0, [x19, #8]
	add	x2, sp, #16
	add	x4, sp, #8
	mov	w1, #2
	mov	w3, #2
	bl	_edt_ft5x06_ts_readwrite
	cbnz	w0, LBB0_8
; %bb.4:
	ldp	w8, w9, [sp, #16]
	eor	w8, w9, w8
	ldp	w0, w3, [sp, #8]
	eor	w2, w8, w0
	cmp	w2, w3
	b.eq	LBB0_8
; %bb.5:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldr	x8, [sp, #24]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crc error: 0x%02x expected, got 0x%02x\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_edt_ft5x06_register_read
.subsections_via_symbols
