	.file	"extr_hxxx_common.c_PacketizeXXC1.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Broken frame : size %d is too big"
	.text
	.p2align 4
	.globl	PacketizeXXC1
	.type	PacketizeXXC1, @function
PacketizeXXC1:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 8[rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 48[rsp], 0
	test	rdx, rdx
	je	.L21
	mov	r15, QWORD PTR [rdx]
	test	r15, r15
	je	.L1
	mov	eax, DWORD PTR [r15]
	and	eax, DWORD PTR BLOCK_FLAG_CORRUPTED[rip]
	mov	DWORD PTR 28[rsp], eax
	jne	.L32
	mov	rax, QWORD PTR 16[r15]
	mov	r13, QWORD PTR 8[r15]
	mov	ebx, esi
	mov	QWORD PTR [rdx], 0
	sal	rax, 2
	lea	rsi, 0[r13+rax]
	cmp	r13, rsi
	jnb	.L5
	movsx	rcx, ebx
	sar	rax, 2
	mov	QWORD PTR [rsp], rcx
	cmp	rax, rcx
	jl	.L5
	lea	eax, -1[rbx]
	mov	r12, rdi
	lea	r14, 4[0+rax*4]
	.p2align 4,,10
	.p2align 3
.L15:
	test	ebx, ebx
	jle	.L7
	lea	rax, 0[r13+r14]
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L8:
	add	r13, 4
	sal	edx, 8
	or	edx, DWORD PTR -4[r13]
	cmp	r13, rax
	jne	.L8
	test	edx, edx
	jle	.L22
	sub	rsi, r13
	movsx	rbp, edx
	sar	rsi, 2
	cmp	rbp, rsi
	jg	.L22
	je	.L33
	lea	edi, 4[rdx]
	mov	DWORD PTR 24[rsp], edx
	call	block_Alloc@PLT
	mov	r10, rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR 28[r15]
	mov	edx, DWORD PTR 24[rsp]
	mov	rsi, r13
	mov	QWORD PTR 16[rsp], r10
	lea	r13, 0[r13+rbp*4]
	mov	DWORD PTR 28[r10], eax
	mov	eax, DWORD PTR 24[r15]
	mov	DWORD PTR 24[r10], eax
	mov	rax, QWORD PTR 8[r10]
	lea	rdi, 16[rax]
	call	memcpy@PLT
	mov	r10, QWORD PTR 16[rsp]
	lea	rsi, 44[rsp]
	mov	rdi, r12
	movabs	rcx, 4294967296
	mov	rax, QWORD PTR 8[r10]
	mov	rdx, r10
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], rcx
	mov	rax, QWORD PTR 8[rsp]
	call	rax
	test	rax, rax
	jne	.L13
.L19:
	mov	rdx, QWORD PTR 16[r15]
	mov	rax, QWORD PTR 8[r15]
	lea	rsi, [rax+rdx*4]
	cmp	rsi, r13
	jbe	.L5
	mov	rax, rsi
	sub	rax, r13
	sar	rax, 2
	cmp	rax, QWORD PTR [rsp]
	jge	.L15
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r15
	call	block_Release@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L33:
	mov	QWORD PTR 16[r15], rbp
	mov	esi, 4
	mov	rdi, r15
	mov	QWORD PTR 8[r15], r13
	call	block_Realloc@PLT
	mov	rdx, rax
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR 8[rax]
	lea	rsi, 44[rsp]
	mov	rdi, r12
	movabs	rbx, 4294967296
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], rbx
	mov	rax, QWORD PTR 8[rsp]
	call	rax
	test	rax, rax
	je	.L16
	lea	rdi, 48[rsp]
	mov	rsi, rax
	call	block_ChainAppend@PLT
.L16:
	mov	r15, QWORD PTR 48[rsp]
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r15
	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
.L22:
	.cfi_restore_state
	mov	DWORD PTR 28[rsp], edx
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, DWORD PTR 28[rsp]
	mov	rdi, r12
	lea	rsi, .LC0[rip]
	call	msg_Err@PLT
	mov	rdi, r15
	call	block_Release@PLT
	jmp	.L16
.L21:
	xor	r15d, r15d
	jmp	.L1
.L32:
	mov	rdi, r15
	xor	r15d, r15d
	call	block_Release@PLT
	jmp	.L1
