	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aiptek_program_tablet
_aiptek_program_tablet:                 ## @aiptek_program_tablet
	.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
	movl	$24, %esi
	movl	$4, %edx
	callq	_aiptek_command
	testl	%eax, %eax
	js	LBB0_14
## %bb.1:
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movzbl	%al, %eax
	movl	%eax, 28(%rbx)
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.3:
	movl	%eax, 32(%rbx)
	movq	%rbx, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movl	%eax, 36(%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.5:
	movl	24(%rbx), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%eax
	xorl	%edx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.6:
	movl	24(%rbx), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%eax
	xorl	%edx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	%rbx, %rdi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_aiptek_query
	testl	%eax, %eax
	js	LBB0_14
## %bb.7:
	movl	24(%rbx), %edi
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%eax
	xorl	%edx, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_set_abs_params
	movq	16(%rbx), %rax
	movq	_AIPTEK_COORDINATE_ABSOLUTE_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$1, %edx
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	movl	$16, %esi
	xorl	%edx, %edx
LBB0_10:
	callq	_aiptek_command
	testl	%eax, %eax
	js	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	movl	$17, %esi
	movl	$2, %edx
	callq	_aiptek_command
	testl	%eax, %eax
	js	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	movl	$18, %esi
	movl	$255, %edx
	callq	_aiptek_command
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	_AIPTEK_DIAGNOSTIC_NA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	$0, (%rbx)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_AIPTEK_COORDINATE_ABSOLUTE_MODE,8,3 ## @AIPTEK_COORDINATE_ABSOLUTE_MODE
	.comm	_AIPTEK_DIAGNOSTIC_NA,4,2       ## @AIPTEK_DIAGNOSTIC_NA
	.no_dead_strip	_aiptek_program_tablet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aiptek_program_tablet
_aiptek_program_tablet:                 ; @aiptek_program_tablet
	.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, #24
	mov	w2, #4
	bl	_aiptek_command
	tbnz	w0, #31, LBB0_14
; %bb.1:
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.2:
	and	w8, w0, #0xff
	str	w8, [x19, #28]
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.3:
	str	w0, [x19, #32]
	mov	x0, x19
	mov	w1, #4
	mov	w2, #0
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.4:
	str	w0, [x19, #36]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.5:
	ldr	w8, [x19, #24]
Lloh0:
	adrp	x9, _ABS_X@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ABS_X@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	sub	w3, w0, #1
	mov	x0, x8
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.6:
	ldr	w8, [x19, #24]
Lloh3:
	adrp	x9, _ABS_Y@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ABS_Y@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	sub	w3, w0, #1
	mov	x0, x8
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	mov	x0, x19
	mov	w1, #8
	mov	w2, #0
	bl	_aiptek_query
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldr	w8, [x19, #24]
Lloh6:
	adrp	x9, _ABS_PRESSURE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ABS_PRESSURE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	sub	w3, w0, #1
	mov	x0, x8
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_set_abs_params
	ldr	x8, [x19, #16]
Lloh9:
	adrp	x9, _AIPTEK_COORDINATE_ABSOLUTE_MODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AIPTEK_COORDINATE_ABSOLUTE_MODE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	mov	x0, x19
	mov	w1, #16
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	mov	w2, #1
	b	LBB0_10
LBB0_9:
	mov	w2, #0
LBB0_10:
	bl	_aiptek_command
	tbnz	w0, #31, LBB0_14
; %bb.11:
	mov	x0, x19
	mov	w1, #17
	mov	w2, #2
	bl	_aiptek_command
	tbnz	w0, #31, LBB0_14
; %bb.12:
	mov	x0, x19
	mov	w1, #18
	mov	w2, #255
	bl	_aiptek_command
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	w0, #0
Lloh12:
	adrp	x8, _AIPTEK_DIAGNOSTIC_NA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AIPTEK_DIAGNOSTIC_NA@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	str	xzr, [x19]
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_AIPTEK_COORDINATE_ABSOLUTE_MODE,8,3 ; @AIPTEK_COORDINATE_ABSOLUTE_MODE
	.comm	_AIPTEK_DIAGNOSTIC_NA,4,2       ; @AIPTEK_DIAGNOSTIC_NA
	.no_dead_strip	_aiptek_program_tablet
.subsections_via_symbols
