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


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


predicate(syntactic_sugar_init_pred/2,41,static,private,monofile,global,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    allocate(1),
    get_variable(y(0),2),
    call('$aux_name'/1),
    cut(y(0)),
    deallocate,
    proceed,

label(1),
    trust_me_else_fail,
    put_atom(aux,0),
    put_integer(1,1),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(0),x(1)]),
    proceed]).


predicate(syntactic_sugar/3,50,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    allocate(5),
    get_variable(y(0),1),
    get_variable(y(1),2),
    get_variable(y(2),3),
    put_value(y(0),1),
    put_variable(y(3),2),
    call('$syntactic_sugar/3_$aux1'/3),
    cut(y(2)),
    put_value(y(3),0),
    put_variable(y(4),1),
    call(normalize_cuts/2),
    put_unsafe_value(y(4),0),
    put_value(y(0),1),
    put_value(y(1),2),
    deallocate,
    execute(normalize_alts/3)]).


predicate('$syntactic_sugar/3_$aux1'/3,50,static,private,monofile,local,[
    try_me_else(1),
    get_structure((:-)/2,0),
    unify_local_value(x(1)),
    unify_local_value(x(2)),
    proceed,

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


predicate(normalize_cuts/2,60,static,private,monofile,global,[
    pragma_arity(3),
    get_current_choice(x(2)),
    allocate(4),
    get_variable(y(0),1),
    get_variable(y(1),2),
    put_atom(has_cut,1),
    put_atom(f,2),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(1),x(2)]),
    put_variable(y(2),1),
    put_variable(y(3),2),
    call(normalize_cuts1/3),
    cut(y(1)),
    put_value(y(0),0),
    put_unsafe_value(y(2),1),
    put_unsafe_value(y(3),2),
    deallocate,
    execute('$normalize_cuts/2_$aux1'/3)]).


predicate('$normalize_cuts/2_$aux1'/3,60,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    put_atom(has_cut,4),
    put_atom(t,5),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(4),x(5)]),
    cut(x(3)),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_local_value(x(2)),
    get_structure('$get_cut_level'/1,0),
    unify_local_value(x(1)),
    proceed,

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


predicate(normalize_cuts1/3,85,static,private,monofile,global,[
    try_me_else(1),
    get_variable(x(3),0),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(3)]),
    put_structure(call/1,0),
    unify_local_value(x(3)),
    execute(normalize_cuts1/3),

label(1),
    retry_me_else(24),
    switch_on_term(4,11,fail,fail,2),

label(2),
    switch_on_structure([((;)/2,3),((->)/2,7),((*->)/2,9),((',')/2,13),((:)/2,17),(call/1,19),(catch/3,21),(throw/1,23)]),

label(3),
    try(5),
    trust(15),

label(4),
    try_me_else(6),

label(5),
    allocate(5),
    get_variable(y(1),1),
    get_structure((;)/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    call_c('Pl_Blt_Non_Var',[fast_call,boolean],[x(0)]),
    put_variable(y(2),1),
    put_variable(y(3),3),
    put_variable(y(4),4),
    call('$normalize_cuts1/3_$aux1'/5),
    put_value(y(2),0),
    put_value(y(1),1),
    put_value(y(3),2),
    call(normalize_cuts1/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_unsafe_value(y(4),2),
    deallocate,
    execute(normalize_cuts1/3),

label(6),
    retry_me_else(8),

label(7),
    get_structure((->)/2,0),
    unify_variable(x(4)),
    unify_variable(x(0)),
    get_structure((;)/2,2),
    unify_variable(x(2)),
    unify_atom(fail),
    get_structure((',')/2,2),
    unify_variable(x(3)),
    unify_structure((',')/2),
    unify_value(x(4)),
    unify_structure((',')/2),
    unify_variable(x(4)),
    unify_variable(x(2)),
    get_structure('$get_cut_level'/1,3),
    unify_variable(x(3)),
    get_structure('$cut'/1,4),
    unify_value(x(3)),
    execute(normalize_cuts1/3),

label(8),
    retry_me_else(10),

label(9),
    get_structure((*->)/2,0),
    unify_variable(x(3)),
    unify_variable(x(0)),
    get_structure((;)/2,2),
    unify_variable(x(2)),
    unify_atom(fail),
    get_structure((',')/2,2),
    unify_value(x(3)),
    unify_variable(x(2)),
    execute(normalize_cuts1/3),

label(10),
    retry_me_else(12),

label(11),
    get_atom(!,0),
    get_structure('$cut'/1,2),
    unify_local_value(x(1)),
    put_atom(has_cut,0),
    put_atom(t,1),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(0),x(1)]),
    proceed,

