	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmpe_set_altfunc              ## -- Begin function stmpe_set_altfunc
	.p2align	4, 0x90
_stmpe_set_altfunc:                     ## @stmpe_set_altfunc
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -88(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	16(%rdi), %r13
	movq	_STMPE_IDX_GPAFR_U_MSB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	(%r13), %r15d
	movl	8(%rdi), %edi
	imull	%r15d, %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movl	$-1, %r14d
	movl	%r15d, %ecx
	shll	%cl, %r14d
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	cmpq	$0, 8(%r13)
	je	LBB0_1
## %bb.2:
	movl	$8, %eax
	xorl	%edx, %edx
	idivl	%r15d
	movl	%eax, %r15d
	leaq	12(%r12), %rdi
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	callq	_mutex_lock
	movq	_STMPE_BLOCK_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	___stmpe_enable
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	leaq	-80(%rbp), %rcx
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	movl	-92(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	___stmpe_block_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	movq	-112(%rbp), %rax                ## 8-byte Reload
	callq	*8(%rax)
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.5:
	movl	%eax, %r12d
	notl	%r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	___ffs
	movl	%eax, %esi
	cltd
	idivl	%r15d
	movl	%edx, %ecx
	movl	%eax, %edi
	movl	$8, %eax
	xorl	%edx, %edx
	idivl	%r15d
	imull	%eax, %ecx
	movl	%r14d, %eax
	notl	%edi
	shll	%cl, %eax
	addl	%r13d, %edi
	notl	%eax
	movslq	%edi, %rdx
	andl	-80(%rbp,%rdx,4), %eax
	movl	%r12d, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	orl	%eax, %edi
	movl	$-2, %eax
	movl	%edi, -80(%rbp,%rdx,4)
	movl	%esi, %ecx
	roll	%cl, %eax
	andl	%eax, %ebx
	jne	LBB0_6
LBB0_7:
	leaq	-80(%rbp), %rcx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	-84(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	___stmpe_block_write
LBB0_8:
	movl	%eax, %r12d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_mutex_unlock
	jmp	LBB0_9
LBB0_1:
	xorl	%r12d, %r12d
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_STMPE_IDX_GPAFR_U_MSB,8,3      ## @STMPE_IDX_GPAFR_U_MSB
	.comm	_STMPE_BLOCK_GPIO,4,2           ## @STMPE_BLOCK_GPIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stmpe_set_altfunc              ; -- Begin function stmpe_set_altfunc
	.p2align	2
_stmpe_set_altfunc:                     ; @stmpe_set_altfunc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x28, [x0, #16]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _STMPE_IDX_GPAFR_U_MSB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STMPE_IDX_GPAFR_U_MSB@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w22, [x8, x9, lsl #2]
	ldr	w26, [x28]
	ldr	w8, [x0, #8]
	mul	w0, w8, w26
	mov	w27, #8
	mov	w1, #8
	bl	_DIV_ROUND_UP
	ldr	x8, [x28, #8]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x23, x0
	add	x21, x19, #12
	mov	x0, x21
	bl	_mutex_lock
Lloh6:
	adrp	x8, _STMPE_BLOCK_GPIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STMPE_BLOCK_GPIO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	___stmpe_enable
	tbnz	w0, #31, LBB0_7
; %bb.2:
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	___stmpe_block_read
	tbnz	w0, #31, LBB0_7
; %bb.3:
	str	w22, [sp, #4]                   ; 4-byte Folded Spill
	ldr	x8, [x28, #8]
	mov	x0, x19
	mov	x1, x24
	blr	x8
	cbz	w20, LBB0_6
; %bb.4:
	mov	x24, x0
	mov	w8, #-1
	lsl	w8, w8, w26
	mvn	w25, w8
	sdiv	w26, w27, w26
	mov	w8, #8
	add	x27, sp, #8
	mov	w28, #1
	sdiv	w22, w8, w26
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	___ffs
	sdiv	w8, w0, w26
	mvn	w9, w8
	add	w9, w23, w9
	msub	w8, w8, w26, w0
	mul	w8, w22, w8
	lsl	w10, w25, w8
	sbfiz	x9, x9, #2, #32
	ldr	w11, [x27, x9]
	bic	w10, w11, w10
	lsl	w8, w24, w8
	orr	w8, w10, w8
	str	w8, [x27, x9]
	lsl	w8, w28, w0
	bics	w20, w20, w8
	b.ne	LBB0_5
LBB0_6:
	add	x3, sp, #8
	mov	x0, x19
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
	mov	x2, x23
	bl	___stmpe_block_write
LBB0_7:
	mov	x25, x0
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_9
LBB0_8:
	mov	w25, #0
LBB0_9:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x25
	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
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_STMPE_IDX_GPAFR_U_MSB,8,3      ; @STMPE_IDX_GPAFR_U_MSB
	.comm	_STMPE_BLOCK_GPIO,4,2           ; @STMPE_BLOCK_GPIO
.subsections_via_symbols
