	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyttsp_set_operational_mode
_cyttsp_set_operational_mode:           ## @cyttsp_set_operational_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CY_OPERATE_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ttsp_send_command
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_CY_REG_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$8, %edx
	movq	%rbx, %rcx
	callq	_ttsp_read_block_data
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_cyttsp_handshake
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	(%rbx), %rcx
	movq	_CY_ACT_DIST_DFLT@GOTPCREL(%rip), %rdx
	movq	_EIO@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	cmpq	(%rdx), %rcx
	cmovnel	%edi, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CY_OPERATE_MODE,4,2            ## @CY_OPERATE_MODE
	.comm	_CY_REG_BASE,4,2                ## @CY_REG_BASE
	.comm	_CY_ACT_DIST_DFLT,8,3           ## @CY_ACT_DIST_DFLT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_cyttsp_set_operational_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyttsp_set_operational_mode
_cyttsp_set_operational_mode:           ; @cyttsp_set_operational_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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, _CY_OPERATE_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CY_OPERATE_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ttsp_send_command
	cbnz	w0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _CY_REG_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CY_REG_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #8
	mov	x3, x19
	bl	_ttsp_read_block_data
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_cyttsp_handshake
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CY_ACT_DIST_DFLT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CY_ACT_DIST_DFLT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _EIO@GOTPAGE
Lloh10:
	ldr	x10, [x10, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	x8, x9
	csneg	w0, wzr, w10, ne
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CY_OPERATE_MODE,4,2            ; @CY_OPERATE_MODE
	.comm	_CY_REG_BASE,4,2                ; @CY_REG_BASE
	.comm	_CY_ACT_DIST_DFLT,8,3           ; @CY_ACT_DIST_DFLT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_cyttsp_set_operational_mode
.subsections_via_symbols
