home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sa104os2.zip
/
SATHR104.ZIP
/
SATHER
/
BOOT
/
CS.COD
/
CODE5.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-15
|
290KB
|
10,241 lines
/* C code generated by Sather 1.0 compiler */
#include "sather.h"
#include "strings.h"
BOOL TRANS_is_array_s(TRANS self, SIG s_6017) {
BOOL noname6018 = ((BOOL) 0);
TP stp;
BOOL local0;
INT local1;
BOOL local2;
if ((s_6017==((SIG) NULL))) {
return FALSE;
}
stp = s_6017->tp;
if (stp==NULL) {
} else
switch (stp->header.tag) {
case TP_CLASS_tag:
if (IDENT_is_neq_IDE(((TP_CLASS) stp)->name_19, self->prog->ident_builtin->AREF_ident)) {
local0 = IDENT_is_neq_IDE(((TP_CLASS) stp)->name_19, self->prog->ident_builtin->AVAL_ident);
} else {
local0 = FALSE;
}
if (local0) {
return FALSE;
}
if ((((TP_CLASS) stp)->params==((ARRAYTP) NULL))) {
return FALSE;
}
local1 = ARRAYTP_size_INT(((TP_CLASS) stp)->params);
if ((local1!=1)) {
return FALSE;
}
if (IDENT_is_neq_IDE(s_6017->name_19, self->prog->ident_builtin->aget_ident)) {
local2 = IDENT_is_neq_IDE(s_6017->name_19, self->prog->ident_builtin->aset_ident);
} else {
local2 = FALSE;
}
if (local2) {
return FALSE;
}
return TRUE; break;
default: ;
}
return FALSE;
}
AM_ARR_EXPR AM_ARR_EXPR_crea(AM_ARR_EXPR self, SFILE_ID source_6019) {
AM_ARR_EXPR noname6020;
AM_ARR_EXPR r_6021;
AM_ARR_EXPR local0;
local0 = ((AM_ARR_EXPR) sbi_alloc(sizeof(struct AM_ARR_EXPR_struct), AM_ARR_EXPR_tag));
r_6021 = local0;
r_6021->source_38 = source_6019;
return r_6021;
}
AM_VARR_ASSIGN_EXPR AM_VARR_ASSIGN_E_6022(AM_VARR_ASSIGN_EXPR self, SFILE_ID source_6023) {
AM_VARR_ASSIGN_EXPR noname6024;
AM_VARR_ASSIGN_EXPR r_6025;
AM_VARR_ASSIGN_EXPR local0;
local0 = ((AM_VARR_ASSIGN_EXPR) sbi_alloc(sizeof(struct AM_VARR_ASSIGN_EXPR_struct), AM_VARR_ASSIGN_EXPR_tag));
r_6025 = local0;
r_6025->source_38 = source_6023;
return r_6025;
}
AM_STMT TRANS_transform__6026(TRANS self, ELT e_6027) {
AM_STMT noname6028;
TP est;
TP_CLASS stp = ((TP_CLASS) NULL);
AM_RETURN_STMT r_6029;
AM_ARR_EXPR aae;
AM_ASSIGN_STMT r_6030;
AM_ARR_EXPR aae_6031;
AM_RETURN_STMT r_6032;
AM_ARR_EXPR aae_6033;
AM_RETURN_STMT r_6034;
AM_VARR_ASSIGN_EXPR avae;
AM_RETURN_STMT local0;
TR_CLASS_ELT local1;
AM_ARR_EXPR local2;
TR_CLASS_ELT local3;
AM_ASSIGN_STMT local4;
TR_CLASS_ELT local5;
AM_ARR_EXPR local6;
TR_CLASS_ELT local7;
AM_RETURN_STMT local8;
TR_CLASS_ELT local9;
AM_ARR_EXPR local10;
TR_CLASS_ELT local11;
AM_RETURN_STMT local12;
TR_CLASS_ELT local13;
AM_VARR_ASSIGN_EXPR local14;
TR_CLASS_ELT local15;
est = e_6027->srcsig->tp;
if (est==NULL) {
} else
switch (est->header.tag) {
case TP_CLASS_tag:
stp = ((TP_CLASS) est); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./trans.sa:337:14\n");
exit(16);
}
if (IDENT_is_eq_IDEN(stp->name_19, self->prog->ident_builtin->AREF_ident)) {
if (IDENT_is_eq_IDEN(e_6027->srcsig->name_19, self->prog->ident_builtin->aget_ident)) {
local0 = ((AM_RETURN_STMT) NULL);
local1 = e_6027->tr;
r_6029 = AM_RETURN_STMT_c(local0, (*TR_CLASS_ELT_sou[local1->header.tag+TR_CLASS_ELT_sou_offset])(local1));
local2 = ((AM_ARR_EXPR) NULL);
local3 = e_6027->tr;
aae = AM_ARR_EXPR_crea(local2, (*TR_CLASS_ELT_sou[local3->header.tag+TR_CLASS_ELT_sou_offset])(local3));
aae->ob = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 0));
aae->ind = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 1));
aae->tp_at = ARRAYTP_aget_INT_TP(stp->params, 0);
r_6029->val_16 = ((AM_EXPR) aae);
return ((AM_STMT) r_6029);
}
else {
local4 = ((AM_ASSIGN_STMT) NULL);
local5 = e_6027->tr;
r_6030 = AM_ASSIGN_STMT_c(local4, (*TR_CLASS_ELT_sou[local5->header.tag+TR_CLASS_ELT_sou_offset])(local5));
local6 = ((AM_ARR_EXPR) NULL);
local7 = e_6027->tr;
aae_6031 = AM_ARR_EXPR_crea(local6, (*TR_CLASS_ELT_sou[local7->header.tag+TR_CLASS_ELT_sou_offset])(local7));
aae_6031->ob = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 0));
aae_6031->ind = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 1));
aae_6031->tp_at = ARRAYTP_aget_INT_TP(stp->params, 0);
r_6030->dest = ((AM_EXPR) aae_6031);
r_6030->src_42 = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 2));
return ((AM_STMT) r_6030);
}
}
if (IDENT_is_eq_IDEN(e_6027->srcsig->name_19, self->prog->ident_builtin->aget_ident)) {
local8 = ((AM_RETURN_STMT) NULL);
local9 = e_6027->tr;
r_6032 = AM_RETURN_STMT_c(local8, (*TR_CLASS_ELT_sou[local9->header.tag+TR_CLASS_ELT_sou_offset])(local9));
local10 = ((AM_ARR_EXPR) NULL);
local11 = e_6027->tr;
aae_6033 = AM_ARR_EXPR_crea(local10, (*TR_CLASS_ELT_sou[local11->header.tag+TR_CLASS_ELT_sou_offset])(local11));
aae_6033->ob = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 0));
aae_6033->ind = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 1));
aae_6033->tp_at = ARRAYTP_aget_INT_TP(stp->params, 0);
r_6032->val_16 = ((AM_EXPR) aae_6033);
return ((AM_STMT) r_6032);
}
local12 = ((AM_RETURN_STMT) NULL);
local13 = e_6027->tr;
r_6034 = AM_RETURN_STMT_c(local12, (*TR_CLASS_ELT_sou[local13->header.tag+TR_CLASS_ELT_sou_offset])(local13));
local14 = ((AM_VARR_ASSIGN_EXPR) NULL);
local15 = e_6027->tr;
avae = AM_VARR_ASSIGN_E_6022(local14, (*TR_CLASS_ELT_sou[local15->header.tag+TR_CLASS_ELT_sou_offset])(local15));
avae->ob = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 0));
avae->ind = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 1));
avae->val_16 = ((AM_EXPR) AM_ROUT_DEF_aget(self->cur_rout, 2));
r_6034->val_16 = ((AM_EXPR) avae);
return ((AM_STMT) r_6034);
}
AM_STMT TRANS_transform__6035(TRANS self, TR_DEC_STMT s_6036) {
AM_STMT noname6037;
AM_LOCAL_EXPR l;
PROG local0;
STR local1;
STR local2;
TP local3;
STR local4;
AM_LOCAL_EXPR local5;
SFILE_ID local6;
IDENT local7;
l = TRANS_local_with(self, s_6036->name_19);
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6036));
if ((!((l==((AM_LOCAL_EXPR) NULL))))) {
local0 = self->prog;
local1 = STR_plus_STR_STR(((STR) &Thislocalvariabl), l->name_19.str_4);
local2 = STR_plus_STR_STR(local1, ((STR) &name_6038));
local3 = l->tp_at;
local4 = STR_plus_STR_STR(local2, (*TP_str_STR[local3->header.tag+TP_str_STR_offset])(local3));
PROG_err_STR(local0, STR_plus_STR_STR(local4, ((STR) &whichhasthesamename)));
return ((AM_STMT) NULL);
}
local5 = ((AM_LOCAL_EXPR) NULL);
local6 = s_6036->source_38;
local7 = s_6036->name_19;
l = AM_LOCAL_EXPR_cr(local5, local6, local7, TRANS_tp_of_TR_T(self, s_6036->tp));
l->needs_init = TRUE;
TRANS_add_local_(self, l);
return ((AM_STMT) NULL);
}
AM_STMT TRANS_transform__6039(TRANS self, TR_ASSIGN_STMT s_6040) {
AM_STMT noname6041;
AM_LOCAL_EXPR l;
AM_ASSIGN_STMT r_6042 = ((AM_ASSIGN_STMT) NULL);
TR_EXPR rhs_6043;
BOOL local0;
PROG local1;
STR local2;
STR local3;
TP local4;
STR local5;
AM_EXPR local6;
if ((s_6040==((TR_ASSIGN_STMT) NULL))) {
local0 = TRUE;
} else {
local0 = (s_6040->lhs_expr==((TR_EXPR) NULL));
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ./trans.sa:477:28\n");
exit(16);
}
if ((s_6040==((TR_ASSIGN_STMT) NULL))) {
return ((AM_STMT) NULL);
}
l = TRANS_local_with(self, s_6040->name_19);
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6040));
if ((!((l==((AM_LOCAL_EXPR) NULL))))) {
local1 = self->prog;
local2 = STR_plus_STR_STR(((STR) &Thislocalvariabl_6044), l->name_19.str_4);
local3 = STR_plus_STR_STR(local2, ((STR) &name_6045));
local4 = l->tp_at;
local5 = STR_plus_STR_STR(local3, (*TP_str_STR[local4->header.tag+TP_str_STR_offset])(local4));
PROG_err_STR(local1, STR_plus_STR_STR(local5, ((STR) &whichhasthesamen_6046)));
return ((AM_STMT) NULL);
}
l = AM_LOCAL_EXPR_cr(((AM_LOCAL_EXPR) NULL), s_6040->source_38, s_6040->name_19, ((TP) NULL));
if (self->in_protect_body) {
l->is_volatile = TRUE;
}
if ((!((s_6040->tp==((TR_TYPE_SPEC) NULL))))) {
l->tp_at = TRANS_tp_of_TR_T(self, s_6040->tp);
if ((l->tp_at==((TP) NULL))) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6040));
PROG_err_STR(self->prog, ((STR) &CompilererrorTRA_6047));
return ((AM_STMT) NULL);
}
TRANS_add_local_(self, l);
r_6042 = AM_ASSIGN_STMT_c(((AM_ASSIGN_STMT) NULL), s_6040->source_38);
r_6042->dest = ((AM_EXPR) l);
r_6042->src_42 = TRANS_transform__5198(self, s_6040->rhs, l->tp_at);
if ((r_6042->src_42==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6042);
}
rhs_6043 = s_6040->rhs;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6040->rhs));
if (rhs_6043==NULL) {
} else
switch (rhs_6043->header.tag) {
case TR_VOID_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Therighthandside));
return ((AM_STMT) NULL); break;
case TR_CREATE_EXPR_tag:
if ((((TR_CREATE_EXPR) rhs_6043)->tp==((TR_TYPE_SPEC) NULL))) {
PROG_err_STR(self->prog, ((STR) &Creationexpressi_6048));
return ((AM_STMT) NULL);
} break;
case TR_ARRAY_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Therighthandside_6049));
return ((AM_STMT) NULL); break;
default: ;
}
r_6042 = AM_ASSIGN_STMT_c(((AM_ASSIGN_STMT) NULL), s_6040->source_38);
r_6042->dest = ((AM_EXPR) l);
r_6042->src_42 = TRANS_transform__5198(self, s_6040->rhs, ((TP) NULL));
if ((r_6042->src_42==((AM_EXPR) NULL))) {
l->tp_at = ((TP) self->prog->tp_builtin->dollar_ob);
TRANS_add_local_(self, l);
return ((AM_STMT) NULL);
}
local6 = r_6042->src_42;
l->tp_at = (*AM_EXPR_tp_TP[local6->header.tag+AM_EXPR_tp_TP_offset])(local6);
TRANS_add_local_(self, l);
return ((AM_STMT) r_6042);
}
AM_EXPR_STMT AM_EXPR_STMT_cre(AM_EXPR_STMT self, SFILE_ID source_6050) {
AM_EXPR_STMT noname6051;
AM_EXPR_STMT r_6052;
AM_EXPR_STMT local0;
local0 = ((AM_EXPR_STMT) sbi_alloc(sizeof(struct AM_EXPR_STMT_struct), AM_EXPR_STMT_tag));
r_6052 = local0;
r_6052->source_38 = source_6050;
return r_6052;
}
AM_STMT TRANS_transform__6053(TRANS self, TR_CALL_EXPR l, TR_ASSIGN_STMT s_6054) {
AM_STMT noname6055;
AM_EXPR_STMT r_6056;
TR_EXPR lst;
TR_EXPR local0;
TR_EXPR local1;
TR_EXPR local2;
TR_EXPR local3;
if (!(((l->is_array)==(TRUE)))) {
fprintf(stderr,"Violation of precondition ./trans.sa:524:30\n");
exit(16);
}
r_6056 = AM_EXPR_STMT_cre(((AM_EXPR_STMT) NULL), l->source_38);
l->name_19 = self->prog->ident_builtin->aset_ident;
l->is_array = FALSE;
if ((l->args_7==((TR_EXPR) NULL))) {
l->args_7 = s_6054->rhs;
r_6056->expr = TRANS_transform__5492(self, l, ((TP) NULL), FALSE);
l->args_7 = ((TR_EXPR) NULL);
}
else {
lst = l->args_7;
while (1) {
local0 = lst;
if (((*TR_EXPR_next_TR_EXPR[local0->header.tag+TR_EXPR_next_TR_EXPR_offset])(local0)==((TR_EXPR) NULL))) {
goto after_loop;
}
local1 = lst;
lst = (*TR_EXPR_next_TR_EXPR[local1->header.tag+TR_EXPR_next_TR_EXPR_offset])(local1);
}
after_loop: ;
local2 = lst;
(*TR_EXPR_next_TR__6058[local2->header.tag+TR_EXPR_next_TR__6058_offset])(local2, s_6054->rhs);
r_6056->expr = TRANS_transform__5492(self, l, ((TP) NULL), FALSE);
local3 = lst;
(*TR_EXPR_next_TR__6058[local3->header.tag+TR_EXPR_next_TR__6058_offset])(local3, ((TR_EXPR) NULL));
}
l->name_19 = IDENT_zero;
l->is_array = TRUE;
return ((AM_STMT) r_6056);
}
AM_STMT TRANS_transform__6059(TRANS self, AM_LOCAL_EXPR loc_6060, TR_ASSIGN_STMT s_6061) {
AM_STMT noname6062;
AM_ASSIGN_STMT r_6063;
if (loc_6060->no_assign) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6061));
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass));
return ((AM_STMT) NULL);
}
r_6063 = AM_ASSIGN_STMT_c(((AM_ASSIGN_STMT) NULL), s_6061->source_38);
r_6063->dest = ((AM_EXPR) loc_6060);
if (self->in_protect_body) {
loc_6060->is_volatile = TRUE;
}
r_6063->src_42 = TRANS_transform__5198(self, s_6061->rhs, loc_6060->tp_at);
if ((r_6063->src_42==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6063);
}
AM_STMT TRANS_transform__6064(TRANS self, TR_CALL_EXPR l, TR_ASSIGN_STMT s_6065) {
AM_STMT noname6066;
AM_LOCAL_EXPR loc_6067;
AM_EXPR_STMT r_6068;
BOOL local0;
if (!(((l->is_array)==(FALSE)))) {
fprintf(stderr,"Violation of precondition ./trans.sa:547:29\n");
exit(16);
}
if ((!((l->args_7==((TR_EXPR) NULL))))) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) l));
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6069));
return ((AM_STMT) NULL);
}
if ((l->ob==((TR_EXPR) NULL))) {
local0 = (l->tp==((TR_TYPE_SPEC) NULL));
} else {
local0 = FALSE;
}
if (local0) {
loc_6067 = TRANS_local_with(self, l->name_19);
if ((!((loc_6067==((AM_LOCAL_EXPR) NULL))))) {
return TRANS_transform__6059(self, loc_6067, s_6065);
}
}
l->args_7 = s_6065->rhs;
r_6068 = AM_EXPR_STMT_cre(((AM_EXPR_STMT) NULL), l->source_38);
r_6068->expr = TRANS_transform__5492(self, l, ((TP) NULL), FALSE);
l->args_7 = ((TR_EXPR) NULL);
return ((AM_STMT) r_6068);
}
AM_STMT TRANS_transform__6070(TRANS self, TR_ASSIGN_STMT s_6071) {
AM_STMT noname6072;
TR_EXPR lhs_6073;
if ((s_6071->lhs_expr==((TR_EXPR) NULL))) {
return TRANS_transform__6039(self, s_6071);
}
lhs_6073 = s_6071->lhs_expr;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) lhs_6073));
if (lhs_6073==NULL) {
} else
switch (lhs_6073->header.tag) {
case TR_CALL_EXPR_tag:
if (((TR_CALL_EXPR) lhs_6073)->is_array) {
return TRANS_transform__6053(self, ((TR_CALL_EXPR) lhs_6073), s_6071);
}
else {
return TRANS_transform__6064(self, ((TR_CALL_EXPR) lhs_6073), s_6071);
} break;
case TR_SELF_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6074)); break;
case TR_VOID_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6075)); break;
case TR_IS_VOID_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6076)); break;
case TR_ARRAY_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6077)); break;
case TR_CREATE_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6078)); break;
case TR_BOUND_CREATE_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6079)); break;
case TR_AND_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6080)); break;
case TR_OR_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6081)); break;
case TR_EXCEPT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6082)); break;
case TR_NEW_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6083)); break;
case TR_INITIAL_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6084)); break;
case TR_BREAK_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6085)); break;
case TR_RESULT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6086)); break;
case TR_BOOL_LIT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6087)); break;
case TR_CHAR_LIT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6088)); break;
case TR_STR_LIT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6089)); break;
case TR_INT_LIT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6090)); break;
case TR_FLT_LIT_EXPR_tag:
PROG_err_STR(self->prog, ((STR) &Itisillegaltoass_6091)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./trans.sa:433:14\n");
exit(16);
}
return ((AM_STMT) NULL);
}
AM_IF_STMT AM_IF_STMT_creat(AM_IF_STMT self, SFILE_ID source_6092) {
AM_IF_STMT noname6093;
AM_IF_STMT r_6094;
AM_IF_STMT local0;
local0 = ((AM_IF_STMT) sbi_alloc(sizeof(struct AM_IF_STMT_struct), AM_IF_STMT_tag));
r_6094 = local0;
r_6094->source_38 = source_6092;
return r_6094;
}
AM_STMT TRANS_transform__6095(TRANS self, TR_IF_STMT s_6096) {
AM_STMT noname6097;
AM_IF_STMT r_6098;
r_6098 = AM_IF_STMT_creat(((AM_IF_STMT) NULL), s_6096->source_38);
r_6098->test_40 = TRANS_transform__5198(self, s_6096->test_40, ((TP) self->prog->tp_builtin->bool_2));
if ((r_6098->test_40==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
r_6098->if_true = TRANS_transform__6099(self, s_6096->then_part);
r_6098->if_false = TRANS_transform__6099(self, s_6096->else_part);
return ((AM_STMT) r_6098);
}
AM_LOOP_STMT AM_LOOP_STMT_cre(AM_LOOP_STMT self, SFILE_ID source_6100) {
AM_LOOP_STMT noname6101;
AM_LOOP_STMT r_6102;
AM_LOOP_STMT local0;
local0 = ((AM_LOOP_STMT) sbi_alloc(sizeof(struct AM_LOOP_STMT_struct), AM_LOOP_STMT_tag));
r_6102 = local0;
r_6102->source_38 = source_6100;
return r_6102;
}
AM_STMT TRANS_transform__6103(TRANS self, TR_LOOP_STMT s_6104) {
AM_STMT noname6105;
AM_LOOP_STMT ol;
AM_LOOP_STMT r_6106;
BOOL local0;
BOOL local1;
ol = self->cur_loop;
r_6106 = AM_LOOP_STMT_cre(((AM_LOOP_STMT) NULL), s_6104->source_38);
self->cur_loop = r_6106;
r_6106->body = TRANS_transform__6099(self, s_6104->body);
if ((!((ol==((AM_LOOP_STMT) NULL))))) {
local0 = (!((r_6106==((AM_LOOP_STMT) NULL))));
} else {
local0 = FALSE;
}
if (local0) {
if (ol->has_yield) {
local1 = TRUE;
} else {
local1 = r_6106->has_yield;
}
ol->has_yield = local1;
}
self->cur_loop = ol;
return ((AM_STMT) r_6106);
}
BOOL TRANS_is_iter_BOOL(TRANS self) {
BOOL noname6107 = ((BOOL) 0);
if ((self->cur_rout==((AM_ROUT_DEF) NULL))) {
return FALSE;
}
return AM_ROUT_DEF_is_i(self->cur_rout);
}
void TRANS_return_in_(TRANS self, TR_RETURN_STMT s_6108) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6108));
PROG_err_STR(self->prog, ((STR) &returnstatements));
}
void TRANS_stmts_afte(TRANS self, TR_RETURN_STMT s_6109) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6109));
PROG_err_STR(self->prog, ((STR) &Nostatementsmayf));
}
void TRANS_missing_re(TRANS self, TR_RETURN_STMT s_6110, TP tp_6111) {
PROG local0;
STR local1;
TP local2;
STR local3;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6110));
local0 = self->prog;
local1 = ((STR) &Areturnvalueoftype);
local2 = tp_6111;
local3 = STR_plus_STR_STR(local1, (*TP_str_STR[local2->header.tag+TP_str_STR_offset])(local2));
PROG_err_STR(local0, STR_plus_STR_STR(local3, ((STR) &mustbespecified)));
}
void TRANS_extra_retu(TRANS self, TR_RETURN_STMT s_6112, SIG sig_6113) {
PROG local0;
STR local1;
STR local2;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6112));
local0 = self->prog;
local1 = ((STR) &Noreturnvaluesho);
local2 = STR_plus_STR_STR(local1, SIG_str_STR(sig_6113));
PROG_err_STR(local0, STR_plus_STR_STR(local2, ((STR) &name_6114)));
}
AM_STMT TRANS_transform__6115(TRANS self, TR_RETURN_STMT s_6116) {
AM_STMT noname6117;
TP rtp;
AM_RETURN_STMT r_6118;
if (TRANS_is_iter_BOOL(self)) {
TRANS_return_in_(self, s_6116);
return ((AM_STMT) NULL);
}
if ((!((s_6116->next_8==((TR_STMT) NULL))))) {
TRANS_stmts_afte(self, s_6116);
}
rtp = self->cur_rout->sig_6->ret;
if ((s_6116->val_16==((TR_EXPR) NULL))) {
if ((!((rtp==((TP) NULL))))) {
TRANS_missing_re(self, s_6116, rtp);
return ((AM_STMT) NULL);
}
return ((AM_STMT) AM_RETURN_STMT_c(((AM_RETURN_STMT) NULL), s_6116->source_38));
}
if ((rtp==((TP) NULL))) {
TRANS_extra_retu(self, s_6116, self->cur_rout->sig_6);
return ((AM_STMT) NULL);
}
r_6118 = AM_RETURN_STMT_c(((AM_RETURN_STMT) NULL), s_6116->source_38);
r_6118->val_16 = TRANS_transform__5198(self, s_6116->val_16, rtp);
if ((r_6118->val_16==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6118);
}
void TRANS_yield_in_r(TRANS self, TR_YIELD_STMT s_6119) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6119));
PROG_err_STR(self->prog, ((STR) &yieldstatementsm));
}
void TRANS_missing_yi(TRANS self, TR_YIELD_STMT s_6120, TP tp_6121) {
PROG local0;
STR local1;
TP local2;
STR local3;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6120));
local0 = self->prog;
local1 = ((STR) &Ayieldvalueoftype);
local2 = tp_6121;
local3 = STR_plus_STR_STR(local1, (*TP_str_STR[local2->header.tag+TP_str_STR_offset])(local2));
PROG_err_STR(local0, STR_plus_STR_STR(local3, ((STR) &mustbespecified_6122)));
}
AM_YIELD_STMT AM_YIELD_STMT_cr(AM_YIELD_STMT self, SFILE_ID source_6123) {
AM_YIELD_STMT noname6124;
AM_YIELD_STMT r_6125;
AM_YIELD_STMT local0;
local0 = ((AM_YIELD_STMT) sbi_alloc(sizeof(struct AM_YIELD_STMT_struct), AM_YIELD_STMT_tag));
r_6125 = local0;
r_6125->source_38 = source_6123;
return r_6125;
}
void TRANS_extra_yiel(TRANS self, TR_YIELD_STMT s_6126, SIG sig_6127) {
PROG local0;
STR local1;
STR local2;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6126));
local0 = self->prog;
local1 = ((STR) &Noyieldvalueshou);
local2 = STR_plus_STR_STR(local1, SIG_str_STR(sig_6127));
PROG_err_STR(local0, STR_plus_STR_STR(local2, ((STR) &name_6128)));
}
AM_STMT TRANS_transform__6129(TRANS self, TR_YIELD_STMT s_6130) {
AM_STMT noname6131;
TP rtp;
AM_YIELD_STMT y;
AM_YIELD_STMT r_6132;
if ((!(TRANS_is_iter_BOOL(self)))) {
TRANS_yield_in_r(self, s_6130);
return ((AM_STMT) NULL);
}
rtp = self->cur_rout->sig_6->ret;
if ((s_6130->val_16==((TR_EXPR) NULL))) {
if ((!((rtp==((TP) NULL))))) {
TRANS_missing_yi(self, s_6130, rtp);
return ((AM_STMT) NULL);
}
y = AM_YIELD_STMT_cr(((AM_YIELD_STMT) NULL), s_6130->source_38);
self->cur_yield_ind = (c_INT_plus_INT_INT_chk(self->cur_yield_ind,1));
y->ret = self->cur_yield_ind;
self->cur_rout->num_yields = (c_INT_plus_INT_INT_chk(self->cur_rout->num_yields,1));
if ((!((self->cur_loop==((AM_LOOP_STMT) NULL))))) {
self->cur_loop->has_yield = TRUE;
}
return ((AM_STMT) y);
}
if ((rtp==((TP) NULL))) {
TRANS_extra_yiel(self, s_6130, self->cur_rout->sig_6);
return ((AM_STMT) NULL);
}
r_6132 = AM_YIELD_STMT_cr(((AM_YIELD_STMT) NULL), s_6130->source_38);
r_6132->val_16 = TRANS_transform__5198(self, s_6130->val_16, rtp);
if ((r_6132->val_16==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
self->cur_yield_ind = (c_INT_plus_INT_INT_chk(self->cur_yield_ind,1));
r_6132->ret = self->cur_yield_ind;
self->cur_rout->num_yields = (c_INT_plus_INT_INT_chk(self->cur_rout->num_yields,1));
if ((!((self->cur_loop==((AM_LOOP_STMT) NULL))))) {
self->cur_loop->has_yield = TRUE;
}
return ((AM_STMT) r_6132);
}
void TRANS_quit_in_ro(TRANS self, TR_QUIT_STMT s_6133) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6133));
PROG_err_STR(self->prog, ((STR) &quitstatementsma));
}
void TRANS_stmts_afte_6134(TRANS self, TR_QUIT_STMT s_6135) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6135));
PROG_err_STR(self->prog, ((STR) &Nostatementsmayf_6136));
}
AM_STMT TRANS_transform__6137(TRANS self, TR_QUIT_STMT s_6138) {
AM_STMT noname6139;
if ((!(TRANS_is_iter_BOOL(self)))) {
TRANS_quit_in_ro(self, s_6138);
return ((AM_STMT) NULL);
}
if ((!((s_6138->next_8==((TR_STMT) NULL))))) {
TRANS_stmts_afte_6134(self, s_6138);
}
return ((AM_STMT) AM_RETURN_STMT_c(((AM_RETURN_STMT) NULL), s_6138->source_38));
}
AM_CASE_STMT AM_CASE_STMT_cre(AM_CASE_STMT self, SFILE_ID source_6140) {
AM_CASE_STMT noname6141;
AM_CASE_STMT r_6142;
AM_CASE_STMT local0;
local0 = ((AM_CASE_STMT) sbi_alloc(sizeof(struct AM_CASE_STMT_struct), AM_CASE_STMT_tag));
r_6142 = local0;
r_6142->source_38 = source_6140;
return r_6142;
}
AM_CONST TRANS_const_to_s(TRANS self, AM_EXPR e_6143) {
AM_CONST noname6144;
if ((e_6143==((AM_EXPR) NULL))) {
return ((AM_CONST) NULL);
}
if (e_6143==NULL) {
} else
switch (e_6143->header.tag) {
case AM_CHAR_CONST_tag:
return ((AM_CONST) e_6143); break;
case AM_INT_CONST_tag:
return ((AM_CONST) e_6143); break;
case AM_GLOBAL_EXPR_tag:
return TRANS_const_to_s(self, ((AM_GLOBAL_EXPR) e_6143)->init); break;
default: ;
}
return ((AM_CONST) NULL);
}
BOOL FLISTAM_CONST_is(FLISTAM_CONST self) {
BOOL noname6145 = ((BOOL) 0);
INT local0;
local0 = FLISTAM_CONST_si(self);
return (local0==0);
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTAM_CONST_aclear(FLISTAM_CONST self) {
AM_CONST nil = ((AM_CONST) NULL);
FLISTAM_CONST noname6146;
if (!((!((self==((FLISTAM_CONST) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTAM_CONST_as_6148_frame_struct temp6147_0;
FLISTAM_CONST_as_6148_frame
noname6149 = &temp6147_0;
noname6149->state = 0;
while (1) {
if (noname6149->state == 0) {
noname6146 = self;
noname6149->arg0 = noname6146;
}
noname6149->arg1 = nil;
FLISTAM_CONST_as_6148(noname6149);
if (noname6149->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTAM_CONST_clear(FLISTAM_CONST self) {
if (FLISTAM_CONST_is(self)) {
return;
}
else {
FLISTAM_CONST_aclear(self);
self->loc_17 = 0;
}
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTAM_CONST_ar_6150(FLISTAM_CONST self, INT ind_6151, AM_CONST val_6152) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_CONST) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6151, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_6151<0||ind_6151>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_6151] = val_6152;
}
void FLISTAM_CONST_as_6153(FLISTAM_CONST self, INT ind_6154, AM_CONST val_6155) {
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_CONST) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6154, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTAM_CONST_ar_6150(self, ind_6154, val_6155);
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTAM_CONST FLISTAM_CONST_pu(FLISTAM_CONST self, AM_CONST e_6156) {
FLISTAM_CONST noname6157;
FLISTAM_CONST r_6158 = ((FLISTAM_CONST) NULL);
FLISTAM_CONST noname6159;
FLISTAM_CONST noname6160;
FLISTAM_CONST local0;
INT local1;
FLISTAM_CONST local2;
INT local3;
AM_CONST local4;
INT local5;
if ((self==((FLISTAM_CONST) NULL))) {
local0 = ((FLISTAM_CONST) sbi_arr_alloc(sizeof(struct FLISTAM_CONST_struct), FLISTAM_CONST_tag, sizeof(AM_CONST) , 5));
local0->asize = 5;
r_6158 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_6158 = self;
}
else {
local3 = 2;
local2 = ((FLISTAM_CONST) sbi_arr_alloc(sizeof(struct FLISTAM_CONST_struct), FLISTAM_CONST_tag, sizeof(AM_CONST) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_6158 = local2;
r_6158->loc_17 = self->loc_17;
{
struct FLISTAM_CONST_el_frame_struct temp6161_0;
FLISTAM_CONST_el_frame
noname6162 = &temp6161_0;
struct FLISTAM_CONST_as_6148_frame_struct temp6161_1;
FLISTAM_CONST_as_6148_frame
noname6163 = &temp6161_1;
noname6162->state = 0;
noname6163->state = 0;
while (1) {
if (noname6163->state == 0) {
noname6160 = r_6158;
noname6163->arg0 = noname6160;
}
if (noname6162->state == 0) {
noname6159 = self;
noname6162->arg0 = noname6159;
}
local4 = FLISTAM_CONST_el(noname6162);
if (noname6162->state == -1) goto after_loop;
noname6163->arg1 = local4;
FLISTAM_CONST_as_6148(noname6163);
if (noname6163->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTAM_CONST_clear(self);
}
}
r_6158->loc_17 = (c_INT_plus_INT_INT_chk(r_6158->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_6158->loc_17,1));
FLISTAM_CONST_as_6153(r_6158, local5, e_6156);
return r_6158;
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
BOOL FLISTFLISTAM_CON_6164(FLISTFLISTAM_CONST self) {
BOOL noname6165 = ((BOOL) 0);
INT local0;
local0 = FLISTFLISTAM_CON(self);
return (local0==0);
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTFLISTAM_CON_6166(FLISTFLISTAM_CONST self) {
FLISTAM_CONST nil = ((FLISTAM_CONST) NULL);
FLISTFLISTAM_CONST noname6167;
if (!((!((self==((FLISTFLISTAM_CONST) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTFLISTAM_CON_6169_frame_struct temp6168_0;
FLISTFLISTAM_CON_6169_frame
noname6170 = &temp6168_0;
noname6170->state = 0;
while (1) {
if (noname6170->state == 0) {
noname6167 = self;
noname6170->arg0 = noname6167;
}
noname6170->arg1 = nil;
FLISTFLISTAM_CON_6169(noname6170);
if (noname6170->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTFLISTAM_CON_6171(FLISTFLISTAM_CONST self) {
if (FLISTFLISTAM_CON_6164(self)) {
return;
}
else {
FLISTFLISTAM_CON_6166(self);
self->loc_17 = 0;
}
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTFLISTAM_CON_6172(FLISTFLISTAM_CONST self, INT ind_6173, FLISTAM_CONST val_6174) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTFLISTAM_CONST) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6173, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_6173<0||ind_6173>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_6173] = val_6174;
}
void FLISTFLISTAM_CON_6175(FLISTFLISTAM_CONST self, INT ind_6176, FLISTAM_CONST val_6177) {
BOOL local0;
INT local1;
if ((!((self==((FLISTFLISTAM_CONST) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6176, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTFLISTAM_CON_6172(self, ind_6176, val_6177);
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTFLISTAM_CONST FLISTFLISTAM_CON_6178(FLISTFLISTAM_CONST self, FLISTAM_CONST e_6179) {
FLISTFLISTAM_CONST noname6180;
FLISTFLISTAM_CONST r_6181 = ((FLISTFLISTAM_CONST) NULL);
FLISTFLISTAM_CONST noname6182;
FLISTFLISTAM_CONST noname6183;
FLISTFLISTAM_CONST local0;
INT local1;
FLISTFLISTAM_CONST local2;
INT local3;
FLISTAM_CONST local4;
INT local5;
if ((self==((FLISTFLISTAM_CONST) NULL))) {
local0 = ((FLISTFLISTAM_CONST) sbi_arr_alloc(sizeof(struct FLISTFLISTAM_CONST_struct), FLISTFLISTAM_CONST_tag, sizeof(FLISTAM_CONST) , 5));
local0->asize = 5;
r_6181 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_6181 = self;
}
else {
local3 = 2;
local2 = ((FLISTFLISTAM_CONST) sbi_arr_alloc(sizeof(struct FLISTFLISTAM_CONST_struct), FLISTFLISTAM_CONST_tag, sizeof(FLISTAM_CONST) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_6181 = local2;
r_6181->loc_17 = self->loc_17;
{
struct FLISTFLISTAM_CON_6185_frame_struct temp6184_0;
FLISTFLISTAM_CON_6185_frame
noname6186 = &temp6184_0;
struct FLISTFLISTAM_CON_6169_frame_struct temp6184_1;
FLISTFLISTAM_CON_6169_frame
noname6187 = &temp6184_1;
noname6186->state = 0;
noname6187->state = 0;
while (1) {
if (noname6187->state == 0) {
noname6183 = r_6181;
noname6187->arg0 = noname6183;
}
if (noname6186->state == 0) {
noname6182 = self;
noname6186->arg0 = noname6182;
}
local4 = FLISTFLISTAM_CON_6185(noname6186);
if (noname6186->state == -1) goto after_loop;
noname6187->arg1 = local4;
FLISTFLISTAM_CON_6169(noname6187);
if (noname6187->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTFLISTAM_CON_6171(self);
}
}
r_6181->loc_17 = (c_INT_plus_INT_INT_chk(r_6181->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_6181->loc_17,1));
FLISTFLISTAM_CON_6175(r_6181, local5, e_6179);
return r_6181;
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
INT FLISTAM_STMT_siz(FLISTAM_STMT self) {
INT noname6188 = ((INT) 0);
if ((self==((FLISTAM_STMT) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTAM_STMT_is_(FLISTAM_STMT self) {
BOOL noname6189 = ((BOOL) 0);
INT local0;
local0 = FLISTAM_STMT_siz(self);
return (local0==0);
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTAM_STMT_aclear(FLISTAM_STMT self) {
AM_STMT nil = ((AM_STMT) NULL);
FLISTAM_STMT noname6190;
if (!((!((self==((FLISTAM_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTAM_STMT_ase_frame_struct temp6191_0;
FLISTAM_STMT_ase_frame
noname6192 = &temp6191_0;
noname6192->state = 0;
while (1) {
if (noname6192->state == 0) {
noname6190 = self;
noname6192->arg0 = noname6190;
}
noname6192->arg1 = nil;
FLISTAM_STMT_ase(noname6192);
if (noname6192->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTAM_STMT_clear(FLISTAM_STMT self) {
if (FLISTAM_STMT_is_(self)) {
return;
}
else {
FLISTAM_STMT_aclear(self);
self->loc_17 = 0;
}
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTAM_STMT_are_6193(FLISTAM_STMT self, INT ind_6194, AM_STMT val_6195) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_STMT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6194, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_6194<0||ind_6194>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_6194] = val_6195;
}
void FLISTAM_STMT_ase_6196(FLISTAM_STMT self, INT ind_6197, AM_STMT val_6198) {
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_STMT) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6197, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTAM_STMT_are_6193(self, ind_6197, val_6198);
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTAM_STMT FLISTAM_STMT_pus(FLISTAM_STMT self, AM_STMT e_6199) {
FLISTAM_STMT noname6200;
FLISTAM_STMT r_6201 = ((FLISTAM_STMT) NULL);
FLISTAM_STMT noname6202;
FLISTAM_STMT noname6203;
FLISTAM_STMT local0;
INT local1;
FLISTAM_STMT local2;
INT local3;
AM_STMT local4;
INT local5;
if ((self==((FLISTAM_STMT) NULL))) {
local0 = ((FLISTAM_STMT) sbi_arr_alloc(sizeof(struct FLISTAM_STMT_struct), FLISTAM_STMT_tag, sizeof(AM_STMT) , 5));
local0->asize = 5;
r_6201 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_6201 = self;
}
else {
local3 = 2;
local2 = ((FLISTAM_STMT) sbi_arr_alloc(sizeof(struct FLISTAM_STMT_struct), FLISTAM_STMT_tag, sizeof(AM_STMT) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_6201 = local2;
r_6201->loc_17 = self->loc_17;
{
struct FLISTAM_STMT_elt_frame_struct temp6204_0;
FLISTAM_STMT_elt_frame
noname6205 = &temp6204_0;
struct FLISTAM_STMT_ase_frame_struct temp6204_1;
FLISTAM_STMT_ase_frame
noname6206 = &temp6204_1;
noname6205->state = 0;
noname6206->state = 0;
while (1) {
if (noname6206->state == 0) {
noname6203 = r_6201;
noname6206->arg0 = noname6203;
}
if (noname6205->state == 0) {
noname6202 = self;
noname6205->arg0 = noname6202;
}
local4 = FLISTAM_STMT_elt(noname6205);
if (noname6205->state == -1) goto after_loop;
noname6206->arg1 = local4;
FLISTAM_STMT_ase(noname6206);
if (noname6206->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTAM_STMT_clear(self);
}
}
r_6201->loc_17 = (c_INT_plus_INT_INT_chk(r_6201->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_6201->loc_17,1));
FLISTAM_STMT_ase_6196(r_6201, local5, e_6199);
return r_6201;
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
FLISTAM_CONST FLISTFLISTAM_CON_6207(FLISTFLISTAM_CONST self) {
FLISTAM_CONST noname6208;
FLISTAM_CONST r_6209;
INT local0;
INT local1;
local0 = FLISTFLISTAM_CON(self);
if ((local0==0)) {
return ((FLISTAM_CONST) NULL);
}
r_6209 = FLISTFLISTAM_CON_3988(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
local1 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
FLISTFLISTAM_CON_6175(self, local1, ((FLISTAM_CONST) NULL));
self->loc_17 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
return r_6209;
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:90:6\n");
exit(16);
}
}
AM_STMT TRANS_transform__6210(TRANS self, TR_CASE_STMT s_6211, TR_CASE_WHEN cw, AM_LOCAL_EXPR l) {
AM_STMT noname6212;
AM_CASE_STMT r_6213;
CALL_TP ct;
AM_EXPR v_6214 = ((AM_EXPR) NULL);
AM_CONST cv;
AM_CASE_STMT r_6215;
TR_STMT last_then;
FLISTAM_CONST ls = ((FLISTAM_CONST) NULL);
CALL_SIG cs;
SIG sig_6216;
AM_ROUT_CALL_EXPR arc;
AM_IF_STMT r_6217;
FLISTAM_STMT local0;
FLISTAM_STMT local1;
ARRAYCALL_TP local2;
INT local3;
AM_EXPR local4;
TP local5;
TR_EXPR local6;
if ((cw==((TR_CASE_WHEN) NULL))) {
if (s_6211->no_else) {
r_6213 = AM_CASE_STMT_cre(((AM_CASE_STMT) NULL), s_6211->source_38);
r_6213->test_40 = ((AM_EXPR) l);
r_6213->no_else = TRUE;
return ((AM_STMT) r_6213);
}
else {
return TRANS_transform__6099(self, s_6211->else_part);
}
}
PROG_err_loc_PRO(self->prog, ((PROG_ERR) cw));
ct = TRANS_call_tp_of(self, cw->val_16);
if ((ct==((CALL_TP) NULL))) {
v_6214 = TRANS_transform__5198(self, cw->val_16, ((TP) NULL));
if ((v_6214==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
cv = TRANS_const_to_s(self, v_6214);
if ((!((cv==((AM_CONST) NULL))))) {
r_6215 = AM_CASE_STMT_cre(((AM_CASE_STMT) NULL), cw->source_38);
r_6215->test_40 = ((AM_EXPR) l);
last_then = cw->then_part;
ls = FLISTAM_CONST_pu(ls, cv);
r_6215->tgts = FLISTFLISTAM_CON_6178(r_6215->tgts, ls);
local0 = r_6215->stmts;
r_6215->stmts = FLISTAM_STMT_pus(local0, TRANS_transform__6099(self, cw->then_part));
while (1) {
cw = cw->next_8;
if ((cw==((TR_CASE_WHEN) NULL))) {
if (s_6211->no_else) {
r_6215->no_else = TRUE;
}
else {
r_6215->else_stmts = TRANS_transform__6099(self, s_6211->else_part);
}
return ((AM_STMT) r_6215);
}
if ((!((TRANS_call_tp_of(self, cw->val_16)==((CALL_TP) NULL))))) {
r_6215->else_stmts = TRANS_transform__6210(self, s_6211, cw, l);
return ((AM_STMT) r_6215);
}
v_6214 = TRANS_transform__5198(self, cw->val_16, ((TP) NULL));
if ((v_6214==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
cv = TRANS_const_to_s(self, v_6214);
if ((!((cv==((AM_CONST) NULL))))) {
if (c_SYS_ob_eq_OB_OB_BOOL(((OB) last_then),((OB) cw->then_part))) {
ls = FLISTFLISTAM_CON_6207(r_6215->tgts);
ls = FLISTAM_CONST_pu(ls, cv);
r_6215->tgts = FLISTFLISTAM_CON_6178(r_6215->tgts, ls);
}
else {
ls = ((FLISTAM_CONST) NULL);
ls = FLISTAM_CONST_pu(ls, cv);
r_6215->tgts = FLISTFLISTAM_CON_6178(r_6215->tgts, ls);
local1 = r_6215->stmts;
r_6215->stmts = FLISTAM_STMT_pus(local1, TRANS_transform__6099(self, cw->then_part));
}
}
else {
r_6215->else_stmts = TRANS_transform__6210(self, s_6211, cw, l);
return ((AM_STMT) r_6215);
}
}
after_loop: ;
}
}
cs = CALL_SIG_create_(((CALL_SIG) NULL));
cs->tp = l->tp_at;
cs->name_19 = self->prog->ident_builtin->is_eq_ident;
cs->has_ret = TRUE;
cs->args_7 = ARRAYCALL_TP_cre(((ARRAYCALL_TP) NULL), 1);
if ((!((ct==((CALL_TP) NULL))))) {
ARRAYCALL_TP_ase(cs->args_7, 0, ct);
}
else {
local2 = cs->args_7;
local3 = 0;
local4 = v_6214;
ARRAYCALL_TP_ase(local2, local3, ((CALL_TP) (*AM_EXPR_tp_TP[local4->header.tag+AM_EXPR_tp_TP_offset])(local4)));
}
sig_6216 = CALL_SIG_lookup_(cs, TP_CLASS_is_eq_T(self->tp_con->same_34, cs->tp));
if ((sig_6216==((SIG) NULL))) {
return ((AM_STMT) NULL);
}
local5 = sig_6216->ret;
if ((*TP_is_neq_TP_BOOL[local5->header.tag+TP_is_neq_TP_BOOL_offset])(local5, ((TP) self->prog->tp_builtin->bool_2))) {
PROG_err_STR(self->prog, ((STR) &Theis_eqroutinec));
return ((AM_STMT) NULL);
}
if ((v_6214==((AM_EXPR) NULL))) {
local6 = cw->val_16;
v_6214 = TRANS_transform__5198(self, local6, ARRAYTP_aget_INT_TP(sig_6216->args_7, 0));
}
if ((v_6214==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
arc = AM_ROUT_CALL_EXP_5400(((AM_ROUT_CALL_EXPR) NULL), 2, cw->source_38);
arc->fun = sig_6216;
AM_ROUT_CALL_EXP_5404(arc, 0, ((AM_EXPR) l));
AM_ROUT_CALL_EXP_5404(arc, 1, v_6214);
r_6217 = AM_IF_STMT_creat(((AM_IF_STMT) NULL), cw->source_38);
r_6217->test_40 = TRANS_inline_AM_(self, arc);
r_6217->if_true = TRANS_transform__6099(self, cw->then_part);
r_6217->if_false = TRANS_transform__6210(self, s_6211, cw->next_8, l);
return ((AM_STMT) r_6217);
}
AM_STMT TRANS_transform__6219(TRANS self, TR_CASE_STMT s_6220) {
AM_STMT noname6221;
AM_ASSIGN_STMT r_6222;
AM_LOCAL_EXPR l;
AM_LOCAL_EXPR local0;
SFILE_ID local1;
IDENT local2;
AM_EXPR local3;
if ((s_6220==((TR_CASE_STMT) NULL))) {
return ((AM_STMT) NULL);
}
r_6222 = AM_ASSIGN_STMT_c(((AM_ASSIGN_STMT) NULL), s_6220->source_38);
r_6222->src_42 = TRANS_transform__5198(self, s_6220->test_40, ((TP) NULL));
if ((r_6222->src_42==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
local0 = ((AM_LOCAL_EXPR) NULL);
local1 = s_6220->source_38;
local2 = IDENT_zero;
local3 = r_6222->src_42;
l = AM_LOCAL_EXPR_cr(local0, local1, local2, (*AM_EXPR_tp_TP[local3->header.tag+AM_EXPR_tp_TP_offset])(local3));
TRANS_add_local_(self, l);
r_6222->dest = ((AM_EXPR) l);
r_6222->next_8 = TRANS_transform__6210(self, s_6220, s_6220->when_part, l);
return ((AM_STMT) r_6222);
}
void TRANS_typecase_l(TRANS self, TR_TYPECASE_STMT s_6223) {
PROG local0;
STR local1;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6223));
local0 = self->prog;
local1 = STR_plus_STR_STR(((STR) &Thename), s_6223->name_19.str_4);
PROG_err_STR(local0, STR_plus_STR_STR(local1, ((STR) &isntalocalvariable)));
}
BOOL AM_ROUT_DEF_loca(AM_ROUT_DEF self, AM_LOCAL_EXPR l) {
BOOL noname6224 = ((BOOL) 0);
INT i = ((INT) 0);
BOOL local0;
SYS local1;
AM_LOCAL_EXPR local2;
if ((!(AM_ROUT_DEF_is_i(self)))) {
local0 = TRUE;
} else {
local0 = (self->sig_6->hot==((ARRAYBOOL) NULL));
}
if (local0) {
return FALSE;
}
i = 0;
while (1) {
if ((i<(self->asize))) {
}
else {
goto after_loop;
}
local1 = ((SYS) NULL);
local2 = AM_ROUT_DEF_aget(self, i);
if (c_SYS_ob_eq_OB_OB_BOOL(((OB) local2),((OB) l))) {
return ARRAYBOOL_aget_I(self->sig_6->hot, i);
}
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
return FALSE;
}
void TRANS_typecase_h(TRANS self, TR_TYPECASE_STMT s_6226) {
PROG local0;
STR local1;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6226));
local0 = self->prog;
local1 = STR_plus_STR_STR(((STR) &Thetypecasetestlocal), s_6226->name_19.str_4);
PROG_err_STR(local0, STR_plus_STR_STR(local1, ((STR) &mustnotbeaargume)));
}
AM_TYPECASE_STMT AM_TYPECASE_STMT_6227(AM_TYPECASE_STMT self, SFILE_ID source_6228) {
AM_TYPECASE_STMT noname6229;
AM_TYPECASE_STMT r_6230;
AM_TYPECASE_STMT local0;
local0 = ((AM_TYPECASE_STMT) sbi_alloc(sizeof(struct AM_TYPECASE_STMT_struct), AM_TYPECASE_STMT_tag));
r_6230 = local0;
r_6230->source_38 = source_6228;
return r_6230;
}
BOOL FLISTTP_is_empty(FLISTTP self) {
BOOL noname6231 = ((BOOL) 0);
INT local0;
local0 = FLISTTP_size_INT(self);
return (local0==0);
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTTP_aclear(FLISTTP self) {
TP nil = ((TP) NULL);
FLISTTP noname6232;
if (!((!((self==((FLISTTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTTP_aset_TP_frame_struct temp6233_0;
FLISTTP_aset_TP_frame
noname6234 = &temp6233_0;
noname6234->state = 0;
while (1) {
if (noname6234->state == 0) {
noname6232 = self;
noname6234->arg0 = noname6232;
}
noname6234->arg1 = nil;
FLISTTP_aset_TP(noname6234);
if (noname6234->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTTP_clear(FLISTTP self) {
if (FLISTTP_is_empty(self)) {
return;
}
else {
FLISTTP_aclear(self);
self->loc_17 = 0;
}
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTTP_aref_ase(FLISTTP self, INT ind_6235, TP val_6236) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6235, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_6235<0||ind_6235>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_6235] = val_6236;
}
void FLISTTP_aset_INT_TP(FLISTTP self, INT ind_6237, TP val_6238) {
BOOL local0;
INT local1;
if ((!((self==((FLISTTP) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6237, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:73:7\n");
exit(16);
}
FLISTTP_aref_ase(self, ind_6237, val_6238);
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTTP FLISTTP_push_TP_(FLISTTP self, TP e_6239) {
FLISTTP noname6240;
FLISTTP r_6241 = ((FLISTTP) NULL);
FLISTTP noname6242;
FLISTTP noname6243;
FLISTTP local0;
INT local1;
FLISTTP local2;
INT local3;
TP local4;
INT local5;
if ((self==((FLISTTP) NULL))) {
local0 = ((FLISTTP) sbi_arr_alloc(sizeof(struct FLISTTP_struct), FLISTTP_tag, sizeof(TP) , 5));
local0->asize = 5;
r_6241 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_6241 = self;
}
else {
local3 = 2;
local2 = ((FLISTTP) sbi_arr_alloc(sizeof(struct FLISTTP_struct), FLISTTP_tag, sizeof(TP) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_6241 = local2;
r_6241->loc_17 = self->loc_17;
{
struct FLISTTP_elt_TP_frame_struct temp6244_0;
FLISTTP_elt_TP_frame
noname6245 = &temp6244_0;
struct FLISTTP_aset_TP_frame_struct temp6244_1;
FLISTTP_aset_TP_frame
noname6246 = &temp6244_1;
noname6245->state = 0;
noname6246->state = 0;
while (1) {
if (noname6246->state == 0) {
noname6243 = r_6241;
noname6246->arg0 = noname6243;
}
if (noname6245->state == 0) {
noname6242 = self;
noname6245->arg0 = noname6242;
}
local4 = FLISTTP_elt_TP(noname6245);
if (noname6245->state == -1) goto after_loop;
noname6246->arg1 = local4;
FLISTTP_aset_TP(noname6246);
if (noname6246->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTTP_clear(self);
}
}
r_6241->loc_17 = (c_INT_plus_INT_INT_chk(r_6241->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_6241->loc_17,1));
FLISTTP_aset_INT_TP(r_6241, local5, e_6239);
return r_6241;
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
void TRANS_typecase_n(TRANS self, TR_TYPECASE_STMT s_6247) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6247));
PROG_err_STR(self->prog, ((STR) &Therearenomatchi));
}
AM_STMT TRANS_transform__6248(TRANS self, TR_TYPECASE_STMT s_6249) {
AM_STMT noname6250;
AM_STMT res = ((AM_STMT) NULL);
AM_LOCAL_EXPR l;
BOOL ono_assign = ((BOOL) 0);
TP ltp;
AM_TYPECASE_STMT r_6251;
TR_TYPECASE_WHEN wp;
TP tp_6252;
TR_TYPECASE_WHEN wp_6253;
BOOL local0;
TP local1;
TP local2;
BOOL local3;
BOOL local4;
TP local5;
TP local6;
TP local7;
TP local8;
FLISTAM_STMT local9;
TP local10;
l = TRANS_local_with(self, s_6249->name_19);
if ((l==((AM_LOCAL_EXPR) NULL))) {
TRANS_typecase_l(self, s_6249);
return ((AM_STMT) NULL);
}
if (AM_ROUT_DEF_loca(self->cur_rout, l)) {
TRANS_typecase_h(self, s_6249);
return ((AM_STMT) NULL);
}
ono_assign = l->no_assign;
l->no_assign = TRUE;
ltp = l->tp_at;
local1 = ltp;
if ((*TP_is_abstract_BOOL[local1->header.tag+TP_is_abstract_BOOL_offset])(local1)) {
local0 = TRUE;
} else {
local2 = ltp;
local0 = (*TP_is_bound_BOOL[local2->header.tag+TP_is_bound_BOOL_offset])(local2);
}
if (local0) {
r_6251 = AM_TYPECASE_STMT_6227(((AM_TYPECASE_STMT) NULL), s_6249->source_38);
r_6251->test_40 = l;
wp = s_6249->when_part;
while (1) {
if ((!((wp==((TR_TYPECASE_WHEN) NULL))))) {
}
else {
goto after_loop;
}
tp_6252 = TRANS_tp_of_TR_T(self, wp->tp);
local5 = tp_6252;
if ((*TP_is_abstract_BOOL[local5->header.tag+TP_is_abstract_BOOL_offset])(local5)) {
local4 = TRUE;
} else {
local6 = tp_6252;
local4 = (*TP_is_bound_BOOL[local6->header.tag+TP_is_bound_BOOL_offset])(local6);
}
if (local4) {
local3 = TRUE;
} else {
local7 = tp_6252;
local3 = (*TP_is_subtype_TP[local7->header.tag+TP_is_subtype_TP_offset])(local7, ltp);
}
if (local3) {
local8 = ltp;
if ((*TP_is_subtype_TP[local8->header.tag+TP_is_subtype_TP_offset])(local8, tp_6252)) {
if ((!(r_6251->has_void_stmts))) {
r_6251->has_void_stmts = TRUE;
r_6251->void_stmts = TRANS_transform__6099(self, wp->then_part);
}
}
else {
l->tp_at = tp_6252;
}
r_6251->tgts = FLISTTP_push_TP_(r_6251->tgts, tp_6252);
local9 = r_6251->stmts;
r_6251->stmts = FLISTAM_STMT_pus(local9, TRANS_transform__6099(self, wp->then_part));
l->tp_at = ltp;
}
wp = wp->next_8;
}
after_loop: ;
if (s_6249->no_else) {
r_6251->no_else = TRUE;
}
else {
r_6251->else_stmts = TRANS_transform__6099(self, s_6249->else_part);
}
if ((!(r_6251->has_void_stmts))) {
r_6251->has_void_stmts = TRUE;
r_6251->void_stmts = TRANS_transform__6099(self, s_6249->else_part);
}
res = ((AM_STMT) r_6251);
}
else {
wp_6253 = s_6249->when_part;
while (1) {
if ((!((wp_6253==((TR_TYPECASE_WHEN) NULL))))) {
}
else {
goto after_loop_6255;
}
local10 = ltp;
if ((*TP_is_subtype_TP[local10->header.tag+TP_is_subtype_TP_offset])(local10, TRANS_tp_of_TR_T(self, wp_6253->tp))) {
res = TRANS_transform__6099(self, wp_6253->then_part);
l->no_assign = ono_assign;
return res;
}
wp_6253 = wp_6253->next_8;
}
after_loop_6255: ;
if (s_6249->no_else) {
TRANS_typecase_n(self, s_6249);
return res;
}
else {
res = TRANS_transform__6099(self, s_6249->else_part);
}
}
l->no_assign = ono_assign;
return res;
}
AM_ASSERT_STMT AM_ASSERT_STMT_c(AM_ASSERT_STMT self, SFILE_ID source_6257) {
AM_ASSERT_STMT noname6258;
AM_ASSERT_STMT r_6259;
AM_ASSERT_STMT local0;
local0 = ((AM_ASSERT_STMT) sbi_alloc(sizeof(struct AM_ASSERT_STMT_struct), AM_ASSERT_STMT_tag));
r_6259 = local0;
r_6259->source_38 = source_6257;
return r_6259;
}
AM_STMT TRANS_transform__6260(TRANS self, TR_ASSERT_STMT s_6261) {
AM_STMT noname6262;
AM_ASSERT_STMT r_6263;
r_6263 = AM_ASSERT_STMT_c(((AM_ASSERT_STMT) NULL), s_6261->source_38);
r_6263->test_40 = TRANS_transform__5198(self, s_6261->test_40, ((TP) self->prog->tp_builtin->bool_2));
if ((r_6263->test_40==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6263);
}
AM_PROTECT_STMT AM_PROTECT_STMT_(AM_PROTECT_STMT self, SFILE_ID source_6264) {
AM_PROTECT_STMT noname6265;
AM_PROTECT_STMT r_6266;
AM_PROTECT_STMT local0;
local0 = ((AM_PROTECT_STMT) sbi_alloc(sizeof(struct AM_PROTECT_STMT_struct), AM_PROTECT_STMT_tag));
r_6266 = local0;
r_6266->source_38 = source_6264;
return r_6266;
}
AM_STMT TRANS_transform__6267(TRANS self, TR_PROTECT_STMT s_6268) {
AM_STMT noname6269;
AM_PROTECT_STMT r_6270;
BOOL old_in_protect_body = ((BOOL) 0);
TR_PROTECT_WHEN wp;
TP tp_6271;
TP oex_tp;
BOOL old_in_protect_then = ((BOOL) 0);
TP oex_tp_6272;
BOOL old_in_protect_t_6273 = ((BOOL) 0);
FLISTAM_STMT local0;
r_6270 = AM_PROTECT_STMT_(((AM_PROTECT_STMT) NULL), s_6268->source_38);
old_in_protect_body = self->in_protect_body;
self->in_protect_body = TRUE;
r_6270->body = TRANS_transform__6099(self, s_6268->stmts);
self->in_protect_body = old_in_protect_body;
wp = s_6268->when_part;
while (1) {
if ((!((wp==((TR_PROTECT_WHEN) NULL))))) {
}
else {
goto after_loop;
}
tp_6271 = TRANS_tp_of_TR_T(self, wp->tp);
oex_tp = self->ex_tp;
self->ex_tp = tp_6271;
old_in_protect_then = self->in_protect_then;
self->in_protect_then = TRUE;
r_6270->tgts = FLISTTP_push_TP_(r_6270->tgts, tp_6271);
local0 = r_6270->stmts;
r_6270->stmts = FLISTAM_STMT_pus(local0, TRANS_transform__6099(self, wp->then_part));
self->in_protect_then = old_in_protect_then;
self->ex_tp = oex_tp;
wp = wp->next_8;
}
after_loop: ;
if (s_6268->no_else) {
r_6270->no_else = TRUE;
}
else {
oex_tp_6272 = self->ex_tp;
self->ex_tp = ((TP) self->prog->tp_builtin->dollar_ob);
old_in_protect_t_6273 = self->in_protect_then;
self->in_protect_then = TRUE;
r_6270->else_stmts = TRANS_transform__6099(self, s_6268->else_part);
self->in_protect_then = old_in_protect_t_6273;
self->ex_tp = oex_tp_6272;
}
return ((AM_STMT) r_6270);
}
void TRANS_stmts_afte_6275(TRANS self, TR_RAISE_STMT s_6276) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6276));
PROG_err_STR(self->prog, ((STR) &Nostatementsmayf_6277));
}
AM_RAISE_STMT AM_RAISE_STMT_cr(AM_RAISE_STMT self, SFILE_ID source_6278) {
AM_RAISE_STMT noname6279;
AM_RAISE_STMT r_6280;
AM_RAISE_STMT local0;
local0 = ((AM_RAISE_STMT) sbi_alloc(sizeof(struct AM_RAISE_STMT_struct), AM_RAISE_STMT_tag));
r_6280 = local0;
r_6280->source_38 = source_6278;
return r_6280;
}
AM_STMT TRANS_transform__6281(TRANS self, TR_RAISE_STMT s_6282) {
AM_STMT noname6283;
AM_RAISE_STMT r_6284;
if ((!((s_6282->next_8==((TR_STMT) NULL))))) {
TRANS_stmts_afte_6275(self, s_6282);
}
r_6284 = AM_RAISE_STMT_cr(((AM_RAISE_STMT) NULL), s_6282->source_38);
r_6284->val_16 = TRANS_transform__5198(self, s_6282->val_16, ((TP) NULL));
if ((r_6284->val_16==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6284);
}
void TRANS_break_not_(TRANS self, TR_EXPR_STMT s_6285) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6285));
PROG_err_STR(self->prog, ((STR) &breakwhileandunt));
}
AM_BREAK_STMT AM_BREAK_STMT_cr(AM_BREAK_STMT self, SFILE_ID source_6286) {
AM_BREAK_STMT noname6287;
AM_BREAK_STMT r_6288;
AM_BREAK_STMT local0;
local0 = ((AM_BREAK_STMT) sbi_alloc(sizeof(struct AM_BREAK_STMT_struct), AM_BREAK_STMT_tag));
r_6288 = local0;
r_6288->source_38 = source_6286;
return r_6288;
}
void TRANS_expr_stmt_(TRANS self, TR_EXPR_STMT s_6289) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) s_6289));
PROG_err_STR(self->prog, ((STR) &Expressionsuseda));
}
AM_STMT TRANS_transform__6290(TRANS self, TR_EXPR_STMT s_6291) {
AM_STMT noname6292;
TR_EXPR e_6293;
AM_EXPR_STMT r_6294;
e_6293 = s_6291->e;
if (e_6293==NULL) {
TRANS_expr_stmt_(self, s_6291);
} else
switch (e_6293->header.tag) {
case TR_BREAK_EXPR_tag:
if ((self->cur_loop==((AM_LOOP_STMT) NULL))) {
TRANS_break_not_(self, s_6291);
return ((AM_STMT) NULL);
}
return ((AM_STMT) AM_BREAK_STMT_cr(((AM_BREAK_STMT) NULL), s_6291->source_38)); break;
case TR_CALL_EXPR_tag:
r_6294 = AM_EXPR_STMT_cre(((AM_EXPR_STMT) NULL), s_6291->source_38);
r_6294->expr = TRANS_transform__5492(self, ((TR_CALL_EXPR) e_6293), ((TP) NULL), FALSE);
if ((r_6294->expr==((AM_EXPR) NULL))) {
return ((AM_STMT) NULL);
}
return ((AM_STMT) r_6294); break;
default: ;
TRANS_expr_stmt_(self, s_6291);
}
return ((AM_STMT) NULL);
}
AM_STMT TRANS_transform__6295(TRANS self, TR_STMT s_6296) {
AM_STMT noname6297;
if ((s_6296==((TR_STMT) NULL))) {
return ((AM_STMT) NULL);
}
if (s_6296==NULL) {
} else
switch (s_6296->header.tag) {
case TR_DEC_STMT_tag:
return TRANS_transform__6035(self, ((TR_DEC_STMT) s_6296)); break;
case TR_ASSIGN_STMT_tag:
return TRANS_transform__6070(self, ((TR_ASSIGN_STMT) s_6296)); break;
case TR_IF_STMT_tag:
return TRANS_transform__6095(self, ((TR_IF_STMT) s_6296)); break;
case TR_LOOP_STMT_tag:
return TRANS_transform__6103(self, ((TR_LOOP_STMT) s_6296)); break;
case TR_RETURN_STMT_tag:
return TRANS_transform__6115(self, ((TR_RETURN_STMT) s_6296)); break;
case TR_YIELD_STMT_tag:
return TRANS_transform__6129(self, ((TR_YIELD_STMT) s_6296)); break;
case TR_QUIT_STMT_tag:
return TRANS_transform__6137(self, ((TR_QUIT_STMT) s_6296)); break;
case TR_CASE_STMT_tag:
return TRANS_transform__6219(self, ((TR_CASE_STMT) s_6296)); break;
case TR_TYPECASE_STMT_tag:
return TRANS_transform__6248(self, ((TR_TYPECASE_STMT) s_6296)); break;
case TR_ASSERT_STMT_tag:
return TRANS_transform__6260(self, ((TR_ASSERT_STMT) s_6296)); break;
case TR_PROTECT_STMT_tag:
return TRANS_transform__6267(self, ((TR_PROTECT_STMT) s_6296)); break;
case TR_RAISE_STMT_tag:
return TRANS_transform__6281(self, ((TR_RAISE_STMT) s_6296)); break;
case TR_EXPR_STMT_tag:
return TRANS_transform__6290(self, ((TR_EXPR_STMT) s_6296)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./trans.sa:398:14\n");
exit(16);
}
return ((AM_STMT) NULL);
}
AM_LOCAL_EXPR FLISTAM_LOCAL_EX_6298(FLISTAM_LOCAL_EXPR self) {
AM_LOCAL_EXPR noname6299;
AM_LOCAL_EXPR r_6300;
INT local0;
INT local1;
local0 = FLISTAM_LOCAL_EX(self);
if ((local0==0)) {
return ((AM_LOCAL_EXPR) NULL);
}
r_6300 = FLISTAM_LOCAL_EX_3775(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
local1 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
FLISTAM_LOCAL_EX_5376(self, local1, ((AM_LOCAL_EXPR) NULL));
self->loc_17 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
return r_6300;
if (!FLISTAM_LOCAL_EX_3769(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_LOCAL_EXPR}::invariant:BOOL ../Library/flist.sa:90:6\n");
exit(16);
}
}
AM_STMT TRANS_transform__6099(TRANS self, TR_STMT s_6301) {
AM_STMT noname6302;
INT osize = ((INT) 0);
AM_STMT r_6303 = ((AM_STMT) NULL);
AM_LOCAL_EXPR ignore_6304;
AM_STMT local0;
TR_STMT local1;
INT local2;
if ((s_6301==((TR_STMT) NULL))) {
return ((AM_STMT) NULL);
}
if ((!((self->active_locals==((FLISTAM_LOCAL_EXPR) NULL))))) {
osize = FLISTAM_LOCAL_EX(self->active_locals);
}
while (1) {
if ((!((s_6301==((TR_STMT) NULL))))) {
}
else {
goto after_loop;
}
if ((r_6303==((AM_STMT) NULL))) {
r_6303 = TRANS_transform__6295(self, s_6301);
}
else {
local0 = r_6303;
(*AM_STMT_append_A[local0->header.tag+AM_STMT_append_A_offset])(local0, TRANS_transform__6295(self, s_6301));
}
local1 = s_6301;
s_6301 = (*TR_STMT_next_TR_STMT[local1->header.tag+TR_STMT_next_TR_STMT_offset])(local1);
}
after_loop: ;
if ((!((self->active_locals==((FLISTAM_LOCAL_EXPR) NULL))))) {
while (1) {
local2 = FLISTAM_LOCAL_EX(self->active_locals);
if ((local2>osize)) {
}
else {
goto after_loop_6306;
}
ignore_6304 = FLISTAM_LOCAL_EX_6298(self->active_locals);
}
after_loop_6306: ;
}
return r_6303;
}
AM_ROUT_DEF TRANS_transform__6308(TRANS self, ELT e_6309, TR_ROUT_DEF tr_6310) {
AM_ROUT_DEF noname6311;
AM_ROUT_DEF r_6312;
INT i = ((INT) 0);
TR_ARG_DEC na;
AM_LOCAL_EXPR l;
AM_PRE_STMT pres = ((AM_PRE_STMT) NULL);
AM_POST_STMT posts = ((AM_POST_STMT) NULL);
AM_STMT code_6313 = ((AM_STMT) NULL);
AM_INVARIANT_STMT inv = ((AM_INVARIANT_STMT) NULL);
SIG isig;
AM_ROUT_CALL_EXPR icall;
AM_ROUT_DEF local0;
INT local1;
INT local2;
INT local3;
AM_LOCAL_EXPR local4;
SFILE_ID local5;
IDENT local6;
AM_LOCAL_EXPR local7;
SFILE_ID local8;
IDENT local9;
INT local10;
AM_LOCAL_EXPR local11;
SFILE_ID local12;
IDENT local13;
INT local14;
BOOL local15;
AM_STMT local16;
AM_STMT local17;
AM_STMT local18;
AM_STMT local19;
if (e_6309->sig_6->is_builtin) {
if ((!(BE_built_in_whic(self->prog->back_end, e_6309->sig_6)))) {
return ((AM_ROUT_DEF) NULL);
}
}
if (ELT_is_invariant(e_6309)) {
self->in_invariant = TRUE;
}
else {
self->in_invariant = FALSE;
}
if (tr_6310->is_abstract) {
if (e_6309->is_external) {
return ((AM_ROUT_DEF) NULL);
}
else {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) tr_6310));
PROG_err_STR(self->prog, ((STR) &CompilererrorTRA_6314));
return ((AM_ROUT_DEF) NULL);
}
}
TRANS_check_retu(self, tr_6310);
local0 = ((AM_ROUT_DEF) NULL);
local1 = 1;
local2 = (c_INT_plus_INT_INT_chk(local1,ARRAYTP_size_INT(e_6309->sig_6->args_7)));
r_6312 = AM_ROUT_DEF_crea(local0, local2, tr_6310->source_38);
r_6312->srcsig = e_6309->srcsig;
r_6312->sig_6 = e_6309->sig_6;
if (e_6309->is_external) {
r_6312->is_external = TRUE;
}
local3 = 0;
local4 = ((AM_LOCAL_EXPR) NULL);
local5 = tr_6310->source_38;
local6 = self->prog->ident_builtin->self_ident;
AM_ROUT_DEF_aset(r_6312, local3, AM_LOCAL_EXPR_cr(local4, local5, local6, ELT_tp_TP(e_6309)));
if (SIG_has_ret_BOOL(e_6309->sig_6)) {
local7 = ((AM_LOCAL_EXPR) NULL);
local8 = tr_6310->source_38;
local9 = IDENT_zero;
r_6312->rres = AM_LOCAL_EXPR_cr(local7, local8, local9, ELT_ret_TP(e_6309));
r_6312->locals_57 = FLISTAM_LOCAL_EX_5379(r_6312->locals_57, r_6312->rres);
}
i = 0;
na = tr_6310->args_dec;
local10 = TR_ARG_DEC_size_INT(na);
if ((local10!=ARRAYTP_size_INT(e_6309->sig_6->args_7))) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) tr_6310));
PROG_err_STR(self->prog, ((STR) &CompilererrorTRA_6315));
return ((AM_ROUT_DEF) NULL);
}
while (1) {
if ((i<ARRAYTP_size_INT(e_6309->sig_6->args_7))) {
}
else {
goto after_loop;
}
local11 = ((AM_LOCAL_EXPR) NULL);
local12 = tr_6310->source_38;
local13 = na->name_19;
l = AM_LOCAL_EXPR_cr(local11, local12, local13, ARRAYTP_aget_INT_TP(e_6309->sig_6->args_7, i));
local14 = (c_INT_plus_INT_INT_chk(i,1));
AM_ROUT_DEF_aset(r_6312, local14, l);
i = (c_INT_plus_INT_INT_chk(i,1));
na = na->next_8;
}
after_loop: ;
self->cur_rout = r_6312;
if ((!((tr_6310->pre_e==((TR_EXPR) NULL))))) {
self->in_pre = TRUE;
pres = AM_PRE_STMT_crea(((AM_PRE_STMT) NULL), tr_6310->source_38);
pres->tp = self->impl->tp;
pres->test_40 = TRANS_transform__5198(self, tr_6310->pre_e, ((TP) self->prog->tp_builtin->bool_2));
if ((pres->test_40==((AM_EXPR) NULL))) {
pres = ((AM_PRE_STMT) NULL);
}
self->in_pre = FALSE;
}
if ((!((tr_6310->post_e==((TR_EXPR) NULL))))) {
self->in_post = TRUE;
posts = AM_POST_STMT_cre(((AM_POST_STMT) NULL), tr_6310->source_38);
posts->tp = self->impl->tp;
posts->test_40 = TRANS_transform__5198(self, tr_6310->post_e, ((TP) self->prog->tp_builtin->bool_2));
if ((posts->test_40==((AM_EXPR) NULL))) {
posts = ((AM_POST_STMT) NULL);
}
self->in_post = FALSE;
}
if (TRANS_is_array_s(self, e_6309->srcsig)) {
code_6313 = TRANS_transform__6026(self, e_6309);
}
else {
code_6313 = TRANS_transform__6099(self, tr_6310->stmts);
}
if ((!(e_6309->is_private))) {
local15 = (!(self->in_invariant));
} else {
local15 = FALSE;
}
if (local15) {
isig = IMPL_invariant_s(self->impl);
if ((!((isig==((SIG) NULL))))) {
inv = AM_INVARIANT_STM(((AM_INVARIANT_STMT) NULL), tr_6310->source_38);
inv->sig_6 = isig;
icall = AM_ROUT_CALL_EXP_5400(((AM_ROUT_CALL_EXPR) NULL), 1, tr_6310->source_38);
icall->fun = isig;
r_6312->calls_58 = FLISTAM_EXPR_pus(r_6312->calls_58, ((AM_EXPR) icall));
}
}
r_6312->code_56 = self->init_stmts;
if ((r_6312->code_56==((AM_STMT) NULL))) {
r_6312->code_56 = ((AM_STMT) pres);
}
else {
local16 = r_6312->code_56;
(*AM_STMT_append_A[local16->header.tag+AM_STMT_append_A_offset])(local16, ((AM_STMT) pres));
}
if ((r_6312->code_56==((AM_STMT) NULL))) {
r_6312->code_56 = code_6313;
}
else {
local17 = r_6312->code_56;
(*AM_STMT_append_A[local17->header.tag+AM_STMT_append_A_offset])(local17, code_6313);
}
if ((r_6312->code_56==((AM_STMT) NULL))) {
r_6312->code_56 = ((AM_STMT) posts);
}
else {
local18 = r_6312->code_56;
(*AM_STMT_append_A[local18->header.tag+AM_STMT_append_A_offset])(local18, ((AM_STMT) posts));
}
if ((r_6312->code_56==((AM_STMT) NULL))) {
r_6312->code_56 = ((AM_STMT) inv);
}
else {
local19 = r_6312->code_56;
(*AM_STMT_append_A[local19->header.tag+AM_STMT_append_A_offset])(local19, ((AM_STMT) inv));
}
return r_6312;
}
AM_ROUT_DEF TRANS_transform__6317(TRANS self, ELT e_6318) {
AM_ROUT_DEF noname6319;
TRANS t_6320;
TR_CLASS_ELT tr_6321;
AM_ROUT_DEF r_6322 = ((AM_ROUT_DEF) NULL);
if (!((!((e_6318==((ELT) NULL)))))) {
fprintf(stderr,"Violation of precondition ./trans.sa:89:16\n");
exit(16);
}
t_6320 = TRANS_create_ELT(((TRANS) NULL), e_6318);
if ((t_6320==((TRANS) NULL))) {
return ((AM_ROUT_DEF) NULL);
}
tr_6321 = e_6318->tr;
if (tr_6321==NULL) {
} else
switch (tr_6321->header.tag) {
case TR_CONST_DEF_tag:
r_6322 = TRANS_transform__5949(t_6320, e_6318, ((TR_CONST_DEF) tr_6321)); break;
case TR_SHARED_DEF_tag:
r_6322 = TRANS_transform__5967(t_6320, e_6318, ((TR_SHARED_DEF) tr_6321)); break;
case TR_ATTR_DEF_tag:
r_6322 = TRANS_transform__5984(t_6320, e_6318, ((TR_ATTR_DEF) tr_6321)); break;
case TR_ROUT_DEF_tag:
r_6322 = TRANS_transform__6308(t_6320, e_6318, ((TR_ROUT_DEF) tr_6321)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./trans.sa:97:14\n");
exit(16);
}
return r_6322;
}
void INLINE_ATTR_READ_6323(INLINE_ATTR_READ self, INT routines_6324) {
shared_INLINE_AT = routines_6324;
}
INLINE_ATTR_READ INLINE_ATTR_READ_6325(INLINE_ATTR_READ self, AM_ROUT_DEF am_6326) {
INLINE_ATTR_READ noname6327;
INLINE_ATTR_READ r_6328;
AM_STMT stmt;
AM_EXPR val_6329;
INLINE_ATTR_READ local0;
local0 = ((INLINE_ATTR_READ) sbi_alloc(sizeof(struct INLINE_ATTR_READ_struct), INLINE_ATTR_READ_tag));
r_6328 = local0;
r_6328->sig_6 = am_6326->sig_6;
stmt = am_6326->code_56;
if (stmt==NULL) {
} else
switch (stmt->header.tag) {
case AM_RETURN_STMT_tag:
val_6329 = ((AM_RETURN_STMT) stmt)->val_16;
if (val_6329==NULL) {
} else
switch (val_6329->header.tag) {
case AM_ATTR_EXPR_tag:
r_6328->at = ((AM_ATTR_EXPR) val_6329)->at;
r_6328->self_tp = ((AM_ATTR_EXPR) val_6329)->self_tp;
r_6328->tp_at = ((AM_ATTR_EXPR) val_6329)->tp_at; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:51:18\n");
exit(16);
} break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:49:16\n");
exit(16);
}
INLINE_ATTR_READ_6323(self, (c_INT_plus_INT_INT_chk(shared_INLINE_AT,1)));
return r_6328;
}
void INLINE_GLOBAL_RE(INLINE_GLOBAL_READ self, INT routines_6330) {
shared_INLINE_GL = routines_6330;
}
INLINE_GLOBAL_READ INLINE_GLOBAL_RE_6331(INLINE_GLOBAL_READ self, AM_ROUT_DEF am_6332) {
INLINE_GLOBAL_READ noname6333;
INLINE_GLOBAL_READ r_6334;
AM_STMT stmt;
AM_EXPR val_6335;
INLINE_GLOBAL_READ local0;
local0 = ((INLINE_GLOBAL_READ) sbi_alloc(sizeof(struct INLINE_GLOBAL_READ_struct), INLINE_GLOBAL_READ_tag));
r_6334 = local0;
r_6334->sig_6 = am_6332->sig_6;
stmt = am_6332->code_56;
if (stmt==NULL) {
} else
switch (stmt->header.tag) {
case AM_RETURN_STMT_tag:
val_6335 = ((AM_RETURN_STMT) stmt)->val_16;
if (val_6335==NULL) {
} else
switch (val_6335->header.tag) {
case AM_GLOBAL_EXPR_tag:
r_6334->age = ((AM_GLOBAL_EXPR) val_6335); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:164:18\n");
exit(16);
} break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:162:16\n");
exit(16);
}
INLINE_GLOBAL_RE(self, (c_INT_plus_INT_INT_chk(shared_INLINE_GL,1)));
return r_6334;
}
void INLINE_ATTR_WRIT(INLINE_ATTR_WRITE self, INT routines_6336) {
shared_INLINE_AT_6337 = routines_6336;
}
INLINE_ATTR_WRITE INLINE_ATTR_WRIT_6338(INLINE_ATTR_WRITE self, AM_ROUT_DEF am_6339) {
INLINE_ATTR_WRITE noname6340;
INLINE_ATTR_WRITE r_6341;
AM_STMT stmt;
AM_EXPR dest_6342;
INLINE_ATTR_WRITE local0;
local0 = ((INLINE_ATTR_WRITE) sbi_alloc(sizeof(struct INLINE_ATTR_WRITE_struct), INLINE_ATTR_WRITE_tag));
r_6341 = local0;
r_6341->sig_6 = am_6339->sig_6;
stmt = am_6339->code_56;
if (stmt==NULL) {
} else
switch (stmt->header.tag) {
case AM_ASSIGN_STMT_tag:
dest_6342 = ((AM_ASSIGN_STMT) stmt)->dest;
if (dest_6342==NULL) {
} else
switch (dest_6342->header.tag) {
case AM_ATTR_EXPR_tag:
r_6341->self_tp = ((AM_ATTR_EXPR) dest_6342)->self_tp;
r_6341->at = ((AM_ATTR_EXPR) dest_6342)->at;
r_6341->tp_at = ((AM_ATTR_EXPR) dest_6342)->tp_at; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:93:18\n");
exit(16);
} break;
default: ;
fprintf(stderr,"No applicable type in typecase ./inline.sa:91:16\n");
exit(16);
}
INLINE_ATTR_WRIT(self, (c_INT_plus_INT_INT_chk(shared_INLINE_AT_6337,1)));
return r_6341;
}
INLINE_TBL INLINE_TBL_test_(INLINE_TBL self, AM_ROUT_DEF am_6343) {
INLINE_TBL noname6344;
INLINE_TBL r_6345;
AM_STMT stmts_6346;
AM_EXPR val_6347;
AM_EXPR dest_6348;
AM_EXPR src_6349;
BOOL local0;
BOOL local1;
SYS local2;
AM_EXPR local3;
BOOL local4;
SYS local5;
AM_EXPR local6;
SYS local7;
r_6345 = self;
if ((!(am_6343->is_abstract))) {
local1 = (!(am_6343->is_external));
} else {
local1 = FALSE;
}
if (local1) {
local0 = (!((am_6343->code_56==((AM_STMT) NULL))));
} else {
local0 = FALSE;
}
if (local0) {
stmts_6346 = am_6343->code_56;
if (stmts_6346==NULL) {
} else
switch (stmts_6346->header.tag) {
case AM_RETURN_STMT_tag:
val_6347 = ((AM_RETURN_STMT) stmts_6346)->val_16;
if (val_6347==NULL) {
} else
switch (val_6347->header.tag) {
case AM_ATTR_EXPR_tag:
local2 = ((SYS) NULL);
local3 = ((AM_ATTR_EXPR) val_6347)->ob;
if (c_SYS_ob_eq_OB_OB_BOOL(((OB) local3),((OB) AM_ROUT_DEF_aget(am_6343, 0)))) {
r_6345 = INLINE_TBL_inser(r_6345, ((INLINE) INLINE_ATTR_READ_6325(((INLINE_ATTR_READ) NULL), am_6343)));
} break;
case AM_GLOBAL_EXPR_tag:
r_6345 = INLINE_TBL_inser(r_6345, ((INLINE) INLINE_GLOBAL_RE_6331(((INLINE_GLOBAL_READ) NULL), am_6343))); break;
default: ;
} break;
case AM_ASSIGN_STMT_tag:
dest_6348 = ((AM_ASSIGN_STMT) stmts_6346)->dest;
src_6349 = ((AM_ASSIGN_STMT) stmts_6346)->src_42;
if (dest_6348==NULL) {
} else
switch (dest_6348->header.tag) {
case AM_ATTR_EXPR_tag:
local5 = ((SYS) NULL);
local6 = ((AM_ATTR_EXPR) dest_6348)->ob;
if (c_SYS_ob_eq_OB_OB_BOOL(((OB) local6),((OB) AM_ROUT_DEF_aget(am_6343, 0)))) {
local7 = ((SYS) NULL);
local4 = c_SYS_ob_eq_OB_OB_BOOL(((OB) src_6349),((OB) AM_ROUT_DEF_aget(am_6343, 1)));
} else {
local4 = FALSE;
}
if (local4) {
r_6345 = INLINE_TBL_inser(r_6345, ((INLINE) INLINE_ATTR_WRIT_6338(((INLINE_ATTR_WRITE) NULL), am_6343)));
} break;
default: ;
} break;
default: ;
}
}
return r_6345;
if (!INLINE_TBL_invar(self)) {
fprintf(stderr,"Failed invariant INLINE_TBL::invariant:BOOL ./inline.sa:327:18\n");
exit(16);
}
}
AM_EXPR FLISTAM_EXPR_are_6350(FLISTAM_EXPR self, INT ind_6351) {
AM_EXPR noname6352;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6351, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_6351<0||ind_6351>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_6351];
}
AM_EXPR FLISTAM_EXPR_age(FLISTAM_EXPR self, INT ind_6353) {
AM_EXPR noname6354;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_EXPR) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6353, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTAM_EXPR_are_6350(self, ind_6353);
if (!FLISTAM_EXPR_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_EXPR}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
void PROG_AM_GENERATE_5472(PROG_AM_GENERATE self, SIG s_6355) {
ELT elt_6356;
AM_ROUT_DEF am_6357;
INT i = ((INT) 0);
AM_EXPR c_6358;
TP local0;
BOOL local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
if (!((!((s_6355==((SIG) NULL)))))) {
fprintf(stderr,"Violation of precondition ./prog.sa:736:13\n");
exit(16);
}
if ((!((SIG_TBL_sig_eq_t(self->sig_tbl, s_6355)==((SIG) NULL))))) {
return;
}
local0 = s_6355->tp;
if ((*TP_is_abstract_BOOL[local0->header.tag+TP_is_abstract_BOOL_offset])(local0)) {
PROG_AM_GENERATE_5071(self, s_6355);
return;
}
self->sig_tbl = SIG_TBL_insert_S(self->sig_tbl, s_6355);
elt_6356 = ELT_TBL_elt_with(IMPL_TBL_impl_of(self->prog->impl_tbl, s_6355->tp)->elts, s_6355);
if (elt_6356->is_external) {
local1 = ELT_is_abstract_BOOL(elt_6356);
} else {
local1 = FALSE;
}
if (local1) {
return;
}
if ((elt_6356==((ELT) NULL))) {
return;
}
am_6357 = TRANS_transform__6317(((TRANS) NULL), elt_6356);
if ((am_6357==((AM_ROUT_DEF) NULL))) {
return;
}
self->inline_tbl = INLINE_TBL_test_(self->inline_tbl, am_6357);
if (self->prog->show_am) {
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &AMfor_6359));
local4 = OUT_plus_STR_OUT(local3, SIG_str_STR(am_6357->sig_6));
OUT_plus_STR(local4, ((STR) &name_6360));
AM_OUT_AM_ROUT_D(((AM_OUT) NULL), am_6357);
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &name_6361));
}
while (1) {
if ((i<FLISTAM_EXPR_siz(am_6357->calls_58))) {
}
else {
goto after_loop;
}
c_6358 = FLISTAM_EXPR_age(am_6357->calls_58, i);
if (c_6358==NULL) {
} else
switch (c_6358->header.tag) {
case AM_ROUT_CALL_EXPR_tag:
if ((SIG_TBL_sig_eq_t(self->sig_tbl, ((AM_ROUT_CALL_EXPR) c_6358)->fun)==((SIG) NULL))) {
self->sig_list = FLISTSIG_push_SI(self->sig_list, ((AM_ROUT_CALL_EXPR) c_6358)->fun);
} break;
case AM_ITER_CALL_EXPR_tag:
if ((SIG_TBL_sig_eq_t(self->sig_tbl, ((AM_ITER_CALL_EXPR) c_6358)->fun)==((SIG) NULL))) {
self->sig_list = FLISTSIG_push_SI(self->sig_list, ((AM_ITER_CALL_EXPR) c_6358)->fun);
} break;
case AM_BND_CREATE_EXPR_tag:
if ((SIG_TBL_sig_eq_t(self->sig_tbl, ((AM_BND_CREATE_EXPR) c_6358)->fun)==((SIG) NULL))) {
self->sig_list = FLISTSIG_push_SI(self->sig_list, ((AM_BND_CREATE_EXPR) c_6358)->fun);
} break;
default: ;
}
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
if ((!(self->prog->err_seen))) {
PROG_output_am_r(self->prog, am_6357);
}
}
void PROG_AM_GENERATE_6363(PROG_AM_GENERATE self) {
TP_CLASS_TBL noname6364;
TP_CLASS tp_6365;
ELT_TBL et;
SIG_TBL sig_tbl_6366;
SIG_TBL noname6367;
SIG sig_6368;
ELT elt_6369;
TP_CLASS local0;
INT local1;
SIG local2;
{
struct TP_CLASS_TBL_elt_161_frame_struct temp6370_0;
TP_CLASS_TBL_elt_161_frame
noname6371 = &temp6370_0;
noname6371->state = 0;
while (1) {
if (noname6371->state == 0) {
noname6364 = self->prog->tp_tbl->class_tbl;
noname6371->arg0 = noname6364;
}
local0 = TP_CLASS_TBL_elt_161(noname6371);
if (noname6371->state == -1) goto after_loop;
tp_6365 = local0;
local1 = TP_CLASS_kind_INT(tp_6365);
if ((local1==shared_TP_KIND_e)) {
et = IMPL_TBL_impl_of(self->prog->impl_tbl, ((TP) tp_6365))->elts;
sig_tbl_6366 = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, ((TP) tp_6365))->sigs;
{
struct SIG_TBL_elt_SIG_frame_struct temp6373_0;
SIG_TBL_elt_SIG_frame
noname6374 = &temp6373_0;
noname6374->state = 0;
while (1) {
if (noname6374->state == 0) {
noname6367 = sig_tbl_6366;
noname6374->arg0 = noname6367;
}
local2 = SIG_TBL_elt_SIG(noname6374);
if (noname6374->state == -1) goto after_loop_6372;
sig_6368 = local2;
elt_6369 = ELT_TBL_elt_with(et, sig_6368);
if ((!(ELT_is_abstract_BOOL(elt_6369)))) {
PROG_AM_GENERATE_5472(self, sig_6368);
}
}
}
after_loop_6372: ;
}
}
}
after_loop: ;
}
SIG FLISTSIG_aref_ag(FLISTSIG self, INT ind_6375) {
SIG noname6376;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTSIG) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6375, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_6375<0||ind_6375>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_6375];
}
SIG FLISTSIG_aget_IN(FLISTSIG self, INT ind_6377) {
SIG noname6378;
BOOL local0;
INT local1;
if ((!((self==((FLISTSIG) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6377, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTSIG_aref_ag(self, ind_6377);
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
SIG FLISTSIG_pop_SIG(FLISTSIG self) {
SIG noname6379;
SIG r_6380;
INT local0;
INT local1;
local0 = FLISTSIG_size_INT(self);
if ((local0==0)) {
return ((SIG) NULL);
}
r_6380 = FLISTSIG_aget_IN(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
local1 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
FLISTSIG_aset_IN(self, local1, ((SIG) NULL));
self->loc_17 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
return r_6380;
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:90:6\n");
exit(16);
}
}
void PROG_AM_GENERATE_6381(PROG_AM_GENERATE self) {
SIG mn;
SIG s_6382;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
mn = self->prog->prog_get_main->main_sig;
if ((mn==((SIG) NULL))) {
return;
}
if (self->prog->show_generated_sig) {
local0 = OUT_create_OUT(((OUT) NULL));
local1 = OUT_plus_STR_OUT(local0, ((STR) &Outputsig));
local2 = OUT_plus_STR_OUT(local1, SIG_str_STR(mn));
OUT_plus_STR(local2, ((STR) &name_6383));
}
PROG_AM_GENERATE_5472(self, mn);
PROG_AM_GENERATE_6363(self);
while (1) {
if (FLISTSIG_is_empt(self->sig_list)) {
goto after_loop;
}
s_6382 = FLISTSIG_pop_SIG(self->sig_list);
if (self->prog->show_generated_sig) {
local3 = OUT_create_OUT(((OUT) NULL));
local4 = OUT_plus_STR_OUT(local3, ((STR) &Outputsig_6385));
local5 = OUT_plus_STR_OUT(local4, SIG_str_STR(s_6382));
OUT_plus_STR(local5, ((STR) &name_6386));
}
PROG_AM_GENERATE_5472(self, s_6382);
}
after_loop: ;
}
void PROG_do_am_gener(PROG self) {
PROG_AM_GENERATE_6381(self->prog_am_generate);
}
BOOL BE_is_const_expr(BE self, AM_EXPR e_6387) {
BOOL noname6388 = ((BOOL) 0);
if ((e_6387==((AM_EXPR) NULL))) {
return FALSE;
}
if (e_6387==NULL) {
} else
switch (e_6387->header.tag) {
case AM_VOID_CONST_tag:
return TRUE; break;
case AM_BOOL_CONST_tag:
return TRUE; break;
case AM_CHAR_CONST_tag:
return TRUE; break;
case AM_STR_CONST_tag:
return TRUE; break;
case AM_INT_CONST_tag:
return TRUE; break;
default: ;
}
return FALSE;
}
void BE_emit_globals(BE self) {
FLISTAM_GLOBAL_EXPR noname6389;
AM_GLOBAL_EXPR age_6390;
STR e_6391;
AM_GLOBAL_EXPR local0;
FILE_20 local1;
FILE_20 local2;
FILE_20 local3;
FILE_20 local4;
FILE_20 local5;
FILE_20 local6;
FILE_20 local7;
STR local8;
STR local9;
STR local10;
BOOL local11;
BOOL local12;
TP local13;
FILE_20 local14;
FILE_20 local15;
FILE_20 local16;
FILE_20 local17;
FILE_20 local18;
STR local19;
STR local20;
STR local21;
STR local22;
STR local23;
STR local24;
STR local25;
STR local26;
STR local27;
STR local28;
STR local29;
STR local30;
FILE_20 local31;
FILE_20 local32;
FILE_20 local33;
FILE_20 local34;
FILE_20 local35;
FILE_20 local36;
FILE_20 local37;
STR local38;
STR local39;
STR local40;
FILE_20 local41;
STR local42;
STR local43;
STR local44;
FILE_20 local45;
FILE_20 local46;
FILE_20 local47;
FILE_20 local48;
{
struct FLISTAM_GLOBAL_E_5942_frame_struct temp6392_0;
FLISTAM_GLOBAL_E_5942_frame
noname6393 = &temp6392_0;
noname6393->state = 0;
while (1) {
if (noname6393->state == 0) {
noname6389 = self->prog->global_tbl->top_sort;
noname6393->arg0 = noname6389;
}
local0 = FLISTAM_GLOBAL_E_5942(noname6393);
if (noname6393->state == -1) goto after_loop;
age_6390 = local0;
if (BE_is_const_expr(self, age_6390->init)) {
FILE_plus_CHAR(self->globals_c, '\n');
if (age_6390->is_const) {
(fwrite(((STR) &const_6394)->arr_part,((STR) &const_6394)->asize,1,self->globals_h->fp));
}
e_6391 = BE_emit_expr_AM_(self, age_6390->init);
if (age_6390->is_const) {
(fwrite(((STR) &const_6395)->arr_part,((STR) &const_6395)->asize,1,self->globals_c->fp));
}
local1 = self->globals_c;
local2 = FILE_plus_STR_FILE(local1, BE_mangle_OB_STR(self, ((OB) age_6390->tp_at)));
local3 = FILE_plus_CHAR_FILE(local2, ' ');
local4 = FILE_plus_STR_FILE(local3, BE_mangle_OB_STR(self, ((OB) age_6390)));
local5 = FILE_plus_STR_FILE(local4, ((STR) &name_6396));
local6 = FILE_plus_STR_FILE(local5, e_6391);
FILE_plus_CHAR(local6, ';');
local7 = self->globals_c;
local8 = ((STR) &Const);
local9 = STR_plus_STR_STR(local8, BE_mangle_OB_STR(self, ((OB) age_6390->class_tp)));
local10 = STR_plus_STR_STR(local9, ((STR) &name_6397));
BE_comment_FILE_STR(self, local7, STR_plus_STR_STR(local10, age_6390->name_19.str_4));
}
else {
if ((!((age_6390->init==((AM_EXPR) NULL))))) {
local11 = TRUE;
} else {
local13 = age_6390->tp_at;
if ((*TP_is_value_BOOL[local13->header.tag+TP_is_value_BOOL_offset])(local13)) {
local12 = (!(BE_is_built_in_t(self, age_6390->tp_at)));
} else {
local12 = FALSE;
}
local11 = local12;
}
if (local11) {
local14 = FILE_plus_CHAR_FILE(self->globals_c, '\n');
local15 = FILE_plus_STR_FILE(local14, BE_mangle_OB_STR(self, ((OB) age_6390->tp_at)));
local16 = FILE_plus_CHAR_FILE(local15, ' ');
local17 = FILE_plus_STR_FILE(local16, BE_mangle_OB_STR(self, ((OB) age_6390)));
FILE_plus_CHAR(local17, ';');
local18 = self->globals_c;
local19 = ((STR) &Shared);
local20 = STR_plus_STR_STR(local19, BE_mangle_OB_STR(self, ((OB) age_6390->class_tp)));
local21 = STR_plus_STR_STR(local20, ((STR) &name_6398));
BE_comment_FILE_STR(self, local18, STR_plus_STR_STR(local21, age_6390->name_19.str_4));
local22 = ((STR) &Initializeshared);
local23 = STR_plus_STR_STR(local22, BE_mangle_OB_STR(self, ((OB) age_6390->class_tp)));
local24 = STR_plus_STR_STR(local23, ((STR) &name_6399));
BE_comment_STR(self, STR_plus_STR_STR(local24, age_6390->name_19.str_4));
if ((!((age_6390->init==((AM_EXPR) NULL))))) {
local25 = BE_mangle_OB_STR(self, ((OB) age_6390));
local26 = STR_plus_STR_STR(local25, ((STR) &name_6400));
local27 = STR_plus_STR_STR(local26, BE_emit_expr_AM_(self, age_6390->init));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local27, ';'));
}
else {
local28 = BE_mangle_OB_STR(self, ((OB) age_6390));
local29 = STR_plus_STR_STR(local28, ((STR) &name_6401));
local30 = STR_plus_STR_STR(local29, BE_default_init_(self, age_6390->tp_at));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local30, ';'));
}
}
else {
local31 = FILE_plus_CHAR_FILE(self->globals_c, '\n');
local32 = FILE_plus_STR_FILE(local31, BE_mangle_OB_STR(self, ((OB) age_6390->tp_at)));
local33 = FILE_plus_CHAR_FILE(local32, ' ');
local34 = FILE_plus_STR_FILE(local33, BE_mangle_OB_STR(self, ((OB) age_6390)));
local35 = FILE_plus_STR_FILE(local34, ((STR) &name_6402));
local36 = FILE_plus_STR_FILE(local35, BE_default_init_(self, age_6390->tp_at));
FILE_plus_CHAR(local36, ';');
local37 = self->globals_c;
local38 = ((STR) &Shared_6403);
local39 = STR_plus_STR_STR(local38, BE_mangle_OB_STR(self, ((OB) age_6390->class_tp)));
local40 = STR_plus_STR_STR(local39, ((STR) &name_6404));
BE_comment_FILE_STR(self, local37, STR_plus_STR_STR(local40, age_6390->name_19.str_4));
}
}
local41 = self->globals_h;
local42 = ((STR) &Const_6405);
local43 = STR_plus_STR_STR(local42, BE_mangle_OB_STR(self, ((OB) age_6390->class_tp)));
local44 = STR_plus_STR_STR(local43, ((STR) &name_6406));
BE_comment_FILE_STR(self, local41, STR_plus_STR_STR(local44, age_6390->name_19.str_4));
(fwrite(((STR) &extern_6407)->arr_part,((STR) &extern_6407)->asize,1,self->globals_h->fp));
local45 = self->globals_h;
local46 = FILE_plus_STR_FILE(local45, BE_mangle_OB_STR(self, ((OB) age_6390->tp_at)));
local47 = FILE_plus_CHAR_FILE(local46, ' ');
local48 = FILE_plus_STR_FILE(local47, BE_mangle_OB_STR(self, ((OB) age_6390)));
(fwrite(((STR) &name_6408)->arr_part,((STR) &name_6408)->asize,1,local48->fp));
}
}
after_loop: ;
}
FILE_20 FILE_plus_FSTR_FILE(FILE_20 self, FSTR f_6409) {
FILE_20 noname6410;
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:169:7\n");
exit(16);
}
FILE_plus_FSTR(self, f_6409);
return self;
}
void BE_define_main_a(BE self) {
STR main_tp;
FSTR local0;
STR local1;
TP local2;
STR local3;
STR local4;
STR local5;
STR local6;
STR local7;
STR local8;
STR local9;
STR local10;
FILE_20 local11;
main_tp = BE_mangle_OB_STR(self, ((OB) self->main_sig->tp));
FILE_plus_CHAR(self->code_c, '\n');
BE_comment_FILE_STR(self, self->code_c, ((STR) &Definitionofmain));
(fwrite(((STR) &intmainintargcch)->arr_part,((STR) &intmainintargcch)->asize,1,self->code_c->fp));
local0 = FSTR_create_FSTR(((FSTR) NULL));
self->routine_code = FSTR_plus_STR_FSTR(local0, ((STR) &name_6411));
BE_in(self);
BE_ndefer_STR(self, STR_plus_STR_STR(main_tp, ((STR) &main_ob_6412)));
if ((!((self->main_sig->args_7==((ARRAYTP) NULL))))) {
local1 = BE_mangle_OB_STR(self, ((OB) self->prog->tp_builtin->arr_of_str));
BE_ndefer_STR(self, STR_plus_STR_STR(local1, ((STR) &main_args_6413)));
BE_ndefer_STR(self, ((STR) &intijlength));
BE_ndefer_STR(self, ((STR) &STRs));
}
BE_emit_globals(self);
BE_ndefer_STR(self, ((STR) &main_ob_6414));
local2 = self->main_sig->tp;
if ((*TP_is_value_BOOL[local2->header.tag+TP_is_value_BOOL_offset])(local2)) {
BE_defer_STR(self, STR_plus_STR_STR(main_tp, ((STR) &S_zero_6415)));
}
else {
local3 = BE_allocate_TP_STR(self, self->main_sig->tp);
BE_defer_STR(self, STR_plus_STR_STR(local3, ((STR) &name_6416)));
}
if ((!((self->main_sig->args_7==((ARRAYTP) NULL))))) {
local4 = ((STR) &main_args_6417);
local5 = STR_plus_STR_STR(local4, BE_array_allocat(self, ((TP) self->prog->tp_builtin->arr_of_str), ((STR) &argc_6418)));
BE_ndefer_STR(self, STR_plus_STR_STR(local5, ((STR) &name_6419)));
BE_ndefer_STR(self, ((STR) &main_argsasizeargc));
BE_ndefer_STR(self, ((STR) &fori0iargci));
BE_ndefer_STR(self, ((STR) &forlength0argvil));
local6 = ((STR) &s_6420);
local7 = STR_plus_STR_STR(local6, BE_array_allocat(self, ((TP) self->prog->tp_builtin->str_4), ((STR) &length_6421)));
BE_ndefer_STR(self, STR_plus_STR_STR(local7, ((STR) &name_6422)));
BE_ndefer_STR(self, ((STR) &sasizelength));
BE_ndefer_STR(self, ((STR) &forj0jlengthjsar));
BE_ndefer_STR(self, ((STR) &main_argsarr_partis));
BE_ndefer_STR(self, ((STR) &name_6423));
}
if (self->prog->options_55->null_segfaults) {
BE_ndefer_STR(self, ((STR) &signalSIGSEGVvoi));
}
BE_ndefer_STR(self, ((STR) &ifsetjmplast_pro_6424));
BE_in(self);
if ((!((self->main_sig->ret==((TP) NULL))))) {
if ((!((self->main_sig->args_7==((ARRAYTP) NULL))))) {
BE_ndefer_STR(self, ((STR) &returnsather_mai));
}
else {
BE_ndefer_STR(self, ((STR) &returnsather_mai_6425));
}
}
else {
if ((!((self->main_sig->args_7==((ARRAYTP) NULL))))) {
BE_ndefer_STR(self, ((STR) &sather_mainmain_));
}
else {
BE_ndefer_STR(self, ((STR) &sather_mainmain__6426));
}
}
BE_out(self);
BE_ndefer_STR(self, ((STR) &else_6427));
BE_in(self);
local8 = ((STR) &ifexceptionheadertag);
local9 = STR_plus_STR_STR(local8, BE_tag_for_TP_STR(self, ((TP) self->prog->tp_builtin->str_4)));
local10 = STR_plus_STR_STR(local9, ((STR) &fprintfstderrUnc));
BE_ndefer_STR(self, STR_plus_STR_STR(local10, ((STR) &STRexceptionarr_part)));
BE_ndefer_STR(self, ((STR) &elsefprintfstder));
BE_ndefer_STR(self, ((STR) &exit16_6428));
BE_out(self);
BE_ndefer_STR(self, ((STR) &name_6429));
BE_out(self);
local11 = FILE_plus_FSTR_FILE(self->code_c, self->routine_code);
(fwrite(((STR) &name_6430)->arr_part,((STR) &name_6430)->asize,1,local11->fp));
}
AM_STR_CONST AM_STR_CONST_cre_6431(AM_STR_CONST self) {
AM_STR_CONST noname6432;
AM_STR_CONST local0;
local0 = ((AM_STR_CONST) sbi_alloc(sizeof(struct AM_STR_CONST_struct), AM_STR_CONST_tag));
return local0;
}
STR BE_value_compare(BE self, TP tp_6433, STR e1_6434, STR e2_6435) {
STR noname6436;
AM_OB_DEF aod;
BOOL after_first = ((BOOL) 0);
STR res;
FMAPIDENTTP noname6437;
TUPIDENTTP p = TUPIDENTTP_zero;
STR key_6438;
INT noname6439 = ((INT) 0);
INT noname6440 = ((INT) 0);
INT i = ((INT) 0);
TP local0;
STR local1;
STR local2;
STR local3;
TUPIDENTTP local4;
OB local5;
TP local6;
TP local7;
STR local8;
STR local9;
STR local10;
STR local11;
STR local12;
STR local13;
STR local14;
STR local15;
STR local16;
STR local17;
STR local18;
INT local19;
INT local20;
INT local21;
INT local19e;
STR local22;
STR local23;
STR local24;
STR local25;
STR local26;
STR local27;
STR local28;
STR local29;
local0 = tp_6433;
if (!((*TP_is_value_BOOL[local0->header.tag+TP_is_value_BOOL_offset])(local0))) {
fprintf(stderr,"Violation of precondition ./be.sa:2394:17\n");
exit(16);
}
if (BE_is_built_in_t(self, tp_6433)) {
local1 = STR_plus_STR_STR(((STR) &name_6441), e1_6434);
local2 = STR_plus_STR_STR(local1, ((STR) &name_6442));
local3 = STR_plus_STR_STR(local2, e2_6435);
return STR_plus_STR_STR(local3, ((STR) &name_6443));
}
aod = PROG_am_ob_def_f(self->prog, tp_6433);
after_first = FALSE;
res = ((STR) &name_6444);
if ((!((aod->at==((FMAPIDENTTP) NULL))))) {
{
struct FMAPIDENTTP_pair_frame_struct temp6445_0;
FMAPIDENTTP_pair_frame
noname6446 = &temp6445_0;
noname6446->state = 0;
while (1) {
if (noname6446->state == 0) {
noname6437 = aod->at;
noname6446->arg0 = noname6437;
}
local4 = FMAPIDENTTP_pair(noname6446);
if (noname6446->state == -1) goto after_loop;
p = local4;
local5 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local5)->value_part = p.t1;
key_6438 = BE_mangle_OB_STR(self, local5);
if (after_first) {
res = STR_plus_STR_STR(res, ((STR) &name_6447));
}
local6 = p.t2;
if ((*TP_is_value_BOOL[local6->header.tag+TP_is_value_BOOL_offset])(local6)) {
local7 = p.t2;
local8 = STR_plus_CHAR_STR(e1_6434, '.');
local9 = STR_plus_STR_STR(local8, key_6438);
local10 = STR_plus_CHAR_STR(e2_6435, '.');
res = STR_plus_STR_STR(res, BE_value_compare(self, local7, local9, STR_plus_STR_STR(local10, key_6438)));
}
else {
local11 = STR_plus_CHAR_STR(res, '(');
local12 = STR_plus_STR_STR(local11, e1_6434);
local13 = STR_plus_CHAR_STR(local12, '.');
local14 = STR_plus_STR_STR(local13, key_6438);
local15 = STR_plus_STR_STR(local14, ((STR) &name_6448));
local16 = STR_plus_STR_STR(local15, e2_6435);
local17 = STR_plus_CHAR_STR(local16, '.');
local18 = STR_plus_STR_STR(local17, key_6438);
res = STR_plus_CHAR_STR(local18, ')');
}
after_first = TRUE;
}
}
after_loop: ;
}
if ((!((aod->arr==((TP) NULL))))) {
{
BOOL noname6451 = TRUE;
while (1) {
if (noname6451) {
noname6451 = FALSE;
noname6439 = 0;
noname6440 = aod->asize;
local20 = noname6439;
local21 = noname6440;
local19 = local20; local19e = local20+local21;
} else {
local19++;
}
if (local19>=local19e) goto after_loop_6449;
i = local19;
if (after_first) {
res = STR_plus_STR_STR(res, ((STR) &name_6452));
}
local22 = STR_plus_STR_STR(res, ((STR) &name_6453));
local23 = STR_plus_STR_STR(local22, e1_6434);
local24 = STR_plus_STR_STR(local23, ((STR) &arr_part_6454));
local25 = STR_plus_INT_STR(local24, i);
local26 = STR_plus_STR_STR(local25, ((STR) &name_6455));
local27 = STR_plus_STR_STR(local26, e2_6435);
local28 = STR_plus_STR_STR(local27, ((STR) &arr_part_6456));
local29 = STR_plus_INT_STR(local28, i);
res = STR_plus_STR_STR(local29, ((STR) &name_6457));
after_first = TRUE;
}
}
after_loop_6449: ;
}
return res;
}
void BE_generate_sys_(BE self) {
FMAPTPINT noname6458;
TUPTPINT p = TUPTPINT_zero;
AM_STR_CONST dummy_6459;
FMAPTPINT noname6460;
TP tp_6461;
STR tpstr;
TUPTPINT local0;
FILE_20 local1;
FILE_20 local2;
FILE_20 local3;
FILE_20 local4;
TP local5;
FILE_20 local6;
FILE_20 local7;
FILE_20 local8;
FILE_20 local9;
TP local10;
TP local11;
FILE_20 local12;
FILE_20 local13;
FILE_20 local14;
FILE_20 local15;
FILE_20 local16;
FILE_20 local17;
FILE_20 local18;
FILE_20 local19;
FILE_20 local20;
FILE_20 local21;
(fwrite(((STR) &STRc_SYS_str_for)->arr_part,((STR) &STRc_SYS_str_for)->asize,1,self->code_c->fp));
(fwrite(((STR) &switchi)->arr_part,((STR) &switchi)->asize,1,self->code_c->fp));
{
struct FMAPTPINT_pairs__frame_struct temp6462_0;
FMAPTPINT_pairs__frame
noname6463 = &temp6462_0;
noname6463->state = 0;
while (1) {
if (noname6463->state == 0) {
noname6458 = self->tags;
noname6463->arg0 = noname6458;
}
local0 = FMAPTPINT_pairs_(noname6463);
if (noname6463->state == -1) goto after_loop;
p = local0;
local1 = FILE_plus_STR_FILE(self->tags_h, ((STR) &define_6464));
local2 = FILE_plus_STR_FILE(local1, BE_mangle_OB_STR(self, ((OB) p.t1)));
local3 = FILE_plus_STR_FILE(local2, ((STR) &S_tag_6465));
local4 = FILE_plus_INT_FILE(local3, p.t2);
(fwrite(((STR) &name_6466)->arr_part,((STR) &name_6466)->asize,1,local4->fp));
dummy_6459 = AM_STR_CONST_cre_6431(((AM_STR_CONST) NULL));
local5 = p.t1;
dummy_6459->bval = (*TP_str_STR[local5->header.tag+TP_str_STR_offset])(local5);
local6 = FILE_plus_STR_FILE(self->code_c, ((STR) &case_6467));
local7 = FILE_plus_STR_FILE(local6, BE_mangle_OB_STR(self, ((OB) p.t1)));
local8 = FILE_plus_STR_FILE(local7, ((STR) &S_tagreturn));
local9 = FILE_plus_STR_FILE(local8, BE_emit_str_cons(self, dummy_6459));
(fwrite(((STR) &name_6468)->arr_part,((STR) &name_6468)->asize,1,local9->fp));
}
}
after_loop: ;
(fwrite(((STR) &defaultfprintfst)->arr_part,((STR) &defaultfprintfst)->asize,1,self->code_c->fp));
(fwrite(((STR) &name_6469)->arr_part,((STR) &name_6469)->asize,1,self->code_c->fp));
(fwrite(((STR) &name_6470)->arr_part,((STR) &name_6470)->asize,1,self->code_c->fp));
(fwrite(((STR) &BOOLc_SYS_ob_eq_)->arr_part,((STR) &BOOLc_SYS_ob_eq_)->asize,1,self->code_c->fp));
(fwrite(((STR) &INTt1t2)->arr_part,((STR) &INTt1t2)->asize,1,self->code_c->fp));
(fwrite(((STR) &ifo1o2returnTRUE)->arr_part,((STR) &ifo1o2returnTRUE)->asize,1,self->code_c->fp));
(fwrite(((STR) &ifo1NULLo2NULLre)->arr_part,((STR) &ifo1NULLo2NULLre)->asize,1,self->code_c->fp));
(fwrite(((STR) &t1o1headertagt2o)->arr_part,((STR) &t1o1headertagt2o)->asize,1,self->code_c->fp));
(fwrite(((STR) &ift1t2returnFALSE)->arr_part,((STR) &ift1t2returnFALSE)->asize,1,self->code_c->fp));
(fwrite(((STR) &switcht1)->arr_part,((STR) &switcht1)->asize,1,self->code_c->fp));
{
struct FMAPTPINT_keys_TP_frame_struct temp6472_0;
FMAPTPINT_keys_TP_frame
noname6473 = &temp6472_0;
noname6473->state = 0;
while (1) {
if (noname6473->state == 0) {
noname6460 = self->tags;
noname6473->arg0 = noname6460;
}
local10 = FMAPTPINT_keys_TP(noname6473);
if (noname6473->state == -1) goto after_loop_6471;
tp_6461 = local10;
tpstr = BE_mangle_OB_STR(self, ((OB) tp_6461));
local11 = tp_6461;
if ((*TP_is_value_BOOL[local11->header.tag+TP_is_value_BOOL_offset])(local11)) {
local12 = FILE_plus_STR_FILE(self->code_c, ((STR) &case_6474));
local13 = FILE_plus_STR_FILE(local12, tpstr);
(fwrite(((STR) &S_tag_6475)->arr_part,((STR) &S_tag_6475)->asize,1,local13->fp));
BE_in(self);
local14 = FILE_plus_STR_FILE(self->code_c, ((STR) &name_6476));
local15 = FILE_plus_STR_FILE(local14, tpstr);
(fwrite(((STR) &v1v2)->arr_part,((STR) &v1v2)->asize,1,local15->fp));
local16 = FILE_plus_STR_FILE(self->code_c, ((STR) &v1));
local17 = FILE_plus_STR_FILE(local16, tpstr);
(fwrite(((STR) &S_boxedo1value_part)->arr_part,((STR) &S_boxedo1value_part)->asize,1,local17->fp));
local18 = FILE_plus_STR_FILE(self->code_c, ((STR) &v2));
local19 = FILE_plus_STR_FILE(local18, tpstr);
(fwrite(((STR) &S_boxedo2value_part)->arr_part,((STR) &S_boxedo2value_part)->asize,1,local19->fp));
local20 = FILE_plus_STR_FILE(self->code_c, ((STR) &return_6477));
local21 = FILE_plus_STR_FILE(local20, BE_value_compare(self, tp_6461, ((STR) &v1_6478), ((STR) &v2_6479)));
(fwrite(((STR) &name_6480)->arr_part,((STR) &name_6480)->asize,1,local21->fp));
BE_out(self);
}
}
}
after_loop_6471: ;
(fwrite(((STR) &defaultreturnFALSE)->arr_part,((STR) &defaultreturnFALSE)->asize,1,self->code_c->fp));
BE_comment_FILE_STR(self, self->code_c, ((STR) &Notavaluetype));
(fwrite(((STR) &name_6481)->arr_part,((STR) &name_6481)->asize,1,self->code_c->fp));
(fwrite(((STR) &name_6482)->arr_part,((STR) &name_6482)->asize,1,self->code_c->fp));
}
FLISTTP FLISTTP_create_F(FLISTTP self) {
FLISTTP noname6483;
return ((FLISTTP) NULL);
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:55:9\n");
exit(16);
}
}
AM_ROUT_DEF FMAPSIGAM_ROUT_D_6484(FMAPSIGAM_ROUT_DEF self, SIG k) {
AM_ROUT_DEF noname6485;
INT h = ((INT) 0);
SIG tk;
SIG tk_6486;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPSIGAM_ROUT_DEF) NULL))) {
return ((AM_ROUT_DEF) NULL);
}
local0 = FMAPSIGAM_ROUT_D_4146(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, h)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk, k)) {
return (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, h)).t2;
}
else {
if (FMAPSIGAM_ROUT_D_4151(self, tk, FMAPSIGAM_ROUT_D_4119(self))) {
goto after_loop;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
local2 = (self->asize);
if ((h==(c_INT_minus_INT_INT_chk(local2,1)))) {
h = 0;
while (1) {
tk_6486 = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, h)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk_6486, k)) {
return (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, h)).t2;
}
else {
if (FMAPSIGAM_ROUT_D_4151(self, tk_6486, FMAPSIGAM_ROUT_D_4119(self))) {
goto after_loop_6488;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_6488: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:150:15\n");
exit(16);
}
}
return ((AM_ROUT_DEF) NULL);
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_6490(FMAPSIGAM_ROUT_DEF self) {
FMAPSIGAM_ROUT_DEF noname6491;
INT ns = ((INT) 0);
FMAPSIGAM_ROUT_DEF r_6492;
FMAPSIGAM_ROUT_DEF noname6493;
BOOL local0;
INT local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
TUPSIGAM_ROUT_DEF local7;
if ((!((self==((FMAPSIGAM_ROUT_DEF) NULL))))) {
local1 = self->hsize;
local2 = (self->asize);
local3 = (c_INT_minus_INT_INT_chk(local2,1));
local0 = (local1<(c_INT_div_INT_INT_chk(local3,4)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:209:21\n");
exit(16);
}
local4 = (self->asize);
local5 = (c_INT_minus_INT_INT_chk(local4,1));
local6 = (c_INT_div_INT_INT_chk(local5,2));
ns = (c_INT_plus_INT_INT_chk(local6,1));
r_6492 = FMAPSIGAM_ROUT_D_4126(self, ns);
{
struct FMAPSIGAM_ROUT_D_4144_frame_struct temp6494_0;
FMAPSIGAM_ROUT_D_4144_frame
noname6495 = &temp6494_0;
noname6495->state = 0;
while (1) {
if (noname6495->state == 0) {
noname6493 = self;
noname6495->arg0 = noname6493;
}
local7 = FMAPSIGAM_ROUT_D_4144(noname6495);
if (noname6495->state == -1) goto after_loop;
r_6492 = FMAPSIGAM_ROUT_D_4136(r_6492, local7);
}
}
after_loop: ;
return r_6492;
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_6496(FMAPSIGAM_ROUT_DEF self, SIG k) {
FMAPSIGAM_ROUT_DEF noname6497;
INT h = ((INT) 0);
SIG tk;
INT i = ((INT) 0);
SIG tk_6498;
INT hsh = ((INT) 0);
INT local0;
INT local1;
INT local2;
TUPSIGAM_ROUT_DEF local3;
SIG local4;
INT local5;
INT local6;
INT local7;
BOOL local8;
TUPSIGAM_ROUT_DEF local9;
SIG local10;
BOOL local11;
TUPSIGAM_ROUT_DEF local12;
SIG local13;
BOOL local14;
INT local15;
INT local16;
INT local17;
INT local18;
if ((self==((FMAPSIGAM_ROUT_DEF) NULL))) {
return ((FMAPSIGAM_ROUT_DEF) NULL);
}
local0 = FMAPSIGAM_ROUT_D_4146(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, h)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk, FMAPSIGAM_ROUT_D_4119(self))) {
return self;
}
else {
if (FMAPSIGAM_ROUT_D_4151(self, tk, k)) {
goto after_loop;
}
}
local2 = (self->asize);
if ((h==(c_INT_minus_INT_INT_chk(local2,2)))) {
h = 0;
}
else {
h = (c_INT_plus_INT_INT_chk(h,1));
}
}
after_loop: ;
local3 = TUPSIGAM_ROUT_DEF_zero;
local4 = FMAPSIGAM_ROUT_D_4119(self);
FMAPSIGAM_ROUT_D_4153(self, h, TUPSIGAM_ROUT_DE_4124(local3, local4, ((AM_ROUT_DEF) NULL)));
self->hsize = (c_INT_minus_INT_INT_chk(self->hsize,1));
i = h;
while (1) {
local5 = (self->asize);
if ((i==(c_INT_minus_INT_INT_chk(local5,2)))) {
i = 0;
}
else {
i = (c_INT_plus_INT_INT_chk(i,1));
}
tk_6498 = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(self, i)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk_6498, FMAPSIGAM_ROUT_D_4119(self))) {
goto after_loop_6500;
}
local6 = FMAPSIGAM_ROUT_D_4146(self, tk_6498);
local7 = (self->asize);
hsh = (local6&(c_INT_minus_INT_INT_chk(local7,2)));
if ((hsh<=i)) {
if ((h<i)) {
local8 = (h>=hsh);
} else {
local8 = FALSE;
}
if (local8) {
FMAPSIGAM_ROUT_D_4153(self, h, FMAPSIGAM_ROUT_D_4148(self, i));
h = i;
local9 = TUPSIGAM_ROUT_DEF_zero;
local10 = FMAPSIGAM_ROUT_D_4119(self);
FMAPSIGAM_ROUT_D_4153(self, i, TUPSIGAM_ROUT_DE_4124(local9, local10, ((AM_ROUT_DEF) NULL)));
}
}
else {
if ((h>=hsh)) {
local11 = TRUE;
} else {
local11 = (h<i);
}
if (local11) {
FMAPSIGAM_ROUT_D_4153(self, h, FMAPSIGAM_ROUT_D_4148(self, i));
h = i;
local12 = TUPSIGAM_ROUT_DEF_zero;
local13 = FMAPSIGAM_ROUT_D_4119(self);
FMAPSIGAM_ROUT_D_4153(self, i, TUPSIGAM_ROUT_DE_4124(local12, local13, ((AM_ROUT_DEF) NULL)));
}
}
}
after_loop_6500: ;
local15 = (self->asize);
if ((local15>=33)) {
local16 = self->hsize;
local17 = (self->asize);
local18 = (c_INT_minus_INT_INT_chk(local17,1));
local14 = (local16<(c_INT_div_INT_INT_chk(local18,4)));
} else {
local14 = FALSE;
}
if (local14) {
return FMAPSIGAM_ROUT_D_6490(self);
}
return self;
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:217:9\n");
exit(16);
}
}
STR BE_emit_dispatch(BE self, SIG s_6502) {
STR noname6503;
STR res;
ARRAYTP noname6504;
TP e_6505;
INT noname6506 = ((INT) 0);
INT noname6507 = ((INT) 0);
INT noname6508 = ((INT) 0);
INT i = ((INT) 0);
STR local0;
FILE_20 local1;
STR local2;
FILE_20 local3;
FILE_20 local4;
FILE_20 local5;
FILE_20 local6;
FILE_20 local7;
FILE_20 local8;
FILE_20 local9;
FILE_20 local10;
FILE_20 local11;
FILE_20 local12;
TP local13;
FILE_20 local14;
FILE_20 local15;
FILE_20 local16;
INT local17;
FILE_20 local18;
FILE_20 local19;
FILE_20 local20;
INT local21;
INT local22;
INT local23;
FILE_20 local24;
FILE_20 local25;
local0 = BE_mangle_OB_STR(self, ((OB) s_6502));
res = STR_plus_STR_STR(local0, ((STR) &S_unbox));
FILE_plus_CHAR(self->code_c, '\n');
local1 = self->code_c;
local2 = ((STR) &Wrappertounbox);
BE_comment_FILE_STR(self, local1, STR_plus_STR_STR(local2, SIG_str_STR(s_6502)));
FILE_plus_CHAR(self->code_c, '\n');
if ((s_6502->ret==((TP) NULL))) {
(fwrite(((STR) &void_6509)->arr_part,((STR) &void_6509)->asize,1,self->code_c->fp));
(fwrite(((STR) &void_6510)->arr_part,((STR) &void_6510)->asize,1,self->decs_h->fp));
}
else {
local3 = self->code_c;
local4 = FILE_plus_STR_FILE(local3, BE_mangle_OB_STR(self, ((OB) s_6502->ret)));
FILE_plus_CHAR(local4, ' ');
local5 = self->decs_h;
local6 = FILE_plus_STR_FILE(local5, BE_mangle_OB_STR(self, ((OB) s_6502->ret)));
FILE_plus_CHAR(local6, ' ');
}
local7 = FILE_plus_STR_FILE(self->code_c, res);
local8 = FILE_plus_STR_FILE(local7, ((STR) &name_6511));
local9 = FILE_plus_STR_FILE(local8, BE_mangle_OB_STR(self, ((OB) s_6502->tp)));
(fwrite(((STR) &S_boxedarg0)->arr_part,((STR) &S_boxedarg0)->asize,1,local9->fp));
local10 = FILE_plus_STR_FILE(self->decs_h, res);
local11 = FILE_plus_STR_FILE(local10, ((STR) &name_6512));
local12 = FILE_plus_STR_FILE(local11, BE_mangle_OB_STR(self, ((OB) s_6502->tp)));
(fwrite(((STR) &S_boxed_6513)->arr_part,((STR) &S_boxed_6513)->asize,1,local12->fp));
{
struct ARRAYTP_elt_TP_frame_struct temp6514_0;
ARRAYTP_elt_TP_frame
noname6515 = &temp6514_0;
struct INT_up_INT_frame_struct temp6514_1;
INT_up_INT_frame
noname6516 = &temp6514_1;
noname6515->state = 0;
noname6516->state = 0;
while (1) {
if (noname6515->state == 0) {
noname6504 = s_6502->args_7;
noname6515->arg0 = noname6504;
}
local13 = ARRAYTP_elt_TP(noname6515);
if (noname6515->state == -1) goto after_loop;
e_6505 = local13;
local14 = FILE_plus_STR_FILE(self->code_c, ((STR) &name_6517));
local15 = FILE_plus_STR_FILE(local14, BE_mangle_OB_STR(self, ((OB) e_6505)));
local16 = FILE_plus_STR_FILE(local15, ((STR) &arg_6518));
if (noname6516->state == 0) {
noname6506 = 1;
noname6516->arg0 = noname6506;
}
local17 = INT_up_INT(noname6516);
if (noname6516->state == -1) goto after_loop;
FILE_plus_INT(local16, local17);
local18 = FILE_plus_STR_FILE(self->decs_h, ((STR) &name_6519));
(fwrite(BE_mangle_OB_STR(self, ((OB) e_6505))->arr_part,BE_mangle_OB_STR(self, ((OB) e_6505))->asize,1,local18->fp));
}
}
after_loop: ;
(fwrite(((STR) &name_6520)->arr_part,((STR) &name_6520)->asize,1,self->code_c->fp));
(fwrite(((STR) &name_6521)->arr_part,((STR) &name_6521)->asize,1,self->decs_h->fp));
FILE_plus_CHAR(self->code_c, ' ');
if ((!((s_6502->ret==((TP) NULL))))) {
(fwrite(((STR) &return_6522)->arr_part,((STR) &return_6522)->asize,1,self->code_c->fp));
}
local19 = self->code_c;
local20 = FILE_plus_STR_FILE(local19, BE_mangle_OB_STR(self, ((OB) s_6502)));
(fwrite(((STR) &arg0value_part)->arr_part,((STR) &arg0value_part)->asize,1,local20->fp));
{
BOOL noname6525 = TRUE;
while (1) {
if (noname6525) {
noname6525 = FALSE;
noname6507 = 1;
noname6508 = SIG_num_args_INT(s_6502);
local22 = noname6507;
local23 = noname6508;
local21 = local22;
} else {
local21++;
}
if (local21>local23) goto after_loop_6523;
i = local21;
local24 = FILE_plus_STR_FILE(self->code_c, ((STR) &arg_6526));
FILE_plus_INT(local24, i);
}
}
after_loop_6523: ;
local25 = FILE_plus_STR_FILE(self->code_c, ((STR) &name_6527));
(fwrite(((STR) &name_6528)->arr_part,((STR) &name_6528)->asize,1,local25->fp));
return res;
}
void BE_emit_dispatch_6529(BE self, AM_ROUT_DEF f_6530) {
FLISTTP des_6531;
INT mintag = ((INT) 0);
INT maxtag = ((INT) 0);
STR cst = ((STR) NULL);
STR decl = ((STR) NULL);
FSETTP gh = ((FSETTP) NULL);
TP fst;
FSETTP noname6532;
TP t_6533;
INT tag_6534 = ((INT) 0);
ARRAYTP noname6535;
TP e_6536;
INT noname6537 = ((INT) 0);
INT noname6538 = ((INT) 0);
INT i = ((INT) 0);
BOOL exists = ((BOOL) 0);
FLISTTP noname6539;
TP e_6540;
INT tag_6541 = ((INT) 0);
SIG real_sig;
STR functocall = ((STR) NULL);
AM_ROUT_DEF am_6542;
TP local0;
FILE_20 local1;
STR local2;
FILE_20 local3;
FILE_20 local4;
FILE_20 local5;
FILE_20 local6;
FILE_20 local7;
FILE_20 local8;
STR local9;
STR local10;
STR local11;
STR local12;
STR local13;
TP local14;
STR local15;
STR local16;
FILE_20 local17;
FILE_20 local18;
FILE_20 local19;
INT local20;
INT local21;
INT local22;
TP local23;
IFC local24;
TP local25;
FILE_20 local26;
FILE_20 local27;
FILE_20 local28;
des_6531 = FLISTTP_create_F(((FLISTTP) NULL));
mintag = (SINT_MAX);
maxtag = (SINT_MIN);
fst = f_6530->sig_6->tp;
if (fst==NULL) {
} else
switch (fst->header.tag) {
case TP_CLASS_tag:
gh = PROG_descendants(self->prog, ((TP_CLASS) fst)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./be.sa:1404:16\n");
exit(16);
}
{
struct FSETTP_elt_TP_frame_struct temp6543_0;
FSETTP_elt_TP_frame
noname6544 = &temp6543_0;
noname6544->state = 0;
while (1) {
if (noname6544->state == 0) {
noname6532 = gh;
noname6544->arg0 = noname6532;
}
local0 = FSETTP_elt_TP(noname6544);
if (noname6544->state == -1) goto after_loop;
t_6533 = local0;
des_6531 = FLISTTP_push_TP_(des_6531, t_6533);
tag_6534 = BE_num_tag_for_T(self, t_6533);
maxtag = INT_max_INT_INT(maxtag, tag_6534);
mintag = INT_min_INT_INT(mintag, tag_6534);
}
}
after_loop: ;
local1 = self->globals_c;
local2 = ((STR) &Dispatchtablefor);
BE_comment_FILE_STR(self, local1, STR_plus_STR_STR(local2, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6))));
local3 = FILE_plus_STR_FILE(self->globals_h, ((STR) &externconstint));
local4 = FILE_plus_STR_FILE(local3, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6)));
(fwrite(((STR) &S_offset_6545)->arr_part,((STR) &S_offset_6545)->asize,1,local4->fp));
local5 = FILE_plus_STR_FILE(self->globals_c, ((STR) &constint));
local6 = FILE_plus_STR_FILE(local5, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6)));
local7 = FILE_plus_STR_FILE(local6, ((STR) &S_offset_6546));
local8 = FILE_plus_INT_FILE(local7, INT_negate_INT(mintag));
(fwrite(((STR) &name_6547)->arr_part,((STR) &name_6547)->asize,1,local8->fp));
local9 = BE_mangle_OB_STR(self, ((OB) f_6530->sig_6));
BE_forbid_STR(self, STR_plus_STR_STR(local9, ((STR) &S_offset_6548)));
cst = ((STR) &name_6549);
if ((!((f_6530->sig_6->ret==((TP) NULL))))) {
decl = BE_mangle_OB_STR(self, ((OB) f_6530->sig_6->ret));
cst = STR_plus_STR_STR(cst, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6->ret)));
}
else {
decl = ((STR) &int_6550);
cst = STR_plus_STR_STR(cst, ((STR) &int_6551));
}
local10 = STR_plus_STR_STR(decl, ((STR) &const_6552));
local11 = STR_plus_STR_STR(local10, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6)));
local12 = STR_plus_STR_STR(local11, ((STR) &name_6553));
decl = STR_plus_STR_STR(local12, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6->tp)));
local13 = STR_plus_STR_STR(cst, ((STR) &name_6554));
cst = STR_plus_STR_STR(local13, BE_mangle_OB_STR(self, ((OB) f_6530->sig_6->tp)));
if ((!((f_6530->sig_6->args_7==((ARRAYTP) NULL))))) {
{
struct ARRAYTP_elt_TP_frame_struct temp6556_0;
ARRAYTP_elt_TP_frame
noname6557 = &temp6556_0;
noname6557->state = 0;
while (1) {
if (noname6557->state == 0) {
noname6535 = f_6530->sig_6->args_7;
noname6557->arg0 = noname6535;
}
local14 = ARRAYTP_elt_TP(noname6557);
if (noname6557->state == -1) goto after_loop_6555;
e_6536 = local14;
local15 = STR_plus_STR_STR(decl, ((STR) &name_6558));
decl = STR_plus_STR_STR(local15, BE_mangle_OB_STR(self, ((OB) e_6536)));
local16 = STR_plus_STR_STR(cst, ((STR) &name_6559));
cst = STR_plus_STR_STR(local16, BE_mangle_OB_STR(self, ((OB) e_6536)));
}
}
after_loop_6555: ;
}
decl = STR_plus_STR_STR(decl, ((STR) &name_6560));
local17 = FILE_plus_STR_FILE(self->globals_h, ((STR) &extern_6561));
local18 = FILE_plus_STR_FILE(local17, decl);
(fwrite(((STR) &name_6562)->arr_part,((STR) &name_6562)->asize,1,local18->fp));
local19 = FILE_plus_STR_FILE(self->globals_c, decl);
(fwrite(((STR) &name_6563)->arr_part,((STR) &name_6563)->asize,1,local19->fp));
cst = STR_plus_STR_STR(cst, ((STR) &name_6564));
{
BOOL noname6567 = TRUE;
while (1) {
if (noname6567) {
noname6567 = FALSE;
noname6537 = mintag;
noname6538 = maxtag;
local21 = noname6537;
local22 = noname6538;
local20 = local21;
} else {
local20++;
}
if (local20>local22) goto after_loop_6565;
i = local20;
exists = FALSE;
{
struct FLISTTP_elt_TP_frame_struct temp6569_0;
FLISTTP_elt_TP_frame
noname6570 = &temp6569_0;
noname6570->state = 0;
while (1) {
if (noname6570->state == 0) {
noname6539 = des_6531;
noname6570->arg0 = noname6539;
}
local23 = FLISTTP_elt_TP(noname6570);
if (noname6570->state == -1) goto after_loop_6568;
e_6540 = local23;
tag_6541 = BE_num_tag_for_T(self, e_6540);
local24 = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, e_6540);
real_sig = IFC_sig_conformi(local24, f_6530->sig_6);
if ((tag_6541==i)) {
exists = TRUE;
am_6542 = FMAPSIGAM_ROUT_D_6484(self->inlined_sigs, real_sig);
if ((!((am_6542==((AM_ROUT_DEF) NULL))))) {
BE_emit_routine_(self, am_6542);
self->inlined_sigs = FMAPSIGAM_ROUT_D_6496(self->inlined_sigs, real_sig);
}
local25 = e_6540;
if ((*TP_is_value_BOOL[local25->header.tag+TP_is_value_BOOL_offset])(local25)) {
functocall = BE_emit_dispatch(self, real_sig);
}
else {
functocall = BE_mangle_OB_STR(self, ((OB) real_sig));
}
local26 = FILE_plus_CHAR_FILE(self->globals_c, ' ');
local27 = FILE_plus_STR_FILE(local26, cst);
(fwrite(functocall->arr_part,functocall->asize,1,local27->fp));
if ((i!=maxtag)) {
(fwrite(((STR) &name_6571)->arr_part,((STR) &name_6571)->asize,1,self->globals_c->fp));
}
local28 = self->globals_c;
BE_comment_FILE_STR(self, local28, SIG_str_STR(real_sig));
FILE_plus_CHAR(self->globals_c, '\n');
}
}
}
after_loop_6568: ;
if ((!(exists))) {
(fwrite(((STR) &NULL_6572)->arr_part,((STR) &NULL_6572)->asize,1,self->globals_c->fp));
if ((i!=maxtag)) {
(fwrite(((STR) &name_6573)->arr_part,((STR) &name_6573)->asize,1,self->globals_c->fp));
}
FILE_plus_CHAR(self->globals_c, '\n');
}
}
}
after_loop_6565: ;
if ((mintag>maxtag)) {
(fwrite(((STR) &NULLNodescendent)->arr_part,((STR) &NULLNodescendent)->asize,1,self->globals_c->fp));
}
(fwrite(((STR) &name_6574)->arr_part,((STR) &name_6574)->asize,1,self->globals_c->fp));
}
void BE_generate_disp(BE self) {
FLISTAM_ROUT_DEF noname6575;
AM_ROUT_DEF local0;
{
struct FLISTAM_ROUT_DEF_4104_frame_struct temp6576_0;
FLISTAM_ROUT_DEF_4104_frame
noname6577 = &temp6576_0;
noname6577->state = 0;
while (1) {
if (noname6577->state == 0) {
noname6575 = self->abstract_routs;
noname6577->arg0 = noname6575;
}
local0 = FLISTAM_ROUT_DEF_4104(noname6577);
if (noname6577->state == -1) goto after_loop;
BE_emit_dispatch_6529(self, local0);
}
}
after_loop: ;
}
void BE_generate_bnd_(BE self) {
FLISTAM_BND_CREA noname6578;
AM_BND_CREATE_EXPR e_6579;
STR name_6580;
ARRAYINT noname6581;
INT i = ((INT) 0);
STR dec = ((STR) NULL);
INT noname6582 = ((INT) 0);
AM_BND_CREATE_EXPR noname6583;
INT i_6584 = ((INT) 0);
ARRAYSTR arg_list;
INT bnd = ((INT) 0);
INT unbnd = ((INT) 0);
BOOL is_bnd = ((BOOL) 0);
ARRAYSTR noname6585;
INT i_6586 = ((INT) 0);
AM_BND_CREATE_EXPR local0;
FILE_20 local1;
FILE_20 local2;
FILE_20 local3;
FILE_20 local4;
FILE_20 local5;
FILE_20 local6;
FILE_20 local7;
FILE_20 local8;
FILE_20 local9;
FILE_20 local10;
FILE_20 local11;
FILE_20 local12;
FILE_20 local13;
FILE_20 local14;
FILE_20 local15;
FILE_20 local16;
INT local17;
ARRAYTP local18;
FILE_20 local19;
FILE_20 local20;
FILE_20 local21;
INT local22;
FILE_20 local23;
FILE_20 local24;
INT local25;
INT local26;
FILE_20 local27;
FILE_20 local28;
ARRAYTP local29;
FILE_20 local30;
FILE_20 local31;
FILE_20 local32;
FILE_20 local33;
ARRAYSTR local34;
INT local35;
INT local36;
INT local37;
INT local38;
INT local39;
FILE_20 local40;
FILE_20 local41;
{
struct FLISTAM_BND_CREA_4674_frame_struct temp6587_0;
FLISTAM_BND_CREA_4674_frame
noname6588 = &temp6587_0;
noname6588->state = 0;
while (1) {
if (noname6588->state == 0) {
noname6578 = self->bnd_rout_creates;
noname6588->arg0 = noname6578;
}
local0 = FLISTAM_BND_CREA_4674(noname6588);
if (noname6588->state == -1) goto after_loop;
e_6579 = local0;
name_6580 = BE_mangle_OB_STR(self, ((OB) e_6579));
BE_forbid_STR(self, STR_plus_STR_STR(name_6580, ((STR) &S_ob_6589)));
BE_forbid_STR(self, STR_plus_STR_STR(name_6580, ((STR) &S_ob_struct_6590)));
local1 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &typedefstruct_6591));
local2 = FILE_plus_STR_FILE(local1, name_6580);
(fwrite(((STR) &S_ob_struct_6592)->arr_part,((STR) &S_ob_struct_6592)->asize,1,local2->fp));
(fwrite(((STR) &OB_HEADERheader_6593)->arr_part,((STR) &OB_HEADERheader_6593)->asize,1,self->typedefs_h->fp));
if ((!((e_6579->fun->ret==((TP) NULL))))) {
local3 = self->code_c;
local4 = FILE_plus_STR_FILE(local3, BE_mangle_OB_STR(self, ((OB) e_6579->fun->ret)));
FILE_plus_CHAR(local4, ' ');
}
else {
(fwrite(((STR) &void_6594)->arr_part,((STR) &void_6594)->asize,1,self->code_c->fp));
}
local5 = FILE_plus_STR_FILE(self->code_c, name_6580);
local6 = FILE_plus_CHAR_FILE(local5, '(');
local7 = FILE_plus_STR_FILE(local6, name_6580);
(fwrite(((STR) &S_obob)->arr_part,((STR) &S_obob)->asize,1,local7->fp));
if ((!((e_6579->fun->ret==((TP) NULL))))) {
local8 = self->decs_h;
local9 = FILE_plus_STR_FILE(local8, BE_mangle_OB_STR(self, ((OB) e_6579->fun->ret)));
FILE_plus_CHAR(local9, ' ');
}
else {
(fwrite(((STR) &void_6595)->arr_part,((STR) &void_6595)->asize,1,self->decs_h->fp));
}
local10 = FILE_plus_STR_FILE(self->decs_h, name_6580);
local11 = FILE_plus_CHAR_FILE(local10, '(');
local12 = FILE_plus_STR_FILE(local11, name_6580);
(fwrite(((STR) &S_ob_6596)->arr_part,((STR) &S_ob_6596)->asize,1,local12->fp));
if ((!((e_6579->fun->ret==((TP) NULL))))) {
local13 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
local14 = FILE_plus_STR_FILE(local13, BE_mangle_OB_STR(self, ((OB) e_6579->fun->ret)));
FILE_plus_CHAR(local14, ' ');
}
else {
(fwrite(((STR) &void_6597)->arr_part,((STR) &void_6597)->asize,1,self->typedefs_h->fp));
}
local15 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &funcptrstruct));
local16 = FILE_plus_STR_FILE(local15, name_6580);
(fwrite(((STR) &S_ob_struct_6598)->arr_part,((STR) &S_ob_struct_6598)->asize,1,local16->fp));
{
struct ARRAYINT_elt_INT_frame_struct temp6600_0;
ARRAYINT_elt_INT_frame
noname6601 = &temp6600_0;
struct INT_up_INT_frame_struct temp6600_1;
INT_up_INT_frame
noname6602 = &temp6600_1;
noname6601->state = 0;
noname6602->state = 0;
while (1) {
if (noname6601->state == 0) {
noname6581 = e_6579->unbnd_args;
noname6601->arg0 = noname6581;
}
local17 = ARRAYINT_elt_INT(noname6601);
if (noname6601->state == -1) goto after_loop_6599;
i = local17;
if ((i==0)) {
dec = BE_mangle_OB_STR(self, ((OB) e_6579->fun->tp));
}
else {
local18 = e_6579->fun->args_7;
dec = BE_mangle_OB_STR(self, ((OB) ARRAYTP_aget_INT_TP(local18, (c_INT_minus_INT_INT_chk(i,1)))));
}
local19 = FILE_plus_STR_FILE(self->code_c, ((STR) &name_6603));
local20 = FILE_plus_STR_FILE(local19, dec);
local21 = FILE_plus_STR_FILE(local20, ((STR) &unbound_arg));
if (noname6602->state == 0) {
noname6582 = 0;
noname6602->arg0 = noname6582;
}
local22 = INT_up_INT(noname6602);
if (noname6602->state == -1) goto after_loop_6599;
FILE_plus_INT(local21, local22);
local23 = FILE_plus_STR_FILE(self->decs_h, ((STR) &name_6604));
(fwrite(dec->arr_part,dec->asize,1,local23->fp));
local24 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_6605));
(fwrite(dec->arr_part,dec->asize,1,local24->fp));
}
}
after_loop_6599: ;
(fwrite(((STR) &name_6606)->arr_part,((STR) &name_6606)->asize,1,self->decs_h->fp));
(fwrite(((STR) &name_6607)->arr_part,((STR) &name_6607)->asize,1,self->code_c->fp));
(fwrite(((STR) &name_6608)->arr_part,((STR) &name_6608)->asize,1,self->typedefs_h->fp));
{
struct AM_BND_CREATE_EX_3800_frame_struct temp6610_0;
AM_BND_CREATE_EX_3800_frame
noname6611 = &temp6610_0;
noname6611->state = 0;
while (1) {
if (noname6611->state == 0) {
noname6583 = e_6579;
noname6611->arg0 = noname6583;
}
local25 = AM_BND_CREATE_EX_3800(noname6611);
if (noname6611->state == -1) goto after_loop_6609;
i_6584 = local25;
local26 = ARRAYINT_aget_IN(e_6579->bnd_args, i_6584);
if ((local26==0)) {
local27 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
(fwrite(BE_mangle_OB_STR(self, ((OB) e_6579->fun->tp))->arr_part,BE_mangle_OB_STR(self, ((OB) e_6579->fun->tp))->asize,1,local27->fp));
}
else {
local28 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
local29 = e_6579->fun->args_7;
(fwrite(BE_mangle_OB_STR(self, ((OB) ARRAYTP_aget_INT_TP(local29, (c_INT_minus_INT_INT_chk(i_6584,1)))))->arr_part,BE_mangle_OB_STR(self, ((OB) ARRAYTP_aget_INT_TP(local29, (c_INT_minus_INT_INT_chk(i_6584,1)))))->asize,1,local28->fp));
}
local30 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &bound_arg_6612));
local31 = FILE_plus_INT_FILE(local30, i_6584);
(fwrite(((STR) &name_6613)->arr_part,((STR) &name_6613)->asize,1,local31->fp));
}
}
after_loop_6609: ;
local32 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_6614));
local33 = FILE_plus_STR_FILE(local32, name_6580);
(fwrite(((STR) &S_ob_6615)->arr_part,((STR) &S_ob_6615)->asize,1,local33->fp));
local34 = ((ARRAYSTR) NULL);
local35 = ARRAYTP_size_INT(e_6579->fun->args_7);
arg_list = ARRAYSTR_create_(local34, (c_INT_plus_INT_INT_chk(local35,1)));
bnd = 0;
unbnd = 0;
{
struct ARRAYSTR_ind_INT_frame_struct temp6617_0;
ARRAYSTR_ind_INT_frame
noname6618 = &temp6617_0;
noname6618->state = 0;
while (1) {
if (noname6618->state == 0) {
noname6585 = arg_list;
noname6618->arg0 = noname6585;
}
local36 = ARRAYSTR_ind_INT(noname6618);
if (noname6618->state == -1) goto after_loop_6616;
i_6586 = local36;
if ((bnd<ARRAYINT_size_INT(e_6579->bnd_args))) {
local37 = ARRAYINT_aget_IN(e_6579->bnd_args, bnd);
if ((local37==i_6586)) {
is_bnd = TRUE;
}
else {
local38 = ARRAYINT_aget_IN(e_6579->unbnd_args, unbnd);
if ((local38==i_6586)) {
is_bnd = FALSE;
}
else {
BE_barf_STR(self, ((STR) &Ranoffunboundarglist));
}
}
}
else {
local39 = ARRAYINT_aget_IN(e_6579->unbnd_args, unbnd);
if ((local39==i_6586)) {
is_bnd = FALSE;
}
else {
BE_barf_STR(self, ((STR) &Ranoffunboundarg));
}
}
if (is_bnd) {
ARRAYSTR_aset_IN_4289(arg_list, i_6586, STR_plus_INT_STR(((STR) &obbound_arg), bnd));
bnd = (c_INT_plus_INT_INT_chk(bnd,1));
}
else {
ARRAYSTR_aset_IN_4289(arg_list, i_6586, STR_plus_INT_STR(((STR) &unbound_arg_6619), unbnd));
unbnd = (c_INT_plus_INT_INT_chk(unbnd,1));
}
}
}
after_loop_6616: ;
if ((!((e_6579->fun->ret==((TP) NULL))))) {
(fwrite(((STR) &return_6620)->arr_part,((STR) &return_6620)->asize,1,self->code_c->fp));
}
local40 = FILE_plus_CHAR_FILE(self->code_c, ' ');
local41 = FILE_plus_STR_FILE(local40, BE_emit_call_SIG(self, e_6579->fun, arg_list));
(fwrite(((STR) &name_6621)->arr_part,((STR) &name_6621)->asize,1,local41->fp));
}
}
after_loop: ;
}
void BE_generate_bnd__6622(BE self) {
TP_ROUT_TBL noname6623;
TP_ROUT e_6624;
STR name_6625;
ARRAYTP noname6626;
TP a_6627;
TP_ROUT local0;
FILE_20 local1;
FILE_20 local2;
FILE_20 local3;
TP local4;
FILE_20 local5;
FILE_20 local6;
FILE_20 local7;
{
struct TP_ROUT_TBL_elt__223_frame_struct temp6628_0;
TP_ROUT_TBL_elt__223_frame
noname6629 = &temp6628_0;
noname6629->state = 0;
while (1) {
if (noname6629->state == 0) {
noname6623 = self->prog->tp_tbl->rout_tbl;
noname6629->arg0 = noname6623;
}
local0 = TP_ROUT_TBL_elt__223(noname6629);
if (noname6629->state == -1) goto after_loop;
e_6624 = local0;
name_6625 = BE_mangle_OB_STR(self, ((OB) e_6624));
BE_forbid_STR(self, STR_plus_STR_STR(name_6625, ((STR) &S_struct_6630)));
if ((!(BE_is_built_in_t(self, ((TP) e_6624))))) {
local1 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &typedefstruct_6631));
local2 = FILE_plus_STR_FILE(local1, name_6625);
(fwrite(((STR) &S_struct_6632)->arr_part,((STR) &S_struct_6632)->asize,1,local2->fp));
(fwrite(((STR) &OB_HEADERheader_6633)->arr_part,((STR) &OB_HEADERheader_6633)->asize,1,self->typedefs_h->fp));
if ((!((e_6624->ret==((TP) NULL))))) {
local3 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
(fwrite(BE_mangle_OB_STR(self, ((OB) e_6624->ret))->arr_part,BE_mangle_OB_STR(self, ((OB) e_6624->ret))->asize,1,local3->fp));
}
else {
(fwrite(((STR) &void_6634)->arr_part,((STR) &void_6634)->asize,1,self->typedefs_h->fp));
}
(fwrite(((STR) &funcptrvoid)->arr_part,((STR) &funcptrvoid)->asize,1,self->typedefs_h->fp));
{
struct ARRAYTP_elt_TP_frame_struct temp6636_0;
ARRAYTP_elt_TP_frame
noname6637 = &temp6636_0;
noname6637->state = 0;
while (1) {
if (noname6637->state == 0) {
noname6626 = e_6624->args_7;
noname6637->arg0 = noname6626;
}
local4 = ARRAYTP_elt_TP(noname6637);
if (noname6637->state == -1) goto after_loop_6635;
a_6627 = local4;
local5 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_6638));
(fwrite(BE_mangle_OB_STR(self, ((OB) a_6627))->arr_part,BE_mangle_OB_STR(self, ((OB) a_6627))->asize,1,local5->fp));
}
}
after_loop_6635: ;
local6 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_6639));
local7 = FILE_plus_STR_FILE(local6, name_6625);
(fwrite(((STR) &name_6640)->arr_part,((STR) &name_6640)->asize,1,local7->fp));
}
}
}
after_loop: ;
}
INT FMAPSTRITER_INLI_6641(FMAPSTRITER_INLINE self) {
INT noname6642 = ((INT) 0);
if ((self==((FMAPSTRITER_INLINE) NULL))) {
return 0;
}
return self->hsize;
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:74:7\n");
exit(16);
}
}
INT UNIX_system_STR_INT(UNIX self, STR s_6643) {
INT noname6644 = ((INT) 0);
return system(((s_6643==NULL)?NULL:s_6643->arr_part));
}
void BE_finalize(BE self) {
STR allflags;
FLISTSTR noname6645;
STR obfiles;
INT noname6646 = ((INT) 0);
INT noname6647 = ((INT) 0);
STR fn;
STR syscom;
STR s_6648;
FSETSTR noname6649;
STR s_6650;
FSETSTR noname6651;
STR s_6652;
FLISTSTR noname6653;
STR noname6654;
CHAR c_6655 = ((CHAR) 0);
INT dummy_6656 = ((INT) 0);
BOOL local0;
BOOL local1;
BOOL local2;
BOOL local3;
BOOL local4;
BOOL local5;
BOOL local6;
BOOL local7;
OUT local8;
OUT local9;
OUT local10;
OUT local11;
OUT local12;
OUT local13;
OUT local14;
OUT local15;
OUT local16;
OUT local17;
OUT local18;
OUT local19;
OUT local20;
OUT local21;
OUT local22;
OUT local23;
OUT local24;
OUT local25;
OUT local26;
OUT local27;
STR local28;
STR local29;
STR local30;
STR local31;
STR local32;
STR local33;
INT local34;
INT local35;
INT local36;
INT local34e;
STR local37;
STR local38;
STR local39;
BOOL local40;
CHAR local41;
CHAR local42;
STR local43;
STR local44;
STR local45;
STR local46;
BOOL local47;
CHAR local48;
CHAR local49;
STR local50;
STR local51;
STR local52;
STR local53;
BOOL local54;
CHAR local55;
CHAR local56;
STR local57;
STR local58;
STR local59;
STR local60;
CHAR local61;
STR local62;
CHAR *local61p; INT local61n;
FILE_20 local63;
FILE_20 local64;
FILE_20 local65;
FILE_20 local66;
FILE_20 local67;
FILE_20 local68;
FILE_20 local69;
FILE_20 local70;
FILE_20 local71;
FILE_20 local72;
FILE_20 local73;
STR local74;
STR local75;
STR local76;
STR local77;
OUT local78;
OUT local79;
OUT local80;
OUT local81;
INT local82;
UNIX local83;
STR local84;
STR local85;
STR local86;
UNIX local87;
STR local88;
STR local89;
STR local90;
UNIX local91;
STR local92;
STR local93;
STR local94;
UNIX local95;
STR local96;
STR local97;
STR local98;
UNIX local99;
STR local100;
STR local101;
STR local102;
UNIX local103;
STR local104;
STR local105;
BE_define_main_a(self);
BE_generate_sys_(self);
BE_generate_disp(self);
BE_generate_bnd_(self);
BE_generate_bnd__6622(self);
if (FILE_error_BOOL(self->code_c)) {
local7 = TRUE;
} else {
local7 = FILE_error_BOOL(self->typedefs_h);
}
if (local7) {
local6 = TRUE;
} else {
local6 = FILE_error_BOOL(self->sather_h);
}
if (local6) {
local5 = TRUE;
} else {
local5 = FILE_error_BOOL(self->tags_h);
}
if (local5) {
local4 = TRUE;
} else {
local4 = FILE_error_BOOL(self->decs_h);
}
if (local4) {
local3 = TRUE;
} else {
local3 = FILE_error_BOOL(self->strings_h);
}
if (local3) {
local2 = TRUE;
} else {
local2 = FILE_error_BOOL(self->globals_h);
}
if (local2) {
local1 = TRUE;
} else {
local1 = FILE_error_BOOL(self->globals_c);
}
if (local1) {
local0 = TRUE;
} else {
local0 = FILE_error_BOOL(self->makefile);
}
if (local0) {
BE_barf_STR(self, ((STR) &Someproblemwriti_6657));
}
FILE_plus_CHAR(self->code_c, '\n');
FILE_close(self->code_c);
FILE_close(self->sather_h);
FILE_close(self->tags_h);
FILE_close(self->typedefs_h);
FILE_close(self->decs_h);
FILE_plus_CHAR(self->strings_h, '\n');
FILE_close(self->strings_h);
FILE_close(self->globals_h);
FILE_close(self->globals_c);
if (self->prog->options_55->verbose) {
local8 = OUT_create_OUT(((OUT) NULL));
local9 = OUT_plus_STR_OUT(local8, ((STR) &Markedreadattrrouts));
OUT_plus_INT(local9, shared_INLINE_AT);
local10 = OUT_create_OUT(((OUT) NULL));
local11 = OUT_plus_STR_OUT(local10, ((STR) &Inlinedreadattrcalls));
OUT_plus_INT(local11, shared_INLINE_AT_6658);
local12 = OUT_create_OUT(((OUT) NULL));
local13 = OUT_plus_STR_OUT(local12, ((STR) &Markedwriteattrrouts));
OUT_plus_INT(local13, shared_INLINE_AT_6337);
local14 = OUT_create_OUT(((OUT) NULL));
local15 = OUT_plus_STR_OUT(local14, ((STR) &Inlinedwriteattr));
OUT_plus_INT(local15, shared_INLINE_AT_6659);
local16 = OUT_create_OUT(((OUT) NULL));
local17 = OUT_plus_STR_OUT(local16, ((STR) &Markedglobalrouts));
OUT_plus_INT(local17, shared_INLINE_GL);
local18 = OUT_create_OUT(((OUT) NULL));
local19 = OUT_plus_STR_OUT(local18, ((STR) &Inlinedglobalcalls));
OUT_plus_INT(local19, shared_INLINE_GL_6660);
local20 = OUT_create_OUT(((OUT) NULL));
local21 = OUT_plus_STR_OUT(local20, ((STR) &MarkedINTrouts));
OUT_plus_INT(local21, shared_INLINE_IN);
local22 = OUT_create_OUT(((OUT) NULL));
local23 = OUT_plus_STR_OUT(local22, ((STR) &FoldedINTcalls));
OUT_plus_INT(local23, shared_INLINE_IN_6661);
local24 = OUT_create_OUT(((OUT) NULL));
local25 = OUT_plus_STR_OUT(local24, ((STR) &Markediters));
OUT_plus_INT(local25, FMAPSTRITER_INLI_6641(self->built_in_iters));
local26 = OUT_create_OUT(((OUT) NULL));
local27 = OUT_plus_STR_OUT(local26, ((STR) &Inlineditercalls));
OUT_plus_INT(local27, self->inlined_iter_count);
}
allflags = ((STR) &name_6662);
{
struct FLISTSTR_elt_STR_frame_struct temp6663_0;
FLISTSTR_elt_STR_frame
noname6664 = &temp6663_0;
noname6664->state = 0;
while (1) {
local28 = STR_plus_CHAR_STR(allflags, ' ');
if (noname6664->state == 0) {
noname6645 = self->prog->options_55->c_flags;
noname6664->arg0 = noname6645;
}
local29 = FLISTSTR_elt_STR(noname6664);
if (noname6664->state == -1) goto after_loop;
allflags = STR_plus_STR_STR(local28, local29);
}
}
after_loop: ;
if (self->prog->options_55->debug_11) {
local30 = STR_plus_CHAR_STR(allflags, ' ');
allflags = STR_plus_STR_STR(local30, self->prog->options_55->c_debug);
}
if (self->prog->options_55->optimize) {
local31 = STR_plus_CHAR_STR(allflags, ' ');
allflags = STR_plus_STR_STR(local31, self->prog->options_55->c_opt);
}
if (self->prog->options_55->verbose) {
local32 = STR_plus_CHAR_STR(allflags, ' ');
allflags = STR_plus_STR_STR(local32, self->prog->options_55->c_verbose);
}
obfiles = ((STR) &globalsobj);
{
BOOL noname6667 = TRUE;
while (1) {
local33 = ((STR) &code_6668);
if (noname6667) {
noname6667 = FALSE;
noname6646 = 0;
noname6647 = self->code_c_count;
local35 = noname6646;
local36 = noname6647;
local34 = local35; local34e = local35+local36;
} else {
local34++;
}
if (local34>=local34e) goto after_loop_6665;
local37 = STR_plus_INT_STR(local33, local34);
fn = STR_plus_STR_STR(local37, ((STR) &obj_6669));
obfiles = STR_plus_STR_STR(obfiles, fn);
}
}
after_loop_6665: ;
syscom = ((STR) &CC);
local38 = STR_plus_STR_STR(syscom, self->prog->options_55->c_exec);
syscom = STR_plus_STR_STR(local38, ((STR) &CS_6670));
syscom = STR_plus_STR_STR(syscom, obfiles);
{
struct FSETSTR_elt_STR_frame_struct temp6672_0;
FSETSTR_elt_STR_frame
noname6673 = &temp6672_0;
noname6673->state = 0;
while (1) {
if (noname6673->state == 0) {
noname6649 = self->prog->options_55->c_files;
noname6673->arg0 = noname6649;
}
local39 = FSETSTR_elt_STR(noname6673);
if (noname6673->state == -1) goto after_loop_6671;
s_6648 = local39;
local41 = STR_aget_INT_CHAR(s_6648, 0);
if ((local41=='/')) {
local40 = TRUE;
} else {
local42 = STR_aget_INT_CHAR(s_6648, 0);
local40 = (local42=='\\');
}
if (local40) {
local43 = STR_plus_CHAR_STR(syscom, ' ');
syscom = STR_plus_STR_STR(local43, s_6648);
}
else {
local44 = STR_plus_CHAR_STR(syscom, ' ');
local45 = STR_plus_STR_STR(local44, ((STR) &name_6674));
syscom = STR_plus_STR_STR(local45, s_6648);
}
}
}
after_loop_6671: ;
{
struct FSETSTR_elt_STR_frame_struct temp6676_0;
FSETSTR_elt_STR_frame
noname6677 = &temp6676_0;
noname6677->state = 0;
while (1) {
if (noname6677->state == 0) {
noname6651 = self->prog->options_55->object_files;
noname6677->arg0 = noname6651;
}
local46 = FSETSTR_elt_STR(noname6677);
if (noname6677->state == -1) goto after_loop_6675;
s_6650 = local46;
local48 = STR_aget_INT_CHAR(s_6650, 0);
if ((local48=='/')) {
local47 = TRUE;
} else {
local49 = STR_aget_INT_CHAR(s_6650, 0);
local47 = (local49=='\\');
}
if (local47) {
local50 = STR_plus_CHAR_STR(syscom, ' ');
syscom = STR_plus_STR_STR(local50, s_6650);
}
else {
local51 = STR_plus_CHAR_STR(syscom, ' ');
local52 = STR_plus_STR_STR(local51, ((STR) &name_6678));
syscom = STR_plus_STR_STR(local52, s_6650);
}
}
}
after_loop_6675: ;
{
struct FLISTSTR_elt_STR_frame_struct temp6680_0;
FLISTSTR_elt_STR_frame
noname6681 = &temp6680_0;
noname6681->state = 0;
while (1) {
if (noname6681->state == 0) {
noname6653 = self->prog->options_55->archive_files;
noname6681->arg0 = noname6653;
}
local53 = FLISTSTR_elt_STR(noname6681);
if (noname6681->state == -1) goto after_loop_6679;
s_6652 = local53;
local55 = STR_aget_INT_CHAR(s_6652, 0);
if ((local55=='/')) {
local54 = TRUE;
} else {
local56 = STR_aget_INT_CHAR(s_6652, 0);
local54 = (local56=='\\');
}
if (local54) {
local57 = STR_plus_CHAR_STR(syscom, ' ');
syscom = STR_plus_STR_STR(local57, s_6652);
}
else {
local58 = STR_plus_CHAR_STR(syscom, ' ');
local59 = STR_plus_STR_STR(local58, ((STR) &name_6682));
syscom = STR_plus_STR_STR(local59, s_6652);
}
}
}
after_loop_6679: ;
local60 = STR_plus_STR_STR(syscom, ((STR) &CFLAGS));
syscom = STR_plus_CHAR_STR(local60, ' ');
{
BOOL noname6685 = TRUE;
while (1) {
if (noname6685) {
noname6685 = FALSE;
noname6654 = self->prog->options_55->c_compile2;
local62 = noname6654;
local61p = local62->arr_part; local61n = local62->asize;
} else {
local61p++; local61n--;
}
if (local61n<=0) goto after_loop_6683; local61 = *local61p;
c_6655 = local61;
if ((c_6655=='/')) {
syscom = STR_plus_CHAR_STR(syscom, '\\');
}
else {
syscom = STR_plus_CHAR_STR(syscom, c_6655);
}
}
}
after_loop_6683: ;
local63 = FILE_plus_STR_FILE(self->makefile, ((STR) &CFLAGS_6686));
local64 = FILE_plus_STR_FILE(local63, allflags);
FILE_plus_CHAR(local64, '\n');
local65 = FILE_plus_STR_FILE(self->makefile, ((STR) &CS_6687));
local66 = FILE_plus_STR_FILE(local65, self->prog->options_55->executable_9);
FILE_plus_CHAR(local66, '\n');
local67 = FILE_plus_STR_FILE(self->makefile, ((STR) &CC_6688));
local68 = FILE_plus_STR_FILE(local67, self->prog->options_55->c_compile1);
FILE_plus_CHAR(local68, '\n');
(fwrite(((STR) &BuildProgramChan)->arr_part,((STR) &BuildProgramChan)->asize,1,self->makefile->fp));
local69 = FILE_plus_STR_FILE(self->makefile, ((STR) &ChangeDirectorycd));
local70 = FILE_plus_STR_FILE(local69, self->code_dir);
(fwrite(((STR) &name_6689)->arr_part,((STR) &name_6689)->asize,1,local70->fp));
(fwrite(((STR) &CompileAll)->arr_part,((STR) &CompileAll)->asize,1,self->makefile->fp));
local71 = FILE_plus_STR_FILE(self->makefile, obfiles);
local72 = FILE_plus_STR_FILE(local71, ((STR) &name_6690));
local73 = FILE_plus_STR_FILE(local72, syscom);
(fwrite(((STR) &linklog)->arr_part,((STR) &linklog)->asize,1,local73->fp));
FILE_close(self->makefile);
local74 = STR_plus_STR_STR(self->prog->options_55->make_command, ((STR) &f_6691));
local75 = STR_plus_STR_STR(local74, self->code_dir);
local76 = STR_plus_CHAR_STR(local75, '\\');
syscom = STR_plus_STR_STR(local76, ((STR) &Makefile_6692));
if ((!(self->prog->options_55->verbose))) {
local77 = STR_plus_CHAR_STR(syscom, ' ');
syscom = STR_plus_STR_STR(local77, self->prog->options_55->make_silent);
}
if (self->prog->options_55->only_C) {
if (self->prog->options_55->verbose) {
local78 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local78, ((STR) &Skippingmake));
}
}
else {
if (self->prog->options_55->verbose) {
local79 = OUT_create_OUT(((OUT) NULL));
local80 = OUT_plus_CHAR_OUT(local79, '\n');
local81 = OUT_plus_STR_OUT(local80, syscom);
OUT_plus_CHAR(local81, '\n');
}
local82 = UNIX_system_STR_INT(((UNIX) NULL), syscom);
if ((local82!=0)) {
BE_barf_STR(self, ((STR) &Makefailed));
}
}
if ((!(self->prog->options_55->gen_c))) {
local83 = ((UNIX) NULL);
local84 = STR_plus_STR_STR(((STR) &ifexist), self->code_dir);
local85 = STR_plus_STR_STR(local84, ((STR) &cdel));
local86 = STR_plus_STR_STR(local85, self->code_dir);
dummy_6656 = UNIX_system_STR_INT(local83, STR_plus_STR_STR(local86, ((STR) &c_6693)));
local87 = ((UNIX) NULL);
local88 = STR_plus_STR_STR(((STR) &ifexist_6694), self->code_dir);
local89 = STR_plus_STR_STR(local88, ((STR) &objdel));
local90 = STR_plus_STR_STR(local89, self->code_dir);
dummy_6656 = UNIX_system_STR_INT(local87, STR_plus_STR_STR(local90, ((STR) &obj_6695)));
local91 = ((UNIX) NULL);
local92 = STR_plus_STR_STR(((STR) &ifexist_6696), self->code_dir);
local93 = STR_plus_STR_STR(local92, ((STR) &hdel));
local94 = STR_plus_STR_STR(local93, self->code_dir);
dummy_6656 = UNIX_system_STR_INT(local91, STR_plus_STR_STR(local94, ((STR) &h)));
local95 = ((UNIX) NULL);
local96 = STR_plus_STR_STR(((STR) &ifexist_6697), self->code_dir);
local97 = STR_plus_STR_STR(local96, ((STR) &Makefiledel));
local98 = STR_plus_STR_STR(local97, self->code_dir);
dummy_6656 = UNIX_system_STR_INT(local95, STR_plus_STR_STR(local98, ((STR) &Makefile_6698)));
local99 = ((UNIX) NULL);
local100 = STR_plus_STR_STR(((STR) &ifexist_6699), self->code_dir);
local101 = STR_plus_STR_STR(local100, ((STR) &linklogdel));
local102 = STR_plus_STR_STR(local101, self->code_dir);
dummy_6656 = UNIX_system_STR_INT(local99, STR_plus_STR_STR(local102, ((STR) &linklog_6700)));
local103 = ((UNIX) NULL);
local104 = STR_plus_STR_STR(((STR) &ifnotexist), self->code_dir);
local105 = STR_plus_STR_STR(local104, ((STR) &rmdir_6701));
dummy_6656 = UNIX_system_STR_INT(local103, STR_plus_STR_STR(local105, self->code_dir));
}
}
void PROG_finalize_ba(PROG self) {
if ((!(self->options_55->only_check))) {
BE_finalize(self->back_end);
}
}
void PROG_AM_CHECK_ch(PROG_AM_CHECK self, SIG s_6702) {
ELT elt_6703;
AM_ROUT_DEF am_6704;
OUT local0;
OUT local1;
OUT local2;
TP local3;
BOOL local4;
OUT local5;
OUT local6;
OUT local7;
OUT local8;
if (!((!((s_6702==((SIG) NULL)))))) {
fprintf(stderr,"Violation of precondition ./prog.sa:836:12\n");
exit(16);
}
if ((!((SIG_TBL_sig_eq_t(self->sig_tbl, s_6702)==((SIG) NULL))))) {
return;
}
self->sig_tbl = SIG_TBL_insert_S(self->sig_tbl, s_6702);
if (self->prog->show_checked_sig) {
local0 = OUT_create_OUT(((OUT) NULL));
local1 = OUT_plus_STR_OUT(local0, ((STR) &Checksig));
local2 = OUT_plus_STR_OUT(local1, SIG_str_STR(s_6702));
OUT_plus_STR(local2, ((STR) &name_6705));
}
local3 = s_6702->tp;
if ((*TP_is_abstract_BOOL[local3->header.tag+TP_is_abstract_BOOL_offset])(local3)) {
return;
}
elt_6703 = ELT_TBL_elt_with(IMPL_TBL_impl_of(self->prog->impl_tbl, s_6702->tp)->elts, s_6702);
if (elt_6703->is_external) {
local4 = ELT_is_abstract_BOOL(elt_6703);
} else {
local4 = FALSE;
}
if (local4) {
return;
}
if ((elt_6703==((ELT) NULL))) {
return;
}
am_6704 = TRANS_transform__6317(((TRANS) NULL), elt_6703);
if ((am_6704==((AM_ROUT_DEF) NULL))) {
return;
}
if (self->prog->show_am_check) {
local5 = OUT_create_OUT(((OUT) NULL));
local6 = OUT_plus_STR_OUT(local5, ((STR) &CheckAMfor));
local7 = OUT_plus_STR_OUT(local6, SIG_str_STR(am_6704->sig_6));
OUT_plus_STR(local7, ((STR) &name_6706));
AM_OUT_AM_ROUT_D(((AM_OUT) NULL), am_6704);
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &name_6707));
}
if (self->prog->generate_checked) {
PROG_output_am_r(self->prog, am_6704);
}
}
void PROG_AM_CHECK_ch_6708(PROG_AM_CHECK self) {
TP tp_6709;
FSETTP noname6710;
IFC ti;
SIG_TBL noname6711;
TP local0;
BOOL local1;
SIG local2;
self->sig_tbl = self->prog->prog_am_generate->sig_tbl;
{
struct FSETTP_elt_TP_frame_struct temp6712_0;
FSETTP_elt_TP_frame
noname6713 = &temp6712_0;
noname6713->state = 0;
while (1) {
if (noname6713->state == 0) {
noname6710 = self->prog->prog_find_types->tp_done;
noname6713->arg0 = noname6710;
}
local0 = FSETTP_elt_TP(noname6713);
if (noname6713->state == -1) goto after_loop;
tp_6709 = local0;
if (tp_6709==NULL) {
} else
switch (tp_6709->header.tag) {
case TP_CLASS_tag:
if ((!(TP_CLASS_is_abst(((TP_CLASS) tp_6709))))) {
ti = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, tp_6709);
if ((!((ti==((IFC) NULL))))) {
local1 = (!((ti->sigs==((SIG_TBL) NULL))));
} else {
local1 = FALSE;
}
if (local1) {
{
struct SIG_TBL_elt_SIG_frame_struct temp6715_0;
SIG_TBL_elt_SIG_frame
noname6716 = &temp6715_0;
noname6716->state = 0;
while (1) {
if (noname6716->state == 0) {
noname6711 = ti->sigs;
noname6716->arg0 = noname6711;
}
local2 = SIG_TBL_elt_SIG(noname6716);
if (noname6716->state == -1) goto after_loop_6714;
PROG_AM_CHECK_ch(self, local2);
}
}
after_loop_6714: ;
}
} break;
default: ;
}
}
}
after_loop: ;
}
void PROG_do_am_check(PROG self) {
self->all_reached = TRUE;
PROG_AM_CHECK_ch_6708(self->prog_am_check);
}
INT sather_main(CS self, ARRAYSTR a_6717) {
INT noname6718 = ((INT) 0);
PROG p;
FSETSTR noname6719;
STR fn;
BOOL local0;
OUT local1;
OUT local2;
OUT local3;
STR local4;
OUT local5;
OUT local6;
OUT local7;
OUT local8;
OUT local9;
OUT local10;
OUT local11;
OUT local12;
OUT local13;
p = PROG_create_PROG(((PROG) NULL));
OPTIONS_interpre(p->options_55, a_6717);
if (p->options_55->force_all) {
local0 = TRUE;
} else {
local0 = (!(FSETSTR_is_empty(p->options_55->force_routines)));
}
if (local0) {
PROG_err_STR(p, ((STR) &forceoptionsnoti));
}
if ((!(FMAPSTRFSETSTR_i_869(p->options_55->externals)))) {
PROG_err_STR(p, ((STR) &externaloptionno));
}
if (p->options_55->verbose) {
local1 = OUT_create_OUT(((OUT) NULL));
local2 = OUT_plus_STR_OUT(local1, OPTIONS_str_STR(p->options_55));
OUT_plus_STR(local2, ((STR) &name_6720));
}
PROG_create_back_end(p);
if (p->options_55->verbose) {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &Parsing));
}
{
struct FSETSTR_elt_STR_frame_struct temp6721_0;
FSETSTR_elt_STR_frame
noname6722 = &temp6721_0;
noname6722->state = 0;
while (1) {
if (noname6722->state == 0) {
noname6719 = p->options_55->sather_files;
noname6722->arg0 = noname6719;
}
local4 = FSETSTR_elt_STR(noname6722);
if (noname6722->state == -1) goto after_loop;
fn = local4;
if ((!(FSETSTR_test_STR(p->options_55->known_files, fn)))) {
PROG_PARSE_parse_STR(p->prog_parse, fn);
}
}
}
after_loop: ;
if (p->err_seen) {
return 1;
}
if (p->options_55->only_parse) {
return 0;
}
if (p->options_55->verbose) {
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &Findingtypes));
}
PROG_do_find_typ(p);
if (p->err_seen) {
return 2;
}
if (p->options_55->verbose) {
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &Constructingtype));
}
PROG_do_type_gra(p);
if (p->err_seen) {
return 3;
}
if (p->options_55->verbose) {
local7 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local7, ((STR) &Checkingconformance));
}
PROG_do_ifc_conf(p);
if (p->err_seen) {
return 4;
}
if (p->options_55->verbose) {
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &Findingmain));
}
PROG_do_get_main(p, p->options_55->main_class);
if (p->err_seen) {
return 5;
}
if ((!(p->options_55->only_check))) {
if (p->options_55->verbose) {
local9 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local9, ((STR) &Generatingstructs));
}
BE_init(p->back_end);
if (p->err_seen) {
return 6;
}
}
if (p->options_55->verbose) {
local10 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local10, ((STR) &Typecheckandgenerate));
}
PROG_do_am_gener(p);
if (p->err_seen) {
return 7;
}
if ((!(p->options_55->only_check))) {
if (p->options_55->verbose) {
local11 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local11, ((STR) &Cleaningup));
}
PROG_finalize_ba(p);
if (p->err_seen) {
return 8;
}
}
if (p->options_55->only_reachable) {
return 0;
}
if (p->options_55->verbose) {
local12 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local12, ((STR) &Checkingunreacha));
}
PROG_do_am_check(p);
if (p->err_seen) {
return 9;
}
if (p->options_55->verbose) {
local13 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local13, ((STR) &Compilationcomplete));
}
return 0;
}
STR FSETSTR_elt_STR(FSETSTR_elt_STR_frame frame) {
STR dummy;
STR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FSETSTR) NULL))))) {
{
frame->nested1 = ALLOCATE(FSETSTR_aelt_STR_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6724 = frame->arg0;
frame->nested1->arg0 = frame->noname6724;
}
local0 = FSETSTR_aelt_STR(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6725 = local0;
if ((!(FSETSTR_elt_eq_S(frame->arg0, frame->r_6725, FSETSTR_elt_nil_STR(frame->arg0))))) {
frame->state = 1;
return frame->r_6725;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FSETSTR_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant FSET{STR}::invariant:BOOL ../Library/fset.sa:98:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FSETSTR_invarian(FSETSTR self) {
BOOL noname6727 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FSETSTR) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
STR FSETSTR_aelt_STR(FSETSTR_aelt_STR_frame frame) {
STR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FSETSTR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6729 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6729;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FSETSTR_aget_INT_STR(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
if (!FSETSTR_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant FSET{STR}::invariant:BOOL ../Library/aref.sa:48:7\n");
exit(16);
}
frame->state = -1;
return dummy;
}
INT INT_times_INT(INT_times_INT_frame frame) {
INT dummy;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
frame->r_6732 = ((INT) 0);
if (!((frame->arg0>=0))) {
fprintf(stderr,"Violation of precondition ../Library/int.sa:748:8\n");
exit(16);
}
while (1) {
if ((frame->r_6732>=frame->arg0)) {
goto after_loop;
}
frame->state = 1;
return frame->r_6732;
state1:;
frame->r_6732 = (c_INT_plus_INT_INT_chk(frame->r_6732,1));
}
after_loop: ;
frame->state = -1;
return dummy;
}
SIG SIG_TBL_elt_SIG(SIG_TBL_elt_SIG_frame frame) {
SIG dummy;
SIG local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((SIG_TBL) NULL))))) {
{
frame->nested1 = ALLOCATE(SIG_TBL_aelt_SIG_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6735 = frame->arg0;
frame->nested1->arg0 = frame->noname6735;
}
local0 = SIG_TBL_aelt_SIG(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6736 = local0;
if ((!(SIG_TBL_elt_eq_S(frame->arg0, frame->r_6736, SIG_TBL_elt_nil_SIG(frame->arg0))))) {
frame->state = 1;
return frame->r_6736;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!SIG_TBL_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ../Library/fqset.sa:105:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL SIG_TBL_invarian(SIG_TBL self) {
BOOL noname6738 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((SIG_TBL) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
SIG SIG_TBL_aelt_SIG(SIG_TBL_aelt_SIG_frame frame) {
SIG dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((SIG_TBL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6740 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6740;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return SIG_TBL_aget_INT_SIG(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
TP FSETTP_elt_TP(FSETTP_elt_TP_frame frame) {
TP dummy;
TP local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FSETTP) NULL))))) {
{
frame->nested1 = ALLOCATE(FSETTP_aelt_TP_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6743 = frame->arg0;
frame->nested1->arg0 = frame->noname6743;
}
local0 = FSETTP_aelt_TP(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6744 = local0;
if ((!(FSETTP_elt_eq_TP(frame->arg0, frame->r_6744, FSETTP_elt_nil_TP(frame->arg0))))) {
frame->state = 1;
return frame->r_6744;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FSETTP_invariant(frame->arg0)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/fset.sa:98:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FSETTP_invariant(FSETTP self) {
BOOL noname6746 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FSETTP) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TP FSETTP_aelt_TP(FSETTP_aelt_TP_frame frame) {
TP dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FSETTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6748 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6748;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FSETTP_aget_INT_TP(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
if (!FSETTP_invariant(frame->arg0)) {
fprintf(stderr,"Failed invariant FSET{$TP}::invariant:BOOL ../Library/aref.sa:48:7\n");
exit(16);
}
frame->state = -1;
return dummy;
}
CHAR STR_elt_CHAR(STR_elt_CHAR_frame frame) {
CHAR dummy;
CHAR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((STR) NULL))))) {
{
frame->nested1 = ALLOCATE(STR_aelt_CHAR_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6751 = frame->arg0;
frame->nested1->arg0 = frame->noname6751;
}
local0 = STR_aelt_CHAR(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
CHAR STR_aelt_CHAR(STR_aelt_CHAR_frame frame) {
CHAR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((STR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6754 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6754;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return STR_aget_INT_CHAR(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
STR FLISTSTR_elt_STR(FLISTSTR_elt_STR_frame frame) {
STR dummy;
STR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTSTR) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTSTR_aelt_IN_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6757 = frame->arg0;
frame->noname6758 = 0;
frame->noname6759 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6757;
frame->nested1->arg1 = frame->noname6758;
frame->nested1->arg2 = frame->noname6759;
}
local0 = FLISTSTR_aelt_IN(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTSTR_invaria(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{STR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FLISTSTR_invaria(FLISTSTR self) {
BOOL noname6761 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTSTR) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
STR FLISTSTR_aelt_IN(FLISTSTR_aelt_IN_frame frame) {
STR dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTSTR) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6763 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6764 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6763;
frame->nested1->arg1 = frame->noname6764;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTSTR_aget_IN(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT INT_upto_INT_INT(INT_upto_INT_INT_frame frame) {
INT dummy;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
frame->r_6767 = frame->arg0;
while (1) {
if ((frame->r_6767>frame->arg1)) {
goto after_loop;
}
frame->state = 1;
return frame->r_6767;
state1:;
frame->r_6767 = (c_INT_plus_INT_INT_chk(frame->r_6767,1));
}
after_loop: ;
frame->state = -1;
return dummy;
}
INT INT_for_INT_INT(INT_for_INT_INT_frame frame) {
INT dummy;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((frame->arg1>=0))) {
fprintf(stderr,"Violation of precondition ../Library/int.sa:753:6\n");
exit(16);
}
frame->r_6770 = frame->arg0;
frame->e_6771 = (c_INT_plus_INT_INT_chk(frame->arg0,frame->arg1));
while (1) {
if ((frame->r_6770>=frame->e_6771)) {
goto after_loop;
}
frame->state = 1;
return frame->r_6770;
state1:;
frame->r_6770 = (c_INT_plus_INT_INT_chk(frame->r_6770,1));
}
after_loop: ;
frame->state = -1;
return dummy;
}
BOOL FMAPSTRITER_INLI_1037(FMAPSTRITER_INLINE self) {
BOOL noname6773 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPSTRITER_INLINE) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TP ARRAYTP_elt_TP(ARRAYTP_elt_TP_frame frame) {
TP dummy;
TP local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYTP) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYTP_aelt_TP_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6775 = frame->arg0;
frame->nested1->arg0 = frame->noname6775;
}
local0 = ARRAYTP_aelt_TP(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
TP ARRAYTP_aelt_TP(ARRAYTP_aelt_TP_frame frame) {
TP dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6778 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6778;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return ARRAYTP_aget_INT_TP(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
TP_ROUT TP_ROUT_TBL_elt__223(TP_ROUT_TBL_elt__223_frame frame) {
TP_ROUT dummy;
TP_ROUT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((TP_ROUT_TBL) NULL))))) {
{
frame->nested1 = ALLOCATE(TP_ROUT_TBL_aelt_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6781 = frame->arg0;
frame->nested1->arg0 = frame->noname6781;
}
local0 = TP_ROUT_TBL_aelt(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6782 = local0;
if ((!(TP_ROUT_TBL_elt__202(frame->arg0, frame->r_6782, TP_ROUT_TBL_elt_(frame->arg0))))) {
frame->state = 1;
return frame->r_6782;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!TP_ROUT_TBL_inva(frame->arg0)) {
fprintf(stderr,"Failed invariant TP_ROUT_TBL::invariant:BOOL ../Library/fqset.sa:105:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL TP_ROUT_TBL_inva(TP_ROUT_TBL self) {
BOOL noname6784 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((TP_ROUT_TBL) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TP_ROUT TP_ROUT_TBL_aelt(TP_ROUT_TBL_aelt_frame frame) {
TP_ROUT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((TP_ROUT_TBL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6786 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6786;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return TP_ROUT_TBL_aget(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT ARRAYSTR_ind_INT(ARRAYSTR_ind_INT_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYSTR) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYSTR_aind_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6789 = frame->arg0;
frame->nested1->arg0 = frame->noname6789;
}
local0 = ARRAYSTR_aind_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
INT ARRAYSTR_aind_INT(ARRAYSTR_aind_INT_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYSTR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:129:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6792 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6792;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT AM_BND_CREATE_EX_3800(AM_BND_CREATE_EX_3800_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_BND_CREATE_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_BND_CREATE_EX_6797_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6795 = frame->arg0;
frame->nested1->arg0 = frame->noname6795;
}
local0 = AM_BND_CREATE_EX_6797(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
INT AM_BND_CREATE_EX_6797(AM_BND_CREATE_EX_6797_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_BND_CREATE_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:129:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6799 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6799;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT INT_up_INT(INT_up_INT_frame frame) {
INT dummy;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
frame->r_6802 = frame->arg0;
while (1) {
frame->state = 1;
return frame->r_6802;
state1:;
frame->r_6802 = (c_INT_plus_INT_INT_chk(frame->r_6802,1));
}
after_loop: ;
frame->state = -1;
return dummy;
}
INT ARRAYINT_elt_INT(ARRAYINT_elt_INT_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYINT) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYINT_aelt_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6805 = frame->arg0;
frame->nested1->arg0 = frame->noname6805;
}
local0 = ARRAYINT_aelt_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
INT ARRAYINT_aelt_INT(ARRAYINT_aelt_INT_frame frame) {
INT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYINT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6808 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6808;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return ARRAYINT_aget_IN(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_BND_CREATE_EXPR FLISTAM_BND_CREA_4674(FLISTAM_BND_CREA_4674_frame frame) {
AM_BND_CREATE_EXPR dummy;
AM_BND_CREATE_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_BND_CREA) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_BND_CREA_6815_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6811 = frame->arg0;
frame->noname6812 = 0;
frame->noname6813 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6811;
frame->nested1->arg1 = frame->noname6812;
frame->nested1->arg2 = frame->noname6813;
}
local0 = FLISTAM_BND_CREA_6815(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_BND_CREA_1044(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{AM_BND_CREATE_EXPR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FLISTAM_BND_CREA_1044(FLISTAM_BND_CREA self) {
BOOL noname6816 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_BND_CREA) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
AM_BND_CREATE_EXPR FLISTAM_BND_CREA_6817(FLISTAM_BND_CREA self, INT ind_6818) {
AM_BND_CREATE_EXPR noname6819;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_BND_CREA) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6818, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_6818<0||ind_6818>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_6818];
}
AM_BND_CREATE_EXPR FLISTAM_BND_CREA_6820(FLISTAM_BND_CREA self, INT ind_6821) {
AM_BND_CREATE_EXPR noname6822;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_BND_CREA) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6821, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTAM_BND_CREA_6817(self, ind_6821);
if (!FLISTAM_BND_CREA_1044(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_BND_CREATE_EXPR}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
AM_BND_CREATE_EXPR FLISTAM_BND_CREA_6815(FLISTAM_BND_CREA_6815_frame frame) {
AM_BND_CREATE_EXPR dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_BND_CREA) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6824 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6825 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6824;
frame->nested1->arg1 = frame->noname6825;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_BND_CREA_6820(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_ROUT_DEF FLISTAM_ROUT_DEF_4104(FLISTAM_ROUT_DEF_4104_frame frame) {
AM_ROUT_DEF dummy;
AM_ROUT_DEF local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_ROUT_DEF) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_ROUT_DEF_6832_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6828 = frame->arg0;
frame->noname6829 = 0;
frame->noname6830 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6828;
frame->nested1->arg1 = frame->noname6829;
frame->nested1->arg2 = frame->noname6830;
}
local0 = FLISTAM_ROUT_DEF_6832(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_ROUT_DEF_1041(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FLISTAM_ROUT_DEF_1041(FLISTAM_ROUT_DEF self) {
BOOL noname6833 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_ROUT_DEF) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
AM_ROUT_DEF FLISTAM_ROUT_DEF_6834(FLISTAM_ROUT_DEF self, INT ind_6835) {
AM_ROUT_DEF noname6836;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_ROUT_DEF) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6835, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_6835<0||ind_6835>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_6835];
}
AM_ROUT_DEF FLISTAM_ROUT_DEF_6837(FLISTAM_ROUT_DEF self, INT ind_6838) {
AM_ROUT_DEF noname6839;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_ROUT_DEF) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6838, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTAM_ROUT_DEF_6834(self, ind_6838);
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
AM_ROUT_DEF FLISTAM_ROUT_DEF_6832(FLISTAM_ROUT_DEF_6832_frame frame) {
AM_ROUT_DEF dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_ROUT_DEF) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6841 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6842 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6841;
frame->nested1->arg1 = frame->noname6842;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_ROUT_DEF_6837(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
TP FLISTTP_elt_TP(FLISTTP_elt_TP_frame frame) {
TP dummy;
TP local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTTP) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTTP_aelt_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6845 = frame->arg0;
frame->noname6846 = 0;
frame->noname6847 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6845;
frame->nested1->arg1 = frame->noname6846;
frame->nested1->arg2 = frame->noname6847;
}
local0 = FLISTTP_aelt_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTTP_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FLISTTP_invarian(FLISTTP self) {
BOOL noname6849 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTTP) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
TP FLISTTP_aelt_INT(FLISTTP_aelt_INT_frame frame) {
TP dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTTP) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6851 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6852 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6851;
frame->nested1->arg1 = frame->noname6852;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTTP_aget_INT_TP(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
BOOL FMAPSIGAM_ROUT_D_1046(FMAPSIGAM_ROUT_DEF self) {
BOOL noname6854 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPSIGAM_ROUT_DEF) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TUPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4144(FMAPSIGAM_ROUT_D_4144_frame frame) {
TUPSIGAM_ROUT_DEF dummy;
TUPSIGAM_ROUT_DEF local0;
SIG local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPSIGAM_ROUT_DEF) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPSIGAM_ROUT_D_6859_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6856 = frame->arg0;
frame->nested1->arg0 = frame->noname6856;
}
local0 = FMAPSIGAM_ROUT_D_6859(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6857 = local0;
local1 = frame->r_6857.t1;
if ((!(FMAPSIGAM_ROUT_D_4151(frame->arg0, local1, FMAPSIGAM_ROUT_D_4119(frame->arg0))))) {
frame->state = 1;
return frame->r_6857;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPSIGAM_ROUT_D_1046(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:95:8\n");
exit(16);
}
frame->state = -1;
return dummy;
}
TUPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_6859(FMAPSIGAM_ROUT_D_6859_frame frame) {
TUPSIGAM_ROUT_DEF dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPSIGAM_ROUT_DEF) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6861 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6861;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FMAPSIGAM_ROUT_D_4148(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
TP FMAPTPINT_keys_TP(FMAPTPINT_keys_TP_frame frame) {
TP dummy;
TUPTPINT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPTPINT) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPTPINT_aelt_T_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6864 = frame->arg0;
frame->nested1->arg0 = frame->noname6864;
}
local0 = FMAPTPINT_aelt_T(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6865 = local0.t1;
if ((!(FMAPTPINT_key_eq(frame->arg0, frame->r_6865, FMAPTPINT_key_nil_TP(frame->arg0))))) {
frame->state = 1;
return frame->r_6865;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPTPINT_invari(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:103:7\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FMAPTPINT_invari(FMAPTPINT self) {
BOOL noname6867 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPTPINT) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TUPTPINT FMAPTPINT_aelt_T(FMAPTPINT_aelt_T_frame frame) {
TUPTPINT dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPTPINT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6869 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6869;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FMAPTPINT_aget_I(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
TUPTPINT FMAPTPINT_pairs_(FMAPTPINT_pairs__frame frame) {
TUPTPINT dummy;
TUPTPINT local0;
TP local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPTPINT) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPTPINT_aelt_T_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6872 = frame->arg0;
frame->nested1->arg0 = frame->noname6872;
}
local0 = FMAPTPINT_aelt_T(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6873 = local0;
local1 = frame->r_6873.t1;
if ((!(FMAPTPINT_key_eq(frame->arg0, local1, FMAPTPINT_key_nil_TP(frame->arg0))))) {
frame->state = 1;
return frame->r_6873;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPTPINT_invari(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:95:8\n");
exit(16);
}
frame->state = -1;
return dummy;
}
TUPIDENTTP FMAPIDENTTP_pair(FMAPIDENTTP_pair_frame frame) {
TUPIDENTTP dummy;
TUPIDENTTP local0;
IDENT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPIDENTTP) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPIDENTTP_aelt_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6876 = frame->arg0;
frame->nested1->arg0 = frame->noname6876;
}
local0 = FMAPIDENTTP_aelt(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6877 = local0;
local1 = frame->r_6877.t1;
if ((!(FMAPIDENTTP_key__3627(frame->arg0, local1, FMAPIDENTTP_key_(frame->arg0))))) {
frame->state = 1;
return frame->r_6877;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPIDENTTP_inva(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:95:8\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FMAPIDENTTP_inva(FMAPIDENTTP self) {
BOOL noname6879 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPIDENTTP) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TUPIDENTTP FMAPIDENTTP_aelt(FMAPIDENTTP_aelt_frame frame) {
TUPIDENTTP dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPIDENTTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6881 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6881;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FMAPIDENTTP_aget(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_GLOBAL_EXPR FLISTAM_GLOBAL_E_5942(FLISTAM_GLOBAL_E_5942_frame frame) {
AM_GLOBAL_EXPR dummy;
AM_GLOBAL_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_GLOBAL_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_GLOBAL_E_6888_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6884 = frame->arg0;
frame->noname6885 = 0;
frame->noname6886 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6884;
frame->nested1->arg1 = frame->noname6885;
frame->nested1->arg2 = frame->noname6886;
}
local0 = FLISTAM_GLOBAL_E_6888(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_GLOBAL_E_5920(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{AM_GLOBAL_EXPR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL FLISTAM_GLOBAL_E_5920(FLISTAM_GLOBAL_EXPR self) {
BOOL noname6889 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_GLOBAL_EXPR) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
AM_GLOBAL_EXPR FLISTAM_GLOBAL_E_6890(FLISTAM_GLOBAL_EXPR self, INT ind_6891) {
AM_GLOBAL_EXPR noname6892;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_GLOBAL_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6891, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_6891<0||ind_6891>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_6891];
}
AM_GLOBAL_EXPR FLISTAM_GLOBAL_E_6893(FLISTAM_GLOBAL_EXPR self, INT ind_6894) {
AM_GLOBAL_EXPR noname6895;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_GLOBAL_EXPR) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_6894, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTAM_GLOBAL_E_6890(self, ind_6894);
if (!FLISTAM_GLOBAL_E_5920(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_GLOBAL_EXPR}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
AM_GLOBAL_EXPR FLISTAM_GLOBAL_E_6888(FLISTAM_GLOBAL_E_6888_frame frame) {
AM_GLOBAL_EXPR dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_GLOBAL_EXPR) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6897 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6898 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6897;
frame->nested1->arg1 = frame->noname6898;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_GLOBAL_E_6893(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
BOOL FLISTSIG_invaria(FLISTSIG self) {
BOOL noname6900 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTSIG) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
TP_CLASS TP_CLASS_TBL_elt_161(TP_CLASS_TBL_elt_161_frame frame) {
TP_CLASS dummy;
TP_CLASS local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((TP_CLASS_TBL) NULL))))) {
{
frame->nested1 = ALLOCATE(TP_CLASS_TBL_ael_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6902 = frame->arg0;
frame->nested1->arg0 = frame->noname6902;
}
local0 = TP_CLASS_TBL_ael(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6903 = local0;
if ((!(TP_CLASS_TBL_elt_140(frame->arg0, frame->r_6903, TP_CLASS_TBL_elt(frame->arg0))))) {
frame->state = 1;
return frame->r_6903;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!TP_CLASS_TBL_inv(frame->arg0)) {
fprintf(stderr,"Failed invariant TP_CLASS_TBL::invariant:BOOL ../Library/fqset.sa:105:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL TP_CLASS_TBL_inv(TP_CLASS_TBL self) {
BOOL noname6905 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((TP_CLASS_TBL) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TP_CLASS TP_CLASS_TBL_ael(TP_CLASS_TBL_ael_frame frame) {
TP_CLASS dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((TP_CLASS_TBL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6907 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6907;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return TP_CLASS_TBL_age(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
BOOL FLISTAM_EXPR_inv(FLISTAM_EXPR self) {
BOOL noname6909 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_EXPR) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
BOOL INLINE_TBL_invar(INLINE_TBL self) {
BOOL noname6910 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((INLINE_TBL) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
BOOL FLISTAM_LOCAL_EX_3769(FLISTAM_LOCAL_EXPR self) {
BOOL noname6911 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_LOCAL_EXPR) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
void FLISTTP_aset_TP(FLISTTP_aset_TP_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6912 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6912;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTTP_aset_INT_TP(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
BOOL FLISTFLISTAM_CON_3982(FLISTFLISTAM_CONST self) {
BOOL noname6914 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTFLISTAM_CONST) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
BOOL FLISTAM_STMT_inv(FLISTAM_STMT self) {
BOOL noname6915 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_STMT) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
void FLISTAM_STMT_ase(FLISTAM_STMT_ase_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6916 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6916;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_STMT_ase_6196(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
AM_STMT FLISTAM_STMT_elt(FLISTAM_STMT_elt_frame frame) {
AM_STMT dummy;
AM_STMT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_STMT) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_STMT_ael_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6919 = frame->arg0;
frame->noname6920 = 0;
frame->noname6921 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6919;
frame->nested1->arg1 = frame->noname6920;
frame->nested1->arg2 = frame->noname6921;
}
local0 = FLISTAM_STMT_ael(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_STMT_inv(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
AM_STMT FLISTAM_STMT_ael(FLISTAM_STMT_ael_frame frame) {
AM_STMT dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_STMT) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6924 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6925 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6924;
frame->nested1->arg1 = frame->noname6925;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_STMT_age(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void FLISTFLISTAM_CON_6169(FLISTFLISTAM_CON_6169_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTFLISTAM_CONST) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6927 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6927;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTFLISTAM_CON_6175(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
FLISTAM_CONST FLISTFLISTAM_CON_6185(FLISTFLISTAM_CON_6185_frame frame) {
FLISTAM_CONST dummy;
FLISTAM_CONST local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTFLISTAM_CONST) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTFLISTAM_CON_6934_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6930 = frame->arg0;
frame->noname6931 = 0;
frame->noname6932 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6930;
frame->nested1->arg1 = frame->noname6931;
frame->nested1->arg2 = frame->noname6932;
}
local0 = FLISTFLISTAM_CON_6934(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTFLISTAM_CON_3982(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
FLISTAM_CONST FLISTFLISTAM_CON_6934(FLISTFLISTAM_CON_6934_frame frame) {
FLISTAM_CONST dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTFLISTAM_CONST) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6936 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6937 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6936;
frame->nested1->arg1 = frame->noname6937;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTFLISTAM_CON_3988(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
BOOL FLISTAM_CONST_in(FLISTAM_CONST self) {
BOOL noname6939 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_CONST) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
void FLISTAM_CONST_as_6148(FLISTAM_CONST_as_6148_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_CONST) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6940 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6940;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_CONST_as_6153(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
AM_CONST FLISTAM_CONST_el(FLISTAM_CONST_el_frame frame) {
AM_CONST dummy;
AM_CONST local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_CONST) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_CONST_ae_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6943 = frame->arg0;
frame->noname6944 = 0;
frame->noname6945 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname6943;
frame->nested1->arg1 = frame->noname6944;
frame->nested1->arg2 = frame->noname6945;
}
local0 = FLISTAM_CONST_ae(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_CONST_in(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
AM_CONST FLISTAM_CONST_ae(FLISTAM_CONST_ae_frame frame) {
AM_CONST dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_CONST) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6948 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname6949 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname6948;
frame->nested1->arg1 = frame->noname6949;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_CONST_ag(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT ELT_TBL_query_ha(ELT_TBL self, IDENT i) {
INT noname6951 = ((INT) 0);
return IDENT_hash_INT(i);
if (!ELT_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant ELT_TBL::invariant:BOOL ./elt.sa:170:13\n");
exit(16);
}
}
BOOL ELT_TBL_query_te(ELT_TBL self, IDENT name_6952, ELT e_6953) {
BOOL noname6954 = ((BOOL) 0);
if ((e_6953==((ELT) NULL))) {
return FALSE;
}
return IDENT_is_eq_IDEN(e_6953->sig_6->name_19, name_6952);
if (!ELT_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant ELT_TBL::invariant:BOOL ./elt.sa:165:13\n");
exit(16);
}
}
ELT ELT_TBL_get_quer(ELT_TBL_get_quer_frame frame) {
ELT dummy;
INT local0;
INT local1;
INT local2;
INT local3;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
case 2: goto state2;
}
state0:;
if ((frame->arg0==((ELT_TBL) NULL))) {
frame->state = -1;
return;
}
local0 = ELT_TBL_query_ha(frame->arg0, frame->arg1);
local1 = (frame->arg0->asize);
frame->h_6956 = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
frame->e_6957 = ELT_TBL_aget_INT_ELT(frame->arg0, frame->h_6956);
if (ELT_TBL_query_te(frame->arg0, frame->arg1, frame->e_6957)) {
frame->state = 1;
return frame->e_6957;
state1:;
}
else {
if (ELT_TBL_elt_eq_E(frame->arg0, frame->e_6957, ELT_TBL_elt_nil_ELT(frame->arg0))) {
goto after_loop;
}
}
frame->h_6956 = (c_INT_plus_INT_INT_chk(frame->h_6956,1));
}
after_loop: ;
local2 = (frame->arg0->asize);
if ((frame->h_6956==(c_INT_minus_INT_INT_chk(local2,1)))) {
frame->h_6956 = 0;
while (1) {
frame->e_6958 = ELT_TBL_aget_INT_ELT(frame->arg0, frame->h_6956);
if (ELT_TBL_query_te(frame->arg0, frame->arg1, frame->e_6958)) {
frame->state = 2;
return frame->e_6958;
state2:;
}
else {
if (ELT_TBL_elt_eq_E(frame->arg0, frame->e_6958, ELT_TBL_elt_nil_ELT(frame->arg0))) {
goto after_loop_6960;
}
}
frame->h_6956 = (c_INT_plus_INT_INT_chk(frame->h_6956,1));
}
after_loop_6960: ;
local3 = (frame->arg0->asize);
if (!((frame->h_6956!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fqset.sa:126:15\n");
exit(16);
}
}
if (!ELT_TBL_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant ELT_TBL::invariant:BOOL ../Library/fqset.sa:112:12\n");
exit(16);
}
frame->state = -1;
return dummy;
}
BOOL ELT_TBL_invarian(ELT_TBL self) {
BOOL noname6962 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((ELT_TBL) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
void FLISTAM_GLOBAL_E_5926(FLISTAM_GLOBAL_E_5926_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_GLOBAL_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6963 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6963;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_GLOBAL_E_5932(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
BOOL FMAPTPFMAPIDENTA_5104(FMAPTPFMAPIDENTA self) {
BOOL noname6965 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPTPFMAPIDENTA) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TUPTPFMAPIDENTAM FMAPTPFMAPIDENTA_5904(FMAPTPFMAPIDENTA_5904_frame frame) {
TUPTPFMAPIDENTAM dummy;
TUPTPFMAPIDENTAM local0;
TP local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPTPFMAPIDENTA) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPTPFMAPIDENTA_6970_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6967 = frame->arg0;
frame->nested1->arg0 = frame->noname6967;
}
local0 = FMAPTPFMAPIDENTA_6970(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6968 = local0;
local1 = frame->r_6968.t1;
if ((!(FMAPTPFMAPIDENTA_5110(frame->arg0, local1, FMAPTPFMAPIDENTA_5112(frame->arg0))))) {
frame->state = 1;
return frame->r_6968;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPTPFMAPIDENTA_5104(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{$TP,FMAP{IDENT,AM_GLOBAL_EXPR}}::invariant:BOOL ../Library/fmap.sa:95:8\n");
exit(16);
}
frame->state = -1;
return dummy;
}
TUPTPFMAPIDENTAM FMAPTPFMAPIDENTA_6970(FMAPTPFMAPIDENTA_6970_frame frame) {
TUPTPFMAPIDENTAM dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPTPFMAPIDENTA) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6972 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6972;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FMAPTPFMAPIDENTA_5107(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void FMAPTPFMAPIDENTA_5894(FMAPTPFMAPIDENTA_5894_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPTPFMAPIDENTA) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6974 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6974;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FMAPTPFMAPIDENTA_5906(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
BOOL FMAPIDENTAM_GLOB_5122(FMAPIDENTAM_GLOB self) {
BOOL noname6976 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FMAPIDENTAM_GLOB) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
TUPIDENTAM_GLOBA FMAPIDENTAM_GLOB_5869(FMAPIDENTAM_GLOB_5869_frame frame) {
TUPIDENTAM_GLOBA dummy;
TUPIDENTAM_GLOBA local0;
IDENT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FMAPIDENTAM_GLOB) NULL))))) {
{
frame->nested1 = ALLOCATE(FMAPIDENTAM_GLOB_6981_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6978 = frame->arg0;
frame->nested1->arg0 = frame->noname6978;
}
local0 = FMAPIDENTAM_GLOB_6981(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
frame->r_6979 = local0;
local1 = frame->r_6979.t1;
if ((!(FMAPIDENTAM_GLOB_5128(frame->arg0, local1, FMAPIDENTAM_GLOB_5130(frame->arg0))))) {
frame->state = 1;
return frame->r_6979;
state1:;
}
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FMAPIDENTAM_GLOB_5122(frame->arg0)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,AM_GLOBAL_EXPR}::invariant:BOOL ../Library/fmap.sa:95:8\n");
exit(16);
}
frame->state = -1;
return dummy;
}
TUPIDENTAM_GLOBA FMAPIDENTAM_GLOB_6981(FMAPIDENTAM_GLOB_6981_frame frame) {
TUPIDENTAM_GLOBA dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPIDENTAM_GLOB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6983 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6983;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FMAPIDENTAM_GLOB_5125(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void FMAPIDENTAM_GLOB_5859(FMAPIDENTAM_GLOB_5859_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FMAPIDENTAM_GLOB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6985 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6985;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FMAPIDENTAM_GLOB_5871(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
BOOL ARRAYBOOL_elt_BOOL(ARRAYBOOL_elt_BOOL_frame frame) {
BOOL dummy;
BOOL local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYBOOL) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYBOOL_aelt_BOOL_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6988 = frame->arg0;
frame->nested1->arg0 = frame->noname6988;
}
local0 = ARRAYBOOL_aelt_BOOL(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
BOOL ARRAYBOOL_aelt_BOOL(ARRAYBOOL_aelt_BOOL_frame frame) {
BOOL dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYBOOL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname6991 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6991;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return ARRAYBOOL_aget_I(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void ARRAYTP_set_TP(ARRAYTP_set_TP_frame frame) {
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYTP) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYTP_aset_TP_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6993 = frame->arg0;
frame->nested1->arg0 = frame->noname6993;
}
frame->nested1->arg1 = frame->arg1;
ARRAYTP_aset_TP(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
0 /* No return value from iter call */;
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return;
}
void ARRAYTP_aset_TP(ARRAYTP_aset_TP_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6995 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname6995;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
ARRAYTP_aset_INT_TP(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
void ARRAYBOOL_set_BOOL(ARRAYBOOL_set_BOOL_frame frame) {
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYBOOL) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYBOOL_aset_BOOL_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname6997 = frame->arg0;
frame->nested1->arg0 = frame->noname6997;
}
frame->nested1->arg1 = frame->arg1;
ARRAYBOOL_aset_BOOL(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
0 /* No return value from iter call */;
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return;
}
void ARRAYBOOL_aset_I(ARRAYBOOL self, INT ind_6999, BOOL val_7000) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((ARRAYBOOL) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_6999, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:38:7\n");
exit(16);
}
if (ind_6999<0||ind_6999>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_6999] = val_7000;
}
void ARRAYBOOL_aset_BOOL(ARRAYBOOL_aset_BOOL_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYBOOL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7001 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7001;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
ARRAYBOOL_aset_I(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
void ARRAYCALL_TP_set(ARRAYCALL_TP_set_frame frame) {
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYCALL_TP) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYCALL_TP_ase_7005_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7003 = frame->arg0;
frame->nested1->arg0 = frame->noname7003;
}
frame->nested1->arg1 = frame->arg1;
ARRAYCALL_TP_ase_7005(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
0 /* No return value from iter call */;
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return;
}
void ARRAYCALL_TP_ase_7005(ARRAYCALL_TP_ase_7005_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYCALL_TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7006 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7006;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
ARRAYCALL_TP_ase(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
BOOL FSETTP_CLASS_inv(FSETTP_CLASS self) {
BOOL noname7008 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((self==((FSETTP_CLASS) NULL))) {
local0 = TRUE;
} else {
local1 = self->hsize;
local2 = 0;
local0 = INT_is_bet_INT_I(local1, local2, (self->asize));
}
return local0;
}
void FLISTAM_EXPR_ase(FLISTAM_EXPR_ase_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7009 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7009;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_EXPR_ase_5481(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
AM_EXPR FLISTAM_EXPR_elt(FLISTAM_EXPR_elt_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_EXPR_ael_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7012 = frame->arg0;
frame->noname7013 = 0;
frame->noname7014 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname7012;
frame->nested1->arg1 = frame->noname7013;
frame->nested1->arg2 = frame->noname7014;
}
local0 = FLISTAM_EXPR_ael(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_EXPR_inv(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{$AM_EXPR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
AM_EXPR FLISTAM_EXPR_ael(FLISTAM_EXPR_ael_frame frame) {
AM_EXPR dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_EXPR) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7017 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname7018 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname7017;
frame->nested1->arg1 = frame->noname7018;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_EXPR_age(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void INLINE_GLOBAL_RE_7020(INLINE_GLOBAL_READ self, INT inlined) {
shared_INLINE_GL_6660 = inlined;
}
AM_EXPR INLINE_GLOBAL_RE_7021(INLINE_GLOBAL_READ self, AM_ROUT_CALL_EXPR call_7022, TRANS trans_7023) {
AM_EXPR noname7024;
INLINE_GLOBAL_RE_7020(self, (c_INT_plus_INT_INT_chk(shared_INLINE_GL_6660,1)));
return ((AM_EXPR) self->age);
}
AM_EXPR INLINE_ROUT_inli(INLINE_ROUT self, AM_ROUT_CALL_EXPR call_7025, TRANS trans_7026) {
AM_EXPR noname7027;
return ((AM_EXPR) call_7025);
}
AM_EXPR INLINE_BUILTIN_i(INLINE_BUILTIN self, AM_ROUT_CALL_EXPR call_7028, TRANS trans_7029) {
AM_EXPR noname7030;
return ((AM_EXPR) call_7028);
}
AM_EXPR INLINE_VARR_WRIT(INLINE_VARR_WRITE self, AM_ROUT_CALL_EXPR call_7031, TRANS trans_7032) {
AM_EXPR noname7033;
return ((AM_EXPR) call_7031);
}
AM_EXPR INLINE_ARR_WRITE_7034(INLINE_ARR_WRITE self, AM_ROUT_CALL_EXPR call_7035, TRANS trans_7036) {
AM_EXPR noname7037;
return ((AM_EXPR) call_7035);
}
AM_INT_CONST AM_INT_CONST_cre_7038(AM_INT_CONST self, SFILE_ID source_7039) {
AM_INT_CONST noname7040;
AM_INT_CONST r_7041;
AM_INT_CONST local0;
local0 = ((AM_INT_CONST) sbi_alloc(sizeof(struct AM_INT_CONST_struct), AM_INT_CONST_tag));
r_7041 = local0;
r_7041->source_38 = source_7039;
return r_7041;
}
void INLINE_INT_FOLD__7042(INLINE_INT_FOLD self, INT inlined) {
shared_INLINE_IN_6661 = inlined;
}
AM_EXPR INLINE_INT_FOLD__7043(INLINE_INT_FOLD self, AM_ROUT_CALL_EXPR call_7044, TRANS trans_7045) {
AM_EXPR noname7046;
AM_EXPR arg1_7047;
AM_EXPR arg2_7048;
AM_INT_CONST r_7049;
arg1_7047 = AM_ROUT_CALL_EXP_4316(call_7044, 0);
arg2_7048 = AM_ROUT_CALL_EXP_4316(call_7044, 1);
if (arg1_7047==NULL) {
} else
switch (arg1_7047->header.tag) {
case AM_INT_CONST_tag:
if (arg2_7048==NULL) {
} else
switch (arg2_7048->header.tag) {
case AM_INT_CONST_tag:
r_7049 = AM_INT_CONST_cre_7038(((AM_INT_CONST) NULL), ((AM_INT_CONST) arg1_7047)->source_38);
r_7049->val_16 = INTI_plus_INTI_INTI(((AM_INT_CONST) arg1_7047)->val_16, ((AM_INT_CONST) arg2_7048)->val_16);
r_7049->tp_at = ((AM_INT_CONST) arg1_7047)->tp_at;
INLINE_INT_FOLD__7042(self, (c_INT_plus_INT_INT_chk(shared_INLINE_IN_6661,1)));
return ((AM_EXPR) r_7049); break;
default: ;
} break;
default: ;
}
return ((AM_EXPR) call_7044);
}
AM_EXPR INLINE_VATTR_WRI(INLINE_VATTR_WRITE self, AM_ROUT_CALL_EXPR call_7050, TRANS trans_7051) {
AM_EXPR noname7052;
return ((AM_EXPR) call_7050);
}
AM_EXPR INLINE_ARR_READ_(INLINE_ARR_READ self, AM_ROUT_CALL_EXPR call_7053, TRANS trans_7054) {
AM_EXPR noname7055;
return ((AM_EXPR) call_7053);
}
AM_EXPR INLINE_VARR_READ_7056(INLINE_VARR_READ self, AM_ROUT_CALL_EXPR call_7057, TRANS trans_7058) {
AM_EXPR noname7059;
return ((AM_EXPR) call_7057);
}
AM_EXPR INLINE_VATTR_REA(INLINE_VATTR_READ self, AM_ROUT_CALL_EXPR call_7060, TRANS trans_7061) {
AM_EXPR noname7062;
return ((AM_EXPR) call_7060);
}
void INLINE_ATTR_WRIT_7063(INLINE_ATTR_WRITE self, INT inlined) {
shared_INLINE_AT_6659 = inlined;
}
AM_STMT_EXPR AM_STMT_EXPR_cre(AM_STMT_EXPR self, SFILE_ID source_7064) {
AM_STMT_EXPR noname7065;
AM_STMT_EXPR r_7066;
AM_STMT_EXPR local0;
local0 = ((AM_STMT_EXPR) sbi_alloc(sizeof(struct AM_STMT_EXPR_struct), AM_STMT_EXPR_tag));
r_7066 = local0;
r_7066->source_38 = source_7064;
return r_7066;
}
AM_EXPR INLINE_ATTR_WRIT_7067(INLINE_ATTR_WRITE self, AM_ROUT_CALL_EXPR call_7068, TRANS trans_7069) {
AM_EXPR noname7070;
AM_ATTR_EXPR a_7071;
AM_ASSIGN_STMT as_7072;
AM_STMT_EXPR r_7073;
INLINE_ATTR_WRIT_7063(self, (c_INT_plus_INT_INT_chk(shared_INLINE_AT_6659,1)));
a_7071 = AM_ATTR_EXPR_cre(((AM_ATTR_EXPR) NULL), call_7068->source_38);
a_7071->ob = AM_ROUT_CALL_EXP_4316(call_7068, 0);
a_7071->self_tp = self->self_tp;
a_7071->at = self->at;
a_7071->tp_at = self->tp_at;
as_7072 = AM_ASSIGN_STMT_c(((AM_ASSIGN_STMT) NULL), call_7068->source_38);
as_7072->dest = ((AM_EXPR) a_7071);
as_7072->src_42 = AM_ROUT_CALL_EXP_4316(call_7068, 1);
r_7073 = AM_STMT_EXPR_cre(((AM_STMT_EXPR) NULL), call_7068->source_38);
r_7073->stmts = ((AM_STMT) as_7072);
return ((AM_EXPR) r_7073);
}
void INLINE_ATTR_READ_7074(INLINE_ATTR_READ self, INT inlined) {
shared_INLINE_AT_6658 = inlined;
}
AM_EXPR INLINE_ATTR_READ_7075(INLINE_ATTR_READ self, AM_ROUT_CALL_EXPR call_7076, TRANS trans_7077) {
AM_EXPR noname7078;
AM_ATTR_EXPR r_7079;
INLINE_ATTR_READ_7074(self, (c_INT_plus_INT_INT_chk(shared_INLINE_AT_6658,1)));
r_7079 = AM_ATTR_EXPR_cre(((AM_ATTR_EXPR) NULL), call_7076->source_38);
r_7079->ob = AM_ROUT_CALL_EXP_4316(call_7076, 0);
r_7079->self_tp = self->self_tp;
r_7079->at = self->at;
r_7079->tp_at = self->tp_at;
return ((AM_EXPR) r_7079);
}
TP AM_ROUT_CALL_EXP_7080(AM_ROUT_CALL_EXPR self) {
TP noname7081;
return self->fun->ret;
}
TP AM_BND_ITER_CALL_7082(AM_BND_ITER_CALL self) {
TP noname7083;
TP bitp;
AM_EXPR local0;
local0 = self->bi;
bitp = (*AM_EXPR_tp_TP[local0->header.tag+AM_EXPR_tp_TP_offset])(local0);
if (bitp==NULL) {
} else
switch (bitp->header.tag) {
case TP_ITER_tag:
return ((TP_ITER) bitp)->ret; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./am.sa:649:14\n");
exit(16);
}
return ((TP) NULL);
}
TP AM_BND_ROUT_CALL_7084(AM_BND_ROUT_CALL self) {
TP noname7085;
TP brtp;
AM_EXPR local0;
local0 = self->br;
brtp = (*AM_EXPR_tp_TP[local0->header.tag+AM_EXPR_tp_TP_offset])(local0);
if (brtp==NULL) {
} else
switch (brtp->header.tag) {
case TP_ROUT_tag:
return ((TP_ROUT) brtp)->ret; break;
default: ;
fprintf(stderr,"No applicable type in typecase ./am.sa:630:14\n");
exit(16);
}
return ((TP) NULL);
}
BOOL FLISTAM_BND_ITER_5434(FLISTAM_BND_ITER self) {
BOOL noname7086 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
INT local3;
if ((self==((FLISTAM_BND_ITER) NULL))) {
return TRUE;
}
local1 = self->loc_17;
local2 = 0;
if (INT_is_bet_INT_I(local1, local2, (self->asize))) {
local3 = (self->asize);
local0 = (local3>0);
} else {
local0 = FALSE;
}
return local0;
}
void FLISTAM_BND_ITER_5440(FLISTAM_BND_ITER_5440_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_BND_ITER) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7087 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7087;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_BND_ITER_5446(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
AM_BND_ITER_CALL FLISTAM_BND_ITER_5456(FLISTAM_BND_ITER_5456_frame frame) {
AM_BND_ITER_CALL dummy;
AM_BND_ITER_CALL local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_BND_ITER) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_BND_ITER_7094_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7090 = frame->arg0;
frame->noname7091 = 0;
frame->noname7092 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname7090;
frame->nested1->arg1 = frame->noname7091;
frame->nested1->arg2 = frame->noname7092;
}
local0 = FLISTAM_BND_ITER_7094(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_BND_ITER_5434(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{AM_BND_ITER_CALL_EXPR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
AM_BND_ITER_CALL FLISTAM_BND_ITER_7095(FLISTAM_BND_ITER self, INT ind_7096) {
AM_BND_ITER_CALL noname7097;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_BND_ITER) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_7096, local1, (c_INT_minus_INT_INT_chk(local2,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:33:7\n");
exit(16);
}
if (ind_7096<0||ind_7096>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_7096];
}
AM_BND_ITER_CALL FLISTAM_BND_ITER_7098(FLISTAM_BND_ITER self, INT ind_7099) {
AM_BND_ITER_CALL noname7100;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_BND_ITER) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_7099, local1, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:68:7\n");
exit(16);
}
return FLISTAM_BND_ITER_7095(self, ind_7099);
if (!FLISTAM_BND_ITER_5434(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_BND_ITER_CALL_EXPR}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
AM_BND_ITER_CALL FLISTAM_BND_ITER_7094(FLISTAM_BND_ITER_7094_frame frame) {
AM_BND_ITER_CALL dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_BND_ITER) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7102 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname7103 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname7102;
frame->nested1->arg1 = frame->noname7103;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_BND_ITER_7098(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
void AM_EXPR_STMT_app(AM_EXPR_STMT self, AM_STMT l) {
AM_STMT last_7105;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_EXPR_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7105 = self->next_8;
while (1) {
local0 = last_7105;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7105;
last_7105 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7105;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_LOOP_STMT_app(AM_LOOP_STMT self, AM_STMT l) {
AM_STMT last_7108;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_LOOP_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7108 = self->next_8;
while (1) {
local0 = last_7108;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7108;
last_7108 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7108;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_BREAK_STMT_ap(AM_BREAK_STMT self, AM_STMT l) {
AM_STMT last_7110;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_BREAK_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7110 = self->next_8;
while (1) {
local0 = last_7110;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7110;
last_7110 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7110;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_YIELD_STMT_ap(AM_YIELD_STMT self, AM_STMT l) {
AM_STMT last_7112;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_YIELD_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7112 = self->next_8;
while (1) {
local0 = last_7112;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7112;
last_7112 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7112;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_ASSERT_STMT_a(AM_ASSERT_STMT self, AM_STMT l) {
AM_STMT last_7114;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_ASSERT_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7114 = self->next_8;
while (1) {
local0 = last_7114;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7114;
last_7114 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7114;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_POST_STMT_app(AM_POST_STMT self, AM_STMT l) {
AM_STMT last_7116;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_POST_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7116 = self->next_8;
while (1) {
local0 = last_7116;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7116;
last_7116 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7116;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_RETURN_STMT_a(AM_RETURN_STMT self, AM_STMT l) {
AM_STMT last_7118;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_RETURN_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7118 = self->next_8;
while (1) {
local0 = last_7118;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7118;
last_7118 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7118;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_TYPECASE_STMT_7120(AM_TYPECASE_STMT self, AM_STMT l) {
AM_STMT last_7121;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_TYPECASE_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7121 = self->next_8;
while (1) {
local0 = last_7121;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7121;
last_7121 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7121;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_PRE_STMT_appe(AM_PRE_STMT self, AM_STMT l) {
AM_STMT last_7123;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_PRE_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7123 = self->next_8;
while (1) {
local0 = last_7123;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7123;
last_7123 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7123;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_RAISE_STMT_ap(AM_RAISE_STMT self, AM_STMT l) {
AM_STMT last_7125;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_RAISE_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7125 = self->next_8;
while (1) {
local0 = last_7125;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7125;
last_7125 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7125;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_INVARIANT_STM_7127(AM_INVARIANT_STMT self, AM_STMT l) {
AM_STMT last_7128;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_INVARIANT_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7128 = self->next_8;
while (1) {
local0 = last_7128;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7128;
last_7128 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7128;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_CASE_STMT_app(AM_CASE_STMT self, AM_STMT l) {
AM_STMT last_7130;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_CASE_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7130 = self->next_8;
while (1) {
local0 = last_7130;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7130;
last_7130 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7130;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_IF_STMT_appen(AM_IF_STMT self, AM_STMT l) {
AM_STMT last_7132;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_IF_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7132 = self->next_8;
while (1) {
local0 = last_7132;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7132;
last_7132 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7132;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_PROTECT_STMT__7134(AM_PROTECT_STMT self, AM_STMT l) {
AM_STMT last_7135;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_PROTECT_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7135 = self->next_8;
while (1) {
local0 = last_7135;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7135;
last_7135 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7135;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_INITIAL_STMT__7137(AM_INITIAL_STMT self, AM_STMT l) {
AM_STMT last_7138;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_INITIAL_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7138 = self->next_8;
while (1) {
local0 = last_7138;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7138;
last_7138 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7138;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void AM_ASSIGN_STMT_a(AM_ASSIGN_STMT self, AM_STMT l) {
AM_STMT last_7140;
AM_STMT local0;
AM_STMT local1;
AM_STMT local2;
if (!((!((self==((AM_ASSIGN_STMT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/next.sa:50:9\n");
exit(16);
}
if ((self->next_8==((AM_STMT) NULL))) {
self->next_8 = l;
return;
}
last_7140 = self->next_8;
while (1) {
local0 = last_7140;
if (((*AM_STMT_next_AM_STMT[local0->header.tag+AM_STMT_next_AM_STMT_offset])(local0)==((AM_STMT) NULL))) {
goto after_loop;
}
local1 = last_7140;
last_7140 = (*AM_STMT_next_AM_STMT[local1->header.tag+AM_STMT_next_AM_STMT_offset])(local1);
}
after_loop: ;
local2 = last_7140;
(*AM_STMT_next_AM__7107[local2->header.tag+AM_STMT_next_AM__7107_offset])(local2, l);
}
void FLISTAM_LOCAL_EX_5370(FLISTAM_LOCAL_EX_5370_frame frame) {
INT local0;
INT local1;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((FLISTAM_LOCAL_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:77:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
if (frame->nested1->state == 0) {
frame->noname7142 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7142;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
local1 = local0;
FLISTAM_LOCAL_EX_5376(frame->arg0, local1, frame->arg1);
frame->state = 1;
return;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return;
}
AM_LOCAL_EXPR FLISTAM_LOCAL_EX_4237(FLISTAM_LOCAL_EX_4237_frame frame) {
AM_LOCAL_EXPR dummy;
AM_LOCAL_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_LOCAL_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(FLISTAM_LOCAL_EX_7149_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7145 = frame->arg0;
frame->noname7146 = 0;
frame->noname7147 = frame->arg0->loc_17;
frame->nested1->arg0 = frame->noname7145;
frame->nested1->arg1 = frame->noname7146;
frame->nested1->arg2 = frame->noname7147;
}
local0 = FLISTAM_LOCAL_EX_7149(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
if (!FLISTAM_LOCAL_EX_3769(frame->arg0)) {
fprintf(stderr,"Failed invariant FLIST{AM_LOCAL_EXPR}::invariant:BOOL ../Library/flist.sa:127:6\n");
exit(16);
}
frame->state = -1;
return dummy;
}
AM_LOCAL_EXPR FLISTAM_LOCAL_EX_7149(FLISTAM_LOCAL_EX_7149_frame frame) {
AM_LOCAL_EXPR dummy;
BOOL local0;
BOOL local1;
INT local2;
INT local3;
INT local4;
INT local5;
INT local6;
INT local7;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((FLISTAM_LOCAL_EXPR) NULL))))) {
local2 = 0;
local3 = (frame->arg0->asize);
local1 = INT_is_bet_INT_I(frame->arg1, local2, (c_INT_minus_INT_INT_chk(local3,1)));
} else {
local1 = FALSE;
}
if (local1) {
local4 = 0;
local5 = (frame->arg0->asize);
local0 = INT_is_bet_INT_I(frame->arg2, local4, (c_INT_minus_INT_INT_chk(local5,frame->arg1)));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:58:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_upto_INT_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7151 = frame->arg1;
local7 = (c_INT_plus_INT_INT_chk(frame->arg1,frame->arg2));
frame->noname7152 = (c_INT_minus_INT_INT_chk(local7,1));
frame->nested1->arg0 = frame->noname7151;
frame->nested1->arg1 = frame->noname7152;
}
local6 = INT_upto_INT_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return FLISTAM_LOCAL_EX_3775(frame->arg0, local6);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_EXPR AM_EXT_CALL_EXPR_3901(AM_EXT_CALL_EXPR_3901_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_EXT_CALL_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_EXT_CALL_EXPR_7157_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7155 = frame->arg0;
frame->nested1->arg0 = frame->noname7155;
}
local0 = AM_EXT_CALL_EXPR_7157(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
AM_EXPR AM_EXT_CALL_EXPR_7157(AM_EXT_CALL_EXPR_7157_frame frame) {
AM_EXPR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_EXT_CALL_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7159 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7159;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return AM_EXT_CALL_EXPR_4610(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_EXPR AM_BND_ROUT_CALL_3884(AM_BND_ROUT_CALL_3884_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_BND_ROUT_CALL) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_BND_ROUT_CALL_7164_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7162 = frame->arg0;
frame->nested1->arg0 = frame->noname7162;
}
local0 = AM_BND_ROUT_CALL_7164(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
AM_EXPR AM_BND_ROUT_CALL_7164(AM_BND_ROUT_CALL_7164_frame frame) {
AM_EXPR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_BND_ROUT_CALL) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7166 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7166;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return AM_BND_ROUT_CALL_4679(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_EXPR AM_BND_CREATE_EX_5356(AM_BND_CREATE_EX_5356_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_BND_CREATE_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_BND_CREATE_EX_7171_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7169 = frame->arg0;
frame->nested1->arg0 = frame->noname7169;
}
local0 = AM_BND_CREATE_EX_7171(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
AM_EXPR AM_BND_CREATE_EX_7171(AM_BND_CREATE_EX_7171_frame frame) {
AM_EXPR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_BND_CREATE_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7173 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7173;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return AM_BND_CREATE_EX_3787(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_EXPR AM_ARRAY_EXPR_el(AM_ARRAY_EXPR_el_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_ARRAY_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_ARRAY_EXPR_ae_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7176 = frame->arg0;
frame->nested1->arg0 = frame->noname7176;
}
local0 = AM_ARRAY_EXPR_ae(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
AM_EXPR AM_ARRAY_EXPR_ae(AM_ARRAY_EXPR_ae_frame frame) {
AM_EXPR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_ARRAY_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7179 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7179;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return AM_ARRAY_EXPR_ag(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
AM_EXPR AM_ROUT_CALL_EXP(AM_ROUT_CALL_EXP_frame frame) {
AM_EXPR dummy;
AM_EXPR local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((AM_ROUT_CALL_EXPR) NULL))))) {
{
frame->nested1 = ALLOCATE(AM_ROUT_CALL_EXP_7184_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7182 = frame->arg0;
frame->nested1->arg0 = frame->noname7182;
}
local0 = AM_ROUT_CALL_EXP_7184(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
AM_EXPR AM_ROUT_CALL_EXP_7184(AM_ROUT_CALL_EXP_7184_frame frame) {
AM_EXPR dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((AM_ROUT_CALL_EXPR) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7186 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7186;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return AM_ROUT_CALL_EXP_4316(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
CALL_TP ARRAYCALL_TP_elt(ARRAYCALL_TP_elt_frame frame) {
CALL_TP dummy;
CALL_TP local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if ((!((frame->arg0==((ARRAYCALL_TP) NULL))))) {
{
frame->nested1 = ALLOCATE(ARRAYCALL_TP_ael_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7189 = frame->arg0;
frame->nested1->arg0 = frame->noname7189;
}
local0 = ARRAYCALL_TP_ael(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return local0;
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
}
frame->state = -1;
return dummy;
}
CALL_TP ARRAYCALL_TP_ael(ARRAYCALL_TP_ael_frame frame) {
CALL_TP dummy;
INT local0;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
}
state0:;
if (!((!((frame->arg0==((ARRAYCALL_TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:48:7\n");
exit(16);
}
{
frame->nested1 = ALLOCATE(INT_times_INT_frame);
frame->nested1->state = 0;
while (1) {
frame->state = 1;
if (frame->nested1->state == 0) {
frame->noname7192 = (frame->arg0->asize);
frame->nested1->arg0 = frame->noname7192;
}
local0 = INT_times_INT(frame->nested1);
if (frame->nested1->state == -1) goto after_loop;
return ARRAYCALL_TP_age(frame->arg0, local0);
state1:;
}
}
after_loop: ;
GC_free(frame->nested1); frame->nested1 = NULL;
frame->state = -1;
return dummy;
}
INT SIG_TBL_query_ha(SIG_TBL self, IDENT i) {
INT noname7194 = ((INT) 0);
return IDENT_hash_INT(i);
if (!SIG_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ./sig.sa:380:13\n");
exit(16);
}
}
BOOL SIG_TBL_query_te(SIG_TBL self, IDENT name_7195, SIG s_7196) {
BOOL noname7197 = ((BOOL) 0);
if ((s_7196==((SIG) NULL))) {
return FALSE;
}
return IDENT_is_eq_IDEN(s_7196->name_19, name_7195);
if (!SIG_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ./sig.sa:375:13\n");
exit(16);
}
}
SIG SIG_TBL_get_quer(SIG_TBL_get_quer_frame frame) {
SIG dummy;
INT local0;
INT local1;
INT local2;
INT local3;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
case 2: goto state2;
}
state0:;
if ((frame->arg0==((SIG_TBL) NULL))) {
frame->state = -1;
return;
}
local0 = SIG_TBL_query_ha(frame->arg0, frame->arg1);
local1 = (frame->arg0->asize);
frame->h_7199 = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
frame->e_7200 = SIG_TBL_aget_INT_SIG(frame->arg0, frame->h_7199);
if (SIG_TBL_query_te(frame->arg0, frame->arg1, frame->e_7200)) {
frame->state = 1;
return frame->e_7200;
state1:;
}
else {
if (SIG_TBL_elt_eq_S(frame->arg0, frame->e_7200, SIG_TBL_elt_nil_SIG(frame->arg0))) {
goto after_loop;
}
}
frame->h_7199 = (c_INT_plus_INT_INT_chk(frame->h_7199,1));
}
after_loop: ;
local2 = (frame->arg0->asize);
if ((frame->h_7199==(c_INT_minus_INT_INT_chk(local2,1)))) {
frame->h_7199 = 0;
while (1) {
frame->e_7201 = SIG_TBL_aget_INT_SIG(frame->arg0, frame->h_7199);
if (SIG_TBL_query_te(frame->arg0, frame->arg1, frame->e_7201)) {
frame->state = 2;
return frame->e_7201;
state2:;
}
else {
if (SIG_TBL_elt_eq_S(frame->arg0, frame->e_7201, SIG_TBL_elt_nil_SIG(frame->arg0))) {
goto after_loop_7203;
}
}
frame->h_7199 = (c_INT_plus_INT_INT_chk(frame->h_7199,1));
}
after_loop_7203: ;
local3 = (frame->arg0->asize);
if (!((frame->h_7199!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fqset.sa:126:15\n");
exit(16);
}
}
if (!SIG_TBL_invarian(frame->arg0)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ../Library/fqset.sa:112:12\n");
exit(16);
}
frame->state = -1;
return dummy;
}
STR STR_separate_STR_STR(STR_separate_STR_STR_frame frame) {
STR dummy;
switch (frame->state) {
case 0: goto state0;
case 1: goto state1;
case 2: goto state2;
}
state0:;
frame->state = 1;
return frame->arg1;
state1:;
while (1) {
frame->state = 2;
return STR_plus_STR_STR(frame->arg0, frame->arg1);
state2:;
}
after_loop: ;
frame->state = -1;
return dummy;
}
STR CALL_TP_UNDERSCO_7207(CALL_TP_UNDERSCORE self) {
STR noname7208;
STR local0;
TP local1;
if ((self->tp==((TP) NULL))) {
return ((STR) &underscoreexpression);
}
local0 = ((STR) &underscoreexpres_7209);
local1 = self->tp;
return STR_plus_STR_STR(local0, (*TP_str_STR[local1->header.tag+TP_str_STR_offset])(local1));
}
STR CALL_TP_CREATE_s(CALL_TP_CREATE self) {
STR noname7210;
return ((STR) &createexpression_7211);
}
STR CALL_TP_ARRAY_st(CALL_TP_ARRAY self) {
STR noname7212;
return ((STR) &arrayexpression_7213);
}
STR CALL_TP_VOID_str_STR(CALL_TP_VOID self) {
STR noname7214;
return ((STR) &voidexpression);
}
BOOL CALL_TP_UNDERSCO_7215(CALL_TP_UNDERSCORE self, TP t_7216) {
BOOL noname7217 = ((BOOL) 0);
TP local0;
if (!((!((t_7216==((TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ./call.sa:125:13\n");
exit(16);
}
if ((self->tp==((TP) NULL))) {
return TRUE;
}
local0 = self->tp;
return (*TP_is_subtype_TP[local0->header.tag+TP_is_subtype_TP_offset])(local0, t_7216);
}
BOOL TP_ROUT_has_ret_BOOL(TP_ROUT self) {
BOOL noname7218 = ((BOOL) 0);
return (!((self->ret==((TP) NULL))));
}
BOOL TP_ROUT_is_subty(TP_ROUT self, TP t_7219) {
BOOL noname7220 = ((BOOL) 0);
ARRAYTP noname7221;
ARRAYTP noname7222;
INT local0;
TP local1;
TP local2;
TP local3;
TP local4;
BOOL local5;
BOOL local6;
TP local7;
if ((self==((TP_ROUT) NULL))) {
return FALSE;
}
if (t_7219==NULL) {
} else
switch (t_7219->header.tag) {
case TP_CLASS_tag:
if ((!(TP_CLASS_is_abst(((TP_CLASS) t_7219))))) {
return FALSE;
}
else {
return PROG_abs_subtype(self->prog, ((TP) self), ((TP_CLASS) t_7219));
} break;
case TP_ROUT_tag:
local0 = ARRAYTP_size_INT(self->args_7);
if ((local0!=ARRAYTP_size_INT(((TP_ROUT) t_7219)->args_7))) {
return FALSE;
}
{
struct ARRAYTP_elt_TP_frame_struct temp7223_0;
ARRAYTP_elt_TP_frame
noname7224 = &temp7223_0;
struct ARRAYTP_elt_TP_frame_struct temp7223_1;
ARRAYTP_elt_TP_frame
noname7225 = &temp7223_1;
noname7224->state = 0;
noname7225->state = 0;
while (1) {
if (noname7224->state == 0) {
noname7221 = ((TP_ROUT) t_7219)->args_7;
noname7224->arg0 = noname7221;
}
local1 = ARRAYTP_elt_TP(noname7224);
if (noname7224->state == -1) goto after_loop;
local2 = local1;
if (noname7225->state == 0) {
noname7222 = self->args_7;
noname7225->arg0 = noname7222;
}
local3 = ARRAYTP_elt_TP(noname7225);
if (noname7225->state == -1) goto after_loop;
local4 = local2;
if ((!((*TP_is_subtype_TP[local4->header.tag+TP_is_subtype_TP_offset])(local4, local3)))) {
return FALSE;
}
}
}
after_loop: ;
local5 = TP_ROUT_has_ret_BOOL(self);
if (((local5)!=(TP_ROUT_has_ret_BOOL(((TP_ROUT) t_7219))))) {
return FALSE;
}
if (TP_ROUT_has_ret_BOOL(self)) {
local7 = self->ret;
local6 = (!((*TP_is_subtype_TP[local7->header.tag+TP_is_subtype_TP_offset])(local7, ((TP_ROUT) t_7219)->ret)));
} else {
local6 = FALSE;
}
if (local6) {
return FALSE;
}
return TRUE; break;
default: ;
}
return FALSE;
}
BOOL CALL_TP_CREATE_i(CALL_TP_CREATE self, TP t_7226) {
BOOL noname7227 = ((BOOL) 0);
INT noname7228 = ((INT) 0);
TP local0;
if (!((!((t_7226==((TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ./call.sa:68:13\n");
exit(16);
}
local0 = t_7226;
noname7228 = (*TP_kind_INT[local0->header.tag+TP_kind_INT_offset])(local0);
switch (noname7228) {
case 1:
return TRUE;
break;
case 2:
return TRUE;
break;
case 3:
return FALSE;
break;
case 4:
return FALSE;
break;
case 5:
return FALSE;
break;
case 6:
return FALSE;
break;
default: ;
fprintf(stderr,"No applicable target in case statement ./call.sa:72:18\n");
exit(16);
}
return FALSE;
}
BOOL CALL_TP_ARRAY_is(CALL_TP_ARRAY self, TP t_7229) {
BOOL noname7230 = ((BOOL) 0);
IDENT local0;
if (t_7229==NULL) {
} else
switch (t_7229->header.tag) {
case TP_CLASS_tag:
local0 = ((TP_CLASS) t_7229)->name_19;
return IDENT_is_eq_IDEN(local0, PROG_ident_for_S(((TP_CLASS) t_7229)->prog, ((STR) &ARRAY_7231))); break;
default: ;
}
return FALSE;
}
BOOL CALL_TP_VOID_is_(CALL_TP_VOID self, TP t_7232) {
BOOL noname7233 = ((BOOL) 0);
if (!((!((t_7232==((TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ./call.sa:46:13\n");
exit(16);
}
return TRUE;
}
BOOL TP_ITER_has_ret_BOOL(TP_ITER self) {
BOOL noname7234 = ((BOOL) 0);
if ((self==((TP_ITER) NULL))) {
return FALSE;
}
return (!((self->ret==((TP) NULL))));
}
BOOL TP_ITER_is_subty(TP_ITER self, TP t_7235) {
BOOL noname7236 = ((BOOL) 0);
ARRAYTP noname7237;
ARRAYTP noname7238;
ARRAYBOOL noname7239;
ARRAYBOOL noname7240;
INT local0;
TP local1;
TP local2;
TP local3;
TP local4;
INT local5;
BOOL local6;
BOOL local7;
BOOL local8;
BOOL local9;
BOOL local10;
TP local11;
if ((self==((TP_ITER) NULL))) {
return FALSE;
}
if (t_7235==NULL) {
} else
switch (t_7235->header.tag) {
case TP_CLASS_tag:
if ((!(TP_CLASS_is_abst(((TP_CLASS) t_7235))))) {
return FALSE;
}
else {
return PROG_abs_subtype(self->prog, ((TP) self), ((TP_CLASS) t_7235));
} break;
case TP_ITER_tag:
local0 = ARRAYTP_size_INT(self->args_7);
if ((local0!=ARRAYTP_size_INT(((TP_ITER) t_7235)->args_7))) {
return FALSE;
}
{
struct ARRAYTP_elt_TP_frame_struct temp7241_0;
ARRAYTP_elt_TP_frame
noname7242 = &temp7241_0;
struct ARRAYTP_elt_TP_frame_struct temp7241_1;
ARRAYTP_elt_TP_frame
noname7243 = &temp7241_1;
noname7242->state = 0;
noname7243->state = 0;
while (1) {
if (noname7242->state == 0) {
noname7237 = ((TP_ITER) t_7235)->args_7;
noname7242->arg0 = noname7237;
}
local1 = ARRAYTP_elt_TP(noname7242);
if (noname7242->state == -1) goto after_loop;
local2 = local1;
if (noname7243->state == 0) {
noname7238 = self->args_7;
noname7243->arg0 = noname7238;
}
local3 = ARRAYTP_elt_TP(noname7243);
if (noname7243->state == -1) goto after_loop;
local4 = local2;
if ((!((*TP_is_subtype_TP[local4->header.tag+TP_is_subtype_TP_offset])(local4, local3)))) {
return FALSE;
}
}
}
after_loop: ;
local5 = ARRAYBOOL_size_INT(self->hot);
if ((local5!=ARRAYBOOL_size_INT(((TP_ITER) t_7235)->hot))) {
return FALSE;
}
{
struct ARRAYBOOL_elt_BOOL_frame_struct temp7245_0;
ARRAYBOOL_elt_BOOL_frame
noname7246 = &temp7245_0;
struct ARRAYBOOL_elt_BOOL_frame_struct temp7245_1;
ARRAYBOOL_elt_BOOL_frame
noname7247 = &temp7245_1;
noname7246->state = 0;
noname7247->state = 0;
while (1) {
if (noname7246->state == 0) {
noname7239 = self->hot;
noname7246->arg0 = noname7239;
}
local6 = ARRAYBOOL_elt_BOOL(noname7246);
if (noname7246->state == -1) goto after_loop_7244;
local7 = local6;
if (noname7247->state == 0) {
noname7240 = ((TP_ITER) t_7235)->hot;
noname7247->arg0 = noname7240;
}
local8 = ARRAYBOOL_elt_BOOL(noname7247);
if (noname7247->state == -1) goto after_loop_7244;
if (((local7)!=(local8))) {
return FALSE;
}
}
}
after_loop_7244: ;
local9 = TP_ITER_has_ret_BOOL(self);
if (((local9)!=(TP_ITER_has_ret_BOOL(((TP_ITER) t_7235))))) {
return FALSE;
}
if (TP_ITER_has_ret_BOOL(self)) {
local11 = self->ret;
local10 = (!((*TP_is_subtype_TP[local11->header.tag+TP_is_subtype_TP_offset])(local11, ((TP_ITER) t_7235)->ret)));
} else {
local10 = FALSE;
}
if (local10) {
return FALSE;
}
return TRUE; break;
default: ;
}
return FALSE;
}
INT TR_HERE_EXPR_siz(TR_HERE_EXPR self) {
INT noname7248 = ((INT) 0);
INT r_7249 = ((INT) 0);
TR_EXPR n_7250;
TR_EXPR local0;
if ((self==((TR_HERE_EXPR) NULL))) {
return 0;
}
r_7249 = 1;
n_7250 = self->next_8;
while (1) {
if ((n_7250==((TR_EXPR) NULL))) {
goto after_loop;
}
r_7249 = (c_INT_plus_INT_INT_chk(r_7249,1));
local0 = n_7250;
n_7250 = (*TR_EXPR_next_TR_EXPR[local0->header.tag+TR_EXPR_next_TR_EXPR_offset])(local0);
}
after_loop: ;
return r_7249;
}
INT TR_CHAR_LIT_EXPR_7252(TR_CHAR_LIT_EXPR self) {
INT noname7253 = ((INT) 0);
INT r_7254 = ((INT) 0);
TR_EXPR n_7255;
TR_EXPR local0;
if ((self==((TR_CHAR_LIT_EXPR) NULL))) {
return 0;
}
r_7254 = 1;
n_7255 = self->next_8;
while (1) {
if ((n_7255==((TR_EXPR) NULL))) {
goto after_loop;
}
r_7254 = (c_INT_plus_INT_INT_chk(r_7254,1));
local0 = n_7255;
n_7255 = (*TR_EXPR_next_TR_EXPR[local0->header.tag+TR_EXPR_next_TR_EXPR_offset])(local0);
}
after_loop: ;
return r_7254;
}