	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function auo_pixcir_collect_data
_auo_pixcir_collect_data:               ## @auo_pixcir_collect_data
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	movq	8(%rdi), %r14
	movq	_AUO_PIXCIR_REG_X1_LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %rcx
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_i2c_smbus_read_i2c_block_data
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movq	_AUO_PIXCIR_REG_TOUCHAREA_X1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rcx
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_i2c_smbus_read_i2c_block_data
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_AUO_PIXCIR_REPORT_POINTS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.5:
	leaq	-68(%rbp), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movq	$0, (%rbx)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	-96(%rbp,%r13,8), %edi
	movl	-92(%rbp,%r13,8), %esi
	callq	_max
	movl	%eax, 16(%rbx)
	movl	-96(%rbp,%r13,8), %edi
	movl	-92(%rbp,%r13,8), %esi
	callq	_min
	movl	%eax, 12(%rbx)
	movl	-96(%rbp,%r13,8), %eax
	xorl	%ecx, %ecx
	cmpl	-92(%rbp,%r13,8), %eax
	setg	%cl
	movl	%ecx, 8(%rbx)
	incq	%r13
	movq	_AUO_PIXCIR_REPORT_POINTS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %r15
	addq	$20, %rbx
	cmpq	%rax, %r13
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-8(%r15), %edx
	shll	$8, %edx
	orl	-12(%r15), %edx
	movl	%edx, (%rbx)
	movl	(%r15), %ecx
	shll	$8, %ecx
	orl	-4(%r15), %ecx
	movl	%ecx, 4(%rbx)
	cmpl	(%r12), %edx
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	4(%r12), %ecx
	jg	LBB0_8
	jmp	LBB0_9
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_13:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AUO_PIXCIR_REG_X1_LSB,4,2      ## @AUO_PIXCIR_REG_X1_LSB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read coordinate, %d\n"

	.comm	_AUO_PIXCIR_REG_TOUCHAREA_X1,4,2 ## @AUO_PIXCIR_REG_TOUCHAREA_X1
L_.str.1:                               ## @.str.1
	.asciz	"could not read touch area, %d\n"

	.comm	_AUO_PIXCIR_REPORT_POINTS,4,2   ## @AUO_PIXCIR_REPORT_POINTS
L_.str.2:                               ## @.str.2
	.asciz	"coordinates (%d,%d) invalid\n"

	.no_dead_strip	_auo_pixcir_collect_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function auo_pixcir_collect_data
_auo_pixcir_collect_data:               ; @auo_pixcir_collect_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldp	x22, x19, [x0]
Lloh3:
	adrp	x8, _AUO_PIXCIR_REG_X1_LSB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AUO_PIXCIR_REG_X1_LSB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x3, sp, #24
	mov	x0, x19
	mov	w2, #8
	bl	_i2c_smbus_read_i2c_block_data
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh6:
	adrp	x8, _AUO_PIXCIR_REG_TOUCHAREA_X1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AUO_PIXCIR_REG_TOUCHAREA_X1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_i2c_smbus_read_i2c_block_data
	tbnz	w0, #31, LBB0_10
; %bb.2:
Lloh9:
	adrp	x23, _AUO_PIXCIR_REPORT_POINTS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _AUO_PIXCIR_REPORT_POINTS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x24, #0
	add	x8, sp, #8
	add	x25, x8, #4
	add	x8, sp, #24
	add	x26, x8, #8
Lloh11:
	adrp	x21, l_.str.2@PAGE
Lloh12:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_dev_warn
	str	xzr, [x20]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldp	w0, w1, [x25, #-4]
	bl	_max
	str	w0, [x20, #16]
	ldp	w0, w1, [x25, #-4]
	bl	_min
	ldp	w8, w9, [x25, #-4]
	cmp	w8, w9
	cset	w8, gt
	stp	w8, w0, [x20, #8]
	add	x24, x24, #1
	ldrsw	x8, [x23]
	add	x25, x25, #8
	add	x26, x26, #16
	add	x20, x20, #20
	cmp	x24, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w8, [x26, #-8]
	orr	w2, w9, w8, lsl #8
	ldp	w9, w8, [x26]
	orr	w3, w9, w8, lsl #8
	stp	w2, w3, [x20]
	ldr	w8, [x22]
	cmp	w2, w8
	b.gt	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22, #4]
	cmp	w3, w8
	b.gt	LBB0_4
	b	LBB0_5
LBB0_8:
	mov	w21, #0
	b	LBB0_12
LBB0_9:
	mov	x21, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	mov	x21, x0
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_12:
	ldr	x8, [sp, #56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AUO_PIXCIR_REG_X1_LSB,4,2      ; @AUO_PIXCIR_REG_X1_LSB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read coordinate, %d\n"

	.comm	_AUO_PIXCIR_REG_TOUCHAREA_X1,4,2 ; @AUO_PIXCIR_REG_TOUCHAREA_X1
l_.str.1:                               ; @.str.1
	.asciz	"could not read touch area, %d\n"

	.comm	_AUO_PIXCIR_REPORT_POINTS,4,2   ; @AUO_PIXCIR_REPORT_POINTS
l_.str.2:                               ; @.str.2
	.asciz	"coordinates (%d,%d) invalid\n"

	.no_dead_strip	_auo_pixcir_collect_data
.subsections_via_symbols
