if (a1.isList()){
Term[] args = {((ListTerm)a1).car(), ((ListTerm)a1).cdr()};
a5 = args[1];
} else if (a1.isVariable()){
a5 = new VariableTerm(engine);
((VariableTerm) a1).bind(new ListTerm(new VariableTerm(engine), a5), engine.trail);
} else {
return engine.fail();
}
a2 = a2.dereference();
if (a2.isList()){
Term[] args = {((ListTerm)a2).car(), ((ListTerm)a2).cdr()};
a6 = args[0];
a7 = args[1];
} else if (a2.isVariable()){
a6 = new VariableTerm(engine);
a7 = new VariableTerm(engine);
((VariableTerm) a2).bind(new ListTerm(a6, a7), engine.trail);
} else {
return engine.fail();
}
a4 = a4.dereference();
if (a4.isList()){
Term[] args = {((ListTerm)a4).car(), ((ListTerm)a4).cdr()};
if (! a6.unify(args[0], engine.trail))
return engine.fail();
a8 = args[1];
} else if (a4.isVariable()){
a8 = new VariableTerm(engine);
((VariableTerm) a4).bind(new ListTerm(a6, a8), engine.trail);
} else {
return engine.fail();
}
engine.aregs[1] = a5;
engine.aregs[2] = a7;