label(12),
    retry_me_else(14),

label(13),
    allocate(3),
    get_variable(y(1),1),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure((',')/2,2),
    unify_variable(x(2)),
    unify_variable(y(2)),
    put_value(y(1),1),
    call(normalize_cuts1/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(normalize_cuts1/3),

label(14),
    retry_me_else(16),

label(15),
    allocate(3),
    get_variable(y(1),1),
    get_structure((;)/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure((;)/2,2),
    unify_variable(x(2)),
    unify_variable(y(2)),
    put_value(y(1),1),
    call(normalize_cuts1/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(normalize_cuts1/3),

label(16),
    retry_me_else(18),

label(17),
    allocate(6),
    get_structure((:)/2,0),
    unify_variable(y(0)),
    unify_variable(y(1)),
    get_variable(y(2),1),
    get_variable(y(3),2),
    put_value(y(0),0),
    put_atom(true,1),
    call(check_module_name/2),
    put_value(y(1),0),
    put_value(y(2),1),
    put_variable(y(4),2),
    call(normalize_cuts1/3),
    put_value(y(4),0),
    put_value(y(0),1),
    put_variable(y(5),2),
    call(distrib_module_qualif/3),
    put_unsafe_value(y(5),0),
    put_value(y(2),1),
    put_value(y(3),2),
    deallocate,
    execute('$normalize_cuts1/3_$aux2'/3),

label(18),
    retry_me_else(20),

label(19),
    get_structure(call/1,0),
    unify_variable(x(0)),
    get_structure('$call'/4,2),
    unify_value(x(0)),
    unify_variable(x(0)),
    unify_variable(x(1)),
    unify_atom(true),
    execute(cur_pred_without_aux/2),

label(20),
    retry_me_else(22),

label(21),
    get_structure(catch/3,0),
    unify_variable(x(3)),
    unify_variable(x(1)),
    unify_variable(x(0)),
    get_structure('$catch'/6,2),
    unify_value(x(3)),
    unify_value(x(1)),
    unify_value(x(0)),
    unify_variable(x(0)),
    unify_variable(x(1)),
    unify_atom(true),
    execute(cur_pred_without_aux/2),

label(22),
    trust_me_else_fail,

label(23),
    get_structure(throw/1,0),
    unify_variable(x(0)),
    get_structure('$throw'/4,2),
    unify_value(x(0)),
    unify_variable(x(0)),
    unify_variable(x(1)),
    unify_atom(true),
    execute(cur_pred_without_aux/2),

label(24),
    trust_me_else_fail,
    put_value(x(2),1),
    execute('$normalize_cuts1/3_$aux3'/2)]).


predicate('$normalize_cuts1/3_$aux3'/2,140,static,private,monofile,local,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    call_c('Pl_Blt_Callable',[fast_call,boolean],[x(0)]),
    cut(x(2)),
    execute(meta_pred_rewriting/2),

label(1),
    trust_me_else_fail,
    put_list(1),
    unify_local_value(x(0)),
    unify_nil,
    put_atom('body goal is not callable (~q)',0),
    execute(error/2)]).


