	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wm97xx_acc_pen_down
_wm97xx_acc_pen_down:                   ## @wm97xx_acc_pen_down
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_WM97XX_ADCSEL_PRES@GOTPCREL(%rip), %rax
	movl	$256, %r12d                     ## imm = 0x100
	orl	(%rax), %r12d
	movl	$1, %edi
	callq	_schedule_timeout_uninterruptible
	movq	_tries@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	cmpl	$6, %eax
	jl	LBB0_2
## %bb.1:
	movl	$0, (%rdx)
	movq	_RC_PENUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_2:
	movq	_MODR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_last@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_4
## %bb.3:
	incl	%eax
	movl	%eax, (%rdx)
	movq	_RC_AGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_4:
	movl	%ebx, (%rcx)
	movl	$1, %r15d
	movl	%ebx, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1, %r15d
	cmovnel	%ebx, %r13d
	movq	_pressure@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	cmovnel	%ebx, %r12d
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	callq	_dev_dbg
	movq	_WM97XX_ADCSEL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	andl	%r13d, %ecx
	movq	_WM97XX_ADCSEL_X@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ecx
	andl	%ebx, %ecx
	movq	_WM97XX_ADCSEL_Y@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	andl	%r12d, %eax
	movq	_WM97XX_ADCSEL_PRES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_tries@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	(%r14), %edi
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edx
	andl	$4095, %edx                     ## imm = 0xFFF
	callq	_input_report_abs
	movl	(%r14), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$4095, %ebx                     ## imm = 0xFFF
	movl	%ebx, %edx
	callq	_input_report_abs
	movl	(%r14), %edi
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	andl	$4095, %edx                     ## imm = 0xFFF
	callq	_input_report_abs
	movl	(%r14), %edi
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testl	%r12d, %r12d
	setne	%dl
	callq	_input_report_key
	movl	(%r14), %edi
	callq	_input_sync
	movq	_cinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_sp_idx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	(%rax,%rcx,4), %r15d
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MODR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%r15d
	jmp	LBB0_5
LBB0_10:
	movq	_RC_PENDOWN@GOTPCREL(%rip), %rcx
	movq	_RC_AGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM97XX_ADCSEL_PRES,4,2         ## @WM97XX_ADCSEL_PRES
	.comm	_tries,4,2                      ## @tries
	.comm	_RC_PENUP,4,2                   ## @RC_PENUP
	.comm	_MODR,4,2                       ## @MODR
	.comm	_last,4,2                       ## @last
	.comm	_RC_AGAIN,4,2                   ## @RC_AGAIN
	.comm	_pressure,8,3                   ## @pressure
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Raw coordinates: x=%x, y=%x, p=%x\n"

	.comm	_WM97XX_ADCSEL_MASK,4,2         ## @WM97XX_ADCSEL_MASK
	.comm	_WM97XX_ADCSEL_X,4,2            ## @WM97XX_ADCSEL_X
	.comm	_WM97XX_ADCSEL_Y,4,2            ## @WM97XX_ADCSEL_Y
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_cinfo,8,3                      ## @cinfo
	.comm	_sp_idx,8,3                     ## @sp_idx
	.comm	_RC_PENDOWN,4,2                 ## @RC_PENDOWN
	.no_dead_strip	_wm97xx_acc_pen_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wm97xx_acc_pen_down
_wm97xx_acc_pen_down:                   ; @wm97xx_acc_pen_down
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x24, _WM97XX_ADCSEL_PRES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _WM97XX_ADCSEL_PRES@GOTPAGEOFF]
	ldr	w20, [x24]
	mov	w0, #1
	bl	_schedule_timeout_uninterruptible
Lloh2:
	adrp	x25, _tries@GOTPAGE
