	.file	"extr_m5mols_core.c_m5mols_set_fmt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	m5mols_set_fmt, @function
m5mols_set_fmt:
.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
	mov	r13, rsi
	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
	mov	rbx, rdx
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	to_m5mols@PLT
	mov	rdi, r12
	lea	rcx, 4[rsp]
	mov	rdx, rsp
	lea	rsi, 4[rbx]
	mov	DWORD PTR 4[rsp], 0
	mov	rbp, rax
	call	__find_resolution@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	ecx, DWORD PTR [rsp]
	mov	edx, DWORD PTR [rbx]
	mov	rsi, r13
	mov	rdi, rbp
	call	__find_format@PLT
	mov	r13, rax
	test	rax, rax
	je	.L5
	lea	r14, 4[rbp]
	mov	rdi, r14
	call	mutex_lock@PLT
	mov	ecx, DWORD PTR [rsp]
	mov	rdx, QWORD PTR m5mols_default_ffmt[rip]
	mov	edx, DWORD PTR [rdx+rcx*4]
	mov	rax, rcx
	mov	ecx, DWORD PTR V4L2_SUBDEV_FORMAT_ACTIVE[rip]
	mov	DWORD PTR 12[rbx], edx
	mov	edx, DWORD PTR V4L2_COLORSPACE_JPEG[rip]
	mov	DWORD PTR 8[rbx], edx
	mov	edx, DWORD PTR V4L2_FIELD_NONE[rip]
	mov	DWORD PTR 4[rbx], edx
	cmp	DWORD PTR [rbx], ecx
	jne	.L3
	mov	rdx, QWORD PTR 4[rbx]
	mov	QWORD PTR 0[r13], rdx
	mov	edx, DWORD PTR 12[rbx]
	mov	DWORD PTR 8[r13], edx
	mov	edx, DWORD PTR 4[rsp]
	mov	DWORD PTR 0[rbp], eax
	mov	DWORD PTR 8[rbp], edx
.L3:
	mov	rdi, r14
	call	mutex_unlock@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	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
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	m5mols_set_fmt, .-m5mols_set_fmt
	.comm	m5mols_default_ffmt,8,8
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_JPEG,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_m5mols_core.c_m5mols_set_fmt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	m5mols_set_fmt, %function
m5mols_set_fmt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L9
	sub	sp, sp, #20
	mov	r4, r2
	mov	r5, r0
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	to_m5mols
	mov	ip, #0
	add	r8, r4, #4
	mov	r6, r0
	mov	r1, r8
	mov	r0, r5
	add	r3, sp, #8
	add	r2, sp, #4
	str	ip, [sp, #8]
	bl	__find_resolution
	subs	r5, r0, #0
	blt	.L1
	mov	r1, r7
	mov	r0, r6
	ldr	r3, [sp, #4]
	ldr	r2, [r4]
	bl	__find_format
	subs	r7, r0, #0
	moveq	r5, r7
	beq	.L1
	add	r9, r6, #4
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, .L9+4
	ldr	r2, .L9+8
	ldr	r0, [r3]
	ldr	r3, [sp, #4]
	ldr	ip, .L9+12
	ldr	r0, [r0, r3, lsl #2]
	ldr	r1, [r2]
	str	r0, [r4, #12]
	ldr	r2, .L9+16
	ldr	r0, [r4]
	ldr	ip, [ip]
	cmp	r0, r1
	ldr	r2, [r2]
	str	ip, [r4, #8]
	ldreq	ip, [sp, #8]
	str	r2, [r4, #4]
	ldmeq	r8, {r0, r1, r2}
	stmeq	r7, {r0, r1, r2}
	mov	r0, r9
	streq	ip, [r6, #8]
	streq	r3, [r6]
	bl	mutex_unlock
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	m5mols_default_ffmt
	.word	V4L2_SUBDEV_FORMAT_ACTIVE
	.word	V4L2_COLORSPACE_JPEG
	.word	V4L2_FIELD_NONE
	.size	m5mols_set_fmt, .-m5mols_set_fmt
	.comm	m5mols_default_ffmt,4,4
	.comm	V4L2_SUBDEV_FORMAT_ACTIVE,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_JPEG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