predicate('$normalize_cuts1/3_$aux2'/3,120,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_variable(x(4),0),
    get_structure((:)/2,4),
    unify_variable(x(0)),
    unify_void(1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    cut(x(3)),
    put_structure(call/1,0),
    unify_local_value(x(4)),
    execute(normalize_cuts1/3),

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


predicate('$normalize_cuts1/3_$aux1'/5,89,static,private,monofile,local,[
    switch_on_term(2,fail,fail,fail,1),

label(1),
    switch_on_structure([((->)/2,3),((*->)/2,5)]),

label(2),
    try_me_else(4),

label(3),
    get_structure((->)/2,0),
    unify_variable(x(5)),
    unify_local_value(x(1)),
    get_structure((;)/2,2),
    unify_variable(x(0)),
    unify_local_value(x(4)),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_structure((',')/2),
    unify_value(x(5)),
    unify_structure((',')/2),
    unify_variable(x(1)),
    unify_local_value(x(3)),
    get_structure('$get_cut_level'/1,0),
    unify_variable(x(0)),
    get_structure('$cut'/1,1),
    unify_value(x(0)),
    proceed,

label(4),
    trust_me_else_fail,

label(5),
    get_structure((*->)/2,0),
    unify_variable(x(5)),
    unify_local_value(x(1)),
    get_structure((;)/2,2),
    unify_variable(x(0)),
    unify_local_value(x(4)),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_structure((',')/2),
    unify_value(x(5)),
    unify_structure((',')/2),
    unify_variable(x(1)),
    unify_local_value(x(3)),
    get_structure('$get_current_choice'/1,0),
    unify_variable(x(0)),
    get_structure('$soft_cut'/1,1),
    unify_value(x(0)),
    proceed]).


predicate(distrib_module_qualif/3,149,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(12),
    switch_on_term(2,11,fail,fail,1),

label(1),
    switch_on_structure([((;)/2,3),((->)/2,5),((',')/2,7),((:)/2,9)]),

label(2),
    try_me_else(4),

label(3),
    allocate(3),
    get_variable(y(1),1),
    get_structure((;)/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure((;)/2,2),
    unify_variable(x(2)),
    unify_variable(y(2)),
    cut(x(3)),
    put_value(y(1),1),
    call(distrib_module_qualif/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(distrib_module_qualif/3),

label(4),
    retry_me_else(6),

label(5),
    allocate(3),
    get_variable(y(1),1),
    get_structure((->)/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure((->)/2,2),
    unify_variable(x(2)),
    unify_variable(y(2)),
    cut(x(3)),
    put_value(y(1),1),
    call(distrib_module_qualif/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(distrib_module_qualif/3),

label(6),
    retry_me_else(8),

label(7),
    allocate(3),
    get_variable(y(1),1),
    get_structure((',')/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure((',')/2,2),
    unify_variable(x(2)),
    unify_variable(y(2)),
    cut(x(3)),
    put_value(y(1),1),
    call(distrib_module_qualif/3),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    deallocate,
    execute(distrib_module_qualif/3),

label(8),
    retry_me_else(10),

label(9),
    allocate(3),
    get_structure((:)/2,0),
    unify_variable(y(0)),
    unify_variable(y(1)),
    get_variable(y(2),2),
    cut(x(3)),
    put_value(y(0),0),
    put_atom(true,1),
    call(check_module_name/2),
    put_value(y(1),0),
    put_value(y(0),1),
    put_value(y(2),2),
    deallocate,
    execute(distrib_module_qualif/3),

label(10),
    trust_me_else_fail,

label(11),
    get_atom(!,0),
    get_atom(!,2),
    cut(x(3)),
    proceed,

label(12),
    trust_me_else_fail,
    get_structure((:)/2,2),
    unify_local_value(x(1)),
    unify_local_value(x(0)),
    proceed]).


predicate(distrib_module_qualif_goal/3,174,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_value(x(2),0),
    call_c('Pl_Blt_Non_Var',[fast_call,boolean],[x(2)]),
    get_structure((:)/2,2),
    unify_variable(x(0)),
    unify_void(1),
    cut(x(3)),
    put_atom(true,1),
    execute(check_module_name/2),

label(1),
    trust_me_else_fail,
    get_structure((:)/2,2),
    unify_local_value(x(1)),
    unify_local_value(x(0)),
    proceed]).


predicate(normalize_alts/3,184,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    allocate(1),
    get_variable(y(0),3),
    put_variable(x(5),3),
    put_variable(x(4),6),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(1),x(3),x(6)]),
    put_atom(head_functor,3),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(3),x(5)]),
    put_atom(head_arity,3),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(3),x(4)]),
    call(normalize_alts1/3),
    cut(y(0)),
    deallocate,
    proceed]).


