	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_sram_set_dest          ## -- Begin function flexcop_sram_set_dest
	.p2align	4, 0x90
_flexcop_sram_set_dest:                 ## @flexcop_sram_set_dest
	.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
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_sram_dest_reg_714@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-64(%rbp), %rdi
	movq	%rbx, %rsi
	callq	*16(%rbx)
	movq	(%rbx), %rax
	movq	_FLEXCOP_III@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_FC_SRAM_DEST_TARGET_FC3_CA@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_deb_sram
	movq	_FC_SRAM_DEST_NET@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r14, -40(%rbp)
LBB0_5:
	movq	_FC_SRAM_DEST_CAI@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.6:
	movq	%r14, -48(%rbp)
LBB0_7:
	movq	_FC_SRAM_DEST_CAO@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%r14, -56(%rbp)
LBB0_9:
	movq	_FC_SRAM_DEST_MEDIA@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	%r14, -64(%rbp)
LBB0_11:
	movl	(%r12), %esi
	movups	-64(%rbp), %xmm0
	movups	-48(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	xorl	%eax, %eax
LBB0_12:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sram_dest_reg_714,4,2          ## @sram_dest_reg_714
	.comm	_FLEXCOP_III,8,3                ## @FLEXCOP_III
	.comm	_FC_SRAM_DEST_TARGET_FC3_CA,8,3 ## @FC_SRAM_DEST_TARGET_FC3_CA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SRAM destination target to available on FlexCopII(b)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"sram dest: %x target: %x\n"

	.comm	_FC_SRAM_DEST_NET,4,2           ## @FC_SRAM_DEST_NET
	.comm	_FC_SRAM_DEST_CAI,4,2           ## @FC_SRAM_DEST_CAI
	.comm	_FC_SRAM_DEST_CAO,4,2           ## @FC_SRAM_DEST_CAO
	.comm	_FC_SRAM_DEST_MEDIA,4,2         ## @FC_SRAM_DEST_MEDIA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_sram_set_dest          ; -- Begin function flexcop_sram_set_dest
	.p2align	2
_flexcop_sram_set_dest:                 ; @flexcop_sram_set_dest
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x9, [x0, #16]
Lloh0:
	adrp	x22, _sram_dest_reg_714@GOTPAGE
Lloh1:
	ldr	x22, [x22, _sram_dest_reg_714@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x8, sp
	blr	x9
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _FLEXCOP_III@GOTPAGE
Lloh3:
	ldr	x9, [x9, _FLEXCOP_III@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _FC_SRAM_DEST_TARGET_FC3_CA@GOTPAGE
Lloh6:
	ldr	x10, [x10, _FC_SRAM_DEST_TARGET_FC3_CA@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x10, x20, #0, ne
	b.eq	LBB0_2
; %bb.1:
	ldp	x23, x24, [sp]
	ldp	x25, x26, [sp, #16]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_deb_sram
Lloh10:
	adrp	x8, _FC_SRAM_DEST_NET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FC_SRAM_DEST_NET@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w21
	csel	x8, x26, x20, eq
Lloh13:
	adrp	x9, _FC_SRAM_DEST_CAI@GOTPAGE
Lloh14:
	ldr	x9, [x9, _FC_SRAM_DEST_CAI@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w21
	csel	x9, x25, x20, eq
Lloh16:
	adrp	x10, _FC_SRAM_DEST_CAO@GOTPAGE
Lloh17:
	ldr	x10, [x10, _FC_SRAM_DEST_CAO@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w10, w21
	csel	x10, x24, x20, eq
Lloh19:
	adrp	x11, _FC_SRAM_DEST_MEDIA@GOTPAGE
Lloh20:
	ldr	x11, [x11, _FC_SRAM_DEST_MEDIA@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	tst	w11, w21
	csel	x11, x23, x20, eq
	ldr	x12, [x19, #8]
	ldr	w1, [x22]
	stp	x11, x10, [sp]
	stp	x9, x8, [sp, #16]
	mov	x2, sp
	mov	x0, x19
	blr	x12
	mov	w0, #1000
	bl	_udelay
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_sram_dest_reg_714,4,2          ; @sram_dest_reg_714
	.comm	_FLEXCOP_III,8,3                ; @FLEXCOP_III
	.comm	_FC_SRAM_DEST_TARGET_FC3_CA,8,3 ; @FC_SRAM_DEST_TARGET_FC3_CA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SRAM destination target to available on FlexCopII(b)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"sram dest: %x target: %x\n"

	.comm	_FC_SRAM_DEST_NET,4,2           ; @FC_SRAM_DEST_NET
	.comm	_FC_SRAM_DEST_CAI,4,2           ; @FC_SRAM_DEST_CAI
	.comm	_FC_SRAM_DEST_CAO,4,2           ; @FC_SRAM_DEST_CAO
	.comm	_FC_SRAM_DEST_MEDIA,4,2         ; @FC_SRAM_DEST_MEDIA
.subsections_via_symbols