Lloh3:
	ldr	x25, [x25, _tries@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #6
	b.lt	LBB0_2
; %bb.1:
	str	wzr, [x25]
Lloh4:
	adrp	x8, _RC_PENUP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RC_PENUP@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_2:
Lloh7:
	adrp	x26, _MODR@GOTPAGE
Lloh8:
	ldr	x26, [x26, _MODR@GOTPAGEOFF]
	ldr	w23, [x26]
Lloh9:
	adrp	x9, _last@GOTPAGE
Lloh10:
	ldr	x9, [x9, _last@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w23, w10
	b.ne	LBB0_4
; %bb.3:
	add	w8, w8, #1
	str	w8, [x25]
Lloh11:
	adrp	x8, _RC_AGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RC_AGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_11
LBB0_4:
	orr	w20, w20, #0x100
	str	w23, [x9]
Lloh14:
	adrp	x21, l_.str@PAGE
Lloh15:
	add	x21, x21, l_.str@PAGEOFF
Lloh16:
	adrp	x27, _WM97XX_ADCSEL_X@GOTPAGE
Lloh17:
	ldr	x27, [x27, _WM97XX_ADCSEL_X@GOTPAGEOFF]
	mov	w28, #1
	mov	x22, x23
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w28, #1
	csel	w22, w22, w23, eq
Lloh18:
	adrp	x8, _pressure@GOTPAGE
Lloh19:
	ldr	x8, [x8, _pressure@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, #0
	csel	w20, w20, w23, eq
	ldr	w0, [x19, #4]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x20
	bl	_dev_dbg
Lloh21:
	adrp	x8, _WM97XX_ADCSEL_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WM97XX_ADCSEL_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	and	w9, w8, w22
	ldr	w10, [x27]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w8, w23
Lloh24:
	adrp	x10, _WM97XX_ADCSEL_Y@GOTPAGE
Lloh25:
	ldr	x10, [x10, _WM97XX_ADCSEL_Y@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w8, w8, w20
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x25]
	ldr	w0, [x19]
Lloh27:
	adrp	x8, _ABS_X@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	and	w2, w22, #0xfff
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh30:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	and	w2, w23, #0xfff
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh33:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	and	w2, w20, #0xfff
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh36:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	cmp	w20, #0
	cset	w2, ne
	bl	_input_report_key
	ldr	w0, [x19]
	bl	_input_sync
Lloh39:
	adrp	x8, _cinfo@GOTPAGE
Lloh40:
	ldr	x8, [x8, _cinfo@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
Lloh42:
	adrp	x9, _sp_idx@GOTPAGE
Lloh43:
	ldr	x9, [x9, _sp_idx@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w28, w8
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w23, [x26]
	add	w28, w28, #1
	b	LBB0_5
LBB0_10:
Lloh45:
	adrp	x8, _RC_PENDOWN@GOTPAGE
Lloh46:
	ldr	x8, [x8, _RC_PENDOWN@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	adrp	x9, _RC_AGAIN@GOTPAGE
Lloh49:
	ldr	x9, [x9, _RC_AGAIN@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	orr	w0, w9, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_WM97XX_ADCSEL_PRES,4,2         ; @WM97XX_ADCSEL_PRES
	.comm	_tries,4,2                      ; @tries
	.comm	_RC_PENUP,4,2                   ; @RC_PENUP
	.comm	_MODR,4,2                       ; @MODR
	.comm	_last,4,2                       ; @last
	.comm	_RC_AGAIN,4,2                   ; @RC_AGAIN
	.comm	_pressure,8,3                   ; @pressure
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Raw coordinates: x=%x, y=%x, p=%x\n"

	.comm	_WM97XX_ADCSEL_MASK,4,2         ; @WM97XX_ADCSEL_MASK
	.comm	_WM97XX_ADCSEL_X,4,2            ; @WM97XX_ADCSEL_X
	.comm	_WM97XX_ADCSEL_Y,4,2            ; @WM97XX_ADCSEL_Y
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_cinfo,8,3                      ; @cinfo
	.comm	_sp_idx,8,3                     ; @sp_idx
	.comm	_RC_PENDOWN,4,2                 ; @RC_PENDOWN
	.no_dead_strip	_wm97xx_acc_pen_down
.subsections_via_symbols
