	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cma3000_poweron
_cma3000_poweron:                       ## @cma3000_poweron
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	32(%rdi), %r15
	movq	_CMARANGE_2G@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_CMA3000_RANGE2G@GOTPCREL(%rip), %r12
	jmp	LBB0_4
LBB0_2:
	movq	_CMARANGE_8G@GOTPCREL(%rip), %rcx
	movq	_CMA3000_RANGE8G@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
LBB0_4:
	movl	8(%r14), %ebx
	addl	%ebx, %ebx
	orl	(%r12), %ebx
	movq	16(%r14), %rax
	orl	(%rax), %ebx
	movq	_CMA3000_MDTHR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_CMA3000_SET
	movq	_CMA3000_MDFFTMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	callq	_CMA3000_SET
	movq	_CMA3000_FFTHR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r15), %edx
	leaq	L_.str.3(%rip), %rcx
	movq	%r14, %rdi
	callq	_CMA3000_SET
	movq	_CMA3000_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rcx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_CMA3000_SET
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	_CMA3000_SETDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMARANGE_2G,8,3                ## @CMARANGE_2G
	.comm	_CMA3000_RANGE2G,4,2            ## @CMA3000_RANGE2G
	.comm	_CMARANGE_8G,8,3                ## @CMARANGE_8G
	.comm	_CMA3000_RANGE8G,4,2            ## @CMA3000_RANGE8G
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid G range specified, assuming 8G\n"

	.comm	_CMA3000_MDTHR,4,2              ## @CMA3000_MDTHR
L_.str.1:                               ## @.str.1
	.asciz	"Motion Detect Threshold"

	.comm	_CMA3000_MDFFTMR,4,2            ## @CMA3000_MDFFTMR
L_.str.2:                               ## @.str.2
	.asciz	"Time register"

	.comm	_CMA3000_FFTHR,4,2              ## @CMA3000_FFTHR
L_.str.3:                               ## @.str.3
	.asciz	"Free fall threshold"

	.comm	_CMA3000_CTRL,4,2               ## @CMA3000_CTRL
L_.str.4:                               ## @.str.4
	.asciz	"Mode setting"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_CMA3000_SETDELAY,4,2           ## @CMA3000_SETDELAY
	.no_dead_strip	_cma3000_poweron
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cma3000_poweron
_cma3000_poweron:                       ; @cma3000_poweron
	.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
	mov	x19, x0
	ldr	x21, [x0, #32]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CMARANGE_2G@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CMARANGE_2G@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CMA3000_RANGE2G@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMA3000_RANGE2G@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x9, _CMARANGE_8G@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CMARANGE_8G@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #24]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
LBB0_4:
Lloh10:
	adrp	x8, _CMA3000_RANGE8G@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMA3000_RANGE8G@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x19, #8]
	ldr	w8, [x8]
	orr	w8, w8, w9, lsl #1
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh12:
	adrp	x8, _CMA3000_MDTHR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CMA3000_MDTHR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x21]
Lloh15:
	adrp	x3, l_.str.1@PAGE
Lloh16:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_CMA3000_SET
Lloh17:
	adrp	x8, _CMA3000_MDFFTMR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CMA3000_MDFFTMR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
Lloh20:
	adrp	x3, l_.str.2@PAGE
Lloh21:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_CMA3000_SET
Lloh22:
	adrp	x8, _CMA3000_FFTHR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CMA3000_FFTHR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [x21, #8]
Lloh25:
	adrp	x3, l_.str.3@PAGE
Lloh26:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_CMA3000_SET
Lloh27:
	adrp	x8, _CMA3000_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CMA3000_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x3, l_.str.4@PAGE
Lloh31:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_CMA3000_SET
	tbnz	w0, #31, LBB0_7
; %bb.6:
Lloh32:
	adrp	x8, _CMA3000_SETDELAY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CMA3000_SETDELAY@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_msleep
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh35:
	adrp	x8, _EIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CMARANGE_2G,8,3                ; @CMARANGE_2G
	.comm	_CMA3000_RANGE2G,4,2            ; @CMA3000_RANGE2G
	.comm	_CMARANGE_8G,8,3                ; @CMARANGE_8G
	.comm	_CMA3000_RANGE8G,4,2            ; @CMA3000_RANGE8G
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid G range specified, assuming 8G\n"

	.comm	_CMA3000_MDTHR,4,2              ; @CMA3000_MDTHR
l_.str.1:                               ; @.str.1
	.asciz	"Motion Detect Threshold"

	.comm	_CMA3000_MDFFTMR,4,2            ; @CMA3000_MDFFTMR
l_.str.2:                               ; @.str.2
	.asciz	"Time register"

	.comm	_CMA3000_FFTHR,4,2              ; @CMA3000_FFTHR
l_.str.3:                               ; @.str.3
	.asciz	"Free fall threshold"

	.comm	_CMA3000_CTRL,4,2               ; @CMA3000_CTRL
l_.str.4:                               ; @.str.4
	.asciz	"Mode setting"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_CMA3000_SETDELAY,4,2           ; @CMA3000_SETDELAY
	.no_dead_strip	_cma3000_poweron
.subsections_via_symbols