.L13:
	lea	rdi, 48[rsp]
	mov	rsi, rax
	call	block_ChainAppend@PLT
	jmp	.L19
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	PacketizeXXC1, .-PacketizeXXC1
	.comm	BLOCK_FLAG_CORRUPTED,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_hxxx_common.c_PacketizeXXC1.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Broken frame : size %d is too big\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	PacketizeXXC1
	.syntax unified
	.arm
	.fpu softvfp
	.type	PacketizeXXC1, %function
PacketizeXXC1:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	mov	r10, r3
	ldr	r3, .L38
	sub	sp, sp, #28
	subs	ip, r2, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	str	r4, [sp, #12]
	beq	.L21
	ldr	r6, [ip]
	cmp	r6, r4
	beq	.L1
	ldr	r2, .L38+4
	mov	fp, r1
	ldr	r2, [r2]
	ldr	r1, [r6]
	ands	r3, r1, r2
	str	r3, [sp, #4]
	bne	.L35
	ldr	r4, [r6, #4]
	ldr	r2, [r6, #8]
	ldr	r3, [sp, #4]
	add	r1, r4, r2, lsl #2
	cmp	r4, r1
	str	r3, [ip]
	lsl	r2, r2, #2
	bcs	.L5
	cmp	fp, r2, asr #2
	bgt	.L5
	lsl	r3, fp, #2
	mov	r9, r0
	mov	r7, r3
	ldr	r8, [sp, #4]
.L15:
	cmp	fp, #0
	ble	.L7
	mov	r5, #0
	add	r2, r4, r7
.L8:
	ldr	r3, [r4], #4
	cmp	r4, r2
	orr	r5, r3, r5, lsl #8
	bne	.L8
	cmp	r5, #0
	ble	.L22
	sub	r1, r1, r4
	asr	r1, r1, #2
	cmp	r1, r5
	blt	.L22
	beq	.L36
	add	r0, r5, #4
	bl	block_Alloc
	subs	r3, r0, #0
	beq	.L5
	ldr	r1, [r6, #16]
	ldr	r2, [r6, #12]
	ldr	r0, [r3, #4]
	str	r1, [r3, #16]
	str	r2, [r3, #12]
	mov	r1, r4
	mov	r2, r5
	add	r0, r0, #16
	str	r3, [sp]
	bl	memcpy
	ldr	r3, [sp]
	mov	r0, r9
	ldr	r1, [r3, #4]
	mov	r2, r3
	mov	r3, #1
	str	r8, [r1]
	str	r8, [r1, #4]
	str	r8, [r1, #8]
	str	r3, [r1, #12]
	add	r1, sp, #16
	blx	r10
	cmp	r0, #0
	add	r4, r4, r5, lsl #2
	bne	.L13
.L19:
	ldmib	r6, {r1, r3}
	add	r1, r1, r3, lsl #2
	cmp	r1, r4
	bls	.L5
	sub	r3, r1, r4
	cmp	fp, r3, asr #2
	ble	.L15
.L5:
	mov	r0, r6
	bl	block_Release
	b	.L16
.L36:
	mov	r2, r5
	mov	r1, #4
	mov	r0, r6
	stmib	r6, {r4, r5}
	bl	block_Realloc
	subs	r2, r0, #0
	beq	.L5
	mov	r1, #0
	mov	ip, #1
	ldr	r3, [r2, #4]
	mov	r0, r9
	str	r1, [r3]
	str	r1, [r3, #4]
	str	r1, [r3, #8]
	str	ip, [r3, #12]
	add	r1, sp, #16
	blx	r10
	cmp	r0, #0
	beq	.L16
	mov	r1, r0
	add	r0, sp, #12
	bl	block_ChainAppend
.L16:
	ldr	r6, [sp, #12]
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	str	r5, [sp, #4]
.L7:
	mov	r0, r9
	ldr	r2, [sp, #4]
	ldr	r1, .L38+8
	bl	msg_Err
	mov	r0, r6
	bl	block_Release
	b	.L16
.L21:
	mov	r6, ip
	b	.L1
.L35:
	mov	r0, r6
	bl	block_Release
	mov	r6, r4
	b	.L1
.L13:
	mov	r1, r0
	add	r0, sp, #12
	bl	block_ChainAppend
	b	.L19
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC1
	.word	BLOCK_FLAG_CORRUPTED
	.word	.LC0
	.size	PacketizeXXC1, .-PacketizeXXC1
	.comm	BLOCK_FLAG_CORRUPTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
