	.file	"win.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" ERROR AT CONTEXT CREATION: "
	.text
	.globl	ctxErrorHandler
	.type	ctxErrorHandler, @function
ctxErrorHandler:
.LFB24:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
1:	call	mcount
	movl	$.LC0, %edi
	call	puts
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	ctxErrorHandler, .-ctxErrorHandler
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	" FB CONFIG SELECTED: \n DOUBLEBUFFER: %d \n RED BITS: %d \n GREEN BITS: %d \n BLUE BITS: %d \n ALPHA BITS: %d \n BUFFER BITS: %d \n DEPTH BITS: %d \n STENCIL BITS: %d \n"
	.text
	.globl	desc_fbconfig
	.type	desc_fbconfig, @function
desc_fbconfig:
.LFB22:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset 3, -24
1:	call	mcount
	movq	%rdi, %rbx
	leaq	-20(%rbp), %rcx
	movl	$5, %edx
	movq	%rdi, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-24(%rbp), %rcx
	movl	$8, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-28(%rbp), %rcx
	movl	$9, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-32(%rbp), %rcx
	movl	$10, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-36(%rbp), %rcx
	movl	$11, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-40(%rbp), %rcx
	movl	$2, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-44(%rbp), %rcx
	movl	$12, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	leaq	-48(%rbp), %rcx
	movl	$13, %edx
	movq	%rbx, %rsi
	movq	display(%rip), %rdi
	call	glXGetFBConfigAttrib
	subq	$8, %rsp
	movl	-48(%rbp), %eax
	pushq	%rax
	movl	-44(%rbp), %eax
	pushq	%rax
	movl	-40(%rbp), %eax
	pushq	%rax
	movl	-36(%rbp), %r9d
	movl	-32(%rbp), %r8d
	movl	-28(%rbp), %ecx
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %esi
	movl	$.LC1, %edi
	movl	$0, %eax
	call	printf
	addq	$32, %rsp
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	desc_fbconfig, .-desc_fbconfig
	.section	.rodata.str1.1
.LC2:
	.string	" CANNOT CONNECT TO X SERVER: "
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	" NO MATCHING FB CONFIG FOUND: "
	.align 8
.LC4:
	.string	" COULD NOT FIND A SUITABLE GRAPHICS MODE: "
	.section	.rodata.str1.1
.LC5:
	.string	" CANNOT CREATE COLORMAP: "
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	" COULD NOT CREATE THE GLX WINDOW "
	.section	.rodata.str1.1
.LC7:
	.string	"[ LANDSCAPE - 1.4 ]"
	.text
	.globl	createWin
	.type	createWin, @function
createWin:
.LFB23:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
1:	call	mcount
	movl	%edi, %r13d
	movl	%esi, %r14d
	movl	%ecx, %r15d
	movl	$0, %edi
	call	XOpenDisplay
	movq	%rax, %rdi
	movq	%rax, display(%rip)
	testq	%rax, %rax
	je	.L14
	movl	224(%rax), %esi
	movl	%esi, screen(%rip)
	movslq	%esi, %rax
	salq	$7, %rax
	addq	232(%rdi), %rax
	movq	16(%rax), %rax
	movq	%rax, monitor(%rip)
	movl	$modeNum.1, %ecx
	movl	$att, %edx
	call	glXChooseFBConfig
	movq	%rax, fbconfigs(%rip)
	movq	$0, fbconfig(%rip)
	cmpl	$0, modeNum.1(%rip)
	jle	.L5
	movl	$0, %ebx
	movl	$-1, %r12d
	jmp	.L7
.L14:
	movl	$.LC2, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L6:
	addq	$1, %rbx
	cmpl	%ebx, modeNum.1(%rip)
	jle	.L15
.L7:
	movq	fbconfigs(%rip), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	display(%rip), %rdi
	call	glXGetVisualFromFBConfig
	movq	%rax, vi(%rip)
	testq	%rax, %rax
	je	.L6
	movq	fbconfigs(%rip), %rax
	movq	(%rax,%rbx,8), %rax
	movq	%rax, fbconfig(%rip)
	testq	%rax, %rax
	cmovne	%ebx, %r12d
	jmp	.L6
