	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma9553_init
_mma9553_init:                          ## @mma9553_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_mma9551_read_version
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	(%r15), %rdi
	movq	_MMA9551_APPID_PEDOMETER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MMA9553_REG_CONF_SLEEPMIN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	8(%r15), %r14
	movl	$6, %ecx
	movq	%r14, %r8
	callq	_mma9551_read_config_words
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movq	_MMA9553_MAX_BITNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r15)
	movq	%r15, %rdi
	callq	_mma9553_conf_gpio
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	movq	(%r15), %rdi
	movq	_MMA9551_RSC_PED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mma9551_app_reset
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	_MMA9553_DEFAULT_SLEEPMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	_MMA9553_DEFAULT_SLEEPMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	movq	_MMA9553_DEFAULT_SLEEPTHD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	8(%r15), %rdi
	movq	_MMA9553_MASK_CONF_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_mma9553_set_bits
	movq	%rax, 8(%r15)
	movq	_MMA9553_MASK_CONF_ACT_DBCNTM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_mma9553_set_bits
	movq	%rax, 8(%r15)
	movq	(%r15), %rdi
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	$6, %ecx
	movq	%r14, %r8
	callq	_mma9551_write_config_words
	movq	(%r15), %rdi
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mma9551_set_device_state       ## TAILCALL
LBB0_6:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %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
	.comm	_MMA9553_REG_CONF_SLEEPMIN,4,2  ## @MMA9553_REG_CONF_SLEEPMIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read configuration registers\n"

	.comm	_MMA9553_MAX_BITNUM,4,2         ## @MMA9553_MAX_BITNUM
	.comm	_MMA9551_RSC_PED,4,2            ## @MMA9551_RSC_PED
	.comm	_MMA9553_DEFAULT_SLEEPMIN,4,2   ## @MMA9553_DEFAULT_SLEEPMIN
	.comm	_MMA9553_DEFAULT_SLEEPMAX,4,2   ## @MMA9553_DEFAULT_SLEEPMAX
	.comm	_MMA9553_DEFAULT_SLEEPTHD,4,2   ## @MMA9553_DEFAULT_SLEEPTHD
	.comm	_MMA9553_MASK_CONF_CONFIG,4,2   ## @MMA9553_MASK_CONF_CONFIG
	.comm	_MMA9553_MASK_CONF_ACT_DBCNTM,4,2 ## @MMA9553_MASK_CONF_ACT_DBCNTM
L_.str.1:                               ## @.str.1
	.asciz	"failed to write configuration registers\n"

	.no_dead_strip	_mma9553_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma9553_init
_mma9553_init:                          ; @mma9553_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0]
	bl	_mma9551_read_version
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.1:
	mov	x20, x19
	ldr	x0, [x20], #8
Lloh0:
	adrp	x22, _MMA9551_APPID_PEDOMETER@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MMA9551_APPID_PEDOMETER@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x23, _MMA9553_REG_CONF_SLEEPMIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MMA9553_REG_CONF_SLEEPMIN@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w3, #6
	mov	x4, x20
	bl	_mma9551_read_config_words
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh4:
	adrp	x8, _MMA9553_MAX_BITNUM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MMA9553_MAX_BITNUM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	mov	x0, x19
	bl	_mma9553_conf_gpio
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	x0, [x19]
Lloh7:
	adrp	x8, _MMA9551_RSC_PED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMA9551_RSC_PED@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_mma9551_app_reset
	tbnz	w0, #31, LBB0_7
; %bb.4:
Lloh10:
	adrp	x8, _MMA9553_DEFAULT_SLEEPMIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMA9553_DEFAULT_SLEEPMIN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh13:
	adrp	x8, _MMA9553_DEFAULT_SLEEPMAX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMA9553_DEFAULT_SLEEPMAX@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _MMA9553_DEFAULT_SLEEPTHD@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MMA9553_DEFAULT_SLEEPTHD@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	ldr	x0, [x19, #8]
Lloh19:
	adrp	x8, _MMA9553_MASK_CONF_CONFIG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMA9553_MASK_CONF_CONFIG@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_mma9553_set_bits
	str	x0, [x19, #8]
Lloh22:
	adrp	x8, _MMA9553_MASK_CONF_ACT_DBCNTM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MMA9553_MASK_CONF_ACT_DBCNTM@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_mma9553_set_bits
	str	x0, [x19, #8]
	ldr	x0, [x19]
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	w3, #6
	mov	x4, x20
	bl	_mma9551_write_config_words
	mov	x21, x0
	ldr	x0, [x19]
	tbnz	w21, #31, LBB0_8
; %bb.5:
	mov	w1, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mma9551_set_device_state
LBB0_6:
	mov	x21, x0
	ldr	x0, [x19]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:
	mov	x21, x0
	b	LBB0_10
LBB0_8:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	bl	_dev_err
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA9551_APPID_PEDOMETER,4,2    ; @MMA9551_APPID_PEDOMETER
	.comm	_MMA9553_REG_CONF_SLEEPMIN,4,2  ; @MMA9553_REG_CONF_SLEEPMIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read configuration registers\n"

	.comm	_MMA9553_MAX_BITNUM,4,2         ; @MMA9553_MAX_BITNUM
	.comm	_MMA9551_RSC_PED,4,2            ; @MMA9551_RSC_PED
	.comm	_MMA9553_DEFAULT_SLEEPMIN,4,2   ; @MMA9553_DEFAULT_SLEEPMIN
	.comm	_MMA9553_DEFAULT_SLEEPMAX,4,2   ; @MMA9553_DEFAULT_SLEEPMAX
	.comm	_MMA9553_DEFAULT_SLEEPTHD,4,2   ; @MMA9553_DEFAULT_SLEEPTHD
	.comm	_MMA9553_MASK_CONF_CONFIG,4,2   ; @MMA9553_MASK_CONF_CONFIG
	.comm	_MMA9553_MASK_CONF_ACT_DBCNTM,4,2 ; @MMA9553_MASK_CONF_ACT_DBCNTM
l_.str.1:                               ; @.str.1
	.asciz	"failed to write configuration registers\n"

	.no_dead_strip	_mma9553_init
.subsections_via_symbols
