% compiler: GNU Prolog 1.4.2
% file    : internal.pl


file_name('/home/diaz/GP/src/src/Pl2Wam/internal.pl').


predicate(internal_format/6,74,static,private,monofile,global,[
    allocate(5),
    get_variable(y(0),1),
    get_variable(y(1),3),
    get_variable(y(2),4),
    get_variable(y(3),5),
    put_variable(y(4),1),
    call(format_head/3),
    put_value(y(0),0),
    put_value(y(4),1),
    put_value(y(1),2),
    put_value(y(2),3),
    call(format_body/4),
    put_unsafe_value(y(4),0),
    put_integer(0,1),
    put_value(y(3),2),
    deallocate,
    execute(classif_vars/3)]).


predicate(format_head/3,82,static,private,monofile,global,[
    get_variable(x(3),2),
    get_variable(x(2),0),
    put_atom(module,0),
    put_variable(x(4),5),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(5)]),
    put_structure((:)/2,0),
    unify_value(x(4)),
    unify_local_value(x(2)),
    put_value(x(1),2),
    put_integer(0,1),
    put_void(4),
    execute(format_pred/5)]).


predicate(format_body/4,89,static,private,monofile,global,[
    get_variable(x(5),2),
    put_value(x(1),2),
    put_value(x(3),6),
    put_integer(0,1),
    put_atom(t,3),
    put_nil(4),
    put_void(7),
    execute(format_body1/8)]).


predicate(format_body1/8,92,static,private,monofile,global,[
    pragma_arity(9),
    get_current_choice(x(8)),
    try_me_else(5),
    switch_on_term(1,4,fail,fail,2),

label(1),
    try_me_else(3),

label(2),
    allocate(8),
    get_variable(y(1),2),
    get_variable(y(2),4),
    get_variable(y(3),6),
    get_variable(y(4),7),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    cut(x(8)),
    put_value(y(1),2),
    put_variable(y(5),4),
    put_variable(y(6),6),
    put_variable(y(7),7),
    call(format_body1/8),
    put_value(y(0),0),
    put_unsafe_value(y(6),1),
    put_value(y(1),2),
    put_unsafe_value(y(7),3),
    put_value(y(2),4),
    put_unsafe_value(y(5),5),
    put_value(y(3),6),
    put_value(y(4),7),
    deallocate,
    execute(format_body1/8),

label(3),
    trust_me_else_fail,

label(4),
    get_atom(true,0),
    get_value(x(5),4),
    get_value(x(7),3),
    get_value(x(6),1),
    cut(x(8)),
    proceed,

label(5),
    trust_me_else_fail,
    allocate(6),
    get_variable(y(0),0),
    get_variable(y(1),2),
    get_variable(y(3),6),
    get_variable(y(4),7),
    get_list(5),
    unify_variable(y(2)),
    unify_local_value(x(4)),
    put_value(x(3),0),
    put_value(x(1),2),
    put_value(y(3),1),
    call('$format_body1/8_$aux1'/3),
    put_value(y(0),0),
    put_value(y(3),1),
    put_value(y(1),2),
    put_value(y(2),3),
    put_variable(y(5),4),
    call(format_pred/5),
    put_unsafe_value(y(5),0),
    put_value(y(4),1),
    deallocate,
    execute('$format_body1/8_$aux2'/2)]).


predicate('$format_body1/8_$aux2'/2,100,static,private,monofile,local,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    get_atom(t,0),
    cut(x(2)),
    get_atom(f,1),
    proceed,

label(1),
    trust_me_else_fail,
    get_atom(t,1),
    proceed]).


predicate('$format_body1/8_$aux1'/3,100,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_atom(t,0),
    cut(x(3)),
    math_fast_load_value(x(2),0),
    call_c('Pl_Fct_Fast_Inc',[fast_call,x(0)],[x(0)]),
    get_value(x(1),0),
    proceed,

label(1),
    trust_me_else_fail,
    get_value(x(2),1),
    proceed]).