.L15:
	movq	fbconfig(%rip), %rdi
	testq	%rdi, %rdi
	je	.L5
	call	desc_fbconfig
	cmpl	$-1, %r12d
	je	.L16
	movl	monitor(%rip), %esi
	movq	display(%rip), %rdi
	call	XDefaultDepth
	movq	vi(%rip), %rax
	movq	(%rax), %rdx
	movl	$0, %ecx
	movq	monitor(%rip), %rsi
	movq	display(%rip), %rdi
	call	XCreateColormap
	movq	%rax, cmap(%rip)
	testq	%rax, %rax
	je	.L17
	movq	$0, -152(%rbp)
	movq	$0, -136(%rbp)
	movq	%rax, -64(%rbp)
	movq	$16941119, -88(%rbp)
	movl	$0, -72(%rbp)
	movq	$10762, windowAttributes(%rip)
	movq	$56, sizeh.0(%rip)
	movl	%r13d, sizeh.0+24(%rip)
	movl	%r14d, sizeh.0+28(%rip)
	testb	%r15b, %r15b
	jne	.L18
.L11:
	movq	vi(%rip), %rax
	leaq	-160(%rbp), %rdx
	pushq	%rdx
	pushq	windowAttributes(%rip)
	pushq	(%rax)
	pushq	$1
	movl	20(%rax), %eax
	pushq	%rax
	pushq	$2
	movl	%r14d, %r9d
	movl	%r13d, %r8d
	movl	%r14d, %ecx
	movl	%r13d, %edx
	movq	monitor(%rip), %rsi
	movq	display(%rip), %rdi
	call	XCreateWindow
	movq	%rax, %rdx
	movq	%rax, win(%rip)
	movl	$0, -164(%rbp)
	addq	$48, %rsp
	leaq	-164(%rbp), %rcx
	movq	fbconfig(%rip), %rsi
	movq	display(%rip), %rdi
	call	glXCreateWindow
	movq	%rax, glx(%rip)
	testq	%rax, %rax
	jne	.L12
	movl	$.LC6, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L5:
	movl	$.LC3, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L16:
	movl	$.LC4, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L17:
	movl	$.LC5, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L18:
	movq	$10760, windowAttributes(%rip)
	movl	screen(%rip), %esi
	movq	display(%rip), %rdi
	call	XDisplayWidth
	movl	%eax, %r13d
	movl	screen(%rip), %esi
	movq	display(%rip), %rdi
	call	XDisplayHeight
	movl	%eax, %r14d
	movl	%r13d, sizeh.0+32(%rip)
	movl	%eax, sizeh.0+36(%rip)
	movl	$0, -72(%rbp)
	subq	$8, %rsp
	pushq	$0
	pushq	$0
	pushq	$0
	movl	$0, %r9d
	movl	$0, %r8d
	movl	$0, %ecx
	movq	monitor(%rip), %rdx
	movl	$0, %esi
	movq	display(%rip), %rdi
	call	XWarpPointer
	addq	$32, %rsp
	movq	monitor(%rip), %rsi
	movq	display(%rip), %rdi
	call	XMapRaised
	movl	$0, %r9d
	movl	$1, %r8d
	movl	$1, %ecx
	movl	$1, %edx
	movq	monitor(%rip), %rsi
	movq	display(%rip), %rdi
	call	XGrabKeyboard
	movq	monitor(%rip), %rsi
	subq	$8, %rsp
	pushq	$0
	pushq	$0
	pushq	%rsi
	movl	$1, %r9d
	movl	$1, %r8d
	movl	$4, %ecx
	movl	$1, %edx
	movq	display(%rip), %rdi
	call	XGrabPointer
	addq	$32, %rsp
	jmp	.L11
