	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mergeSubtitleOverlaps
_mergeSubtitleOverlaps:                 ## @mergeSubtitleOverlaps
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	$0, -56(%rbp)
	callq	_hb_buffer_list_head
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_HB_BUF_FLAG_EOF@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%r14d, %r14d
	testl	%ecx, (%rax)
	jne	LBB0_5
## %bb.2:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, 8(%rax)
	je	LBB0_4
## %bb.6:
	movq	16(%rax), %rdi
	cmpq	%rdx, %rdi
	je	LBB0_4
## %bb.8:
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.9:
	movq	8(%rax), %rbx
	cmpq	%rbx, %rdi
	jle	LBB0_5
## %bb.10:
	movq	_INT64_MAX@GOTPCREL(%rip), %rsi
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testl	%ecx, (%rax)
	jne	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdx, %rbx
	je	LBB0_4
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	%rdx, 16(%rax)
	je	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%rax), %rbx
	cmpq	%rdi, %rbx
	jl	LBB0_11
## %bb.16:
	testl	%ecx, (%rax)
	je	LBB0_22
## %bb.17:
	movq	_INT64_MAX@GOTPCREL(%rip), %rsi
	jmp	LBB0_23
LBB0_4:
	movl	$-1, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	addq	$8, %rax
	movq	%rax, %rsi
