// File: /workspace/github_cpp_makefile_star2_O2/tomsmeding[P]MarioLANG/mariolang.cpp
// Function: Level::execcommandSingle(mario*)
bool execcommandSingle(mario *m){
		int num;
		char c;
		SHOW_DEBUG("ECS at %d,%d: '%c'",m->ipx,m->ipy,code[m->ipy][m->ipx]);
		if(animate){
			animationFrameStart(m->ipx,m->ipy,code[m->ipy][m->ipx]);
		}
		//if(animate)cout<<"\x1B[s\x1B["<<m->ipy+1<<";"<<m->ipx+1<<"H\x1B[41;1m"<<code[m->ipy][m->ipx]<<"\x1B[0m\x1B[u"<<flush;
		char codechar=code[m->ipy][m->ipx];
		if(m->skip){
			if(strchr("=|#\")(+-.:,;><^![@w",codechar)!=NULL)m->skip=false;
			codechar='\0';
		}
		switch(codechar){
		case '=': case '|': case '#': case '"':
			FATAL_FALSE("Mario somehow got stuck.");
		case ')':
			m->memp++;
			if(m->memp>memory.sizepos()-1){
				SHOW_MESSAGE("Resizing memory to the right...");
				memory.resizepos(memory.sizepos()*2);
			}
			break;
		case '(':
			m->memp--;
			if(m->memp<-memory.sizeneg()){
				SHOW_MESSAGE("Resizing memory to the left...");
				memory.resizeneg(memory.sizeneg()*2);
			}
			break;
		case '+':
			memory[m->memp]++;
			break;
		case '-':
			memory[m->memp]--;
			break;
		case '.':
			if(animate){
				c=memory[m->memp];
				if(c=='\r')outputx=0;
				else if(c=='\n'){outputx=0;outputy++;}
				else if(c=='\t'){outputx=TABWIDTH*(outputx/TABWIDTH+1);}
				else if(c>=0&&c<32){printf("^%c",'@'+c);outputx+=2;}
				else if(c==127){printf("^?");outputx+=2;}
				else {printf("%c",c);outputx++;}
			} else printf("%c",(char)memory[m->memp]);
			fflush(stdout);
			break;
		case ':':
			num=printf("%d ",memory[m->memp]);
			if(num<0)ERROR_FALSE("FATAL: IO error, printf returned a negative value!");
			fflush(stdout);
			outputx+=num;
			break;
		case ',':
			if(animate){
				moveto(0,inputy);
				printf("\x1B[34mInput char?\x1B[0m "); fflush(stdout);
				memory[m->memp]=getch();
			} else {
				memory[m->memp]=getchar();
			}
			if(animate){
				printf("\x1B[2K"); fflush(stdout);
				moveto(outputx,outputy);
			}
			SHOW_MESSAGE("Read input: char %c",(unsigned char)memory[m->memp]);
			break;
		case ';':
			if(animate){
				moveto(0,inputy);
				printf("\x1B[34mInput number?\x1B[0m "); fflush(stdout);
				c=getch();
				num=0;
				while(c!='\r'&&c!='\n'){
					if(c>='0'&&c<='9'){
						num=10*num+c-'0';
						printf("%c",c); fflush(stdout);
					} else if(c==127&&num!=0){ //backspace
						printf("\x1B[D \x1B[D"); fflush(stdout);
						num/=10;
					}
					c=getch();
				}
				memory[m->memp]=num;
				printf("\x1B[2K"); fflush(stdout);
				moveto(outputx,outputy);
			} else {
				scanf("%d",&memory[m->memp]);
			}
			SHOW_MESSAGE("Read input: number %d",(int)memory[m->memp]);
			break;
		case '>':
			m->dir=DIRRIGHT;
			m->walking=true;
			break;
		case '<':
			m->dir=DIRLEFT;
			m->walking=true;
			break;
		case '^':
			if(m->ipy!=0)m->ipy--;
			if(code[m->ipy][m->ipx]=='<'){
				m->dir=DIRLEFT;
				if(m->ipx==0)ERROR_FALSE("Mario walked out of the world.");
			} else if(code[m->ipy][m->ipx]=='>'){
				m->dir=DIRRIGHT;
				if(m->ipx>=(int)code[m->ipy].size())ERROR_FALSE("Mario walked out of the world.");
			} else ERROR_FALSE("Mario is exhausted of jumping infinitely.");
			m->walking=true;
			break;
		case '!':
			m->walking=false;m->dir=DIRNONE;
			break;
		case '[':
			if(memory[m->memp]==0)m->skip=true;
			break;
		case '@':
			if(m->dir==DIRRIGHT)m->dir=DIRLEFT;
			else if(m->dir==DIRLEFT)m->dir=DIRRIGHT;
			else ERROR_FALSE("The world glitched.");
			break;
		case 'w':
			animatedelay+=200000;
			break;
		default:
			break;
		}
		if(animate){
			animationFrameEnd(m,m->ipx,m->ipy,code[m->ipy][m->ipx]);
		}
		//if(animate)cout<<"\x1B[s\x1B["<<m->ipy+1+(code[m->ipy+1][m->ipx]=='^')<<";"<<m->ipx+1<<"H"<<code[m->ipy+(code[m->ipy+1][m->ipx]=='^')][m->ipx]<<"\x1B[u"<<flush;
		return true;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x3, 0x3d80(%rip)      # 0x718c
jge 0x351a
cmpb $0x1, 0x3d7b(%rip)      # 0x7194
jne 0x343d
movslq (%rbx), %rsi
movslq 0x4(%rbx), %rdx
movq 0x30(%r14), %rax
movq %rdx, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rax
movsbl (%rax,%rsi), %ecx
movq %r14, %rdi
callq 0x3d38
movslq 0x4(%rbx), %rcx
movq 0x30(%r14), %rdx
movq %rcx, %rsi
shlq $0x5, %rsi
movslq (%rbx), %rax
movq (%rdx,%rsi), %rsi
movsbl (%rsi,%rax), %esi
cmpb $0x1, 0x11(%rbx)
jne 0x34ad
leaq 0x105b(%rip), %rdi      # 0x44bf
pushq $0x14
popq %rdx
callq 0x2150
testq %rax, %rax
je 0x3475
movb $0x0, 0x11(%rbx)
movb $0x1, %bpl
cmpb $0x1, 0x3d15(%rip)      # 0x7194
jne 0x3509
movslq (%rbx), %rdx
movslq 0x4(%rbx), %rcx
movq 0x30(%r14), %rax
movq %rcx, %rsi
shlq $0x5, %rsi
movq (%rax,%rsi), %rax
movsbl (%rax,%rdx), %r8d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3d7e
jmp 0x3509
movzbl %sil, %esi
leal -0x21(%rsi), %edi
cmpl $0x1f, %edi
ja 0x34d6
leaq 0xb44(%rip), %rax       # 0x4004
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x0, 0x10(%rbx)
movl $0x3, 0xc(%rbx)
jmp 0x3475
cmpl $0x5b, %esi
je 0x3838
cmpl $0x5e, %esi
je 0x387b
cmpl $0x77, %esi
je 0x386c
cmpl $0x7c, %esi
jne 0x3475
cmpl $0x0, 0x3c8b(%rip)      # 0x718c
jns 0x3b5a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3aaf(%rip), %r13      # 0x6fd0
movq (%r13), %rcx
leaq 0xf7a(%rip), %rdi       # 0x44a6
pushq $0x5
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movq (%r13), %rdi
movslq (%rbx), %rdx
movslq 0x4(%rbx), %rcx
movq 0x30(%r14), %rax
movq %rcx, %rsi
shlq $0x5, %rsi
movq (%rax,%rsi), %rax
movsbl (%rax,%rdx), %r8d
leaq 0xf47(%rip), %rsi       # 0x44ac
xorl %eax, %eax
callq 0x2220
movq (%r13), %rcx
leaq 0xe8f(%rip), %rdi       # 0x4406
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
jmp 0x3412
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %esi
leaq 0xf80(%rip), %rdi       # 0x4532
xorl %eax, %eax
callq 0x2030
testl %eax, %eax
js 0x3acf
movl %eax, %ebp
movq 0x39ee(%rip), %rax      # 0x6fb8
movq (%rax), %rdi
callq 0x2190
addl %ebp, 0x48(%r14)
jmp 0x3475
movl $0x2, 0xc(%rbx)
jmp 0x35e8
andl $0x0, 0xc(%rbx)
movb $0x1, 0x10(%rbx)
jmp 0x3475
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
incl (%rdx)
jmp 0x3475
movl 0x8(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
movq 0x8(%r14), %rsi
subq (%r14), %rsi
movq %rsi, %rcx
shrq $0x2, %rcx
decl %ecx
cmpl %ecx, %eax
jl 0x3475
cmpl $0x2, 0x3b4a(%rip)      # 0x718c
jge 0x3c7c
shrq %rsi
andl $-0x2, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2d06
jmp 0x3475
movl 0x8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
movq 0x20(%r14), %rsi
subq 0x18(%r14), %rsi
movq %rsi, %rcx
shrq $0x2, %rcx
negl %ecx
cmpl %ecx, %eax
jg 0x3475
cmpl $0x2, 0x3b06(%rip)      # 0x718c
jge 0x3cd9
shrq %rsi
andl $-0x2, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2d1c
jmp 0x3475
cmpb $0x1, 0x3aec(%rip)      # 0x7194
jne 0x38f4
movl 0x50(%r14), %esi
xorl %edi, %edi
callq 0x24b3
leaq 0xea9(%rip), %rdi       # 0x4569
xorl %eax, %eax
callq 0x2030
movq 0x38ea(%rip), %rax      # 0x6fb8
movq (%rax), %rdi
callq 0x2190
callq 0x23ec
movsbl %al, %eax
jmp 0x38f9
movl 0xc(%rbx), %eax
cmpl $0x2, %eax
je 0x3b10
testl %eax, %eax
jne 0x3b19
movl $0x2, 0xc(%rbx)
jmp 0x3475
cmpb $0x1, 0x3a8a(%rip)      # 0x7194
jne 0x39b7
movl 0x50(%r14), %esi
xorl %edi, %edi
callq 0x24b3
leaq 0xe76(%rip), %rdi       # 0x4598
xorl %eax, %eax
callq 0x2030
movq 0x3888(%rip), %r12      # 0x6fb8
movq (%r12), %rdi
callq 0x2190
leaq 0xe70(%rip), %r15       # 0x45b0
pushq $0xa
popq %r13
xorl %ebp, %ebp
callq 0x23ec
cmpb $0xa, %al
je 0x39e9
movzbl %al, %edi
cmpl $0xd, %edi
je 0x39e9
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
jbe 0x3794
testl %ebp, %ebp
setne %cl
cmpb $0x7f, %al
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x3746
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2190
movl %ebp, %eax
cltd
idivl %r13d
movl %eax, %ebp
jmp 0x3746
imull $0xa, %ebp, %eax
leal (%rax,%rdi), %ebp
addl $-0x30, %ebp
callq 0x21f0
movq (%r12), %rdi
callq 0x2190
jmp 0x3746
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
decl (%rdx)
jmp 0x3475
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %eax
movsbl %al, %esi
cmpb $0x1, 0x3990(%rip)      # 0x7194
jne 0x3ab4
shll $0x18, %eax
cmpl $0x9000000, %eax        # imm = 0x9000000
je 0x3c1b
cmpl $0xa000000, %eax        # imm = 0xA000000
je 0x3c0d
cmpl $0xd000000, %eax        # imm = 0xD000000
jne 0x3c35
andl $0x0, 0x48(%r14)
jmp 0x3abb
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
cmpl $0x0, (%rdx)
jne 0x3475
movb $0x1, 0x11(%rbx)
jmp 0x3475
addl $0x30d40, 0x391a(%rip)  # imm = 0x30D40
jmp 0x3475
testl %ecx, %ecx
je 0x38b3
decq %rcx
movl %ecx, 0x4(%rbx)
shlq $0x5, %rcx
movq (%rdx,%rcx), %rsi
movzbl (%rsi,%rax), %esi
cmpl $0x3e, %esi
je 0x3ba0
cmpl $0x3c, %esi
jne 0x38b3
movl $0x2, 0xc(%rbx)
testl %eax, %eax
jne 0x35e8
jmp 0x3bae
cmpl $0x0, 0x38d2(%rip)      # 0x718c
jle 0x3507
movq 0x3709(%rip), %r15      # 0x6fd0
movq (%r15), %rcx
leaq 0xb3b(%rip), %rdi       # 0x440c
pushq $0x5
popq %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22b0
movq (%r15), %rcx
leaq 0xce1(%rip), %rdi       # 0x45ce
pushq $0x29
jmp 0x3bea
callq 0x21e0
movslq 0x8(%rbx), %rcx
movl %ecx, %edx
notl %edx
shlq $0x2, %rdx
addq 0x18(%r14), %rdx
leaq (,%rcx,4), %rsi
addq (%r14), %rsi
testq %rcx, %rcx
cmovsq %rdx, %rsi
movl %eax, (%rsi)
cmpb $0x1, 0x3870(%rip)      # 0x7194
jne 0x3950
leaq 0xc52(%rip), %rdi       # 0x457f
xorl %eax, %eax
callq 0x2030
movq 0x367d(%rip), %rax      # 0x6fb8
movq (%rax), %rdi
callq 0x2190
movl 0x48(%r14), %edi
movl 0x4c(%r14), %esi
callq 0x24b3
cmpl $0x2, 0x3835(%rip)      # 0x718c
jl 0x3475
movq 0x366c(%rip), %r13      # 0x6fd0
movq (%r13), %rcx
leaq 0xa4d(%rip), %rdi       # 0x43bc
pushq $0x5
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
movq (%r13), %rdi
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
movzbl (%rdx), %edx
leaq 0xbd2(%rip), %rsi       # 0x4584
jmp 0x3a92
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rsi
addq (%r14), %rsi
testq %rax, %rax
cmovsq %rcx, %rsi
leaq 0xbeb(%rip), %rdi       # 0x45cb
xorl %eax, %eax
callq 0x2180
jmp 0x3a31
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
movl %ebp, (%rdx)
leaq 0xb6b(%rip), %rdi       # 0x457f
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2190
movl 0x48(%r14), %edi
movl 0x4c(%r14), %esi
callq 0x24b3
cmpl $0x2, 0x3754(%rip)      # 0x718c
jl 0x3475
movq 0x358b(%rip), %r13      # 0x6fd0
movq (%r13), %rcx
leaq 0x96c(%rip), %rdi       # 0x43bc
pushq $0x5
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movslq 0x8(%rbx), %rax
movl %eax, %ecx
notl %ecx
shlq $0x2, %rcx
addq 0x18(%r14), %rcx
movq (%r13), %rdi
leaq (,%rax,4), %rdx
addq (%r14), %rdx
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %edx
leaq 0xb26(%rip), %rsi       # 0x45b8
xorl %eax, %eax
callq 0x2220
movq (%r13), %rcx
leaq 0x962(%rip), %rdi       # 0x4406
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
jmp 0x3475
movl %esi, %edi
callq 0x21f0
movq 0x34f6(%rip), %rax      # 0x6fb8
movq (%rax), %rdi
callq 0x2190
jmp 0x3475
cmpl $0x0, 0x36b6(%rip)      # 0x718c
jle 0x3507
movq 0x34ed(%rip), %r15      # 0x6fd0
movq (%r15), %rcx
leaq 0x91f(%rip), %rdi       # 0x440c
pushq $0x5
popq %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22b0
movq (%r15), %rcx
leaq 0xa2d(%rip), %rdi       # 0x4536
pushq $0x32
jmp 0x3bea
andl $0x0, 0xc(%rbx)
jmp 0x3475
cmpl $0x0, 0x366c(%rip)      # 0x718c
jle 0x3507
movq 0x34a3(%rip), %r15      # 0x6fd0
movq (%r15), %rcx
leaq 0x8d5(%rip), %rdi       # 0x440c
pushq $0x5
popq %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22b0
movq (%r15), %rcx
leaq 0xaa5(%rip), %rdi       # 0x45f8
pushq $0x13
jmp 0x3bea
movq 0x346f(%rip), %r14      # 0x6fd0
movq (%r14), %rcx
leaq 0x8c4(%rip), %rdi       # 0x442f
pushq $0x7
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x22b0
movq (%r14), %rcx
leaq 0x950(%rip), %rdi       # 0x44d3
pushq $0x18
popq %rsi
movq %rbx, %rdx
callq 0x22b0
movq (%r14), %rcx
leaq 0x86e(%rip), %rdi       # 0x4406
pushq $0x5
popq %rsi
movq %rbx, %rdx
jmp 0x3c03
andl $0x0, 0xc(%rbx)
cmpl 0x8(%rdx,%rcx), %eax
jl 0x35e8
cmpl $0x0, 0x35d7(%rip)      # 0x718c
jle 0x3507
movq 0x340e(%rip), %r15      # 0x6fd0
movq (%r15), %rcx
leaq 0x840(%rip), %rdi       # 0x440c
pushq $0x5
popq %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22b0
movq (%r15), %rcx
leaq 0x868(%rip), %rdi       # 0x4450
pushq $0x1e
popq %rsi
movq %r14, %rdx
callq 0x22b0
movq (%r15), %rcx
leaq 0x809(%rip), %rdi       # 0x4406
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22b0
jmp 0x3507
andl $0x0, 0x48(%r14)
incl 0x4c(%r14)
jmp 0x3abb
movl 0x48(%r14), %eax
pushq $0x8
popq %rcx
cltd
idivl %ecx
leal 0x8(,%rax,8), %eax
movl %eax, 0x48(%r14)
jmp 0x3abb
cmpl $0x1f, %esi
ja 0x3c4d
orl $0x40, %esi
leaq 0x8e7(%rip), %rdi       # 0x452b
xorl %eax, %eax
callq 0x2030
jmp 0x3c62
cmpl $0x7f000000, %eax       # imm = 0x7F000000
jne 0x3c6c
leaq 0x8d4(%rip), %rdi       # 0x452f
xorl %eax, %eax
callq 0x2030
addl $0x2, 0x48(%r14)
jmp 0x3abb
movl %esi, %edi
callq 0x21f0
incl 0x48(%r14)
jmp 0x3abb
movq 0x334d(%rip), %r13      # 0x6fd0
movq (%r13), %rcx
leaq 0x72e(%rip), %rdi       # 0x43bc
pushq $0x5
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movq (%r13), %rcx
leaq 0x840(%rip), %rdi       # 0x44ec
pushq $0x1f
popq %rsi
movq %r12, %rdx
callq 0x22b0
movq (%r13), %rcx
leaq 0x744(%rip), %rdi       # 0x4406
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movq 0x8(%r14), %rsi
subq (%r14), %rsi
jmp 0x3648
movq 0x32f0(%rip), %r13      # 0x6fd0
movq (%r13), %rcx
leaq 0x6d1(%rip), %rdi       # 0x43bc
pushq $0x5
popq %r15
pushq $0x1
popq %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movq (%r13), %rcx
leaq 0x803(%rip), %rdi       # 0x450c
pushq $0x1e
popq %rsi
movq %r12, %rdx
callq 0x22b0
movq (%r13), %rcx
leaq 0x6e7(%rip), %rdi       # 0x4406
movq %r15, %rsi
movq %r12, %rdx
callq 0x22b0
movq 0x20(%r14), %rsi
subq 0x18(%r14), %rsi
jmp 0x368c
nop