	.file	"extr_sii902x.c_sii902x_get_modes.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sii902x_get_modes, @function
sii902x_get_modes:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	connector_to_sii902x@PLT
	mov	r13d, DWORD PTR SII902X_SYS_CTRL_OUTPUT_DVI[rip]
	mov	rbp, rax
	mov	eax, DWORD PTR MEDIA_BUS_FMT_RGB888_1X24[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], eax
	call	mutex_lock@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, r12
	mov	rax, QWORD PTR [rax]
	mov	esi, DWORD PTR [rax]
	call	drm_get_edid@PLT
	mov	rdi, r12
	mov	r14, rax
	mov	rsi, rax
	call	drm_connector_update_edid_property@PLT
	test	r14, r14
	je	.L2
	mov	rdi, r14
	call	drm_detect_hdmi_monitor@PLT
	mov	rdi, r12
	mov	rsi, r14
	test	rax, rax
	cmovne	r13d, DWORD PTR SII902X_SYS_CTRL_OUTPUT_HDMI[rip]
	call	drm_add_edid_modes@PLT
	mov	rdi, r14
	mov	ebx, eax
	call	kfree@PLT
.L2:
	mov	rdi, r12
	lea	rsi, 4[rsp]
	mov	edx, 1
	call	drm_display_info_set_bus_formats@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR SII902X_SYS_CTRL_OUTPUT_MODE[rip]
	mov	ecx, r13d
	mov	esi, DWORD PTR SII902X_SYS_CTRL_DATA[rip]
	call	regmap_update_bits@PLT
	mov	r12d, eax
	test	eax, eax
	cmove	r12d, ebx
.L4:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sii902x_get_modes, .-sii902x_get_modes
	.comm	SII902X_SYS_CTRL_OUTPUT_MODE,4,4
	.comm	SII902X_SYS_CTRL_OUTPUT_HDMI,4,4
	.comm	SII902X_SYS_CTRL_OUTPUT_DVI,4,4
	.comm	SII902X_SYS_CTRL_DATA,4,4
	.comm	MEDIA_BUS_FMT_RGB888_1X24,4,4
	.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_sii902x.c_sii902x_get_modes.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sii902x_get_modes, %function
sii902x_get_modes:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L14
	sub	sp, sp, #12
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	connector_to_sii902x
	mov	r6, r0
	ldr	r3, .L14+4
	ldr	r2, .L14+8
	ldr	r3, [r3]
	ldr	r7, [r2]
	str	r3, [sp]
	bl	mutex_lock
	ldr	r3, [r6, #8]
	mov	r0, r5
	ldr	r3, [r3]
	ldr	r1, [r3]
	bl	drm_get_edid
	mov	r4, r0
	mov	r0, r5
	mov	r1, r4
	bl	drm_connector_update_edid_property
	cmp	r4, #0
	beq	.L2
	mov	r0, r4
	bl	drm_detect_hdmi_monitor
	cmp	r0, #0
	ldrne	r3, .L14+12
	mov	r1, r4
	mov	r0, r5
	ldrne	r7, [r3]
	bl	drm_add_edid_modes
	mov	r1, r0
	mov	r0, r4
	mov	r4, r1
	bl	kfree
.L2:
	mov	r0, r5
	mov	r2, #1
	mov	r1, sp
	bl	drm_display_info_set_bus_formats
	subs	r5, r0, #0
	bne	.L4
	ldr	r2, .L14+16
	ldr	r1, .L14+20
	mov	r3, r7
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, [r6, #4]
	bl	regmap_update_bits
	cmp	r0, #0
	movne	r5, r0
	moveq	r5, r4
.L4:
	mov	r0, r6
	bl	mutex_unlock
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	MEDIA_BUS_FMT_RGB888_1X24
	.word	SII902X_SYS_CTRL_OUTPUT_DVI
	.word	SII902X_SYS_CTRL_OUTPUT_HDMI
	.word	SII902X_SYS_CTRL_OUTPUT_MODE
	.word	SII902X_SYS_CTRL_DATA
	.size	sii902x_get_modes, .-sii902x_get_modes
	.comm	SII902X_SYS_CTRL_OUTPUT_MODE,4,4
	.comm	SII902X_SYS_CTRL_OUTPUT_HDMI,4,4
	.comm	SII902X_SYS_CTRL_OUTPUT_DVI,4,4
	.comm	SII902X_SYS_CTRL_DATA,4,4
	.comm	MEDIA_BUS_FMT_RGB888_1X24,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
