	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7842_core_init
_adv7842_core_init:                     ## @adv7842_core_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_to_state
	movq	%rax, %r14
	xorl	%eax, %eax
	cmpq	$0, 112(%r14)
	setne	%al
	shll	$7, %eax
	xorl	%edx, %edx
	cmpq	$0, 104(%r14)
	setne	%dl
	shll	$6, %edx
	orl	%eax, %edx
	movq	%rbx, %rdi
	movl	$72, %esi
	callq	_hdmi_write
	movq	%rbx, %rdi
	callq	_disable_input
	movq	%rbx, %rdi
	movl	$119, %esi
	movl	$211, %edx
	movl	$32, %ecx
	callq	_rep_write_and_or
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	$66, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$21, %esi
	movl	$128, %edx
	callq	_io_write
	movl	(%r14), %edx
	orl	$30, %edx
	shll	$3, %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_io_write
	movl	4(%r14), %eax
	movl	8(%r14), %edx
	shll	$3, %eax
	shll	$2, %edx
	orl	%eax, %edx
	movl	12(%r14), %ecx
	addl	%ecx, %ecx
	orl	%edx, %ecx
	movq	%rbx, %rdi
	movl	$5, %esi
	movl	$240, %edx
	callq	_io_write_and_or
	movq	%r14, %rdi
	callq	_adv7842_setup_format
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$241, %edx
	movl	$8, %ecx
	callq	_hdmi_write_and_or
	movl	16(%r14), %eax
	movl	20(%r14), %ecx
	shll	$4, %eax
	shll	$2, %ecx
	orl	%eax, %ecx
	orl	24(%r14), %ecx
	movq	%rbx, %rdi
	movl	$20, %esi
	movl	$192, %edx
	callq	_io_write_and_or
	movl	32(%r14), %ecx
	addl	%ecx, %ecx
	orl	28(%r14), %ecx
	movq	%rbx, %rdi
	movl	$186, %esi
	movl	$252, %edx
	callq	_cp_write_and_or
	movl	40(%r14), %eax
	movl	44(%r14), %edx
	addl	%eax, %eax
	orl	36(%r14), %eax
	shll	$2, %edx
	movl	48(%r14), %ecx
	shll	$3, %ecx
	orl	%edx, %ecx
	orl	%eax, %ecx
	movq	%rbx, %rdi
	movl	$221, %esi
	movl	$240, %edx
	callq	_sdp_write_and_or
	movq	%rbx, %rdi
	movl	$105, %esi
	movl	$20, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$6, %esi
	movl	$166, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$243, %esi
	movl	$220, %edx
	callq	_cp_write
	movq	%rbx, %rdi
	movl	$181, %esi
	movl	$1, %edx
	callq	_afe_write
	movl	52(%r14), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_afe_write
	movl	56(%r14), %ecx
	shll	$4, %ecx
	movq	%rbx, %rdi
	movl	$48, %esi
	movl	$-17, %edx
	callq	_io_write_and_or
	leaq	96(%r14), %rsi
	movq	%rbx, %rdi
	callq	_sdp_csc_coeff
	cmpl	$128, 60(%r14)
	jl	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	movl	$18, %esi
	movl	$13, %edx
	callq	_sdp_write
	cmpq	$0, 88(%r14)
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	movl	$111, %esi
	xorl	%edx, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$117, %esi
	movl	$10, %edx
	jmp	LBB0_3
LBB0_5:
	movq	%rbx, %rdi
	movl	$41, %esi
	movl	$16, %edx
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movl	$117, %esi
	movl	$10, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$116, %esi
	xorl	%edx, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$121, %esi
	movl	$51, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$111, %esi
	movl	$1, %edx
LBB0_3:
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$122, %esi
	movl	$165, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$123, %esi
	movl	$143, %edx
	callq	_sdp_io_write
	movq	%rbx, %rdi
	movl	$96, %esi
	movl	$1, %edx
LBB0_6:
	callq	_sdp_io_write
	movl	80(%r14), %esi
	movq	%rbx, %rdi
	callq	_select_input
	movq	%rbx, %rdi
	callq	_enable_input
	cmpq	$0, 72(%r14)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	$105, %esi
	movl	$92, %edx
	callq	_hdmi_write
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	movl	$105, %esi
	movl	$163, %edx
	callq	_hdmi_write
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	$207, %edx
	xorl	%ecx, %ecx
	callq	_io_write_and_or