LBB0_23:
	movq	(%rsi), %rbx
	leaq	-60(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	%r13, %rdi
	callq	_hb_buffer_list_head
	movq	%rax, -48(%rbp)
	movq	8(%rax), %rsi
	movq	%rsi, -72(%rbp)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, %rsi
	jge	LBB0_37
## %bb.24:
	leaq	-56(%rbp), %r12
	jmp	LBB0_26
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	cmpq	-80(%rbp), %rsi                 ## 8-byte Folded Reload
	jge	LBB0_37
LBB0_26:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
                                        ##     Child Loop BB0_33 Depth 2
	movq	%r13, %rdi
	leaq	-72(%rbp), %rdx
	callq	_findOverlap
	movq	%rax, -96(%rbp)
	testq	%rax, %rax
	je	LBB0_37
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%rax, %rsi
	movq	%rax, -48(%rbp)
	movq	$0, -56(%rbp)
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_merge_ssa
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_hb_buffer_close
	movq	%rbx, -56(%rbp)
	movq	-48(%rbp), %rax
	movq	24(%rax), %rsi
	movq	%rsi, -48(%rbp)
	testq	%rsi, %rsi
	jne	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	-72(%rbp), %rax
	movq	%rax, 16(%rbx)
	leaq	-96(%rbp), %rdi
	callq	_hb_buffer_close
	movq	-56(%rbp), %rsi
	leaq	-60(%rbp), %rdi
	callq	_hb_buffer_list_append
	movq	-72(%rbp), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_hb_buffer_list_head
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_25
## %bb.30:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%rax, %rsi
	jmp	LBB0_33
LBB0_31:                                ##   in Loop: Header=BB0_33 Depth=2
	movq	%rax, 8(%rsi)
LBB0_32:                                ##   in Loop: Header=BB0_33 Depth=2
	movq	%rbx, -48(%rbp)
	movq	%rbx, %rsi
	testq	%rbx, %rbx
	je	LBB0_25
LBB0_33:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %rax
	cmpq	%rax, 8(%rsi)
	jge	LBB0_25
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=2
	movl	(%r15), %ecx
	testl	%ecx, (%rsi)
	jne	LBB0_25
## %bb.35:                              ##   in Loop: Header=BB0_33 Depth=2
	movq	24(%rsi), %rbx
	cmpq	%rax, 16(%rsi)
	jg	LBB0_31
## %bb.36:                              ##   in Loop: Header=BB0_33 Depth=2
	movq	%r13, %rdi
	callq	_hb_buffer_list_rem
	leaq	-48(%rbp), %rdi
	callq	_hb_buffer_close
	jmp	LBB0_32
LBB0_37:
	leaq	-60(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	%rax, -56(%rbp)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_prepend
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ## @HB_BUF_FLAG_EOF
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.no_dead_strip	_mergeSubtitleOverlaps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mergeSubtitleOverlaps
_mergeSubtitleOverlaps:                 ; @mergeSubtitleOverlaps
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	str	xzr, [sp, #40]
	bl	_hb_buffer_list_head
	cbz	x0, LBB0_27
; %bb.1:
	ldr	w9, [x0]
Lloh0:
	adrp	x21, _HB_BUF_FLAG_EOF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HB_BUF_FLAG_EOF@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w9
	b.eq	LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_28
LBB0_3:
	ldr	x10, [x0, #8]
Lloh2:
	adrp	x9, _AV_NOPTS_VALUE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x10, x9
	b.eq	LBB0_27
; %bb.4:
	ldr	x12, [x0, #16]
	cmp	x12, x9
	b.eq	LBB0_27
; %bb.5:
	ldr	x11, [x0, #24]
	cbz	x11, LBB0_27
; %bb.6:
	ldr	x13, [x11, #8]
	cmp	x12, x13
	b.le	LBB0_2
; %bb.7:
Lloh5:
	adrp	x10, _INT64_MAX@GOTPAGE
Lloh6:
	ldr	x10, [x10, _INT64_MAX@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11]
	tst	w8, w14
	b.ne	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x13, x9
	b.eq	LBB0_27
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x13, [x11, #16]
	cmp	x13, x9
	b.eq	LBB0_27
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x11, [x11, #24]
	cbz	x11, LBB0_27
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x13, [x11, #8]
	cmp	x13, x12
	b.lt	LBB0_8
; %bb.13:
	ldr	w9, [x11], #8
	tst	w8, w9
	csel	x10, x11, x10, eq
LBB0_14:
	ldr	x22, [x10]
	add	x0, sp, #28
	bl	_hb_buffer_list_clear
	mov	x0, x19
	bl	_hb_buffer_list_head
	str	x0, [sp, #32]
	ldr	x20, [x0, #8]
	str	x20, [sp, #16]
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
	cmp	x20, x22
	b.ge	LBB0_29
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x20
	bl	_findOverlap
	str	x0, [sp, #8]
	cbz	x0, LBB0_29
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x0
	mov	x20, #0
	stp	x0, xzr, [sp, #32]
LBB0_18:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_merge_ssa
	mov	x20, x0
	add	x0, sp, #40
	bl	_hb_buffer_close
	ldr	x8, [sp, #32]
	ldr	x1, [x8, #24]
	stp	x1, x20, [sp, #32]
	cbnz	x1, LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [sp, #16]
	str	x8, [x20, #16]
	add	x0, sp, #8
	bl	_hb_buffer_close
	ldr	x1, [sp, #40]
	add	x0, sp, #28
	bl	_hb_buffer_list_append
	ldr	x20, [sp, #16]
	mov	x0, x19
	bl	_hb_buffer_list_head
	str	x0, [sp, #32]
	cbz	x0, LBB0_15
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x0
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=2
	str	x8, [x1, #8]
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=2
	str	x23, [sp, #32]
	mov	x1, x23
	cbz	x23, LBB0_15
LBB0_23:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x1, #8]
	ldr	x8, [sp, #16]
	cmp	x9, x8
	b.ge	LBB0_15
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	w9, [x1]
	ldr	w10, [x21]
	tst	w10, w9
	b.ne	LBB0_15
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=2
	ldp	x9, x23, [x1, #16]
	cmp	x9, x8
	b.gt	LBB0_21
; %bb.26:                               ;   in Loop: Header=BB0_23 Depth=2
	mov	x0, x19
	bl	_hb_buffer_list_rem
	add	x0, sp, #32
	bl	_hb_buffer_close
	b	LBB0_22
LBB0_27:
	mov	w0, #-1
LBB0_28:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_29:
	add	x0, sp, #28
	bl	_hb_buffer_list_clear
	mov	x1, x0
	str	x0, [sp, #40]
	mov	x0, x19
	bl	_hb_buffer_list_prepend
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HB_BUF_FLAG_EOF,4,2            ; @HB_BUF_FLAG_EOF
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.no_dead_strip	_mergeSubtitleOverlaps
.subsections_via_symbols
