	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mergeSubtitles
_mergeSubtitles:                        ## @mergeSubtitles
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-36(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movl	4(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_hb_buffer_list_count
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.1:
	testq	%rax, %rax
	jle	LBB0_15
## %bb.2:
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %r15
	leaq	-36(%rbp), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_hb_buffer_list_count
	testq	%rax, %rax
	jle	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_hb_buffer_list_head
	movl	(%r15), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_mergeSubtitleOverlaps
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_hb_buffer_list_rem_head
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_setSubDuration
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	jmp	LBB0_14
LBB0_5:
	testq	%rax, %rax
	jle	LBB0_15
## %bb.6:
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %r15
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %r12
	leaq	-36(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_hb_buffer_list_head
	movl	(%r15), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rax), %rax
	cmpq	(%r12), %rax
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_hb_buffer_list_rem_head
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_setSubDuration
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movq	%rbx, %rdi
	callq	_hb_buffer_list_count
	testq	%rax, %rax
	jg	LBB0_7
	jmp	LBB0_15
LBB0_4:
	movq	%rbx, %rdi
	callq	_hb_buffer_list_rem_head
	leaq	-36(%rbp), %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
LBB0_15:
	leaq	-36(%rbp), %rdi
	callq	_hb_buffer_list_clear
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_mergeSubtitles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mergeSubtitles
_mergeSubtitles:                        ; @mergeSubtitles
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	ldr	w20, [x19, #4]
	mov	x0, x19
	bl	_hb_buffer_list_count
	cmp	x0, #1
	cbz	w20, LBB0_9
; %bb.1:
	b.lt	LBB0_15
; %bb.2:
Lloh0:
	adrp	x20, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_hb_buffer_list_count
	cmp	x0, #0
	b.le	LBB0_15
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_hb_buffer_list_head
	ldr	w8, [x0]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_mergeSubtitleOverlaps
	tbnz	w0, #31, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_hb_buffer_list_rem_head
	cbz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	ldr	w8, [x0]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_setSubDuration
	mov	x1, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_append
	b	LBB0_3
LBB0_9:
	b.lt	LBB0_15
; %bb.10:
Lloh2:
	adrp	x20, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh3:
	ldr	x20, [x20, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
Lloh4:
	adrp	x21, _AV_NOPTS_VALUE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _AV_NOPTS_VALUE@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_hb_buffer_list_head
	ldr	w8, [x0]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x0, #8]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	bl	_hb_buffer_list_rem_head
	mov	x1, x0
	mov	x0, x19
	bl	_setSubDuration
	mov	x1, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_append
	mov	x0, x19
	bl	_hb_buffer_list_count
	cmp	x0, #0
	b.gt	LBB0_11
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_hb_buffer_list_rem_head
	mov	x1, x0
	add	x0, sp, #12
	bl	_hb_buffer_list_append
LBB0_15:
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_mergeSubtitles
.subsections_via_symbols
