	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmi160_set_mode
_bmi160_set_mode:                       ## @bmi160_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
	testl	%edx, %edx
	movq	_bmi160_regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %r14d
	leaq	(%rax,%r14,8), %rcx
	leaq	4(%rax,%r14,8), %rax
	cmoveq	%rcx, %rax
	movl	(%rax), %edx
	movl	(%rdi), %edi
	movq	_BMI160_REG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_bmi160_pmu_time@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rdi
	leaq	1000(%rdi), %rsi
	callq	_usleep_range
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bmi160_regs,8,3                ## @bmi160_regs
	.comm	_BMI160_REG_CMD,4,2             ## @BMI160_REG_CMD
	.comm	_bmi160_pmu_time,8,3            ## @bmi160_pmu_time
	.no_dead_strip	_bmi160_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmi160_set_mode
_bmi160_set_mode:                       ; @bmi160_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
Lloh0:
	adrp	x8, _bmi160_regs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bmi160_regs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, w1, uxtw #3
	add	x9, x8, #4
	cmp	w2, #0
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	ldr	w0, [x0]
Lloh3:
	adrp	x8, _BMI160_REG_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMI160_REG_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w8, w19
Lloh6:
	adrp	x9, _bmi160_pmu_time@GOTPAGE
Lloh7:
	ldr	x9, [x9, _bmi160_pmu_time@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x0, [x9, x8, lsl #3]
	add	x1, x0, #1000
	bl	_usleep_range
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bmi160_regs,8,3                ; @bmi160_regs
	.comm	_BMI160_REG_CMD,4,2             ; @BMI160_REG_CMD
	.comm	_bmi160_pmu_time,8,3            ; @bmi160_pmu_time
	.no_dead_strip	_bmi160_set_mode
.subsections_via_symbols
