	.file	"extr_adv7604.c_adv76xx_core_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adv76xx_core_init, @function
adv76xx_core_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	to_state@PLT
	xor	edx, edx
	cmp	QWORD PTR 88[rax], 0
	mov	r12, QWORD PTR 96[rax]
	mov	rbp, rax
	setne	dl
	sal	edx, 7
	cmp	QWORD PTR 80[rax], 0
	je	.L3
	or	edx, 64
.L3:
	mov	esi, 72
	mov	rdi, rbx
	call	hdmi_write@PLT
	mov	rdi, rbx
	call	disable_input@PLT
	mov	rax, QWORD PTR 16[rbp]
	test	rax, rax
	js	.L4
	cmp	rax, QWORD PTR 0[rbp]
	jl	.L12
.L4:
	mov	edx, 66
	mov	esi, 12
	mov	rdi, rbx
	call	io_write@PLT
	mov	edx, 68
	mov	esi, 11
	mov	rdi, rbx
	call	io_write@PLT
	mov	edx, 1
	mov	esi, 207
	mov	rdi, rbx
	call	cp_write@PLT
	mov	eax, DWORD PTR 24[rbp]
	mov	edx, 15
	mov	rdi, rbx
	mov	esi, 2
	lea	ecx, 0[0+rax*8]
	call	io_write_clr_set@PLT
	mov	eax, DWORD PTR 28[rbp]
	mov	edx, 14
	mov	rdi, rbx
	mov	esi, 5
	lea	ecx, 0[0+rax*8]
	mov	eax, DWORD PTR 32[rbp]
	sal	eax, 2
	or	ecx, eax
	mov	eax, DWORD PTR 36[rbp]
	add	eax, eax
	or	ecx, eax
	call	io_write_clr_set@PLT
	mov	rdi, rbp
	call	adv76xx_setup_format@PLT
	mov	edx, 48
	mov	esi, 105
	mov	rdi, rbx
	call	cp_write@PLT
	mov	eax, DWORD PTR 40[rbp]
	mov	esi, 6
	mov	rdi, rbx
	lea	edx, 0[0+rax*4]
	mov	eax, DWORD PTR 44[rbp]
	add	eax, eax
	or	edx, eax
	or	edx, DWORD PTR 48[rbp]
	or	dl, -96
	call	io_write@PLT
	mov	edx, DWORD PTR 52[rbp]
	mov	eax, DWORD PTR 56[rbp]
	mov	esi, 20
	mov	rdi, rbx
	sal	eax, 2
	sal	edx, 4
	or	edx, eax
	or	edx, DWORD PTR 60[rbp]
	or	edx, 64
	call	io_write@PLT
	mov	edx, DWORD PTR 64[rbp]
	mov	esi, 186
	mov	rdi, rbx
	lea	edx, 1[rdx+rdx]
	call	cp_write@PLT
	mov	edx, 220
	mov	esi, 243
	mov	rdi, rbx
	call	cp_write@PLT
	mov	edx, 35
	mov	esi, 249
	mov	rdi, rbx
	call	cp_write@PLT
	mov	edx, 35
	mov	esi, 69
	mov	rdi, rbx
	call	cp_write@PLT
	mov	edx, 45
	mov	esi, 201
	mov	rdi, rbx
	call	cp_write@PLT
	mov	ecx, 3
	mov	edx, 3
	mov	rdi, rbx
	mov	esi, 21
	call	hdmi_write_clr_set@PLT
	mov	ecx, 8
	mov	edx, 14
	mov	rdi, rbx
	mov	esi, 26
	call	hdmi_write_clr_set@PLT
	mov	ecx, 6
	mov	edx, 6
	mov	rdi, rbx
	mov	esi, 104
	call	hdmi_write_clr_set@PLT
	mov	rdi, rbx
	mov	edx, 1
	mov	esi, 181
	call	afe_write@PLT
	mov	rdi, rbp
	call	adv76xx_has_afe@PLT
	test	rax, rax
	jne	.L13
