	.file	"96869.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Compresses a file to the DEFLATE format.\n24 Aug 2002, Piotr Fusik <fox@scene.pl>\nUsage: deflater input_file deflated_file\n"
.LC1:
	.string	"deflater: Out of memory!\n"
.LC2:
	.string	"rb"
.LC3:
	.string	"1.2.11"
	.align 8
.LC4:
	.string	"deflater: deflateInit2 failed\n"
.LC5:
	.string	"deflater: deflate failed\n"
.LC6:
	.string	"deflater: deflateEnd failed\n"
.LC7:
	.string	"wb"
	.align 8
.LC8:
	.string	"Compressed %s (%d bytes) to %s (%d bytes)\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -180[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 122
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 3
	jmp	.L12
.L2:
	mov	edi, 60000
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	edi, 60000
	call	malloc@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	je	.L4
	cmp	QWORD PTR -160[rbp], 0
	jne	.L5
.L4:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L5:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L6:
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rcx, rdx
	mov	edx, 60000
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	mov	DWORD PTR -120[rbp], eax
	mov	rax, QWORD PTR -160[rbp]
	mov	QWORD PTR -104[rbp], rax
	mov	DWORD PTR -96[rbp], 60000
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	lea	rax, -128[rbp]
	push	112
	lea	rdx, .LC3[rip]
	push	rdx
	mov	r9d, 0
	mov	r8d, 9
	mov	ecx, -15
	mov	edx, 8
	mov	esi, 9
	mov	rdi, rax
	call	deflateInit2_@PLT
	add	rsp, 16
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L7:
	lea	rax, -128[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	deflate@PLT
	cmp	eax, 1
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L8:
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	deflateEnd@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L12
.L9:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L10:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -88[rbp]
	cmp	QWORD PTR -136[rbp], rax
	je	.L11
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	eax, 1
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, QWORD PTR -136[rbp]
	mov	rdx, QWORD PTR -144[rbp]
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"96869.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Compresses a file to the DEFLATE format.\01224 Aug "
	.ascii	"2002, Piotr Fusik <fox@scene.pl>\012Usage: deflater"
	.ascii	" input_file deflated_file\012\000"
	.align	2
.LC1:
	.ascii	"deflater: Out of memory!\012\000"
	.align	2
.LC2:
	.ascii	"rb\000"
	.align	2
.LC3:
	.ascii	"1.2.11\000"
	.align	2
.LC4:
	.ascii	"deflater: deflateInit2 failed\012\000"
	.align	2
.LC5:
	.ascii	"deflater: deflate failed\012\000"
	.align	2
.LC6:
	.ascii	"deflater: deflateEnd failed\012\000"
	.align	2
.LC7:
	.ascii	"wb\000"
	.align	2
.LC8:
	.ascii	"Compressed %s (%d bytes) to %s (%d bytes)\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #122
	mov	r1, #1
	ldr	r0, .L14+8
	bl	fwrite
	mov	r3, #3
	b	.L12
.L2:
	ldr	r0, .L14+12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-84]
	ldr	r0, .L14+12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L5
.L4:
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L14+16
	bl	fwrite
	mov	r3, #1
	b	.L12
.L5:
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L14+20
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L12
.L6:
	ldr	r3, [fp, #-76]
	ldr	r2, .L14+12
	mov	r1, #1
	ldr	r0, [fp, #-84]
	bl	fread
	str	r0, [fp, #-72]
	ldr	r0, [fp, #-76]
	bl	fclose
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-52]
	ldr	r3, .L14+12
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r0, fp, #64
	mov	r3, #56
	str	r3, [sp, #12]
	ldr	r3, .L14+24
	str	r3, [sp, #8]
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #9
	str	r3, [sp]
	mvn	r3, #14
	mov	r2, #8
	mov	r1, #9
	bl	deflateInit2_
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L14+28
	bl	fwrite
	mov	r3, #1
	b	.L12
.L7:
	sub	r3, fp, #64
	mov	r1, #4
	mov	r0, r3
	bl	deflate
	mov	r3, r0
	cmp	r3, #1
	beq	.L8
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L14+32
	bl	fwrite
	mov	r3, #1
	b	.L12
.L8:
	sub	r3, fp, #64
	mov	r0, r3
	bl	deflateEnd
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L14+4
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L14+36
	bl	fwrite
	mov	r3, #1
	b	.L12
.L9:
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L14+40
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L12
.L10:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-76]
	mov	r1, #1
	ldr	r0, [fp, #-80]
	bl	fwrite
	str	r0, [fp, #-68]
	ldr	r0, [fp, #-76]
	bl	fclose
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-68]
	cmp	r2, r3
	beq	.L11
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r3, #1
	b	.L12
.L11:
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r3, [fp, #-92]
	add	r3, r3, #8
	ldr	r2, [r3]
	ldr	r3, [fp, #-68]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-72]
	ldr	r0, .L14+44
	bl	printf
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC9
	.word	stderr
	.word	.LC0
	.word	60000
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
