	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dec_enc
_dec_enc:                               ## @dec_enc
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rsi
	movq	_decoder_ctx@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_avcodec_send_packet
	testl	%eax, %eax
	js	LBB0_27
## %bb.1:
	movq	_EAGAIN@GOTPCREL(%rip), %r15
	movq	_initialized@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rdi
	movq	%rax, %rsi
	callq	_avcodec_receive_frame
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r12)
	je	LBB0_11
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_encode_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_17
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movl	12(%rax), %edi
	callq	_av_buffer_ref
	movq	_encoder_ctx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 16(%rcx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movl	8(%rax), %edi
	callq	_av_inv_q
	movq	_encoder_ctx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movl	%eax, (%rdi)
	movq	_AV_PIX_FMT_VAAPI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rdi)
	movq	(%r13), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 8(%rdi)
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_avcodec_open2
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ofmt_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_avformat_new_stream
	movq	_ost@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_encoder_ctx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	(%rsi), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rax), %edi
	callq	_avcodec_parameters_from_context
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_ofmt_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_avformat_write_header
	testl	%eax, %eax
	js	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, (%r12)
	jmp	LBB0_23
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
	testl	%ebx, %ebx
	jns	LBB0_2
	jmp	LBB0_26
LBB0_27:
	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
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_26
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_6:
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_25
LBB0_24:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_25:
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_19:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_21:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_decoder_ctx,8,3                ## @decoder_ctx
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error during decoding. Error code: %s\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
L_.str.1:                               ## @.str.1
	.asciz	"Error while decoding. Error code: %s\n"

	.comm	_initialized,4,2                ## @initialized
	.comm	_encoder_ctx,8,3                ## @encoder_ctx
	.comm	_AV_PIX_FMT_VAAPI,4,2           ## @AV_PIX_FMT_VAAPI
L_.str.2:                               ## @.str.2
	.asciz	"Failed to open encode codec. Error code: %s\n"

	.comm	_ofmt_ctx,4,2                   ## @ofmt_ctx
	.comm	_ost,8,3                        ## @ost
L_.str.3:                               ## @.str.3
	.asciz	"Failed to allocate stream for output format.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to copy the stream parameters. Error code: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Error while writing stream header. Error code: %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"Error during encoding and writing.\n"

	.no_dead_strip	_dec_enc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dec_enc
_dec_enc:                               ; @dec_enc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x1, x0
Lloh0:
	adrp	x22, _decoder_ctx@GOTPAGE
Lloh1:
	ldr	x22, [x22, _decoder_ctx@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_avcodec_send_packet
	tbnz	w0, #31, LBB0_16
; %bb.1:
Lloh2:
	adrp	x23, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EAGAIN@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AVERROR_EOF@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AVERROR_EOF@GOTPAGEOFF]
Lloh6:
	adrp	x26, _initialized@GOTPAGE
Lloh7:
	ldr	x26, [x26, _initialized@GOTPAGEOFF]
Lloh8:
	adrp	x28, _encoder_ctx@GOTPAGE
Lloh9:
	ldr	x28, [x28, _encoder_ctx@GOTPAGEOFF]
Lloh10:
	adrp	x27, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x27, [x27, _ENOMEM@GOTPAGEOFF]
Lloh12:
	adrp	x21, _AV_PIX_FMT_VAAPI@GOTPAGE
Lloh13:
	ldr	x21, [x21, _AV_PIX_FMT_VAAPI@GOTPAGEOFF]
Lloh14:
	adrp	x25, _ofmt_ctx@GOTPAGE
