	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx25821_sram_channel_setup     ## -- Begin function cx25821_sram_channel_setup
	.p2align	4, 0x90
_cx25821_sram_channel_setup:            ## @cx25821_sram_channel_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	%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	%rsi, %r13
	cmpl	$0, (%rsi)
	je	LBB0_1
## %bb.2:
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	addl	$7, %edx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	andl	$-8, %ebx
	movl	20(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	24(%r13), %eax
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	divl	%ebx
	cmpl	$4, %eax
	movl	$4, %r15d
	cmovbl	%eax, %r15d
	xorl	%edi, %edi
	cmpl	$2, %r15d
	setb	%dil
	callq	_BUG_ON
	movq	_RISC_JUMP@GOTPCREL(%rip), %rax
	movq	_RISC_IRQ1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_RISC_CNT_INC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$8, %edi
	callq	_cx_write
	movl	$12, %edi
	movl	$8, %esi
	callq	_cx_write
	movl	$16, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%r13), %esi
	addl	%r14d, %esi
	movl	%r15d, %edi
	callq	_cx_write
	leal	4(%r15), %edi
	xorl	%esi, %esi
	callq	_cx_write
	leal	8(%r15), %edi
	xorl	%esi, %esi
	callq	_cx_write
	leal	12(%r15), %edi
	xorl	%esi, %esi
	callq	_cx_write
	incl	%r12d
	addl	%ebx, %r14d
	addl	$16, %r15d
	cmpl	-48(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_4
LBB0_5:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%r13), %edi
	addl	%ebx, %edi
	movl	%r14d, %esi
	callq	_cx_write
	incl	%r14d
	addl	$4, %ebx
	cmpl	$512, %ebx                      ## imm = 0x200
	jne	LBB0_6
## %bb.7:
	cmpq	$0, 40(%r13)
	movl	(%r13), %edi
	movl	$8, %esi
	cmovel	-52(%rbp), %esi                 ## 4-byte Folded Reload
	callq	_cx_write
	movl	(%r13), %edi
	addl	$4, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$8, %edi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$12, %edi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	addl	%ebx, %ebx
	movl	%ebx, %esi
	callq	_cx_write
	movl	(%r13), %edi
	movl	32(%r13), %esi
	addl	$16, %edi
	callq	_cx_write
	cmpq	$0, 40(%r13)
	movl	$16, %eax
	movl	$-2147483632, %esi              ## imm = 0x80000010
	cmovel	%eax, %esi
	movl	(%r13), %edi
	addl	$20, %edi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$24, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$28, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$32, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$36, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$40, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$44, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$48, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$52, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$56, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$60, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$64, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$68, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$72, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	(%r13), %edi
	addl	$76, %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	4(%r13), %edi
	movl	28(%r13), %esi
	callq	_cx_write
	movl	8(%r13), %edi
	movl	%r14d, %esi
	callq	_cx_write
	movl	12(%r13), %edi
	movl	%ebx, %esi
	callq	_cx_write
	movl	16(%r13), %edi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	shrl	$3, %esi
	decl	%esi
	jmp	LBB0_8
LBB0_1:
	movl	4(%r13), %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	8(%r13), %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	12(%r13), %edi
	xorl	%esi, %esi
	callq	_cx_write
	movl	16(%r13), %edi
	xorl	%esi, %esi
LBB0_8:
	callq	_cx_write
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RISC_JUMP,4,2                  ## @RISC_JUMP
	.comm	_RISC_IRQ1,4,2                  ## @RISC_IRQ1
	.comm	_RISC_CNT_INC,4,2               ## @RISC_CNT_INC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx25821_sram_channel_setup     ; -- Begin function cx25821_sram_channel_setup
	.p2align	2
_cx25821_sram_channel_setup:            ; @cx25821_sram_channel_setup
	.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, x1
	ldr	w8, [x1]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x21, x3
	add	w23, w2, #7
	and	w22, w23, #0xfffffff8
	ldp	w20, w8, [x19, #20]
	udiv	w8, w8, w22
	mov	w9, #4
	cmp	w8, #4
	csel	w24, w8, w9, lo
	cmp	w24, #2
	cset	w0, lo
	bl	_BUG_ON
Lloh0:
	adrp	x8, _RISC_JUMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RISC_JUMP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RISC_IRQ1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RISC_IRQ1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _RISC_CNT_INC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RISC_CNT_INC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w0, #8
	bl	_cx_write
	mov	w0, #12
	mov	w1, #8
	bl	_cx_write
	mov	w0, #16
	mov	w1, #0
	bl	_cx_write
	cbz	w24, LBB0_6
; %bb.2:
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_cx_write
	add	w0, w20, #4
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #8
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #12
	mov	w1, #0
	bl	_cx_write
	cmp	w24, #1
	b.eq	LBB0_6
; %bb.3:
	add	w0, w20, #16
	ldr	w8, [x19, #28]
	add	w1, w8, w22
	bl	_cx_write
	add	w0, w20, #20
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #24
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #28
	mov	w1, #0
	bl	_cx_write
	cmp	w24, #2
	b.eq	LBB0_6
; %bb.4:
	add	w0, w20, #32
	ldr	w8, [x19, #28]
	add	w1, w8, w22, lsl #1
	bl	_cx_write
	add	w0, w20, #36
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #40
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #44
	mov	w1, #0
	bl	_cx_write
	cmp	w24, #3
	b.eq	LBB0_6
; %bb.5:
	add	w0, w20, #48
	ldr	w8, [x19, #28]
	add	w9, w22, w22, lsl #1
	add	w1, w8, w9
	bl	_cx_write
	add	w0, w20, #52
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #56
	mov	w1, #0
	bl	_cx_write
	add	w0, w20, #60
	mov	w1, #0
	bl	_cx_write
LBB0_6:
	mov	w25, #0
	mov	w22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #28]
	add	w0, w25, w8
	mov	x1, x22
	bl	_cx_write
	add	w22, w22, #1
	add	w25, w25, #4
	cmp	w25, #512
	b.ne	LBB0_7
; %bb.8:
	ldr	x8, [x19, #40]
	ldr	w0, [x19]
	cmp	x8, #0
	mov	w8, #8
	csel	w1, w21, w8, eq
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #4
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #8
	mov	x1, x20
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #12
	lsl	w21, w24, #1
	mov	x1, x21
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #16
	ldr	w1, [x19, #32]
	bl	_cx_write
	ldr	x8, [x19, #40]
	cmp	x8, #0
	mov	w8, #16
	movk	w8, #32768, lsl #16
	mov	w9, #16
	csel	w1, w9, w8, eq
	ldr	w8, [x19]
	add	w0, w8, #20
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #24
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #28
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #32
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #36
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #40
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #44
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #48
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #52
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #56
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #60
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #64
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #68
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #72
	mov	w1, #0
	bl	_cx_write
	ldr	w8, [x19]
	add	w0, w8, #76
	mov	w1, #0
	bl	_cx_write
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #28]
	bl	_cx_write
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_cx_write
	ldr	w0, [x19, #12]
	mov	x1, x21
	bl	_cx_write
	ldr	w0, [x19, #16]
	lsr	w8, w23, #3
	sub	w1, w8, #1
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_cx_write
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_cx_write
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_cx_write
	ldr	w0, [x19, #16]
	mov	w1, #0
LBB0_10:
	bl	_cx_write
	mov	w0, #0
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RISC_JUMP,4,2                  ; @RISC_JUMP
	.comm	_RISC_IRQ1,4,2                  ; @RISC_IRQ1
	.comm	_RISC_CNT_INC,4,2               ; @RISC_CNT_INC
.subsections_via_symbols
