	.file	"extr_ts.c_Encap_J2K.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"elsmfrat"
.LC1:
	.string	"brat"
.LC2:
	.string	"tcod"
.LC3:
	.string	"bcol"
	.text
	.p2align 4
	.type	Encap_J2K, @function
Encap_J2K:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movsx	rdx, DWORD PTR [rdi]
	cmp	edx, 8
	jle	.L2
	xor	r12d, r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	cmp	rbp, 7
	jbe	.L3
	cmp	QWORD PTR J2K_BOX_JP2C[rip], rax
	je	.L4
	add	r12, rbp
	cmp	edx, 8
	jle	.L6
	sub	rdx, r12
	cmp	rdx, 8
	jbe	.L6
.L7:
	mov	rdi, QWORD PTR 8[r14]
	lea	rbx, 0[0+r12*4]
	add	rdi, rbx
	call	GetDWBE@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 8[r14]
	mov	ecx, DWORD PTR 28[rax+rbx]
	mov	edx, DWORD PTR 24[rax+rbx]
	mov	esi, DWORD PTR 20[rax+rbx]
	mov	edi, DWORD PTR 16[rax+rbx]
	call	VLC_FOURCC@PLT
	movsx	rdx, DWORD PTR [r14]
	mov	rsi, rdx
	mov	rcx, rdx
	sub	rsi, r12
	cmp	rsi, rbp
	jnb	.L16
.L3:
	cmp	QWORD PTR J2K_BOX_JP2C[rip], 0
	jne	.L6
.L4:
	cmp	r12, 37
	jbe	.L17
	add	ecx, 38
	sub	rbx, 152
	add	QWORD PTR 8[r14], rbx
	sub	ecx, r12d
	mov	r12, r14
	mov	DWORD PTR [r14], ecx
.L12:
	mov	ecx, DWORD PTR 4[r13]
	mov	esi, DWORD PTR 20[r13]
	mov	r8d, 1
	mov	edi, DWORD PTR 24[r13]
	mov	edx, DWORD PTR 0[r13]
	call	j2k_get_profile@PLT
	mov	rdi, QWORD PTR 8[r12]
	mov	edx, 8
	lea	rsi, .LC0[rip]
	movsx	rbx, eax
	call	memcpy@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	esi, DWORD PTR 4[r13]
	lea	rdi, 32[rax]
	call	SetWBE@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	esi, DWORD PTR 0[r13]
	lea	rdi, 40[rax]
	call	SetWBE@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	edx, 4
	lea	rsi, .LC1[rip]
	lea	rdi, 48[rax]
	call	memcpy@PLT
	mov	rax, QWORD PTR j2k_profiles_rates[rip]
	lea	rax, [rax+rbx*8]
	imul	ebp, DWORD PTR [rax], 1000000
	imul	esi, DWORD PTR 4[rax], 1000000
	mov	rax, QWORD PTR 8[r12]
	lea	rdi, 64[rax]
	call	SetDWBE@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	esi, ebp
	lea	rdi, 80[rax]
	call	SetDWBE@PLT
	mov	rax, QWORD PTR 8[r12]
	mov	edx, 4
	lea	rsi, .LC2[rip]
	lea	rdi, 96[rax]
	call	memcpy@PLT
	mov	edi, DWORD PTR 16[r12]
	call	SEC_FROM_VLC_TICK@PLT
	mov	esi, DWORD PTR CLOCK_FREQ[rip]
	xor	edx, edx
	mov	r9d, 2290649225
	mov	ecx, eax
	mov	eax, DWORD PTR 16[r12]
	mov	r8, rcx
	imul	rcx, r9
	div	esi
	imul	esi, DWORD PTR 4[r13]
	shr	rcx, 37
	mov	eax, esi
	mov	edi, edx
	xor	edx, edx
	div	DWORD PTR 0[r13]
	xor	edx, edx
	mov	esi, eax
	mov	eax, edi
	mov	rdi, QWORD PTR 8[r12]
	div	esi
	mov	esi, ecx
	mov	edx, ecx
	sub	rdi, -128
	imul	rsi, r9
	imul	ecx, ecx, 60
	shr	rsi, 37
	mov	DWORD PTR -16[rdi], esi
	imul	esi, esi, 60
	sub	r8d, ecx
	mov	DWORD PTR -8[rdi], r8d
	sub	edx, esi
	lea	rsi, .LC3[rip]
	mov	DWORD PTR -12[rdi], edx
	mov	edx, 4
	mov	DWORD PTR -4[rdi], eax
	call	memcpy@PLT
	mov	edx, DWORD PTR 8[r13]
	mov	esi, DWORD PTR 12[r13]
	mov	edi, DWORD PTR 16[r13]
	mov	rbx, QWORD PTR 8[r12]
	call	j2k_get_color_spec@PLT
	mov	DWORD PTR 144[rbx], eax
	mov	rax, QWORD PTR 8[r12]
	mov	DWORD PTR 148[rax], 0
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, 38
	sub	esi, r12d
.L9:
	mov	rdi, r14
	call	block_Realloc@PLT
	xor	edi, edi
	test	rax, rax
	mov	r12, rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L12
.L6:
	mov	rdi, r14
	xor	r12d, r12d
	call	block_Release@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	cmp	QWORD PTR J2K_BOX_JP2C[rip], 0
	jne	.L6
	mov	esi, 38
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	Encap_J2K, .-Encap_J2K
	.comm	j2k_profiles_rates,8,8
	.comm	J2K_BOX_JP2C,8,8
	.comm	CLOCK_FREQ,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_ts.c_Encap_J2K.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"elsmfrat\000"
	.align	2
.LC1:
	.ascii	"brat\000"
	.align	2
