	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libopenjpeg_encode_frame
_libopenjpeg_encode_frame:              ## @libopenjpeg_encode_frame
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	$0, -80(%rbp)
	movq	%r12, %rsi
	callq	_mj2_create_image
	testq	%rax, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movl	(%r14), %edi
	leal	-128(%rdi), %eax
	cmpl	$50, %eax
	ja	LBB0_17
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_unpacked16
	jmp	LBB0_19
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_31
LBB0_7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_unpacked8
	jmp	LBB0_19
LBB0_8:
	movq	%r15, %rdi
	callq	_av_frame_clone
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movq	8(%r15), %rcx
	movl	8(%rcx), %edx
	movq	8(%rax), %rsi
	movl	%edx, (%rsi)
	movl	(%rcx), %edx
	movl	%edx, 4(%rsi)
	movl	4(%rcx), %ecx
	movl	%ecx, 8(%rsi)
	movq	(%r15), %rcx
	movl	8(%rcx), %edx
	movq	(%rax), %rsi
	movl	%edx, (%rsi)
	movl	(%rcx), %edx
	movl	%edx, 4(%rsi)
	movl	4(%rcx), %ecx
	movl	%ecx, 8(%rsi)
	cmpl	$178, (%r14)
	jne	LBB0_14
## %bb.10:
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_unpacked8
	jmp	LBB0_15
LBB0_11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_packed8
	jmp	LBB0_19
LBB0_12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_packed16
	jmp	LBB0_19
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_32
LBB0_14:
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_unpacked16
LBB0_15:
	movl	%eax, %ebx
	leaq	-64(%rbp), %rdi
	callq	_av_frame_free
	testl	%ebx, %ebx
	jne	LBB0_20
LBB0_16:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movl	$-1, %r13d
	jmp	LBB0_32
LBB0_17:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_av_get_pix_fmt_name
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_5
LBB0_18:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_libopenjpeg_copy_packed12
LBB0_19:
	movl	%eax, %ebx
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_20:
	movq	%r13, %rbx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$1024, %edx                     ## imm = 0x400
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_31
## %bb.21:
	movl	4(%r12), %edi
	callq	_opj_create_compress
	testq	%rax, %rax
	je	LBB0_37
## %bb.22:
	movq	%rax, %r15
	movq	_error_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_opj_set_error_handler
	testl	%eax, %eax
	je	LBB0_34
## %bb.23:
	movq	_warning_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_opj_set_warning_handler
	testl	%eax, %eax
	je	LBB0_34
## %bb.24:
	movq	_info_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_opj_set_info_handler
	testl	%eax, %eax
	je	LBB0_34
## %bb.25:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_opj_setup_encoder
	testl	%eax, %eax
	je	LBB0_38
## %bb.26:
	movq	_OPJ_STREAM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_opj_stream_default_create
	testq	%rax, %rax
	je	LBB0_40
## %bb.27:
	movq	%rax, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -88(%rbp)
	movq	_stream_write@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_opj_stream_set_write_function
	movq	_stream_skip@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_opj_stream_set_skip_function
	movq	_stream_seek@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_opj_stream_set_seek_function
	leaq	-96(%rbp), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_opj_stream_set_user_data
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_opj_start_compress
	testl	%eax, %eax
	je	LBB0_39
## %bb.28:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_opj_encode
	testl	%eax, %eax
	je	LBB0_39
## %bb.29:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_opj_end_compress
	testl	%eax, %eax
	je	LBB0_39
## %bb.30:
	movl	-96(%rbp), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_av_shrink_packet
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movl	$1, (%rbx)
	xorl	%r13d, %r13d
	jmp	LBB0_33
LBB0_31:
	movl	%eax, %r13d
LBB0_32:
	xorl	%r12d, %r12d
LBB0_33:
	movq	%r12, %rdi
	callq	_opj_stream_destroy
	movq	%r15, %rdi
	callq	_opj_destroy_codec
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_opj_image_destroy
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_35:
	xorl	%r12d, %r12d
