	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function drxj_dap_scu_atomic_read_write_block
LCPI0_0:
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_drxj_dap_scu_atomic_read_write_block:  ## @drxj_dap_scu_atomic_read_write_block
	.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	$200, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testb	$1, %r14b
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %r12
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	movq	%rcx, %r13
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	cmpl	$34, %r14d
	jl	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_37
## %bb.6:
	movl	%ebx, %eax
	addq	$200, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%r8d, %ebx
	movl	%r14d, %r15d
	shrl	$31, %r15d
	addl	%r14d, %r15d
	sarl	%r15d
	movl	%esi, %edi
	callq	_ADDR_AT_SCU_SPACE
	movl	%eax, -124(%rbp)
	testl	%ebx, %ebx
	movl	%ebx, -196(%rbp)                ## 4-byte Spill
	movl	%r14d, %eax
	je	LBB0_9
## %bb.8:
	andl	$-129, %eax
	movl	%eax, -128(%rbp)
	movl	$2, -232(%rbp)
	leal	2(%r15), %eax
	jmp	LBB0_17
LBB0_9:
	orl	$128, %eax
	movl	%eax, -128(%rbp)
	cmpl	$2, %r14d
	jl	LBB0_16
## %bb.10:
	movl	%r15d, %eax
	cmpl	$8, %r15d
	jae	LBB0_12
## %bb.11:
	xorl	%ecx, %ecx
	jmp	LBB0_15
