	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads7846_rx
_ads7846_rx:                            ## @ads7846_rx
	.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, %r15
	movq	56(%rdi), %r14
	movl	(%r14), %r12d
	movl	4(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_MAX_12BIT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpl	(%rax), %r12d
	cmovel	%r13d, %r12d
	cmpl	$7843, (%rdi)                   ## imm = 0x1EA3
	jne	LBB0_2
## %bb.1:
	movl	4(%r15), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	jmp	LBB0_4
LBB0_2:
	movl	8(%r14), %ecx
	movl	12(%r14), %ebx
	testl	%r12d, %r12d
	setne	%al
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %ebx
	imull	%r12d, %ebx
	imull	8(%r15), %ebx
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r13d
	addl	$2047, %r13d                    ## imm = 0x7FF
	shrl	$12, %r13d
LBB0_4:
	cmpq	$0, 16(%r14)
	jne	LBB0_14
## %bb.5:
	cmpl	4(%r15), %r13d
	ja	LBB0_14
## %bb.6:
	movq	48(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_udelay
	movq	%r15, %rdi
	callq	_get_pendown_state
	testl	%eax, %eax
	je	LBB0_14
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.9:
	movq	40(%r15), %rbx
	cmpl	$0, 12(%r15)
	jne	LBB0_11
## %bb.10:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_input_report_key
	movl	$1, 12(%r15)
LBB0_11:
	cmpq	$0, 32(%r15)
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_13
## %bb.12:
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_swap
LBB0_13:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_input_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_input_report_abs
	movq	%rbx, %rdi
	callq	_input_sync
LBB0_14:
	addq	$16, %r15
	movq	_TS_POLL_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_ktime_set
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hrtimer_start                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_12BIT,4,2                  ## @MAX_12BIT
	.comm	_TS_POLL_PERIOD,4,2             ## @TS_POLL_PERIOD
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.no_dead_strip	_ads7846_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads7846_rx
_ads7846_rx:                            ; @ads7846_rx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, [x0, #56]
	ldp	w8, w20, [x23]
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
	ldr	w8, [x0]
	mov	w9, #7843
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w22, w8, #1
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_14
	b	LBB0_5
LBB0_2:
	ldp	w22, w24, [x23, #8]
	cmp	w21, #0
	ccmp	w22, #0, #4, ne
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_4
; %bb.3:
	sub	w8, w24, w22
	mul	w8, w21, w8
	ldr	w9, [x19, #8]
	mul	w8, w8, w9
	udiv	w8, w8, w22
	add	w8, w8, #2047
	lsr	w22, w8, #12
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_14
	b	LBB0_5
LBB0_4:
	mov	w22, #0
	ldr	x8, [x23, #16]
	cbnz	x8, LBB0_14
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.hi	LBB0_14
; %bb.6:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_udelay
	mov	x0, x19
	bl	_get_pendown_state
	cbz	w0, LBB0_14
LBB0_8:
	cbz	w22, LBB0_14
; %bb.9:
	ldr	x23, [x19, #40]
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_11
; %bb.10:
Lloh3:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w24, #1
	mov	x0, x23
	mov	w2, #1
	bl	_input_report_key
	str	w24, [x19, #12]
LBB0_11:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x21
	mov	x1, x20
	bl	_swap
LBB0_13:
Lloh6:
	adrp	x8, _ABS_X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x21
	bl	_input_report_abs
Lloh9:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x20
	bl	_input_report_abs
Lloh12:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x22
	bl	_input_report_abs
	mov	x0, x23
	bl	_input_sync
LBB0_14:
	add	x19, x19, #16
Lloh15:
	adrp	x8, _TS_POLL_PERIOD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TS_POLL_PERIOD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_ktime_set
	mov	x1, x0
Lloh18:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_hrtimer_start
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_12BIT,4,2                  ; @MAX_12BIT
	.comm	_TS_POLL_PERIOD,4,2             ; @TS_POLL_PERIOD
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.no_dead_strip	_ads7846_rx
.subsections_via_symbols
