p > 0) {
		m = stk[sp-2];
		n = stk[sp-1];

		if(stk[sp-3]) {
			stk[sp-4] = stk[sp]; // return gcd(n, m%n);
			sp = sp - 4;         // pop call frame
		} else if(n == 0) {
			stk[sp-4] = m;   // if(n == 0) return m;
			sp = sp - 4;     // pop call frame
		} else {
			stk[sp-3] = 1;   // parent call is in return path

			// push call frame
			stk[sp+0] = 0;   // return value
			stk[sp+1] = 0;   // return flag
			stk[sp+2] = n;   // push n
			stk[sp+3] = m%n; // push m%n
			sp = sp + 4;
		