	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edt_ft5x06_register_write
_edt_ft5x06_register_write:             ## @edt_ft5x06_register_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	(%rdi), %eax
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_1
## %bb.3:
	movl	%esi, -32(%rbp)
	movl	%edx, -28(%rbp)
	movl	4(%rdi), %edi
	leaq	-32(%rbp), %rdx
	movl	$2, %esi
LBB0_4:
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_edt_ft5x06_ts_readwrite
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-8(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$32, %rsp
	popq	%rbp
	retq
LBB0_1:
	cmpl	$132, %eax
	jne	LBB0_5
## %bb.2:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpl	$0, 8(%rdi)
	setne	%al
	sete	%cl
	leal	(%rcx,%rcx,8), %ecx
	addl	$243, %ecx
	movl	%ecx, -32(%rbp)
	shll	$6, %eax
	orl	$63, %eax
	andl	%esi, %eax
	movl	%eax, -28(%rbp)
	movl	%edx, -24(%rbp)
	xorl	%edx, %ecx
	xorl	%eax, %ecx
	movl	%ecx, -20(%rbp)
	movl	4(%rdi), %edi
	leaq	-32(%rbp), %rdx
	movl	$4, %esi
	jmp	LBB0_4
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_edt_ft5x06_register_write
.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_write
_edt_ft5x06_register_write:             ; @edt_ft5x06_register_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hs	LBB0_5
; %bb.1:
	stp	w1, w2, [sp, #8]
	ldr	w0, [x0, #4]
	add	x2, sp, #8
	mov	w1, #2
LBB0_2:
	mov	w3, #0
	mov	x4, #0
	bl	_edt_ft5x06_ts_readwrite
LBB0_3:
	ldur	x8, [x29, #-8]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	cmp	w8, #132
	b.ne	LBB0_7
; %bb.6:
	mov	w8, #243
	mov	w9, #252
	ldp	w0, w10, [x0, #4]
	cmp	w10, #0
	csel	w8, w9, w8, eq
	mov	w9, #127
	mov	w10, #63
	csel	w9, w10, w9, eq
	and	w9, w9, w1
	stp	w8, w9, [sp, #8]
	eor	w8, w8, w2
	eor	w8, w8, w9
	stp	w2, w8, [sp, #16]
	add	x2, sp, #8
	mov	w1, #4
	b	LBB0_2
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_edt_ft5x06_register_write
.subsections_via_symbols