.L12:
	pushq	$sizeh.0
	pushq	$0
	movl	$0, %r9d
	movl	$0, %r8d
	movl	$.LC7, %ecx
	movq	%rcx, %rdx
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XSetStandardProperties
	movl	$.LC7, %edx
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XStoreName
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XMapWindow
	addq	$16, %rsp
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	createWin, .-createWin
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	" OPENGL NOT SUPPORTED BY X SERVER: "
	.section	.rodata.str1.1
.LC9:
	.string	"glXCreateContextAttribsARB"
	.section	.rodata.str1.8
	.align 8
.LC10:
	.string	" CREATE CONTEXT COULD NOT BE RETRIEVED: "
	.align 8
.LC11:
	.string	"FAILED TO CREATE A GL CONTEXT: "
	.section	.rodata.str1.1
.LC12:
	.string	" SCREEN RESOLUTION: %dx%d \n"
	.text
	.globl	createRender
	.type	createRender, @function
createRender:
.LFB25:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset 12, -24
	.cfi_offset 3, -32
1:	call	mcount
	movl	$gwa, %edx
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XGetWindowAttributes
	leaq	-20(%rbp), %rdx
	movq	%rdx, %rsi
	movq	display(%rip), %rdi
	call	glXQueryExtension
	testl	%eax, %eax
	jne	.L20
	movl	$.LC8, %edi
	call	puts
	movl	$0, %edi
	call	exit
.L20:
	call	glewInit
	movq	$0, glc(%rip)
	movl	screen(%rip), %esi
	movq	display(%rip), %rdi
	call	glXQueryExtensionsString
	movq	%rax, %rdi
	call	glewIsSupported
	movl	$.LC9, %edi
	call	glXGetProcAddressARB
	movq	%rax, %rbx
	testq	%rax, %rax
	je	.L21
	movl	$8337, -48(%rbp)
	movl	$3, -44(%rbp)
	movl	$8338, -40(%rbp)
	movl	$0, -36(%rbp)
	movl	$8340, -32(%rbp)
	movl	$2, -28(%rbp)
	movl	$0, -24(%rbp)
	movl	$ctxErrorHandler, %edi
	call	XSetErrorHandler
	movq	%rax, %r12
	leaq	-48(%rbp), %r8
	movl	$1, %ecx
	movl	$0, %edx
	movq	fbconfig(%rip), %rsi
	movq	display(%rip), %rdi
	call	*%rbx
	movq	%rax, glc(%rip)
	movl	$0, %esi
	movq	display(%rip), %rdi
	call	XSync
	movq	%r12, %rdi
	call	XSetErrorHandler
.L22:
	movl	$1, %r8d
	movl	$0, %ecx
	movl	$32788, %edx
	movq	fbconfig(%rip), %rsi
	movq	display(%rip), %rdi
	call	glXCreateNewContext
	movq	%rax, %rcx
	movq	%rax, glc(%rip)
	testq	%rax, %rax
	je	.L24
	movq	glx(%rip), %rsi
	movq	%rsi, %rdx
	movq	display(%rip), %rdi
	call	glXMakeContextCurrent
	movl	gwa+12(%rip), %edx
	movl	gwa+8(%rip), %esi
	movl	$.LC12, %edi
	movl	$0, %eax
	call	printf
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L21:
	.cfi_restore_state
	movl	$.LC10, %edi
	call	puts
	jmp	.L22
.L24:
	movl	$.LC11, %edi
	call	puts
	movl	$0, %edi
	call	exit
	.cfi_endproc
.LFE25:
	.size	createRender, .-createRender
	.section	.rodata.str1.1
.LC16:
	.string	" %dx%d SCREEN "
	.text
	.globl	perspective
	.type	perspective, @function
