	.file	"extr_demux.c_demux_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	demux_update
	.type	demux_update, @function
demux_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR 8[rdi]
	movsd	QWORD PTR 8[rsp], xmm0
	cmp	QWORD PTR 32[rax], rdi
	sete	dil
	movzx	edi, dil
	call	assert@PLT
	mov	rbx, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR 28[rbx]
	test	edx, edx
	je	.L15
.L2:
	lea	r13, 16[rbx]
	mov	rdi, r13
	call	pthread_mutex_lock@PLT
	mov	edi, DWORD PTR 24[rbx]
	movsd	xmm0, QWORD PTR 8[rsp]
	neg	edi
	call	MP_ADD_PTS@PLT
	mov	rdi, rbx
	movsd	QWORD PTR 8[rsp], xmm0
	movsd	xmm0, QWORD PTR [rbx]
	call	lookup_timed_metadata@PLT
	movsd	xmm0, QWORD PTR 8[rsp]
	mov	rdi, rbx
	mov	r12, rax
	call	lookup_timed_metadata@PLT
	mov	rsi, rax
	cmp	r12, rax
	je	.L16
.L3:
	mov	DWORD PTR 8[rbx], 0
	mov	rdi, rbp
	call	update_final_metadata@PLT
	mov	edx, DWORD PTR DEMUX_EVENT_METADATA[rip]
	mov	eax, DWORD PTR 0[rbp]
	or	eax, edx
.L4:
	movsd	xmm1, QWORD PTR 8[rsp]
	or	eax, DWORD PTR 12[rbx]
	or	edx, DWORD PTR DEMUX_EVENT_STREAMS[rip]
	movsd	QWORD PTR [rbx], xmm1
	mov	DWORD PTR 0[rbp], eax
	mov	DWORD PTR 12[rbx], 0
	test	edx, eax
	jne	.L17
.L5:
	test	DWORD PTR DEMUX_EVENT_DURATION[rip], eax
	je	.L6
	mov	eax, DWORD PTR 20[rbx]
	mov	DWORD PTR 4[rbp], eax
.L6:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	pthread_mutex_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	jne	.L3
	mov	eax, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR DEMUX_EVENT_METADATA[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, rbx
	call	update_cache@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rbp
	call	demux_update_replaygain@PLT
	mov	eax, DWORD PTR 0[rbp]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	demux_update, .-demux_update
	.comm	DEMUX_EVENT_STREAMS,4,4
	.comm	DEMUX_EVENT_METADATA,4,4
	.comm	DEMUX_EVENT_DURATION,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_demux.c_demux_update.c"
	.text
	.align	2
	.global	demux_update
	.syntax unified
	.arm
	.fpu softvfp
	.type	demux_update, %function
demux_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r1, [r0, #8]
	mov	r7, r3
	ldr	r0, [r1, #32]
	mov	r6, r2
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r4, [r5, #8]
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L15
.L2:
	add	r8, r4, #16
	mov	r0, r8
	bl	pthread_mutex_lock
	ldr	r2, [r4, #24]
	mov	r0, r6
	mov	r1, r7
	rsb	r2, r2, #0
	bl	MP_ADD_PTS
	ldmia	r4, {r2-r3}
	mov	r6, r0
	mov	r0, r4
	mov	r7, r1
	bl	lookup_timed_metadata
	mov	r2, r6
	mov	r9, r0
	mov	r3, r7
	mov	r0, r4
	bl	lookup_timed_metadata
	cmp	r9, r0
	mov	r1, r0
	beq	.L16
.L3:
	mov	r3, #0
	mov	r0, r5
	str	r3, [r4, #8]
	bl	update_final_metadata
	ldr	r2, .L18
	ldr	r3, [r5]
	ldr	r2, [r2]
	orr	r3, r2, r3
.L4:
	mov	r1, #0
	ldr	r0, .L18+4
	stm	r4, {r6-r7}
	ldr	ip, [r0]
	ldr	r0, [r4, #12]
	orr	r2, r2, ip
	orr	r3, r3, r0
	tst	r2, r3
	str	r3, [r5]
	str	r1, [r4, #12]
	bne	.L17
.L5:
	ldr	r2, .L18+8
	mov	r0, r8
	ldr	r2, [r2]
	tst	r3, r2
	ldrne	r3, [r4, #20]
	strne	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	pthread_mutex_unlock
.L16:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L3
	ldr	r2, .L18
	ldr	r3, [r5]
	ldr	r2, [r2]
	b	.L4
.L15:
	mov	r0, r4
	bl	update_cache
	b	.L2
.L17:
	mov	r0, r5
	bl	demux_update_replaygain
	ldr	r3, [r5]
	b	.L5
.L19:
	.align	2
.L18:
	.word	DEMUX_EVENT_METADATA
	.word	DEMUX_EVENT_STREAMS
	.word	DEMUX_EVENT_DURATION
	.size	demux_update, .-demux_update
	.comm	DEMUX_EVENT_STREAMS,4,4
	.comm	DEMUX_EVENT_METADATA,4,4
	.comm	DEMUX_EVENT_DURATION,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
