// File: tomsmeding[P]MarioLANG/mariolang.cpp
// Function: Level::drawTape(mario*)
void drawTape(mario *m){
		static int minidx=-1,maxidx=-1;
		static bool inited=false;
		int i,intwidth;
		char printf_format[20];
		if(!inited){
			inited=true;
			minidx=0;
			maxidx=0;
		}
		if(m->memp<minidx)minidx=m->memp;
		if(m->memp>maxidx)maxidx=m->memp;
		intwidth=max(1+log10(minidx==0?0.1:-minidx),log10(maxidx==0?1:maxidx))+1;
		printf("\x1B[34m"); fflush(stdout); //blue
		snprintf(printf_format,20,"%%%dd%%c %%d",intwidth);
		// fprintf(stderr,"%s",printf_format);
		// exit(0);
		for(i=minidx;i<=maxidx;i++){
			moveto(tapex,i-minidx);
			printf("\x1B[0K"); fflush(stdout);
			printf(printf_format,i,m->memp==i?'#':'.',memory[i]); fflush(stdout);
		}
		printf("\x1B[0m"); fflush(stdout);
		moveto(outputx,outputy);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
testb $0x1, 0x47d2(%rip)      # 0xb1c1
jne 0x6a0c
movb $0x1, 0x47c9(%rip)      # 0xb1c1
movl $0x0, 0x478e(%rip)      # 0xb190
movl $0x0, 0x4788(%rip)      # 0xb194
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
cmpl 0x4777(%rip), %eax      # 0xb190
jge 0x6a28
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x4768(%rip)      # 0xb190
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
cmpl 0x475f(%rip), %eax      # 0xb194
jle 0x6a44
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x4750(%rip)      # 0xb194
cmpl $0x0, 0x4745(%rip)      # 0xb190
jne 0x6a5c
movsd 0x723(%rip), %xmm0      # 0x7178
movsd %xmm0, -0x50(%rbp)
jmp 0x6a6d
xorl %eax, %eax
subl 0x472c(%rip), %eax      # 0xb190
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
callq 0x20d0
movaps %xmm0, %xmm1
movsd 0x6fe(%rip), %xmm0      # 0x7180
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
cmpl $0x0, 0x4702(%rip)      # 0xb194
jne 0x6a9e
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x6aa7
movl 0x46f0(%rip), %eax      # 0xb194
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
callq 0x6c40
movsd %xmm0, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6c00
movsd 0x6b7(%rip), %xmm0      # 0x7180
addsd (%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
leaq 0xc31(%rip), %rdi       # 0x770c
movb $0x0, %al
callq 0x2030
movq 0x44cf(%rip), %rax      # 0xafb8
movq (%rax), %rdi
callq 0x21c0
leaq -0x30(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x14, %esi
leaq 0xc0e(%rip), %rdx       # 0x7712
movb $0x0, %al
callq 0x2290
movl 0x467f(%rip), %eax      # 0xb190
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x4677(%rip), %eax      # 0xb194
jg 0x6bc8
movq -0x48(%rbp), %rax
movl 0x54(%rax), %edi
movl -0x14(%rbp), %esi
subl 0x465d(%rip), %esi      # 0xb190
callq 0x2520
leaq 0xbe0(%rip), %rdi       # 0x771f
movb $0x0, %al
callq 0x2030
movq 0x446b(%rip), %rax      # 0xafb8
movq (%rax), %rdi
callq 0x21c0
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movl -0x14(%rbp), %edx
movb $0x23, %al
movb $0x2e, %sil
movb %sil, -0x56(%rbp)
cmpl %edx, %ecx
movb %al, -0x55(%rbp)
je 0x6b83
movb -0x56(%rbp), %al
movb %al, -0x55(%rbp)
movq -0x48(%rbp), %rdi
movb -0x55(%rbp), %al
movsbl %al, %eax
movl %eax, -0x6c(%rbp)
movl -0x14(%rbp), %esi
callq 0x5c90
movq -0x68(%rbp), %rdi
movl -0x5c(%rbp), %esi
movl -0x6c(%rbp), %edx
movl (%rax), %ecx
movb $0x0, %al
callq 0x2030
movq 0x4406(%rip), %rax      # 0xafb8
movq (%rax), %rdi
callq 0x21c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6b14
leaq 0x8c3(%rip), %rdi       # 0x7492
movb $0x0, %al
callq 0x2030
movq 0x43db(%rip), %rax      # 0xafb8
movq (%rax), %rdi
callq 0x21c0
movq -0x48(%rbp), %rax
movl 0x48(%rax), %edi
movl 0x4c(%rax), %esi
callq 0x2520
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)