predicate(format_pred/5,119,static,private,monofile,global,[
    pragma_arity(6),
    get_current_choice(x(5)),
    try_me_else(1),
    get_structure((:)/2,0),
    unify_variable(x(6)),
    unify_variable(x(0)),
    get_structure(p/4,3),
    unify_local_value(x(1)),
    unify_value(x(6)),
    unify_variable(x(7)),
    unify_variable(x(6)),
    cut(x(5)),
    put_structure(p/4,3),
    unify_local_value(x(1)),
    unify_void(1),
    unify_value(x(7)),
    unify_value(x(6)),
    execute(format_pred/5),

label(1),
    trust_me_else_fail,
    allocate(7),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(6),4),
    get_structure(p/4,3),
    unify_local_value(y(1)),
    unify_variable(x(2)),
    unify_variable(x(0)),
    unify_variable(y(5)),
    get_structure((/)/2,0),
    unify_variable(y(3)),
    unify_variable(y(4)),
    put_value(y(0),0),
    put_value(y(3),1),
    put_value(y(4),3),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(0),x(1),x(3)]),
    put_value(y(3),0),
    put_value(y(4),1),
    call(get_owner_module/3),
    put_value(y(0),1),
    put_list(2),
    unify_void(1),
    unify_variable(x(0)),
    call_c('Pl_Blt_Univ',[fast_call,boolean],[x(1),x(2)]),
    put_value(y(1),1),
    put_value(y(2),2),
    put_value(y(5),3),
    call(format_arg_lst/4),
    put_value(y(3),0),
    put_value(y(4),1),
    put_value(y(5),2),
    put_value(y(6),3),
    deallocate,
    execute('$format_pred/5_$aux1'/4)]).


predicate('$format_pred/5_$aux1'/4,123,static,private,monofile,local,[
    pragma_arity(5),
    get_current_choice(x(4)),
    try_me_else(1),
    allocate(2),
    get_variable(y(0),3),
    get_variable(y(1),4),
    call('$format_pred/5_$aux2'/3),
    cut(y(1)),
    put_value(y(0),0),
    get_atom(t,0),
    deallocate,
    proceed,

label(1),
    trust_me_else_fail,
    get_atom(f,3),
    proceed]).


predicate('$format_pred/5_$aux2'/3,123,static,private,monofile,local,[
    try_me_else(1),
    execute(inline_predicate/2),

label(1),
    trust_me_else_fail,
    get_atom('$call_c',0),
    get_integer(2,1),
    get_list(2),
    unify_void(1),
    unify_list,
    unify_variable(x(0)),
    unify_nil,
    execute(not_dangerous_c_call/1)]).


predicate(format_arg_lst/4,141,static,private,monofile,global,[
    pragma_arity(5),
    get_current_choice(x(4)),
    switch_on_term(1,2,fail,4,fail),

label(1),
    try_me_else(3),

label(2),
    get_nil(0),
    get_nil(3),
    proceed,

label(3),
    trust_me_else_fail,

label(4),
    allocate(5),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_list(0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_list(3),
    unify_variable(x(3)),
    unify_variable(y(3)),
    get_variable(y(4),4),
    put_value(y(1),1),
    put_value(y(2),2),
    call(format_arg/4),
    cut(y(4)),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    put_value(y(3),3),
    deallocate,
    execute(format_arg_lst/4)]).


predicate(format_arg/4,150,static,private,monofile,global,[
    try_me_else(1),
    get_variable(x(4),2),
    get_variable(x(2),1),
    get_variable(x(1),0),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(1)]),
    put_value(x(4),0),
    execute(add_var_to_dico/4),

label(1),
    retry_me_else(2),
    get_variable(x(1),0),
    put_value(x(3),0),
    execute(no_internal_transf/2),

label(2),
    retry_me_else(3),
    get_nil(0),
    get_atom(nil,3),
    proceed,

label(3),
    retry_me_else(4),
    get_structure(atm/1,3),
    unify_local_value(x(0)),
    call_c('Pl_Blt_Atom',[fast_call,boolean],[x(0)]),
    proceed,

label(4),
    retry_me_else(5),
    get_structure(int/1,3),
    unify_local_value(x(0)),
    call_c('Pl_Blt_Integer',[fast_call,boolean],[x(0)]),
    proceed,

label(5),
    retry_me_else(6),
    get_structure(flt/1,3),
    unify_local_value(x(0)),
    call_c('Pl_Blt_Float',[fast_call,boolean],[x(0)]),
    proceed,

label(6),
    trust_me_else_fail,
    get_variable(x(4),0),
    get_structure(stc/3,3),
    unify_variable(x(0)),
    unify_variable(x(5)),
    unify_variable(x(3)),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(4),x(0),x(5)]),
    put_list(5),
    unify_void(1),
    unify_variable(x(0)),
    call_c('Pl_Blt_Univ',[fast_call,boolean],[x(4),x(5)]),
    execute(format_arg_lst/4)]).


