	.file	"218892096.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	Width, @object
	.size	Width, 4
Width:
	.long	500
	.align 4
	.type	Height, @object
	.size	Height, 4
Height:
	.long	500
	.local	Xangle
	.comm	Xangle,4,4
	.local	Yangle
	.comm	Yangle,4,4
	.local	Redraw
	.comm	Redraw,4,4
	.align 4
	.type	Sides, @object
	.size	Sides, 4
Sides:
	.long	5
	.align 4
	.type	MinSides, @object
	.size	MinSides, 4
MinSides:
	.long	3
	.align 4
	.type	MaxSides, @object
	.size	MaxSides, 4
MaxSides:
	.long	20
	.text
	.type	display, @function
display:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	movss	xmm0, DWORD PTR .LC0[rip]
	movss	DWORD PTR -4[rbp], xmm0
	mov	edi, 16384
	call	glClear@PLT
	call	glPushMatrix@PLT
	movss	xmm1, DWORD PTR -4[rbp]
	movss	xmm0, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -4[rbp]
	movaps	xmm2, xmm1
	movaps	xmm1, xmm0
	movd	xmm0, eax
	call	glScalef@PLT
	mov	eax, DWORD PTR Xangle[rip]
	pxor	xmm3, xmm3
	pxor	xmm2, xmm2
	movss	xmm1, DWORD PTR .LC2[rip]
	movd	xmm0, eax
	call	glRotatef@PLT
	mov	eax, DWORD PTR Yangle[rip]
	pxor	xmm3, xmm3
	movss	xmm2, DWORD PTR .LC2[rip]
	pxor	xmm1, xmm1
	movd	xmm0, eax
	call	glRotatef@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glColor3f@PLT
	mov	edi, 2
	call	glBegin@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	call	glEnd@PLT
	mov	edi, 2
	call	glBegin@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	call	glEnd@PLT
	mov	edi, 1
	call	glBegin@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC3[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC3[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	movss	xmm2, DWORD PTR .LC2[rip]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC3[rip]
	call	glVertex3f@PLT
	call	glEnd@PLT
	call	glPopMatrix@PLT
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	glXSwapBuffers@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	display, .-display
	.type	idle, @function
idle:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movss	xmm1, DWORD PTR Xangle[rip]
	movss	xmm0, DWORD PTR .LC4[rip]
	addss	xmm0, xmm1
	movss	DWORD PTR Xangle[rip], xmm0
	movss	xmm0, DWORD PTR Yangle[rip]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC5[rip]
	addsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR Yangle[rip], xmm0
	mov	DWORD PTR Redraw[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	idle, .-idle
	.type	make_shape_mask, @function
make_shape_mask:
.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, 640
	mov	QWORD PTR -600[rbp], rdi
	mov	QWORD PTR -608[rbp], rsi
	mov	DWORD PTR -612[rbp], edx
	mov	DWORD PTR -616[rbp], ecx
	mov	DWORD PTR -620[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	ecx, DWORD PTR -616[rbp]
	mov	edx, DWORD PTR -612[rbp]
	mov	rsi, QWORD PTR -608[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	r8d, 1
	mov	rdi, rax
	call	XCreatePixmap@PLT
	mov	QWORD PTR -560[rbp], rax
	lea	rdx, -544[rbp]
	mov	rsi, QWORD PTR -560[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	rcx, rdx
	mov	edx, 0
	mov	rdi, rax
	call	XCreateGC@PLT
	mov	QWORD PTR -552[rbp], rax
	mov	rcx, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	XSetForeground@PLT
	mov	ecx, DWORD PTR -616[rbp]
	mov	edi, DWORD PTR -612[rbp]
	mov	rdx, QWORD PTR -552[rbp]
	mov	rsi, QWORD PTR -560[rbp]
	mov	rax, QWORD PTR -600[rbp]
	sub	rsp, 8
	push	rcx
	mov	r9d, edi
	mov	r8d, 0
	mov	ecx, 0
	mov	rdi, rax
	call	XFillRectangle@PLT
	add	rsp, 16
	mov	rcx, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	rdi, rax
	call	XSetForeground@PLT
	mov	eax, DWORD PTR -612[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -584[rbp], eax
	mov	eax, DWORD PTR -616[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -580[rbp], eax
	pxor	xmm0, xmm0
	movss	DWORD PTR -592[rbp], xmm0
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -620[rbp]
	movsd	xmm0, QWORD PTR .LC6[rip]
	divsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -576[rbp], xmm0
	mov	eax, DWORD PTR -612[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	movss	DWORD PTR -572[rbp], xmm0
	mov	DWORD PTR -588[rbp], 0
	jmp	.L4
.L5:
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -584[rbp]
	movsd	QWORD PTR -632[rbp], xmm3
	pxor	xmm4, xmm4
	cvtss2sd	xmm4, DWORD PTR -572[rbp]
	movsd	QWORD PTR -640[rbp], xmm4
	pxor	xmm5, xmm5
	cvtss2sd	xmm5, DWORD PTR -592[rbp]
	movq	rax, xmm5
	movq	xmm0, rax
	call	sin@PLT
	mulsd	xmm0, QWORD PTR -640[rbp]
	addsd	xmm0, QWORD PTR -632[rbp]
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -568[rbp], eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, DWORD PTR -580[rbp]
	movsd	QWORD PTR -632[rbp], xmm2
	pxor	xmm6, xmm6
	cvtss2sd	xmm6, DWORD PTR -572[rbp]
	movsd	QWORD PTR -640[rbp], xmm6
	pxor	xmm7, xmm7
	cvtss2sd	xmm7, DWORD PTR -592[rbp]
	movq	rax, xmm7
	movq	xmm0, rax
	call	cos@PLT
	mulsd	xmm0, QWORD PTR -640[rbp]
	movsd	xmm1, QWORD PTR -632[rbp]
	subsd	xmm1, xmm0
	cvttsd2si	eax, xmm1
	mov	DWORD PTR -564[rbp], eax
	mov	eax, DWORD PTR -568[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -588[rbp]
	cdqe
	mov	WORD PTR -416[rbp+rax*4], dx
	mov	eax, DWORD PTR -564[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -588[rbp]
	cdqe
	mov	WORD PTR -414[rbp+rax*4], dx
	movss	xmm0, DWORD PTR -592[rbp]
	addss	xmm0, DWORD PTR -576[rbp]
	movss	DWORD PTR -592[rbp], xmm0
	add	DWORD PTR -588[rbp], 1
.L4:
	mov	eax, DWORD PTR -588[rbp]
	cmp	eax, DWORD PTR -620[rbp]
	jl	.L5
	mov	edi, DWORD PTR -620[rbp]
	lea	rcx, -416[rbp]
	mov	rdx, QWORD PTR -552[rbp]
	mov	rsi, QWORD PTR -560[rbp]
	mov	rax, QWORD PTR -600[rbp]
	sub	rsp, 8
	push	0
	mov	r9d, 2
	mov	r8d, edi
	mov	rdi, rax
	call	XFillPolygon@PLT
	add	rsp, 16
	mov	rdx, QWORD PTR -560[rbp]
	mov	rsi, QWORD PTR -608[rbp]
	mov	rax, QWORD PTR -600[rbp]
	sub	rsp, 8
	push	0
	mov	r9, rdx
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rdi, rax
	call	XShapeCombineMask@PLT
	add	rsp, 16
	mov	rdx, QWORD PTR -552[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XFreeGC@PLT
	mov	rdx, QWORD PTR -560[rbp]
	mov	rax, QWORD PTR -600[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XFreePixmap@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	make_shape_mask, .-make_shape_mask
	.type	reshape, @function
reshape:
.LFB9:
	.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, edx
	mov	edx, eax
	mov	esi, 0
	mov	edi, 0
	call	glViewport@PLT
	mov	edi, 5889
	call	glMatrixMode@PLT
	call	glLoadIdentity@PLT
	movsd	xmm4, QWORD PTR .LC7[rip]
	movsd	xmm3, QWORD PTR .LC8[rip]
	movsd	xmm2, QWORD PTR .LC9[rip]
	movsd	xmm1, QWORD PTR .LC10[rip]
	movsd	xmm0, QWORD PTR .LC9[rip]
	mov	rax, QWORD PTR .LC10[rip]
	movapd	xmm5, xmm4
	movapd	xmm4, xmm3
	movapd	xmm3, xmm2
	movapd	xmm2, xmm1
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	glFrustum@PLT
	mov	edi, 5888
	call	glMatrixMode@PLT
	call	glLoadIdentity@PLT
	movss	xmm2, DWORD PTR .LC11[rip]
	pxor	xmm1, xmm1
	pxor	xmm0, xmm0
	call	glTranslatef@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	reshape, .-reshape
	.type	event_loop, @function
event_loop:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 352
	mov	QWORD PTR -344[rbp], rdi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L20:
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	XPending@PLT
	test	eax, eax
	je	.L9
	lea	rdx, -304[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XNextEvent@PLT
	mov	eax, DWORD PTR -304[rbp]
	cmp	eax, 22
	je	.L10
	cmp	eax, 22
	jg	.L20
	cmp	eax, 2
	je	.L12
	cmp	eax, 12
	jne	.L20
	mov	rdx, QWORD PTR -272[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	display
	jmp	.L19
.L10:
	mov	eax, DWORD PTR -248[rbp]
	mov	DWORD PTR Width[rip], eax
	mov	eax, DWORD PTR -244[rbp]
	mov	DWORD PTR Height[rip], eax
	mov	edi, DWORD PTR Sides[rip]
	mov	ecx, DWORD PTR Height[rip]
	mov	edx, DWORD PTR Width[rip]
	mov	rsi, QWORD PTR -352[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	make_shape_mask
	mov	edx, DWORD PTR Height[rip]
	mov	eax, DWORD PTR Width[rip]
	mov	esi, edx
	mov	edi, eax
	call	reshape
	jmp	.L19
.L12:
	lea	rcx, -320[rbp]
	lea	rdx, -328[rbp]
	lea	rsi, -112[rbp]
	lea	rax, -304[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	mov	edx, 100
	mov	rdi, rax
	call	XLookupString@PLT
	mov	rax, QWORD PTR -328[rbp]
	cmp	rax, 65364
	je	.L13
	cmp	rax, 65364
	ja	.L22
	cmp	rax, 65307
	je	.L15
	cmp	rax, 65362
	je	.L16
	jmp	.L22
.L15:
	mov	edi, 0
	call	exit@PLT
.L16:
	mov	eax, DWORD PTR Sides[rip]
	add	eax, 1
	mov	DWORD PTR Sides[rip], eax
	mov	edx, DWORD PTR Sides[rip]
	mov	eax, DWORD PTR MaxSides[rip]
	cmp	edx, eax
	jle	.L17
	mov	eax, DWORD PTR MaxSides[rip]
	mov	DWORD PTR Sides[rip], eax
.L17:
	mov	edi, DWORD PTR Sides[rip]
	mov	ecx, DWORD PTR Height[rip]
	mov	edx, DWORD PTR Width[rip]
	mov	rsi, QWORD PTR -352[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	make_shape_mask
	jmp	.L14
.L13:
	mov	eax, DWORD PTR Sides[rip]
	sub	eax, 1
	mov	DWORD PTR Sides[rip], eax
	mov	edx, DWORD PTR Sides[rip]
	mov	eax, DWORD PTR MinSides[rip]
	cmp	edx, eax
	jge	.L18
	mov	eax, DWORD PTR MinSides[rip]
	mov	DWORD PTR Sides[rip], eax
.L18:
	mov	edi, DWORD PTR Sides[rip]
	mov	ecx, DWORD PTR Height[rip]
	mov	edx, DWORD PTR Width[rip]
	mov	rsi, QWORD PTR -352[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8d, edi
	mov	rdi, rax
	call	make_shape_mask
	nop
.L14:
	jmp	.L22
.L9:
	call	idle
	mov	eax, DWORD PTR Redraw[rip]
	test	eax, eax
	je	.L20
	mov	rdx, QWORD PTR -352[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	display
	mov	DWORD PTR Redraw[rip], 0
	jmp	.L20
.L22:
	nop
.L19:
	jmp	.L20
	.cfi_endproc
.LFE10:
	.size	event_loop, .-event_loop
	.type	alloc_colormap, @function
alloc_colormap:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 224[rax]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 224[rax]
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 104[rax]
	cmp	eax, 1
	jne	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rax, QWORD PTR 64[rax]
	cmp	QWORD PTR -40[rbp], rax
	jne	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rax, QWORD PTR 80[rax]
	jmp	.L25
.L24:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, 0
	mov	rdi, rax
	call	XCreateColormap@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	alloc_colormap, .-alloc_colormap
	.section	.rodata
	.align 8
.LC12:
	.string	"Couldn't open default display\n"
.LC13:
	.string	"SHAPE"
	.align 8
.LC14:
	.string	"Display doesn't support shape extension\n"
	.align 8
.LC15:
	.string	"Couldn't get RGB, DB, Z visual\n"
.LC16:
	.string	"Couldn't create GL context\n"
.LC17:
	.string	"Couln't create colormap\n"
.LC18:
	.string	"Press ESC to exit."
	.align 8
.LC19:
	.string	"Press up/down to change window shape."
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	XOpenDisplay@PLT
	mov	QWORD PTR -184[rbp], rax
	cmp	QWORD PTR -184[rbp], 0
	jne	.L27
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L33
.L27:
	lea	rsi, -192[rbp]
	lea	rcx, -192[rbp]
	lea	rdx, -192[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	r8, rsi
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	XQueryExtension@PLT
	test	eax, eax
	jne	.L29
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L33
.L29:
	mov	rax, QWORD PTR -184[rbp]
	mov	eax, DWORD PTR 224[rax]
	mov	DWORD PTR -188[rbp], eax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -176[rbp], rax
	mov	ecx, DWORD PTR -188[rbp]
	mov	rax, QWORD PTR -184[rbp]
	lea	rdx, glAttribs.0[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	glXChooseVisual@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L30
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L33
.L30:
	mov	rsi, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	ecx, 1
	mov	edx, 0
	mov	rdi, rax
	call	glXCreateContext@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L31
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC16[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L33
.L31:
	mov	rax, QWORD PTR -168[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	alloc_colormap
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L32
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L33
.L32:
	mov	QWORD PTR -104[rbp], 0
	mov	rax, QWORD PTR -152[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -56[rbp], 163841
	mov	QWORD PTR -144[rbp], 10248
	mov	rax, QWORD PTR -168[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, DWORD PTR 20[rax]
	mov	eax, DWORD PTR Height[rip]
	mov	r9d, eax
	mov	eax, DWORD PTR Width[rip]
	mov	r8d, eax
	mov	rsi, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR -184[rbp]
	lea	rdi, -128[rbp]
	push	rdi
	push	QWORD PTR -144[rbp]
	push	rcx
	push	1
	push	rdx
	push	0
	mov	ecx, 0
	mov	edx, 0
	mov	rdi, rax
	call	XCreateWindow@PLT
	add	rsp, 48
	mov	QWORD PTR -136[rbp], rax
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XMapWindow@PLT
	mov	rdx, QWORD PTR -160[rbp]
	mov	rcx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	glXMakeCurrent@PLT
	lea	rdi, .LC18[rip]
	call	puts@PLT
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	event_loop
	mov	eax, 0
.L33:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.data
	.align 16
	.type	glAttribs.0, @object
	.size	glAttribs.0, 20
glAttribs.0:
	.long	5
	.long	4
	.long	12
	.long	1
	.long	0
	.section	.rodata
	.align 4
.LC0:
	.long	1071225242
	.align 4
.LC2:
	.long	1065353216
	.align 4
.LC3:
	.long	-1082130432
	.align 4
.LC4:
	.long	1073741824
	.align 8
.LC5:
	.long	1717986918
	.long	1074423398
	.align 8
.LC6:
	.long	1293080650
	.long	1075388923
	.align 8
.LC7:
	.long	0
	.long	1077149696
	.align 8
.LC8:
	.long	0
	.long	1074266112
	.align 8
.LC9:
	.long	0
	.long	1072693248
	.align 8
.LC10:
	.long	0
	.long	-1074790400
	.align 4
.LC11:
	.long	-1054867456
	.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	"218892096.c"
	.text
	.data
	.align	2
	.type	Width, %object
	.size	Width, 4
Width:
	.word	500
	.align	2
	.type	Height, %object
	.size	Height, 4
Height:
	.word	500
	.local	Xangle
	.comm	Xangle,4,4
	.local	Yangle
	.comm	Yangle,4,4
	.local	Redraw
	.comm	Redraw,4,4
	.align	2
	.type	Sides, %object
	.size	Sides, 4
Sides:
	.word	5
	.align	2
	.type	MinSides, %object
	.size	MinSides, 4
MinSides:
	.word	3
	.align	2
	.type	MaxSides, %object
	.size	MaxSides, 4
MaxSides:
	.word	20
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	display, %function
display:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L2
	str	r3, [fp, #-8]	@ float
	mov	r0, #16384
	bl	glClear
	bl	glPushMatrix
	ldr	r2, [fp, #-8]	@ float
	ldr	r1, [fp, #-8]	@ float
	ldr	r0, [fp, #-8]	@ float
	bl	glScalef
	ldr	r3, .L2+4
	ldr	r0, [r3]	@ float
	mov	r3, #0
	mov	r2, #0
	mov	r1, #1065353216
	bl	glRotatef
	ldr	r3, .L2+8
	ldr	r0, [r3]	@ float
	mov	r3, #0
	mov	r2, #1065353216
	mov	r1, #0
	bl	glRotatef
	mov	r2, #1065353216
	mov	r1, #1065353216
	mov	r0, #1065353216
	bl	glColor3f
	mov	r0, #2
	bl	glBegin
	ldr	r2, .L2+12
	ldr	r1, .L2+12
	ldr	r0, .L2+12
	bl	glVertex3f
	ldr	r2, .L2+12
	ldr	r1, .L2+12
	mov	r0, #1065353216
	bl	glVertex3f
	ldr	r2, .L2+12
	mov	r1, #1065353216
	mov	r0, #1065353216
	bl	glVertex3f
	ldr	r2, .L2+12
	mov	r1, #1065353216
	ldr	r0, .L2+12
	bl	glVertex3f
	bl	glEnd
	mov	r0, #2
	bl	glBegin
	mov	r2, #1065353216
	ldr	r1, .L2+12
	ldr	r0, .L2+12
	bl	glVertex3f
	mov	r2, #1065353216
	ldr	r1, .L2+12
	mov	r0, #1065353216
	bl	glVertex3f
	mov	r2, #1065353216
	mov	r1, #1065353216
	mov	r0, #1065353216
	bl	glVertex3f
	mov	r2, #1065353216
	mov	r1, #1065353216
	ldr	r0, .L2+12
	bl	glVertex3f
	bl	glEnd
	mov	r0, #1
	bl	glBegin
	ldr	r2, .L2+12
	ldr	r1, .L2+12
	ldr	r0, .L2+12
	bl	glVertex3f
	mov	r2, #1065353216
	ldr	r1, .L2+12
	ldr	r0, .L2+12
	bl	glVertex3f
	ldr	r2, .L2+12
	ldr	r1, .L2+12
	mov	r0, #1065353216
	bl	glVertex3f
	mov	r2, #1065353216
	ldr	r1, .L2+12
	mov	r0, #1065353216
	bl	glVertex3f
	ldr	r2, .L2+12
	mov	r1, #1065353216
	mov	r0, #1065353216
	bl	glVertex3f
	mov	r2, #1065353216
	mov	r1, #1065353216
	mov	r0, #1065353216
	bl	glVertex3f
	ldr	r2, .L2+12
	mov	r1, #1065353216
	ldr	r0, .L2+12
	bl	glVertex3f
	mov	r2, #1065353216
	mov	r1, #1065353216
	ldr	r0, .L2+12
	bl	glVertex3f
	bl	glEnd
	bl	glPopMatrix
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	glXSwapBuffers
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	1071225242
	.word	Xangle
	.word	Yangle
	.word	-1082130432
	.size	display, .-display
	.global	__aeabi_fadd
	.global	__aeabi_f2d
	.global	__aeabi_dadd
	.global	__aeabi_d2f
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	idle, %function
idle:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L5
	ldr	r3, [r3]	@ float
	mov	r1, #1073741824
	mov	r0, r3
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L5
	str	r2, [r3]	@ float
	ldr	r3, .L5+4
	ldr	r3, [r3]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	ldr	r2, .L5+8
	ldr	r3, .L5+12
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	ldr	r2, .L5+4
	str	r3, [r2]	@ float
	ldr	r3, .L5+16
	mov	r2, #1
	str	r2, [r3]
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	Xangle
	.word	Yangle
	.word	1717986918
	.word	1074423398
	.word	Redraw
	.size	idle, .-idle
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_i2f
	.global	__aeabi_dmul
	.global	__aeabi_d2iz
	.global	__aeabi_dsub
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_shape_mask, %function
make_shape_mask:
	@ args = 4, pretend = 0, frame = 552
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #568
	str	r0, [fp, #-560]
	str	r1, [fp, #-564]
	str	r2, [fp, #-568]
	str	r3, [fp, #-572]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r2, [fp, #-568]
	ldr	r3, [fp, #-572]
	mov	r1, #1
	str	r1, [sp]
	ldr	r1, [fp, #-564]
	ldr	r0, [fp, #-560]
	bl	XCreatePixmap
	str	r0, [fp, #-548]
	sub	r3, fp, #516
	mov	r2, #0
	ldr	r1, [fp, #-548]
	ldr	r0, [fp, #-560]
	bl	XCreateGC
	str	r0, [fp, #-544]
	mov	r2, #0
	ldr	r1, [fp, #-544]
	ldr	r0, [fp, #-560]
	bl	XSetForeground
	ldr	r3, [fp, #-568]
	ldr	r2, [fp, #-572]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, [fp, #-544]
	ldr	r1, [fp, #-548]
	ldr	r0, [fp, #-560]
	bl	XFillRectangle
	mov	r2, #1
	ldr	r1, [fp, #-544]
	ldr	r0, [fp, #-560]
	bl	XSetForeground
	ldr	r3, [fp, #-568]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-540]
	ldr	r3, [fp, #-572]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-536]
	mov	r3, #0
	str	r3, [fp, #-556]	@ float
	ldr	r0, [fp, #4]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L11+4
	ldr	r1, .L11+8
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-532]	@ float
	ldr	r3, [fp, #-568]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r0, r3
	bl	__aeabi_i2f
	mov	r3, r0
	str	r3, [fp, #-528]	@ float
	mov	r3, #0
	str	r3, [fp, #-552]
	b	.L8
.L9:
	ldr	r0, [fp, #-540]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-528]	@ float
	bl	__aeabi_f2d
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-556]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sin
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-524]
	ldr	r0, [fp, #-536]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-528]	@ float
	bl	__aeabi_f2d
	mov	r6, r0
	mov	r7, r1
	ldr	r0, [fp, #-556]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	cos
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-520]
	ldr	r3, [fp, #-524]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #20
	sub	r1, r3, #404
	ldr	r3, [fp, #-552]
	lsl	r3, r3, #2
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-520]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #20
	sub	r1, r3, #404
	ldr	r3, [fp, #-552]
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #2
	strh	r2, [r3]	@ movhi
	ldr	r1, [fp, #-532]	@ float
	ldr	r0, [fp, #-556]	@ float
	bl	__aeabi_fadd
	mov	r3, r0
	str	r3, [fp, #-556]	@ float
	ldr	r3, [fp, #-552]
	add	r3, r3, #1
	str	r3, [fp, #-552]
.L8:
	ldr	r2, [fp, #-552]
	ldr	r3, [fp, #4]
	cmp	r2, r3
	blt	.L9
	sub	r2, fp, #424
	mov	r3, #0
	str	r3, [sp, #8]
	mov	r3, #2
	str	r3, [sp, #4]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-544]
	ldr	r1, [fp, #-548]
	ldr	r0, [fp, #-560]
	bl	XFillPolygon
	mov	r3, #0
	str	r3, [sp, #8]
	ldr	r3, [fp, #-548]
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r1, [fp, #-564]
	ldr	r0, [fp, #-560]
	bl	XShapeCombineMask
	ldr	r1, [fp, #-544]
	ldr	r0, [fp, #-560]
	bl	XFreeGC
	ldr	r1, [fp, #-548]
	ldr	r0, [fp, #-560]
	bl	XFreePixmap
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	1293080650
	.word	1075388923
	.size	make_shape_mask, .-make_shape_mask
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reshape, %function
reshape:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	mov	r1, #0
	mov	r0, #0
	bl	glViewport
	ldr	r0, .L14
	bl	glMatrixMode
	bl	glLoadIdentity
	mov	r2, #0
	ldr	r3, .L14+4
	str	r2, [sp, #24]
	str	r3, [sp, #28]
	mov	r2, #0
	ldr	r3, .L14+8
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	mov	r2, #0
	ldr	r3, .L14+12
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	mov	r2, #0
	ldr	r3, .L14+16
	stm	sp, {r2-r3}
	mov	r2, #0
	ldr	r3, .L14+12
	mov	r0, #0
	ldr	r1, .L14+16
	bl	glFrustum
	mov	r0, #5888
	bl	glMatrixMode
	bl	glLoadIdentity
	ldr	r2, .L14+20
	mov	r1, #0
	mov	r0, #0
	bl	glTranslatef
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	5889
	.word	1077149696
	.word	1074266112
	.word	1072693248
	.word	-1074790400
	.word	-1054867456
	.size	reshape, .-reshape
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	event_loop, %function
event_loop:
	@ args = 0, pretend = 0, frame = 224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	str	r0, [fp, #-224]
	str	r1, [fp, #-228]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L28:
	ldr	r0, [fp, #-224]
	bl	XPending
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	sub	r3, fp, #204
	mov	r1, r3
	ldr	r0, [fp, #-224]
	bl	XNextEvent
	ldr	r3, [fp, #-204]
	cmp	r3, #22
	beq	.L18
	cmp	r3, #22
	bgt	.L28
	cmp	r3, #2
	beq	.L20
	cmp	r3, #12
	bne	.L28
	ldr	r3, [fp, #-188]
	mov	r1, r3
	ldr	r0, [fp, #-224]
	bl	display
	b	.L27
.L18:
	ldr	r3, [fp, #-172]
	ldr	r2, .L31+4
	str	r3, [r2]
	ldr	r3, [fp, #-168]
	ldr	r2, .L31+8
	str	r3, [r2]
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, .L31+8
	ldr	r1, [r3]
	ldr	r3, .L31+12
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, [fp, #-228]
	ldr	r0, [fp, #-224]
	bl	make_shape_mask
	ldr	r3, .L31+4
	ldr	r3, [r3]
	ldr	r2, .L31+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	reshape
	b	.L27
.L20:
	sub	r2, fp, #216
	sub	r1, fp, #108
	sub	r0, fp, #204
	sub	r3, fp, #212
	str	r3, [sp]
	mov	r3, r2
	mov	r2, #100
	bl	XLookupString
	ldr	r3, [fp, #-216]
	ldr	r2, .L31+16
	cmp	r3, r2
	beq	.L21
	ldr	r2, .L31+16
	cmp	r3, r2
	bhi	.L30
	ldr	r2, .L31+20
	cmp	r3, r2
	beq	.L23
	ldr	r2, .L31+24
	cmp	r3, r2
	beq	.L24
	b	.L30
.L23:
	mov	r0, #0
	bl	exit
.L24:
	ldr	r3, .L31+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L31+12
	str	r3, [r2]
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+28
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L25
	ldr	r3, .L31+28
	ldr	r3, [r3]
	ldr	r2, .L31+12
	str	r3, [r2]
.L25:
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, .L31+8
	ldr	r1, [r3]
	ldr	r3, .L31+12
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, [fp, #-228]
	ldr	r0, [fp, #-224]
	bl	make_shape_mask
	b	.L22
.L21:
	ldr	r3, .L31+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L31+12
	str	r3, [r2]
	ldr	r3, .L31+12
	ldr	r2, [r3]
	ldr	r3, .L31+32
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L26
	ldr	r3, .L31+32
	ldr	r3, [r3]
	ldr	r2, .L31+12
	str	r3, [r2]
.L26:
	ldr	r3, .L31+4
	ldr	r2, [r3]
	ldr	r3, .L31+8
	ldr	r1, [r3]
	ldr	r3, .L31+12
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, [fp, #-228]
	ldr	r0, [fp, #-224]
	bl	make_shape_mask
	nop
.L22:
	b	.L30
.L17:
	bl	idle
	ldr	r3, .L31+36
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L28
	ldr	r1, [fp, #-228]
	ldr	r0, [fp, #-224]
	bl	display
	ldr	r3, .L31+36
	mov	r2, #0
	str	r2, [r3]
	b	.L28
.L30:
	nop
.L27:
	b	.L28
.L32:
	.align	2
.L31:
	.word	.LC1
	.word	Width
	.word	Height
	.word	Sides
	.word	65364
	.word	65307
	.word	65362
	.word	MaxSides
	.word	MinSides
	.word	Redraw
	.size	event_loop, .-event_loop
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alloc_colormap, %function
alloc_colormap:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #140]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #132]
	mov	r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #4
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #132]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #60]
	cmp	r3, #1
	bne	.L34
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r3, [r3, #40]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L34
	ldr	r3, [fp, #-16]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r3, [r3, #48]
	b	.L35
.L34:
	mov	r3, #0
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	XCreateColormap
	mov	r3, r0
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	alloc_colormap, .-alloc_colormap
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Couldn't open default display\012\000"
	.align	2
.LC3:
	.ascii	"SHAPE\000"
	.align	2
.LC4:
	.ascii	"Display doesn't support shape extension\012\000"
	.align	2
.LC5:
	.ascii	"Couldn't get RGB, DB, Z visual\012\000"
	.align	2
.LC6:
	.ascii	"Couldn't create GL context\012\000"
	.align	2
.LC7:
	.ascii	"Couln't create colormap\012\000"
	.align	2
.LC8:
	.ascii	"Press ESC to exit.\000"
	.align	2
.LC9:
	.ascii	"Press up/down to change window shape.\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	XOpenDisplay
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L37
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L45+8
	bl	fwrite
	mov	r3, #1
	b	.L43
.L37:
	sub	r1, fp, #104
	sub	r2, fp, #104
	sub	r3, fp, #104
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L45+12
	ldr	r0, [fp, #-100]
	bl	XQueryExtension
	mov	r3, r0
	cmp	r3, #0
	bne	.L39
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L45+16
	bl	fwrite
	mov	r3, #1
	b	.L43
.L39:
	ldr	r3, [fp, #-100]
	ldr	r3, [r3, #132]
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-100]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-96]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	str	r3, [fp, #-92]
	ldr	r2, .L45+20
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-100]
	bl	glXChooseVisual
	str	r0, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bne	.L40
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L45+24
	bl	fwrite
	mov	r3, #1
	b	.L43
.L40:
	mov	r3, #1
	mov	r2, #0
	ldr	r1, [fp, #-88]
	ldr	r0, [fp, #-100]
	bl	glXCreateContext
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L41
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L45+28
	bl	fwrite
	mov	r3, #1
	b	.L43
.L41:
	ldr	r3, [fp, #-88]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-100]
	bl	alloc_colormap
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L42
	ldr	r3, .L45+4
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L45+32
	bl	fwrite
	mov	r3, #1
	b	.L43
.L42:
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-16]
	ldr	r3, .L45+36
	str	r3, [fp, #-28]
	ldr	r3, .L45+40
	str	r3, [fp, #-76]
	ldr	r3, .L45+44
	ldr	r3, [r3]
	mov	r0, r3
	ldr	r3, .L45+48
	ldr	r3, [r3]
	mov	ip, r3
	ldr	r3, [fp, #-88]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-88]
	ldr	r2, [r2]
	sub	r1, fp, #68
	str	r1, [sp, #28]
	ldr	r1, [fp, #-76]
	str	r1, [sp, #24]
	str	r2, [sp, #20]
	mov	r2, #1
	str	r2, [sp, #16]
	str	r3, [sp, #12]
	mov	r3, #0
	str	r3, [sp, #8]
	str	ip, [sp, #4]
	str	r0, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-100]
	bl	XCreateWindow
	str	r0, [fp, #-72]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-100]
	bl	XMapWindow
	ldr	r2, [fp, #-84]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-100]
	bl	glXMakeCurrent
	ldr	r0, .L45+52
	bl	puts
	ldr	r0, .L45+56
	bl	puts
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-100]
	bl	event_loop
	mov	r3, #0
.L43:
	ldr	r2, .L45
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L44
	bl	__stack_chk_fail
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC10
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	glAttribs.23423
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	163841
	.word	10248
	.word	Width
	.word	Height
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.data
	.align	2
	.type	glAttribs.23423, %object
	.size	glAttribs.23423, 20
glAttribs.23423:
	.word	5
	.word	4
	.word	12
	.word	1
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
