	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_subtitles_read_line         ## -- Begin function ff_subtitles_read_line
	.p2align	4, 0x90
_ff_subtitles_read_line:                ## @ff_subtitles_read_line
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpq	$1, %r15
	jne	LBB0_4
## %bb.3:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_1:
	movq	%r15, %r14
	jmp	LBB0_15
LBB0_4:
	movq	%rsi, %r12
	decq	%r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ff_text_r8
	cmpb	$13, %al
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$10, %al
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%al, %al
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movb	%al, (%r12,%r14)
	movb	$0, 1(%r12,%r14)
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_5
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	callq	_ff_text_r8
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ff_text_peek_r8
	movq	%rbx, %rdi
	cmpb	$13, %al
	je	LBB0_11
## %bb.13:
	callq	_ff_text_peek_r8
	cmpb	$10, %al
	jne	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_ff_text_r8
LBB0_15:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	callq	_ff_text_eof
	testq	%rax, %rax
	jne	LBB0_15
## %bb.9:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,8,3        ## @AVERROR_INVALIDDATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_subtitles_read_line         ; -- Begin function ff_subtitles_read_line
	.p2align	2
_ff_subtitles_read_line:                ; @ff_subtitles_read_line
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	cbz	x2, LBB0_13
; %bb.1:
	mov	x20, x0
	subs	x22, x19, #1
	b.ne	LBB0_3
; %bb.2:
	mov	x19, #0
	b	LBB0_9
LBB0_3:
	mov	x21, x1
	mov	x19, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_ff_text_r8
	cmp	w0, #13
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w0, #10
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x21, x19
	strb	w0, [x8]
	strb	wzr, [x8, #1]
	add	x19, x19, #1
	cmp	x22, x19
	b.ne	LBB0_4
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_ff_text_r8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_ff_text_peek_r8
	cmp	w0, #13
	b.eq	LBB0_8
; %bb.10:
	mov	x0, x20
	bl	_ff_text_peek_r8
	cmp	w0, #10
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_ff_text_r8
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	bl	_ff_text_eof
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x19, x8, x19, eq
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,8,3        ; @AVERROR_INVALIDDATA
.subsections_via_symbols