.L5:
	mov	edx, DWORD PTR 76[rbp]
	mov	rdi, rbx
	mov	esi, 64
	or	dl, -64
	call	io_write@PLT
	mov	rdi, rbx
	mov	edx, 152
	mov	esi, 70
	call	io_write@PLT
	mov	edx, DWORD PTR [r12]
	mov	rdi, rbx
	mov	esi, 110
	call	io_write@PLT
	mov	edx, DWORD PTR 4[r12]
	mov	rdi, rbx
	mov	esi, 115
	call	io_write@PLT
	mov	rdi, rbx
	call	[QWORD PTR 8[r12]]
	mov	edi, DWORD PTR [rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	v4l2_ctrl_handler_setup@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edx, DWORD PTR 68[rbp]
	mov	rdi, rbx
	mov	esi, 2
	call	afe_write@PLT
	mov	ecx, DWORD PTR 72[rbp]
	mov	edx, 16
	mov	rdi, rbx
	mov	esi, 48
	sal	ecx, 4
	call	io_write_clr_set@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L12:
	mov	QWORD PTR 8[rbp], rax
	mov	rdi, rbx
	call	select_input@PLT
	mov	rdi, rbx
	call	enable_input@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	adv76xx_core_init, .-adv76xx_core_init
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_adv7604.c_adv76xx_core_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adv76xx_core_init, %function
adv76xx_core_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	to_state
	ldr	r2, [r0, #72]
	mov	r5, r0
	cmp	r2, #0
	movne	r2, #128
	ldr	r3, [r0, #68]
	mov	r1, #72
	cmp	r3, #0
	orrne	r2, r2, #64
	ldr	r6, [r0, #76]
	mov	r0, r4
	bl	hdmi_write
	mov	r0, r4
	bl	disable_input
	ldr	r3, [r5, #8]
	cmp	r3, #0
	blt	.L4
	ldr	r2, [r5]
	cmp	r3, r2
	blt	.L15
.L4:
	mov	r2, #66
	mov	r1, #12
	mov	r0, r4
	bl	io_write
	mov	r2, #68
	mov	r1, #11
	mov	r0, r4
	bl	io_write
	mov	r2, #1
	mov	r1, #207
	mov	r0, r4
	bl	cp_write
	ldr	r3, [r5, #12]
	mov	r2, #15
	mov	r1, #2
	lsl	r3, r3, #3
	mov	r0, r4
	bl	io_write_clr_set
	ldr	r3, [r5, #20]
	ldr	r0, [r5, #16]
	ldr	r1, [r5, #24]
	lsl	r2, r3, #2
	orr	r3, r2, r0, lsl #3
	orr	r3, r3, r1, lsl #1
	mov	r2, #14
	mov	r1, #5
	mov	r0, r4
	bl	io_write_clr_set
	mov	r0, r5
	bl	adv76xx_setup_format
	mov	r2, #48
	mov	r1, #105
	mov	r0, r4
	bl	cp_write
	ldr	r2, [r5, #32]
	ldr	r1, [r5, #28]
	ldr	r3, [r5, #36]
	lsl	r2, r2, #1
	orr	r2, r2, r1, lsl #2
	orr	r2, r2, r3
	mov	r1, #6
	orr	r2, r2, #160
	mov	r0, r4
	bl	io_write
	ldr	r2, [r5, #44]
	ldr	r1, [r5, #40]
	ldr	r3, [r5, #48]
	lsl	r2, r2, #2
	orr	r2, r2, r1, lsl #4
	orr	r2, r2, r3
	mov	r1, #20
	orr	r2, r2, #64
	mov	r0, r4
	bl	io_write
	ldr	r2, [r5, #52]
	mov	r1, #186
	lsl	r2, r2, #1
	orr	r2, r2, #1
	mov	r0, r4
	bl	cp_write
	mov	r2, #220
	mov	r1, #243
	mov	r0, r4
	bl	cp_write
	mov	r2, #35
	mov	r1, #249
	mov	r0, r4
	bl	cp_write
	mov	r2, #35
	mov	r1, #69
	mov	r0, r4
	bl	cp_write
	mov	r2, #45
	mov	r1, #201
	mov	r0, r4
	bl	cp_write
	mov	r3, #3
	mov	r1, #21
	mov	r2, r3
	mov	r0, r4
	bl	hdmi_write_clr_set
	mov	r3, #8
	mov	r2, #14
	mov	r1, #26
	mov	r0, r4
	bl	hdmi_write_clr_set
	mov	r3, #6
	mov	r1, #104
	mov	r2, r3
	mov	r0, r4
	bl	hdmi_write_clr_set
	mov	r2, #1
	mov	r1, #181
	mov	r0, r4
	bl	afe_write
	mov	r0, r5
	bl	adv76xx_has_afe
	cmp	r0, #0
	bne	.L16
.L5:
	ldr	r2, [r5, #64]
	mov	r1, #64
	mov	r0, r4
	orr	r2, r2, #192
	bl	io_write
	mov	r2, #152
	mov	r1, #70
	mov	r0, r4
	bl	io_write
	ldr	r2, [r6]
	mov	r1, #110
	mov	r0, r4
	bl	io_write
	ldr	r2, [r6, #4]
	mov	r1, #115
	mov	r0, r4
	bl	io_write
	mov	r0, r4
	ldr	r3, [r6, #8]
	blx	r3
	ldr	r0, [r4]
	pop	{r4, r5, r6, lr}
	b	v4l2_ctrl_handler_setup
.L16:
	ldr	r2, [r5, #56]
	mov	r1, #2
	mov	r0, r4
	bl	afe_write
	ldr	r3, [r5, #60]
	mov	r2, #16
	mov	r1, #48
	mov	r0, r4
	lsl	r3, r3, #4
	bl	io_write_clr_set
	b	.L5
.L15:
	mov	r0, r4
	str	r3, [r5, #4]
	bl	select_input
	mov	r0, r4
	bl	enable_input
	b	.L4
	.size	adv76xx_core_init, .-adv76xx_core_init
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
