	.file	"extr_bmg160_core.c_bmg160_setup_any_motion_interrupt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Error updating bits reg_int_map0\n"
	.align 8
.LC1:
	.string	"Error writing reg_slope_thres\n"
	.align 8
.LC2:
	.string	"Error writing reg_motion_intr\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"Error writing reg_rst_latch\n"
.LC4:
	.string	"Error writing reg_int_en0\n"
	.text
	.p2align 4
	.type	bmg160_setup_any_motion_interrupt, @function
bmg160_setup_any_motion_interrupt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	edi, DWORD PTR 4[rdi]
	call	regmap_get_device@PLT
	mov	rbp, rax
	test	r12d, r12d
	je	.L2
	mov	edx, DWORD PTR BMG160_INT_MAP_0_BIT_ANY[rip]
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR BMG160_REG_INT_MAP_0[rip]
	mov	ecx, edx
	call	regmap_update_bits@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L10
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR BMG160_REG_SLOPE_THRES[rip]
	call	regmap_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L16
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR BMG160_REG_MOTION_INTR[rip]
	mov	edx, DWORD PTR BMG160_INT_MOTION_X[rip]
	or	edx, DWORD PTR BMG160_INT_MOTION_Y[rip]
	or	edx, DWORD PTR BMG160_INT_MOTION_Z[rip]
	call	regmap_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L17
	mov	eax, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 4[rbx]
	test	eax, eax
	jne	.L7
	mov	esi, DWORD PTR BMG160_REG_INT_RST_LATCH[rip]
	mov	edx, DWORD PTR BMG160_INT_MODE_LATCH_INT[rip]
	or	edx, DWORD PTR BMG160_INT_MODE_LATCH_RESET[rip]
	call	regmap_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L8
	mov	edi, DWORD PTR 4[rbx]
.L7:
	mov	edx, DWORD PTR BMG160_DATA_ENABLE_INT[rip]
	mov	esi, DWORD PTR BMG160_REG_INT_EN_0[rip]
	call	regmap_write@PLT
	mov	r12d, eax
	test	r12d, r12d
	jns	.L12
.L18:
	mov	rdi, rbp
	lea	rsi, .LC4[rip]
	call	dev_err@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR BMG160_INT_MAP_0_BIT_ANY[rip]
	xor	ecx, ecx
	mov	esi, DWORD PTR BMG160_REG_INT_MAP_0[rip]
	call	regmap_update_bits@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L10
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR BMG160_REG_INT_EN_0[rip]
	xor	edx, edx
	call	regmap_write@PLT
	mov	r12d, eax
	test	r12d, r12d
	js	.L18
.L12:
	xor	r12d, r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	dev_err@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	bmg160_setup_any_motion_interrupt, .-bmg160_setup_any_motion_interrupt
	.comm	BMG160_REG_SLOPE_THRES,4,4
	.comm	BMG160_REG_MOTION_INTR,4,4
	.comm	BMG160_REG_INT_RST_LATCH,4,4
	.comm	BMG160_REG_INT_MAP_0,4,4
	.comm	BMG160_REG_INT_EN_0,4,4
	.comm	BMG160_INT_MOTION_Z,4,4
	.comm	BMG160_INT_MOTION_Y,4,4
	.comm	BMG160_INT_MOTION_X,4,4
	.comm	BMG160_INT_MODE_LATCH_RESET,4,4
	.comm	BMG160_INT_MODE_LATCH_INT,4,4
	.comm	BMG160_INT_MAP_0_BIT_ANY,4,4
	.comm	BMG160_DATA_ENABLE_INT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bmg160_core.c_bmg160_setup_any_motion_interrupt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error updating bits reg_int_map0\012\000"
	.align	2
.LC1:
	.ascii	"Error writing reg_slope_thres\012\000"
	.align	2
.LC2:
	.ascii	"Error writing reg_motion_intr\012\000"
	.align	2
.LC3:
	.ascii	"Error writing reg_rst_latch\012\000"
	.align	2
.LC4:
	.ascii	"Error writing reg_int_en0\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bmg160_setup_any_motion_interrupt, %function
