:- module( _, [combNoRep/2], [assertions , regtypes , basicmodes , nativeprops] ).

combNoRep([[num(int(A)),num(int(B))]],[num(int(-1))]) :-
        A<B .
combNoRep([[num(int(A)),num(int(B))]],[num(int(-1))]) :-
        A>=B,
        B<0 .
combNoRep([[num(int(A)),num(int(B))]],[num(int(1))]) :-
        A>=B,
        B>=0,
        B=<0 .
combNoRep([[num(int(A)),num(int(B))]],[num(int(C))]) :-
        A>=B,
        B>=0,
        B>0,
        D is 1*B,
        E is 1*A,
        F is B+ -1,
        _1 is A+ -1,
        F=<0,
        D=\=0,
        C is E//D .
combNoRep([[num(int(A)),num(int(B))]],[refE(loc(1))]) :-
        A>=B,
        B>=0,
        B>0,
        0 is 1*B,
        _1 is 1*A,
        C is B+ -1,
        _2 is A+ -1,
        C=<0 .
combNoRep([[num(int(A)),num(int(B))]],[C]) :-
        A>=B,
        B>=0,
        B>0,
        D is 1*B,
        E is 1*A,
        F is B+ -1,
        G is A+ -1,
        F>0,
        H is D*F,
        I is E*G,
        execute_notrace_1(G,F,I,H,_1,_2,_3,_4,_5,C,_6) .

execute_notrace_1(A,B,C,D,[],_1,_2,_3,_4,num(int(E)),[]) :-
        F is B+ -1,
        _5 is A+ -1,
        F=<0,
        D=\=0,
        E is C//D .
execute_notrace_1(A,B,_1,0,[[]],_2,_3,_4,_5,refE(loc(1)),[]) :-
        C is B+ -1,
        _6 is A+ -1,
        C=<0 .
execute_notrace_1(A,B,C,D,E,F,G,H,I,J,K) :-
        L is B+ -1,
        M is A+ -1,
        L>0,
        N is D*L,
        O is C*M,
        execute_notrace_1(M,L,O,N,E,F,G,H,I,J,K) .


