	.file	"extr_via_aux_edid.c_get_preferred_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	get_preferred_mode, @function
get_preferred_mode:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8, QWORD PTR [rdi]
	test	r8, r8
	je	.L1
	mov	rax, QWORD PTR 8[r8]
	test	rax, rax
	je	.L7
	mov	edx, DWORD PTR [r8]
	test	DWORD PTR FB_MISC_1ST_DETAIL[rip], edx
	je	.L7
	mov	edx, DWORD PTR 4[r8]
	test	edx, edx
	jle	.L7
	sub	edx, 1
	mov	ecx, DWORD PTR FB_MODE_IS_FIRST[rip]
	mov	edi, DWORD PTR FB_MODE_IS_DETAILED[rip]
	lea	rsi, 4[rax+rdx*4]
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR [rax]
	mov	r8, rax
	test	edx, ecx
	je	.L3
	test	edx, edi
	jne	.L1
.L3:
	add	rax, 4
	cmp	rax, rsi
	jne	.L4
.L7:
	xor	r8d, r8d
.L1:
	mov	rax, r8
	ret
	.cfi_endproc
.LFE0:
	.size	get_preferred_mode, .-get_preferred_mode
	.comm	FB_MODE_IS_FIRST,4,4
	.comm	FB_MODE_IS_DETAILED,4,4
	.comm	FB_MISC_1ST_DETAIL,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_via_aux_edid.c_get_preferred_mode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_preferred_mode, %function
get_preferred_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r0, [r0]
	cmp	r0, #0
	bxeq	lr
	ldr	r3, [r0, #8]
	cmp	r3, #0
	beq	.L7
	ldr	r1, .L20
	ldr	r2, [r0]
	ldr	r1, [r1]
	ands	r2, r2, r1
	beq	.L7
	ldr	ip, [r0, #4]
	cmp	ip, #0
	ble	.L7
	mov	r2, #0
	ldr	r0, .L20+4
	ldr	r1, .L20+8
	push	{r4, lr}
	ldr	lr, [r0]
	ldr	r4, [r1]
.L4:
	mov	r0, r3
	ldr	r1, [r3], #4
	add	r2, r2, #1
	tst	r1, lr
	beq	.L3
	tst	r1, r4
	popne	{r4, pc}
.L3:
	cmp	r2, ip
	bne	.L4
	mov	r0, #0
	pop	{r4, pc}
.L7:
	mov	r0, #0
	bx	lr
.L21:
	.align	2
.L20:
	.word	FB_MISC_1ST_DETAIL
	.word	FB_MODE_IS_FIRST
	.word	FB_MODE_IS_DETAILED
	.size	get_preferred_mode, .-get_preferred_mode
	.comm	FB_MODE_IS_FIRST,4,4
	.comm	FB_MODE_IS_DETAILED,4,4
	.comm	FB_MISC_1ST_DETAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