perspective:
.LFB26:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
1:	call	mcount
	movl	$gwa, %edx
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XGetWindowAttributes
	movl	gwa+12(%rip), %ecx
	movl	gwa+8(%rip), %edx
	movl	$0, %esi
	movl	$0, %edi
	call	glViewport
	movl	gwa+12(%rip), %ecx
	movl	gwa+8(%rip), %edx
	movl	$0, %esi
	movl	$0, %edi
	call	glScissor
	movl	$5889, %edi
	call	glMatrixMode
	call	glLoadIdentity
	pxor	%xmm1, %xmm1
	cvtsi2ssl	gwa+8(%rip), %xmm1
	pxor	%xmm0, %xmm0
	cvtsi2ssl	gwa+12(%rip), %xmm0
	divss	%xmm0, %xmm1
	movsd	.LC13(%rip), %xmm3
	movsd	.LC14(%rip), %xmm2
	cvtss2sd	%xmm1, %xmm1
	movsd	.LC15(%rip), %xmm0
	call	gluPerspective
	movl	$5888, %edi
	call	glMatrixMode
	call	glLoadIdentity
	movq	glx(%rip), %rsi
	movq	display(%rip), %rdi
	call	glXSwapBuffers
	movl	gwa+12(%rip), %edx
	movl	gwa+8(%rip), %esi
	movl	$.LC16, %edi
	movl	$0, %eax
	call	printf
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	perspective, .-perspective
	.globl	eventloop
	.type	eventloop, @function
eventloop:
.LFB27:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$200, %rsp
	.cfi_offset 3, -24
1:	call	mcount
	movq	display(%rip), %rdi
	call	XFlush
	movq	display(%rip), %rdi
	call	XPending
	movl	%eax, %ebx
	testl	%eax, %eax
	je	.L26
