	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_ddr_dma_test            ## -- Begin function be_cmd_ddr_dma_test
	.p2align	4, 0x90
_be_cmd_ddr_dma_test:                   ## @be_cmd_ddr_dma_test
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_spin_lock_bh
	movq	%r12, %rdi
	callq	_wrb_from_mccq
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %r13
	leaq	28(%r13), %rdi
	movq	_CMD_SUBSYSTEM_LOWLEVEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_OPCODE_LOWLEVEL_HOST_DDR_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	8(%rbx), %ecx
	movq	%rax, %r8
	movq	%rbx, %r9
	callq	_be_wrb_cmd_hdr_prepare
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movl	%eax, 24(%r13)
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movl	%eax, 20(%r13)
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.3:
	movq	8(%r13), %rdx
	movl	%r14d, %r8d
	cmpl	$1, %r14d
	jne	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	xorl	%eax, %eax
	testb	$1, %r8b
	jne	LBB0_9
	jmp	LBB0_10
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_5:
	movq	%rbx, %r10
	movl	%r8d, %esi
	andl	$-2, %esi
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	(,%rax,8), %ecx
	movl	%r15d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	movslq	%ebx, %rcx
	movq	%rcx, (%rdx,%rdi,8)
	leal	1(%rax), %ebx
	cmpl	$7, %eax
	cmovgel	%r9d, %ebx
	leal	(,%rbx,8), %ecx
	movl	%r15d, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	cltq
	movq	%rax, 8(%rdx,%rdi,8)
	leal	1(%rbx), %eax
	cmpl	$7, %ebx
	cmovgel	%r9d, %eax
	addq	$2, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_6
## %bb.7:
	shll	$3, %eax
	movq	%r10, %rbx
	testb	$1, %r8b
	je	LBB0_10
LBB0_9:
	movl	%eax, %ecx
	sarl	%cl, %r15d
	movslq	%r15d, %rax
	movq	%rax, (%rdx,%rdi,8)
LBB0_10:
	movq	%rbx, %r15
	movq	%r12, %rdi
	callq	_be_mcc_notify_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	movq	(%r15), %rbx
	movl	16(%rbx), %edi
	movq	8(%r13), %rsi
	movl	%r14d, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_14
## %bb.12:
	cmpq	$0, (%rbx)
	je	LBB0_13
LBB0_14:
	movl	$-1, %ebx
LBB0_15:
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CMD_SUBSYSTEM_LOWLEVEL,4,2     ## @CMD_SUBSYSTEM_LOWLEVEL
	.comm	_OPCODE_LOWLEVEL_HOST_DDR_DMA,4,2 ## @OPCODE_LOWLEVEL_HOST_DDR_DMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_ddr_dma_test            ; -- Begin function be_cmd_ddr_dma_test
	.p2align	2
_be_cmd_ddr_dma_test:                   ; @be_cmd_ddr_dma_test
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_spin_lock_bh
	mov	x0, x19
	bl	_wrb_from_mccq
	cbz	x0, LBB0_8
; %bb.1:
	mov	x4, x0
	ldr	x23, [x21]
Lloh0:
	adrp	x8, _CMD_SUBSYSTEM_LOWLEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SUBSYSTEM_LOWLEVEL@GOTPAGEOFF]
	add	x0, x23, #28
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _OPCODE_LOWLEVEL_HOST_DDR_DMA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPCODE_LOWLEVEL_HOST_DDR_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w3, [x21, #8]
	mov	x5, x21
	bl	_be_wrb_cmd_hdr_prepare
	mov	x0, x22
	bl	_cpu_to_le64
	str	w0, [x23, #24]
	mov	x0, x20
	bl	_cpu_to_le32
	str	w0, [x23, #20]
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w8, #0
	ldr	x9, [x23, #8]
	mov	w10, w20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w11, w8, #3
	asr	w11, w22, w11
	sxtw	x11, w11
	str	x11, [x9], #8
	cmp	w8, #6
	csinc	w8, wzr, w8, gt
	subs	x10, x10, #1
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_be_mcc_notify_wait
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x21, [x21]
	ldr	w0, [x21, #16]
	ldr	x1, [x23, #8]
	mov	x2, x20
	bl	_memcmp
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x21]
	cbz	x8, LBB0_10
LBB0_7:
	mov	w22, #-1
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w22, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CMD_SUBSYSTEM_LOWLEVEL,4,2     ; @CMD_SUBSYSTEM_LOWLEVEL
	.comm	_OPCODE_LOWLEVEL_HOST_DDR_DMA,4,2 ; @OPCODE_LOWLEVEL_HOST_DDR_DMA
.subsections_via_symbols
