	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmpe_read_voltage
_stmpe_read_voltage:                    ## @stmpe_read_voltage
	.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
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_reinit_completion
	movq	(%r13), %rdi
	movq	%rdi, (%rbx)
	movq	_STMPE_ADC_LAST_NR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jle	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rbx), %r13d
	movq	_STMPE_REG_ADC_CAPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_STMPE_ADC_CH
	movl	%r13d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_stmpe_reg_write
	movq	_STMPE_ADC_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	jle	LBB0_4
## %bb.5:
	movl	8(%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movl	16(%rbx), %r15d
	movq	_STMPE_REG_ADC_INT_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	(%rbx), %rdi
	callq	_STMPE_ADC_CH
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_stmpe_reg_write
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STMPE_ADC_LAST_NR,8,3          ## @STMPE_ADC_LAST_NR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STMPE_REG_ADC_CAPT,4,2         ## @STMPE_REG_ADC_CAPT
	.comm	_STMPE_ADC_TIMEOUT,4,2          ## @STMPE_ADC_TIMEOUT
	.comm	_STMPE_REG_ADC_INT_STA,4,2      ## @STMPE_REG_ADC_INT_STA
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_stmpe_read_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmpe_read_voltage
_stmpe_read_voltage:                    ; @stmpe_read_voltage
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_mutex_lock
	add	x22, x20, #20
	mov	x0, x22
	bl	_reinit_completion
	ldr	x0, [x23]
	str	x0, [x20]
Lloh0:
	adrp	x8, _STMPE_ADC_LAST_NR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STMPE_ADC_LAST_NR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	w23, [x20, #16]
Lloh5:
	adrp	x8, _STMPE_REG_ADC_CAPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STMPE_REG_ADC_CAPT@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	bl	_STMPE_ADC_CH
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_stmpe_reg_write
Lloh8:
	adrp	x8, _STMPE_ADC_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STMPE_ADC_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cmp	x0, #0
	b.le	LBB0_4
; %bb.3:
	ldr	w8, [x20, #8]
	str	w8, [x21]
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_4:
	ldr	w21, [x20, #16]
Lloh11:
	adrp	x8, _STMPE_REG_ADC_INT_STA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STMPE_REG_ADC_INT_STA@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	ldr	x0, [x20]
	bl	_STMPE_ADC_CH
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_stmpe_reg_write
	mov	x0, x19
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_STMPE_ADC_LAST_NR,8,3          ; @STMPE_ADC_LAST_NR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STMPE_REG_ADC_CAPT,4,2         ; @STMPE_REG_ADC_CAPT
	.comm	_STMPE_ADC_TIMEOUT,4,2          ; @STMPE_ADC_TIMEOUT
	.comm	_STMPE_REG_ADC_INT_STA,4,2      ; @STMPE_REG_ADC_INT_STA
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_stmpe_read_voltage
.subsections_via_symbols
