	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function cyapa_gen3_get_query_data
LCPI0_0:
	.long	3840                            ## 0xf00
	.long	3840                            ## 0xf00
	.space	4
	.space	4
LCPI0_1:
	.space	4
	.long	15                              ## 0xf
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_cyapa_gen3_get_query_data:             ## @cyapa_gen3_get_query_data
	.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, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_QUERY_DATA_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%rbx), %rax
	movq	_CYAPA_STATE_OP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_CYAPA_CMD_GROUP_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_cyapa_read_block
	cmpl	(%r15), %eax
	jne	LBB0_3
## %bb.4:
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	movl	$5, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movb	$45, 5(%rax)
	movq	8(%rbx), %rdi
	addq	$6, %rdi
	leaq	20(%r14), %rsi
	movl	$6, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movb	$45, 12(%rax)
	movq	8(%rbx), %rdi
	addq	$13, %rdi
	movq	%r14, %rsi
	addq	$44, %rsi
	movl	$2, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movb	$0, 15(%rax)
	movl	60(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	64(%r14), %eax
	movl	%eax, 20(%rbx)
	movd	84(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	pshufd	$80, %xmm0, %xmm1               ## xmm1 = xmm0[0,0,1,1]
	pslld	$4, %xmm0
	pslld	$8, %xmm1
	pblendw	$243, %xmm0, %xmm1              ## xmm1 = xmm0[0,1],xmm1[2,3],xmm0[4,5,6,7]
	pand	LCPI0_0(%rip), %xmm1
	movq	_CAPABILITY_BTN_MASK@GOTPCREL(%rip), %rax
	movq	76(%r14), %xmm0                 ## xmm0 = mem[0],zero
	movq	88(%r14), %xmm2                 ## xmm2 = mem[0],zero
	por	%xmm1, %xmm2
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = <u,15,u,u>
	pinsrd	$0, (%rax), %xmm1
	pand	%xmm0, %xmm1
	punpcklqdq	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0]
	movdqu	%xmm1, 24(%rbx)
	movl	96(%r14), %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	andl	$3840, %ecx                     ## imm = 0xF00
	orl	100(%r14), %ecx
	movl	%ecx, 40(%rbx)
	andl	$15, %eax
	shll	$8, %eax
	orl	104(%r14), %eax
	movl	%eax, 44(%rbx)
	movl	$255, 48(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %ecx
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	testl	%ecx, %ecx
	cmovsl	%ecx, %eax
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QUERY_DATA_SIZE,4,2            ## @QUERY_DATA_SIZE
	.comm	_CYAPA_STATE_OP,8,3             ## @CYAPA_STATE_OP
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CYAPA_CMD_GROUP_QUERY,4,2      ## @CYAPA_CMD_GROUP_QUERY
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CAPABILITY_BTN_MASK,4,2        ## @CAPABILITY_BTN_MASK
	.no_dead_strip	_cyapa_gen3_get_query_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function cyapa_gen3_get_query_data
lCPI0_0:
	.long	4                               ; 0x4
	.long	8                               ; 0x8
	.long	4                               ; 0x4
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cyapa_gen3_get_query_data:             ; @cyapa_gen3_get_query_data
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _QUERY_DATA_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _QUERY_DATA_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x8, [x0]
Lloh7:
	adrp	x9, _CYAPA_STATE_OP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CYAPA_STATE_OP@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh10:
	adrp	x8, _CYAPA_CMD_GROUP_QUERY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CYAPA_CMD_GROUP_QUERY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_cyapa_read_block
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	ldr	x0, [x19, #8]
	mov	x1, x20
	mov	w2, #5
	bl	_memcpy
	ldr	x8, [x19, #8]
	mov	w21, #45
	strb	w21, [x8, #5]
	ldr	x8, [x19, #8]
	add	x0, x8, #6
	add	x1, x20, #20
	mov	w2, #6
	bl	_memcpy
	ldr	x8, [x19, #8]
	strb	w21, [x8, #12]
	ldr	x8, [x19, #8]
	add	x0, x8, #13
	add	x1, x20, #44
	mov	w2, #2
	bl	_memcpy
	mov	w0, #0
	ldr	x8, [x19, #8]
	strb	wzr, [x8, #15]
	ldur	d0, [x20, #60]
	str	d0, [x19, #16]
Lloh13:
	adrp	x8, _CAPABILITY_BTN_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAPABILITY_BTN_MASK@GOTPAGEOFF]
	ldur	d0, [x20, #76]
	movi.2s	v1, #15
	ld1.s	{ v1 }[0], [x8]
	and.8b	v0, v0, v1
	add	x8, x20, #96
	ldr	s1, [x20, #84]
	ld1.s	{ v1 }[1], [x8]
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	q2, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #24]
	ldr	d0, [x20, #88]
	zip1.4s	v1, v1, v1
	ushl.4s	v1, v1, v2
	movi.4s	v2, #15, lsl #8
	and.16b	v1, v1, v2
	ldur	d2, [x20, #100]
	mov.d	v0[1], v2[0]
	orr.16b	v0, v1, v0
	str	q0, [x19, #32]
	mov	w8, #255
	str	w8, [x19, #48]
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #32
	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
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_QUERY_DATA_SIZE,4,2            ; @QUERY_DATA_SIZE
	.comm	_CYAPA_STATE_OP,8,3             ; @CYAPA_STATE_OP
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CYAPA_CMD_GROUP_QUERY,4,2      ; @CYAPA_CMD_GROUP_QUERY
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CAPABILITY_BTN_MASK,4,2        ; @CAPABILITY_BTN_MASK
	.no_dead_strip	_cyapa_gen3_get_query_data
.subsections_via_symbols
