	.file	"787761.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"minimOS128.pal"
.LC2:
	.string	"*** CANNOT WRITE ***"
.LC3:
	.string	"%c%c%c"
.LC4:
	.string	"Created %d system colours\n"
	.align 8
.LC5:
	.string	"Added system greyscale (total %d entries)\n"
	.align 8
.LC6:
	.string	"Finished palette with %d entries\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	mov	DWORD PTR -96[rbp], 255
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 85
	mov	DWORD PTR -72[rbp], 170
	mov	DWORD PTR -68[rbp], 255
	mov	DWORD PTR -64[rbp], 32
	mov	DWORD PTR -60[rbp], 96
	mov	DWORD PTR -56[rbp], 159
	mov	DWORD PTR -52[rbp], 223
	mov	DWORD PTR -48[rbp], 16
	mov	DWORD PTR -44[rbp], 48
	mov	DWORD PTR -40[rbp], 80
	mov	DWORD PTR -36[rbp], 112
	mov	DWORD PTR -32[rbp], 143
	mov	DWORD PTR -28[rbp], 175
	mov	DWORD PTR -24[rbp], 207
	mov	DWORD PTR -20[rbp], 239
	mov	DWORD PTR -92[rbp], 42
	mov	DWORD PTR -88[rbp], 128
	mov	DWORD PTR -84[rbp], 213
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	jne	.L2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L22
.L2:
	mov	DWORD PTR -124[rbp], 0
	jmp	.L4
.L11:
	mov	DWORD PTR -136[rbp], 0
	jmp	.L5
.L10:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L6
.L9:
	mov	DWORD PTR -128[rbp], 0
	jmp	.L7
.L8:
	add	DWORD PTR -116[rbp], 1
	mov	eax, DWORD PTR -124[rbp]
	add	eax, eax
	or	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -132[rbp], eax
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	esi, DWORD PTR -100[rbp+rax*4]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	mov	ecx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	mov	edx, DWORD PTR -100[rbp+rax*4]
	mov	rax, QWORD PTR -112[rbp]
	mov	r8d, esi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -128[rbp], 1
.L7:
	cmp	DWORD PTR -128[rbp], 1
	jle	.L8
	add	DWORD PTR -120[rbp], 1
.L6:
	cmp	DWORD PTR -120[rbp], 1
	jle	.L9
	add	DWORD PTR -136[rbp], 1
.L5:
	cmp	DWORD PTR -136[rbp], 1
	jle	.L10
	add	DWORD PTR -124[rbp], 1
.L4:
	cmp	DWORD PTR -124[rbp], 1
	jle	.L11
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -132[rbp], 15
	jmp	.L12
.L13:
	add	DWORD PTR -116[rbp], 1
	mov	esi, DWORD PTR -132[rbp]
	mov	ecx, DWORD PTR -132[rbp]
	mov	edx, DWORD PTR -132[rbp]
	mov	rax, QWORD PTR -112[rbp]
	mov	r8d, esi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -132[rbp], 15
.L12:
	cmp	DWORD PTR -132[rbp], 254
	jle	.L13
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -136[rbp], 0
	jmp	.L14
.L21:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L15
.L20:
	mov	DWORD PTR -132[rbp], 0
	jmp	.L16
.L19:
	mov	DWORD PTR -124[rbp], 0
	jmp	.L17
.L18:
	add	DWORD PTR -116[rbp], 1
	mov	eax, DWORD PTR -124[rbp]
	add	eax, eax
	or	eax, DWORD PTR -120[rbp]
	mov	DWORD PTR -128[rbp], eax
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	esi, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	mov	ecx, DWORD PTR -48[rbp+rax*4]
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	mov	edx, DWORD PTR -92[rbp+rax*4]
	mov	rax, QWORD PTR -112[rbp]
	mov	r8d, esi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -124[rbp], 1
.L17:
	cmp	DWORD PTR -124[rbp], 1
	jle	.L18
	add	DWORD PTR -132[rbp], 1
