	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmpe811_adc_common_init       ## -- Begin function stmpe811_adc_common_init
	.p2align	4, 0x90
_stmpe811_adc_common_init:              ## @stmpe811_adc_common_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_STMPE_SAMPLE_TIME
	movl	%eax, %r15d
	movl	4(%r14), %edi
	callq	_STMPE_MOD_12B
	orl	%eax, %r15d
	movl	8(%r14), %edi
	callq	_STMPE_REF_SEL
	orl	%eax, %r15d
	movl	$255, %edi
	callq	_STMPE_SAMPLE_TIME
	movl	%eax, %ebx
	movl	$255, %edi
	callq	_STMPE_MOD_12B
	orl	%eax, %ebx
	movl	$255, %edi
	callq	_STMPE_REF_SEL
	orl	%eax, %ebx
	movq	_STMPE811_REG_ADC_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_stmpe_set_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	_STMPE811_REG_ADC_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$255, %edi
	callq	_STMPE_ADC_FREQ
	movl	%eax, %ebx
	movl	12(%r14), %edi
	callq	_STMPE_ADC_FREQ
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_stmpe_set_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_STMPE811_REG_ADC_CTRL1,4,2     ## @STMPE811_REG_ADC_CTRL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not setup ADC\n"

	.comm	_STMPE811_REG_ADC_CTRL2,4,2     ## @STMPE811_REG_ADC_CTRL2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmpe811_adc_common_init       ; -- Begin function stmpe811_adc_common_init
	.p2align	2
_stmpe811_adc_common_init:              ; @stmpe811_adc_common_init
	.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	w0, [x0]
	bl	_STMPE_SAMPLE_TIME
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_STMPE_MOD_12B
	orr	w20, w0, w20
	ldr	w0, [x19, #8]
	bl	_STMPE_REF_SEL
	orr	w20, w20, w0
	mov	w0, #255
	bl	_STMPE_SAMPLE_TIME
	mov	x21, x0
	mov	w0, #255
	bl	_STMPE_MOD_12B
	orr	w21, w0, w21
	mov	w0, #255
	bl	_STMPE_REF_SEL
	orr	w2, w21, w0
Lloh0:
	adrp	x8, _STMPE811_REG_ADC_CTRL1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STMPE811_REG_ADC_CTRL1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_stmpe_set_bits
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _STMPE811_REG_ADC_CTRL2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STMPE811_REG_ADC_CTRL2@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	w0, #255
	bl	_STMPE_ADC_FREQ
	mov	x21, x0
	ldr	w0, [x19, #12]
	bl	_STMPE_ADC_FREQ
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_stmpe_set_bits
	mov	x20, x0
	cbz	w0, LBB0_3
LBB0_2:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STMPE811_REG_ADC_CTRL1,4,2     ; @STMPE811_REG_ADC_CTRL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not setup ADC\n"

	.comm	_STMPE811_REG_ADC_CTRL2,4,2     ; @STMPE811_REG_ADC_CTRL2
.subsections_via_symbols
