	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function codec_reinit
_codec_reinit:                          ## @codec_reinit
	.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
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	movl	%esi, %edi
	movl	$2, %esi
	callq	_FFALIGN
	movl	%eax, %r15d
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_FFALIGN
	movl	%eax, %ebx
	testl	%r12d, %r12d
	js	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_get_quant_quality
LBB0_2:
	cmpl	(%r13), %r15d
	jne	LBB0_4
## %bb.3:
	cmpl	4(%r13), %ebx
	jne	LBB0_4
## %bb.9:
	xorl	%r14d, %r14d
	cmpl	%r12d, 8(%r13)
	je	LBB0_11
## %bb.10:
	leaq	20(%r13), %rdi
	movl	12(%r13), %r8d
	movl	16(%r13), %ecx
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_ff_rtjpeg_decode_init
	jmp	LBB0_11
LBB0_4:
	movl	%r15d, %eax
	imull	%ebx, %eax
	leal	(%rax,%rax,2), %eax
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movq	_AV_LZO_OUTPUT_PADDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FFMAX
	movl	%eax, %r12d
	addl	%ebx, %r12d
	movq	_RTJPEG_HEADER_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	$-1, %r14d
	cmpl	%ecx, %r12d
	jg	LBB0_11
## %bb.5:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	xorl	%edx, %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_av_image_check_size
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	%r15d, (%r13)
	movl	%r15d, (%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r13)
	movl	%eax, 4(%rbx)
	leaq	28(%r13), %rdi
	leaq	32(%r13), %rsi
	movl	%r12d, %edx
	callq	_av_fast_malloc
	cmpl	$0, 28(%r13)
	je	LBB0_12
## %bb.8:
	leaq	20(%r13), %rdi
	movl	(%r13), %esi
	movl	4(%r13), %edx
	movl	16(%r13), %ecx
	movl	12(%r13), %r8d
	callq	_ff_rtjpeg_decode_init
	movl	24(%r13), %edi
	callq	_av_frame_unref
	movl	$1, %r14d
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LZO_OUTPUT_PADDING,4,2      ## @AV_LZO_OUTPUT_PADDING
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_RTJPEG_HEADER_SIZE,4,2         ## @RTJPEG_HEADER_SIZE
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't allocate decompression buffer.\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function codec_reinit
_codec_reinit:                          ; @codec_reinit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x3
	mov	x22, x2
	mov	x20, x0
	ldr	x19, [x0, #8]
	mov	x0, x1
	mov	w1, #2
	bl	_FFALIGN
	mov	x21, x0
	mov	x0, x22
	mov	w1, #2
	bl	_FFALIGN
	mov	x22, x0
	tbnz	w23, #31, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	bl	_get_quant_quality
LBB0_2:
	ldr	w8, [x19]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x19, #8]
	cmp	w8, w23
	b.eq	LBB0_6
; %bb.5:
	add	x0, x19, #20
	ldp	w4, w3, [x19, #12]
	mov	x1, x21
	mov	x2, x22
	bl	_ff_rtjpeg_decode_init
LBB0_6:
	mov	w0, #0
	b	LBB0_12
LBB0_7:
	mul	w8, w21, w22
	add	w8, w8, w8, lsl #1
	cmp	w8, #0
	cinc	w23, w8, lt
Lloh0:
	adrp	x8, _AV_LZO_OUTPUT_PADDING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LZO_OUTPUT_PADDING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_FFMAX
	add	w8, w0, w23, asr #1
Lloh6:
	adrp	x9, _RTJPEG_HEADER_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RTJPEG_HEADER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _INT_MAX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _INT_MAX@GOTPAGEOFF]
	add	w23, w8, w9
Lloh11:
	ldr	w8, [x10]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w23, w8, asr #3
	b.le	LBB0_9
; %bb.8:
	mov	w0, #-1
	b	LBB0_12
LBB0_9:
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	mov	x3, x20
	bl	_av_image_check_size
	tbnz	w0, #31, LBB0_12
; %bb.10:
	stp	w21, w22, [x19]
	add	x0, x19, #28
	add	x1, x19, #32
	stp	w21, w22, [x20]
	mov	x2, x23
	bl	_av_fast_malloc
	ldr	w8, [x19, #28]
	cbz	w8, LBB0_13
; %bb.11:
	add	x0, x19, #20
	ldp	w1, w2, [x19]
	ldp	w4, w3, [x19, #12]
	bl	_ff_rtjpeg_decode_init
	ldr	w0, [x19, #24]
	bl	_av_frame_unref
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LZO_OUTPUT_PADDING,4,2      ; @AV_LZO_OUTPUT_PADDING
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_RTJPEG_HEADER_SIZE,4,2         ; @RTJPEG_HEADER_SIZE
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate decompression buffer.\n"

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