LBB0_12:
	movl	%eax, %ecx
	andl	$-8, %ecx
	leaq	(,%rax,4), %rdx
	andq	$-32, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movups	(%r13,%rsi,2), %xmm0
	movups	16(%r13,%rsi,2), %xmm1
	movups	32(%r13,%rsi,2), %xmm2
	movups	48(%r13,%rsi,2), %xmm3
	movaps	%xmm0, %xmm4
	shufps	$136, %xmm1, %xmm4              ## xmm4 = xmm4[0,2],xmm1[0,2]
	movaps	%xmm2, %xmm5
	shufps	$136, %xmm3, %xmm5              ## xmm5 = xmm5[0,2],xmm3[0,2]
	shufps	$221, %xmm1, %xmm0              ## xmm0 = xmm0[1,3],xmm1[1,3]
	shufps	$221, %xmm3, %xmm2              ## xmm2 = xmm2[1,3],xmm3[1,3]
	pslld	$8, %xmm0
	por	%xmm4, %xmm0
	pslld	$8, %xmm2
	por	%xmm5, %xmm2
	movdqu	%xmm0, -120(%rbp,%rsi)
	movdqu	%xmm2, -104(%rbp,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_13
## %bb.14:
	cmpq	%rax, %rcx
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r13,%rcx,8), %edx
	shll	$8, %edx
	orl	(%r13,%rcx,8), %edx
	movl	%edx, -120(%rbp,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_15
LBB0_16:
	leal	2(%r15), %eax
	movl	%eax, -232(%rbp)
	movl	$1, %eax
LBB0_17:
	movl	%eax, -228(%rbp)
	movq	_SCU_RAM_COMMAND_STANDARD_TOP@GOTPCREL(%rip), %rax
	movq	_SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -224(%rbp)
	leaq	-192(%rbp), %rax
	movq	%rax, -216(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, -208(%rbp)
	leaq	-232(%rbp), %rsi
	movq	%r12, %rdi
	callq	_scu_command
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_5
LBB0_19:
	xorl	%ebx, %ebx
	cmpl	$0, -196(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_5
## %bb.20:
	cmpl	$2, %r14d
	jl	LBB0_5
## %bb.21:
	movq	-216(%rbp), %rax
	movl	%r15d, %ecx
	cmpl	$2, %r15d
	jb	LBB0_22
## %bb.23:
	leaq	(%rax,%rcx,4), %rdx
	addq	$8, %rdx
	cmpq	%r13, %rdx
	jbe	LBB0_26
## %bb.24:
	leaq	(,%rcx,8), %rdx
	addq	%r13, %rdx
	leaq	8(%rax), %rsi
	cmpq	%rdx, %rsi
	jae	LBB0_26
LBB0_22:
	xorl	%edx, %edx
LBB0_33:
	movq	%rdx, %rsi
	notq	%rsi
	testb	$1, %cl
	je	LBB0_35
## %bb.34:
	movzbl	8(%rax,%rdx,4), %edi
	movl	%edi, (%r13,%rdx,8)
	movl	8(%rax,%rdx,4), %edi
	sarl	$8, %edi
	movl	%edi, 4(%r13,%rdx,8)
	orq	$1, %rdx
LBB0_35:
	xorl	%ebx, %ebx
	addq	%rcx, %rsi
	je	LBB0_5
	.p2align	4, 0x90
LBB0_36:                                ## =>This Inner Loop Header: Depth=1
	movzbl	8(%rax,%rdx,4), %esi
	movl	%esi, (%r13,%rdx,8)
	movl	8(%rax,%rdx,4), %esi
	sarl	$8, %esi
	movl	%esi, 4(%r13,%rdx,8)
	movzbl	12(%rax,%rdx,4), %esi
	movl	%esi, 8(%r13,%rdx,8)
	movl	12(%rax,%rdx,4), %esi
	sarl	$8, %esi
	movl	%esi, 12(%r13,%rdx,8)
	addq	$2, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_36
	jmp	LBB0_5
LBB0_26:
	movl	%ecx, %edx
	andl	$-2, %edx
	leaq	-2(%rdx), %rsi
	movq	%rsi, %rbx
	shrq	%rbx
	incq	%rbx
	testq	%rsi, %rsi
	je	LBB0_29
## %bb.27:
	movq	%rbx, %rdi
	andq	$-2, %rdi
	xorl	%esi, %esi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0]
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rax,%rsi,4), %xmm1           ## xmm1 = mem[0],zero
	movdqa	%xmm1, %xmm2
	pand	%xmm0, %xmm2
	psrad	$8, %xmm1
	punpckldq	%xmm1, %xmm2            ## xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
	movdqu	%xmm2, (%r13,%rsi,8)
	movq	16(%rax,%rsi,4), %xmm1          ## xmm1 = mem[0],zero
	movdqa	%xmm1, %xmm2
	pand	%xmm0, %xmm2
	psrad	$8, %xmm1
	punpckldq	%xmm1, %xmm2            ## xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
	movdqu	%xmm2, 16(%r13,%rsi,8)
	addq	$4, %rsi
	addq	$-2, %rdi
	jne	LBB0_28
	jmp	LBB0_30
LBB0_29:
	xorl	%esi, %esi
LBB0_30:
	testb	$1, %bl
	je	LBB0_32
## %bb.31:
	movq	8(%rax,%rsi,4), %xmm0           ## xmm0 = mem[0],zero
	movdqa	LCPI0_0(%rip), %xmm1            ## xmm1 = [255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0]
	pand	%xmm0, %xmm1
	psrad	$8, %xmm0
	punpckldq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
	movdqu	%xmm1, (%r13,%rsi,8)
LBB0_32:
	xorl	%ebx, %ebx
	cmpq	%rcx, %rdx
	je	LBB0_5
	jmp	LBB0_33
LBB0_37:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCU_RAM_COMMAND_STANDARD_TOP,4,2 ## @SCU_RAM_COMMAND_STANDARD_TOP
	.comm	_SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS,4,2 ## @SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d\n"

	.no_dead_strip	_drxj_dap_scu_atomic_read_write_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drxj_dap_scu_atomic_read_write_block
_drxj_dap_scu_atomic_read_write_block:  ; @drxj_dap_scu_atomic_read_write_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	tbnz	w2, #0, LBB0_4
; %bb.1:
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x3
	cbz	x3, LBB0_4
; %bb.3:
	mov	x20, x2
	cmp	w2, #0
	cinc	w8, w2, lt
	cmp	w2, #34
	b.lt	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.6:
	mov	x0, x22
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_7:
	mov	x21, x4
	asr	w23, w8, #1
	mov	x0, x1
	bl	_ADDR_AT_SCU_SPACE
	str	w0, [sp, #100]
	cbz	w21, LBB0_9
; %bb.8:
	and	w8, w20, #0xffffff7f
	str	w8, [sp, #96]
	mov	w8, #2
	str	w8, [sp]
	add	w8, w23, #2
	b	LBB0_18
LBB0_9:
	orr	w8, w20, #0x80
	str	w8, [sp, #96]
	cmp	w20, #2
	b.lt	LBB0_17
; %bb.10:
	cmp	w23, #16
	b.hs	LBB0_12
; %bb.11:
	mov	x8, #0
	b	LBB0_15
LBB0_12:
	and	x8, x23, #0xfffffff0
	add	x9, x19, #64
	add	x10, sp, #96
	add	x10, x10, #40
	mov	x11, x8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x12, x9, #64
	ld2.4s	{ v0, v1 }, [x12]
	sub	x12, x9, #32
	ld2.4s	{ v2, v3 }, [x12]
	mov	x12, x9
	ld2.4s	{ v4, v5 }, [x12], #32
	ld2.4s	{ v6, v7 }, [x12]
	shl.4s	v16, v1, #8
	shl.4s	v17, v3, #8
	shl.4s	v18, v5, #8
	shl.4s	v19, v7, #8
	orr.16b	v0, v16, v0
	orr.16b	v1, v17, v2
	orr.16b	v2, v18, v4
	stp	q0, q1, [x10, #-32]
	orr.16b	v0, v19, v6
	stp	q2, q0, [x10], #64
	add	x9, x9, #128
	subs	x11, x11, #16
	b.ne	LBB0_13
; %bb.14:
	cmp	x8, x23
	b.eq	LBB0_17
LBB0_15:
	add	x9, sp, #96
	add	x9, x9, x8, lsl #2
	add	x9, x9, #8
	add	x10, x19, x8, lsl #3
	add	x10, x10, #4
	sub	x8, x23, x8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	w11, w12, [x10, #-4]
	orr	w11, w11, w12, lsl #8
	str	w11, [x9], #4
	add	x10, x10, #8
	subs	x8, x8, #1
	b.ne	LBB0_16
LBB0_17:
	add	w8, w23, #2
	str	w8, [sp]
	mov	w8, #1
LBB0_18:
Lloh9:
	adrp	x9, _SCU_RAM_COMMAND_STANDARD_TOP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SCU_RAM_COMMAND_STANDARD_TOP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	stp	w8, w9, [sp, #4]
	add	x8, sp, #36
	add	x9, sp, #96
	stp	x8, x9, [sp, #16]
	mov	x1, sp
	mov	x0, x22
	bl	_scu_command
	mov	x22, x0
	cbz	w0, LBB0_20
; %bb.19:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
	b	LBB0_5
LBB0_20:
	cbz	w21, LBB0_5
; %bb.21:
	cmp	w20, #2
	b.lt	LBB0_5
; %bb.22:
	ldr	x8, [sp, #16]
	cmp	w23, #8
	b.lo	LBB0_25
; %bb.23:
	add	x9, x8, x23, lsl #2
	add	x9, x9, #8
	cmp	x9, x19
	b.ls	LBB0_29
; %bb.24:
	add	x9, x19, x23, lsl #3
	add	x10, x8, #8
	cmp	x10, x9
	b.hs	LBB0_29
LBB0_25:
	mov	x9, #0
LBB0_26:
	add	x8, x8, x9, lsl #2
	add	x8, x8, #8
	add	x10, x19, x9, lsl #3
	add	x10, x10, #4
	sub	x9, x23, x9
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w11, [x8]
	stur	w11, [x10, #-4]
	ldr	w11, [x8], #4
	asr	w11, w11, #8
	str	w11, [x10], #8
	subs	x9, x9, #1
	b.ne	LBB0_27
LBB0_28:
	mov	w22, #0
	b	LBB0_5
LBB0_29:
	and	x9, x23, #0xfffffff8
	add	x10, x19, #32
	add	x11, x8, #24
	movi.2d	v0, #0x0000ff000000ff
	mov	x12, x9
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x11, #-16]
	and.16b	v3, v1, v0
	sshr.4s	v4, v1, #8
	sub	x13, x10, #32
	st2.4s	{ v3, v4 }, [x13]
	and.16b	v3, v2, v0
	sshr.4s	v4, v2, #8
	st2.4s	{ v3, v4 }, [x10]
	add	x10, x10, #64
	add	x11, x11, #32
	subs	x12, x12, #8
	b.ne	LBB0_30
; %bb.31:
	cmp	x9, x23
	b.eq	LBB0_28
	b	LBB0_26
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCU_RAM_COMMAND_STANDARD_TOP,4,2 ; @SCU_RAM_COMMAND_STANDARD_TOP
	.comm	_SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS,4,2 ; @SCU_RAM_COMMAND_CMD_AUX_SCU_ATOMIC_ACCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d\n"

	.no_dead_strip	_drxj_dap_scu_atomic_read_write_block
.subsections_via_symbols
