	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxt_process_messages
_mxt_process_messages:                  ## @mxt_process_messages
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %r12d
	testl	%r12d, %r12d
	jle	LBB0_2
## %bb.1:
	cmpl	4(%r14), %r12d
	jle	LBB0_3
LBB0_2:
	movl	$1, %r12d
LBB0_3:
	leal	1(%r12), %esi
	movq	%r14, %rdi
	callq	_mxt_read_and_process_messages
	movq	_IRQ_NONE@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movl	%eax, %ebx
	cmpl	%r12d, %eax
	jbe	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_mxt_read_and_process_messages
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	%eax, %ebx
	cmpl	$2, %eax
	jb	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	8(%r14), %ebx
	jl	LBB0_5
LBB0_8:
	movl	%ebx, (%r14)
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %r15
	cmpl	$0, 12(%r14)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_mxt_input_sync
	movl	$0, 12(%r14)
LBB0_10:
	movl	(%r15), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mxt_process_messages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxt_process_messages
_mxt_process_messages:                  ; @mxt_process_messages
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w21, [x0]
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w21, w8
	b.le	LBB0_3
LBB0_2:
	mov	w21, #1
LBB0_3:
	add	w1, w21, #1
	mov	x0, x19
	bl	_mxt_read_and_process_messages
	tbnz	w0, #31, LBB0_12
; %bb.4:
	mov	x20, x0
	cmp	w0, w21
	b.ls	LBB0_9
; %bb.5:
Lloh0:
	adrp	x21, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IRQ_NONE@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #2
	bl	_mxt_read_and_process_messages
	tbnz	w0, #31, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w0, w20
	cmp	w0, #2
	b.lo	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19, #8]
	cmp	w20, w8
	b.lt	LBB0_6
LBB0_9:
	str	w20, [x19]
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_mxt_input_sync
	str	wzr, [x19, #12]
LBB0_11:
Lloh2:
	adrp	x21, _IRQ_HANDLED@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh4:
	adrp	x21, _IRQ_NONE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _IRQ_NONE@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x21]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mxt_process_messages
.subsections_via_symbols
