	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_packet
_write_packet:                          ## @write_packet
	.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	$1144, %rsp                     ## imm = 0x478
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	32(%rdi), %r15
	movq	8(%rdi), %rax
	movq	(%rsi), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r14
	movl	8(%r14), %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, -1144(%rbp)               ## 8-byte Spill
	cmpl	$0, 32(%r15)
	movq	%rbx, -1136(%rbp)               ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movq	16(%r12), %rax
	movq	%rax, -80(%rbp)
	movl	$0, -1116(%rbp)                 ## 4-byte Folded Spill
	cmpq	$0, 48(%r15)
	je	LBB0_16
LBB0_2:
	movl	(%r14), %edi
	movl	4(%r14), %ebx
	imull	%edi, %ebx
	movq	-1144(%rbp), %r13               ## 8-byte Reload
	movl	20(%r13), %esi
	callq	_AV_CEIL_RSHIFT
	movl	%eax, -1128(%rbp)               ## 4-byte Spill
	movl	4(%r14), %edi
	movl	16(%r13), %esi
	movq	%r13, %r14
	callq	_AV_CEIL_RSHIFT
	movl	%eax, %r13d
	imull	-1128(%rbp), %r13d              ## 4-byte Folded Reload
	movq	8(%r14), %rax
	cmpl	$9, (%rax)
	setge	%cl
	shll	%cl, %ebx
	shll	%cl, %r13d
	movq	-80(%rbp), %rdi
	movq	-1136(%rbp), %r14               ## 8-byte Reload
	movq	16(%r14), %rsi
	movl	%ebx, %edx
	callq	_avio_write
	movq	-72(%rbp), %rdi
	movslq	%ebx, %rbx
	movq	16(%r14), %rsi
	addq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_avio_write
	movq	-64(%rbp), %rdi
	movslq	%r13d, %rdx
	leaq	(%rdx,%rbx), %rsi
	addq	16(%r14), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_avio_write
	movq	%r12, %rdi
	leaq	-72(%rbp), %rsi
	callq	_ff_format_io_close
	movq	%r12, %rdi
	leaq	-64(%rbp), %rsi
	callq	_ff_format_io_close
	movq	-1144(%rbp), %rax               ## 8-byte Reload
	cmpl	$4, (%rax)
	jl	LBB0_29
## %bb.3:
	leaq	-56(%rbp), %r14
	movq	-56(%rbp), %rdi
	addl	%r13d, %r13d
	movslq	%r13d, %rsi
	addq	%rbx, %rsi
	movq	-1136(%rbp), %rax               ## 8-byte Reload
	addq	16(%rax), %rsi
	movl	%ebx, %edx
	callq	_avio_write
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ff_format_io_close
	jmp	LBB0_29
LBB0_4:
	cmpq	$0, 80(%r15)
	je	LBB0_25
## %bb.5:
	movq	(%r15), %rsi
	leaq	-1104(%rbp), %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_av_strlcpy
LBB0_6:
	movq	%r14, -1128(%rbp)               ## 8-byte Spill
	movl	$1, %r14d
	leaq	-80(%rbp), %r13
	leaq	-1104(%rbp), %rbx
	movq	%r15, -1152(%rbp)               ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	-8(%rax,%r14,8), %rdi
	movl	$8, %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rcx
	callq	_snprintf
	movq	24(%r15), %rax
	movq	-8(%rax,%r14,8), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_av_strlcpy
	cmpq	$0, 56(%r15)
	movq	%rbx, %rdx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r15), %rax
	movq	-8(%rax,%r14,8), %rdx
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	_AVIO_FLAG_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	callq	*(%r12)
	testq	%rax, %rax
	js	LBB0_35
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, 48(%r15)
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-1144(%rbp), %rax               ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %r15
	leaq	L_.str.5(%rip), %rax
	movzbl	-1(%r14,%rax), %r12d
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	movb	%r12b, -1(%rax,%rbx)
	movq	%r15, %r12
	movq	-1152(%rbp), %r15               ## 8-byte Reload
	incq	%r14
	addq	$8, %r13
	cmpq	$5, %r14
	jne	LBB0_7
## %bb.13:
	movl	$4, %r14d
	jmp	LBB0_15