predicate(normalize_alts1/3,191,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_structure(call/1,2),
    unify_local_value(x(0)),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    proceed,

label(1),
    retry_me_else(7),
    switch_on_term(3,fail,fail,fail,2),

label(2),
    switch_on_structure([((',')/2,4),((;)/2,6)]),

label(3),
    try_me_else(5),

label(4),
    allocate(4),
    get_structure((',')/2,0),
    unify_variable(y(0)),
    unify_variable(y(1)),
    get_variable(y(2),1),
    get_structure((',')/2,2),
    unify_variable(x(2)),
    unify_variable(y(3)),
    put_value(y(0),0),
    put_structure((',')/2,1),
    unify_local_value(y(2)),
    unify_value(y(1)),
    call(normalize_alts1/3),
    put_value(y(1),0),
    put_structure((',')/2,1),
    unify_local_value(y(2)),
    unify_value(y(0)),
    put_value(y(3),2),
    deallocate,
    execute(normalize_alts1/3),

label(5),
    trust_me_else_fail,

label(6),
    allocate(9),
    get_structure((;)/2,0),
    unify_variable(y(0)),
    unify_variable(y(1)),
    get_variable(y(2),2),
    put_value(x(1),0),
    put_nil(1),
    put_variable(y(3),2),
    call(lst_var/3),
    put_structure((;)/2,0),
    unify_value(y(0)),
    unify_value(y(1)),
    put_nil(1),
    put_variable(y(4),2),
    call(lst_var/3),
    put_value(y(4),0),
    put_value(y(3),1),
    put_variable(y(5),2),
    call(set_inter/3),
    put_value(y(5),0),
    put_variable(y(6),1),
    call(length/2),
    put_atom(head_functor,1),
    put_variable(x(0),2),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(1),x(2)]),
    put_atom(head_arity,2),
    put_variable(x(1),3),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(2),x(3)]),
    put_variable(y(7),2),
    put_value(y(6),3),
    call(init_aux_pred_name/4),
    put_value(y(2),0),
    put_list(1),
    unify_local_value(y(7)),
    unify_local_value(y(5)),
    call_c('Pl_Blt_Univ',[fast_call,boolean],[x(0),x(1)]),
    put_atom(where,0),
    put_variable(x(2),1),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(1)]),
    put_structure((;)/2,0),
    unify_value(y(0)),
    unify_value(y(1)),
    put_value(y(2),1),
    put_variable(y(8),3),
    call(linearize/4),
    put_structure(buff_aux_pred/3,0),
    unify_local_value(y(7)),
    unify_local_value(y(6)),
    unify_local_value(y(8)),
    deallocate,
    execute(asserta/1),

label(7),
    trust_me_else_fail,
    allocate(1),
    get_variable(y(0),3),
    put_value(x(2),1),
    call(pred_rewriting/2),
    cut(y(0)),
    deallocate,
    proceed]).


predicate(init_aux_pred_name/4,217,static,private,monofile,global,[
    pragma_arity(5),
    get_current_choice(x(4)),
    allocate(5),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(3),3),
    get_variable(y(4),4),
    put_atom(aux,0),
    put_variable(x(2),1),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(1)]),
    math_fast_load_value(x(2),0),
    call_c('Pl_Fct_Fast_Inc',[fast_call,x(1)],[x(0)]),
    put_atom(aux,0),
    call_c('Pl_Blt_G_Assign',[fast_call],[x(0),x(1)]),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),3),
    call('$make_aux_name'/4),
    put_value(y(0),0),
    put_value(y(1),1),
    put_value(y(2),2),
    put_value(y(3),3),
    call('$init_aux_pred_name/4_$aux1'/4),
    cut(y(4)),
    deallocate,
    proceed]).


predicate('$init_aux_pred_name/4_$aux1'/4,217,static,private,monofile,local,[
    try_me_else(1),
    allocate(2),
    get_variable(y(0),2),
    get_variable(y(1),3),
    get_variable(x(2),1),
    put_value(x(0),1),
    put_atom(bpl,0),
    call(test_pred_info/3),
    put_atom(bpl,0),
    put_value(y(0),1),
    put_value(y(1),2),
    deallocate,
    execute(set_pred_info/3),

label(1),
    retry_me_else(2),
    allocate(2),
    get_variable(y(0),2),
    get_variable(y(1),3),
    get_variable(x(2),1),
    put_value(x(0),1),
    put_atom(bfd,0),
    call(test_pred_info/3),
    put_atom(bfd,0),
    put_value(y(0),1),
    put_value(y(1),2),
    deallocate,
    execute(set_pred_info/3),

label(2),
    trust_me_else_fail,
    proceed]).


predicate(linearize/4,232,static,private,monofile,global,[
    execute('$linearize/4_$aux1'/4)]).


predicate('$linearize/4_$aux1'/4,232,static,private,monofile,local,[
    pragma_arity(5),
    get_current_choice(x(4)),
    try_me_else(1),
    allocate(6),
    get_variable(y(0),1),
    get_variable(y(1),2),
    get_variable(y(2),3),
    get_structure((;)/2,0),
    unify_variable(y(3)),
    unify_variable(x(0)),
    cut(x(4)),
    put_value(y(0),1),
    put_value(y(1),2),
    put_variable(y(4),3),
    call(linearize/4),
    put_value(y(3),0),
    put_value(y(0),1),
    put_value(y(1),2),
    put_variable(y(5),3),
    call(linearize1/4),
    put_unsafe_value(y(5),0),
    put_unsafe_value(y(4),1),
    put_value(y(2),2),
    deallocate,
    execute(append/3),

label(1),
    trust_me_else_fail,
    execute(linearize1/4)]).