.L28:
	subl	$1, %ebx
	leaq	-208(%rbp), %rsi
	movq	display(%rip), %rdi
	call	XNextEvent
	subq	$192, %rsp
	movdqa	-208(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movdqa	-192(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movdqa	-176(%rbp), %xmm2
	movups	%xmm2, 32(%rsp)
	movdqa	-160(%rbp), %xmm3
	movups	%xmm3, 48(%rsp)
	movdqa	-144(%rbp), %xmm4
	movups	%xmm4, 64(%rsp)
	movdqa	-128(%rbp), %xmm5
	movups	%xmm5, 80(%rsp)
	movdqa	-112(%rbp), %xmm6
	movups	%xmm6, 96(%rsp)
	movdqa	-96(%rbp), %xmm7
	movups	%xmm7, 112(%rsp)
	movdqa	-80(%rbp), %xmm0
	movups	%xmm0, 128(%rsp)
	movdqa	-64(%rbp), %xmm1
	movups	%xmm1, 144(%rsp)
	movdqa	-48(%rbp), %xmm2
	movups	%xmm2, 160(%rsp)
	movdqa	-32(%rbp), %xmm3
	movups	%xmm3, 176(%rsp)
	call	process_event2
	movdqa	-208(%rbp), %xmm4
	movups	%xmm4, (%rsp)
	movdqa	-192(%rbp), %xmm5
	movups	%xmm5, 16(%rsp)
	movdqa	-176(%rbp), %xmm6
	movups	%xmm6, 32(%rsp)
	movdqa	-160(%rbp), %xmm7
	movups	%xmm7, 48(%rsp)
	movdqa	-144(%rbp), %xmm0
	movups	%xmm0, 64(%rsp)
	movdqa	-128(%rbp), %xmm1
	movups	%xmm1, 80(%rsp)
	movdqa	-112(%rbp), %xmm2
	movups	%xmm2, 96(%rsp)
	movdqa	-96(%rbp), %xmm3
	movups	%xmm3, 112(%rsp)
	movdqa	-80(%rbp), %xmm4
	movups	%xmm4, 128(%rsp)
	movdqa	-64(%rbp), %xmm5
	movups	%xmm5, 144(%rsp)
	movdqa	-48(%rbp), %xmm6
	movups	%xmm6, 160(%rsp)
	movdqa	-32(%rbp), %xmm7
	movups	%xmm7, 176(%rsp)
	call	process_event1
	addq	$192, %rsp
	testl	%ebx, %ebx
	jne	.L28
.L26:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	eventloop, .-eventloop
	.globl	loadFont
	.type	loadFont, @function
loadFont:
.LFB28:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
1:	call	mcount
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	loadFont, .-loadFont
	.globl	closeWin
	.type	closeWin, @function
closeWin:
.LFB29:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
1:	call	mcount
	movl	$0, %edx
	movl	$0, %esi
	movq	display(%rip), %rdi
	call	glXMakeCurrent
	movq	glc(%rip), %rsi
	movq	display(%rip), %rdi
	call	glXDestroyContext
	movq	win(%rip), %rsi
	movq	display(%rip), %rdi
	call	XDestroyWindow
	movq	display(%rip), %rdi
	call	XCloseDisplay
	movl	$0, %edi
	call	exit
	.cfi_endproc
.LFE29:
	.size	closeWin, .-closeWin
	.local	sizeh.0
	.comm	sizeh.0,80,32
	.local	modeNum.1
	.comm	modeNum.1,4,4
	.globl	xev
	.bss
	.align 32
	.type	xev, @object
	.size	xev, 192
xev:
	.zero	192
	.globl	gwa
	.align 32
	.type	gwa, @object
	.size	gwa, 136
gwa:
	.zero	136
	.globl	fbconfig
	.align 8
	.type	fbconfig, @object
	.size	fbconfig, 8
fbconfig:
	.zero	8
	.globl	fbconfigs
	.align 8
	.type	fbconfigs, @object
	.size	fbconfigs, 8
fbconfigs:
	.zero	8
	.globl	glc
	.align 8
	.type	glc, @object
	.size	glc, 8
glc:
	.zero	8
	.globl	glx
	.align 8
	.type	glx, @object
	.size	glx, 8
glx:
	.zero	8
	.globl	win
	.align 8
	.type	win, @object
	.size	win, 8
win:
	.zero	8
	.globl	color
	.align 16
	.type	color, @object
	.size	color, 16
color:
	.zero	16
	.globl	cmap
	.align 8
	.type	cmap, @object
	.size	cmap, 8
cmap:
	.zero	8
	.globl	vi
	.align 8
	.type	vi, @object
	.size	vi, 8
vi:
	.zero	8
	.globl	flyinfo
	.align 8
	.type	flyinfo, @object
	.size	flyinfo, 8
flyinfo:
	.zero	8
	.globl	flyfont
	.align 8
	.type	flyfont, @object
	.size	flyfont, 8
flyfont:
	.zero	8
	.globl	mono
	.align 8
	.type	mono, @object
	.size	mono, 8
mono:
	.zero	8
	.globl	att
	.data
	.align 32
	.type	att, @object
	.size	att, 132
att:
	.long	32785
	.long	1
	.long	32784
	.long	1
	.long	5
	.long	1
	.long	1
	.long	4
	.long	8
	.long	4
	.long	9
	.long	4
	.long	10
	.long	4
	.long	11
	.long	4
	.long	7
	.long	0
	.long	14
	.long	0
	.long	15
	.long	0
	.long	16
	.long	0
	.long	17
	.long	0
	.long	2
	.long	16
	.long	12
	.long	16
	.long	13
	.long	8
	.long	0
	.globl	screen
	.bss
	.align 4
	.type	screen, @object
	.size	screen, 4
screen:
	.zero	4
	.local	monitor
	.comm	monitor,8,8
	.local	display
	.comm	display,8,8
	.globl	windowAttributes
	.align 8
	.type	windowAttributes, @object
	.size	windowAttributes, 8
windowAttributes:
	.zero	8
	.globl	FPSE
	.align 4
	.type	FPSE, @object
	.size	FPSE, 4
FPSE:
	.zero	4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC13:
	.long	0
	.long	1079574528
	.align 8
.LC14:
	.long	0
	.long	1072693248
	.align 8
.LC15:
	.long	0
	.long	1078591488
	.ident	"GCC: (GNU) 12.2.1 20220819 (Red Hat 12.2.1-2)"
	.section	.note.GNU-stack,"",@progbits
