	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edt_ft5x06_ts_readwrite
_edt_ft5x06_ts_readwrite:               ## @edt_ft5x06_ts_readwrite
	.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	$72, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movl	4(%rdi), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	movq	%rsi, -72(%rbp)
	movq	%rdx, -80(%rbp)
	movl	$1, %ebx
	testq	%rcx, %rcx
	je	LBB0_5
LBB0_4:
	movl	4(%rdi), %eax
	movl	%ebx, %edx
	shlq	$5, %rdx
	movl	%eax, -56(%rbp,%rdx)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp,%rdx)
	movq	%rcx, -72(%rbp,%rdx)
	movq	%r8, -80(%rbp,%rdx)
	incl	%ebx
LBB0_5:
	movl	(%rdi), %edi
	leaq	-80(%rbp), %rsi
	movl	%ebx, %edx
	callq	_i2c_transfer
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	je	LBB0_9
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movl	%ecx, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_edt_ft5x06_ts_readwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edt_ft5x06_ts_readwrite
_edt_ft5x06_ts_readwrite:               ; @edt_ft5x06_ts_readwrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	cbz	x1, LBB0_6
; %bb.1:
	ldr	w8, [x0, #4]
	str	w8, [sp, #32]
	stp	x1, xzr, [sp, #16]
	str	x2, [sp, #8]
	mov	w19, #1
	cbz	x3, LBB0_3
LBB0_2:
	ldr	w8, [x0, #4]
	mov	w9, w19
	add	x10, sp, #8
	add	x9, x10, x9, lsl #5
Lloh3:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
	str	w8, [x9, #24]
Lloh5:
	ldr	x8, [x10]
	stp	x3, x8, [x9, #8]
	str	x4, [x9]
	add	w19, w19, #1
LBB0_3:
	ldr	w0, [x0]
	add	x1, sp, #8
	mov	x2, x19
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_8
; %bb.4:
	cmp	w0, w19
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	w19, #0
	cbnz	x3, LBB0_2
	b	LBB0_3
LBB0_7:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldur	x8, [x29, #-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, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_edt_ft5x06_ts_readwrite
.subsections_via_symbols