predicate(linearize1/4,241,static,private,monofile,global,[
    pragma_arity(5),
    get_current_choice(x(4)),
    try_me_else(1),
    get_atom(fail,0),
    get_nil(3),
    cut(x(4)),
    proceed,

label(1),
    trust_me_else_fail,
    get_variable(x(5),1),
    get_variable(x(4),0),
    get_list(3),
    unify_variable(x(0)),
    unify_nil,
    get_structure((+)/2,0),
    unify_local_value(x(2)),
    unify_variable(x(1)),
    put_structure((:-)/2,0),
    unify_local_value(x(5)),
    unify_local_value(x(4)),
    execute(copy_term/2)]).


predicate(lst_var/3,250,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_variable(x(4),1),
    get_variable(x(1),0),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(1)]),
    cut(x(3)),
    put_value(x(4),0),
    execute(set_add/3),

label(1),
    trust_me_else_fail,
    get_variable(x(4),2),
    get_variable(x(3),1),
    put_void(2),
    put_variable(x(1),5),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(0),x(2),x(5)]),
    put_value(x(0),2),
    put_integer(1,0),
    execute(lst_var_args/5)]).


predicate(lst_var_args/5,260,static,private,monofile,global,[
    execute('$lst_var_args/5_$aux1'/5)]).


predicate('$lst_var_args/5_$aux1'/5,260,static,private,monofile,local,[
    pragma_arity(6),
    get_current_choice(x(5)),
    try_me_else(1),
    allocate(5),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(3),4),
    math_fast_load_value(y(0),0),
    math_fast_load_value(y(1),1),
    call_c('Pl_Blt_Fast_Lte',[fast_call,boolean],[x(0),x(1)]),
    cut(x(5)),
    put_value(y(0),1),
    put_value(y(2),2),
    put_variable(x(0),4),
    call_c('Pl_Blt_Arg',[fast_call,boolean],[x(1),x(2),x(4)]),
    put_value(x(3),1),
    put_variable(y(4),2),
    call(lst_var/3),
    math_fast_load_value(y(0),0),
    call_c('Pl_Fct_Fast_Inc',[fast_call,x(0)],[x(0)]),
    put_value(y(1),1),
    put_value(y(2),2),
    put_unsafe_value(y(4),3),
    put_value(y(3),4),
    deallocate,
    execute(lst_var_args/5),

label(1),
    trust_me_else_fail,
    get_value(x(3),4),
    proceed]).


predicate(pred_rewriting/2,274,static,private,monofile,global,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(6),
    switch_on_term(2,fail,fail,fail,1),

label(1),
    switch_on_structure([(fd_tell/1,3),(set_bip_name/2,5)]),

label(2),
    try_me_else(4),

label(3),
    allocate(2),
    get_structure(fd_tell/1,0),
    unify_variable(y(0)),
    get_variable(y(1),1),
    put_structure((/)/2,0),
    unify_atom(fd_tell),
    unify_integer(1),
    call(test_c_call_allowed/1),
    put_structure('$call_c'/2,0),
    unify_value(y(0)),
    unify_list,
    unify_atom(boolean),
    unify_nil,
    put_value(y(1),1),
    deallocate,
    execute(pred_rewriting/2),

label(4),
    trust_me_else_fail,

label(5),
    allocate(2),
    get_variable(y(0),1),
    get_structure(set_bip_name/2,0),
    unify_variable(x(0)),
    unify_variable(x(1)),
    put_atom(inline,2),
    put_atom(t,3),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(2),x(3)]),
    put_variable(y(1),2),
    call('$pred_rewriting/2_$aux1'/3),
    put_unsafe_value(y(1),0),
    put_value(y(0),1),
    deallocate,
    execute(pred_rewriting/2),

label(6),
    retry_me_else(7),
    allocate(4),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_atom(inline,0),
    put_atom(t,1),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(1)]),
    put_atom(fast_math,0),
    put_atom(f,1),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(1)]),
    put_value(y(0),0),
    put_variable(y(2),1),
    put_integer(2,2),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(0),x(1),x(2)]),
    put_value(y(2),0),
    call('$pred_rewriting/2_$aux2'/1),
    put_structure(set_bip_name/2,0),
    unify_local_value(y(2)),
    unify_integer(2),
    put_variable(y(3),1),
    call(pred_rewriting/2),
    put_value(y(1),0),
    get_structure((',')/2,0),
    unify_local_value(y(3)),
    unify_local_value(y(0)),
    deallocate,
    proceed,

