	.file	"53997.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/grf0"
.LC1:
	.string	"open"
.LC2:
	.string	"mmap"
	.align 8
.LC3:
	.string	"Usage: %s [red green blue [code]]\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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -24[rbp], 7
	mov	edx, 0
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -20[rbp]
	mov	r9d, 8192
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 512
	mov	QWORD PTR -8[rbp], rax
	cmp	DWORD PTR -52[rbp], 5
	jne	.L4
	sub	DWORD PTR -52[rbp], 1
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 15
	jle	.L4
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	cmp	DWORD PTR -52[rbp], 4
	je	.L5
	mov	DWORD PTR -28[rbp], 31
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -32[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -36[rbp], 31
	jg	.L7
	cmp	DWORD PTR -32[rbp], 31
	jg	.L7
	cmp	DWORD PTR -28[rbp], 31
	jle	.L6
.L7:
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 31
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -36[rbp], eax
.L6:
	sal	DWORD PTR -36[rbp], 6
	sal	DWORD PTR -32[rbp], 11
	sal	DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -32[rbp]
	or	edx, eax
	mov	eax, DWORD PTR -28[rbp]
	or	eax, edx
	or	eax, 1
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rcx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	mov	WORD PTR [rax], dx
	mov	edi, 0
	call	exit@PLT
	.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	"53997.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/grf0\000"
	.align	2
.LC1:
	.ascii	"open\000"
	.align	2
.LC2:
	.ascii	"mmap\000"
	.align	2
.LC3:
	.ascii	"Usage: %s [red green blue [code]]\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #7
	str	r3, [fp, #-20]
	mov	r2, #0
	mov	r1, #2
	ldr	r0, .L8
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L8+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #8192
	str	r3, [sp, #4]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L8+8
	bl	perror
	ldr	r0, [fp, #-16]
	bl	close
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r3, [fp, #-12]
	add	r3, r3, #512
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-40]
	cmp	r3, #5
	bne	.L4
	ldr	r3, [fp, #-40]
	sub	r3, r3, #1
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #15
	ble	.L4
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L8+12
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	beq	.L5
	mov	r3, #31
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-32]
	b	.L6
.L5:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-44]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r3, #31
	bgt	.L7
	ldr	r3, [fp, #-28]
	cmp	r3, #31
	bgt	.L7
	ldr	r3, [fp, #-24]
	cmp	r3, #31
	ble	.L6
.L7:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L8+12
	bl	printf
	mov	r3, #31
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-32]
.L6:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #6
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #11
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r2, r3
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r2, r3
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r3, #1
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	ldr	r1, [fp, #-8]
	add	r3, r1, r3
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	strh	r2, [r3]	@ movhi
	mov	r0, #0
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
