	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_check_is_operational
_cyapa_check_is_operational:            ## @cyapa_check_is_operational
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_cyapa_poll_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_2
## %bb.3:
	cltq
	leaq	l_switch.table.cyapa_check_is_operational(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	leaq	l_switch.table.cyapa_check_is_operational.1(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movq	%rcx, 8(%r14)
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movl	$0, 4(%r14)
	jmp	LBB0_7
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	%r14, %rdi
	callq	_cyapa_is_operational_mode
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	$1, 4(%r14)
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cyapa_gen6_ops,8,3             ## @cyapa_gen6_ops
	.comm	_cyapa_gen5_ops,8,3             ## @cyapa_gen5_ops
	.comm	_cyapa_gen3_ops,8,3             ## @cyapa_gen3_ops
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_cyapa_check_is_operational
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cyapa_check_is_operational
l_switch.table.cyapa_check_is_operational:
	.quad	_cyapa_gen6_ops
	.quad	_cyapa_gen5_ops
	.quad	_cyapa_gen3_ops

	.p2align	3                               ## @switch.table.cyapa_check_is_operational.1
l_switch.table.cyapa_check_is_operational.1:
	.quad	_cyapa_gen6_ops
	.quad	_cyapa_gen5_ops
	.quad	_cyapa_gen3_ops

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_check_is_operational
_cyapa_check_is_operational:            ; @cyapa_check_is_operational
	.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
	mov	w1, #4000
	bl	_cyapa_poll_state
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.2:
	sbfiz	x8, x8, #3, #32
Lloh0:
	adrp	x9, l_switch.table.cyapa_check_is_operational@PAGE
Lloh1:
	add	x9, x9, l_switch.table.cyapa_check_is_operational@PAGEOFF
	ldr	x9, [x9, x8]
Lloh2:
	adrp	x10, l_switch.table.cyapa_check_is_operational.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.cyapa_check_is_operational.1@PAGEOFF
	ldr	x8, [x10, x8]
	str	x9, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_5
LBB0_3:
	str	wzr, [x19, #4]
	b	LBB0_7
LBB0_4:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_cyapa_is_operational_mode
	cbz	x0, LBB0_3
; %bb.6:
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_cyapa_gen6_ops,8,3             ; @cyapa_gen6_ops
	.comm	_cyapa_gen5_ops,8,3             ; @cyapa_gen5_ops
	.comm	_cyapa_gen3_ops,8,3             ; @cyapa_gen3_ops
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_cyapa_check_is_operational
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cyapa_check_is_operational
l_switch.table.cyapa_check_is_operational:
	.quad	_cyapa_gen6_ops
	.quad	_cyapa_gen5_ops
	.quad	_cyapa_gen3_ops

	.p2align	3                               ; @switch.table.cyapa_check_is_operational.1
l_switch.table.cyapa_check_is_operational.1:
	.quad	_cyapa_gen6_ops
	.quad	_cyapa_gen5_ops
	.quad	_cyapa_gen3_ops

.subsections_via_symbols
