	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxt_read_and_process_messages
_mxt_read_and_process_messages:         ## @mxt_read_and_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	%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
	cmpl	%esi, (%rdi)
	jge	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_6
LBB0_2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	movl	16(%rdi), %esi
	movl	4(%rdi), %edx
	imull	%r14d, %edx
	movq	8(%rdi), %rcx
	movq	%r12, %rdi
	callq	___mxt_read_reg
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	jmp	LBB0_6
LBB0_3:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movslq	4(%r15), %rsi
	movslq	%ebx, %rbx
	imulq	%rbx, %rsi
	addq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_mxt_proc_message
	xorl	%ecx, %ecx
	cmpl	$1, %eax
	sete	%cl
	addl	%ecx, %r13d
	incl	%ebx
	cmpl	%ebx, %r14d
	jne	LBB0_5
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read %u messages (%d)\n"

	.no_dead_strip	_mxt_read_and_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_read_and_process_messages
_mxt_read_and_process_messages:         ; @mxt_read_and_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
	ldr	w8, [x0]
	cmp	w8, w1
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #24]
	ldr	w1, [x0, #16]
	ldr	w8, [x0, #4]
	mul	w2, w8, w19
	ldr	x3, [x0, #8]
	mov	x0, x22
	bl	___mxt_read_reg
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	mov	x3, x21
	bl	_dev_err
	b	LBB0_8
LBB0_4:
	cmp	w19, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w21, #0
	mov	w22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20, #4]
	sxtw	x10, w22
	madd	x1, x9, x10, x8
	mov	x0, x20
	bl	_mxt_proc_message
	cmp	w0, #1
	cinc	w21, w21, eq
	add	w22, w22, #1
	cmp	w19, w22
	b.ne	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, 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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read %u messages (%d)\n"

	.no_dead_strip	_mxt_read_and_process_messages
.subsections_via_symbols
