	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bma180_set_scale
_bma180_set_scale:                      ## @bma180_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
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 24(%rdi)
	je	LBB0_1
## %bb.11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_1:
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_8
## %bb.2:
	movl	%esi, %r15d
	movq	8(%rax), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r15d, (%rsi,%rcx,4)
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_3
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	16(%rax), %edx
	movl	20(%rax), %esi
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_bma180_set_bits
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_10
LBB0_6:
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set scale\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bma180_set_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bma180_set_scale
_bma180_set_scale:                      ; @bma180_set_scale
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x20, x1
	mov	x3, #0
	ldr	x10, [x8, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x3, lsl #2]
	cmp	w11, w20
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x3, x3, #1
	cmp	x9, x3
	b.ne	LBB0_4
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldp	w2, w1, [x8, #16]
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_bma180_set_bits
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.10:
	ldr	x0, [x19, #8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_11:
	str	w20, [x19]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set scale\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bma180_set_scale
.subsections_via_symbols
