// File: /workspace/github_cpp_makefile_star2_O3/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, 0x439a(%rip)      # 0x8164
jge 0x3efc
cmpb $0x1, 0x4395(%rip)      # 0x816c
jne 0x3dfb
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 0x4512
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 0x3e70
leaq 0x16d5(%rip), %rdi      # 0x54f7
movl $0x14, %edx
callq 0x2120
testq %rax, %rax
je 0x3e35
movb $0x0, 0x11(%rbx)
movb $0x1, %bpl
cmpb $0x1, 0x432d(%rip)      # 0x816c
jne 0x3f2d
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 0x4584
jmp 0x3f2d
movzbl %sil, %esi
cmpl $0x5a, %esi
jg 0x3e9e
addl $-0x21, %esi
cmpl $0x1f, %esi
ja 0x3e35
leaq 0x11b8(%rip), %rax      # 0x5040
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x0, 0x10(%rbx)
movl $0x3, 0xc(%rbx)
jmp 0x3e35
cmpl $0x76, %esi
jg 0x3f0c
cmpl $0x5b, %esi
je 0x424c
cmpl $0x5e, %esi
jne 0x3e35
testl %ecx, %ecx
je 0x428f
decq %rcx
movl %ecx, 0x4(%rbx)
shlq $0x5, %rcx
movq (%rdx,%rcx), %rsi
movzbl (%rsi,%rax), %esi
cmpl $0x3e, %esi
je 0x4441
cmpl $0x3c, %esi
jne 0x428f
movl $0x2, 0xc(%rbx)
testl %eax, %eax
jne 0x4243
cmpl $0x0, 0x4271(%rip)      # 0x8164
jle 0x3f2b
callq 0x26e1
jmp 0x3f2b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25b2
jmp 0x3dd0
cmpl $0x77, %esi
je 0x4280
cmpl $0x7c, %esi
jne 0x3e35
cmpl $0x0, 0x423f(%rip)      # 0x8164
jns 0x4437
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
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 0x1601(%rip), %rdi      # 0x556a
xorl %eax, %eax
callq 0x2030
testl %eax, %eax
js 0x43fd
movl %eax, %ebp
movq 0x4037(%rip), %rax      # 0x7fb8
movq (%rax), %rdi
callq 0x2160
addl %ebp, 0x48(%r14)
jmp 0x3e35
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, 0x41ac(%rip)      # 0x816c
jne 0x42a6
shll $0x18, %eax
cmpl $0x9000000, %eax        # imm = 0x9000000
je 0x447a
cmpl $0xa000000, %eax        # imm = 0xA000000
je 0x4469
cmpl $0xd000000, %eax        # imm = 0xD000000
jne 0x4495
movl $0x0, 0x48(%r14)
jmp 0x42ad
movl $0x0, 0xc(%rbx)
jmp 0x4243
cmpb $0x1, 0x4162(%rip)      # 0x816c
jne 0x42c1
movl 0x50(%r14), %esi
incl %esi
leaq 0x10e9(%rip), %rdi      # 0x5106
movl $0x1, %edx
xorl %eax, %eax
callq 0x2030
movq 0x3f88(%rip), %r12      # 0x7fb8
movq (%r12), %rdi
callq 0x2160
leaq 0x1590(%rip), %rdi      # 0x55d0
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2160
leaq 0x1591(%rip), %r15      # 0x55e8
xorl %r13d, %r13d
callq 0x2b5c
cmpb $0xa, %al
je 0x42f3
movzbl %al, %edi
cmpl $0xd, %edi
je 0x42f3
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
jbe 0x40b9
testl %r13d, %r13d
setne %cl
cmpb $0x7f, %al
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x405a
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2160
movslq %r13d, %rax
imulq $0x66666667, %rax, %r13 # imm = 0x66666667
movq %r13, %rax
shrq $0x3f, %rax
sarq $0x22, %r13
addl %eax, %r13d
jmp 0x405a
leal (%r13,%r13,4), %eax
leal (%rdi,%rax,2), %r13d
addl $-0x30, %r13d
callq 0x21b0
movq (%r12), %rdi
callq 0x2160
jmp 0x405a
movl 0x8(%rbx), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
movq 0x8(%r14), %rax
subq (%r14), %rax
movq %rax, %rdx
shrq $0x2, %rdx
decl %edx
cmpl %edx, %ecx
jl 0x3e35
cmpl $0x2, 0x4066(%rip)      # 0x8164
jge 0x44dc
movq %rsp, %rdx
movl $0x0, (%rdx)
shrq %rax
movslq %eax, %rsi
andq $-0x2, %rsi
movq %r14, %rdi
jmp 0x4232
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 0x3e35
movl 0xc(%rbx), %eax
cmpl $0x2, %eax
je 0x4414
testl %eax, %eax
jne 0x4420
movl $0x2, 0xc(%rbx)
jmp 0x3e35
cmpb $0x1, 0x3ffd(%rip)      # 0x816c
jne 0x436f
movl 0x50(%r14), %esi
incl %esi
leaq 0xf84(%rip), %rdi       # 0x5106
movl $0x1, %edx
xorl %eax, %eax
callq 0x2030
movq 0x3e23(%rip), %r15      # 0x7fb8
movq (%r15), %rdi
callq 0x2160
leaq 0x13fd(%rip), %rdi      # 0x55a1
xorl %eax, %eax
callq 0x2030
movq (%r15), %rdi
callq 0x2160
callq 0x2b5c
movsbl %al, %eax
jmp 0x4374
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 0x3e35
movl 0x8(%rbx), %ecx
leal -0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
movq %rax, %rdx
shrq $0x2, %rdx
negl %edx
cmpl %edx, %ecx
jg 0x3e35
leaq 0x18(%r14), %r15
cmpl $0x2, 0x3f4e(%rip)      # 0x8164
jge 0x44f6
movq %rsp, %rdx
movl $0x0, (%rdx)
shrq %rax
movslq %eax, %rsi
andq $-0x2, %rsi
movq %r15, %rdi
callq 0x379a
jmp 0x3e35
movl $0x2, 0xc(%rbx)
movb $0x1, 0x10(%rbx)
jmp 0x3e35
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 0x3e35
movb $0x1, 0x11(%rbx)
jmp 0x3e35
addl $0x30d40, 0x3ede(%rip)  # imm = 0x30D40
jmp 0x3e35
cmpl $0x0, 0x3ece(%rip)      # 0x8164
jle 0x3f2b
callq 0x2738
jmp 0x3f2b
movl %esi, %edi
callq 0x21b0
movq 0x3d04(%rip), %rax      # 0x7fb8
movq (%rax), %rdi
callq 0x2160
jmp 0x3e35
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 0x1319(%rip), %rdi      # 0x5603
xorl %eax, %eax
callq 0x2150
jmp 0x4352
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 %r13d, (%rdx)
leaq 0x1298(%rip), %rdi      # 0x55b7
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2160
movl 0x48(%r14), %edx
movl 0x4c(%r14), %esi
incl %esi
incl %edx
leaq 0xdc4(%rip), %rdi       # 0x5106
xorl %eax, %eax
callq 0x2030
movq (%r12), %rdi
callq 0x2160
cmpl $0x2, 0x3e0b(%rip)      # 0x8164
jl 0x3e35
movq %rbx, %rdi
movq %r14, %rsi
callq 0x278f
jmp 0x3e35
callq 0x21a0
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, 0x3dcd(%rip)      # 0x816c
jne 0x43e0
leaq 0x120f(%rip), %rdi      # 0x55b7
xorl %eax, %eax
callq 0x2030
movq 0x3c02(%rip), %r15      # 0x7fb8
movq (%r15), %rdi
callq 0x2160
movl 0x48(%r14), %edx
movl 0x4c(%r14), %esi
incl %esi
incl %edx
leaq 0xd35(%rip), %rdi       # 0x5106
xorl %eax, %eax
callq 0x2030
movq (%r15), %rdi
callq 0x2160
cmpl $0x2, 0x3d7d(%rip)      # 0x8164
jl 0x3e35
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2818
jmp 0x3e35
cmpl $0x0, 0x3d60(%rip)      # 0x8164
jle 0x3f2b
callq 0x28a2
jmp 0x3f2b
movl $0x0, 0xc(%rbx)
jmp 0x3e35
cmpl $0x0, 0x3d3d(%rip)      # 0x8164
jle 0x3f2b
callq 0x2633
jmp 0x3f2b
callq 0x29f3
jmp 0x3f2b
movl $0x0, 0xc(%rbx)
cmpl 0x8(%rdx,%rcx), %eax
jl 0x4243
cmpl $0x0, 0x3d0b(%rip)      # 0x8164
jle 0x3f2b
callq 0x268a
jmp 0x3f2b
movl $0x0, 0x48(%r14)
incl 0x4c(%r14)
jmp 0x42ad
movl 0x48(%r14), %eax
leal 0x7(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x8, %ecx
addl $0x8, %ecx
movl %ecx, 0x48(%r14)
jmp 0x42ad
cmpl $0x1f, %esi
ja 0x44ad
orl $0x40, %esi
leaq 0x10bf(%rip), %rdi      # 0x5563
xorl %eax, %eax
callq 0x2030
jmp 0x44c2
cmpl $0x7f000000, %eax       # imm = 0x7F000000
jne 0x44cc
leaq 0x10ac(%rip), %rdi      # 0x5567
xorl %eax, %eax
callq 0x2030
addl $0x2, 0x48(%r14)
jmp 0x42ad
movl %esi, %edi
callq 0x21b0
incl 0x48(%r14)
jmp 0x42ad
leaq 0x8(%r14), %rdi
movq %rsp, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x2976
movq (%r15), %rax
jmp 0x4104
leaq 0x20(%r14), %rdi
movq %rsp, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x28f9
movq (%r12), %rax
jmp 0x421c
nop