	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyttsp_power_on
_cyttsp_power_on:                       ## @cyttsp_power_on
	.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
	callq	_cyttsp_soft_reset
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%rbx, %rdi
	callq	_cyttsp_load_bl_regs
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movl	4(%rbx), %edi
	callq	_GET_BOOTLOADERMODE
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	4(%rbx), %edi
	callq	_IS_VALID_APP
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_cyttsp_exit_bl_mode
	testl	%eax, %eax
	jne	LBB0_13
LBB0_5:
	movl	8(%rbx), %edi
	callq	_GET_HSTMODE
	movq	_CY_OPERATE_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movl	4(%rbx), %edi
	callq	_IS_OPERATIONAL_ERR
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	callq	_cyttsp_set_sysinfo_mode
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	%rbx, %rdi
	callq	_cyttsp_set_sysinfo_regs
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	callq	_cyttsp_set_operational_mode
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	%rbx, %rdi
	callq	_cyttsp_act_dist_setup
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	_CY_ACTIVE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CY_OPERATE_MODE,8,3            ## @CY_OPERATE_MODE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CY_ACTIVE_STATE,4,2            ## @CY_ACTIVE_STATE
	.no_dead_strip	_cyttsp_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyttsp_power_on
_cyttsp_power_on:                       ; @cyttsp_power_on
	.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
	bl	_cyttsp_soft_reset
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_cyttsp_load_bl_regs
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_GET_BOOTLOADERMODE
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_IS_VALID_APP
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_cyttsp_exit_bl_mode
	cbnz	w0, LBB0_8
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_GET_HSTMODE
Lloh0:
	adrp	x8, _CY_OPERATE_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CY_OPERATE_MODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
	bl	_IS_OPERATIONAL_ERR
	cbz	x0, LBB0_9
LBB0_7:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	bl	_cyttsp_set_sysinfo_mode
	cbnz	w0, LBB0_8
; %bb.10:
	mov	x0, x19
	bl	_cyttsp_set_sysinfo_regs
	cbnz	w0, LBB0_8
; %bb.11:
	mov	x0, x19
	bl	_cyttsp_set_operational_mode
	cbnz	w0, LBB0_8
; %bb.12:
	mov	x0, x19
	bl	_cyttsp_act_dist_setup
	cbnz	w0, LBB0_8
; %bb.13:
Lloh6:
	adrp	x8, _CY_ACTIVE_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CY_ACTIVE_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CY_OPERATE_MODE,8,3            ; @CY_OPERATE_MODE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CY_ACTIVE_STATE,4,2            ; @CY_ACTIVE_STATE
	.no_dead_strip	_cyttsp_power_on
.subsections_via_symbols
