	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bma150_set_mode
_bma150_set_mode:                       ## @bma150_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	movq	_BMA150_WAKE_UP_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMA150_WAKE_UP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMA150_WAKE_UP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_bma150_set_reg_bits
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movl	8(%r14), %edi
	movq	_BMA150_SLEEP_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_BMA150_SLEEP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BMA150_SLEEP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rsi
	callq	_bma150_set_reg_bits
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_BMA150_MODE_NORMAL@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$2100, %esi                     ## imm = 0x834
	callq	_usleep_range
LBB0_4:
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMA150_WAKE_UP_POS,4,2         ## @BMA150_WAKE_UP_POS
	.comm	_BMA150_WAKE_UP_MSK,4,2         ## @BMA150_WAKE_UP_MSK
	.comm	_BMA150_WAKE_UP_REG,4,2         ## @BMA150_WAKE_UP_REG
	.comm	_BMA150_SLEEP_POS,4,2           ## @BMA150_SLEEP_POS
	.comm	_BMA150_SLEEP_MSK,4,2           ## @BMA150_SLEEP_MSK
	.comm	_BMA150_SLEEP_REG,4,2           ## @BMA150_SLEEP_REG
	.comm	_BMA150_MODE_NORMAL,8,3         ## @BMA150_MODE_NORMAL
	.no_dead_strip	_bma150_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bma150_set_mode
_bma150_set_mode:                       ; @bma150_set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _BMA150_WAKE_UP_POS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMA150_WAKE_UP_POS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _BMA150_WAKE_UP_MSK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMA150_WAKE_UP_MSK@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _BMA150_WAKE_UP_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BMA150_WAKE_UP_REG@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	bl	_bma150_set_reg_bits
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20, #8]
Lloh9:
	adrp	x8, _BMA150_SLEEP_POS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BMA150_SLEEP_POS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _BMA150_SLEEP_MSK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BMA150_SLEEP_MSK@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _BMA150_SLEEP_REG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BMA150_SLEEP_REG@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	x1, x19
	bl	_bma150_set_reg_bits
	cbnz	w0, LBB0_5
; %bb.2:
Lloh18:
	adrp	x8, _BMA150_MODE_NORMAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BMA150_MODE_NORMAL@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #2000
	mov	w1, #2100
	bl	_usleep_range
LBB0_4:
	mov	w0, #0
	str	x19, [x20]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BMA150_WAKE_UP_POS,4,2         ; @BMA150_WAKE_UP_POS
	.comm	_BMA150_WAKE_UP_MSK,4,2         ; @BMA150_WAKE_UP_MSK
	.comm	_BMA150_WAKE_UP_REG,4,2         ; @BMA150_WAKE_UP_REG
	.comm	_BMA150_SLEEP_POS,4,2           ; @BMA150_SLEEP_POS
	.comm	_BMA150_SLEEP_MSK,4,2           ; @BMA150_SLEEP_MSK
	.comm	_BMA150_SLEEP_REG,4,2           ; @BMA150_SLEEP_REG
	.comm	_BMA150_MODE_NORMAL,8,3         ; @BMA150_MODE_NORMAL
	.no_dead_strip	_bma150_set_mode
.subsections_via_symbols
