	.file	"extr_j2k.c_opj_j2k_move_data_from_codec_to_output_image.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	opj_j2k_move_data_from_codec_to_output_image, @function
opj_j2k_move_data_from_codec_to_output_image:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR 8[rdi]
	test	eax, eax
	jg	.L2
	cmp	QWORD PTR [rsi], 0
	je	.L4
	mov	rax, QWORD PTR [rdi]
	xor	ebx, ebx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rsi]
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rbp, rbx
	lea	r14, [rbx+rbx*2]
	add	rbx, 1
	sal	rbp, 4
	sal	r14, 3
	mov	edx, DWORD PTR 8[rdx+rbp]
	add	rax, r14
	mov	rdi, QWORD PTR 8[rax]
	mov	DWORD PTR 16[rax], edx
	call	opj_image_data_free@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[r12]
	add	rbp, rdx
	mov	rcx, QWORD PTR 0[rbp]
	mov	QWORD PTR 8[rax+r14], rcx
	mov	QWORD PTR 0[rbp], 0
	cmp	QWORD PTR [r12], rbx
	ja	.L17
.L4:
	mov	eax, DWORD PTR OPJ_TRUE[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	edi, [rax+rax*2]
	sal	edi, 3
	call	opj_malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L5
	cmp	QWORD PTR [r12], 0
	je	.L27
	mov	rax, QWORD PTR 8[r12]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L11:
	lea	r14, [rbx+rbx*2]
	add	rbx, 1
	sal	r14, 3
	mov	rdi, QWORD PTR 8[rax+r14]
	call	opj_image_data_free@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR 8[rax+r14], 0
	cmp	QWORD PTR [r12], rbx
	ja	.L11
	mov	edx, DWORD PTR 8[r13]
	test	edx, edx
	je	.L9
.L8:
	mov	rax, QWORD PTR 0[r13]
	mov	r14, rbp
	xor	r15d, r15d
	mov	rsi, QWORD PTR [rax]
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 16[r13]
	mov	edx, 24
	mov	rdi, r14
	add	r14, 24
	mov	rax, QWORD PTR [rax+r15*8]
	add	r15, 1
	sal	rax, 4
	add	rsi, rax
	mov	rbx, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	rsi, QWORD PTR [rax]
	lea	rax, [rsi+rbx]
	mov	edx, DWORD PTR 8[rax]
	mov	DWORD PTR -8[r14], edx
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -16[r14], rdx
	mov	QWORD PTR [rax], 0
	movsx	rax, DWORD PTR 8[r13]
	cmp	rax, r15
	ja	.L15
.L9:
	cmp	QWORD PTR [r12], 0
	je	.L14
	mov	rax, QWORD PTR 0[r13]
	xor	ebx, ebx
	mov	rax, QWORD PTR [rax]
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r14, rbx
	xor	edi, edi
	sal	r14, 4
	cmp	QWORD PTR [rax+r14], 0
	sete	dil
	add	rbx, 1
	call	assert@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR [rax+r14]
	call	opj_image_data_free@PLT
	mov	rax, QWORD PTR 0[r13]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rax+r14], 0
	cmp	QWORD PTR [r12], rbx
	ja	.L16
.L14:
	movsx	rax, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 8[r12]
	mov	QWORD PTR [r12], rax
	call	opj_free@PLT
	mov	QWORD PTR 8[r12], rbp
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, QWORD PTR 24[r13]
	call	opj_image_destroy@PLT
	mov	QWORD PTR 24[r13], 0
	mov	eax, DWORD PTR OPJ_FALSE[rip]
	jmp	.L1
.L27:
	mov	eax, DWORD PTR 8[r13]
	test	eax, eax
	jne	.L8
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	opj_j2k_move_data_from_codec_to_output_image, .-opj_j2k_move_data_from_codec_to_output_image
	.comm	OPJ_TRUE,4,4
	.comm	OPJ_FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_j2k.c_opj_j2k_move_data_from_codec_to_output_image.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	opj_j2k_move_data_from_codec_to_output_image, %function
