	.file	"235917.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	GCC_HEADER, @object
	.size	GCC_HEADER, 4
GCC_HEADER:
	.long	40
	.section	.rodata
.LC0:
	.string	"%s\n"
	.text
	.globl	die
	.type	die, @function
die:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	die, .-die
	.section	.rodata
	.align 8
.LC1:
	.string	"Usage: xtract system [ | gzip | piggyback > piggy.s]"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC1[rip]
	call	die
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.section	.rodata
.LC2:
	.string	"Unable to open 'system'"
	.align 8
.LC3:
	.string	"Unable to read header of 'system'"
.LC4:
	.string	"Non-GCC header of 'system'"
.LC5:
	.string	"System size is %d\n"
.LC6:
	.string	"Unexpected EOF\n"
.LC7:
	.string	"Can't read system"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1232
	mov	DWORD PTR -1220[rbp], edi
	mov	QWORD PTR -1232[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1192[rbp], rax
	cmp	DWORD PTR -1220[rbp], 2
	je	.L4
	call	usage
.L4:
	mov	rax, QWORD PTR -1232[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1200[rbp], eax
	cmp	DWORD PTR -1200[rbp], 0
	jns	.L5
	lea	rdi, .LC2[rip]
	call	die
.L5:
	mov	eax, DWORD PTR GCC_HEADER[rip]
	movsx	rdx, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1200[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	edx, DWORD PTR GCC_HEADER[rip]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L6
	lea	rdi, .LC3[rip]
	call	die
.L6:
	mov	rax, QWORD PTR -1192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, ax
	cmp	rax, 267
	jne	.L7
	mov	DWORD PTR GCC_HEADER[rip], 1024
	mov	eax, DWORD PTR GCC_HEADER[rip]
	movsx	rcx, eax
	mov	eax, DWORD PTR -1200[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -1192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, ax
	cmp	rax, 204
	je	.L8
	lea	rdi, .LC4[rip]
	call	die
.L8:
	mov	rax, QWORD PTR -1192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, ax
	cmp	rax, 267
	je	.L9
	mov	rax, QWORD PTR -1192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, ax
	cmp	rax, 204
	jne	.L10
	mov	edx, 0
	jmp	.L12
.L10:
	mov	edx, 40
	jmp	.L12
.L9:
	mov	edx, 1024
.L12:
	mov	rax, QWORD PTR -1192[rbp]
	mov	eax, DWORD PTR 8[rax]
	add	edx, eax
	mov	rax, QWORD PTR -1192[rbp]
	mov	eax, DWORD PTR 12[rax]
	add	edx, eax
	mov	rax, QWORD PTR -1192[rbp]
	mov	eax, DWORD PTR 28[rax]
	add	edx, eax
	mov	rax, QWORD PTR -1192[rbp]
	mov	eax, DWORD PTR 32[rax]
	add	edx, eax
	mov	eax, DWORD PTR GCC_HEADER[rip]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	add	eax, 4
	mov	DWORD PTR -1208[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -1208[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L13
.L18:
	mov	eax, DWORD PTR -1208[rbp]
	mov	DWORD PTR -1204[rbp], eax
	mov	eax, DWORD PTR -1204[rbp]
	cmp	eax, 1024
	jbe	.L14
	mov	DWORD PTR -1204[rbp], 1024
.L14:
	mov	eax, DWORD PTR -1204[rbp]
	movsx	rdx, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1200[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1196[rbp], eax
	mov	eax, DWORD PTR -1196[rbp]
	cmp	eax, DWORD PTR -1204[rbp]
	je	.L15
	cmp	DWORD PTR -1196[rbp], -1
	jne	.L16
	mov	rax, QWORD PTR -1232[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	jmp	.L17
.L16:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
.L17:
	lea	rdi, .LC7[rip]
	call	die
.L15:
	mov	eax, DWORD PTR -1204[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	eax, DWORD PTR -1204[rbp]
	sub	DWORD PTR -1208[rbp], eax
.L13:
	cmp	DWORD PTR -1208[rbp], 0
	jne	.L18
	mov	eax, DWORD PTR -1200[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"235917.c"
	.text
	.data
	.align	2
	.type	GCC_HEADER, %object
	.size	GCC_HEADER, 4
GCC_HEADER:
	.word	32
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	die
	.syntax unified
	.arm
	.fpu softvfp
	.type	die, %function
die:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L2
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L2+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	die, .-die
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: xtract system [ | gzip | piggyback > piggy.s"
	.ascii	"]\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L5
	bl	die
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Unable to open 'system'\000"
	.align	2
.LC3:
	.ascii	"Unable to read header of 'system'\000"
	.align	2
.LC4:
	.ascii	"Non-GCC header of 'system'\000"
	.align	2
.LC5:
	.ascii	"System size is %d\012\000"
	.align	2
.LC6:
	.ascii	"Unexpected EOF\012\000"
	.align	2
.LC7:
	.ascii	"Can't read system\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1152
	str	r0, [fp, #-1152]
	str	r1, [fp, #-1156]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1136]
	ldr	r3, [fp, #-1152]
	cmp	r3, #2
	beq	.L8
	bl	usage
.L8:
	ldr	r3, [fp, #-1156]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1132]
	ldr	r3, [fp, #-1132]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L25+4
	bl	die
.L9:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1132]
	bl	read
	mov	r2, r0
	ldr	r3, .L25+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L10
	ldr	r0, .L25+12
	bl	die
.L10:
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L25+16
	cmp	r3, r2
	bne	.L11
	ldr	r3, .L25+8
	mov	r2, #1024
	str	r2, [r3]
	ldr	r3, .L25+8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-1132]
	bl	lseek
	b	.L12
.L11:
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r3, #204
	beq	.L12
	ldr	r0, .L25+20
	bl	die
.L12:
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L25+16
	cmp	r3, r2
	beq	.L13
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	cmp	r3, #204
	bne	.L14
	mov	r3, #0
	b	.L16
.L14:
	mov	r3, #32
	b	.L16
.L13:
	mov	r3, #1024
.L16:
	ldr	r2, [fp, #-1136]
	ldr	r2, [r2, #4]
	add	r2, r3, r2
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3, #8]
	add	r2, r2, r3
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3, #24]
	add	r2, r2, r3
	ldr	r3, [fp, #-1136]
	ldr	r3, [r3, #28]
	add	r3, r2, r3
	ldr	r2, .L25+8
	ldr	r2, [r2]
	sub	r3, r3, r2
	add	r3, r3, #4
	str	r3, [fp, #-1144]
	ldr	r3, .L25+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-1144]
	ldr	r1, .L25+28
	mov	r0, r3
	bl	fprintf
	b	.L17
.L22:
	ldr	r3, [fp, #-1144]
	str	r3, [fp, #-1140]
	ldr	r3, [fp, #-1140]
	cmp	r3, #1024
	bls	.L18
	mov	r3, #1024
	str	r3, [fp, #-1140]
.L18:
	ldr	r2, [fp, #-1140]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1132]
	bl	read
	str	r0, [fp, #-1128]
	ldr	r2, [fp, #-1128]
	ldr	r3, [fp, #-1140]
	cmp	r2, r3
	beq	.L19
	ldr	r3, [fp, #-1128]
	cmn	r3, #1
	bne	.L20
	ldr	r3, [fp, #-1156]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	b	.L21
.L20:
	ldr	r3, .L25+24
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L25+32
	bl	fwrite
.L21:
	ldr	r0, .L25+36
	bl	die
.L19:
	ldr	r2, [fp, #-1140]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	ldr	r2, [fp, #-1144]
	ldr	r3, [fp, #-1140]
	sub	r3, r2, r3
	str	r3, [fp, #-1144]
.L17:
	ldr	r3, [fp, #-1144]
	cmp	r3, #0
	bne	.L22
	ldr	r0, [fp, #-1132]
	bl	close
	mov	r3, #0
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC8
	.word	.LC2
	.word	GCC_HEADER
	.word	.LC3
	.word	267
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
