	.file	"159515363.c"
	.intel_syntax noprefix
	.text
	.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: build boot system [> image]"
	.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 'boot'"
	.align 8
.LC3:
	.string	"Unable to read header of 'boot'"
.LC4:
	.string	"Non-Minix header of 'boot'"
	.align 8
.LC5:
	.string	"Illegal data segment in 'boot'"
.LC6:
	.string	"Illegal bss in 'boot'"
	.align 8
.LC7:
	.string	"Illegal symbol table in 'boot'"
.LC8:
	.string	"Boot sector %d bytes.\n"
	.align 8
.LC9:
	.string	"Boot block may not exceed 510 bytes"
.LC10:
	.string	"Write call failed"
.LC11:
	.string	"Unable to open 'system'"
.LC12:
	.string	"System %d bytes.\n"
	.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1060[rbp], 3
	je	.L4
	call	usage
.L4:
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -1052[rbp]
	cdqe
	mov	BYTE PTR -1040[rbp+rax], 0
	add	DWORD PTR -1052[rbp], 1
.L5:
	mov	eax, DWORD PTR -1052[rbp]
	cmp	eax, 1023
	jbe	.L6
	mov	rax, QWORD PTR -1072[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 -1048[rbp], eax
	cmp	DWORD PTR -1048[rbp], 0
	jns	.L7
	lea	rdi, .LC2[rip]
	call	die
.L7:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, 32
	je	.L8
	lea	rdi, .LC3[rip]
	call	die
.L8:
	lea	rax, -1040[rbp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, 68158209
	je	.L9
	lea	rdi, .LC4[rip]
	call	die
.L9:
	lea	rax, -1040[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	cmp	rax, 32
	je	.L10
	lea	rdi, .LC4[rip]
	call	die
.L10:
	lea	rax, -1040[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L11
	lea	rdi, .LC5[rip]
	call	die
.L11:
	lea	rax, -1040[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L12
	lea	rdi, .LC6[rip]
	call	die
.L12:
	lea	rax, -1040[rbp]
	add	rax, 40
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L13
	lea	rdi, .LC4[rip]
	call	die
.L13:
	lea	rax, -1040[rbp]
	add	rax, 56
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L14
	lea	rdi, .LC7[rip]
	call	die
.L14:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1052[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -1052[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	cmp	DWORD PTR -1052[rbp], 510
	jle	.L15
	lea	rdi, .LC9[rip]
	call	die
.L15:
	mov	BYTE PTR -530[rbp], 85
	mov	BYTE PTR -529[rbp], -86
	lea	rax, -1040[rbp]
	mov	edx, 512
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 512
	je	.L16
	lea	rdi, .LC10[rip]
	call	die
.L16:
	mov	eax, DWORD PTR -1048[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -1072[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1048[rbp], eax
	cmp	DWORD PTR -1048[rbp], 0
	jns	.L17
	lea	rdi, .LC11[rip]
	call	die
.L17:
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L18
.L20:
	mov	eax, DWORD PTR -1044[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	edx, DWORD PTR -1044[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L19
	lea	rdi, .LC10[rip]
	call	die
.L19:
	mov	eax, DWORD PTR -1044[rbp]
	add	DWORD PTR -1052[rbp], eax
.L18:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jg	.L20
	lea	rax, -1040[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -1048[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -1052[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	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	"159515363.c"
	.text
	.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: build boot system [> image]\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 'boot'\000"
	.align	2
.LC3:
	.ascii	"Unable to read header of 'boot'\000"
	.align	2
.LC4:
	.ascii	"Non-Minix header of 'boot'\000"
	.align	2
.LC5:
	.ascii	"Illegal data segment in 'boot'\000"
	.align	2
.LC6:
	.ascii	"Illegal bss in 'boot'\000"
	.align	2
.LC7:
	.ascii	"Illegal symbol table in 'boot'\000"
	.align	2
.LC8:
	.ascii	"Boot sector %d bytes.\012\000"
	.align	2
.LC9:
	.ascii	"Boot block may not exceed 510 bytes\000"
	.align	2
.LC10:
	.ascii	"Write call failed\000"
	.align	2
.LC11:
	.ascii	"Unable to open 'system'\000"
	.align	2
.LC12:
	.ascii	"System %d bytes.\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1048]
	cmp	r3, #3
	beq	.L8
	bl	usage
.L8:
	mov	r3, #0
	str	r3, [fp, #-1044]
	b	.L9
.L10:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1044]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
.L9:
	ldr	r3, [fp, #-1044]
	cmp	r3, #1024
	bcc	.L10
	ldr	r3, [fp, #-1052]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L27+4
	bl	die
.L11:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #32
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	mov	r3, r0
	cmp	r3, #32
	beq	.L12
	ldr	r0, .L27+8
	bl	die
.L12:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L27+12
	cmp	r3, r2
	beq	.L13
	ldr	r0, .L27+16
	bl	die
.L13:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #32
	beq	.L14
	ldr	r0, .L27+16
	bl	die
.L14:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L27+20
	bl	die
.L15:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L27+24
	bl	die
.L16:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L17
	ldr	r0, .L27+16
	bl	die
.L17:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L27+28
	bl	die
.L18:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1044]
	ldr	r3, .L27+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-1044]
	ldr	r1, .L27+36
	mov	r0, r3
	bl	fprintf
	ldr	r3, [fp, #-1044]
	ldr	r2, .L27+40
	cmp	r3, r2
	ble	.L19
	ldr	r0, .L27+44
	bl	die
.L19:
	mov	r3, #85
	strb	r3, [fp, #-522]
	mvn	r3, #85
	strb	r3, [fp, #-521]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #512
	mov	r1, r3
	mov	r0, #1
	bl	write
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #512
	beq	.L20
	ldr	r0, .L27+48
	bl	die
.L20:
	ldr	r0, [fp, #-1040]
	bl	close
	ldr	r3, [fp, #-1052]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L27+52
	bl	die
.L21:
	mov	r3, #0
	str	r3, [fp, #-1044]
	b	.L22
.L24:
	ldr	r2, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-1036]
	cmp	r3, r2
	beq	.L23
	ldr	r0, .L27+48
	bl	die
.L23:
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1036]
	add	r3, r2, r3
	str	r3, [fp, #-1044]
.L22:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bgt	.L24
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, [fp, #-1040]
	bl	close
	ldr	r3, .L27+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-1044]
	ldr	r1, .L27+56
	mov	r0, r3
	bl	fprintf
	mov	r3, #0
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC13
	.word	.LC2
	.word	.LC3
	.word	68158209
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	510
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
