	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_write
_encode_write:                          ## @encode_write
	.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	%rdi, %rbx
	leaq	-64(%rbp), %rdi
	callq	_av_init_packet
	xorps	%xmm0, %xmm0
	movups	%xmm0, -56(%rbp)
	movq	_encoder_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_avcodec_send_frame
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	leaq	-64(%rbp), %r14
	movq	_ifmt_ctx@GOTPCREL(%rip), %r12
	movq	_video_stream@GOTPCREL(%rip), %r13
	movq	_ofmt_ctx@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_encoder_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_avcodec_receive_packet
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -64(%rbp)
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %esi
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_av_packet_rescale_ts
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_av_interleaved_write_frame
	testl	%eax, %eax
	jns	LBB0_2
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_av_err2str
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movl	$-1, %eax
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %ebx
LBB0_7:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %ebx
	je	LBB0_9
## %bb.8:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ecx, %ebx
	setne	%al
	negl	%eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_encoder_ctx,4,2                ## @encoder_ctx
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error during encoding. Error code: %s\n"

	.comm	_ifmt_ctx,8,3                   ## @ifmt_ctx
	.comm	_video_stream,8,3               ## @video_stream
	.comm	_ofmt_ctx,8,3                   ## @ofmt_ctx
L_.str.1:                               ## @.str.1
	.asciz	"Error during writing data to output file. Error code: %s\n"

	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_encode_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_write
_encode_write:                          ; @encode_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	add	x0, sp, #8
	bl	_av_init_packet
	stp	xzr, xzr, [sp, #16]
Lloh0:
	adrp	x20, _encoder_ctx@GOTPAGE
Lloh1:
	ldr	x20, [x20, _encoder_ctx@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x19
	bl	_avcodec_send_frame
	tbnz	w0, #31, LBB0_5
; %bb.1:
Lloh2:
	adrp	x21, _ifmt_ctx@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ifmt_ctx@GOTPAGEOFF]
Lloh4:
	adrp	x22, _video_stream@GOTPAGE
Lloh5:
	ldr	x22, [x22, _video_stream@GOTPAGEOFF]
Lloh6:
	adrp	x23, _ofmt_ctx@GOTPAGE
Lloh7:
	ldr	x23, [x23, _ofmt_ctx@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	add	x1, sp, #8
	bl	_avcodec_receive_packet
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [sp, #8]
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x9, [x22]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w1, [x8]
	ldr	x8, [x23]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w2, [x8]
	add	x0, sp, #8
	bl	_av_packet_rescale_ts
	ldr	x0, [x23]
	add	x1, sp, #8
	bl	_av_interleaved_write_frame
	tbz	w0, #31, LBB0_2
; %bb.4:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
	bl	_av_err2str
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	mov	w0, #-1
	b	LBB0_10
LBB0_5:
	mov	x19, x0
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	bl	_av_err2str
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	b	LBB0_7
LBB0_6:
	mov	x19, x0
LBB0_7:
Lloh18:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh21:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_AVERROR
	cmp	w19, w0
	csetm	w0, ne
LBB0_10:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_encoder_ctx,4,2                ; @encoder_ctx
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error during encoding. Error code: %s\n"

	.comm	_ifmt_ctx,8,3                   ; @ifmt_ctx
	.comm	_video_stream,8,3               ; @video_stream
	.comm	_ofmt_ctx,8,3                   ; @ofmt_ctx
l_.str.1:                               ; @.str.1
	.asciz	"Error during writing data to output file. Error code: %s\n"

	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_encode_write
.subsections_via_symbols
