	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_event_handler
_mma9553_event_handler:                 ## @mma9553_event_handler
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_iio_priv
	movq	%rax, %rbx
	leaq	16(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	-64(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_mma9553_read_activity_stepcnt
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movq	_IIO_ACTIVITY@GOTPCREL(%rip), %r14
	movl	(%r14), %r12d
	movq	(%rbx), %rdi
	callq	_mma9553_activity_to_mod
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mma9553_get_event
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%r14), %r12d
	movq	-64(%rbp), %rdi
	callq	_mma9553_activity_to_mod
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_mma9553_get_event
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IIO_STEPS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_IIO_NO_MOD@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	_IIO_EV_DIR_NONE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%rbx, %rdi
	callq	_mma9553_get_event
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.2:
	movq	-80(%rbp), %rax
	cmpq	8(%rbx), %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, 8(%rbx)
	movl	(%r12), %edi
	movl	(%r13), %edx
	movl	(%r14), %ecx
	movq	_IIO_EV_TYPE_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_IIO_EVENT_CODE
	addq	$16, %rsp
	movl	20(%rbx), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_iio_push_event
LBB0_4:
	movq	-64(%rbp), %rax
	cmpq	(%rbx), %rax
	je	LBB0_11
## %bb.5:
	movq	%rax, (%rbx)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.6:
	cmpq	$0, 8(%rcx)
	je	LBB0_8
## %bb.7:
	movq	_IIO_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rcx), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_IIO_EVENT_CODE
	addq	$16, %rsp
	movl	20(%rbx), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_iio_push_event
LBB0_8:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.10:
	movq	_IIO_ACTIVITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_IIO_EVENT_CODE
	addq	$16, %rsp
	movl	20(%rbx), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_iio_push_event
LBB0_11:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IIO_ACTIVITY,4,2               ## @IIO_ACTIVITY
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_IIO_STEPS,4,2                  ## @IIO_STEPS
	.comm	_IIO_NO_MOD,4,2                 ## @IIO_NO_MOD
	.comm	_IIO_EV_DIR_NONE,4,2            ## @IIO_EV_DIR_NONE
	.comm	_IIO_EV_TYPE_CHANGE,4,2         ## @IIO_EV_TYPE_CHANGE
	.comm	_IIO_EV_TYPE_THRESH,4,2         ## @IIO_EV_TYPE_THRESH
	.no_dead_strip	_mma9553_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9553_event_handler
_mma9553_event_handler:                 ; @mma9553_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x21, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	mov	x1, sp
	add	x2, sp, #8
	mov	x0, x21
	bl	_mma9553_read_activity_stepcnt
	tbnz	w0, #31, LBB0_11
; %bb.1:
Lloh0:
	adrp	x24, _IIO_ACTIVITY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IIO_ACTIVITY@GOTPAGEOFF]
	ldr	w22, [x24]
	ldr	x0, [x21]
	bl	_mma9553_activity_to_mod
	mov	x2, x0
Lloh2:
	adrp	x26, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh3:
	ldr	x26, [x26, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x21
	mov	x1, x22
	bl	_mma9553_get_event
	mov	x23, x0
	ldr	w22, [x24]
	ldr	x0, [sp]
	bl	_mma9553_activity_to_mod
	mov	x2, x0
Lloh4:
	adrp	x8, _IIO_EV_DIR_RISING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_mma9553_get_event
	mov	x22, x0
Lloh7:
	adrp	x27, _IIO_STEPS@GOTPAGE
Lloh8:
	ldr	x27, [x27, _IIO_STEPS@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh9:
	adrp	x28, _IIO_NO_MOD@GOTPAGE
Lloh10:
	ldr	x28, [x28, _IIO_NO_MOD@GOTPAGEOFF]
	ldr	w2, [x28]
Lloh11:
	adrp	x25, _IIO_EV_DIR_NONE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _IIO_EV_DIR_NONE@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x21
	bl	_mma9553_get_event
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [sp, #8]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	str	x8, [x21, #8]
	ldr	w0, [x27]
	ldr	w2, [x28]
	ldr	w3, [x25]
Lloh13:
	adrp	x8, _IIO_EV_TYPE_CHANGE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_EV_TYPE_CHANGE@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	w1, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_IIO_EVENT_CODE
	mov	x1, x0
	ldr	w2, [x21, #20]
	mov	x0, x20
	bl	_iio_push_event
LBB0_4:
	ldr	x8, [sp]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.5:
	str	x8, [x21]
	cbz	x23, LBB0_8
; %bb.6:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x24]
	ldr	x8, [x23]
	ldr	w2, [x8]
	ldr	w3, [x26]
Lloh16:
	adrp	x8, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
	mov	w1, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_IIO_EVENT_CODE
	mov	x1, x0
	ldr	w2, [x21, #20]
	mov	x0, x20
	bl	_iio_push_event
LBB0_8:
	cbz	x22, LBB0_11
; %bb.9:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x24]
	ldr	x8, [x22]
	ldr	w2, [x8]
Lloh19:
	adrp	x8, _IIO_EV_DIR_RISING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IIO_EV_DIR_RISING@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
Lloh22:
	adrp	x8, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
Lloh24:
	ldr	w4, [x8]
	mov	w1, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_IIO_EVENT_CODE
	mov	x1, x0
	ldr	w2, [x21, #20]
	mov	x0, x20
	bl	_iio_push_event
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
Lloh25:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IIO_ACTIVITY,4,2               ; @IIO_ACTIVITY
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_IIO_STEPS,4,2                  ; @IIO_STEPS
	.comm	_IIO_NO_MOD,4,2                 ; @IIO_NO_MOD
	.comm	_IIO_EV_DIR_NONE,4,2            ; @IIO_EV_DIR_NONE
	.comm	_IIO_EV_TYPE_CHANGE,4,2         ; @IIO_EV_TYPE_CHANGE
	.comm	_IIO_EV_TYPE_THRESH,4,2         ; @IIO_EV_TYPE_THRESH
	.no_dead_strip	_mma9553_event_handler
.subsections_via_symbols
