	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sca3000_clean_setup
_sca3000_clean_setup:                   ## @sca3000_clean_setup
	.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, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_SCA3000_REG_INT_STATUS_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_sca3000_read_data_short
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_SCA3000_REG_CTRL_SEL_MD_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_sca3000_read_ctrl_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	(%r12), %esi
	movq	_SCA3000_MD_CTRL_PROT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	movq	%r15, %rdi
	callq	_sca3000_write_ctrl_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	_SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_sca3000_read_ctrl_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	_SCA3000_REG_OUT_CTRL_PROT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%ebx, %edx
	movq	_SCA3000_REG_OUT_CTRL_BUF_X_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SCA3000_REG_OUT_CTRL_BUF_Y_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SCA3000_REG_OUT_CTRL_BUF_Z_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r12), %esi
	movq	_SCA3000_REG_OUT_CTRL_BUF_DIV_4@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sca3000_write_ctrl_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	_SCA3000_REG_INT_MASK_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_sca3000_read_data_short
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	(%r12), %esi
	movq	_SCA3000_REG_INT_MASK_ACTIVE_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sca3000_write_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_SCA3000_REG_MODE_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_sca3000_read_data_short
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	(%r12), %esi
	movq	(%r15), %rax
	movq	_SCA3000_MODE_PROT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	(%rax), %edx
	movq	%r15, %rdi
	callq	_sca3000_write_reg
	movl	%eax, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SCA3000_REG_INT_STATUS_ADDR,4,2 ## @SCA3000_REG_INT_STATUS_ADDR
	.comm	_SCA3000_REG_CTRL_SEL_MD_CTRL,4,2 ## @SCA3000_REG_CTRL_SEL_MD_CTRL
	.comm	_SCA3000_MD_CTRL_PROT_MASK,4,2  ## @SCA3000_MD_CTRL_PROT_MASK
	.comm	_SCA3000_REG_CTRL_SEL_OUT_CTRL,4,2 ## @SCA3000_REG_CTRL_SEL_OUT_CTRL
	.comm	_SCA3000_REG_OUT_CTRL_PROT_MASK,4,2 ## @SCA3000_REG_OUT_CTRL_PROT_MASK
	.comm	_SCA3000_REG_OUT_CTRL_BUF_X_EN,4,2 ## @SCA3000_REG_OUT_CTRL_BUF_X_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_Y_EN,4,2 ## @SCA3000_REG_OUT_CTRL_BUF_Y_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_Z_EN,4,2 ## @SCA3000_REG_OUT_CTRL_BUF_Z_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_DIV_4,4,2 ## @SCA3000_REG_OUT_CTRL_BUF_DIV_4
	.comm	_SCA3000_REG_INT_MASK_ADDR,4,2  ## @SCA3000_REG_INT_MASK_ADDR
	.comm	_SCA3000_REG_INT_MASK_PROT_MASK,4,2 ## @SCA3000_REG_INT_MASK_PROT_MASK
	.comm	_SCA3000_REG_INT_MASK_ACTIVE_LOW,4,2 ## @SCA3000_REG_INT_MASK_ACTIVE_LOW
	.comm	_SCA3000_REG_MODE_ADDR,4,2      ## @SCA3000_REG_MODE_ADDR
	.comm	_SCA3000_MODE_PROT_MASK,4,2     ## @SCA3000_MODE_PROT_MASK
	.no_dead_strip	_sca3000_clean_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sca3000_clean_setup
_sca3000_clean_setup:                   ; @sca3000_clean_setup
	.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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SCA3000_REG_INT_STATUS_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCA3000_REG_INT_STATUS_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_sca3000_read_data_short
	mov	x21, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_mutex_unlock
	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_2:
Lloh3:
	adrp	x22, _SCA3000_REG_CTRL_SEL_MD_CTRL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SCA3000_REG_CTRL_SEL_MD_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sca3000_read_ctrl_reg
	mov	x21, x0
	tbnz	w0, #31, LBB0_1
; %bb.3:
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _SCA3000_MD_CTRL_PROT_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCA3000_MD_CTRL_PROT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w2, w8, w21
	mov	x0, x20
	bl	_sca3000_write_ctrl_reg
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.4:
Lloh8:
	adrp	x22, _SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SCA3000_REG_CTRL_SEL_OUT_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sca3000_read_ctrl_reg
	mov	x21, x0
	tbnz	w0, #31, LBB0_1