label(7),
    retry_me_else(21),
    switch_on_term(9,fail,fail,fail,8),

label(8),
    switch_on_structure([(term_hash/2,10),(term_hash/4,12),('$call_c'/2,14),('$call_c'/1,16),('$call_c_test'/1,18),('$call_c_jump'/1,20)]),

label(9),
    try_me_else(11),

label(10),
    allocate(6),
    get_variable(y(1),1),
    get_structure(term_hash/2,0),
    unify_variable(x(1)),
    unify_variable(y(0)),
    get_variable(y(2),2),
    put_atom(inline,0),
    put_atom(t,2),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(2)]),
    put_structure(term_hash/2,0),
    unify_value(x(1)),
    unify_variable(y(3)),
    put_void(1),
    put_atom(fail,2),
    put_atom(pred_rewriting,3),
    put_integer(2,4),
    put_atom(true,5),
    call('$catch'/6),
    put_value(y(3),0),
    call_c('Pl_Blt_Integer',[fast_call,boolean],[x(0)]),
    cut(y(2)),
    put_structure(set_bip_name/2,0),
    unify_atom(term_hash),
    unify_integer(2),
    put_variable(y(4),1),
    call(pred_rewriting/2),
    put_structure('Pl_Un_Integer_Check'/2,1),
    unify_value(y(3)),
    unify_value(y(0)),
    put_structure('$call_c'/2,0),
    unify_value(x(1)),
    unify_list,
    unify_atom(boolean),
    unify_nil,
    put_variable(y(5),1),
    call(pred_rewriting/2),
    put_value(y(1),0),
    get_structure((',')/2,0),
    unify_local_value(y(4)),
    unify_local_value(y(5)),
    deallocate,
    proceed,

label(11),
    retry_me_else(13),

label(12),
    allocate(6),
    get_variable(y(1),1),
    get_structure(term_hash/4,0),
    unify_variable(x(4)),
    unify_variable(x(3)),
    unify_variable(x(1)),
    unify_variable(y(0)),
    get_variable(y(2),2),
    put_atom(inline,0),
    put_atom(t,2),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(2)]),
    put_structure(term_hash/4,0),
    unify_value(x(4)),
    unify_value(x(3)),
    unify_value(x(1)),
    unify_variable(y(3)),
    put_void(1),
    put_atom(fail,2),
    put_atom(pred_rewriting,3),
    put_integer(2,4),
    put_atom(true,5),
    call('$catch'/6),
    put_value(y(3),0),
    call_c('Pl_Blt_Integer',[fast_call,boolean],[x(0)]),
    cut(y(2)),
    put_structure(set_bip_name/2,0),
    unify_atom(term_hash),
    unify_integer(4),
    put_variable(y(4),1),
    call(pred_rewriting/2),
    put_structure('Pl_Un_Integer_Check'/2,1),
    unify_value(y(3)),
    unify_value(y(0)),
    put_structure('$call_c'/2,0),
    unify_value(x(1)),
    unify_list,
    unify_atom(boolean),
    unify_list,
    unify_atom(by_value),
    unify_nil,
    put_variable(y(5),1),
    call(pred_rewriting/2),
    put_value(y(1),0),
    get_structure((',')/2,0),
    unify_local_value(y(4)),
    unify_local_value(y(5)),
    deallocate,
    proceed,

label(13),
    retry_me_else(15),

label(14),
    allocate(2),
    get_structure('$call_c'/2,0),
    unify_variable(x(0)),
    unify_variable(y(0)),
    get_structure('$call_c'/2,1),
    unify_value(x(0)),
    unify_variable(y(1)),
    put_structure((/)/2,0),
    unify_atom('$call_c'),
    unify_integer(2),
    call(test_c_call_allowed/1),
    put_value(y(0),0),
    put_value(y(1),1),
    deallocate,
    execute(no_internal_transf/2),

label(15),
    retry_me_else(17),

label(16),
    allocate(2),
    get_structure('$call_c'/1,0),
    unify_variable(y(0)),
    get_variable(y(1),1),
    put_structure((/)/2,0),
    unify_atom('$call_c'),
    unify_integer(1),
    call(test_c_call_allowed/1),
    put_structure('$call_c'/2,0),
    unify_value(y(0)),
    unify_nil,
    put_value(y(1),1),
    deallocate,
    execute(pred_rewriting/2),

label(17),
    retry_me_else(19),

