	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at91_adc_touch_pos
_at91_adc_touch_pos:                    ## @at91_adc_touch_pos
	.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	%rdi, %r14
	callq	_at91_adc_readl
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_iio_priv_to_dev
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_dev_dbg
LBB0_2:
	movq	_AT91_SAMA5D2_XYZ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	sarl	$16, %esi
	andl	%edx, %esi
	je	LBB0_3
## %bb.4:
	andl	%ebx, %edx
	movq	_AT91_SAMA5D2_MAX_POS_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%edx, %eax
	shll	%cl, %eax
	subl	%edx, %eax
	cltd
	idivl	%esi
	jmp	LBB0_5
LBB0_3:
	movq	%r14, %rdi
	callq	_iio_priv_to_dev
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_dev_err
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pos is 0\n"

	.comm	_AT91_SAMA5D2_XYZ_MASK,4,2      ## @AT91_SAMA5D2_XYZ_MASK
	.comm	_AT91_SAMA5D2_MAX_POS_BITS,4,2  ## @AT91_SAMA5D2_MAX_POS_BITS
L_.str.1:                               ## @.str.1
	.asciz	"scale is 0\n"

	.no_dead_strip	_at91_adc_touch_pos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at91_adc_touch_pos
_at91_adc_touch_pos:                    ; @at91_adc_touch_pos
	.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	x19, x0
	bl	_at91_adc_readl
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_iio_priv_to_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_2:
Lloh2:
	adrp	x8, _AT91_SAMA5D2_XYZ_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AT91_SAMA5D2_XYZ_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x8]
	ands	w8, w9, w20, asr #16
	b.eq	LBB0_4
; %bb.3:
	and	w9, w9, w20
Lloh5:
	adrp	x10, _AT91_SAMA5D2_MAX_POS_BITS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AT91_SAMA5D2_MAX_POS_BITS@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	lsl	w10, w9, w10
	sub	w9, w10, w9
	sdiv	w0, w9, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_iio_priv_to_dev
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pos is 0\n"

	.comm	_AT91_SAMA5D2_XYZ_MASK,4,2      ; @AT91_SAMA5D2_XYZ_MASK
	.comm	_AT91_SAMA5D2_MAX_POS_BITS,4,2  ; @AT91_SAMA5D2_MAX_POS_BITS
l_.str.1:                               ; @.str.1
	.asciz	"scale is 0\n"

	.no_dead_strip	_at91_adc_touch_pos
.subsections_via_symbols
