	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx23885_sp2_ci_ctrl
_cx23885_sp2_ci_ctrl:                   ## @cx23885_sp2_ci_ctrl
	.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, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	(%rdi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_MC417_OEN@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_cx_write
	movq	_MC417_RWD@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movzbl	%bl, %esi
	orl	$50944, %esi                    ## imm = 0xC700
	callq	_cx_write
	movl	(%r15), %edi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_cx_clear
	movl	(%r15), %edi
	movzbl	%bh, %esi
	orl	$51968, %esi                    ## imm = 0xCB00
	callq	_cx_write
	movl	(%r15), %edi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_cx_clear
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movl	$4351, %esi                     ## imm = 0x10FF
	callq	_cx_write
	movl	$16384, %ebx                    ## imm = 0x4000
	jmp	LBB0_3
LBB0_2:
	movl	(%r15), %edi
	orl	$49920, %r13d                   ## imm = 0xC300
	movl	%r13d, %esi
	callq	_cx_write
	movl	$32768, %ebx                    ## imm = 0x8000
LBB0_3:
	movl	(%r15), %edi
	movl	$256, %esi                      ## imm = 0x100
	callq	_cx_clear
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_cx_clear
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r14
	movl	$1, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r14, %rbx
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	xorl	%r13d, %r13d
	movl	$0, %r14d
	testl	%eax, %eax
	jne	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_cx_read
	movl	%eax, %r14d
	testl	$4096, %eax                     ## imm = 0x1000
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$50, %edi
	movl	$100, %esi
	callq	_usleep_range
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movzbl	%r14b, %r14d
LBB0_7:
	movl	(%r15), %edi
	movl	$49920, %esi                    ## imm = 0xC300
	callq	_cx_set
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%r14d, (%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.8:
	cmpl	$0, (%rbx)
	jns	LBB0_10
## %bb.9:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC417_OEN,4,2                  ## @MC417_OEN
	.comm	_MC417_RWD,4,2                  ## @MC417_RWD
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_SP2_ACK,4,2                    ## @SP2_ACK
	.comm	_SP2_ADHI,4,2                   ## @SP2_ADHI
	.comm	_SP2_ADLO,4,2                   ## @SP2_ADLO
	.comm	_SP2_CS0,4,2                    ## @SP2_CS0
	.comm	_SP2_CTRL_OFF,4,2               ## @SP2_CTRL_OFF
	.comm	_SP2_DATA,4,2                   ## @SP2_DATA
	.comm	_SP2_EN_ALL,4,2                 ## @SP2_EN_ALL
	.comm	_SP2_RD,4,2                     ## @SP2_RD
	.comm	_SP2_WR,4,2                     ## @SP2_WR
	.no_dead_strip	_cx23885_sp2_ci_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx23885_sp2_ci_ctrl
_cx23885_sp2_ci_ctrl:                   ; @cx23885_sp2_ci_ctrl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	ldr	x21, [x0]
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x25, _MC417_OEN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MC417_OEN@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #4096
	bl	_cx_write
Lloh2:
	adrp	x24, _MC417_RWD@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MC417_RWD@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #50944
	bfxil	w1, w23, #0, #8
	bl	_cx_write
	ldr	w0, [x24]
	mov	w1, #1024
	bl	_cx_clear
	ldr	w0, [x24]
	mov	w1, #51968
	bfxil	w1, w23, #8, #8
	bl	_cx_write
	ldr	w0, [x24]
	mov	w1, #2048
	bl	_cx_clear
	cbz	w20, LBB0_2
; %bb.1:
	ldr	w0, [x25]
	mov	w1, #4351
	bl	_cx_write
	mov	w22, #16384
	b	LBB0_3
LBB0_2:
	ldr	w0, [x24]
	mov	w8, #49920
	orr	w1, w22, w8
	bl	_cx_write
	mov	w22, #32768
LBB0_3:
	ldr	w0, [x24]
	mov	w1, #256
	bl	_cx_clear
	ldr	w0, [x24]
	mov	x1, x22
	bl	_cx_clear
Lloh4:
	adrp	x25, _jiffies@GOTPAGE
Lloh5:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x22, [x25]
	mov	w0, #1
	bl	_msecs_to_jiffies
	add	x22, x0, x22
	ldr	x0, [x25]
	mov	x1, x22
	bl	_time_after
	cbz	w0, LBB0_5
; %bb.4:
	mov	w22, #0
	b	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_cx_read
	mov	x23, x0
	tbz	w0, #12, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #50
	mov	w1, #100
	bl	_usleep_range
	ldr	x0, [x25]
	mov	x1, x22
	bl	_time_after
	cbz	w0, LBB0_5
LBB0_7:
	and	w22, w23, #0xff
LBB0_8:
	ldr	w0, [x24]
	mov	w1, #49920
	bl	_cx_set
	str	w22, [x19]
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w20, LBB0_10
; %bb.9:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_12
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh6:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MC417_OEN,4,2                  ; @MC417_OEN
	.comm	_MC417_RWD,4,2                  ; @MC417_RWD
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_SP2_ACK,4,2                    ; @SP2_ACK
	.comm	_SP2_ADHI,4,2                   ; @SP2_ADHI
	.comm	_SP2_ADLO,4,2                   ; @SP2_ADLO
	.comm	_SP2_CS0,4,2                    ; @SP2_CS0
	.comm	_SP2_CTRL_OFF,4,2               ; @SP2_CTRL_OFF
	.comm	_SP2_DATA,4,2                   ; @SP2_DATA
	.comm	_SP2_EN_ALL,4,2                 ; @SP2_EN_ALL
	.comm	_SP2_RD,4,2                     ; @SP2_RD
	.comm	_SP2_WR,4,2                     ; @SP2_WR
	.no_dead_strip	_cx23885_sp2_ci_ctrl
.subsections_via_symbols