Lloh15:
	ldr	x25, [x25, _ofmt_ctx@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_av_frame_alloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x0
	ldr	x0, [x22]
	bl	_avcodec_receive_frame
	mov	x20, x0
	ldr	w0, [x23]
	bl	_AVERROR
	ldr	w8, [x24]
	cmp	w20, w0
	ccmp	w20, w8, #4, ne
	b.eq	LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w20, #31, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	cbz	w8, LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [sp, #8]
	bl	_encode_write
	mov	x20, x0
	tbz	w0, #31, LBB0_15
	b	LBB0_21
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #12]
	bl	_av_buffer_ref
	ldr	x8, [x28]
	str	w0, [x8, #16]
	cbz	w0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #8]
	bl	_av_inv_q
	ldr	x8, [x28]
	str	w0, [x8]
	ldr	w9, [x21]
	str	w9, [x8, #12]
	ldr	x9, [x22]
	ldr	d0, [x9]
	stur	d0, [x8, #4]
	mov	x0, x8
	mov	x1, x19
	mov	x2, #0
	bl	_avcodec_open2
	tbnz	w0, #31, LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	mov	x1, x19
	bl	_avformat_new_stream
Lloh16:
	adrp	x8, _ost@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ost@GOTPAGEOFF]
Lloh18:
	str	x0, [x8]
	cbz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x28]
	ldr	w8, [x1]
	str	w8, [x0, #4]
	ldr	w0, [x0]
	bl	_avcodec_parameters_from_context
	tbnz	w0, #31, LBB0_25
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	mov	x1, #0
	bl	_avformat_write_header
	tbnz	w0, #31, LBB0_26
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #1
	str	w8, [x26]
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x27]
	bl	_AVERROR
	mov	x20, x0
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #8
	bl	_av_frame_free
	tbz	w20, #31, LBB0_2
	b	LBB0_23
LBB0_16:
	mov	x20, x0
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w19, [x8]
	bl	_av_err2str
	str	x0, [sp]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	b	LBB0_23
LBB0_17:
	ldr	w0, [x27]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_23
LBB0_18:
	add	x0, sp, #8
	bl	_av_frame_free
	mov	w20, #0
	b	LBB0_23
LBB0_19:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_av_err2str
	str	x0, [sp]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_20:
	mov	x0, x19
	b	LBB0_22
LBB0_21:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_22:
	bl	_fprintf
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_23:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_24:
	mov	x20, x0
Lloh39:
	adrp	x8, _stderr@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w19, [x8]
	bl	_av_err2str
	str	x0, [sp]
Lloh42:
	adrp	x1, l_.str.2@PAGE
Lloh43:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_25:
	mov	x20, x0
Lloh44:
	adrp	x8, _stderr@GOTPAGE
Lloh45:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh46:
	ldr	w19, [x8]
	bl	_av_err2str
	str	x0, [sp]
Lloh47:
	adrp	x1, l_.str.4@PAGE
Lloh48:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_26:
	mov	x20, x0
Lloh49:
	adrp	x8, _stderr@GOTPAGE
Lloh50:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh51:
	ldr	w19, [x8]
	bl	_av_err2str
	str	x0, [sp]
Lloh52:
	adrp	x1, l_.str.5@PAGE
Lloh53:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_decoder_ctx,8,3                ; @decoder_ctx
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error during decoding. Error code: %s\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
l_.str.1:                               ; @.str.1
	.asciz	"Error while decoding. Error code: %s\n"

	.comm	_initialized,4,2                ; @initialized
	.comm	_encoder_ctx,8,3                ; @encoder_ctx
	.comm	_AV_PIX_FMT_VAAPI,4,2           ; @AV_PIX_FMT_VAAPI
l_.str.2:                               ; @.str.2
	.asciz	"Failed to open encode codec. Error code: %s\n"

	.comm	_ofmt_ctx,4,2                   ; @ofmt_ctx
	.comm	_ost,8,3                        ; @ost
l_.str.3:                               ; @.str.3
	.asciz	"Failed to allocate stream for output format.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to copy the stream parameters. Error code: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Error while writing stream header. Error code: %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"Error during encoding and writing.\n"

	.no_dead_strip	_dec_enc
.subsections_via_symbols
