	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mms114_setup_regs
_mms114_setup_regs:                     ## @mms114_setup_regs
	.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, %rbx
	callq	_mms114_get_version
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	(%rbx), %rax
	movq	_TYPE_MMS152@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.2:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mms114_set_active
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	16(%rbx), %eax
	movl	20(%rbx), %edx
	shrl	$8, %eax
	andl	$15, %eax
	shrl	$4, %edx
	andl	$240, %edx
	orl	%eax, %edx
	movq	_MMS114_XY_RESOLUTION_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mms114_write_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	movzbl	16(%rbx), %edx
	movq	_MMS114_X_RESOLUTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mms114_write_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movzbl	16(%rbx), %edx
	movq	_MMS114_Y_RESOLUTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mms114_write_reg
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movl	8(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.7:
	movq	_MMS114_CONTACT_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mms114_write_reg
	testl	%eax, %eax
	js	LBB0_10
LBB0_8:
	movl	12(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_11
## %bb.9:
	movq	_MMS114_MOVING_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mms114_write_reg
	testl	%eax, %eax
	jns	LBB0_11
LBB0_10:
	movl	%eax, %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TYPE_MMS152,8,3                ## @TYPE_MMS152
	.comm	_MMS114_XY_RESOLUTION_H,4,2     ## @MMS114_XY_RESOLUTION_H
	.comm	_MMS114_X_RESOLUTION,4,2        ## @MMS114_X_RESOLUTION
	.comm	_MMS114_Y_RESOLUTION,4,2        ## @MMS114_Y_RESOLUTION
	.comm	_MMS114_CONTACT_THRESHOLD,4,2   ## @MMS114_CONTACT_THRESHOLD
	.comm	_MMS114_MOVING_THRESHOLD,4,2    ## @MMS114_MOVING_THRESHOLD
	.no_dead_strip	_mms114_setup_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mms114_setup_regs
_mms114_setup_regs:                     ; @mms114_setup_regs
	.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	_mms114_get_version
	tbnz	w0, #31, LBB0_11
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TYPE_MMS152@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TYPE_MMS152@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_11
LBB0_3:
	mov	x0, x19
	mov	w1, #1
	bl	_mms114_set_active
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldp	w8, w9, [x19, #16]
	lsr	w9, w9, #4
	and	w2, w9, #0xf0
	bfxil	w2, w8, #8, #4
Lloh3:
	adrp	x8, _MMS114_XY_RESOLUTION_H@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMS114_XY_RESOLUTION_H@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mms114_write_reg
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldrb	w2, [x19, #16]
Lloh6:
	adrp	x8, _MMS114_X_RESOLUTION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMS114_X_RESOLUTION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mms114_write_reg
	tbnz	w0, #31, LBB0_11
; %bb.6:
	ldrb	w2, [x19, #16]
Lloh9:
	adrp	x8, _MMS114_Y_RESOLUTION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMS114_Y_RESOLUTION@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mms114_write_reg
	tbnz	w0, #31, LBB0_11
; %bb.7:
	ldr	w2, [x19, #8]
	cbz	w2, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _MMS114_CONTACT_THRESHOLD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMS114_CONTACT_THRESHOLD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mms114_write_reg
	tbnz	w0, #31, LBB0_11
LBB0_9:
	ldr	w2, [x19, #12]
	cbz	w2, LBB0_2
; %bb.10:
Lloh15:
	adrp	x8, _MMS114_MOVING_THRESHOLD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MMS114_MOVING_THRESHOLD@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mms114_write_reg
	tbz	w0, #31, LBB0_2
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TYPE_MMS152,8,3                ; @TYPE_MMS152
	.comm	_MMS114_XY_RESOLUTION_H,4,2     ; @MMS114_XY_RESOLUTION_H
	.comm	_MMS114_X_RESOLUTION,4,2        ; @MMS114_X_RESOLUTION
	.comm	_MMS114_Y_RESOLUTION,4,2        ; @MMS114_Y_RESOLUTION
	.comm	_MMS114_CONTACT_THRESHOLD,4,2   ; @MMS114_CONTACT_THRESHOLD
	.comm	_MMS114_MOVING_THRESHOLD,4,2    ; @MMS114_MOVING_THRESHOLD
	.no_dead_strip	_mms114_setup_regs
.subsections_via_symbols