LBB0_9:
	movl	$128, %edx
	orl	64(%r14), %edx
	movq	%rbx, %rdi
	movl	$25, %esi
	callq	_io_write
	movq	%rbx, %rdi
	movl	$51, %esi
	movl	$64, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$64, %esi
	movl	$242, %edx
	callq	_io_write
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_adv7842_irq_enable
	movl	(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_v4l2_ctrl_handler_setup        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_adv7842_core_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7842_core_init
_adv7842_core_init:                     ; @adv7842_core_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_to_state
	mov	x20, x0
	ldp	x9, x8, [x0, #104]
	cmp	x8, #0
	cset	w8, ne
	lsl	w2, w8, #7
	cmp	x9, #0
	cset	w8, ne
	bfi	w2, w8, #6, #1
	mov	x0, x19
	mov	w1, #72
	bl	_hdmi_write
	mov	x0, x19
	bl	_disable_input
	mov	x0, x19
	mov	w1, #119
	mov	w2, #211
	mov	w3, #32
	bl	_rep_write_and_or
	mov	x0, x19
	mov	w1, #12
	mov	w2, #66
	bl	_io_write
	mov	x0, x19
	mov	w1, #21
	mov	w2, #128
	bl	_io_write
	ldr	w8, [x20]
	lsl	w8, w8, #3
	orr	w2, w8, #0xf0
	mov	x0, x19
	mov	w1, #2
	bl	_io_write
	ldp	w8, w9, [x20, #4]
	lsl	w9, w9, #2
	orr	w8, w9, w8, lsl #3
	ldr	w9, [x20, #12]
	orr	w3, w8, w9, lsl #1
	mov	x0, x19
	mov	w1, #5
	mov	w2, #240
	bl	_io_write_and_or
	mov	x0, x20
	bl	_adv7842_setup_format
	mov	x0, x19
	mov	w1, #26
	mov	w2, #241
	mov	w3, #8
	bl	_hdmi_write_and_or
	ldp	w8, w9, [x20, #16]
	lsl	w9, w9, #2
	orr	w8, w9, w8, lsl #4
	ldr	w9, [x20, #24]
	orr	w3, w8, w9
	mov	x0, x19
	mov	w1, #20
	mov	w2, #192
	bl	_io_write_and_or
	ldp	w8, w9, [x20, #28]
	orr	w3, w8, w9, lsl #1
	mov	x0, x19
	mov	w1, #186
	mov	w2, #252
	bl	_cp_write_and_or
	ldp	w8, w9, [x20, #36]
	orr	w8, w8, w9, lsl #1
	ldp	w9, w10, [x20, #44]
	orr	w8, w8, w9, lsl #2
	orr	w3, w8, w10, lsl #3
	mov	x0, x19
	mov	w1, #221
	mov	w2, #240
	bl	_sdp_write_and_or
	mov	x0, x19
	mov	w1, #105
	mov	w2, #20
	bl	_cp_write
	mov	x0, x19
	mov	w1, #6
	mov	w2, #166
	bl	_io_write
	mov	x0, x19
	mov	w1, #243
	mov	w2, #220
	bl	_cp_write
	mov	x0, x19
	mov	w1, #181
	mov	w2, #1
	bl	_afe_write
	ldr	w2, [x20, #52]
	mov	x0, x19
	mov	w1, #2
	bl	_afe_write
	ldr	w8, [x20, #56]
	lsl	w3, w8, #4
	mov	x0, x19
	mov	w1, #48
	mov	w2, #-17
	bl	_io_write_and_or
	add	x1, x20, #96
	mov	x0, x19
	bl	_sdp_csc_coeff
	ldr	w8, [x20, #60]
	mov	x0, x19
	cmp	w8, #128
	b.lt	LBB0_3
; %bb.1:
	mov	w1, #18
	mov	w2, #13
	bl	_sdp_write
	ldr	x8, [x20, #88]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	w1, #111
	mov	w2, #0
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #117
	mov	w2, #10
	b	LBB0_5
LBB0_3:
	mov	w1, #41
	mov	w2, #16
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	w1, #117
	mov	w2, #10
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #116
	mov	w2, #0
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #121
	mov	w2, #51
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #111
	mov	w2, #1
LBB0_5:
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #122
	mov	w2, #165
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #123
	mov	w2, #143
	bl	_sdp_io_write
	mov	x0, x19
	mov	w1, #96
	mov	w2, #1
LBB0_6:
	bl	_sdp_io_write
	ldr	w1, [x20, #80]
	mov	x0, x19
	bl	_select_input
	mov	x0, x19
	bl	_enable_input
	ldr	x8, [x20, #72]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #105
	mov	w2, #92
	bl	_hdmi_write
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	w1, #105
	mov	w2, #163
	bl	_hdmi_write
	mov	x0, x19
	mov	w1, #32
	mov	w2, #207
	mov	w3, #0
	bl	_io_write_and_or
LBB0_9:
	ldr	w8, [x20, #64]
	orr	w2, w8, #0x80
	mov	x0, x19
	mov	w1, #25
	bl	_io_write
	mov	x0, x19
	mov	w1, #51
	mov	w2, #64
	bl	_io_write
	mov	x0, x19
	mov	w1, #64
	mov	w2, #242
	bl	_io_write
	mov	x0, x19
	mov	w1, #1
	bl	_adv7842_irq_enable
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_v4l2_ctrl_handler_setup
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_adv7842_core_init
.subsections_via_symbols
