	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmg160_event_handler
_bmg160_event_handler:                  ## @bmg160_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, %rbx
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movl	(%r15), %edi
	movq	_BMG160_REG_INT_STATUS_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-44(%rbp), %eax
	testb	$8, %al
	jne	LBB0_3
## %bb.4:
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_3:
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %r12d
	movq	_BMG160_ANY_MOTION_BIT_X@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_IIO_ANGL_VEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_X@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_ROC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	movl	%r12d, %r8d
	callq	_IIO_MOD_EVENT_CODE
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_iio_get_time_ns
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_iio_push_event
	movl	-44(%rbp), %eax
LBB0_7:
	movq	_BMG160_ANY_MOTION_BIT_Y@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_IIO_ANGL_VEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_ROC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	movl	%r12d, %r8d
	callq	_IIO_MOD_EVENT_CODE
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_iio_get_time_ns
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_iio_push_event
	movl	-44(%rbp), %eax
LBB0_9:
	movq	_BMG160_ANY_MOTION_BIT_Z@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:
	movq	_IIO_ANGL_VEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_MOD_Z@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IIO_EV_TYPE_ROC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	movl	%r12d, %r8d
	callq	_IIO_MOD_EVENT_CODE
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_iio_get_time_ns
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_iio_push_event
LBB0_11:
	cmpl	$0, 4(%r15)
	jne	LBB0_14
## %bb.12:
	movl	(%r15), %edi
	movq	_BMG160_REG_INT_RST_LATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMG160_INT_MODE_LATCH_INT@GOTPCREL(%rip), %rax
	movq	_BMG160_INT_MODE_LATCH_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_14:
	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	_BMG160_REG_INT_STATUS_2,4,2    ## @BMG160_REG_INT_STATUS_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error reading reg_int_status2\n"

	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_BMG160_ANY_MOTION_BIT_X,4,2    ## @BMG160_ANY_MOTION_BIT_X
	.comm	_IIO_ANGL_VEL,4,2               ## @IIO_ANGL_VEL
	.comm	_IIO_MOD_X,4,2                  ## @IIO_MOD_X
	.comm	_IIO_EV_TYPE_ROC,4,2            ## @IIO_EV_TYPE_ROC
	.comm	_BMG160_ANY_MOTION_BIT_Y,4,2    ## @BMG160_ANY_MOTION_BIT_Y
	.comm	_IIO_MOD_Y,4,2                  ## @IIO_MOD_Y
	.comm	_BMG160_ANY_MOTION_BIT_Z,4,2    ## @BMG160_ANY_MOTION_BIT_Z
	.comm	_IIO_MOD_Z,4,2                  ## @IIO_MOD_Z
	.comm	_BMG160_REG_INT_RST_LATCH,4,2   ## @BMG160_REG_INT_RST_LATCH
	.comm	_BMG160_INT_MODE_LATCH_INT,4,2  ## @BMG160_INT_MODE_LATCH_INT
	.comm	_BMG160_INT_MODE_LATCH_RESET,4,2 ## @BMG160_INT_MODE_LATCH_RESET
L_.str.1:                               ## @.str.1
	.asciz	"Error writing reg_rst_latch\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_bmg160_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmg160_event_handler
_bmg160_event_handler:                  ; @bmg160_event_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x20, x0
	ldr	w0, [x0]
	bl	_regmap_get_device
	mov	x19, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _BMG160_REG_INT_STATUS_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMG160_REG_INT_STATUS_2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_8
; %bb.1:
Lloh3:
	adrp	x9, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
