	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyttsp_soft_reset
_cyttsp_soft_reset:                     ## @cyttsp_soft_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_reinit_completion
	movq	_CY_BL_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	(%r15), %edi
	callq	_enable_irq
	movq	_CY_SOFT_RESET_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ttsp_send_command
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_CY_DELAY_DFLT@GOTPCREL(%rip), %rax
	movq	_CY_DELAY_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	imull	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
LBB0_2:
	movq	_CY_IDLE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	(%r15), %edi
	callq	_disable_irq
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CY_BL_STATE,4,2                ## @CY_BL_STATE
	.comm	_CY_SOFT_RESET_MODE,4,2         ## @CY_SOFT_RESET_MODE
	.comm	_CY_DELAY_DFLT,4,2              ## @CY_DELAY_DFLT
	.comm	_CY_DELAY_MAX,4,2               ## @CY_DELAY_MAX
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CY_IDLE_STATE,4,2              ## @CY_IDLE_STATE
	.no_dead_strip	_cyttsp_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyttsp_soft_reset
_cyttsp_soft_reset:                     ; @cyttsp_soft_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_reinit_completion
Lloh0:
	adrp	x8, _CY_BL_STATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CY_BL_STATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w0, [x19]
	bl	_enable_irq
Lloh3:
	adrp	x8, _CY_SOFT_RESET_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CY_SOFT_RESET_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ttsp_send_command
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _CY_DELAY_DFLT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CY_DELAY_DFLT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _CY_DELAY_MAX@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CY_DELAY_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	mul	w0, w9, w8
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_wait_for_completion_timeout
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w21, wzr, w8, ne
LBB0_2:
Lloh15:
	adrp	x8, _CY_IDLE_STATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CY_IDLE_STATE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	w0, [x19]
	bl	_disable_irq
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CY_BL_STATE,4,2                ; @CY_BL_STATE
	.comm	_CY_SOFT_RESET_MODE,4,2         ; @CY_SOFT_RESET_MODE
	.comm	_CY_DELAY_DFLT,4,2              ; @CY_DELAY_DFLT
	.comm	_CY_DELAY_MAX,4,2               ; @CY_DELAY_MAX
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CY_IDLE_STATE,4,2              ; @CY_IDLE_STATE
	.no_dead_strip	_cyttsp_soft_reset
.subsections_via_symbols