predicate(no_internal_transf/2,183,static,private,monofile,global,[
    put_atom('$no_internal_tranf$',2),
    put_integer(1,3),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(1),x(2),x(3)]),
    put_integer(1,2),
    call_c('Pl_Blt_Arg',[fast_call,boolean],[x(2),x(1),x(0)]),
    proceed]).


predicate(add_var_to_dico/4,197,static,private,monofile,global,[
    pragma_arity(5),
    get_current_choice(x(4)),
    try_me_else(1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    cut(x(4)),
    get_structure(var/2,3),
    unify_void(2),
    get_list(0),
    unify_variable(x(0)),
    unify_void(1),
    get_structure(v/4,0),
    unify_local_value(x(1)),
    unify_local_value(x(2)),
    unify_void(1),
    unify_local_value(x(3)),
    proceed,

label(1),
    trust_me_else_fail,
    switch_on_term(3,fail,fail,2,fail),

label(2),
    try(4),
    trust(6),

label(3),
    try_me_else(5),

label(4),
    get_variable(x(6),1),
    get_list(0),
    unify_variable(x(0)),
    unify_void(1),
    get_structure(v/4,0),
    unify_variable(x(0)),
    unify_variable(x(1)),
    unify_variable(x(5)),
    unify_local_value(x(3)),
    call_c('Pl_Blt_Term_Eq',[fast_call,boolean],[x(0),x(6)]),
    cut(x(4)),
    get_structure(var/2,3),
    unify_variable(x(0)),
    unify_void(1),
    get_atom(f,5),
    execute('$add_var_to_dico/4_$aux1'/3),

label(5),
    trust_me_else_fail,

label(6),
    get_list(0),
    unify_void(1),
    unify_variable(x(0)),
    execute(add_var_to_dico/4)]).


predicate('$add_var_to_dico/4_$aux1'/3,202,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    call_c('Pl_Blt_Term_Neq',[fast_call,boolean],[x(1),x(2)]),
    math_fast_load_value(x(2),1),
    put_integer(1,2),
    call_c('Pl_Blt_Fast_Gt',[fast_call,boolean],[x(1),x(2)]),
    cut(x(3)),
    get_structure(y/1,0),
    unify_void(1),
    proceed,

label(1),
    trust_me_else_fail,
    proceed]).


predicate(classif_vars/3,219,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    switch_on_term(2,3,fail,1,fail),

label(1),
    try(5),
    trust(7),

label(2),
    try_me_else(4),

label(3),
    get_nil(0),
    get_value(x(2),1),
    cut(x(3)),
    proceed,

label(4),
    retry_me_else(6),

label(5),
    allocate(3),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_list(0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure(v/4,0),
    unify_void(2),
    unify_variable(x(0)),
    unify_structure(var/2),
    unify_variable(x(1)),
    unify_void(1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(1)]),
    cut(x(3)),
    call('$classif_vars/3_$aux1'/2),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(classif_vars/3),

label(6),
    trust_me_else_fail,

label(7),
    get_list(0),
    unify_variable(x(3)),
    unify_variable(x(0)),
    get_structure(v/4,3),
    unify_void(3),
    unify_structure(var/2),
    unify_variable(x(3)),
    unify_void(1),
    get_structure(y/1,3),
    unify_local_value(x(1)),
    math_fast_load_value(x(1),1),
    call_c('Pl_Fct_Fast_Inc',[fast_call,x(1)],[x(1)]),
    execute(classif_vars/3)]).


