	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sca3000_event_handler
_sca3000_event_handler:                 ## @sca3000_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_iio_get_time_ns
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	8(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_SCA3000_REG_INT_STATUS_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_sca3000_read_data_short
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movl	(%rax), %r15d
	movq	%r13, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.1:
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_sca3000_ring_int_process
	movq	_SCA3000_INT_STATUS_FREE_FALL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_IIO_ACCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_X_AND_Y_AND_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_MAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	callq	_IIO_MOD_EVENT_CODE
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_iio_push_event
LBB0_3:
	movq	_SCA3000_INT_STATUS_Y_TRIGGER@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_IIO_ACCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_MAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	callq	_IIO_MOD_EVENT_CODE
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_iio_push_event
LBB0_5:
	movq	_SCA3000_INT_STATUS_X_TRIGGER@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_IIO_ACCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_MAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	callq	_IIO_MOD_EVENT_CODE
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_iio_push_event
LBB0_7:
	movq	_SCA3000_INT_STATUS_Z_TRIGGER@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_IIO_ACCEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_MAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	callq	_IIO_MOD_EVENT_CODE
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_iio_push_event
LBB0_9:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCA3000_REG_INT_STATUS_ADDR,4,2 ## @SCA3000_REG_INT_STATUS_ADDR
	.comm	_SCA3000_INT_STATUS_FREE_FALL,4,2 ## @SCA3000_INT_STATUS_FREE_FALL
	.comm	_IIO_ACCEL,4,2                  ## @IIO_ACCEL
	.comm	_IIO_MOD_X_AND_Y_AND_Z,4,2      ## @IIO_MOD_X_AND_Y_AND_Z
	.comm	_IIO_EV_TYPE_MAG,4,2            ## @IIO_EV_TYPE_MAG
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_SCA3000_INT_STATUS_Y_TRIGGER,4,2 ## @SCA3000_INT_STATUS_Y_TRIGGER
	.comm	_IIO_MOD_Y,4,2                  ## @IIO_MOD_Y
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_SCA3000_INT_STATUS_X_TRIGGER,4,2 ## @SCA3000_INT_STATUS_X_TRIGGER
	.comm	_IIO_MOD_X,4,2                  ## @IIO_MOD_X
	.comm	_SCA3000_INT_STATUS_Z_TRIGGER,4,2 ## @SCA3000_INT_STATUS_Z_TRIGGER
	.comm	_IIO_MOD_Z,4,2                  ## @IIO_MOD_Z
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sca3000_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sca3000_event_handler
_sca3000_event_handler:                 ; @sca3000_event_handler
	.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	x19, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x21, x0
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x20, x0
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SCA3000_REG_INT_STATUS_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCA3000_REG_INT_STATUS_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #1
	bl	_sca3000_read_data_short
	mov	x23, x0
	ldr	x8, [x21]
	ldr	w21, [x8]
	mov	x0, x22
	bl	_mutex_unlock
	cbnz	w23, LBB0_9
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_sca3000_ring_int_process
Lloh3:
	adrp	x8, _SCA3000_INT_STATUS_FREE_FALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCA3000_INT_STATUS_FREE_FALL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x23, _IIO_ACCEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IIO_ACCEL@GOTPAGEOFF]
Lloh8:
	adrp	x22, _IIO_EV_TYPE_MAG@GOTPAGE
Lloh9:
	ldr	x22, [x22, _IIO_EV_TYPE_MAG@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
Lloh10:
	adrp	x8, _IIO_MOD_X_AND_Y_AND_Z@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IIO_MOD_X_AND_Y_AND_Z@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh12:
	ldr	w2, [x8]
	ldr	w3, [x22]
Lloh13:
	adrp	x8, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	w1, #0
	bl	_IIO_MOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_3:
Lloh16:
	adrp	x8, _SCA3000_INT_STATUS_Y_TRIGGER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SCA3000_INT_STATUS_Y_TRIGGER@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x24, _IIO_EV_DIR_RISING@GOTPAGE
Lloh20:
	ldr	x24, [x24, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x23]
Lloh21:
	adrp	x8, _IIO_MOD_Y@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IIO_MOD_Y@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	w3, [x22]
	ldr	w4, [x24]
	mov	w1, #0
	bl	_IIO_MOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_5:
Lloh24:
	adrp	x8, _SCA3000_INT_STATUS_X_TRIGGER@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SCA3000_INT_STATUS_X_TRIGGER@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x23]
Lloh27:
	adrp	x8, _IIO_MOD_X@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IIO_MOD_X@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	ldr	w3, [x22]
	ldr	w4, [x24]
	mov	w1, #0
	bl	_IIO_MOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_7:
Lloh30:
	adrp	x8, _SCA3000_INT_STATUS_Z_TRIGGER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SCA3000_INT_STATUS_Z_TRIGGER@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x23]
Lloh33:
	adrp	x8, _IIO_MOD_Z@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IIO_MOD_Z@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	ldr	w3, [x22]
	ldr	w4, [x24]
	mov	w1, #0
	bl	_IIO_MOD_EVENT_CODE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_iio_push_event
LBB0_9:
Lloh36:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh37:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_SCA3000_REG_INT_STATUS_ADDR,4,2 ; @SCA3000_REG_INT_STATUS_ADDR
	.comm	_SCA3000_INT_STATUS_FREE_FALL,4,2 ; @SCA3000_INT_STATUS_FREE_FALL
	.comm	_IIO_ACCEL,4,2                  ; @IIO_ACCEL
	.comm	_IIO_MOD_X_AND_Y_AND_Z,4,2      ; @IIO_MOD_X_AND_Y_AND_Z
	.comm	_IIO_EV_TYPE_MAG,4,2            ; @IIO_EV_TYPE_MAG
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_SCA3000_INT_STATUS_Y_TRIGGER,4,2 ; @SCA3000_INT_STATUS_Y_TRIGGER
	.comm	_IIO_MOD_Y,4,2                  ; @IIO_MOD_Y
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_SCA3000_INT_STATUS_X_TRIGGER,4,2 ; @SCA3000_INT_STATUS_X_TRIGGER
	.comm	_IIO_MOD_X,4,2                  ; @IIO_MOD_X
	.comm	_SCA3000_INT_STATUS_Z_TRIGGER,4,2 ; @SCA3000_INT_STATUS_Z_TRIGGER
	.comm	_IIO_MOD_Z,4,2                  ; @IIO_MOD_Z
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sca3000_event_handler
.subsections_via_symbols