LBB0_14:
	decl	%r14d
LBB0_15:
	incl	%r14d
	xorl	%eax, %eax
	cmpq	$0, 56(%r15)
	cmovnel	%r14d, %eax
	movl	%eax, -1116(%rbp)               ## 4-byte Spill
	movq	-1136(%rbp), %rbx               ## 8-byte Reload
	movq	-1128(%rbp), %r14               ## 8-byte Reload
	cmpq	$0, 48(%r15)
	jne	LBB0_2
LBB0_16:
	cmpq	$0, 40(%r15)
	je	LBB0_28
## %bb.17:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -1168(%rbp)
	movaps	%xmm0, -1184(%rbp)
	movq	$0, -1112(%rbp)
	movl	$1, %edi
	callq	_av_assert0
	movq	40(%r15), %rdx
	movl	24(%r12), %ecx
	leaq	-1112(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avformat_alloc_output_context2
	testl	%eax, %eax
	js	LBB0_49
## %bb.18:
	movq	-1112(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_45
## %bb.19:
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movq	-80(%rbp), %rax
	movq	-1112(%rbp), %rcx
	movq	%rax, 16(%rcx)
	leaq	-1184(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_av_packet_ref
	testl	%eax, %eax
	js	LBB0_39
## %bb.20:
	movl	8(%r14), %edi
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rsi
	callq	_avcodec_parameters_copy
	testl	%eax, %eax
	js	LBB0_39
## %bb.21:
	movq	-1112(%rbp), %rdi
	xorl	%esi, %esi
	callq	_avformat_write_header
	testl	%eax, %eax
	js	LBB0_39
## %bb.22:
	movq	-1112(%rbp), %rdi
	leaq	-1184(%rbp), %rsi
	callq	_av_interleaved_write_frame
	testl	%eax, %eax
	js	LBB0_39
## %bb.23:
	movq	-1112(%rbp), %rdi
	callq	_av_write_trailer
	testl	%eax, %eax
	js	LBB0_39
## %bb.24:
	leaq	-1184(%rbp), %rdi
	callq	_av_packet_unref
	movq	-1112(%rbp), %rdi
	callq	_avformat_free_context
	jmp	LBB0_29
LBB0_25:
	cmpq	$0, 72(%r15)
	je	LBB0_40
## %bb.26:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_time
	leaq	-1184(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_localtime_r
	movq	(%r15), %rdx
	leaq	-1104(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rcx
	callq	_strftime
	testl	%eax, %eax
	jne	LBB0_6
## %bb.27:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_43
LBB0_28:
	movq	-80(%rbp), %rdi
	movq	16(%rbx), %rsi
	movl	12(%rbx), %edx
	callq	_avio_write
LBB0_29:
	movq	-80(%rbp), %rdi
	callq	_avio_flush
	cmpl	$0, 32(%r15)
	je	LBB0_31
LBB0_30:
	incl	8(%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_50
LBB0_31:
	leaq	-80(%rbp), %rsi
	movq	%r12, %rdi
	callq	_ff_format_io_close
	cmpl	$0, -1116(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_30
## %bb.32:
	movl	-1116(%rbp), %r14d              ## 4-byte Reload
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	24(%r15), %rcx
	movq	(%rax,%rbx,8), %rdi
	movq	(%rcx,%rbx,8), %rsi
	movq	%r12, %rdx
	callq	_ff_rename
	testl	%eax, %eax
	js	LBB0_49
## %bb.34:                              ##   in Loop: Header=BB0_33 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_33
	jmp	LBB0_30
LBB0_35:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpq	$0, 56(%r15)
	je	LBB0_46
## %bb.36:
	movq	16(%r15), %rax
	movq	-8(%rax,%r14,8), %rcx
	jmp	LBB0_47
LBB0_39:
	movl	%eax, %r13d
	leaq	-1184(%rbp), %rdi
	callq	_av_packet_unref
	movq	-1112(%rbp), %rdi
	callq	_avformat_free_context
	jmp	LBB0_50
LBB0_40:
	cmpq	$0, 64(%r15)
	movq	(%r15), %rdx
	je	LBB0_52
## %bb.41:
	movl	8(%rbx), %ecx
	movq	_AV_FRAME_FILENAME_FLAGS_MULTIPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-1104(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_av_get_frame_filename2
	testq	%rax, %rax
	jns	LBB0_6
## %bb.42:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_43:
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_44:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_48
LBB0_45:
	movq	-1112(%rbp), %rdi
	callq	_avformat_free_context
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_48
LBB0_46:
	leaq	-1104(%rbp), %rcx
LBB0_47:
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_48:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_49:
	movl	%eax, %r13d
LBB0_50:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_55
## %bb.51:
	movl	%r13d, %eax
	addq	$1144, %rsp                     ## imm = 0x478
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_52:
	movl	8(%r15), %ecx
	movq	_AV_FRAME_FILENAME_FLAGS_MULTIPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-1104(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_av_get_frame_filename2
	testq	%rax, %rax
	jns	LBB0_6
## %bb.53:
	movl	8(%r15), %ecx
	cmpl	$2, %ecx
	jl	LBB0_6
## %bb.54:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %r8
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_44
LBB0_55:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not get frame filename with strftime\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_FRAME_FILENAME_FLAGS_MULTIPLE,4,2 ## @AV_FRAME_FILENAME_FLAGS_MULTIPLE
L_.str.1:                               ## @.str.1
	.asciz	"Cannot write filename by pts of the frames."

L_.str.2:                               ## @.str.2
	.asciz	"Could not get frame filename number %d from pattern '%s'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %%03d within the filename.\n"

L_.str.3:                               ## @.str.3
	.asciz	"%s.tmp"

	.comm	_AVIO_FLAG_WRITE,4,2            ## @AVIO_FLAG_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"Could not open file : %s\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.5:                               ## @.str.5
	.asciz	"UVAx"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_packet
_write_packet:                          ; @write_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1136
	mov	x28, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x26, [x0, #32]
	ldr	x8, [x0, #8]
	ldr	x9, [x1]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x25, [x8]
	ldr	w0, [x25, #8]
	bl	_av_pix_fmt_desc_get
	mov	x21, x0
	ldr	w8, [x26, #32]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w27, #0
	ldr	x8, [x19, #16]
	stur	x8, [x29, #-128]
	ldr	x8, [x26, #48]
	cbz	x8, LBB0_14
LBB0_2:
	ldp	w0, w8, [x25]
	mul	w20, w8, w0
	ldr	w1, [x21, #20]
	bl	_AV_CEIL_RSHIFT
	mov	x22, x0
	ldr	w0, [x25, #4]
	ldr	w1, [x21, #16]
	bl	_AV_CEIL_RSHIFT
	mul	w8, w0, w22
	ldr	x9, [x21, #8]
	ldr	w9, [x9]
	cmp	w9, #8
	cset	w9, gt
	lsl	w23, w20, w9
	lsl	w22, w8, w9
	ldur	x0, [x29, #-128]
	ldr	x1, [x28, #16]
	mov	x2, x23
	bl	_avio_write
	sub	x20, x29, #128
	add	x24, x20, #8
	ldur	x0, [x29, #-120]
	ldr	x8, [x28, #16]
	sxtw	x23, w23
	add	x1, x8, x23
	mov	x2, x22
	bl	_avio_write
	add	x25, x20, #16
	ldur	x0, [x29, #-112]
	ldr	x8, [x28, #16]
	add	x9, x23, w22, sxtw
	add	x1, x9, x8
	mov	x2, x22
	bl	_avio_write
	mov	x0, x19
	mov	x1, x24
	bl	_ff_format_io_close
	mov	x0, x19
	mov	x1, x25
	bl	_ff_format_io_close
	ldr	w8, [x21]
	cmp	w8, #4
	b.lt	LBB0_27
; %bb.3:
	add	x21, x20, #24
	ldur	x0, [x29, #-104]
	ldr	x8, [x28, #16]
	lsl	w9, w22, #1
	add	x9, x23, w9, sxtw
	add	x1, x9, x8
	mov	x2, x23
	bl	_avio_write
	mov	x0, x19
	mov	x1, x21
	bl	_ff_format_io_close
	b	LBB0_27
LBB0_4:
	ldr	x8, [x26, #80]
	cbz	x8, LBB0_23
; %bb.5:
	ldr	x1, [x26]
	add	x0, sp, #64
	mov	w2, #1024
	bl	_av_strlcpy
LBB0_6:
	str	x28, [sp, #16]                  ; 8-byte Folded Spill
	mov	x27, #0
Lloh3:
	adrp	x22, l_.str.3@PAGE
Lloh4:
	add	x22, x22, l_.str.3@PAGEOFF
	sub	x23, x29, #128
Lloh5:
	adrp	x28, _AVIO_FLAG_WRITE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _AVIO_FLAG_WRITE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x24, sp, #64
	ldr	x8, [x26, #16]
	lsl	x20, x27, #3
	ldr	x0, [x8, x20]
	add	x3, sp, #64
	mov	w1, #8
	mov	x2, x22
	bl	_snprintf
	ldr	x8, [x26, #24]
	ldr	x0, [x8, x20]
	add	x1, sp, #64
	mov	w2, #8
	bl	_av_strlcpy
	ldr	x8, [x26, #56]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x26, #16]
	ldr	x24, [x8, x27, lsl #3]
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19]
	ldr	w3, [x28]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	mov	x4, #0
	blr	x8
	tbnz	x0, #63, LBB0_33
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x26, #48]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	add	x24, x27, #1
	ldrsw	x8, [x21]
	cmp	x24, x8
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh7:
	adrp	x8, l_.str.5@PAGE
Lloh8:
	add	x8, x8, l_.str.5@PAGEOFF
	ldrb	w20, [x8, x27]
	add	x0, sp, #64
	bl	_strlen
	add	x8, sp, #64
	add	x8, x8, w0, sxtw
	sturb	w20, [x8, #-1]
	add	x23, x23, #8
	mov	x27, x24
	cmp	x24, #4
	b.ne	LBB0_7
LBB0_13:
	ldr	x8, [x26, #56]
	cmp	x8, #0
	csinc	w27, wzr, w27, eq
	ldr	x28, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x8, [x26, #48]
	cbnz	x8, LBB0_2
LBB0_14:
	ldr	x8, [x26, #40]
	cbz	x8, LBB0_26
; %bb.15:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	str	xzr, [sp, #24]
	mov	w0, #1
	bl	_av_assert0
	ldr	x2, [x26, #40]
	ldr	w3, [x19, #24]
	add	x0, sp, #24
	mov	x1, #0
	bl	_avformat_alloc_output_context2
	tbnz	w0, #31, LBB0_47
; %bb.16:
	ldr	x0, [sp, #24]
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_39
; %bb.17:
	mov	x22, x0
	ldr	x8, [x28]
	str	x8, [x0]
	ldur	x8, [x29, #-128]
	ldr	x9, [sp, #24]
	str	x8, [x9, #16]
	add	x0, sp, #32
	mov	x1, x28
	bl	_av_packet_ref
	tbnz	w0, #31, LBB0_35
; %bb.18:
	ldr	w0, [x22, #8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x1, [x8]
	bl	_avcodec_parameters_copy
	tbnz	w0, #31, LBB0_35
; %bb.19:
	ldr	x0, [sp, #24]
	mov	x1, #0
	bl	_avformat_write_header
	tbnz	w0, #31, LBB0_35
; %bb.20:
	ldr	x0, [sp, #24]
	add	x1, sp, #32
	bl	_av_interleaved_write_frame
	tbnz	w0, #31, LBB0_35
; %bb.21:
	ldr	x0, [sp, #24]
	bl	_av_write_trailer
	tbnz	w0, #31, LBB0_35
; %bb.22:
	add	x0, sp, #32
	bl	_av_packet_unref
	ldr	x0, [sp, #24]
	bl	_avformat_free_context
	b	LBB0_27
LBB0_23:
	ldr	x8, [x26, #72]
	cbz	x8, LBB0_36
; %bb.24:
	sub	x0, x29, #128
	bl	_time
	sub	x0, x29, #128
	add	x1, sp, #32
	bl	_localtime_r
	mov	x3, x0
	ldr	x2, [x26]
	add	x0, sp, #64
	mov	w1, #1024
	bl	_strftime
	cbnz	w0, LBB0_6
; %bb.25:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_45
LBB0_26:
	ldur	x0, [x29, #-128]
	ldr	x1, [x28, #16]
	ldr	w2, [x28, #12]
	bl	_avio_write
LBB0_27:
	ldur	x0, [x29, #-128]
	bl	_avio_flush
	ldr	w8, [x26, #32]
	cbz	w8, LBB0_29
LBB0_28:
	mov	w21, #0
	ldr	w8, [x26, #8]
	add	w8, w8, #1
	str	w8, [x26, #8]
	b	LBB0_48
LBB0_29:
	sub	x1, x29, #128
	mov	x0, x19
	bl	_ff_format_io_close
	cmp	w27, #1
	b.lt	LBB0_28
; %bb.30:
	mov	x20, #0
	mov	w8, w27
	lsl	x22, x8, #3
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x26, #16]
	ldr	x0, [x8, x20]
	ldr	x1, [x9, x20]
	mov	x2, x19
	bl	_ff_rename
	tbnz	w0, #31, LBB0_47
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	add	x20, x20, #8
	cmp	x22, x20
	b.ne	LBB0_31
	b	LBB0_28
LBB0_33:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x8, [x26, #56]
	cbz	x8, LBB0_40
; %bb.34:
	ldr	x8, [x26, #16]
	ldr	x8, [x8, x27, lsl #3]
	b	LBB0_41
LBB0_35:
	mov	x21, x0
	add	x0, sp, #32
	bl	_av_packet_unref
	ldr	x0, [sp, #24]
	bl	_avformat_free_context
	b	LBB0_48
LBB0_36:
	ldr	x9, [x26, #64]
	ldr	x2, [x26]
Lloh17:
	adrp	x8, _AV_FRAME_FILENAME_FLAGS_MULTIPLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_FRAME_FILENAME_FLAGS_MULTIPLE@GOTPAGEOFF]
	cbz	x9, LBB0_42
; %bb.37:
	ldr	w3, [x28, #8]
	ldr	w4, [x8]
	add	x0, sp, #64
	mov	w1, #1024
	bl	_av_get_frame_filename2
	tbz	x0, #63, LBB0_6
; %bb.38:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_45
LBB0_39:
	ldr	x0, [sp, #24]
	bl	_avformat_free_context
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_46
LBB0_40:
	add	x8, sp, #64
LBB0_41:
	str	x8, [sp]
Lloh26:
	adrp	x2, l_.str.4@PAGE
Lloh27:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_46
LBB0_42:
	ldr	w3, [x26, #8]
	ldr	w4, [x8]
	add	x0, sp, #64
	mov	w1, #1024
	bl	_av_get_frame_filename2
	tbz	x0, #63, LBB0_6
; %bb.43:
	ldr	w8, [x26, #8]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.44:
Lloh30:
	adrp	x9, _AV_LOG_ERROR@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x9]
	ldr	x9, [x26]
	stp	x8, x9, [sp]
Lloh33:
	adrp	x2, l_.str.2@PAGE
Lloh34:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_45:
	mov	x0, x19
	bl	_av_log
Lloh35:
	adrp	x8, _EINVAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_46:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_47:
	mov	x21, x0
LBB0_48:
	ldur	x8, [x29, #-96]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_50
; %bb.49:
	mov	x0, x21
	add	sp, sp, #1136
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_50:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not get frame filename with strftime\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_FRAME_FILENAME_FLAGS_MULTIPLE,4,2 ; @AV_FRAME_FILENAME_FLAGS_MULTIPLE
l_.str.1:                               ; @.str.1
	.asciz	"Cannot write filename by pts of the frames."

l_.str.2:                               ; @.str.2
	.asciz	"Could not get frame filename number %d from pattern '%s'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %%03d within the filename.\n"

l_.str.3:                               ; @.str.3
	.asciz	"%s.tmp"

	.comm	_AVIO_FLAG_WRITE,4,2            ; @AVIO_FLAG_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"Could not open file : %s\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.5:                               ; @.str.5
	.asciz	"UVAx"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_write_packet
.subsections_via_symbols