; %bb.5:
	ldr	w1, [x22]
Lloh10:
	adrp	x8, _SCA3000_REG_OUT_CTRL_PROT_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCA3000_REG_OUT_CTRL_PROT_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh13:
	adrp	x9, _SCA3000_REG_OUT_CTRL_BUF_X_EN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SCA3000_REG_OUT_CTRL_BUF_X_EN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _SCA3000_REG_OUT_CTRL_BUF_Y_EN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SCA3000_REG_OUT_CTRL_BUF_Y_EN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh19:
	adrp	x9, _SCA3000_REG_OUT_CTRL_BUF_Z_EN@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SCA3000_REG_OUT_CTRL_BUF_Z_EN@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _SCA3000_REG_OUT_CTRL_BUF_DIV_4@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SCA3000_REG_OUT_CTRL_BUF_DIV_4@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_sca3000_write_ctrl_reg
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.6:
Lloh25:
	adrp	x22, _SCA3000_REG_INT_MASK_ADDR@GOTPAGE
Lloh26:
	ldr	x22, [x22, _SCA3000_REG_INT_MASK_ADDR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #1
	bl	_sca3000_read_data_short
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.7:
	ldr	w1, [x22]
Lloh27:
	adrp	x8, _SCA3000_REG_INT_MASK_ACTIVE_LOW@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SCA3000_REG_INT_MASK_ACTIVE_LOW@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_sca3000_write_reg
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.8:
Lloh30:
	adrp	x22, _SCA3000_REG_MODE_ADDR@GOTPAGE
Lloh31:
	ldr	x22, [x22, _SCA3000_REG_MODE_ADDR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #1
	bl	_sca3000_read_data_short
	mov	x21, x0
	cbnz	w0, LBB0_1
; %bb.9:
	ldr	w1, [x22]
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _SCA3000_MODE_PROT_MASK@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SCA3000_MODE_PROT_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	and	w2, w9, w8
	mov	x0, x20
	bl	_sca3000_write_reg
	mov	x21, x0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	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 AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SCA3000_REG_INT_STATUS_ADDR,4,2 ; @SCA3000_REG_INT_STATUS_ADDR
	.comm	_SCA3000_REG_CTRL_SEL_MD_CTRL,4,2 ; @SCA3000_REG_CTRL_SEL_MD_CTRL
	.comm	_SCA3000_MD_CTRL_PROT_MASK,4,2  ; @SCA3000_MD_CTRL_PROT_MASK
	.comm	_SCA3000_REG_CTRL_SEL_OUT_CTRL,4,2 ; @SCA3000_REG_CTRL_SEL_OUT_CTRL
	.comm	_SCA3000_REG_OUT_CTRL_PROT_MASK,4,2 ; @SCA3000_REG_OUT_CTRL_PROT_MASK
	.comm	_SCA3000_REG_OUT_CTRL_BUF_X_EN,4,2 ; @SCA3000_REG_OUT_CTRL_BUF_X_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_Y_EN,4,2 ; @SCA3000_REG_OUT_CTRL_BUF_Y_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_Z_EN,4,2 ; @SCA3000_REG_OUT_CTRL_BUF_Z_EN
	.comm	_SCA3000_REG_OUT_CTRL_BUF_DIV_4,4,2 ; @SCA3000_REG_OUT_CTRL_BUF_DIV_4
	.comm	_SCA3000_REG_INT_MASK_ADDR,4,2  ; @SCA3000_REG_INT_MASK_ADDR
	.comm	_SCA3000_REG_INT_MASK_PROT_MASK,4,2 ; @SCA3000_REG_INT_MASK_PROT_MASK
	.comm	_SCA3000_REG_INT_MASK_ACTIVE_LOW,4,2 ; @SCA3000_REG_INT_MASK_ACTIVE_LOW
	.comm	_SCA3000_REG_MODE_ADDR,4,2      ; @SCA3000_REG_MODE_ADDR
	.comm	_SCA3000_MODE_PROT_MASK,4,2     ; @SCA3000_MODE_PROT_MASK
	.no_dead_strip	_sca3000_clean_setup
.subsections_via_symbols