bmg160_setup_any_motion_interrupt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r6, r0
	ldr	r0, [r0, #4]
	bl	regmap_get_device
	ldr	r2, .L23
	ldr	r3, .L23+4
	cmp	r7, #0
	mov	r5, r0
	ldr	r1, [r2]
	ldr	r0, [r6, #4]
	ldr	r3, [r3]
	beq	.L19
	mov	r2, r3
	bl	regmap_update_bits
	subs	r4, r0, #0
	blt	.L10
	ldr	r3, .L23+8
	ldr	r2, [r6]
	ldr	r1, [r3]
	ldr	r0, [r6, #4]
	bl	regmap_write
	subs	r4, r0, #0
	blt	.L20
	ldr	r1, .L23+12
	ldr	r3, .L23+16
	ldr	r2, .L23+20
	ldr	r0, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L23+24
	orr	r3, r3, r0
	ldr	r1, [r1]
	ldr	r0, [r6, #4]
	orr	r2, r3, r2
	bl	regmap_write
	subs	r4, r0, #0
	blt	.L21
	ldmib	r6, {r0, r3}
	cmp	r3, #0
	bne	.L7
	ldr	r2, .L23+28
	ldr	r3, .L23+32
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L23+36
	orr	r2, r1, r2
	ldr	r1, [r3]
	bl	regmap_write
	subs	r4, r0, #0
	blt	.L8
	ldr	r0, [r6, #4]
.L7:
	ldr	r3, .L23+40
	ldr	r2, .L23+44
	ldr	r1, [r3]
	ldr	r2, [r2]
	bl	regmap_write
	mov	r4, r0
	cmp	r4, #0
	movge	r4, #0
	bge	.L1
.L22:
	mov	r0, r5
	ldr	r1, .L23+48
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mov	r2, r3
	mov	r3, r7
	bl	regmap_update_bits
	subs	r4, r0, #0
	blt	.L10
	ldr	r3, .L23+40
	mov	r2, r7
	ldr	r0, [r6, #4]
	ldr	r1, [r3]
	bl	regmap_write
	mov	r4, r0
	cmp	r4, #0
	movge	r4, #0
	blt	.L22
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r5
	ldr	r1, .L23+52
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	mov	r0, r5
	ldr	r1, .L23+56
	bl	dev_err
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	mov	r0, r5
	ldr	r1, .L23+60
	bl	dev_err
	b	.L1
.L8:
	mov	r0, r5
	ldr	r1, .L23+64
	bl	dev_err
	b	.L1
.L24:
	.align	2
.L23:
	.word	BMG160_REG_INT_MAP_0
	.word	BMG160_INT_MAP_0_BIT_ANY
	.word	BMG160_REG_SLOPE_THRES
	.word	BMG160_INT_MOTION_Y
	.word	BMG160_INT_MOTION_X
	.word	BMG160_INT_MOTION_Z
	.word	BMG160_REG_MOTION_INTR
	.word	BMG160_INT_MODE_LATCH_INT
	.word	BMG160_INT_MODE_LATCH_RESET
	.word	BMG160_REG_INT_RST_LATCH
	.word	BMG160_REG_INT_EN_0
	.word	BMG160_DATA_ENABLE_INT
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	bmg160_setup_any_motion_interrupt, .-bmg160_setup_any_motion_interrupt
	.comm	BMG160_REG_SLOPE_THRES,4,4
	.comm	BMG160_REG_MOTION_INTR,4,4
	.comm	BMG160_REG_INT_RST_LATCH,4,4
	.comm	BMG160_REG_INT_MAP_0,4,4
	.comm	BMG160_REG_INT_EN_0,4,4
	.comm	BMG160_INT_MOTION_Z,4,4
	.comm	BMG160_INT_MOTION_Y,4,4
	.comm	BMG160_INT_MOTION_X,4,4
	.comm	BMG160_INT_MODE_LATCH_RESET,4,4
	.comm	BMG160_INT_MODE_LATCH_INT,4,4
	.comm	BMG160_INT_MAP_0_BIT_ANY,4,4
	.comm	BMG160_DATA_ENABLE_INT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
