	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmc150_accel_set_mode
_bmc150_accel_set_mode:                 ## @bmc150_accel_set_mode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r12
	xorl	%r15d, %r15d
	movl	$0, %ebx
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.1:
	movq	_bmc150_accel_sleep_value_table@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.2:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$-1, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpl	%r14d, (%rdi,%r12,8)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rdi,%r12,8), %ebx
	jmp	LBB0_5
LBB0_6:
	testl	%ebx, %ebx
	movl	$0, %r15d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	js	LBB0_7
LBB0_8:
	movq	_BMC150_ACCEL_PMU_MODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	_BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r13d, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_BMC150_ACCEL_REG_PMU_LPW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_10
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bmc150_accel_sleep_value_table,8,3 ## @bmc150_accel_sleep_value_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BMC150_ACCEL_PMU_MODE_SHIFT,4,2 ## @BMC150_ACCEL_PMU_MODE_SHIFT
	.comm	_BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT,4,2 ## @BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Mode bits %x\n"

	.comm	_BMC150_ACCEL_REG_PMU_LPW,4,2   ## @BMC150_ACCEL_REG_PMU_LPW
L_.str.1:                               ## @.str.1
	.asciz	"Error writing reg_pmu_lpw\n"

	.no_dead_strip	_bmc150_accel_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmc150_accel_set_mode
_bmc150_accel_set_mode:                 ; @bmc150_accel_set_mode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_regmap_get_device
	mov	x19, x0
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.1:
Lloh0:
	adrp	x24, _bmc150_accel_sleep_value_table@GOTPAGE
Lloh1:
	ldr	x24, [x24, _bmc150_accel_sleep_value_table@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x25, #0
	mov	x26, #0
	mov	w23, #-1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	add	x25, x25, #8
	cmp	x26, w0, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	ldr	w8, [x0, x25]
	cmp	w8, w22
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x0, x25
	ldr	w23, [x8, #4]
	b	LBB0_3
LBB0_6:
	tbz	w23, #31, LBB0_9
LBB0_7:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_8:
	mov	w23, #0
LBB0_9:
Lloh5:
	adrp	x8, _BMC150_ACCEL_PMU_MODE_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BMC150_ACCEL_PMU_MODE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsl	w8, w21, w8
Lloh8:
	adrp	x9, _BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w21, w9, w8
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	ldr	w0, [x20]
Lloh13:
	adrp	x8, _BMC150_ACCEL_REG_PMU_LPW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BMC150_ACCEL_REG_PMU_LPW@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_regmap_write
	tbnz	w0, #31, LBB0_11
; %bb.10:
	mov	w20, #0
	b	LBB0_12
LBB0_11:
	mov	x20, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_bmc150_accel_sleep_value_table,8,3 ; @bmc150_accel_sleep_value_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BMC150_ACCEL_PMU_MODE_SHIFT,4,2 ; @BMC150_ACCEL_PMU_MODE_SHIFT
	.comm	_BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT,4,2 ; @BMC150_ACCEL_PMU_BIT_SLEEP_DUR_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Mode bits %x\n"

	.comm	_BMC150_ACCEL_REG_PMU_LPW,4,2   ; @BMC150_ACCEL_REG_PMU_LPW
l_.str.1:                               ; @.str.1
	.asciz	"Error writing reg_pmu_lpw\n"

	.no_dead_strip	_bmc150_accel_set_mode
.subsections_via_symbols
