	.file	"17553.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Hello, World!"
.LC1:
	.string	"Cannot open display"
.LC2:
	.string	"KEY PRESSED"
	.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, 256
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -232[rbp], rax
	mov	edi, 0
	call	XOpenDisplay@PLT
	mov	QWORD PTR -224[rbp], rax
	cmp	QWORD PTR -224[rbp], 0
	jne	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 224[rax]
	mov	DWORD PTR -236[rbp], eax
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -236[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rcx, QWORD PTR 88[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -236[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rdx, QWORD PTR 96[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -236[rbp]
	cdqe
	sal	rax, 7
	add	rax, rsi
	mov	rsi, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -224[rbp]
	sub	rsp, 8
	push	rcx
	push	rdx
	push	1
	mov	r9d, 100
	mov	r8d, 100
	mov	ecx, 10
	mov	edx, 10
	mov	rdi, rax
	call	XCreateSimpleWindow@PLT
	add	rsp, 32
	mov	QWORD PTR -216[rbp], rax
	mov	rcx, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, 32769
	mov	rsi, rcx
	mov	rdi, rax
	call	XSelectInput@PLT
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 224[rax]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -224[rbp]
	push	0
	push	0
	push	1
	push	1
	mov	r9d, 12
	mov	r8d, 1
	mov	rcx, rdx
	mov	edx, 32768
	mov	esi, 0
	mov	rdi, rax
	call	XGrabButton@PLT
	add	rsp, 32
	mov	rdx, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XMapWindow@PLT
	mov	DWORD PTR -240[rbp], 0
.L6:
	lea	rdx, -208[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	XNextEvent@PLT
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 12
	jne	.L3
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -236[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rdx, QWORD PTR 72[rax]
	mov	rsi, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -224[rbp]
	sub	rsp, 8
	push	10
	mov	r9d, 10
	mov	r8d, 20
	mov	ecx, 20
	mov	rdi, rax
	call	XFillRectangle@PLT
	add	rsp, 16
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	edi, eax
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR 232[rax]
	mov	eax, DWORD PTR -236[rbp]
	cdqe
	sal	rax, 7
	add	rax, rdx
	mov	rdx, QWORD PTR 72[rax]
	mov	rcx, QWORD PTR -232[rbp]
	mov	rsi, QWORD PTR -216[rbp]
	mov	rax, QWORD PTR -224[rbp]
	sub	rsp, 8
	push	rdi
	mov	r9, rcx
	mov	r8d, 50
	mov	ecx, 50
	mov	rdi, rax
	call	XDrawString@PLT
	add	rsp, 16
.L3:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, 2
	jne	.L6
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -240[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -240[rbp], edx
	cmp	eax, 10
	jg	.L10
	jmp	.L6
.L10:
	nop
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	XCloseDisplay@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"17553.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Hello, World!\000"
	.align	2
.LC1:
	.ascii	"Cannot open display\000"
	.align	2
.LC2:
	.ascii	"KEY PRESSED\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L11+4
	str	r3, [fp, #-128]
	mov	r0, #0
	bl	XOpenDisplay
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L11+8
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3, #132]
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-124]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-120]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	ip, [r3, #8]
	ldr	r3, [fp, #-124]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-120]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r1, [r3, #56]
	ldr	r3, [fp, #-124]
	ldr	r0, [r3, #140]
	ldr	r2, [fp, #-120]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r0, r3
	ldr	r3, [r3, #52]
	str	r3, [sp, #16]
	str	r1, [sp, #12]
	mov	r3, #1
	str	r3, [sp, #8]
	mov	r3, #100
	str	r3, [sp, #4]
	mov	r3, #100
	str	r3, [sp]
	mov	r3, #10
	mov	r2, #10
	mov	r1, ip
	ldr	r0, [fp, #-124]
	bl	XCreateSimpleWindow
	str	r0, [fp, #-116]
	ldr	r2, .L11+12
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-124]
	bl	XSelectInput
	ldr	r3, [fp, #-124]
	ldr	r2, [r3, #140]
	ldr	r3, [fp, #-124]
	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
	ldr	r3, [r3, #8]
	mov	r2, #0
	str	r2, [sp, #20]
	mov	r2, #0
	str	r2, [sp, #16]
	mov	r2, #1
	str	r2, [sp, #12]
	mov	r2, #1
	str	r2, [sp, #8]
	mov	r2, #12
	str	r2, [sp, #4]
	mov	r2, #1
	str	r2, [sp]
	mov	r2, #32768
	mov	r1, #0
	ldr	r0, [fp, #-124]
	bl	XGrabButton
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-124]
	bl	XMapWindow
	mov	r3, #0
	str	r3, [fp, #-132]
.L6:
	sub	r3, fp, #112
	mov	r1, r3
	ldr	r0, [fp, #-124]
	bl	XNextEvent
	ldr	r3, [fp, #-112]
	cmp	r3, #12
	bne	.L3
	ldr	r3, [fp, #-124]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-120]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r2, [r3, #44]
	mov	r3, #10
	str	r3, [sp, #8]
	mov	r3, #10
	str	r3, [sp, #4]
	mov	r3, #20
	str	r3, [sp]
	mov	r3, #20
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-124]
	bl	XFillRectangle
	ldr	r3, [fp, #-124]
	ldr	r1, [r3, #140]
	ldr	r2, [fp, #-120]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r4, [r3, #44]
	ldr	r0, [fp, #-128]
	bl	strlen
	mov	r3, r0
	str	r3, [sp, #8]
	ldr	r3, [fp, #-128]
	str	r3, [sp, #4]
	mov	r3, #50
	str	r3, [sp]
	mov	r3, #50
	mov	r2, r4
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-124]
	bl	XDrawString
.L3:
	ldr	r3, [fp, #-112]
	cmp	r3, #2
	bne	.L6
	ldr	r0, .L11+16
	bl	puts
	ldr	r3, [fp, #-132]
	add	r2, r3, #1
	str	r2, [fp, #-132]
	cmp	r3, #10
	bgt	.L10
	b	.L6
.L10:
	nop
	ldr	r0, [fp, #-124]
	bl	XCloseDisplay
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	32769
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