.LC2:
	.ascii	"tcod\000"
	.global	__aeabi_uidivmod
	.global	__aeabi_uidiv
	.align	2
.LC3:
	.ascii	"bcol\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Encap_J2K, %function
Encap_J2K:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r2, [r0]
	mov	r5, r0
	cmp	r2, #8
	mov	r6, r1
	sub	sp, sp, #8
	ble	.L2
	mov	r4, #0
	ldr	r7, .L18
	b	.L7
.L16:
	cmp	r3, r0
	beq	.L4
	cmp	r2, #8
	add	r4, r4, r8
	sub	r2, r2, r4
	ble	.L6
	cmp	r2, #8
	bls	.L6
.L7:
	ldr	r0, [r5, #4]
	lsl	r9, r4, #2
	add	r0, r0, r4, lsl #2
	bl	GetDWBE
	mov	r8, r0
	ldr	ip, [r5, #4]
	add	ip, ip, r9
	add	r0, ip, #16
	ldm	r0, {r0, r1, r2, r3}
	bl	VLC_FOURCC
	ldr	r2, [r5]
	sub	r3, r2, r4
	cmp	r3, r8
	cmpcs	r8, #7
	ldr	r3, [r7]
	bhi	.L16
	cmp	r3, #0
	bne	.L6
.L4:
	cmp	r4, #37
	bls	.L17
	mov	r7, r5
	ldr	r3, [r5, #4]
	add	r2, r2, #38
	sub	r2, r2, r4
	sub	r4, r4, #-1073741786
	add	r4, r3, r4, lsl #2
	stm	r5, {r2, r4}
.L12:
	mov	r2, #1
	ldr	r3, [r6, #4]
	str	r2, [sp]
	ldr	r2, [r6]
	ldr	r1, [r6, #20]
	ldr	r0, [r6, #24]
	bl	j2k_get_profile
	mov	r4, r0
	mov	r2, #8
	ldr	r1, .L18+4
	ldr	r0, [r7, #4]
	bl	memcpy
	ldr	r0, [r7, #4]
	ldr	r1, [r6, #4]
	add	r0, r0, #32
	bl	SetWBE
	ldr	r0, [r7, #4]
	ldr	r1, [r6]
	add	r0, r0, #40
	bl	SetWBE
	ldr	r0, [r7, #4]
	mov	r2, #4
	ldr	r1, .L18+8
	add	r0, r0, #48
	bl	memcpy
	ldr	r3, .L18+12
	ldr	r0, [r7, #4]
	ldr	r3, [r3]
	add	r0, r0, #64
	add	r2, r3, r4, lsl #3
	ldr	r1, [r2, #4]
	ldr	r3, [r3, r4, lsl #3]
	rsb	r2, r1, r1, lsl #5
	rsb	r2, r2, r2, lsl #6
	rsb	r4, r3, r3, lsl #5
	add	r1, r1, r2, lsl #3
	rsb	r4, r4, r4, lsl #6
	add	r3, r3, r4, lsl #3
	lsl	r1, r1, #6
	lsl	r4, r3, #6
	bl	SetDWBE
	ldr	r0, [r7, #4]
	mov	r1, r4
	add	r0, r0, #80
	bl	SetDWBE
	ldr	r0, [r7, #4]
	mov	r2, #4
	ldr	r1, .L18+16
	add	r0, r0, #96
	bl	memcpy
	ldr	r0, [r7, #8]
	bl	SEC_FROM_VLC_TICK
	ldr	r3, .L18+20
	ldr	r5, .L18+24
	ldr	r10, [r3]
	umull	r2, r4, r5, r0
	mov	r8, r0
	mov	r1, r10
	ldr	r0, [r7, #8]
	bl	__aeabi_uidivmod
	ldr	r0, [r6, #4]
	mov	r9, r1
	mul	r0, r10, r0
	ldr	r1, [r6]
	bl	__aeabi_uidiv
	mov	r1, r0
	mov	r0, r9
	bl	__aeabi_uidiv
	lsr	r4, r4, #5
	umull	r2, r3, r5, r4
	lsr	r3, r3, #5
	ldr	r2, [r7, #4]
	rsb	ip, r4, r4, lsl #4
	rsb	r1, r3, r3, lsl #4
	sub	r8, r8, ip, lsl #2
	sub	r4, r4, r1, lsl #2
	str	r3, [r2, #112]
	str	r8, [r2, #120]
	str	r4, [r2, #116]
	str	r0, [r2, #124]
	ldr	r1, .L18+28
	add	r0, r2, #128
	mov	r2, #4
	bl	memcpy
	ldr	r2, [r6, #8]
	ldr	r1, [r6, #12]
	ldr	r0, [r6, #16]
	ldr	r4, [r7, #4]
	bl	j2k_get_color_spec
	ldr	r3, [r7, #4]
	mov	r2, #0
	str	r0, [r4, #144]
	mov	r0, r7
	str	r2, [r3, #148]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	rsb	r1, r4, #38
.L9:
	mov	r0, r5
	bl	block_Realloc
	mov	r7, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L12
.L6:
	mov	r7, #0
	mov	r0, r5
	bl	block_Release
	mov	r0, r7
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L18
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r1, #38
	beq	.L9
	b	.L6
.L19:
	.align	2
.L18:
	.word	J2K_BOX_JP2C
	.word	.LC0
	.word	.LC1
	.word	j2k_profiles_rates
	.word	.LC2
	.word	CLOCK_FREQ
	.word	-2004318071
	.word	.LC3
	.size	Encap_J2K, .-Encap_J2K
	.comm	j2k_profiles_rates,4,4
	.comm	J2K_BOX_JP2C,4,4
	.comm	CLOCK_FREQ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
