	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmi160_set_scale
_bmi160_set_scale:                      ## @bmi160_set_scale
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_bmi160_scale_table@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	%esi, %r9d
	movq	%r9, %r10
	shlq	$4, %r10
	movl	(%r8,%r10), %esi
	testl	%esi, %esi
	jle	LBB0_1
## %bb.4:
	movq	8(%r8,%r10), %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, (%rcx,%rax,8)
	je	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_5
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
LBB0_2:
	cmpl	%esi, %eax
	jne	LBB0_3
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movl	(%rdi), %edi
	movq	_bmi160_regs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r9,4), %esi
	movq	8(%r8,%r10), %rcx
	movl	%eax, %eax
	movl	4(%rcx,%rax,8), %edx
	popq	%rbp
	jmp	_regmap_write                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bmi160_scale_table,8,3         ## @bmi160_scale_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_bmi160_regs,8,3                ## @bmi160_regs
	.no_dead_strip	_bmi160_set_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmi160_set_scale
_bmi160_set_scale:                      ; @bmi160_set_scale
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _bmi160_scale_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bmi160_scale_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	mov	w9, w1
	lsl	x10, x9, #4
	ldr	w11, [x8, x10]
	cmp	w11, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x10, #0
	add	x12, x8, x9, lsl #4
	ldr	x12, [x12, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12]
	cmp	w13, w2
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #1
	add	x12, x12, #8
	cmp	x11, x10
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w10, #0
LBB0_5:
	cmp	w10, w11
	b.ne	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_7:
	ldr	w0, [x0]
Lloh6:
	adrp	x11, _bmi160_regs@GOTPAGE
Lloh7:
	ldr	x11, [x11, _bmi160_regs@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	ldr	w1, [x11, x9, lsl #2]
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	add	x8, x8, w10, uxtw #3
	ldr	w2, [x8, #4]
	b	_regmap_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bmi160_scale_table,8,3         ; @bmi160_scale_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_bmi160_regs,8,3                ; @bmi160_regs
	.no_dead_strip	_bmi160_set_scale
.subsections_via_symbols