label(18),
    allocate(2),
    get_structure('$call_c_test'/1,0),
    unify_variable(y(0)),
    get_variable(y(1),1),
    put_structure((/)/2,0),
    unify_atom('$call_c_test'),
    unify_integer(1),
    call(test_c_call_allowed/1),
    put_structure('$call_c'/2,0),
    unify_value(y(0)),
    unify_list,
    unify_atom(boolean),
    unify_nil,
    put_value(y(1),1),
    deallocate,
    execute(pred_rewriting/2),

label(19),
    trust_me_else_fail,

label(20),
    allocate(2),
    get_structure('$call_c_jump'/1,0),
    unify_variable(y(0)),
    get_variable(y(1),1),
    put_structure((/)/2,0),
    unify_atom('$call_c_jump'),
    unify_integer(1),
    call(test_c_call_allowed/1),
    put_structure('$call_c'/2,0),
    unify_value(y(0)),
    unify_list,
    unify_atom(jump),
    unify_nil,
    put_value(y(1),1),
    deallocate,
    execute(pred_rewriting/2),

label(21),
    trust_me_else_fail,
    get_value(x(1),0),
    proceed]).


predicate('$pred_rewriting/2_$aux2'/1,287,static,private,monofile,local,[
    try_me_else(1),
    get_atom(is,0),
    proceed,

label(1),
    trust_me_else_fail,
    put_void(1),
    execute(math_cmp_functor_name/2)]).


predicate('$pred_rewriting/2_$aux1'/3,278,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    call_c('Pl_Blt_Atom',[fast_call,boolean],[x(0)]),
    call_c('Pl_Blt_Integer',[fast_call,boolean],[x(1)]),
    cut(x(3)),
    get_structure('$call_c'/2,2),
    unify_variable(x(2)),
    unify_list,
    unify_atom(by_value),
    unify_nil,
    get_structure('Pl_Set_Bip_Name_Untagged_2'/2,2),
    unify_local_value(x(0)),
    unify_local_value(x(1)),
    proceed,

label(1),
    trust_me_else_fail,
    get_structure('$call_c'/1,2),
    unify_structure('Pl_Set_Bip_Name_2'/2),
    unify_local_value(x(0)),
    unify_local_value(x(1)),
    proceed]).


predicate(test_c_call_allowed/1,347,static,private,monofile,global,[
    pragma_arity(2),
    get_current_choice(x(1)),
    try_me_else(1),
    put_atom(call_c,0),
    put_atom(t,2),
    call_c('Pl_Blt_G_Read',[fast_call,boolean],[x(0),x(2)]),
    cut(x(1)),
    proceed,

label(1),
    trust_me_else_fail,
    put_list(1),
    unify_local_value(x(0)),
    unify_nil,
    put_atom('~q not allowed in this mode',0),
    execute(error/2)]).


predicate(not_dangerous_c_call/1,357,static,private,monofile,global,[
    switch_on_term(1,2,fail,4,fail),

label(1),
    try_me_else(3),

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

label(3),
    trust_me_else_fail,

label(4),
    get_list(0),
    unify_variable(x(1)),
    unify_variable(x(0)),
    put_atom(jump,2),
    call_c('Pl_Blt_Term_Neq',[fast_call,boolean],[x(1),x(2)]),
    put_atom(use_x_regs,2),
    call_c('Pl_Blt_Term_Neq',[fast_call,boolean],[x(1),x(2)]),
    execute(not_dangerous_c_call/1)]).


predicate(add_wrapper_to_dyn_clause/4,367,static,private,monofile,global,[
    allocate(5),
    get_variable(y(0),1),
    get_structure((+)/2,2),
    unify_variable(y(1)),
    unify_variable(y(2)),
    get_variable(y(3),3),
    put_value(y(0),1),
    put_value(y(3),2),
    put_value(y(0),3),
    call(init_aux_pred_name/4),
    put_value(y(2),0),
    put_value(y(3),1),
    put_variable(y(4),2),
    call('$add_wrapper_to_dyn_clause/4_$aux1'/3),
    put_structure((+)/2,1),
    unify_value(y(1)),
    unify_local_value(y(4)),
    put_structure(buff_aux_pred/3,0),
    unify_local_value(y(3)),
    unify_local_value(y(0)),
    unify_list,
    unify_value(x(1)),
    unify_nil,
    deallocate,
    execute(assertz/1)]).