LBB0_36:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_33
LBB0_37:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_38:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_35
LBB0_39:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_36
LBB0_40:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
	jmp	LBB0_33
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_18
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error creating the mj2 image\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"The frame's pixel format '%s' is not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not copy the frame data to the internal image buffer\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error creating the compressor\n"

	.comm	_error_callback,4,2             ## @error_callback
	.comm	_warning_callback,4,2           ## @warning_callback
	.comm	_info_callback,4,2              ## @info_callback
L_.str.4:                               ## @.str.4
	.asciz	"Error setting the compressor handlers\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
L_.str.5:                               ## @.str.5
	.asciz	"Error setting up the compressor\n"

	.comm	_OPJ_STREAM_WRITE,4,2           ## @OPJ_STREAM_WRITE
L_.str.6:                               ## @.str.6
	.asciz	"Error creating the cio stream\n"

	.comm	_stream_write,4,2               ## @stream_write
	.comm	_stream_skip,4,2                ## @stream_skip
	.comm	_stream_seek,4,2                ## @stream_seek
L_.str.7:                               ## @.str.7
	.asciz	"Error during the opj encode\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_libopenjpeg_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libopenjpeg_encode_frame
_libopenjpeg_encode_frame:              ; @libopenjpeg_encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
	mov	x1, x24
	bl	_mj2_create_image
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x20]
	sub	w8, w0, #128
	cmp	w8, #50
	b.hi	LBB0_36
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_libopenjpeg_copy_unpacked16
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_13
LBB0_4:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
LBB0_5:
	bl	_av_log
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_28
LBB0_7:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_libopenjpeg_copy_unpacked8
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_13
LBB0_8:
	mov	x0, x23
	bl	_av_frame_clone
	str	x0, [sp, #40]
	cbz	x0, LBB0_14
; %bb.9:
	mov	x1, x0
	ldr	x8, [x23, #8]
	ldr	w9, [x8, #8]
	ldr	x10, [x0, #8]
	str	w9, [x10]
	ldr	w9, [x8]
	str	w9, [x10, #4]
	ldr	w8, [x8, #4]
	str	w8, [x10, #8]
	ldr	x8, [x23]
	ldr	w9, [x8, #8]
	ldr	x10, [x0]
	str	w9, [x10]
	ldr	w9, [x8]
	str	w9, [x10, #4]
	ldr	w8, [x8, #4]
	str	w8, [x10, #8]
	ldr	w8, [x20]
	mov	x0, x20
	mov	x2, x19
	cmp	w8, #178
	b.ne	LBB0_15
; %bb.10:
	bl	_libopenjpeg_copy_unpacked8
	b	LBB0_16
LBB0_11:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_libopenjpeg_copy_packed8
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_libopenjpeg_copy_packed16
	mov	x23, x0
	cbnz	w23, LBB0_17
LBB0_13:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_av_log
	mov	x23, #0
	mov	x24, #0
	mov	w25, #-1
	b	LBB0_30
LBB0_14:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_15:
	bl	_libopenjpeg_copy_unpacked16
LBB0_16:
	mov	x23, x0
	add	x0, sp, #40
	bl	_av_frame_free
	cbz	w23, LBB0_13
LBB0_17:
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1024
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_28
; %bb.18:
	ldr	w0, [x24, #4]
	bl	_opj_create_compress
	mov	x23, x0
	cbz	x0, LBB0_34
; %bb.19:
Lloh16:
	adrp	x8, _error_callback@GOTPAGE
Lloh17:
	ldr	x8, [x8, _error_callback@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x20
	bl	_opj_set_error_handler
	cbz	w0, LBB0_31
; %bb.20:
Lloh19:
	adrp	x8, _warning_callback@GOTPAGE
Lloh20:
	ldr	x8, [x8, _warning_callback@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x20
	bl	_opj_set_warning_handler
	cbz	w0, LBB0_31
; %bb.21:
Lloh22:
	adrp	x8, _info_callback@GOTPAGE
Lloh23:
	ldr	x8, [x8, _info_callback@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x23
	mov	x2, x20
	bl	_opj_set_info_handler
	cbz	w0, LBB0_31
; %bb.22:
	mov	x0, x23
	mov	x1, x24
	mov	x2, x19
	bl	_opj_setup_encoder
	cbz	w0, LBB0_35
; %bb.23:
Lloh25:
	adrp	x8, _OPJ_STREAM_WRITE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _OPJ_STREAM_WRITE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_opj_stream_default_create
	mov	x24, x0
	cbz	x0, LBB0_39
; %bb.24:
	str	x22, [sp, #24]
Lloh28:
	adrp	x8, _stream_write@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stream_write@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_opj_stream_set_write_function
Lloh31:
	adrp	x8, _stream_skip@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stream_skip@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_opj_stream_set_skip_function
Lloh34:
	adrp	x8, _stream_seek@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stream_seek@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_opj_stream_set_seek_function
	add	x1, sp, #16
	mov	x0, x24
	mov	x2, #0
	bl	_opj_stream_set_user_data
	mov	x0, x23
	mov	x1, x19
	mov	x2, x24
	bl	_opj_start_compress
	cbz	w0, LBB0_38
; %bb.25:
	mov	x0, x23
	mov	x1, x24
	bl	_opj_encode
	cbz	w0, LBB0_38
; %bb.26:
	mov	x0, x23
	mov	x1, x24
	bl	_opj_end_compress
	cbz	w0, LBB0_38
; %bb.27:
	ldr	w1, [sp, #16]
	mov	x0, x22
	bl	_av_shrink_packet
	mov	w25, #0
Lloh37:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_30
LBB0_28:
	mov	x25, x0
	mov	x23, #0
LBB0_29:
	mov	x24, #0
LBB0_30:
	mov	x0, x24
	bl	_opj_stream_destroy
	mov	x0, x23
	bl	_opj_destroy_codec
	mov	x0, x19
	bl	_opj_image_destroy
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_31:
Lloh40:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, l_.str.4@PAGE
Lloh44:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_32:
	mov	x0, x20
	bl	_av_log
	mov	x24, #0
LBB0_33:
Lloh45:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh47:
	ldr	w25, [x8]
	b	LBB0_30
LBB0_34:
Lloh48:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	adrp	x2, l_.str.3@PAGE
Lloh52:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh53:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x25, x0
	b	LBB0_29
LBB0_35:
Lloh56:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh57:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
Lloh59:
	adrp	x2, l_.str.5@PAGE
Lloh60:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_32
LBB0_36:
Lloh61:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh62:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh63:
	ldr	w21, [x8]
	bl	_av_get_pix_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh64:
	adrp	x2, l_.str.1@PAGE
Lloh65:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	b	LBB0_5
LBB0_37:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x19
	bl	_libopenjpeg_copy_packed12
	mov	x23, x0
	cbnz	w23, LBB0_17
	b	LBB0_13
LBB0_38:
Lloh66:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh67:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
Lloh69:
	adrp	x2, l_.str.7@PAGE
Lloh70:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_av_log
	b	LBB0_33
LBB0_39:
Lloh71:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh72:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
Lloh74:
	adrp	x2, l_.str.6@PAGE
Lloh75:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh76:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh77:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh78:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x25, x0
	b	LBB0_30
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_37-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error creating the mj2 image\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"The frame's pixel format '%s' is not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not copy the frame data to the internal image buffer\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error creating the compressor\n"

	.comm	_error_callback,4,2             ; @error_callback
	.comm	_warning_callback,4,2           ; @warning_callback
	.comm	_info_callback,4,2              ; @info_callback
l_.str.4:                               ; @.str.4
	.asciz	"Error setting the compressor handlers\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
l_.str.5:                               ; @.str.5
	.asciz	"Error setting up the compressor\n"

	.comm	_OPJ_STREAM_WRITE,4,2           ; @OPJ_STREAM_WRITE
l_.str.6:                               ; @.str.6
	.asciz	"Error creating the cio stream\n"

	.comm	_stream_write,4,2               ; @stream_write
	.comm	_stream_skip,4,2                ; @stream_skip
	.comm	_stream_seek,4,2                ; @stream_seek
l_.str.7:                               ; @.str.7
	.asciz	"Error during the opj encode\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_libopenjpeg_encode_frame
.subsections_via_symbols
