	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_subtitles_queue_finalize    ## -- Begin function ff_subtitles_queue_finalize
	.p2align	4, 0x90
_ff_subtitles_queue_finalize:           ## @ff_subtitles_queue_finalize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movl	(%rsi), %esi
	testl	%esi, %esi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movq	8(%rbx), %rax
	movq	24(%rbx), %rdi
	movq	_SUB_SORT_TS_POS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_cmp_pkt_sub_ts_pos@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_cmp_pkt_sub_pos_ts@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movl	$16, %edx
	callq	_qsort
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	movq	24(%rbx), %rcx
	leal	-1(%rax), %edx
	xorl	%esi, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %rcx
	cmpq	%rsi, %rax
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %rdi
	incq	%rsi
	cmpq	$0, (%rcx)
	jns	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%rdx, %rdi
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rcx), %rdi
	subq	8(%rcx), %rdi
	movq	%rdi, (%rcx)
	jmp	LBB0_9
LBB0_10:
	cmpl	$0, 16(%rbx)
	je	LBB0_12
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_drop_dups                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SUB_SORT_TS_POS,8,3            ## @SUB_SORT_TS_POS
	.comm	_cmp_pkt_sub_ts_pos,4,2         ## @cmp_pkt_sub_ts_pos
	.comm	_cmp_pkt_sub_pos_ts,4,2         ## @cmp_pkt_sub_pos_ts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_subtitles_queue_finalize    ; -- Begin function ff_subtitles_queue_finalize
	.p2align	2
_ff_subtitles_queue_finalize:           ; @ff_subtitles_queue_finalize
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w1, [x1]
	cbz	w1, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #24]
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _SUB_SORT_TS_POS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SUB_SORT_TS_POS@GOTPAGEOFF]
Lloh2:
	adrp	x10, _cmp_pkt_sub_ts_pos@GOTPAGE
Lloh3:
	ldr	x10, [x10, _cmp_pkt_sub_ts_pos@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _cmp_pkt_sub_pos_ts@GOTPAGE
Lloh6:
	ldr	x11, [x11, _cmp_pkt_sub_pos_ts@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w3, [x8]
	mov	w2, #16
	bl	_qsort
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x9, #0
	ldr	x10, [x19, #24]
	sub	w11, w8, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	add	x10, x10, #16
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	tbz	x12, #63, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x9, x11
	b.hs	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x10, #24]
	ldr	x13, [x10, #8]
	sub	x12, x12, x13
	str	x12, [x10]
	b	LBB0_3
LBB0_7:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_drop_dups
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SUB_SORT_TS_POS,8,3            ; @SUB_SORT_TS_POS
	.comm	_cmp_pkt_sub_ts_pos,4,2         ; @cmp_pkt_sub_ts_pos
	.comm	_cmp_pkt_sub_pos_ts,4,2         ; @cmp_pkt_sub_pos_ts
.subsections_via_symbols
