	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmi160_get_scale
_bmi160_get_scale:                      ## @bmi160_get_scale
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	(%rdi), %edi
	movq	_bmi160_regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %ebx
	movl	(%rax,%rbx,4), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_bmi160_scale_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	shlq	$4, %rbx
	movl	(%rcx,%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	8(%rcx,%rbx), %rcx
	movl	-20(%rbp), %esi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, (%rcx,%rdx,8)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	movl	4(%rcx,%rdx,8), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bmi160_regs,8,3                ## @bmi160_regs
	.comm	_bmi160_scale_table,8,3         ## @bmi160_scale_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bmi160_get_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmi160_get_scale
_bmi160_get_scale:                      ; @bmi160_get_scale
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _bmi160_regs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bmi160_regs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, w1, uxtw #2]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _bmi160_scale_table@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bmi160_scale_table@GOTPAGEOFF]
	mov	w9, w20
Lloh5:
	ldr	x10, [x8]
	lsl	x8, x9, #4
	ldr	w8, [x10, x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	add	x9, x10, x9, lsl #4
	ldr	x9, [x9, #8]
	ldr	w10, [sp, #12]
	add	x9, x9, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x9, #-4]
	cmp	w11, w10
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_3
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
	ldr	w8, [x9]
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_bmi160_regs,8,3                ; @bmi160_regs
	.comm	_bmi160_scale_table,8,3         ; @bmi160_scale_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bmi160_get_scale
.subsections_via_symbols
