	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_set_config
_mma9553_set_config:                    ## @mma9553_set_config
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	(%rdx), %r15
	movq	%r15, %rdi
	movq	%r8, %rsi
	callq	_mma9553_get_bits
	xorl	%ecx, %ecx
	cmpq	%r14, %rax
	je	LBB0_11
## %bb.1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_mma9553_set_bits
	movq	%rax, %rbx
	movq	(%r13), %rdi
	movq	_MMA9551_APPID_PEDOMETER@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, %rcx
	callq	_mma9551_write_config_word
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	%rbx, (%r12)
	movq	8(%r13), %rdi
	movq	_MMA9553_MASK_CONF_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	$1, %esi
	callq	_mma9553_set_bits
	movq	%rax, -56(%rbp)
	movq	(%r13), %rdi
	movl	(%r15), %esi
	movq	_MMA9553_REG_CONF_CONF_STEPLEN@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movq	%rax, %rcx
	callq	_mma9551_write_config_word
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	%r15, %r14
	movq	_MMA9553_CONFIG_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_MMA9553_DEFAULT_SAMPLE_RATE@GOTPCREL(%rip), %rbx
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_mma9551_sleep
	movq	(%r13), %rdi
	movl	(%r14), %esi
	movq	_MMA9553_REG_CONF_CONF_STEPLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rcx
	callq	_mma9551_read_config_word
	testl	%eax, %eax
	js	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi
	movq	_MMA9553_MASK_CONF_CONFIG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_mma9553_get_bits
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	leal	-1(%r12), %eax
	cmpl	$1, %r12d
	movl	%eax, %r12d
	jg	LBB0_6
LBB0_10:
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_2:
	movl	%eax, %r14d
	movq	(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_err
	movl	%r14d, %ecx
	jmp	LBB0_11
LBB0_4:
	movl	%eax, %ebx
	movq	(%r13), %rdi
	movq	(%r14), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%ebx, %ecx
	jmp	LBB0_11
LBB0_7:
	movl	%eax, %ecx
LBB0_11:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA9551_APPID_PEDOMETER,4,2    ## @MMA9551_APPID_PEDOMETER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error writing config register 0x%x\n"

	.comm	_MMA9553_MASK_CONF_CONFIG,8,3   ## @MMA9553_MASK_CONF_CONFIG
	.comm	_MMA9553_REG_CONF_CONF_STEPLEN,8,3 ## @MMA9553_REG_CONF_CONF_STEPLEN
	.comm	_MMA9553_CONFIG_RETRIES,4,2     ## @MMA9553_CONFIG_RETRIES
	.comm	_MMA9553_DEFAULT_SAMPLE_RATE,4,2 ## @MMA9553_DEFAULT_SAMPLE_RATE
	.no_dead_strip	_mma9553_set_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9553_set_config
_mma9553_set_config:                    ; @mma9553_set_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x24, [x2]
	mov	x0, x24
	mov	x1, x4
	bl	_mma9553_get_bits
	cmp	x0, x23
	b.ne	LBB0_2
LBB0_1:
	mov	w20, #0
	b	LBB0_10
LBB0_2:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x20
	bl	_mma9553_set_bits
	mov	x23, x0
	ldr	x0, [x19]
Lloh0:
	adrp	x24, _MMA9551_APPID_PEDOMETER@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MMA9551_APPID_PEDOMETER@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x2, x21
	mov	x3, x23
	bl	_mma9551_write_config_word
	tbnz	w0, #31, LBB0_7
; %bb.3:
	str	x23, [x22]
	ldr	x0, [x19, #8]
Lloh2:
	adrp	x21, _MMA9553_MASK_CONF_CONFIG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MMA9553_MASK_CONF_CONFIG@GOTPAGEOFF]
	ldr	x2, [x21]
	mov	w1, #1
	bl	_mma9553_set_bits
	mov	x3, x0
	str	x0, [sp, #8]
	ldr	x0, [x19]
	ldr	w1, [x24]
Lloh4:
	adrp	x22, _MMA9553_REG_CONF_CONF_STEPLEN@GOTPAGE
Lloh5:
	ldr	x22, [x22, _MMA9553_REG_CONF_CONF_STEPLEN@GOTPAGEOFF]
	ldr	x2, [x22]
	bl	_mma9551_write_config_word
	tbnz	w0, #31, LBB0_8
; %bb.4:
Lloh6:
	adrp	x8, _MMA9553_CONFIG_RETRIES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MMA9553_CONFIG_RETRIES@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
Lloh9:
	adrp	x25, _MMA9553_DEFAULT_SAMPLE_RATE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _MMA9553_DEFAULT_SAMPLE_RATE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	bl	_mma9551_sleep
	ldr	x0, [x19]
	ldr	w1, [x24]
	ldr	x2, [x22]
	add	x3, sp, #8
	bl	_mma9551_read_config_word
	tbnz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #8]
	ldr	x1, [x21]
	bl	_mma9553_get_bits
	cmp	x0, #0
	ccmp	w23, #1, #4, ne
	sub	w23, w23, #1
	b.gt	LBB0_5
	b	LBB0_1
LBB0_7:
	mov	x20, x0
	ldr	x0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_10
LBB0_8:
	mov	x20, x0
	ldr	x0, [x19]
	ldr	x2, [x22]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_9:
	mov	x20, x0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_APPID_PEDOMETER,4,2    ; @MMA9551_APPID_PEDOMETER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error writing config register 0x%x\n"

	.comm	_MMA9553_MASK_CONF_CONFIG,8,3   ; @MMA9553_MASK_CONF_CONFIG
	.comm	_MMA9553_REG_CONF_CONF_STEPLEN,8,3 ; @MMA9553_REG_CONF_CONF_STEPLEN
	.comm	_MMA9553_CONFIG_RETRIES,4,2     ; @MMA9553_CONFIG_RETRIES
	.comm	_MMA9553_DEFAULT_SAMPLE_RATE,4,2 ; @MMA9553_DEFAULT_SAMPLE_RATE
	.no_dead_strip	_mma9553_set_config
.subsections_via_symbols
