	.file	"extr_dc_resource.c_resource_map_pool_resources.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Stream %p not found in new ctx!\n"
	.text
	.p2align 4
	.globl	resource_map_pool_resources
	.type	resource_map_pool_resources, @function
resource_map_pool_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	lea	r13, 24[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR 16[rdi]
	mov	r12, QWORD PTR [rdi]
	mov	rdi, rdx
	mov	r15, QWORD PTR [rax]
	call	calculate_phy_pix_clks@PLT
	cmp	QWORD PTR 8[r14], 0
	je	.L2
	mov	rax, QWORD PTR [r15]
	mov	rdi, r15
	call	[QWORD PTR [rax]]
	test	eax, eax
	je	.L36
.L2:
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	jne	.L3
.L6:
	mov	rdx, rbp
	mov	rsi, r12
	mov	rdi, r13
	call	acquire_first_free_pipe@PLT
	test	eax, eax
	js	.L4
.L5:
	cdqe
	lea	rdx, [rax+rax*4]
	mov	rax, QWORD PTR 24[rbx]
	lea	r15, [rax+rdx*8]
	cmp	QWORD PTR 16[r15], 0
	je	.L4
	mov	rax, QWORD PTR [r14]
	mov	rdx, rbp
	mov	rsi, r12
	mov	rdi, r13
	mov	rax, QWORD PTR 8[rax]
	call	[QWORD PTR [rax]]
	mov	rdx, rax
	mov	QWORD PTR 8[r15], rax
	mov	eax, DWORD PTR DC_NO_STREAM_ENC_RESOURCE[rip]
	test	rdx, rdx
	je	.L1
	mov	ecx, 1
	mov	rsi, r12
	mov	rdi, r13
	call	update_stream_engine_usage@PLT
	mov	eax, DWORD PTR 24[rbp]
	test	eax, eax
	je	.L37
.L10:
	mov	rax, QWORD PTR 32[r15]
	test	rax, rax
	je	.L13
	mov	edi, DWORD PTR [rax]
	call	dc_is_embedded_signal@PLT
	test	rax, rax
	jne	.L38
.L13:
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L15
	lea	esi, -1[rax]
	mov	rcx, QWORD PTR 16[rbx]
	xor	eax, eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdx, 1[rax]
	cmp	rax, rsi
	je	.L15
	mov	rax, rdx
.L18:
	cmp	QWORD PTR [rcx+rax*8], rbp
	jne	.L16
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR [r15]
	lea	rax, [rax+rdx*4]
	mov	rdx, QWORD PTR 16[r15]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR 8[rax], edx
	mov	rdx, QWORD PTR 8[r15]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR 4[rax], edx
	mov	edx, -1
	test	rcx, rcx
	je	.L17
	mov	edx, DWORD PTR [rcx]
.L17:
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR DC_OK[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	mov	esi, DWORD PTR 32[rbp]
	lea	rdx, 28[rbp]
	mov	rdi, r14
	call	dc_validate_seamless_boot_timing@PLT
	test	rax, rax
	je	.L2
	mov	DWORD PTR 0[rbp], 1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, rbp
	mov	rsi, r12
	mov	rdi, r13
	call	acquire_resource_from_hw_enabled_state@PLT
	test	eax, eax
	jns	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR DC_NO_CONTROLLER_RESOURCE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rsi, rbp
	lea	rdi, .LC0[rip]
	call	DC_ERROR@PLT
	mov	eax, DWORD PTR DC_ERROR_UNEXPECTED[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	eax, DWORD PTR [r12]
	mov	DWORD PTR 24[r15], eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rax, QWORD PTR 32[r15]
	mov	edi, DWORD PTR [rax]
	call	dc_is_audio_capable_signal@PLT
	test	rax, rax
	je	.L10
	cmp	QWORD PTR 16[rbp], 0
	je	.L10
	cmp	QWORD PTR 8[rbp], 0
	je	.L10
	mov	rax, QWORD PTR 8[r15]
	mov	rsi, r12
	mov	rdi, r13
	mov	edx, DWORD PTR [rax]
	call	find_first_free_audio@PLT
	mov	QWORD PTR [r15], rax
	mov	rdx, rax
	test	rax, rax
	je	.L10
	mov	ecx, 1
	mov	rsi, r12
	mov	rdi, r13
	call	update_audio_usage@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	resource_map_pool_resources, .-resource_map_pool_resources
	.comm	DC_OK,4,4
	.comm	DC_NO_STREAM_ENC_RESOURCE,4,4
	.comm	DC_NO_CONTROLLER_RESOURCE,4,4
	.comm	DC_ERROR_UNEXPECTED,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_dc_resource.c_resource_map_pool_resources.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Stream %p not found in new ctx!\012\000"
	.text
	.align	2
	.global	resource_map_pool_resources
	.syntax unified
	.arm
	.fpu softvfp
	.type	resource_map_pool_resources, %function
resource_map_pool_resources:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	mov	r6, r1
	ldr	r3, [r0, #8]
	mov	r0, r2
	ldr	r5, [r3]
	mov	r4, r2
	ldr	r9, [fp]
	bl	calculate_phy_pix_clks
	ldr	r3, [fp, #4]
	add	r10, r6, #12
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r5]
	mov	r0, r5
	ldr	r3, [r3]
	blx	r3
	cmp	r0, #0
	beq	.L47
.L2:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L3
.L6:
	mov	r2, r4
	mov	r1, r9
	mov	r0, r10
	bl	acquire_first_free_pipe
	subs	r3, r0, #0
	blt	.L4
.L5:
	ldr	r7, [r6, #12]
	add	r3, r3, r3, lsl #2
	add	r8, r7, r3, lsl #2
	ldr	r2, [r8, #8]
	lsl	r5, r3, #2
	cmp	r2, #0
	beq	.L4
	ldr	r3, [fp]
	mov	r2, r4
	ldr	r3, [r3, #4]
	mov	r1, r9
	mov	r0, r10
	ldr	r3, [r3]
	blx	r3
	cmp	r0, #0
	mov	r2, r0
	str	r0, [r8, #4]
	beq	.L48
	mov	r3, #1
	mov	r1, r9
	mov	r0, r10
	bl	update_stream_engine_usage
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L49
.L10:
	ldr	r3, [r8, #16]
	cmp	r3, #0
	beq	.L13
	ldr	r0, [r3]
	bl	dc_is_embedded_signal
	cmp	r0, #0
	ldrne	r3, [r9]
	strne	r3, [r8, #12]
.L13:
	ldr	r0, [r6]
	cmp	r0, #0
	ble	.L15
	ldr	r2, [r6, #8]
	mov	r3, #0
	sub	r2, r2, #4
	b	.L18
.L16:
	add	r3, r3, #1
	cmp	r0, r3
	beq	.L15
.L18:
	ldr	r1, [r2, #4]!
	cmp	r1, r4
	bne	.L16
	ldr	r0, [r7, r5]
	ldr	r2, [r6, #4]
	cmp	r0, #0
	mvneq	r0, #0
	ldmib	r8, {r1, ip}
	add	r3, r3, r3, lsl #1
	ldr	lr, [ip]
	ldr	ip, [r1]
	add	r1, r2, r3, lsl #2
	stmib	r1, {ip, lr}
	ldrne	r0, [r0]
	ldr	r1, .L50
	lsl	r3, r3, #2
	str	r0, [r2, r3]
	ldr	r0, [r1]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L47:
	mov	r0, fp
	ldr	r1, [r4, #20]
	add	r2, r4, #16
	bl	dc_validate_seamless_boot_timing
	cmp	r0, #0
	movne	r3, #1
	strne	r3, [r4]
	beq	.L2
.L3:
	mov	r2, r4
	mov	r1, r9
	mov	r0, r10
	bl	acquire_resource_from_hw_enabled_state
	subs	r3, r0, #0
	bge	.L5
	b	.L6
.L4:
	ldr	r3, .L50+4
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r1, r4
	ldr	r0, .L50+8
	bl	DC_ERROR
	ldr	r3, .L50+12
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L48:
	ldr	r3, .L50+16
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L49:
	ldr	r3, [r8, #16]
	ldr	r0, [r3]
	bl	dc_is_audio_capable_signal
	cmp	r0, #0
	beq	.L10
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [r8, #4]
	mov	r1, r9
	ldr	r2, [r3]
	mov	r0, r10
	bl	find_first_free_audio
	cmp	r0, #0
	mov	r2, r0
	str	r0, [r7, r5]
	beq	.L10
	mov	r0, r10
	mov	r3, #1
	mov	r1, r9
	bl	update_audio_usage
	b	.L10
.L51:
	.align	2
.L50:
	.word	DC_OK
	.word	DC_NO_CONTROLLER_RESOURCE
	.word	.LC0
	.word	DC_ERROR_UNEXPECTED
	.word	DC_NO_STREAM_ENC_RESOURCE
	.size	resource_map_pool_resources, .-resource_map_pool_resources
	.comm	DC_OK,4,4
	.comm	DC_NO_STREAM_ENC_RESOURCE,4,4
	.comm	DC_NO_CONTROLLER_RESOURCE,4,4
	.comm	DC_ERROR_UNEXPECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
