global main
extern __security_check_cookie
extern __security_cookie
extern __chkstk
extern __GSHandlerCheck
extern puts
extern getchar
extern memset

[SECTION .text]

main:
		mov qword [rsp+10H],rdx
		mov dword [rsp+8H],ecx
		mov eax,8192*5
		call __chkstk
		sub rsp,rax
		mov rax,[__security_cookie]
		xor rax,rsp
		mov [rsp+8192*5-32],rax
		lea rcx,[C0]
		call puts
		call getchar
		xor eax,eax
		mov rcx,[rsp+8192*5-32]
		xor rcx,rsp
		call __security_check_cookie
		add rsp,8192*5
		ret

[section .data]

C0: db 'Hello, world!',0
