	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_event
_add_event:                             ## @add_event
	.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	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	testl	%r8d, %r8d
	je	LBB0_3
## %bb.1:
	cmpb	$0, (%r12)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_av_bprintf
LBB0_3:
	movb	$0, (%r12)
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rsi
	leal	-1(%rdx), %eax
	cmpb	$10, (%rsi,%rax)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, (%rbx)
	movb	$0, (%rsi,%rax)
	jmp	LBB0_4
LBB0_7:
	testl	%edx, %edx
	je	LBB0_13
## %bb.8:
	movq	8(%rbx), %rsi
LBB0_9:
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_ff_subtitles_queue_insert
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_av_bprint_clear
	movl	24(%r14), %eax
	movl	%eax, 8(%r15)
	movl	20(%r14), %eax
	movl	%eax, 4(%r15)
	movl	16(%r14), %eax
	movl	%eax, (%r15)
	cmpl	$-1, (%r14)
	je	LBB0_13
## %bb.11:
	movq	_AV_PKT_DATA_SUBTITLE_POSITION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_av_packet_new_side_data
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, %rbx
	movl	(%r14), %esi
	movq	%rax, %rdi
	callq	_AV_WL32
	leaq	16(%rbx), %rdi
	movl	4(%r14), %esi
	callq	_AV_WL32
	leaq	32(%rbx), %rdi
	movl	8(%r14), %esi
	callq	_AV_WL32
	addq	$48, %rbx
	movl	12(%r14), %esi
	movq	%rbx, %rdi
	callq	_AV_WL32
LBB0_13:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_PKT_DATA_SUBTITLE_POSITION,4,2 ## @AV_PKT_DATA_SUBTITLE_POSITION
	.no_dead_strip	_add_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_event
_add_event:                             ; @add_event
	.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, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	cbz	w4, LBB0_3
; %bb.1:
	ldrb	w8, [x22]
	cbz	w8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_av_bprintf
LBB0_3:
	strb	wzr, [x22]
	ldr	w2, [x20]
	cmp	w2, #1
	b.lt	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x20, #8]
	sub	w8, w2, #1
	ldrb	w9, [x1, x8]
	cmp	w9, #10
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x20]
	strb	wzr, [x1, x8]
	ldr	w2, [x20]
	cmp	w2, #0
	b.gt	LBB0_4
LBB0_6:
	cbz	w2, LBB0_12
; %bb.7:
	ldr	x1, [x20, #8]
LBB0_8:
	mov	x0, x21
	mov	w3, #0
	bl	_ff_subtitles_queue_insert
	cbz	x0, LBB0_13
; %bb.9:
	mov	x21, x0
	mov	x0, x20
	bl	_av_bprint_clear
	ldr	w8, [x19, #24]
	str	w8, [x21, #8]
	ldr	d0, [x19, #16]
	str	d0, [x21]
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_12
; %bb.10:
Lloh2:
	adrp	x8, _AV_PKT_DATA_SUBTITLE_POSITION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_PKT_DATA_SUBTITLE_POSITION@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #16
	bl	_av_packet_new_side_data
	cbz	x0, LBB0_12
; %bb.11:
	mov	x20, x0
	ldr	w1, [x19]
	bl	_AV_WL32
	add	x0, x20, #16
	ldr	w1, [x19, #4]
	bl	_AV_WL32
	add	x0, x20, #32
	ldr	w1, [x19, #8]
	bl	_AV_WL32
	add	x0, x20, #48
	ldr	w1, [x19, #12]
	bl	_AV_WL32
LBB0_12:
	mov	w0, #0
	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
LBB0_13:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_PKT_DATA_SUBTITLE_POSITION,4,2 ; @AV_PKT_DATA_SUBTITLE_POSITION
	.no_dead_strip	_add_event
.subsections_via_symbols
