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

exp([[ref(loc(1)),num(int(A))],[[num(int(B)),num(int(C))]]],[ref(loc(2)),[[num(int(B)),num(int(C))],[num(int(1)),num(int(1))]]]) :-
        A=<0 .
exp([[ref(loc(1)),num(int(A))],[[num(int(B)),num(int(C))]]],[D,E]) :-
        A>0,
        F is 1*B,
        G is 1*C,
        H is A+ -1,
        execute_notrace_1(B,C,H,F,G,E,_1,_2,_3,_4,D,_5) .

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