predicate('$classif_vars/3_$aux1'/2,222,static,private,monofile,local,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    cut(x(2)),
    get_structure(x/1,1),
    unify_atom(void),
    proceed,

label(1),
    trust_me_else_fail,
    get_structure(x/1,1),
    unify_void(1),
    proceed]).


predicate(inline_predicate/2,241,static,private,monofile,global,[
    put_atom(inline,3),
    put_variable(x(2),4),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(3),x(4)]),
    execute(inline_predicate/3)]).


predicate(inline_predicate/3,248,static,private,monofile,global,[
    switch_on_term(4,1,fail,fail,fail),

label(1),
    switch_on_atom([('$get_cut_level',5),
                    ('$get_current_choice',7),
                    ('$cut',9),
                    ('$soft_cut',11),
                    ((=),13),
                    ('$foreign_call_c',15),
                    (var,17),
                    (nonvar,19),
                    (atom,21),
                    (integer,23),
                    (float,25),
                    (number,27),
                    (atomic,29),
                    (compound,31),
                    (callable,33),
                    (ground,35),
                    (is_list,37),
                    (list,39),
                    (partial_list,41),
                    (list_or_partial_list,43),
                    (fd_var,45),
                    (non_fd_var,47),
                    (generic_var,49),
                    (non_generic_var,51),
                    (functor,53),
                    (arg,55),
                    (compare,57),
                    ((=..),59),
                    ((==),61),
                    ((\==),63),
                    ((@<),65),
                    ((@=<),67),
                    ((@>),69),
                    ((@>=),71),
                    ((is),73),
                    ((=:=),75),
                    ((=\=),77),
                    ((<),79),
                    ((=<),81),
                    ((>),83),
                    ((>=),85),
                    (g_assign,87),
                    (g_assignb,89),
                    (g_link,91),
                    (g_read,93),
                    (g_array_size,95),
                    (g_inc,2),
                    (g_inco,99),
                    (g_dec,3),
                    (g_deco,107),
                    (g_set_bit,113),
                    (g_reset_bit,115),
                    (g_test_set_bit,117),
                    (g_test_reset_bit,119)]),

label(2),
    try(97),
    retry(101),
    trust(103),

label(3),
    try(105),
    retry(109),
    trust(111),

label(4),
    try_me_else(6),

label(5),
    get_atom('$get_cut_level',0),
    get_integer(1,1),
    proceed,

label(6),
    retry_me_else(8),

label(7),
    get_atom('$get_current_choice',0),
    get_integer(1,1),
    proceed,

label(8),
    retry_me_else(10),

label(9),
    get_atom('$cut',0),
    get_integer(1,1),
    proceed,

label(10),
    retry_me_else(12),

label(11),
    get_atom('$soft_cut',0),
    get_integer(1,1),
    proceed,

label(12),
    retry_me_else(14),

label(13),
    get_atom(=,0),
    get_integer(2,1),
    proceed,

label(14),
    retry_me_else(16),

label(15),
    get_atom('$foreign_call_c',0),
    get_integer(1,1),
    proceed,

label(16),
    retry_me_else(18),

label(17),
    get_atom(var,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(18),
    retry_me_else(20),

label(19),
    get_atom(nonvar,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(20),
    retry_me_else(22),

label(21),
    get_atom(atom,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(22),
    retry_me_else(24),

label(23),
    get_atom(integer,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(24),
    retry_me_else(26),

label(25),
    get_atom(float,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(26),
    retry_me_else(28),

label(27),
    get_atom(number,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(28),
    retry_me_else(30),

label(29),
    get_atom(atomic,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(30),
    retry_me_else(32),

label(31),
    get_atom(compound,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(32),
    retry_me_else(34),

label(33),
    get_atom(callable,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(34),
    retry_me_else(36),

label(35),
    get_atom(ground,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(36),
    retry_me_else(38),

label(37),
    get_atom(is_list,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(38),
    retry_me_else(40),

label(39),
    get_atom(list,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(40),
    retry_me_else(42),

label(41),
    get_atom(partial_list,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(42),
    retry_me_else(44),

label(43),
    get_atom(list_or_partial_list,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(44),
    retry_me_else(46),

label(45),
    get_atom(fd_var,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(46),
    retry_me_else(48),

label(47),
    get_atom(non_fd_var,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(48),
    retry_me_else(50),

label(49),
    get_atom(generic_var,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(50),
    retry_me_else(52),

label(51),
    get_atom(non_generic_var,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(52),
    retry_me_else(54),

label(53),
    get_atom(functor,0),
    get_integer(3,1),
    get_atom(t,2),
    proceed,

label(54),
    retry_me_else(56),

label(55),
    get_atom(arg,0),
    get_integer(3,1),
    get_atom(t,2),
    proceed,

label(56),
    retry_me_else(58),

label(57),
    get_atom(compare,0),
    get_integer(3,1),
    get_atom(t,2),
    proceed,

label(58),
    retry_me_else(60),

label(59),
    get_atom(=..,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(60),
    retry_me_else(62),

label(61),
    get_atom(==,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(62),
    retry_me_else(64),

label(63),
    get_atom(\==,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(64),
    retry_me_else(66),

label(65),
    get_atom(@<,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(66),
    retry_me_else(68),

label(67),
    get_atom(@=<,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(68),
    retry_me_else(70),

label(69),
    get_atom(@>,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(70),
    retry_me_else(72),

label(71),
    get_atom(@>=,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(72),
    retry_me_else(74),

label(73),
    get_atom(is,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(74),
    retry_me_else(76),

label(75),
    get_atom(=:=,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(76),
    retry_me_else(78),

label(77),
    get_atom(=\=,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(78),
    retry_me_else(80),

label(79),
    get_atom(<,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(80),
    retry_me_else(82),

label(81),
    get_atom(=<,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(82),
    retry_me_else(84),

label(83),
    get_atom(>,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(84),
    retry_me_else(86),

label(85),
    get_atom(>=,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(86),
    retry_me_else(88),

label(87),
    get_atom(g_assign,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(88),
    retry_me_else(90),

label(89),
    get_atom(g_assignb,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(90),
    retry_me_else(92),

label(91),
    get_atom(g_link,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(92),
    retry_me_else(94),

label(93),
    get_atom(g_read,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(94),
    retry_me_else(96),

label(95),
    get_atom(g_array_size,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(96),
    retry_me_else(98),

label(97),
    get_atom(g_inc,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(98),
    retry_me_else(100),

label(99),
    get_atom(g_inco,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(100),
    retry_me_else(102),

label(101),
    get_atom(g_inc,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(102),
    retry_me_else(104),

label(103),
    get_atom(g_inc,0),
    get_integer(3,1),
    get_atom(t,2),
    proceed,

label(104),
    retry_me_else(106),

label(105),
    get_atom(g_dec,0),
    get_integer(1,1),
    get_atom(t,2),
    proceed,

label(106),
    retry_me_else(108),

label(107),
    get_atom(g_deco,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(108),
    retry_me_else(110),

label(109),
    get_atom(g_dec,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(110),
    retry_me_else(112),

label(111),
    get_atom(g_dec,0),
    get_integer(3,1),
    get_atom(t,2),
    proceed,

label(112),
    retry_me_else(114),

label(113),
    get_atom(g_set_bit,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(114),
    retry_me_else(116),

label(115),
    get_atom(g_reset_bit,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(116),
    retry_me_else(118),

label(117),
    get_atom(g_test_set_bit,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed,

label(118),
    trust_me_else_fail,

label(119),
    get_atom(g_test_reset_bit,0),
    get_integer(2,1),
    get_atom(t,2),
    proceed]).
