	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmg160_setup_any_motion_interrupt
_bmg160_setup_any_motion_interrupt:     ## @bmg160_setup_any_motion_interrupt
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r14
	movl	4(%r15), %edi
	movq	_BMG160_REG_INT_MAP_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMG160_INT_MAP_0_BIT_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ebx, %ebx
	movl	%edx, %ecx
	cmovel	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	4(%r15), %edi
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.3:
	movq	_BMG160_REG_SLOPE_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	4(%r15), %edi
	movq	_BMG160_REG_MOTION_INTR@GOTPCREL(%rip), %rax
	movq	_BMG160_INT_MOTION_X@GOTPCREL(%rip), %rcx
	movq	_BMG160_INT_MOTION_Y@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_BMG160_INT_MOTION_Z@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	cmpl	$0, 8(%r15)
	jne	LBB0_10
## %bb.8:
	movl	4(%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
	js	LBB0_9
LBB0_10:
	movl	4(%r15), %edi
	movq	_BMG160_REG_INT_EN_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BMG160_DATA_ENABLE_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_12
LBB0_1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_14
LBB0_11:
	movq	_BMG160_REG_INT_EN_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
LBB0_12:
	callq	_regmap_write
	movl	%eax, %r12d
	xorl	%eax, %eax
	testl	%r12d, %r12d
	jns	LBB0_15
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_4:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_14
LBB0_6:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_9:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
LBB0_14:
	movq	%r14, %rdi
	callq	_dev_err
	movl	%r12d, %eax
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMG160_REG_INT_MAP_0,4,2       ## @BMG160_REG_INT_MAP_0
	.comm	_BMG160_INT_MAP_0_BIT_ANY,4,2   ## @BMG160_INT_MAP_0_BIT_ANY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error updating bits reg_int_map0\n"

	.comm	_BMG160_REG_SLOPE_THRES,4,2     ## @BMG160_REG_SLOPE_THRES
L_.str.1:                               ## @.str.1
	.asciz	"Error writing reg_slope_thres\n"

	.comm	_BMG160_REG_MOTION_INTR,4,2     ## @BMG160_REG_MOTION_INTR
	.comm	_BMG160_INT_MOTION_X,4,2        ## @BMG160_INT_MOTION_X
	.comm	_BMG160_INT_MOTION_Y,4,2        ## @BMG160_INT_MOTION_Y
	.comm	_BMG160_INT_MOTION_Z,4,2        ## @BMG160_INT_MOTION_Z
L_.str.2:                               ## @.str.2
	.asciz	"Error writing reg_motion_intr\n"

	.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.3:                               ## @.str.3
	.asciz	"Error writing reg_rst_latch\n"

	.comm	_BMG160_REG_INT_EN_0,4,2        ## @BMG160_REG_INT_EN_0
	.comm	_BMG160_DATA_ENABLE_INT,4,2     ## @BMG160_DATA_ENABLE_INT
L_.str.4:                               ## @.str.4
	.asciz	"Error writing reg_int_en0\n"

	.no_dead_strip	_bmg160_setup_any_motion_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmg160_setup_any_motion_interrupt
_bmg160_setup_any_motion_interrupt:     ; @bmg160_setup_any_motion_interrupt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_regmap_get_device
	mov	x19, x0
	ldr	w0, [x20, #4]
Lloh0:
	adrp	x8, _BMG160_REG_INT_MAP_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMG160_REG_INT_MAP_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BMG160_INT_MAP_0_BIT_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMG160_INT_MAP_0_BIT_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	cmp	w22, #0
	csel	w3, wzr, w2, eq
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	w0, [x20, #4]
	cbz	w22, LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _BMG160_REG_SLOPE_THRES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BMG160_REG_SLOPE_THRES@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x20]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_11
; %bb.3:
	ldr	w0, [x20, #4]
Lloh9:
	adrp	x8, _BMG160_REG_MOTION_INTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BMG160_REG_MOTION_INTR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _BMG160_INT_MOTION_X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BMG160_INT_MOTION_X@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _BMG160_INT_MOTION_Y@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BMG160_INT_MOTION_Y@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _BMG160_INT_MOTION_Z@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BMG160_INT_MOTION_Z@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_regmap_write
	tbnz	w0, #31, LBB0_13
; %bb.4:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_6
; %bb.5:
	ldr	w0, [x20, #4]
Lloh21:
	adrp	x8, _BMG160_REG_INT_RST_LATCH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BMG160_REG_INT_RST_LATCH@GOTPAGEOFF]
Lloh23:
	adrp	x9, _BMG160_INT_MODE_LATCH_INT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _BMG160_INT_MODE_LATCH_INT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	ldr	w8, [x9]
Lloh27:
	adrp	x9, _BMG160_INT_MODE_LATCH_RESET@GOTPAGE
Lloh28:
	ldr	x9, [x9, _BMG160_INT_MODE_LATCH_RESET@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_regmap_write
	tbnz	w0, #31, LBB0_14
LBB0_6:
	ldr	w0, [x20, #4]
Lloh30:
	adrp	x8, _BMG160_REG_INT_EN_0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _BMG160_REG_INT_EN_0@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _BMG160_DATA_ENABLE_INT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _BMG160_DATA_ENABLE_INT@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	b	LBB0_9
LBB0_7:
	mov	x21, x0
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_8:
Lloh38:
	adrp	x8, _BMG160_REG_INT_EN_0@GOTPAGE
Lloh39:
	ldr	x8, [x8, _BMG160_REG_INT_EN_0@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	w2, #0
LBB0_9:
	bl	_regmap_write
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
; %bb.10:
	mov	w21, #0
	b	LBB0_16
LBB0_11:
	mov	x21, x0
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh43:
	adrp	x1, l_.str.4@PAGE
Lloh44:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_13:
	mov	x21, x0
Lloh45:
	adrp	x1, l_.str.2@PAGE
Lloh46:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	x21, x0
Lloh47:
	adrp	x1, l_.str.3@PAGE
Lloh48:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_15:
	mov	x0, x19
	bl	_dev_err
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_BMG160_REG_INT_MAP_0,4,2       ; @BMG160_REG_INT_MAP_0
	.comm	_BMG160_INT_MAP_0_BIT_ANY,4,2   ; @BMG160_INT_MAP_0_BIT_ANY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error updating bits reg_int_map0\n"

	.comm	_BMG160_REG_SLOPE_THRES,4,2     ; @BMG160_REG_SLOPE_THRES
l_.str.1:                               ; @.str.1
	.asciz	"Error writing reg_slope_thres\n"

	.comm	_BMG160_REG_MOTION_INTR,4,2     ; @BMG160_REG_MOTION_INTR
	.comm	_BMG160_INT_MOTION_X,4,2        ; @BMG160_INT_MOTION_X
	.comm	_BMG160_INT_MOTION_Y,4,2        ; @BMG160_INT_MOTION_Y
	.comm	_BMG160_INT_MOTION_Z,4,2        ; @BMG160_INT_MOTION_Z
l_.str.2:                               ; @.str.2
	.asciz	"Error writing reg_motion_intr\n"

	.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.3:                               ; @.str.3
	.asciz	"Error writing reg_rst_latch\n"

	.comm	_BMG160_REG_INT_EN_0,4,2        ; @BMG160_REG_INT_EN_0
	.comm	_BMG160_DATA_ENABLE_INT,4,2     ; @BMG160_DATA_ENABLE_INT
l_.str.4:                               ; @.str.4
	.asciz	"Error writing reg_int_en0\n"

	.no_dead_strip	_bmg160_setup_any_motion_interrupt
.subsections_via_symbols
