	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvdsub_decode
_dvdsub_decode:                         ## @dvdsub_decode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rdi), %r12
	movq	8(%rcx), %r14
	movl	(%rcx), %ecx
	movl	(%r12), %eax
	testl	%eax, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	je	LBB0_4
## %bb.1:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ecx, %edx
	callq	_append_to_cached_buf
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	16(%r12), %r14
	movl	(%r12), %ecx
LBB0_4:
	movq	%r12, %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_decode_dvd_subtitles
	movl	%eax, %r15d
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %r15d
	jne	LBB0_7
## %bb.5:
	xorl	%eax, %eax
	movl	$0, (%rbx)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_16
## %bb.6:
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_append_to_cached_buf           ## TAILCALL
LBB0_7:
	testl	%r15d, %r15d
	js	LBB0_8
## %bb.10:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_find_smallest_bounding_rectangle
	testq	%rax, %rax
	je	LBB0_9
LBB0_12:
	cmpq	$0, 8(%r12)
	je	LBB0_14
## %bb.13:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_AV_SUBTITLE_FLAG_FORCED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
LBB0_14:
	movl	$0, (%r12)
	movl	$1, (%rbx)
	jmp	LBB0_15
LBB0_2:
	movl	$0, (%rbx)
	jmp	LBB0_16
LBB0_8:
	movl	$0, (%r12)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_9:
	movq	%r15, %rdi
	callq	_reset_rects
	movl	$0, (%rbx)
LBB0_15:
	movl	%r14d, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_SUBTITLE_FLAG_FORCED,4,2    ## @AV_SUBTITLE_FLAG_FORCED
	.no_dead_strip	_dvdsub_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvdsub_decode
_dvdsub_decode:                         ; @dvdsub_decode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x23, x0
	ldr	x22, [x0]
	ldr	x24, [x3, #8]
	ldr	w20, [x3]
	ldr	w26, [x22]
	cbz	w26, LBB0_3
; %bb.1:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x20
	bl	_append_to_cached_buf
	tbnz	w0, #31, LBB0_12
; %bb.2:
	ldr	x24, [x22, #16]
	ldr	w20, [x22]
LBB0_3:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	mov	x3, x20
	bl	_decode_dvd_subtitles
	mov	x25, x0
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
	cmp	w25, w0
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #0
	str	wzr, [x19]
	cbnz	w26, LBB0_16
; %bb.5:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_append_to_cached_buf
LBB0_6:
	tbnz	w25, #31, LBB0_13
; %bb.7:
	cbnz	w25, LBB0_9
; %bb.8:
	mov	x0, x22
	mov	x1, x21
	bl	_find_smallest_bounding_rectangle
	cbz	x0, LBB0_14
LBB0_9:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AV_SUBTITLE_FLAG_FORCED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_SUBTITLE_FLAG_FORCED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
LBB0_11:
	str	wzr, [x22]
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_15
LBB0_12:
	str	wzr, [x19]
	b	LBB0_16
LBB0_13:
	str	wzr, [x22]
LBB0_14:
	mov	x0, x21
	bl	_reset_rects
	str	wzr, [x19]
LBB0_15:
	mov	x0, x20
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_SUBTITLE_FLAG_FORCED,4,2    ; @AV_SUBTITLE_FLAG_FORCED
	.no_dead_strip	_dvdsub_decode
.subsections_via_symbols
