	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7842_ddr_ram_test
_adv7842_ddr_ram_test:                  ## @adv7842_ddr_ram_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	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_io_write
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_io_write
	movq	%r15, %rdi
	movl	$128, %esi
	movl	$146, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$155, %esi
	movl	$1, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$156, %esi
	movl	$96, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$158, %esi
	movl	$2, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$11, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$195, %esi
	movl	$2, %edx
	callq	_afe_write
	movq	%r15, %rdi
	movl	$12, %esi
	movl	$64, %edx
	callq	_io_write
	movq	%r15, %rdi
	movl	$21, %esi
	movl	$186, %edx
	callq	_io_write
	movq	%r15, %rdi
	movl	$18, %esi
	xorl	%edx, %edx
	callq	_sdp_write
	movq	%r15, %rdi
	movl	$255, %esi
	movl	$4, %edx
	callq	_io_write
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	movq	%r15, %rdi
	movl	$18, %esi
	xorl	%edx, %edx
	callq	_sdp_write
	movq	%r15, %rdi
	movl	$42, %esi
	movl	$1, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$124, %esi
	movl	$25, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$128, %esi
	movl	$135, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$129, %esi
	movl	$74, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$130, %esi
	movl	$44, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$131, %esi
	movl	$14, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$132, %esi
	movl	$148, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$133, %esi
	movl	$98, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$125, %esi
	xorl	%edx, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$126, %esi
	movl	$26, %edx
	callq	_sdp_io_write
	movl	$5000, %edi                     ## imm = 0x1388
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	movq	%r15, %rdi
	movl	$217, %esi
	movl	$213, %edx
	callq	_sdp_io_write
	movq	%r15, %rdi
	movl	$18, %esi
	movl	$5, %edx
	callq	_sdp_write
	movl	$20, %edi
	callq	_msleep
	movl	$10, %ebx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%r12d
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$20, %edi
	callq	_msleep
	decl	%ebx
	je	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$219, %esi
	callq	_sdp_io_read
	testb	$16, %al
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r14d
	testb	$32, %al
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r13d
	jmp	LBB0_5
LBB0_6:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r15, %rdx
	movl	%r14d, %r8d
	movl	$10, %r9d
	pushq	%r13
	pushq	%r12
	callq	_v4l2_dbg
	addq	$16, %rsp
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	testl	%r13d, %r13d
	cmovnel	%ecx, %r13d
	testl	%r14d, %r14d
	cmovel	%ecx, %r13d
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ram Test: completed %d of %d: pass %d, fail %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_adv7842_ddr_ram_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7842_ddr_ram_test
_adv7842_ddr_ram_test:                  ; @adv7842_ddr_ram_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	x19, x0
	mov	w1, #0
	mov	w2, #1
	bl	_io_write
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_io_write
	mov	x0, x19
	mov	w1, #128
	mov	w2, #146
	bl	_afe_write
	mov	x0, x19
	mov	w1, #155
	mov	w2, #1
	bl	_afe_write
	mov	x0, x19
	mov	w1, #156
	mov	w2, #96
	bl	_afe_write
	mov	x0, x19
	mov	w1, #158
	mov	w2, #2
	bl	_afe_write
	mov	x0, x19
	mov	w1, #160
	mov	w2, #11
	bl	_afe_write
	mov	x0, x19
	mov	w1, #195
	mov	w2, #2
	bl	_afe_write
	mov	x0, x19
	mov	w1, #12
	mov	w2, #64
	bl	_io_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #186
	bl	_io_write
	mov	x0, x19
	mov	w1, #18
	mov	w2, #0
	bl	_sdp_write
	mov	x0, x19
	mov	w1, #255
	mov	w2, #4
	bl	_io_write
	mov	w0, #5000
	mov	w1, #6000
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #18
	mov	w2, #0
	bl	_sdp_write
	mov	x0, x19
	mov	w1, #42
	mov	w2, #1
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #124
	mov	w2, #25
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #128
	mov	w2, #135
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #129
	mov	w2, #74
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #130
	mov	w2, #44
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #131
	mov	w2, #14
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #132
	mov	w2, #148
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #133
	mov	w2, #98
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #125
	mov	w2, #0
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #126
	mov	w2, #26
	bl	_sdp_io_write
	mov	w0, #5000
	mov	w1, #6000
	bl	_usleep_range
	mov	x0, x19
	mov	w1, #217
	mov	w2, #213
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #18
	mov	w2, #5
	bl	_sdp_write
	mov	w0, #20
	bl	_msleep
	mov	w20, #0
	mov	w21, #0
	mov	w22, #0
	mov	w23, #10
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #219
	bl	_sdp_io_read
	tst	w0, #0x20
	cinc	w8, w22, eq
	cinc	w9, w21, ne
	tst	w0, #0x10
	csel	w22, w22, w8, eq
	csel	w21, w21, w9, eq
	cinc	w20, w20, ne
	mov	w0, #20
	bl	_msleep
	subs	w23, w23, #1
	b.ne	LBB0_1
; %bb.2:
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x4, x20
	mov	w5, #10
	mov	x6, x22
	mov	x7, x21
	bl	_v4l2_dbg
	cmp	w21, #0
	ccmp	w20, #0, #4, eq
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	csneg	w0, wzr, w8, ne
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ram Test: completed %d of %d: pass %d, fail %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_adv7842_ddr_ram_test
.subsections_via_symbols
