	.file	"extr_vsp1_sru.c_sru_enum_frame_size.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sru_enum_frame_size, @function
sru_enum_frame_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	call	to_sru@PLT
	mov	edx, DWORD PTR 40[rbx]
	mov	rsi, r12
	mov	rdi, rax
	mov	rbp, rax
	call	vsp1_entity_get_pad_config@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	test	rax, rax
	je	.L1
	mov	rdx, QWORD PTR SRU_PAD_SINK[rip]
	mov	rsi, rax
	mov	rdi, rbp
	call	vsp1_entity_get_pad_format@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	mutex_lock@PLT
	cmp	QWORD PTR 32[rbx], 0
	jne	.L4
	mov	rax, QWORD PTR [r12]
	cmp	QWORD PTR [rbx], rax
	jne	.L4
	mov	esi, DWORD PTR SRU_MAX_SIZE[rip]
	mov	rax, QWORD PTR SRU_PAD_SINK[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L11
	mov	eax, esi
	mov	ecx, DWORD PTR 8[r12]
	mov	edx, DWORD PTR 12[r12]
	shr	eax, 31
	add	eax, esi
	mov	esi, edx
	mov	DWORD PTR 16[rbx], ecx
	sar	eax
	cmp	ecx, edx
	mov	DWORD PTR 24[rbx], edx
	cmovge	esi, ecx
	cmp	eax, esi
	jge	.L12
	mov	DWORD PTR 20[rbx], ecx
	mov	rdi, rbp
	xor	r12d, r12d
	mov	DWORD PTR 28[rbx], edx
	call	mutex_unlock@PLT
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L6:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR SRU_MIN_SIZE[rip]
	mov	DWORD PTR 20[rbx], esi
	xor	r12d, r12d
	mov	DWORD PTR 28[rbx], esi
	mov	DWORD PTR 16[rbx], eax
	mov	DWORD PTR 24[rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	add	ecx, ecx
	add	edx, edx
	xor	r12d, r12d
	mov	DWORD PTR 20[rbx], ecx
	mov	DWORD PTR 28[rbx], edx
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	sru_enum_frame_size, .-sru_enum_frame_size
	.comm	SRU_PAD_SINK,8,8
	.comm	SRU_MIN_SIZE,8,8
	.comm	SRU_MAX_SIZE,4,4
	.comm	EINVAL,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_vsp1_sru.c_sru_enum_frame_size.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sru_enum_frame_size, %function
sru_enum_frame_size:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r4, r2
	bl	to_sru
	mov	r1, r6
	ldr	r2, [r4, #28]
	mov	r5, r0
	bl	vsp1_entity_get_pad_config
	subs	r1, r0, #0
	beq	.L11
	ldr	r8, .L13
	mov	r0, r5
	ldr	r2, [r8]
	bl	vsp1_entity_get_pad_format
	mov	r7, r0
	mov	r0, r5
	bl	mutex_lock
	ldr	r6, [r4, #24]
	cmp	r6, #0
	bne	.L4
	ldr	r2, [r4]
	ldr	r3, [r7]
	cmp	r2, r3
	bne	.L4
	ldr	r2, [r8]
	ldr	r1, [r4, #4]
	ldr	r3, .L13+4
	cmp	r1, r2
	ldr	r3, [r3]
	beq	.L12
	ldmib	r7, {r1, r2}
	cmp	r1, r2
	movge	r0, r1
	movlt	r0, r2
	add	r3, r3, r3, lsr #31
	cmp	r0, r3, asr #1
	str	r1, [r4, #8]
	str	r2, [r4, #16]
	lslle	r1, r1, #1
	lslle	r2, r2, #1
	str	r1, [r4, #12]
	str	r2, [r4, #20]
	b	.L6
.L4:
	ldr	r3, .L13+8
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L6:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L13+8
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r2, .L13+12
	str	r3, [r4, #12]
	ldr	r2, [r2]
	str	r3, [r4, #20]
	str	r2, [r4, #8]
	str	r2, [r4, #16]
	b	.L6
.L14:
	.align	2
.L13:
	.word	SRU_PAD_SINK
	.word	SRU_MAX_SIZE
	.word	EINVAL
	.word	SRU_MIN_SIZE
	.size	sru_enum_frame_size, .-sru_enum_frame_size
	.comm	SRU_PAD_SINK,4,4
	.comm	SRU_MIN_SIZE,4,4
	.comm	SRU_MAX_SIZE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