predicate('$add_wrapper_to_dyn_clause/4_$aux1'/3,367,static,private,monofile,local,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    allocate(3),
    get_variable(y(0),2),
    get_structure((:-)/2,0),
    unify_variable(x(0)),
    unify_variable(y(1)),
    cut(x(3)),
    put_variable(y(2),2),
    call(head_wrapper/3),
    put_value(y(0),0),
    get_structure((:-)/2,0),
    unify_local_value(y(2)),
    unify_value(y(1)),
    deallocate,
    proceed,

label(1),
    trust_me_else_fail,
    execute(head_wrapper/3)]).


predicate(head_wrapper/3,377,static,private,monofile,global,[
    put_list(4),
    unify_void(1),
    unify_variable(x(3)),
    call_c('Pl_Blt_Univ',[fast_call,boolean],[x(0),x(4)]),
    put_list(0),
    unify_local_value(x(1)),
    unify_value(x(3)),
    call_c('Pl_Blt_Univ',[fast_call,boolean],[x(2),x(0)]),
    proceed]).


predicate(meta_pred_rewriting/2,385,static,private,monofile,global,[
    pragma_arity(3),
    get_current_choice(x(2)),
    try_me_else(1),
    allocate(6),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    put_value(y(0),0),
    call_c('Pl_Blt_Non_Var',[fast_call,boolean],[x(0)]),
    put_value(y(0),0),
    put_variable(y(3),1),
    put_variable(y(4),2),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(0),x(1),x(2)]),
    put_structure(meta_pred/3,0),
    unify_local_value(y(3)),
    unify_local_value(y(4)),
    unify_variable(y(5)),
    put_void(1),
    call(clause/2),
    cut(y(2)),
    put_value(y(1),0),
    put_unsafe_value(y(3),1),
    put_unsafe_value(y(4),2),
    call_c('Pl_Blt_Functor',[fast_call,boolean],[x(0),x(1),x(2)]),
    put_integer(1,0),
    put_unsafe_value(y(4),1),
    put_value(y(0),2),
    put_value(y(5),3),
    put_value(y(1),4),
    deallocate,
    execute(meta_pred_rewrite_args/5),

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


predicate(meta_pred_rewrite_args/5,397,static,private,monofile,global,[
    pragma_arity(6),
    get_current_choice(x(5)),
    try_me_else(1),
    allocate(5),
    get_variable(y(0),0),
    get_variable(y(1),1),
    get_variable(y(2),2),
    get_variable(y(3),3),
    get_variable(y(4),4),
    math_fast_load_value(y(0),0),
    math_fast_load_value(y(1),1),
    call_c('Pl_Blt_Fast_Lte',[fast_call,boolean],[x(0),x(1)]),
    cut(x(5)),
    put_value(y(0),0),
    put_value(y(2),2),
    put_variable(x(1),3),
    call_c('Pl_Blt_Arg',[fast_call,boolean],[x(0),x(2),x(3)]),
    put_value(y(0),0),
    put_value(y(4),3),
    put_variable(x(2),4),
    call_c('Pl_Blt_Arg',[fast_call,boolean],[x(0),x(3),x(4)]),
    put_value(y(0),3),
    put_value(y(3),4),
    put_variable(x(0),5),
    call_c('Pl_Blt_Arg',[fast_call,boolean],[x(3),x(4),x(5)]),
    call(meta_pred_rewrite_arg/3),
    math_fast_load_value(y(0),0),
    call_c('Pl_Fct_Fast_Inc',[fast_call,x(0)],[x(0)]),
    put_value(y(1),1),
    put_value(y(2),2),
    put_value(y(3),3),
    put_value(y(4),4),
    deallocate,
    execute(meta_pred_rewrite_args/5),

label(1),
    trust_me_else_fail,
    proceed]).


predicate(meta_pred_rewrite_arg/3,411,static,private,monofile,global,[
    pragma_arity(4),
    get_current_choice(x(3)),
    try_me_else(1),
    get_value(x(2),1),
    call_c('Pl_Blt_Var',[fast_call,boolean],[x(0)]),
    cut(x(3)),
    proceed,

label(1),
    retry_me_else(2),
    get_atom(:,0),
    cut(x(3)),
    put_integer(0,0),
    execute(meta_pred_rewrite_arg/3),

label(2),
    retry_me_else(3),
    get_variable(x(4),0),
    get_structure('$mt'/2,2),
    unify_variable(x(0)),
    unify_local_value(x(1)),
    call_c('Pl_Blt_Integer',[fast_call,boolean],[x(4)]),
    cut(x(3)),
    execute(get_module_of_cur_pred/1),

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