	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ads7846_debounce_filter
_ads7846_debounce_filter:               ## @ads7846_debounce_filter
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	subl	(%r14), %edi
	callq	_abs
	cmpq	16(%rbx), %rax
	jle	LBB0_7
## %bb.3:
	movq	(%rbx), %rax
	jmp	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_4:
	movq	$0, 24(%rbx)
	cmpq	32(%rbx), %rax
	jge	LBB0_6
## %bb.5:
	movl	(%r14), %ecx
	movl	%ecx, 8(%rbx)
	incq	%rax
	movq	%rax, (%rbx)
	jmp	LBB0_10
LBB0_6:
	movq	$0, (%rbx)
	movq	_ADS7846_FILTER_IGNORE@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	24(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 24(%rbx)
	cmpq	40(%rbx), %rax
	jge	LBB0_8
## %bb.9:
	incq	(%rbx)
LBB0_10:
	movq	_ADS7846_FILTER_REPEAT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_8:
	movq	$0, (%rbx)
	movq	$0, 24(%rbx)
	movq	_ADS7846_FILTER_OK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADS7846_FILTER_REPEAT,4,2      ## @ADS7846_FILTER_REPEAT
	.comm	_ADS7846_FILTER_IGNORE,4,2      ## @ADS7846_FILTER_IGNORE
	.comm	_ADS7846_FILTER_OK,4,2          ## @ADS7846_FILTER_OK
	.no_dead_strip	_ads7846_debounce_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ads7846_debounce_filter
_ads7846_debounce_filter:               ; @ads7846_debounce_filter
	.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	x20, x2
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x19, #8]
	ldr	w9, [x20]
	sub	w0, w8, w9
	bl	_abs
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.le	LBB0_6
; %bb.2:
	ldr	x8, [x19]
LBB0_3:
	str	xzr, [x19, #24]
	ldr	x9, [x19, #32]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	ldr	w9, [x20]
	str	w9, [x19, #8]
	b	LBB0_8
LBB0_5:
	str	xzr, [x19]
Lloh0:
	adrp	x8, _ADS7846_FILTER_IGNORE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADS7846_FILTER_IGNORE@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19, #24]
	add	x9, x8, #1
	str	x9, [x19, #24]
	ldr	x9, [x19, #40]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.7:
	ldr	x8, [x19]
LBB0_8:
	add	x8, x8, #1
	str	x8, [x19]
Lloh2:
	adrp	x8, _ADS7846_FILTER_REPEAT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ADS7846_FILTER_REPEAT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
	str	xzr, [x19]
	str	xzr, [x19, #24]
Lloh4:
	adrp	x8, _ADS7846_FILTER_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ADS7846_FILTER_OK@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ADS7846_FILTER_REPEAT,4,2      ; @ADS7846_FILTER_REPEAT
	.comm	_ADS7846_FILTER_IGNORE,4,2      ; @ADS7846_FILTER_IGNORE
	.comm	_ADS7846_FILTER_OK,4,2          ; @ADS7846_FILTER_OK
	.no_dead_strip	_ads7846_debounce_filter
.subsections_via_symbols
