	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads7846_report_state
_ads7846_report_state:                  ## @ads7846_report_state
	.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, %r12
	movq	48(%rdi), %r15
	movl	(%rdi), %eax
	cmpl	$7845, %eax                     ## imm = 0x1EA5
	jne	LBB0_4
## %bb.1:
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	movl	(%rax), %r13d
	movl	(%rcx), %r14d
	movq	_MAX_12BIT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	(%rax), %r14d
	cmovel	%ebx, %r14d
	movq	%r12, %rdi
	callq	_get_pendown_state
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	4(%r12), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
LBB0_3:
	movq	16(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_dev_vdbg
	jmp	LBB0_9
LBB0_4:
	movl	(%r15), %r14d
	movq	_MAX_12BIT@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %r14d
	movl	4(%r15), %r13d
	cmovel	%ebx, %r14d
	cmpl	$7843, %eax                     ## imm = 0x1EA3
	jne	LBB0_6
## %bb.5:
	movl	4(%r12), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	jmp	LBB0_9
LBB0_6:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movl	8(%r15), %ecx
	movl	12(%r15), %r13d
	testl	%r14d, %r14d
	setne	%al
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %r13d
	imull	%r14d, %r13d
	imull	8(%r12), %r13d
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
	addl	$2047, %ebx                     ## imm = 0x7FF
	shrl	$12, %ebx
LBB0_8:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_9:
	movq	16(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_18
## %bb.10:
	cmpl	4(%r12), %ebx
	jbe	LBB0_11
LBB0_18:
	movq	16(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_vdbg                       ## TAILCALL
LBB0_11:
	movq	40(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_udelay
	movq	%r12, %rdi
	callq	_get_pendown_state
	testq	%rax, %rax
	je	LBB0_17
LBB0_13:
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.14:
	movl	%r13d, %r15d
	movq	32(%r12), %r13
	cmpl	$0, 12(%r12)
	jne	LBB0_16
## %bb.15:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_input_report_key
	movl	$1, 12(%r12)
	movq	16(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_vdbg
LBB0_16:
	leaq	24(%r12), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	_touchscreen_report_pos
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	subl	%ebx, %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	%r13, %rdi
	callq	_input_sync
	movq	16(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_vdbg                       ## TAILCALL
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_12BIT,4,2                  ## @MAX_12BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x/y: %d/%d, PD %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"ignored %d pressure %d\n"

	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
L_.str.2:                               ## @.str.2
	.asciz	"DOWN\n"

	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
L_.str.3:                               ## @.str.3
	.asciz	"%4d/%4d/%4d\n"

	.no_dead_strip	_ads7846_report_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads7846_report_state
_ads7846_report_state:                  ; @ads7846_report_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	x22, [x0, #48]
	ldr	w8, [x0]
	mov	w9, #7845
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	ldp	x9, x8, [x22, #24]
	ldr	w20, [x9]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MAX_12BIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_12BIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w21, wzr, w8, eq
	mov	x0, x19
	bl	_get_pendown_state
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w23, w8, #1
	b	LBB0_8
LBB0_3:
Lloh3:
	adrp	x9, _MAX_12BIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_12BIT@GOTPAGEOFF]
	ldp	w10, w20, [x22]
Lloh5:
	ldr	w9, [x9]
	cmp	w10, w9
	csel	w21, wzr, w10, eq
	mov	w9, #7843
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w23, w8, #1
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_17
	b	LBB0_9
LBB0_5:
	ldp	w23, w24, [x22, #8]
	cmp	w21, #0
	ccmp	w23, #0, #4, ne
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_16
; %bb.6:
	sub	w8, w24, w23
	mul	w8, w21, w8
	ldr	w9, [x19, #8]
	mul	w8, w8, w9
	udiv	w8, w8, w23
	add	w8, w8, #2047
	lsr	w23, w8, #12
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_17
	b	LBB0_9
LBB0_7:
	mov	w23, #0
LBB0_8:
	ldr	x0, [x19, #16]
	stp	x20, x23, [sp, #8]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_17
LBB0_9:
	ldr	w9, [x19, #4]
	cmp	w23, w9
	b.hi	LBB0_17
; %bb.10:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_udelay
	mov	x0, x19
	bl	_get_pendown_state
	cbz	x0, LBB0_19
LBB0_12:
	cbz	w23, LBB0_19
; %bb.13:
	ldr	x22, [x19, #32]
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_15
; %bb.14:
Lloh8:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w24, #1
	mov	x0, x22
	mov	w2, #1
	bl	_input_report_key
	str	w24, [x19, #12]
	ldr	x0, [x19, #16]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_vdbg
LBB0_15:
	add	x1, x19, #24
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	bl	_touchscreen_report_pos
Lloh13:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	sub	w2, w8, w23
	mov	x0, x22
	bl	_input_report_abs
	mov	x0, x22
	bl	_input_sync
	ldr	x0, [x19, #16]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	stp	x20, x23, [sp, #8]
	str	x21, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_16:
	mov	w23, #0
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_9
LBB0_17:
	ldr	x0, [x19, #16]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	stp	x8, x23, [sp]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_18:
	bl	_dev_vdbg
LBB0_19:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_12BIT,4,2                  ; @MAX_12BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x/y: %d/%d, PD %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"ignored %d pressure %d\n"

	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
l_.str.2:                               ; @.str.2
	.asciz	"DOWN\n"

	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
l_.str.3:                               ; @.str.3
	.asciz	"%4d/%4d/%4d\n"

	.no_dead_strip	_ads7846_report_state
.subsections_via_symbols
