	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7842_command_ram_test
_adv7842_command_ram_test:              ## @adv7842_command_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_v4l2_get_subdevdata
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_to_state
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	cmpl	$0, 4(%rbx)
	je	LBB0_5
## %bb.4:
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_main_reset
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_adv7842_rewrite_i2c_addresses
	movq	%r12, %rdi
	callq	_adv7842_ddr_ram_test
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_main_reset
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_adv7842_rewrite_i2c_addresses
	movq	%r12, %rdi
	callq	_adv7842_core_init
	movq	%r12, %rdi
	callq	_disable_input
	movl	4(%r14), %esi
	movq	%r12, %rdi
	callq	_select_input
	movq	%r12, %rdi
	callq	_enable_input
	movq	%r12, %rdi
	callq	_edid_write_vga_segment
	movq	_ADV7842_EDID_PORT_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_edid_write_hdmi_segment
	movq	_ADV7842_EDID_PORT_B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_edid_write_hdmi_segment
	movl	(%r14), %eax
	movl	%eax, -40(%rbp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_adv7842_s_dv_timings
	movl	%r15d, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_info
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no sdram or no ddr sdram\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADV7842_EDID_PORT_A,4,2        ## @ADV7842_EDID_PORT_A
	.comm	_ADV7842_EDID_PORT_B,4,2        ## @ADV7842_EDID_PORT_B
	.no_dead_strip	_adv7842_command_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_command_ram_test
_adv7842_command_ram_test:              ; @adv7842_command_ram_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_v4l2_get_subdevdata
	mov	x21, x0
	mov	x0, x19
	bl	_to_state
	ldr	x22, [x21]
	cbz	x22, LBB0_4
; %bb.1:
	ldr	w8, [x22, #4]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	bl	_main_reset
	mov	x0, x19
	mov	x1, x22
	bl	_adv7842_rewrite_i2c_addresses
	mov	x0, x19
	bl	_adv7842_ddr_ram_test
	mov	x21, x0
	mov	x0, x19
	bl	_main_reset
	mov	x0, x19
	mov	x1, x22
	bl	_adv7842_rewrite_i2c_addresses
	mov	x0, x19
	bl	_adv7842_core_init
	mov	x0, x19
	bl	_disable_input
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_select_input
	mov	x0, x19
	bl	_enable_input
	mov	x0, x19
	bl	_edid_write_vga_segment
Lloh0:
	adrp	x8, _ADV7842_EDID_PORT_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADV7842_EDID_PORT_A@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_edid_write_hdmi_segment
Lloh3:
	adrp	x8, _ADV7842_EDID_PORT_B@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADV7842_EDID_PORT_B@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_edid_write_hdmi_segment
	ldr	w8, [x20]
	str	w8, [sp, #8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x1, sp, #8
	mov	x0, x19
	bl	_adv7842_s_dv_timings
	mov	x0, x21
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_v4l2_info
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no sdram or no ddr sdram\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADV7842_EDID_PORT_A,4,2        ; @ADV7842_EDID_PORT_A
	.comm	_ADV7842_EDID_PORT_B,4,2        ; @ADV7842_EDID_PORT_B
	.no_dead_strip	_adv7842_command_ram_test
.subsections_via_symbols