opj_j2k_move_data_from_codec_to_output_image:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, [r0, #4]
	mov	r6, r1
	cmp	r0, #0
	bgt	.L2
	ldr	r3, [r1]
	cmp	r3, #0
	beq	.L4
	mov	r4, #0
	mov	r7, r4
	ldr	r3, [r5]
	ldr	r2, [r1, #4]
	ldr	r3, [r3]
.L17:
	add	r3, r3, r4, lsl #3
	ldr	r3, [r3, #4]
	add	r2, r2, r4, lsl #4
	str	r3, [r2, #12]
	ldr	r0, [r2, #8]
	bl	opj_image_data_free
	ldr	r3, [r5]
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	lsl	r1, r4, #4
	ldr	ip, [r3, r4, lsl #3]
	ldr	r0, [r6]
	add	r1, r2, r1
	str	ip, [r1, #8]
	str	r7, [r3, r4, lsl #3]
	add	r4, r4, #1
	cmp	r0, r4
	bhi	.L17
.L4:
	ldr	r3, .L28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	lsl	r0, r0, #4
	bl	opj_malloc
	subs	r7, r0, #0
	beq	.L5
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L27
	mov	r4, #0
	mov	r8, r4
	ldr	r3, [r6, #4]
.L11:
	add	r3, r3, r4, lsl #4
	ldr	r0, [r3, #8]
	bl	opj_image_data_free
	ldm	r6, {r1, r3}
	lsl	r2, r4, #4
	add	r4, r4, #1
	add	r2, r3, r2
	cmp	r1, r4
	str	r8, [r2, #8]
	bhi	.L11
	ldr	r0, [r5, #4]
	cmp	r0, #0
	beq	.L9
.L8:
	mov	r8, #0
	mov	r3, r7
	mov	r9, r8
	ldr	r2, [r5]
	ldr	r1, [r2]
.L15:
	ldr	r0, [r5, #8]
	mov	r2, #16
	ldr	r4, [r0, r8, lsl #2]
	mov	r0, r3
	add	r1, r1, r4, lsl #3
	bl	memcpy
	mov	r3, r0
	ldr	r1, [r5]
	lsl	r2, r4, #3
	ldr	r1, [r1]
	ldr	r0, [r5, #4]
	add	r2, r1, r2
	ldr	ip, [r2, #4]
	add	r8, r8, #1
	ldr	r2, [r1, r4, lsl #3]
	cmp	r0, r8
	str	ip, [r3, #12]
	str	r2, [r3, #8]
	str	r9, [r1, r4, lsl #3]
	add	r3, r3, #16
	bhi	.L15
	ldr	r1, [r6]
.L9:
	cmp	r1, #0
	beq	.L14
	mov	r4, #0
	mov	r8, r4
	ldr	r3, [r5]
	ldr	r3, [r3]
.L16:
	ldr	r0, [r3, r4, lsl #3]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [r5]
	ldr	r3, [r3]
	ldr	r0, [r3, r4, lsl #3]
	bl	opj_image_data_free
	ldr	r3, [r5]
	ldr	r2, [r6]
	ldr	r3, [r3]
	str	r8, [r3, r4, lsl #3]
	add	r4, r4, #1
	cmp	r2, r4
	bhi	.L16
	ldr	r0, [r5, #4]
.L14:
	str	r0, [r6]
	ldr	r0, [r6, #4]
	bl	opj_free
	str	r7, [r6, #4]
	b	.L4
.L5:
	ldr	r0, [r5, #12]
	bl	opj_image_destroy
	ldr	r3, .L28+4
	str	r7, [r5, #12]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L27:
	ldr	r0, [r5, #4]
	cmp	r0, #0
	bne	.L8
	b	.L14
.L29:
	.align	2
.L28:
	.word	OPJ_TRUE
	.word	OPJ_FALSE
	.size	opj_j2k_move_data_from_codec_to_output_image, .-opj_j2k_move_data_from_codec_to_output_image
	.comm	OPJ_TRUE,4,4
	.comm	OPJ_FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