.L16:
	cmp	DWORD PTR -132[rbp], 7
	jle	.L19
	add	DWORD PTR -120[rbp], 1
.L15:
	cmp	DWORD PTR -120[rbp], 1
	jle	.L20
	add	DWORD PTR -136[rbp], 1
.L14:
	cmp	DWORD PTR -136[rbp], 2
	jle	.L21
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L22:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"787761.c"
	.text
	.section	.rodata
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.ascii	"minimOS128.pal\000"
	.align	2
.LC6:
	.ascii	"*** CANNOT WRITE ***\000"
	.align	2
.LC7:
	.ascii	"%c%c%c\000"
	.align	2
.LC8:
	.ascii	"Created %d system colours\012\000"
	.align	2
.LC9:
	.ascii	"Added system greyscale (total %d entries)\012\000"
	.align	2
.LC10:
	.ascii	"Finished palette with %d entries\012\000"
	.align	2
.LC0:
	.word	0
	.word	85
	.word	170
	.word	255
	.align	2
.LC1:
	.word	32
	.word	96
	.word	159
	.word	223
	.align	2
.LC2:
	.word	16
	.word	48
	.word	80
	.word	112
	.word	143
	.word	175
	.word	207
	.word	239
	.align	2
.LC3:
	.word	42
	.word	128
	.word	213
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-100]
	mov	r3, #0
	str	r3, [fp, #-92]
	mov	r3, #255
	str	r3, [fp, #-88]
	ldr	r3, .L24+4
	sub	ip, fp, #72
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L24+8
	sub	ip, fp, #56
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L24+12
	sub	ip, fp, #40
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r2, .L24+16
	sub	r3, fp, #84
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r1, .L24+20
	ldr	r0, .L24+24
	bl	fopen
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L24+28
	bl	puts
	mvn	r3, #0
	b	.L22
.L2:
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L4
.L11:
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L5
.L10:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L6
.L9:
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L7
.L8:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-104]
	orr	r3, r2, r3
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-88]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-68]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-88]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L24+32
	ldr	r0, [fp, #-96]
	bl	fprintf
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L7:
	ldr	r3, [fp, #-112]
	cmp	r3, #1
	ble	.L8
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L6:
	ldr	r3, [fp, #-104]
	cmp	r3, #1
	ble	.L9
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L5:
	ldr	r3, [fp, #-120]
	cmp	r3, #1
	ble	.L10
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L4:
	ldr	r3, [fp, #-108]
	cmp	r3, #1
	ble	.L11
	ldr	r1, [fp, #-100]
	ldr	r0, .L24+36
	bl	printf
	mov	r3, #15
	str	r3, [fp, #-116]
	b	.L12
.L13:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-116]
	str	r3, [sp]
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-116]
	ldr	r1, .L24+32
	ldr	r0, [fp, #-96]
	bl	fprintf
	ldr	r3, [fp, #-116]
	add	r3, r3, #15
	str	r3, [fp, #-116]
.L12:
	ldr	r3, [fp, #-116]
	cmp	r3, #254
	ble	.L13
	ldr	r1, [fp, #-100]
	ldr	r0, .L24+40
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L14
.L21:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L15
.L20:
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L16
.L19:
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L17
.L18:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-104]
	orr	r3, r2, r3
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-80]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-36]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-52]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L24+32
	ldr	r0, [fp, #-96]
	bl	fprintf
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L17:
	ldr	r3, [fp, #-108]
	cmp	r3, #1
	ble	.L18
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L16:
	ldr	r3, [fp, #-116]
	cmp	r3, #7
	ble	.L19
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L15:
	ldr	r3, [fp, #-104]
	cmp	r3, #1
	ble	.L20
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L14:
	ldr	r3, [fp, #-120]
	cmp	r3, #2
	ble	.L21
	ldr	r0, [fp, #-96]
	bl	fclose
	ldr	r1, [fp, #-100]
	ldr	r0, .L24+44
	bl	printf
	mov	r3, #0
.L22:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
