	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mma8452_reset
_mma8452_reset:                         ## @mma8452_reset
	.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, %r12
	movq	_MMA8452_CTRL_REG2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MMA8452_CTRL_REG2_RST@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	$10, %ebx
	movq	_EIO@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	(%r13), %ecx
	addl	%eax, %ecx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, (%r15)
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMA8452_CTRL_REG2,4,2          ## @MMA8452_CTRL_REG2
	.comm	_MMA8452_CTRL_REG2_RST,4,2      ## @MMA8452_CTRL_REG2_RST
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_mma8452_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mma8452_reset
_mma8452_reset:                         ; @mma8452_reset
	.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
Lloh0:
	adrp	x20, _MMA8452_CTRL_REG2@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MMA8452_CTRL_REG2@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _MMA8452_CTRL_REG2_RST@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MMA8452_CTRL_REG2_RST@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	w22, #10
Lloh4:
	adrp	x23, _EIO@GOTPAGE
Lloh5:
	ldr	x23, [x23, _EIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w1, [x20]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	ldr	w8, [x23]
	cmn	w0, w8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w0, #31, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_2
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MMA8452_CTRL_REG2,4,2          ; @MMA8452_CTRL_REG2
	.comm	_MMA8452_CTRL_REG2_RST,4,2      ; @MMA8452_CTRL_REG2_RST
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_mma8452_reset
.subsections_via_symbols
