	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_lradc_adc_validate_scan_mask
_mxs_lradc_adc_validate_scan_mask:      ## @mxs_lradc_adc_validate_scan_mask
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	callq	_iio_priv
	movq	(%rax), %rbx
	movq	_LRADC_MAX_TOTAL_CHANS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_bitmap_weight
	movl	%eax, %r14d
	movq	$0, -40(%rbp)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_CHAN_MASK_TOUCHBUTTON@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -40(%rbp)
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movq	(%rbx), %rdx
	movq	_MXS_LRADC_TOUCHSCREEN_4WIRE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_5
## %bb.4:
	movq	_CHAN_MASK_TOUCHSCREEN_4WIRE@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	movq	%rcx, -40(%rbp)
	movq	(%rbx), %rdx
LBB0_5:
	movq	_MXS_LRADC_TOUCHSCREEN_5WIRE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_7
## %bb.6:
	movq	_CHAN_MASK_TOUCHSCREEN_5WIRE@GOTPCREL(%rip), %rdx
	orq	(%rdx), %rcx
	movq	%rcx, -40(%rbp)
	movq	(%rbx), %rdx
LBB0_7:
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leal	2(%rcx), %ebx
	testq	%rdx, %rdx
	cmovel	%ecx, %ebx
	movl	(%r15), %edx
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_bitmap_intersects
	testq	%rax, %rax
	sete	%al
	addl	%r14d, %ebx
	movq	_LRADC_MAX_MAPPED_CHANS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	setle	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LRADC_MAX_TOTAL_CHANS,4,2      ## @LRADC_MAX_TOTAL_CHANS
	.comm	_CHAN_MASK_TOUCHBUTTON,8,3      ## @CHAN_MASK_TOUCHBUTTON
	.comm	_MXS_LRADC_TOUCHSCREEN_4WIRE,8,3 ## @MXS_LRADC_TOUCHSCREEN_4WIRE
	.comm	_CHAN_MASK_TOUCHSCREEN_4WIRE,8,3 ## @CHAN_MASK_TOUCHSCREEN_4WIRE
	.comm	_MXS_LRADC_TOUCHSCREEN_5WIRE,8,3 ## @MXS_LRADC_TOUCHSCREEN_5WIRE
	.comm	_CHAN_MASK_TOUCHSCREEN_5WIRE,8,3 ## @CHAN_MASK_TOUCHSCREEN_5WIRE
	.comm	_LRADC_MAX_MAPPED_CHANS,4,2     ## @LRADC_MAX_MAPPED_CHANS
	.no_dead_strip	_mxs_lradc_adc_validate_scan_mask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_lradc_adc_validate_scan_mask
_mxs_lradc_adc_validate_scan_mask:      ; @mxs_lradc_adc_validate_scan_mask
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_iio_priv
	ldr	x22, [x0]
Lloh0:
	adrp	x21, _LRADC_MAX_TOTAL_CHANS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LRADC_MAX_TOTAL_CHANS@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bitmap_weight
	mov	x20, x0
	str	xzr, [sp, #8]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x9, _CHAN_MASK_TOUCHBUTTON@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CHAN_MASK_TOUCHBUTTON@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	str	x9, [sp, #8]
	b	LBB0_3
LBB0_2:
	mov	x9, #0
LBB0_3:
	ldr	x10, [x22]
Lloh5:
	adrp	x11, _MXS_LRADC_TOUCHSCREEN_4WIRE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _MXS_LRADC_TOUCHSCREEN_4WIRE@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_5
; %bb.4:
Lloh8:
	adrp	x10, _CHAN_MASK_TOUCHSCREEN_4WIRE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _CHAN_MASK_TOUCHSCREEN_4WIRE@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	orr	x9, x9, x10
	str	x9, [sp, #8]
	ldr	x10, [x22]
LBB0_5:
Lloh11:
	adrp	x11, _MXS_LRADC_TOUCHSCREEN_5WIRE@GOTPAGE
Lloh12:
	ldr	x11, [x11, _MXS_LRADC_TOUCHSCREEN_5WIRE@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x10, _CHAN_MASK_TOUCHSCREEN_5WIRE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CHAN_MASK_TOUCHSCREEN_5WIRE@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	orr	x9, x9, x10
	str	x9, [sp, #8]
	ldr	x10, [x22]
LBB0_7:
	cmp	x8, #0
	cset	w8, ne
	orr	w9, w8, #0x2
	cmp	x10, #0
	csel	w22, w8, w9, eq
	ldr	w2, [x21]
	add	x1, sp, #8
	mov	x0, x19
	bl	_bitmap_intersects
	cmp	x0, #0
	add	w8, w22, w20
Lloh17:
	adrp	x9, _LRADC_MAX_MAPPED_CHANS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _LRADC_MAX_MAPPED_CHANS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ccmp	w8, w9, #0, eq
	cset	w0, le
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_LRADC_MAX_TOTAL_CHANS,4,2      ; @LRADC_MAX_TOTAL_CHANS
	.comm	_CHAN_MASK_TOUCHBUTTON,8,3      ; @CHAN_MASK_TOUCHBUTTON
	.comm	_MXS_LRADC_TOUCHSCREEN_4WIRE,8,3 ; @MXS_LRADC_TOUCHSCREEN_4WIRE
	.comm	_CHAN_MASK_TOUCHSCREEN_4WIRE,8,3 ; @CHAN_MASK_TOUCHSCREEN_4WIRE
	.comm	_MXS_LRADC_TOUCHSCREEN_5WIRE,8,3 ; @MXS_LRADC_TOUCHSCREEN_5WIRE
	.comm	_CHAN_MASK_TOUCHSCREEN_5WIRE,8,3 ; @CHAN_MASK_TOUCHSCREEN_5WIRE
	.comm	_LRADC_MAX_MAPPED_CHANS,4,2     ; @LRADC_MAX_MAPPED_CHANS
	.no_dead_strip	_mxs_lradc_adc_validate_scan_mask
.subsections_via_symbols
