	.file	"extr_cio.c_opj_stream_write_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	opj_stream_write_data
	.type	opj_stream_write_data, @function
opj_stream_write_data:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR OPJ_STREAM_STATUS_ERROR[rip], eax
	jne	.L12
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	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
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, r13
	mov	rdi, r15
	call	opj_stream_flush@PLT
	test	eax, eax
	je	.L17
.L6:
	mov	rbx, QWORD PTR 8[r15]
	sub	rbx, QWORD PTR 16[r15]
	cmp	rbp, rbx
	jle	.L18
	test	rbx, rbx
	je	.L5
	mov	edi, DWORD PTR 32[r15]
	mov	rsi, r12
	mov	rdx, rbx
	add	r14, rbx
	sub	rbp, rbx
	lea	r12, [r12+rbx*4]
	call	memcpy@PLT
	mov	eax, DWORD PTR 28[r15]
	add	QWORD PTR 16[r15], rbx
	mov	rsi, r13
	add	DWORD PTR 24[r15], ebx
	mov	rdi, r15
	mov	DWORD PTR 32[r15], eax
	call	opj_stream_flush@PLT
	test	eax, eax
	jne	.L6
.L17:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, -1
	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
.L18:
	.cfi_restore_state
	mov	edi, DWORD PTR 32[r15]
	mov	rdx, rbp
	mov	rsi, r12
	call	memcpy@PLT
	add	DWORD PTR 32[r15], ebp
	lea	rax, 0[rbp+r14]
	add	QWORD PTR 16[r15], rbp
	add	DWORD PTR 24[r15], ebp
	add	rsp, 8
	.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
.L12:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	mov	rax, -1
	ret
	.cfi_endproc
.LFE0:
	.size	opj_stream_write_data, .-opj_stream_write_data
	.comm	OPJ_STREAM_STATUS_ERROR,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_cio.c_opj_stream_write_data.c"
	.text
	.align	2
	.global	opj_stream_write_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	opj_stream_write_data, %function
opj_stream_write_data:
	@ 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, .L14
	ldr	r9, [r5]
	ldr	ip, [r0]
	ands	r9, r9, ip
	bne	.L2
	mov	r7, r1
	mov	r6, r2
	mov	r8, r3
	b	.L6
.L5:
	mov	r1, r8
	mov	r0, r5
	bl	opj_stream_flush
	cmp	r0, #0
	beq	.L2
.L6:
	ldmib	r5, {r4, ip}
	sub	r4, r4, ip
	cmp	r6, r4
	ble	.L13
	cmp	r4, #0
	beq	.L5
	mov	r1, r7
	mov	r2, r4
	ldr	r0, [r5, #20]
	bl	memcpy
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #12]
	ldr	r1, [r5, #16]
	add	r2, r2, r4
	add	r3, r3, r4
	add	r9, r9, r4
	sub	r6, r6, r4
	add	r7, r7, r4, lsl #2
	str	r2, [r5, #8]
	str	r3, [r5, #12]
	str	r1, [r5, #20]
	b	.L5
.L13:
	mov	r1, r7
	mov	r2, r6
	ldr	r0, [r5, #20]
	bl	memcpy
	ldr	r1, [r5, #20]
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #12]
	add	r1, r1, r6
	add	r2, r2, r6
	add	r3, r3, r6
	add	r0, r6, r9
	str	r1, [r5, #20]
	str	r2, [r5, #8]
	str	r3, [r5, #12]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	.align	2
.L14:
	.word	OPJ_STREAM_STATUS_ERROR
	.size	opj_stream_write_data, .-opj_stream_write_data
	.comm	OPJ_STREAM_STATUS_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