Lloh5:
	adrp	x10, _IIO_EV_DIR_RISING@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	ldr	w8, [sp, #12]
	tst	w8, #0x8
	csel	x9, x9, x10, eq
	ldr	w22, [x9]
Lloh7:
	adrp	x9, _BMG160_ANY_MOTION_BIT_X@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BMG160_ANY_MOTION_BIT_X@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x25, _IIO_ANGL_VEL@GOTPAGE
Lloh11:
	ldr	x25, [x25, _IIO_ANGL_VEL@GOTPAGEOFF]
Lloh12:
	adrp	x24, _IIO_EV_TYPE_ROC@GOTPAGE
Lloh13:
	ldr	x24, [x24, _IIO_EV_TYPE_ROC@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x25]
Lloh14:
	adrp	x8, _IIO_MOD_X@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IIO_MOD_X@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	w1, #0
	mov	x4, x22
	bl	_IIO_MOD_EVENT_CODE
	mov	x23, x0
	mov	x0, x21
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_iio_push_event
	ldr	w8, [sp, #12]
LBB0_3:
Lloh17:
	adrp	x9, _BMG160_ANY_MOTION_BIT_Y@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BMG160_ANY_MOTION_BIT_Y@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x25]
Lloh20:
	adrp	x8, _IIO_MOD_Y@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IIO_MOD_Y@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	w1, #0
	mov	x4, x22
	bl	_IIO_MOD_EVENT_CODE
	mov	x23, x0
	mov	x0, x21
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_iio_push_event
	ldr	w8, [sp, #12]
LBB0_5:
Lloh23:
	adrp	x9, _BMG160_ANY_MOTION_BIT_Z@GOTPAGE
Lloh24:
	ldr	x9, [x9, _BMG160_ANY_MOTION_BIT_Z@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x25]
Lloh26:
	adrp	x8, _IIO_MOD_Z@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IIO_MOD_Z@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	w1, #0
	mov	x4, x22
	bl	_IIO_MOD_EVENT_CODE
	mov	x22, x0
	mov	x0, x21
	bl	_iio_get_time_ns
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_iio_push_event
LBB0_7:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_11
	b	LBB0_9
LBB0_8:
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_11
LBB0_9:
	ldr	w0, [x20]
Lloh31:
	adrp	x8, _BMG160_REG_INT_RST_LATCH@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BMG160_REG_INT_RST_LATCH@GOTPAGEOFF]
Lloh33:
	adrp	x9, _BMG160_INT_MODE_LATCH_INT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _BMG160_INT_MODE_LATCH_INT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	ldr	w8, [x9]
Lloh37:
	adrp	x9, _BMG160_INT_MODE_LATCH_RESET@GOTPAGE
Lloh38:
	ldr	x9, [x9, _BMG160_INT_MODE_LATCH_RESET@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_regmap_write
	tbz	w0, #31, LBB0_11
; %bb.10:
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_11:
Lloh42:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh43:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_BMG160_REG_INT_STATUS_2,4,2    ; @BMG160_REG_INT_STATUS_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error reading reg_int_status2\n"

	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_BMG160_ANY_MOTION_BIT_X,4,2    ; @BMG160_ANY_MOTION_BIT_X
	.comm	_IIO_ANGL_VEL,4,2               ; @IIO_ANGL_VEL
	.comm	_IIO_MOD_X,4,2                  ; @IIO_MOD_X
	.comm	_IIO_EV_TYPE_ROC,4,2            ; @IIO_EV_TYPE_ROC
	.comm	_BMG160_ANY_MOTION_BIT_Y,4,2    ; @BMG160_ANY_MOTION_BIT_Y
	.comm	_IIO_MOD_Y,4,2                  ; @IIO_MOD_Y
	.comm	_BMG160_ANY_MOTION_BIT_Z,4,2    ; @BMG160_ANY_MOTION_BIT_Z
	.comm	_IIO_MOD_Z,4,2                  ; @IIO_MOD_Z
	.comm	_BMG160_REG_INT_RST_LATCH,4,2   ; @BMG160_REG_INT_RST_LATCH
	.comm	_BMG160_INT_MODE_LATCH_INT,4,2  ; @BMG160_INT_MODE_LATCH_INT
	.comm	_BMG160_INT_MODE_LATCH_RESET,4,2 ; @BMG160_INT_MODE_LATCH_RESET
l_.str.1:                               ; @.str.1
	.asciz	"Error writing reg_rst_latch\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_bmg160_event_handler
.subsections_via_symbols
