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();
}
a5 = a5.dereference();
if (a5.isList()){
Term[] args = {((ListTerm)a5).car(), ((ListTerm)a5).cdr()};
a6 = args[1];
} else if (a5.isVariable()){
a6 = new VariableTerm(engine);
((VariableTerm) a5).bind(new ListTerm(new VariableTerm(engine), a6), engine.trail);
} else {
return engine.fail();
}
a2 = a2.dereference();
if (a2.isList()){
Term[] args = {((ListTerm)a2).car(), ((ListTerm)a2).cdr()};
a7 = args[0];
a8 = args[1];
} else if (a2.isVariable()){
a7 = new VariableTerm(engine);
a8 = new VariableTerm(engine);
((VariableTerm) a2).bind(new ListTerm(a7, a8), engine.trail);
} else {
return engine.fail();
}
a3 = a3.dereference();
if (a3.isList()){
Term[] args = {((ListTerm)a3).car(), ((ListTerm)a3).cdr()};
if (! a7.unify(args[0], engine.trail))
return engine.fail();
a9 = args[1];
} else if (a3.isVariable()){
a9 = new VariableTerm(engine);
((VariableTerm) a3).bind(new ListTerm(a7, a9), engine.trail);
} else {
return engine.fail();
}
//START inline expansion of $neck_cut
engine.neckCut();