	.file	"277308.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s file.gz\n"
.LC1:
	.string	".gz"
	.align 8
.LC2:
	.string	"%s: Not sure if this file is gzipped. Try renaming it to include `.gz' at the end.\n"
.LC3:
	.string	"r"
.LC4:
	.string	"w"
	.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
	push	r12
	push	rbx
	sub	rsp, 1104
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -1108[rbp], edi
	mov	QWORD PTR -1120[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1108[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -1120[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	r12, QWORD PTR [rax]
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 3
	add	rax, r12
	cmp	rbx, rax
	je	.L4
	mov	rax, QWORD PTR -1120[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	gzopen@PLT
	mov	QWORD PTR -1088[rbp], rax
	cmp	QWORD PTR -1088[rbp], 0
	jne	.L5
	mov	eax, 1
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -1080[rbp], rax
	mov	rax, QWORD PTR -1080[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -1072[rbp], rax
	mov	rax, QWORD PTR -1072[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -1080[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1064[rbp], rax
	cmp	QWORD PTR -1064[rbp], 0
	jne	.L7
	mov	eax, 1
	jmp	.L3
.L8:
	lea	rcx, -1056[rbp]
	mov	rax, QWORD PTR -1088[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	rdi, rax
	call	gzread@PLT
	mov	DWORD PTR -1092[rbp], eax
	mov	eax, DWORD PTR -1092[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1056[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L7:
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdi, rax
	call	gzeof@PLT
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	unlink@PLT
	mov	eax, 0
.L3:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	add	rsp, 1104
	pop	rbx
	pop	r12
	pop	rbp
	.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	"277308.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s file.gz\012\000"
	.align	2
.LC1:
	.ascii	".gz\000"
	.align	2
.LC2:
	.ascii	"%s: Not sure if this file is gzipped. Try renaming "
	.ascii	"it to include `.gz' at the end.\012\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #1056
	str	r0, [fp, #-1064]
	str	r1, [fp, #-1068]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1064]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1068]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L10+8
	bl	fprintf
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+12
	mov	r0, r3
	bl	strstr
	mov	r5, r0
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r4, [r3]
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #3
	add	r3, r4, r3
	cmp	r5, r3
	beq	.L4
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1068]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L10+16
	bl	fprintf
	mov	r3, #1
	b	.L3
.L4:
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+20
	mov	r0, r3
	bl	gzopen
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	b	.L3
.L5:
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-1056]
	ldr	r1, .L10+12
	ldr	r0, [fp, #-1056]
	bl	strstr
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, .L10+24
	ldr	r0, [fp, #-1056]
	bl	fopen
	str	r0, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	bne	.L7
	mov	r3, #1
	b	.L3
.L8:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1060]
	bl	gzread
	str	r0, [fp, #-1044]
	ldr	r1, [fp, #-1044]
	sub	r0, fp, #1024
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [fp, #-1048]
	mov	r2, #1
	bl	fwrite
.L7:
	ldr	r0, [fp, #-1060]
	bl	gzeof
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r0, [fp, #-1048]
	bl	fclose
	ldr	r3, [fp, #-1068]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	unlink
	mov	r3, #0
.L3:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
