home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sa104os2.zip
/
SATHR104.ZIP
/
SATHER
/
BOOT
/
CS.COD
/
CODE3.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-15
|
258KB
|
9,088 lines
/* C code generated by Sather 1.0 compiler */
#include "sather.h"
#include "strings.h"
SIG SIG_bound_iter_c(SIG self, TP_ITER tp_3398) {
SIG noname3399;
SIG r_3400;
SIG local0;
if (!((!((tp_3398==((TP_ITER) NULL)))))) {
fprintf(stderr,"Violation of precondition ./sig.sa:262:18\n");
exit(16);
}
local0 = ((SIG) sbi_alloc(sizeof(struct SIG_struct), SIG_tag));
r_3400 = local0;
r_3400->tp = ((TP) tp_3398);
r_3400->name_19 = PROG_ident_for_S(tp_3398->prog, ((STR) &call_3401));
r_3400->args_7 = tp_3398->args_7;
r_3400->hot = tp_3398->hot;
r_3400->ret = tp_3398->ret;
SIG_do_is_builtin(r_3400);
return r_3400;
}
IFC IFC_ifc_for_iter(IFC self, TP_ITER t_3402) {
IFC noname3403;
IFC r_3404;
IFC local0;
SIG_TBL local1;
if (!((!((t_3402==((TP_ITER) NULL)))))) {
fprintf(stderr,"Violation of precondition ./ifc.sa:103:15\n");
exit(16);
}
local0 = ((IFC) sbi_alloc(sizeof(struct IFC_struct), IFC_tag));
r_3404 = local0;
r_3404->tp = ((TP) t_3402);
local1 = r_3404->sigs;
r_3404->sigs = SIG_TBL_insert_S(local1, SIG_bound_iter_c(((SIG) NULL), t_3402));
return r_3404;
}
TUPTPIFC TUPTPIFC_t1_TP_T(TUPTPIFC self, TP t1_3405) {
TUPTPIFC local0;
local0 = self;
local0.t1 = t1_3405;
return local0;
}
TUPTPIFC TUPTPIFC_t2_IFC_(TUPTPIFC self, IFC t2_3406) {
TUPTPIFC local0;
local0 = self;
local0.t2 = t2_3406;
return local0;
}
TUPTPIFC TUPTPIFC_create_(TUPTPIFC self, TP at1, IFC at2) {
TUPTPIFC noname3407 = TUPTPIFC_zero;
TUPTPIFC local0;
local0 = TUPTPIFC_t1_TP_T(self, at1);
return TUPTPIFC_t2_IFC_(local0, at2);
}
FMAPTPIFC FMAPTPIFC_alloca(FMAPTPIFC self, INT n_3408) {
FMAPTPIFC noname3409;
FMAPTPIFC r_3410;
FMAPTPIFC noname3411;
FMAPTPIFC local0;
TUPTPIFC local1;
TP local2;
local0 = ((FMAPTPIFC) sbi_arr_alloc(sizeof(struct FMAPTPIFC_struct), FMAPTPIFC_tag, sizeof(TUPTPIFC) , n_3408));
local0->asize = n_3408;
r_3410 = local0;
if ((!((FMAPTPIFC_key_nil_TP(self)==((TP) NULL))))) {
{
struct FMAPTPIFC_aset_T_frame_struct temp3412_0;
FMAPTPIFC_aset_T_frame
noname3413 = &temp3412_0;
noname3413->state = 0;
while (1) {
if (noname3413->state == 0) {
noname3411 = r_3410;
noname3413->arg0 = noname3411;
}
local1 = TUPTPIFC_zero;
local2 = FMAPTPIFC_key_nil_TP(self);
noname3413->arg1 = TUPTPIFC_create_(local1, local2, ((IFC) NULL));
FMAPTPIFC_aset_T(noname3413);
if (noname3413->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_3410;
}
FMAPTPIFC FMAPTPIFC_insert(FMAPTPIFC self, TUPTPIFC p) {
FMAPTPIFC noname3414;
return FMAPTPIFC_insert_3415(self, p.t1, p.t2);
if (!FMAPTPIFC_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,IFC}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPTPIFC FMAPTPIFC_double(FMAPTPIFC self) {
FMAPTPIFC noname3416;
INT ns = ((INT) 0);
FMAPTPIFC r_3417;
FMAPTPIFC noname3418;
INT local0;
INT local1;
INT local2;
TUPTPIFC local3;
if (!((!((self==((FMAPTPIFC) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_3417 = FMAPTPIFC_alloca(self, ns);
{
struct FMAPTPIFC_pairs__frame_struct temp3419_0;
FMAPTPIFC_pairs__frame
noname3420 = &temp3419_0;
noname3420->state = 0;
while (1) {
if (noname3420->state == 0) {
noname3418 = self;
noname3420->arg0 = noname3418;
}
local3 = FMAPTPIFC_pairs_(noname3420);
if (noname3420->state == -1) goto after_loop;
r_3417 = FMAPTPIFC_insert(r_3417, local3);
}
}
after_loop: ;
return r_3417;
}
void FMAPTPIFC_aset_I(FMAPTPIFC self, INT ind_3421, TUPTPIFC val_3422) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPTPIFC) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3421, 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_3421<0||ind_3421>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_3421] = val_3422;
}
FMAPTPIFC FMAPTPIFC_insert_3415(FMAPTPIFC self, TP k, IFC t_3423) {
FMAPTPIFC noname3424;
FMAPTPIFC r_3425;
INT h = ((INT) 0);
INT asm_3426 = ((INT) 0);
TP tk;
TP tk_3427;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_3425 = self;
if ((r_3425==((FMAPTPIFC) NULL))) {
r_3425 = FMAPTPIFC_alloca(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_3425 = FMAPTPIFC_double(self);
}
}
local2 = FMAPTPIFC_key_ha(r_3425, k);
local3 = (r_3425->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_3425->asize);
asm_3426 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPTPIFC_blob=FMAPTPIFC_aget_I(r_3425, h)).t1;
if (FMAPTPIFC_key_eq(self, tk, FMAPTPIFC_key_nil_TP(self))) {
goto after_loop;
}
if (FMAPTPIFC_key_eq(self, tk, k)) {
FMAPTPIFC_aset_I(r_3425, h, TUPTPIFC_create_(TUPTPIFC_zero, k, t_3423));
return r_3425;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_3426)) {
h = 0;
while (1) {
tk_3427 = (TUPTPIFC_blob=FMAPTPIFC_aget_I(r_3425, h)).t1;
if (FMAPTPIFC_key_eq(self, tk_3427, FMAPTPIFC_key_nil_TP(self))) {
goto after_loop_3429;
}
if (FMAPTPIFC_key_eq(self, tk_3427, k)) {
FMAPTPIFC_aset_I(r_3425, h, TUPTPIFC_create_(TUPTPIFC_zero, k, t_3423));
return r_3425;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_3429: ;
if (!((h!=asm_3426))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPTPIFC_aset_I(r_3425, h, TUPTPIFC_create_(TUPTPIFC_zero, k, t_3423));
r_3425->hsize = (c_INT_plus_INT_INT_chk(r_3425->hsize,1));
return r_3425;
if (!FMAPTPIFC_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,IFC}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
IFC IFC_TBL_ifc_of_T(IFC_TBL self, TP t_3431) {
IFC noname3432;
IFC r_3433;
TUPIDENTINT cq = TUPIDENTINT_zero;
IMPL im;
TUPIDENTINT local0;
IDENT local1;
if (!((!((t_3431==((TP) NULL)))))) {
fprintf(stderr,"Violation of precondition ./ifc.sa:137:9\n");
exit(16);
}
r_3433 = FMAPTPIFC_get_TP_IFC(self->tbl, t_3431);
if ((!((r_3433==((IFC) NULL))))) {
return r_3433;
}
if (t_3431==NULL) {
} else
switch (t_3431->header.tag) {
case TP_CLASS_tag:
if (TP_CLASS_is_abst(((TP_CLASS) t_3431))) {
local0 = TUPIDENTINT_zero;
local1 = ((TP_CLASS) t_3431)->name_19;
cq = TUPIDENTINT_crea(local0, local1, ARRAYTP_size_INT(((TP_CLASS) t_3431)->params));
if (FSETTUPIDENTINT__2348(self->abs_cur, cq)) {
IFC_TBL_cycle_err(self);
self->abs_cur = FSETTUPIDENTINT__2374(self->abs_cur);
}
else {
self->abs_cur = FSETTUPIDENTINT__2394(self->abs_cur, cq);
r_3433 = IFC_ABS_CREATE_i(((IFC_ABS_CREATE) NULL), ((TP_CLASS) t_3431));
self->abs_cur = FSETTUPIDENTINT__2886(self->abs_cur, cq);
}
}
else {
im = IMPL_TBL_impl_of(self->prog->impl_tbl, t_3431);
if ((im==((IMPL) NULL))) {
r_3433 = ((IFC) NULL);
}
else {
r_3433 = im->ifc;
}
} break;
case TP_ROUT_tag:
r_3433 = IFC_ifc_for_rout(((IFC) NULL), ((TP_ROUT) t_3431)); break;
case TP_ITER_tag:
r_3433 = IFC_ifc_for_iter(((IFC) NULL), ((TP_ITER) t_3431)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./ifc.sa:143:14\n");
exit(16);
}
if ((r_3433==((IFC) NULL))) {
PROG_err_STR(self->prog, ((STR) &CompilererrorIFC_3434));
}
self->tbl = FMAPTPIFC_insert_3415(self->tbl, t_3431, r_3433);
return r_3433;
}
void IFC_show(IFC self) {
SIG_TBL noname3435;
SIG s_3436;
STR noname3437;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
TP local4;
OUT local5;
OUT local6;
SIG local7;
OUT local8;
STR local9;
OUT local10;
if ((self==((IFC) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &Interfacevoid));
return;
}
if ((self->tp==((TP) NULL))) {
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &Interfacetpvoid));
return;
}
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &Interfaceof));
local4 = self->tp;
local5 = OUT_plus_STR_OUT(local3, (*TP_str_STR[local4->header.tag+TP_str_STR_offset])(local4));
OUT_plus_STR(local5, ((STR) &name_3438));
if ((self->sigs==((SIG_TBL) NULL))) {
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &void_3439));
return;
}
{
struct SIG_TBL_elt_SIG_frame_struct temp3440_0;
SIG_TBL_elt_SIG_frame
noname3441 = &temp3440_0;
struct STR_separate_STR_STR_frame_struct temp3440_1;
STR_separate_STR_STR_frame
noname3442 = &temp3440_1;
noname3441->state = 0;
noname3442->state = 0;
while (1) {
if (noname3441->state == 0) {
noname3435 = self->sigs;
noname3441->arg0 = noname3435;
}
local7 = SIG_TBL_elt_SIG(noname3441);
if (noname3441->state == -1) goto after_loop;
s_3436 = local7;
if ((!((s_3436==((SIG) NULL))))) {
local8 = OUT_create_OUT(((OUT) NULL));
if (noname3442->state == 0) {
noname3437 = ((STR) &name_3443);
noname3442->arg0 = noname3437;
}
noname3442->arg1 = SIG_str_STR(s_3436);
local9 = STR_separate_STR_STR(noname3442);
if (noname3442->state == -1) goto after_loop;
OUT_plus_STR(local8, local9);
}
}
}
after_loop: ;
local10 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local10, ((STR) &name_3444));
}
BOOL SIG_conforms_to_(SIG self, SIG s_3445) {
BOOL noname3446 = ((BOOL) 0);
ARRAYBOOL noname3447;
ARRAYBOOL noname3448;
ARRAYTP noname3449;
ARRAYTP noname3450;
BOOL local0;
BOOL local1;
BOOL local2;
BOOL local3;
INT local4;
INT local5;
BOOL local6;
BOOL local7;
BOOL local8;
BOOL local9;
TP local10;
TP local11;
TP local12;
TP local13;
BOOL local14;
TP local15;
if ((!((self==((SIG) NULL))))) {
local0 = (!((s_3445==((SIG) NULL))));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ./sig.sa:87:14\n");
exit(16);
}
if (IDENT_is_neq_IDE(self->name_19, s_3445->name_19)) {
local3 = TRUE;
} else {
local4 = ARRAYTP_size_INT(self->args_7);
local3 = (local4!=ARRAYTP_size_INT(s_3445->args_7));
}
if (local3) {
local2 = TRUE;
} else {
local5 = ARRAYBOOL_size_INT(self->hot);
local2 = (local5!=ARRAYBOOL_size_INT(s_3445->hot));
}
if (local2) {
local1 = TRUE;
} else {
local6 = SIG_has_ret_BOOL(self);
local1 = ((local6)!=(SIG_has_ret_BOOL(s_3445)));
}
if (local1) {
return FALSE;
}
{
struct ARRAYBOOL_elt_BOOL_frame_struct temp3451_0;
ARRAYBOOL_elt_BOOL_frame
noname3452 = &temp3451_0;
struct ARRAYBOOL_elt_BOOL_frame_struct temp3451_1;
ARRAYBOOL_elt_BOOL_frame
noname3453 = &temp3451_1;
noname3452->state = 0;
noname3453->state = 0;
while (1) {
if (noname3452->state == 0) {
noname3447 = self->hot;
noname3452->arg0 = noname3447;
}
local7 = ARRAYBOOL_elt_BOOL(noname3452);
if (noname3452->state == -1) goto after_loop;
local8 = local7;
if (noname3453->state == 0) {
noname3448 = s_3445->hot;
noname3453->arg0 = noname3448;
}
local9 = ARRAYBOOL_elt_BOOL(noname3453);
if (noname3453->state == -1) goto after_loop;
if (((local8)!=(local9))) {
return FALSE;
}
}
}
after_loop: ;
{
struct ARRAYTP_elt_TP_frame_struct temp3455_0;
ARRAYTP_elt_TP_frame
noname3456 = &temp3455_0;
struct ARRAYTP_elt_TP_frame_struct temp3455_1;
ARRAYTP_elt_TP_frame
noname3457 = &temp3455_1;
noname3456->state = 0;
noname3457->state = 0;
while (1) {
if (noname3456->state == 0) {
noname3449 = s_3445->args_7;
noname3456->arg0 = noname3449;
}
local10 = ARRAYTP_elt_TP(noname3456);
if (noname3456->state == -1) goto after_loop_3454;
local11 = local10;
if (noname3457->state == 0) {
noname3450 = self->args_7;
noname3457->arg0 = noname3450;
}
local12 = ARRAYTP_elt_TP(noname3457);
if (noname3457->state == -1) goto after_loop_3454;
local13 = local11;
if ((!((*TP_is_subtype_TP[local13->header.tag+TP_is_subtype_TP_offset])(local13, local12)))) {
return FALSE;
}
}
}
after_loop_3454: ;
if (SIG_has_ret_BOOL(self)) {
local15 = self->ret;
local14 = (!((*TP_is_subtype_TP[local15->header.tag+TP_is_subtype_TP_offset])(local15, s_3445->ret)));
} else {
local14 = FALSE;
}
if (local14) {
return FALSE;
}
return TRUE;
}
SIG IFC_sig_conformi(IFC self, SIG s_3458) {
SIG noname3459;
SIG_TBL noname3460;
IDENT noname3461 = IDENT_zero;
SIG ts;
BOOL local0;
SIG local1;
if ((!((self==((IFC) NULL))))) {
local0 = (!((s_3458==((SIG) NULL))));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ./ifc.sa:29:20\n");
exit(16);
}
{
struct SIG_TBL_get_quer_frame_struct temp3462_0;
SIG_TBL_get_quer_frame
noname3463 = &temp3462_0;
noname3463->state = 0;
while (1) {
if (noname3463->state == 0) {
noname3460 = self->sigs;
noname3461 = s_3458->name_19;
noname3463->arg0 = noname3460;
noname3463->arg1 = noname3461;
}
local1 = SIG_TBL_get_quer(noname3463);
if (noname3463->state == -1) goto after_loop;
ts = local1;
if (SIG_conforms_to_(ts, s_3458)) {
return ts;
}
}
}
after_loop: ;
return ((SIG) NULL);
}
SIG IFC_nonconformin(IFC self, IFC i) {
SIG noname3464;
SIG_TBL noname3465;
SIG s_3466;
BOOL local0;
SIG local1;
if ((!((self==((IFC) NULL))))) {
local0 = (!((i==((IFC) NULL))));
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ./ifc.sa:45:20\n");
exit(16);
}
{
struct SIG_TBL_elt_SIG_frame_struct temp3467_0;
SIG_TBL_elt_SIG_frame
noname3468 = &temp3467_0;
noname3468->state = 0;
while (1) {
if (noname3468->state == 0) {
noname3465 = i->sigs;
noname3468->arg0 = noname3465;
}
local1 = SIG_TBL_elt_SIG(noname3468);
if (noname3468->state == -1) goto after_loop;
s_3466 = local1;
if ((IFC_sig_conformi(self, s_3466)==((SIG) NULL))) {
return s_3466;
}
}
}
after_loop: ;
return ((SIG) NULL);
}
BOOL IFC_conforms_to_(IFC self, IFC i) {
BOOL noname3469 = ((BOOL) 0);
return (IFC_nonconformin(self, i)==((SIG) NULL));
}
void PROG_IFC_CONFORM_3470(PROG_IFC_CONFORMANCE self) {
FSETTP noname3471;
TP tp_3472;
IFC ti;
TP_CLASS par;
FSETTP_CLASS noname3473;
SIG ncs;
TP chld;
FSETTP noname3474;
TP local0;
PROG local1;
STR local2;
STR local3;
TP_CLASS local4;
PROG local5;
STR local6;
STR local7;
STR local8;
STR local9;
STR local10;
STR local11;
TP local12;
IFC local13;
PROG local14;
STR local15;
STR local16;
STR local17;
STR local18;
PROG_err_loc_PRO(self->prog, ((PROG_ERR) NULL));
{
struct FSETTP_elt_TP_frame_struct temp3475_0;
FSETTP_elt_TP_frame
noname3476 = &temp3475_0;
noname3476->state = 0;
while (1) {
if (noname3476->state == 0) {
noname3471 = self->prog->prog_find_types->tp_done;
noname3476->arg0 = noname3471;
}
local0 = FSETTP_elt_TP(noname3476);
if (noname3476->state == -1) goto after_loop;
tp_3472 = local0;
if (tp_3472==NULL) {
} else
switch (tp_3472->header.tag) {
case TP_CLASS_tag:
ti = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, tp_3472);
if ((ti==((IFC) NULL))) {
local1 = self->prog;
local2 = ((STR) &Cantcomputeinter);
local3 = STR_plus_STR_STR(local2, TP_CLASS_str_STR(((TP_CLASS) tp_3472)));
PROG_err_STR(local1, STR_plus_STR_STR(local3, ((STR) &name_3477)));
return;
}
if (self->prog->show_ifc) {
IFC_show(ti);
}
{
struct FSETTP_CLASS_elt_3006_frame_struct temp3479_0;
FSETTP_CLASS_elt_3006_frame
noname3480 = &temp3479_0;
noname3480->state = 0;
while (1) {
if (noname3480->state == 0) {
noname3473 = TP_GRAPH_ANC_get(self->prog->tp_graph->anc, ((TP_CLASS) tp_3472));
noname3480->arg0 = noname3473;
}
local4 = FSETTP_CLASS_elt_3006(noname3480);
if (noname3480->state == -1) goto after_loop_3478;
par = local4;
ncs = IFC_nonconformin(ti, IFC_TBL_ifc_of_T(self->prog->ifc_tbl, ((TP) par)));
if ((!((ncs==((SIG) NULL))))) {
local5 = self->prog;
local6 = ((STR) &Theinterfaceoftype);
local7 = STR_plus_STR_STR(local6, TP_CLASS_str_STR(((TP_CLASS) tp_3472)));
local8 = STR_plus_STR_STR(local7, ((STR) &doesnthaveasigna));
local9 = STR_plus_STR_STR(local8, SIG_str_STR(ncs));
local10 = STR_plus_STR_STR(local9, ((STR) &initsparent));
local11 = STR_plus_STR_STR(local10, TP_CLASS_str_STR(par));
PROG_err_STR(local5, STR_plus_STR_STR(local11, ((STR) &name_3481)));
}
}
}
after_loop_3478: ;
{
struct FSETTP_elt_TP_frame_struct temp3483_0;
FSETTP_elt_TP_frame
noname3484 = &temp3483_0;
noname3484->state = 0;
while (1) {
if (noname3484->state == 0) {
noname3474 = TP_GRAPH_DES_get(self->prog->tp_graph->des_15, ((TP_CLASS) tp_3472));
noname3484->arg0 = noname3474;
}
local12 = FSETTP_elt_TP(noname3484);
if (noname3484->state == -1) goto after_loop_3482;
chld = local12;
if (chld==NULL) {
goto after_loop_3482;
} else
switch (chld->header.tag) {
case TP_CLASS_tag:
local13 = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, chld);
if ((!(IFC_conforms_to_(local13, ti)))) {
local14 = self->prog;
local15 = ((STR) &Theinterfaceofty_3485);
local16 = STR_plus_STR_STR(local15, TP_CLASS_str_STR(((TP_CLASS) tp_3472)));
local17 = STR_plus_STR_STR(local16, ((STR) &isntconformedtob));
local18 = STR_plus_STR_STR(local17, TP_CLASS_str_STR(((TP_CLASS) chld)));
PROG_err_STR(local14, STR_plus_STR_STR(local18, ((STR) &name_3486)));
} break;
default: ;
goto after_loop_3482;
}
}
}
after_loop_3482: ; break;
default: ;
}
}
}
after_loop: ;
}
void PROG_do_ifc_conf(PROG self) {
PROG_IFC_CONFORM_3470(self->prog_ifc_conformance);
}
void PROG_GET_MAIN_ge(PROG_GET_MAIN self, STR nm_3487) {
TP_CLASS mt;
IMPL im = ((IMPL) NULL);
IFC ifc_3488;
SIG msig = ((SIG) NULL);
SIG omsig = ((SIG) NULL);
SIG_TBL noname3489;
IDENT noname3490 = IDENT_zero;
PROG_PARSE local0;
IDENT local1;
PROG local2;
STR local3;
TP_TBL local4;
IDENT local5;
SIG local6;
PROG local7;
STR local8;
TP local9;
STR local10;
BOOL local11;
INT local12;
TP local13;
TP local14;
PROG local15;
STR local16;
STR local17;
BOOL local18;
TP local19;
PROG local20;
STR local21;
STR local22;
OUT local23;
OUT local24;
OUT local25;
local0 = self->prog->prog_parse;
local1 = PROG_ident_for_S(self->prog, nm_3487);
if ((PROG_PARSE_tree_(local0, local1, 0)==((TR_CLASS_DEF) NULL))) {
PROG_err_loc_PRO(self->prog, ((PROG_ERR) NULL));
local2 = self->prog;
local3 = STR_plus_STR_STR(((STR) &Thereisnotype), nm_3487);
PROG_err_STR(local2, STR_plus_STR_STR(local3, ((STR) &formain)));
return;
}
local4 = self->prog->tp_tbl;
local5 = PROG_ident_for_S(self->prog, nm_3487);
mt = TP_TBL_tp_class_(local4, local5, ((ARRAYTP) NULL));
im = IMPL_TBL_impl_of(self->prog->impl_tbl, ((TP) mt));
ifc_3488 = IFC_TBL_ifc_of_T(self->prog->ifc_tbl, ((TP) mt));
if ((ifc_3488==((IFC) NULL))) {
return;
}
{
struct SIG_TBL_get_quer_frame_struct temp3491_0;
SIG_TBL_get_quer_frame
noname3492 = &temp3491_0;
noname3492->state = 0;
while (1) {
if (noname3492->state == 0) {
noname3489 = ifc_3488->sigs;
noname3490 = self->prog->ident_builtin->main_ident;
noname3492->arg0 = noname3489;
noname3492->arg1 = noname3490;
}
local6 = SIG_TBL_get_quer(noname3492);
if (noname3492->state == -1) goto after_loop;
msig = local6;
if ((!((omsig==((SIG) NULL))))) {
PROG_err_STR(self->prog, ((STR) &Theremayonlybeon));
return;
}
omsig = msig;
}
}
after_loop: ;
if ((msig==((SIG) NULL))) {
local7 = self->prog;
local8 = ((STR) &Noroutinenamedmainin);
local9 = ifc_3488->tp;
local10 = STR_plus_STR_STR(local8, (*TP_str_STR[local9->header.tag+TP_str_STR_offset])(local9));
PROG_err_STR(local7, STR_plus_STR_STR(local10, ((STR) &name_3493)));
return;
}
if ((!((msig->args_7==((ARRAYTP) NULL))))) {
local12 = ARRAYTP_size_INT(msig->args_7);
if ((local12!=1)) {
local11 = TRUE;
} else {
local13 = ARRAYTP_aget_INT_TP(msig->args_7, 0);
local14 = local13;
local11 = (*TP_is_neq_TP_BOOL[local14->header.tag+TP_is_neq_TP_BOOL_offset])(local14, ((TP) self->prog->tp_builtin->arr_of_str));
}
if (local11) {
local15 = self->prog;
local16 = ((STR) &Thesignatureofmain);
local17 = STR_plus_STR_STR(local16, SIG_str_STR(msig));
PROG_err_STR(local15, STR_plus_STR_STR(local17, ((STR) &doesnthavelegala)));
return;
}
}
else {
if ((!((msig->ret==((TP) NULL))))) {
local19 = msig->ret;
local18 = (*TP_is_neq_TP_BOOL[local19->header.tag+TP_is_neq_TP_BOOL_offset])(local19, ((TP) self->prog->tp_builtin->int_1));
} else {
local18 = FALSE;
}
if (local18) {
local20 = self->prog;
local21 = ((STR) &Thesignatureofma_3494);
local22 = STR_plus_STR_STR(local21, SIG_str_STR(msig));
PROG_err_STR(local20, STR_plus_STR_STR(local22, ((STR) &doesnthavealegal)));
return;
}
}
if (self->prog->show_main) {
local23 = OUT_create_OUT(((OUT) NULL));
local24 = OUT_plus_STR_OUT(local23, ((STR) &Mainsig));
local25 = OUT_plus_STR_OUT(local24, SIG_str_STR(msig));
OUT_plus_STR(local25, ((STR) &name_3495));
}
self->main_sig = msig;
}
void PROG_do_get_main(PROG self, STR nm_3496) {
PROG_GET_MAIN_ge(self->prog_get_main, nm_3496);
}
void FILE_create_dire(FILE_20 self, STR nm_3497) {
mkdirxx(((nm_3497==NULL)?NULL:nm_3497->arr_part));
}
void FILE_plus_CHAR(FILE_20 self, CHAR c_3498) {
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:171:7\n");
exit(16);
}
fputc(c_3498, self->fp);
}
FILE_20 FILE_open_for_wr(FILE_20 self, STR nm_3499) {
FILE_20 noname3500;
FILE_20 r_3501;
FILE_20 local0;
local0 = ((FILE_20) sbi_alloc(sizeof(struct FILE_20_struct), FILE_20_tag));
r_3501 = local0;
r_3501->fp = fopen(((nm_3499==NULL)?NULL:nm_3499->arr_part), ((((STR) &w)==NULL)?NULL:((STR) &w)->arr_part));
return r_3501;
}
void BE_new_c_file(BE self) {
STR fn;
STR local0;
STR local1;
STR local2;
if ((!((self->code_c==((FILE_20) NULL))))) {
if (FILE_error_BOOL(self->code_c)) {
BE_barf_STR(self, ((STR) &Someproblemwriti));
}
else {
FILE_plus_CHAR(self->code_c, '\n');
FILE_close(self->code_c);
}
}
local0 = STR_plus_CHAR_STR(self->code_dir, '/');
local1 = STR_plus_STR_STR(local0, ((STR) &code_3502));
local2 = STR_plus_INT_STR(local1, self->code_c_count);
fn = STR_plus_STR_STR(local2, ((STR) &c_3503));
self->code_c = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->code_c)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopenfile_3504), fn));
}
self->code_c_count = (c_INT_plus_INT_INT_chk(self->code_c_count,1));
(fwrite(((STR) &Ccodegeneratedby)->arr_part,((STR) &Ccodegeneratedby)->asize,1,self->code_c->fp));
(fwrite(((STR) &includesatherh)->arr_part,((STR) &includesatherh)->asize,1,self->code_c->fp));
(fwrite(((STR) &includestringsh)->arr_part,((STR) &includestringsh)->asize,1,self->code_c->fp));
}
FILE_20 FILE_plus_STR_FILE(FILE_20 self, STR s_3505) {
FILE_20 noname3506;
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:163:7\n");
exit(16);
}
(fwrite(s_3505->arr_part,s_3505->asize,1,self->fp));
return self;
}
FMAPTPINT FMAPTPINT_create(FMAPTPINT self) {
FMAPTPINT noname3507;
return ((FMAPTPINT) NULL);
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:79:9\n");
exit(16);
}
}
FLISTTP_CLASS FLISTTP_CLASS_cr(FLISTTP_CLASS self) {
FLISTTP_CLASS noname3508;
return ((FLISTTP_CLASS) NULL);
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:55:9\n");
exit(16);
}
}
INT FLISTTP_CLASS_as(FLISTTP_CLASS self) {
INT noname3509 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT FLISTTP_CLASS_si(FLISTTP_CLASS self) {
INT noname3510 = ((INT) 0);
if ((self==((FLISTTP_CLASS) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTTP_CLASS_is(FLISTTP_CLASS self) {
BOOL noname3511 = ((BOOL) 0);
INT local0;
local0 = FLISTTP_CLASS_si(self);
return (local0==0);
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTTP_CLASS_aclear(FLISTTP_CLASS self) {
TP_CLASS nil = ((TP_CLASS) NULL);
FLISTTP_CLASS noname3512;
if (!((!((self==((FLISTTP_CLASS) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTTP_CLASS_as_3514_frame_struct temp3513_0;
FLISTTP_CLASS_as_3514_frame
noname3515 = &temp3513_0;
noname3515->state = 0;
while (1) {
if (noname3515->state == 0) {
noname3512 = self;
noname3515->arg0 = noname3512;
}
noname3515->arg1 = nil;
FLISTTP_CLASS_as_3514(noname3515);
if (noname3515->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTTP_CLASS_clear(FLISTTP_CLASS self) {
if (FLISTTP_CLASS_is(self)) {
return;
}
else {
FLISTTP_CLASS_aclear(self);
self->loc_17 = 0;
}
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTTP_CLASS_ar(FLISTTP_CLASS self, INT ind_3516, TP_CLASS val_3517) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTTP_CLASS) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3516, 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_3516<0||ind_3516>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_3516] = val_3517;
}
void FLISTTP_CLASS_as_3518(FLISTTP_CLASS self, INT ind_3519, TP_CLASS val_3520) {
BOOL local0;
INT local1;
if ((!((self==((FLISTTP_CLASS) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_3519, 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_CLASS_ar(self, ind_3519, val_3520);
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTTP_CLASS FLISTTP_CLASS_pu(FLISTTP_CLASS self, TP_CLASS e_3521) {
FLISTTP_CLASS noname3522;
FLISTTP_CLASS r_3523 = ((FLISTTP_CLASS) NULL);
FLISTTP_CLASS noname3524;
FLISTTP_CLASS noname3525;
FLISTTP_CLASS local0;
INT local1;
FLISTTP_CLASS local2;
INT local3;
TP_CLASS local4;
INT local5;
if ((self==((FLISTTP_CLASS) NULL))) {
local0 = ((FLISTTP_CLASS) sbi_arr_alloc(sizeof(struct FLISTTP_CLASS_struct), FLISTTP_CLASS_tag, sizeof(TP_CLASS) , 5));
local0->asize = 5;
r_3523 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_3523 = self;
}
else {
local3 = 2;
local2 = ((FLISTTP_CLASS) sbi_arr_alloc(sizeof(struct FLISTTP_CLASS_struct), FLISTTP_CLASS_tag, sizeof(TP_CLASS) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_3523 = local2;
r_3523->loc_17 = self->loc_17;
{
struct FLISTTP_CLASS_el_frame_struct temp3526_0;
FLISTTP_CLASS_el_frame
noname3527 = &temp3526_0;
struct FLISTTP_CLASS_as_3514_frame_struct temp3526_1;
FLISTTP_CLASS_as_3514_frame
noname3528 = &temp3526_1;
noname3527->state = 0;
noname3528->state = 0;
while (1) {
if (noname3528->state == 0) {
noname3525 = r_3523;
noname3528->arg0 = noname3525;
}
if (noname3527->state == 0) {
noname3524 = self;
noname3527->arg0 = noname3524;
}
local4 = FLISTTP_CLASS_el(noname3527);
if (noname3527->state == -1) goto after_loop;
noname3528->arg1 = local4;
FLISTTP_CLASS_as_3514(noname3528);
if (noname3528->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTTP_CLASS_clear(self);
}
}
r_3523->loc_17 = (c_INT_plus_INT_INT_chk(r_3523->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_3523->loc_17,1));
FLISTTP_CLASS_as_3518(r_3523, local5, e_3521);
return r_3523;
if (!FLISTTP_CLASS_in(self)) {
fprintf(stderr,"Failed invariant FLIST{TP_CLASS}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
INT TP_CLASS_kind_INT(TP_CLASS self) {
INT noname3529 = ((INT) 0);
if ((self->kind_cache==shared_TP_KIND_m)) {
self->kind_cache = PROG_tp_kind_TP_INT(self->prog, ((TP) self));
}
return self->kind_cache;
}
BOOL BE_is_built_in_t(BE self, TP t_3530) {
BOOL noname3531 = ((BOOL) 0);
return FSETTP_test_TP_BOOL(self->built_in_classes, t_3530);
}
OB FSETOB_elt_nil_OB(FSETOB self) {
OB noname3532;
OB t_3533 = ((OB) NULL);
if (t_3533==NULL) {
} else
switch (t_3533->header.tag) {
default: ;
}
return ((OB) NULL);
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/fset.sa:53:10\n");
exit(16);
}
}
FSETOB FSETOB_allocate_(FSETOB self, INT n_3534) {
FSETOB noname3535;
FSETOB r_3536;
FSETOB noname3537;
FSETOB local0;
local0 = ((FSETOB) sbi_arr_alloc(sizeof(struct FSETOB_struct), FSETOB_tag, sizeof(OB) , n_3534));
local0->asize = n_3534;
r_3536 = local0;
if ((!((FSETOB_elt_nil_OB(self)==((OB) NULL))))) {
{
struct FSETOB_aset_OB_frame_struct temp3538_0;
FSETOB_aset_OB_frame
noname3539 = &temp3538_0;
noname3539->state = 0;
while (1) {
if (noname3539->state == 0) {
noname3537 = r_3536;
noname3539->arg0 = noname3537;
}
noname3539->arg1 = FSETOB_elt_nil_OB(self);
FSETOB_aset_OB(noname3539);
if (noname3539->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_3536;
}
INT FSETOB_asize_INT(FSETOB self) {
INT noname3540 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FSETOB FSETOB_double_si(FSETOB self) {
FSETOB noname3541;
FSETOB r_3542;
FSETOB noname3543;
INT local0;
INT local1;
INT local2;
OB local3;
if (!((!((self==((FSETOB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fset.sa:150:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
r_3542 = FSETOB_allocate_(self, (c_INT_plus_INT_INT_chk(local2,1)));
{
struct FSETOB_elt_OB_frame_struct temp3544_0;
FSETOB_elt_OB_frame
noname3545 = &temp3544_0;
noname3545->state = 0;
while (1) {
if (noname3545->state == 0) {
noname3543 = self;
noname3545->arg0 = noname3543;
}
local3 = FSETOB_elt_OB(noname3545);
if (noname3545->state == -1) goto after_loop;
r_3542 = FSETOB_insert_OB(r_3542, local3);
}
}
after_loop: ;
return r_3542;
}
INT FSETOB_elt_hash_(FSETOB self, OB e_3546) {
INT noname3547 = ((INT) 0);
HASH local0;
if (e_3546==NULL) {
} else
switch (e_3546->header.tag) {
case TUPIMPL_INCLUDEI_tag:
case TUPAM_BND_CREATE_tag:
case TUPIFCIFC_tag:
case TUPSTRITER_INLINE_tag:
case TUPAM_GLOBAL_EXP_tag:
case FSTR_tag:
case TUPSIGSIG_tag:
case CHAR_tag:
case INT_tag:
case TUPTP_CLASSFSETTP_tag:
case TUPSTRSTR_tag:
case TUPINTINTINT_tag:
case STR_tag:
case TUPSFILE_IDSFILE_ID_tag:
case TUPAM_ITER_CALL__tag:
case TUPTR_EXPRTR_EXPR_tag:
case TUPTPFMAPIDENTAM_tag:
case TUPARRAYTPTP_tag:
case TUPAM_CONSTAM_CONST_tag:
case TUPSTRTUPSTRSTR_tag:
case TUPTPIMPL_tag:
case TUPSIGAM_ROUT_DEF_tag:
case TUPARRAYTPARRAYB_tag:
case TUPIDENTAM_GLOBA_tag:
case TUPAM_BND_ITER_C_tag:
case TUPAM_LOCAL_EXPR_tag:
case TUPSTRFSETSTR_tag:
case TUPAM_ROUT_DEFAM_tag:
case TUPTPTP_tag:
case IDENT_tag:
case TUPTPINT_tag:
case TUPIDENTINT_tag:
case TUPIDENTIDENT_tag:
case TUPTP_CLASSFSETT_tag:
case TUPCHARCHAR_tag:
case TUPIDENTTP_tag:
case TUPIDENTARRAYTP_tag:
case TUPAM_EXPRAM_EXPR_tag:
case TUPTPIFC_tag:
case TUPTP_CLASSTP_CLASS_tag:
case TUPAM_STMTAM_STMT_tag:
case TUPINTINT_tag:
case TUPOBSTR_tag:
case TUPFLISTAM_CONST_tag:
case TUPAM_EXPRTP_tag:
case TUPBOOLINTIINTBOOL_tag:
local0 = ((HASH) e_3546);
return (*HASH_hash_INT[local0->header.tag+HASH_hash_INT_offset])(local0); break;
default: ;
}
return (c_SYS_id_OB_INT(((SYS) NULL),e_3546));
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/fset.sa:63:11\n");
exit(16);
}
}
OB FSETOB_aget_INT_OB(FSETOB self, INT ind_3548) {
OB noname3549;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FSETOB) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3548, 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_3548<0||ind_3548>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3548];
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/aref.sa:33:7\n");
exit(16);
}
}
BOOL FSETOB_elt_eq_OB(FSETOB self, OB e1_3550, OB e2_3551) {
BOOL noname3552 = ((BOOL) 0);
if (e1_3550==NULL) {
} else
switch (e1_3550->header.tag) {
default: ;
}
return c_SYS_ob_eq_OB_OB_BOOL(e1_3550,e2_3551);
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/fset.sa:44:9\n");
exit(16);
}
}
void FSETOB_aset_INT_OB(FSETOB self, INT ind_3553, OB val_3554) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FSETOB) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3553, 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_3553<0||ind_3553>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_3553] = val_3554;
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/aref.sa:38:7\n");
exit(16);
}
}
FSETOB FSETOB_insert_OB(FSETOB self, OB e_3555) {
FSETOB noname3556;
FSETOB r_3557;
INT asz_3558 = ((INT) 0);
INT h = ((INT) 0);
OB te;
OB te_3559;
INT local0;
INT local1;
INT local2;
r_3557 = self;
if ((r_3557==((FSETOB) NULL))) {
r_3557 = FSETOB_allocate_(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_3557 = FSETOB_double_si(self);
}
}
asz_3558 = (r_3557->asize);
local2 = FSETOB_elt_hash_(r_3557, e_3555);
h = (local2&(c_INT_minus_INT_INT_chk(asz_3558,2)));
while (1) {
te = FSETOB_aget_INT_OB(r_3557, h);
if (FSETOB_elt_eq_OB(self, te, FSETOB_elt_nil_OB(self))) {
goto after_loop;
}
else {
if (FSETOB_elt_eq_OB(self, te, e_3555)) {
FSETOB_aset_INT_OB(r_3557, h, e_3555);
return r_3557;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==(c_INT_minus_INT_INT_chk(asz_3558,1)))) {
h = 0;
while (1) {
te_3559 = FSETOB_aget_INT_OB(r_3557, h);
if (FSETOB_elt_eq_OB(self, te_3559, FSETOB_elt_nil_OB(self))) {
goto after_loop_3561;
}
else {
if (FSETOB_elt_eq_OB(self, te_3559, e_3555)) {
FSETOB_aset_INT_OB(r_3557, h, e_3555);
return r_3557;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_3561: ;
if (!((h!=(c_INT_minus_INT_INT_chk(asz_3558,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fset.sa:177:15\n");
exit(16);
}
}
FSETOB_aset_INT_OB(r_3557, h, e_3555);
r_3557->hsize = (c_INT_plus_INT_INT_chk(r_3557->hsize,1));
return r_3557;
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/fset.sa:158:9\n");
exit(16);
}
}
FSTR FSTR_plus_FSTR_FSTR(FSTR self, FSTR s_3563) {
FSTR noname3564;
FSTR noname3565;
FSTR r_3566;
FSTR noname3567;
CHAR local0;
STR local1;
STR local2;
noname3565 = self;
r_3566 = self;
{
struct FSTR_elt_CHAR_frame_struct temp3568_0;
FSTR_elt_CHAR_frame
noname3569 = &temp3568_0;
noname3569->state = 0;
while (1) {
if (noname3569->state == 0) {
noname3567 = s_3563;
noname3569->arg0 = noname3567;
}
local0 = FSTR_elt_CHAR(noname3569);
if (noname3569->state == -1) goto after_loop;
r_3566 = FSTR_push_CHAR_FSTR(r_3566, local0);
}
}
after_loop: ;
return r_3566;
local1 = FSTR_str_STR(noname3564);
local2 = FSTR_str_STR(noname3565);
if (!(STR_is_eq_STR_BOOL(local1, STR_plus_STR_STR(local2, FSTR_str_STR(s_3563))))) {
fprintf(stderr,"Violation of postcondition ../Library/fstr.sa:125:7\n");
exit(16);
}
if (!FSTR_invariant_BOOL(self)) {
fprintf(stderr,"Failed invariant FSTR::invariant:BOOL ../Library/fstr.sa:125:7\n");
exit(16);
}
}
BOOL FMAPOBSTR_test_O(FMAPOBSTR self, OB k) {
BOOL noname3570 = ((BOOL) 0);
INT h = ((INT) 0);
OB tk;
OB tk_3571;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPOBSTR) NULL))) {
return FALSE;
}
local0 = FMAPOBSTR_key_ha(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t1;
if (FMAPOBSTR_key_eq(self, tk, k)) {
return TRUE;
}
else {
if (FMAPOBSTR_key_eq(self, tk, FMAPOBSTR_key_nil_OB(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_3571 = (TUPOBSTR_blob=FMAPOBSTR_aget_I(self, h)).t1;
if (FMAPOBSTR_key_eq(self, tk_3571, k)) {
return TRUE;
}
else {
if (FMAPOBSTR_key_eq(self, tk_3571, FMAPOBSTR_key_nil_OB(self))) {
goto after_loop_3573;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_3573: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:133:15\n");
exit(16);
}
}
return FALSE;
if (!FMAPOBSTR_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$OB,STR}::invariant:BOOL ../Library/fmap.sa:119:7\n");
exit(16);
}
}
STR BE_mangle_OB_STR(BE self, OB ob_3575) {
STR noname3576;
STR res;
STR s_3577 = ((STR) NULL);
ARRAYTP noname3578;
FSTR tmp_3579;
STR noname3580;
CHAR c_3581 = ((CHAR) 0);
CHAR noname3582 = ((CHAR) 0);
CHAR noname3583 = ((CHAR) 0);
TP local0;
STR local1;
STR local2;
STR local3;
TP local4;
TP local5;
STR local6;
TP local7;
IDENT local8;
STR local9;
TP local10;
STR local11;
STR local12;
CHAR local13;
STR local14;
CHAR *local13p; INT local13n;
INT local15;
FSTR local16;
FSTR local17;
INT local18;
BOOL local19;
INT local20;
STR local21;
STR local22;
if (!((!((ob_3575==((OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ./be.sa:2538:10\n");
exit(16);
}
res = FMAPOBSTR_get_OB_STR(self->manglemap, ob_3575);
if ((res==((STR) NULL))) {
if (ob_3575==NULL) {
self->thisrout = FSETOB_insert_OB(self->thisrout, ob_3575);
} else
switch (ob_3575->header.tag) {
case SIG_tag:
local0 = ((SIG) ob_3575)->tp;
local1 = (*TP_str_STR[local0->header.tag+TP_str_STR_offset])(local0);
local2 = STR_plus_CHAR_STR(local1, '_');
s_3577 = STR_plus_STR_STR(local2, ((SIG) ob_3575)->name_19.str_4);
if ((!((((SIG) ob_3575)->args_7==((ARRAYTP) NULL))))) {
{
struct ARRAYTP_elt_TP_frame_struct temp3584_0;
ARRAYTP_elt_TP_frame
noname3585 = &temp3584_0;
noname3585->state = 0;
while (1) {
local3 = STR_plus_CHAR_STR(s_3577, '_');
if (noname3585->state == 0) {
noname3578 = ((SIG) ob_3575)->args_7;
noname3585->arg0 = noname3578;
}
local4 = ARRAYTP_elt_TP(noname3585);
if (noname3585->state == -1) goto after_loop;
local5 = local4;
s_3577 = STR_plus_STR_STR(local3, (*TP_str_STR[local5->header.tag+TP_str_STR_offset])(local5));
}
}
after_loop: ;
}
if ((!((((SIG) ob_3575)->ret==((TP) NULL))))) {
local6 = STR_plus_CHAR_STR(s_3577, '_');
local7 = ((SIG) ob_3575)->ret;
s_3577 = STR_plus_STR_STR(local6, (*TP_str_STR[local7->header.tag+TP_str_STR_offset])(local7));
} break;
case AM_LOCAL_EXPR_tag:
if ((!((((AM_LOCAL_EXPR) ob_3575)->name_19.str_4==(STR)0)))) {
s_3577 = ((AM_LOCAL_EXPR) ob_3575)->name_19.str_4;
}
self->thisrout = FSETOB_insert_OB(self->thisrout, ob_3575); break;
case TP_CLASS_tag:
s_3577 = TP_CLASS_str_STR(((TP_CLASS) ob_3575)); break;
case TP_ROUT_tag:
s_3577 = TP_ROUT_str_STR(((TP_ROUT) ob_3575)); break;
case AM_BND_CREATE_EXPR_tag:
s_3577 = ((STR) &bound); break;
case STR_tag:
s_3577 = ((STR) ob_3575); break;
case IDENT_tag:
local8 = ((IDENT_boxed) ob_3575)->value_part;
s_3577 = local8.str_4; break;
case AM_GLOBAL_EXPR_tag:
local9 = ((STR) &shared_);
local10 = ((AM_GLOBAL_EXPR) ob_3575)->class_tp;
local11 = STR_plus_STR_STR(local9, (*TP_str_STR[local10->header.tag+TP_str_STR_offset])(local10));
local12 = STR_plus_CHAR_STR(local11, '_');
s_3577 = STR_plus_STR_STR(local12, ((AM_GLOBAL_EXPR) ob_3575)->name_19.str_4); break;
case AM_LOOP_STMT_tag:
s_3577 = ((STR) &after_loop_3586);
self->thisrout = FSETOB_insert_OB(self->thisrout, ob_3575); break;
case AM_STR_CONST_tag:
s_3577 = ((AM_STR_CONST) ob_3575)->bval; break;
default: ;
self->thisrout = FSETOB_insert_OB(self->thisrout, ob_3575);
}
if ((s_3577==((STR) NULL))) {
res = STR_plus_INT_STR(((STR) &noname), self->counter_21);
self->counter_21 = (c_INT_plus_INT_INT_chk(self->counter_21,1));
}
else {
tmp_3579 = FSTR_create_FSTR(((FSTR) NULL));
{
BOOL noname3589 = TRUE;
while (1) {
if (noname3589) {
noname3589 = FALSE;
noname3580 = s_3577;
local14 = noname3580;
local13p = local14->arr_part; local13n = local14->asize;
} else {
local13p++; local13n--;
}
if (local13n<=0) goto after_loop_3587; local13 = *local13p;
c_3581 = local13;
noname3582 = c_3581;
switch (noname3582) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '_':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
tmp_3579 = FSTR_plus_CHAR_FSTR(tmp_3579, c_3581);
break;
default: ;
}
}
}
after_loop_3587: ;
local15 = FSTR_length_INT(tmp_3579);
if ((local15==0)) {
tmp_3579 = FSTR_plus_STR_FSTR(tmp_3579, ((STR) &name_3590));
}
noname3583 = FSTR_aget_INT_CHAR(tmp_3579, 0);
switch (noname3583) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '_':
local16 = FSTR_create_FSTR(((FSTR) NULL));
local17 = FSTR_plus_STR_FSTR(local16, ((STR) &S));
tmp_3579 = FSTR_plus_FSTR_FSTR(local17, tmp_3579);
break;
default: ;
}
res = FSTR_str_STR(tmp_3579);
local18 = STR_length_INT(res);
if ((local18>20)) {
res = STR_head_INT_STR(res, 16);
}
while (1) {
if (FSETSTR_test_STR(self->mangleset, res)) {
local19 = TRUE;
} else {
local19 = FSETSTR_test_STR(self->forbidden, res);
}
if (local19) {
}
else {
goto after_loop_3591;
}
local20 = 16;
local21 = STR_head_INT_STR(res, INT_min_INT_INT(local20, STR_length_INT(res)));
local22 = STR_plus_CHAR_STR(local21, '_');
res = STR_plus_INT_STR(local22, self->counter_21);
self->counter_21 = (c_INT_plus_INT_INT_chk(self->counter_21,1));
}
after_loop_3591: ;
}
self->mangleset = FSETSTR_insert_S(self->mangleset, res);
if (!(FSETSTR_test_STR(self->mangleset, res))) {
fprintf(stderr,"Violation of assertion ./be.sa:2611:18\n");
exit(16);
}
self->manglemap = FMAPOBSTR_insert_1222(self->manglemap, ob_3575, res);
}
if (!(FMAPOBSTR_test_O(self->manglemap, ob_3575))) {
fprintf(stderr,"Violation of assertion ./be.sa:2614:14\n");
exit(16);
}
if (!(FSETSTR_test_STR(self->mangleset, res))) {
fprintf(stderr,"Violation of assertion ./be.sa:2615:14\n");
exit(16);
}
return res;
}
BOOL TP_CLASS_is_boun(TP_CLASS self) {
BOOL noname3593 = ((BOOL) 0);
return FALSE;
}
AM_OB_DEF AM_OB_DEF_create(AM_OB_DEF self, SFILE_ID source_3594) {
AM_OB_DEF noname3595;
AM_OB_DEF r_3596;
AM_OB_DEF local0;
local0 = ((AM_OB_DEF) sbi_alloc(sizeof(struct AM_OB_DEF_struct), AM_OB_DEF_tag));
r_3596 = local0;
r_3596->source_38 = source_3594;
return r_3596;
}
BOOL SIG_is_reader_si(SIG self) {
BOOL noname3597 = ((BOOL) 0);
BOOL local0;
if ((self->args_7==((ARRAYTP) NULL))) {
local0 = (!((self->ret==((TP) NULL))));
} else {
local0 = FALSE;
}
return local0;
}
BOOL ELT_is_const_rea(ELT self) {
BOOL noname3598 = ((BOOL) 0);
TR_CLASS_ELT ltr;
if ((!(SIG_is_reader_si(self->sig_6)))) {
return FALSE;
}
ltr = self->tr;
if (ltr==NULL) {
} else
switch (ltr->header.tag) {
case TR_CONST_DEF_tag:
return TRUE; break;
default: ;
}
return FALSE;
}
INT IMPL_asize_val_INT(IMPL self) {
INT noname3599 = ((INT) 0);
ELT_TBL noname3600;
IDENT noname3601 = IDENT_zero;
ELT asze;
ELT local0;
BOOL local1;
{
struct ELT_TBL_get_quer_frame_struct temp3602_0;
ELT_TBL_get_quer_frame
noname3603 = &temp3602_0;
noname3603->state = 0;
while (1) {
if (noname3603->state == 0) {
noname3600 = self->elts;
noname3601 = IMPL_prog_PROG(self)->ident_builtin->asize_ident;
noname3603->arg0 = noname3600;
noname3603->arg1 = noname3601;
}
local0 = ELT_TBL_get_quer(noname3603);
if (noname3603->state == -1) goto after_loop;
asze = local0;
if (ELT_is_const_rea(asze)) {
local1 = TP_CLASS_is_eq_T(IMPL_prog_PROG(self)->tp_builtin->int_1, asze->sig_6->ret);
} else {
local1 = FALSE;
}
if (local1) {
return 32;
}
else {
return -1;
}
}
}
after_loop: ;
return -1;
}
BOOL ELT_is_attr_read(ELT self) {
BOOL noname3604 = ((BOOL) 0);
TR_CLASS_ELT ltr;
if ((!(SIG_is_reader_si(self->sig_6)))) {
return FALSE;
}
ltr = self->tr;
if (ltr==NULL) {
} else
switch (ltr->header.tag) {
case TR_ATTR_DEF_tag:
return TRUE; break;
default: ;
}
return FALSE;
}
IDENT FMAPIDENTTP_key_(FMAPIDENTTP self) {
IDENT noname3605 = IDENT_zero;
IDENT k = IDENT_zero;
return IDENT_zero;
if (!FMAPIDENTTP_inva(self)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:54:10\n");
exit(16);
}
}
TUPIDENTTP TUPIDENTTP_t1_ID(TUPIDENTTP self, IDENT t1_3606) {
TUPIDENTTP local0;
local0 = self;
local0.t1 = t1_3606;
return local0;
}
TUPIDENTTP TUPIDENTTP_t2_TP(TUPIDENTTP self, TP t2_3607) {
TUPIDENTTP local0;
local0 = self;
local0.t2 = t2_3607;
return local0;
}
TUPIDENTTP TUPIDENTTP_creat(TUPIDENTTP self, IDENT at1, TP at2) {
TUPIDENTTP noname3608 = TUPIDENTTP_zero;
TUPIDENTTP local0;
local0 = TUPIDENTTP_t1_ID(self, at1);
return TUPIDENTTP_t2_TP(local0, at2);
}
FMAPIDENTTP FMAPIDENTTP_allo(FMAPIDENTTP self, INT n_3609) {
FMAPIDENTTP noname3610;
FMAPIDENTTP r_3611;
FMAPIDENTTP noname3612;
FMAPIDENTTP local0;
TUPIDENTTP local1;
IDENT local2;
local0 = ((FMAPIDENTTP) sbi_arr_alloc(sizeof(struct FMAPIDENTTP_struct), FMAPIDENTTP_tag, sizeof(TUPIDENTTP) , n_3609));
local0->asize = n_3609;
r_3611 = local0;
if ((!(((IDENT_blob=FMAPIDENTTP_key_(self)).str_4==(STR)0)))) {
{
struct FMAPIDENTTP_aset_frame_struct temp3613_0;
FMAPIDENTTP_aset_frame
noname3614 = &temp3613_0;
noname3614->state = 0;
while (1) {
if (noname3614->state == 0) {
noname3612 = r_3611;
noname3614->arg0 = noname3612;
}
local1 = TUPIDENTTP_zero;
local2 = FMAPIDENTTP_key_(self);
noname3614->arg1 = TUPIDENTTP_creat(local1, local2, ((TP) NULL));
FMAPIDENTTP_aset(noname3614);
if (noname3614->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_3611;
}
INT FMAPIDENTTP_asiz(FMAPIDENTTP self) {
INT noname3615 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FMAPIDENTTP FMAPIDENTTP_inse(FMAPIDENTTP self, TUPIDENTTP p) {
FMAPIDENTTP noname3616;
return FMAPIDENTTP_inse_3617(self, p.t1, p.t2);
if (!FMAPIDENTTP_inva(self)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPIDENTTP FMAPIDENTTP_doub(FMAPIDENTTP self) {
FMAPIDENTTP noname3618;
INT ns = ((INT) 0);
FMAPIDENTTP r_3619;
FMAPIDENTTP noname3620;
INT local0;
INT local1;
INT local2;
TUPIDENTTP local3;
if (!((!((self==((FMAPIDENTTP) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_3619 = FMAPIDENTTP_allo(self, ns);
{
struct FMAPIDENTTP_pair_frame_struct temp3621_0;
FMAPIDENTTP_pair_frame
noname3622 = &temp3621_0;
noname3622->state = 0;
while (1) {
if (noname3622->state == 0) {
noname3620 = self;
noname3622->arg0 = noname3620;
}
local3 = FMAPIDENTTP_pair(noname3622);
if (noname3622->state == -1) goto after_loop;
r_3619 = FMAPIDENTTP_inse(r_3619, local3);
}
}
after_loop: ;
return r_3619;
}
INT FMAPIDENTTP_key__3623(FMAPIDENTTP self, IDENT k) {
INT noname3624 = ((INT) 0);
OB local0;
return IDENT_hash_INT(k);
local0 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local0)->value_part = k;
return (c_SYS_id_OB_INT(((SYS) NULL),local0));
if (!FMAPIDENTTP_inva(self)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
TUPIDENTTP FMAPIDENTTP_aget(FMAPIDENTTP self, INT ind_3625) {
TUPIDENTTP noname3626 = TUPIDENTTP_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPIDENTTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3625, 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_3625<0||ind_3625>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3625];
}
BOOL FMAPIDENTTP_key__3627(FMAPIDENTTP self, IDENT k1, IDENT k2) {
BOOL noname3628 = ((BOOL) 0);
OB local0;
OB local1;
return IDENT_is_eq_IDEN(k1, k2);
local0 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local0)->value_part = k1;
local1 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local1)->value_part = k2;
return c_SYS_ob_eq_OB_OB_BOOL(local0,local1);
if (!FMAPIDENTTP_inva(self)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
void FMAPIDENTTP_aset_3629(FMAPIDENTTP self, INT ind_3630, TUPIDENTTP val_3631) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPIDENTTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3630, 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_3630<0||ind_3630>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_3630] = val_3631;
}
FMAPIDENTTP FMAPIDENTTP_inse_3617(FMAPIDENTTP self, IDENT k, TP t_3632) {
FMAPIDENTTP noname3633;
FMAPIDENTTP r_3634;
INT h = ((INT) 0);
INT asm_3635 = ((INT) 0);
IDENT tk = IDENT_zero;
IDENT tk_3636 = IDENT_zero;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_3634 = self;
if ((r_3634==((FMAPIDENTTP) NULL))) {
r_3634 = FMAPIDENTTP_allo(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_3634 = FMAPIDENTTP_doub(self);
}
}
local2 = FMAPIDENTTP_key__3623(r_3634, k);
local3 = (r_3634->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_3634->asize);
asm_3635 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPIDENTTP_blob=FMAPIDENTTP_aget(r_3634, h)).t1;
if (FMAPIDENTTP_key__3627(self, tk, FMAPIDENTTP_key_(self))) {
goto after_loop;
}
if (FMAPIDENTTP_key__3627(self, tk, k)) {
FMAPIDENTTP_aset_3629(r_3634, h, TUPIDENTTP_creat(TUPIDENTTP_zero, k, t_3632));
return r_3634;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_3635)) {
h = 0;
while (1) {
tk_3636 = (TUPIDENTTP_blob=FMAPIDENTTP_aget(r_3634, h)).t1;
if (FMAPIDENTTP_key__3627(self, tk_3636, FMAPIDENTTP_key_(self))) {
goto after_loop_3638;
}
if (FMAPIDENTTP_key__3627(self, tk_3636, k)) {
FMAPIDENTTP_aset_3629(r_3634, h, TUPIDENTTP_creat(TUPIDENTTP_zero, k, t_3632));
return r_3634;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_3638: ;
if (!((h!=asm_3635))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPIDENTTP_aset_3629(r_3634, h, TUPIDENTTP_creat(TUPIDENTTP_zero, k, t_3632));
r_3634->hsize = (c_INT_plus_INT_INT_chk(r_3634->hsize,1));
return r_3634;
if (!FMAPIDENTTP_inva(self)) {
fprintf(stderr,"Failed invariant FMAP{IDENT,$TP}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
AM_OB_DEF IMPL_am_ob_def_A(IMPL self) {
AM_OB_DEF noname3640;
AM_OB_DEF r_3641;
TP_CLASS a_3642;
ELT_TBL noname3643;
ELT e_3644;
ELT local0;
if (!((!((self==((IMPL) NULL)))))) {
fprintf(stderr,"Violation of precondition ./impl.sa:102:12\n");
exit(16);
}
r_3641 = AM_OB_DEF_create(((AM_OB_DEF) NULL), SFILE_ID_zero);
r_3641->tp = self->tp;
if ((!((self->arr==((TP_CLASS) NULL))))) {
a_3642 = self->arr;
r_3641->arr = ARRAYTP_aget_INT_TP(a_3642->params, 0);
}
r_3641->asize = IMPL_asize_val_INT(self);
{
struct ELT_TBL_elt_ELT_frame_struct temp3645_0;
ELT_TBL_elt_ELT_frame
noname3646 = &temp3645_0;
noname3646->state = 0;
while (1) {
if (noname3646->state == 0) {
noname3643 = self->elts;
noname3646->arg0 = noname3643;
}
local0 = ELT_TBL_elt_ELT(noname3646);
if (noname3646->state == -1) goto after_loop;
e_3644 = local0;
if (ELT_is_attr_read(e_3644)) {
r_3641->at = FMAPIDENTTP_inse_3617(r_3641->at, e_3644->sig_6->name_19, e_3644->sig_6->ret);
}
}
}
after_loop: ;
return r_3641;
}
AM_OB_DEF PROG_am_ob_def_f(PROG self, TP tp_3647) {
AM_OB_DEF noname3648;
IMPL impl_3649;
impl_3649 = IMPL_TBL_impl_of(self->impl_tbl, tp_3647);
if ((impl_3649==((IMPL) NULL))) {
return ((AM_OB_DEF) NULL);
}
return IMPL_am_ob_def_A(impl_3649);
}
void BE_comment_FILE_STR(BE self, FILE_20 f_3650, STR com_3651) {
FILE_20 local0;
FILE_20 local1;
if (self->prog->options_55->pretty) {
local0 = FILE_plus_STR_FILE(f_3650, ((STR) &name_3652));
local1 = FILE_plus_STR_FILE(local0, com_3651);
(fwrite(((STR) &name_3653)->arr_part,((STR) &name_3653)->asize,1,local1->fp));
}
}
BOOL TP_CLASS_is_valu(TP_CLASS self) {
BOOL noname3654 = ((BOOL) 0);
INT local0;
local0 = TP_CLASS_kind_INT(self);
return (local0==shared_TP_KIND_v);
}
FILE_20 FILE_plus_CHAR_FILE(FILE_20 self, CHAR c_3655) {
FILE_20 noname3656;
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:175:7\n");
exit(16);
}
FILE_plus_CHAR(self, c_3655);
return self;
}
STR INT_str_STR(INT self) {
STR noname3657;
FSTR_clear(shared_INT_buf);
INT_buf_FSTR(self, INT_str_in_FSTR_FSTR(self, shared_INT_buf));
return FSTR_str_STR(shared_INT_buf);
}
void FILE_plus_INT(FILE_20 self, INT i) {
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:177:7\n");
exit(16);
}
(fwrite(INT_str_STR(i)->arr_part,INT_str_STR(i)->asize,1,self->fp));
}
FILE_20 FILE_plus_INT_FILE(FILE_20 self, INT i) {
FILE_20 noname3658;
if (!((!((self->fp==((EXT_OB) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/file.sa:181:7\n");
exit(16);
}
FILE_plus_INT(self, i);
return self;
}
void BE_generate_layouts(BE self) {
FLISTTP_CLASS todo;
FSETTP done;
TP_CLASS_TBL noname3659;
FLISTTP_CLASS next_todo;
TP_CLASS tp_3660;
FLISTTP_CLASS noname3661;
BOOL okay = ((BOOL) 0);
AM_OB_DEF l;
FMAPIDENTTP noname3662;
TP ci;
STR cname;
FMAPIDENTTP noname3663;
TUPIDENTTP p = TUPIDENTTP_zero;
TP_CLASS local0;
TP_CLASS local1;
BOOL local2;
INT local3;
FILE_20 local4;
FILE_20 local5;
STR local6;
FILE_20 local7;
FILE_20 local8;
TP local9;
BOOL local10;
BOOL local11;
TP local12;
BOOL local13;
BOOL local14;
BOOL local15;
TP local16;
FILE_20 local17;
FILE_20 local18;
FILE_20 local19;
STR local20;
TP local21;
STR local22;
TUPIDENTTP local23;
FILE_20 local24;
FILE_20 local25;
FILE_20 local26;
OB local27;
FILE_20 local28;
TP local29;
FILE_20 local30;
FILE_20 local31;
FILE_20 local32;
OB local33;
FILE_20 local34;
FILE_20 local35;
FILE_20 local36;
FILE_20 local37;
OB local38;
FILE_20 local39;
FILE_20 local40;
FILE_20 local41;
TP local42;
FILE_20 local43;
FILE_20 local44;
FILE_20 local45;
FILE_20 local46;
FILE_20 local47;
FILE_20 local48;
FILE_20 local49;
FILE_20 local50;
FILE_20 local51;
FILE_20 local52;
FILE_20 local53;
FILE_20 local54;
FILE_20 local55;
FILE_20 local56;
FILE_20 local57;
FILE_20 local58;
FILE_20 local59;
FILE_20 local60;
FILE_20 local61;
FILE_20 local62;
FILE_20 local63;
FILE_20 local64;
FILE_20 local65;
FILE_20 local66;
FILE_20 local67;
FILE_20 local68;
INT local69;
todo = FLISTTP_CLASS_cr(((FLISTTP_CLASS) NULL));
done = FSETTP_create_FSETTP(((FSETTP) NULL));
{
struct TP_CLASS_TBL_elt_161_frame_struct temp3664_0;
TP_CLASS_TBL_elt_161_frame
noname3665 = &temp3664_0;
noname3665->state = 0;
while (1) {
if (noname3665->state == 0) {
noname3659 = self->prog->tp_tbl->class_tbl;
noname3665->arg0 = noname3659;
}
local0 = TP_CLASS_TBL_elt_161(noname3665);
if (noname3665->state == -1) goto after_loop;
todo = FLISTTP_CLASS_pu(todo, local0);
}
}
after_loop: ;
while (1) {
if (FLISTTP_CLASS_is(todo)) {
goto after_loop_3666;
}
next_todo = FLISTTP_CLASS_cr(((FLISTTP_CLASS) NULL));
{
struct FLISTTP_CLASS_el_frame_struct temp3669_0;
FLISTTP_CLASS_el_frame
noname3670 = &temp3669_0;
noname3670->state = 0;
while (1) {
if (noname3670->state == 0) {
noname3661 = todo;
noname3670->arg0 = noname3661;
}
local1 = FLISTTP_CLASS_el(noname3670);
if (noname3670->state == -1) goto after_loop_3668;
tp_3660 = local1;
local3 = TP_CLASS_kind_INT(tp_3660);
if ((local3==shared_TP_KIND_e)) {
local2 = TRUE;
} else {
local2 = BE_is_built_in_t(self, ((TP) tp_3660));
}
if (local2) {
done = FSETTP_insert_TP(done, ((TP) tp_3660));
}
else {
if (TP_CLASS_is_abst(tp_3660)) {
local4 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &typedefstruct));
local5 = FILE_plus_STR_FILE(local4, BE_mangle_OB_STR(self, ((OB) tp_3660)));
(fwrite(((STR) &S_struct)->arr_part,((STR) &S_struct)->asize,1,local5->fp));
local6 = BE_mangle_OB_STR(self, ((OB) tp_3660));
BE_forbid_STR(self, STR_plus_STR_STR(local6, ((STR) &S_struct_3671)));
(fwrite(((STR) &OB_HEADERheader)->arr_part,((STR) &OB_HEADERheader)->asize,1,self->typedefs_h->fp));
local7 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_3672));
local8 = FILE_plus_STR_FILE(local7, BE_mangle_OB_STR(self, ((OB) tp_3660)));
(fwrite(((STR) &name_3673)->arr_part,((STR) &name_3673)->asize,1,local8->fp));
done = FSETTP_insert_TP(done, ((TP) tp_3660));
}
else {
if (TP_CLASS_is_boun(tp_3660)) {
BE_barf_STR(self, ((STR) &boundtypesnotimp));
}
else {
okay = TRUE;
l = PROG_am_ob_def_f(self->prog, ((TP) tp_3660));
if ((!((l->at==((FMAPIDENTTP) NULL))))) {
{
struct FMAPIDENTTP_targ_frame_struct temp3675_0;
FMAPIDENTTP_targ_frame
noname3676 = &temp3675_0;
noname3676->state = 0;
while (1) {
if (noname3676->state == 0) {
noname3662 = l->at;
noname3676->arg0 = noname3662;
}
local9 = FMAPIDENTTP_targ(noname3676);
if (noname3676->state == -1) goto after_loop_3674;
ci = local9;
local12 = ci;
if ((*TP_is_value_BOOL[local12->header.tag+TP_is_value_BOOL_offset])(local12)) {
local11 = (!(BE_is_built_in_t(self, ci)));
} else {
local11 = FALSE;
}
if (local11) {
local10 = (!(FSETTP_test_TP_BOOL(done, ci)));
} else {
local10 = FALSE;
}
if (local10) {
okay = FALSE;
}
}
}
after_loop_3674: ;
}
if ((!((l->arr==((TP) NULL))))) {
local16 = l->arr;
local15 = (*TP_is_value_BOOL[local16->header.tag+TP_is_value_BOOL_offset])(local16);
} else {
local15 = FALSE;
}
if (local15) {
local14 = (!(BE_is_built_in_t(self, l->arr)));
} else {
local14 = FALSE;
}
if (local14) {
local13 = (!(FSETTP_test_TP_BOOL(done, l->arr)));
} else {
local13 = FALSE;
}
if (local13) {
okay = FALSE;
}
if ((!(okay))) {
next_todo = FLISTTP_CLASS_pu(next_todo, tp_3660);
}
else {
done = FSETTP_insert_TP(done, ((TP) tp_3660));
cname = BE_mangle_OB_STR(self, ((OB) l->tp));
local17 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &typedefstruct_3677));
local18 = FILE_plus_STR_FILE(local17, cname);
(fwrite(((STR) &S_struct_3678)->arr_part,((STR) &S_struct_3678)->asize,1,local18->fp));
local19 = self->typedefs_h;
local20 = ((STR) &layoutfor);
local21 = l->tp;
BE_comment_FILE_STR(self, local19, STR_plus_STR_STR(local20, (*TP_str_STR[local21->header.tag+TP_str_STR_offset])(local21)));
FILE_plus_CHAR(self->typedefs_h, '\n');
local22 = BE_mangle_OB_STR(self, ((OB) tp_3660));
BE_forbid_STR(self, STR_plus_STR_STR(local22, ((STR) &S_struct_3679)));
if ((!(TP_CLASS_is_valu(tp_3660)))) {
(fwrite(((STR) &OB_HEADERheader_3680)->arr_part,((STR) &OB_HEADERheader_3680)->asize,1,self->typedefs_h->fp));
}
if ((!((l->at==((FMAPIDENTTP) NULL))))) {
{
struct FMAPIDENTTP_pair_frame_struct temp3682_0;
FMAPIDENTTP_pair_frame
noname3683 = &temp3682_0;
noname3683->state = 0;
while (1) {
if (noname3683->state == 0) {
noname3663 = l->at;
noname3683->arg0 = noname3663;
}
local23 = FMAPIDENTTP_pair(noname3683);
if (noname3683->state == -1) goto after_loop_3681;
p = local23;
if (BE_is_built_in_t(self, p.t2)) {
local24 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
local25 = FILE_plus_STR_FILE(local24, BE_mangle_OB_STR(self, ((OB) p.t2)));
local26 = FILE_plus_CHAR_FILE(local25, ' ');
local27 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local27)->value_part = p.t1;
local28 = FILE_plus_STR_FILE(local26, BE_mangle_OB_STR(self, local27));
(fwrite(((STR) &name_3684)->arr_part,((STR) &name_3684)->asize,1,local28->fp));
}
else {
local29 = p.t2;
if ((!((*TP_is_value_BOOL[local29->header.tag+TP_is_value_BOOL_offset])(local29)))) {
local30 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &struct_3685));
local31 = FILE_plus_STR_FILE(local30, BE_mangle_OB_STR(self, ((OB) p.t2)));
local32 = FILE_plus_STR_FILE(local31, ((STR) &S_struct_3686));
local33 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local33)->value_part = p.t1;
local34 = FILE_plus_STR_FILE(local32, BE_mangle_OB_STR(self, local33));
(fwrite(((STR) &name_3687)->arr_part,((STR) &name_3687)->asize,1,local34->fp));
}
else {
local35 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &struct_3688));
local36 = FILE_plus_STR_FILE(local35, BE_mangle_OB_STR(self, ((OB) p.t2)));
local37 = FILE_plus_STR_FILE(local36, ((STR) &S_struct_3689));
local38 = (OB)((IDENT_boxed) sbi_alloc(sizeof(struct IDENT_boxed_struct), IDENT_tag));
((IDENT_boxed) local38)->value_part = p.t1;
local39 = FILE_plus_STR_FILE(local37, BE_mangle_OB_STR(self, local38));
(fwrite(((STR) &name_3690)->arr_part,((STR) &name_3690)->asize,1,local39->fp));
}
}
}
}
after_loop_3681: ;
}
if ((!((l->arr==((TP) NULL))))) {
if ((!(TP_CLASS_is_valu(tp_3660)))) {
(fwrite(((STR) &INTasize)->arr_part,((STR) &INTasize)->asize,1,self->typedefs_h->fp));
}
if (BE_is_built_in_t(self, l->arr)) {
local40 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
local41 = FILE_plus_STR_FILE(local40, BE_mangle_OB_STR(self, ((OB) l->arr)));
(fwrite(((STR) &arr_part_3691)->arr_part,((STR) &arr_part_3691)->asize,1,local41->fp));
}
else {
local42 = l->arr;
if ((!((*TP_is_value_BOOL[local42->header.tag+TP_is_value_BOOL_offset])(local42)))) {
local43 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &struct_3692));
local44 = FILE_plus_STR_FILE(local43, BE_mangle_OB_STR(self, ((OB) l->arr)));
(fwrite(((STR) &S_structarr_part)->arr_part,((STR) &S_structarr_part)->asize,1,local44->fp));
}
else {
local45 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &struct_3693));
local46 = FILE_plus_STR_FILE(local45, BE_mangle_OB_STR(self, ((OB) l->arr)));
(fwrite(((STR) &S_structarr_part_3694)->arr_part,((STR) &S_structarr_part_3694)->asize,1,local46->fp));
}
}
local47 = self->typedefs_h;
local48 = FILE_plus_INT_FILE(local47, INT_max_INT_INT(1, l->asize));
(fwrite(((STR) &name_3695)->arr_part,((STR) &name_3695)->asize,1,local48->fp));
}
if (TP_CLASS_is_valu(tp_3660)) {
local49 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_3696));
local50 = FILE_plus_STR_FILE(local49, cname);
local51 = FILE_plus_CHAR_FILE(local50, ';');
FILE_plus_CHAR(local51, '\n');
local52 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &static_3697));
local53 = FILE_plus_STR_FILE(local52, cname);
local54 = FILE_plus_STR_FILE(local53, ((STR) &name_3698));
local55 = FILE_plus_STR_FILE(local54, cname);
(fwrite(((STR) &S_blob)->arr_part,((STR) &S_blob)->asize,1,local55->fp));
local56 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &static_3699));
local57 = FILE_plus_STR_FILE(local56, cname);
local58 = FILE_plus_STR_FILE(local57, ((STR) &name_3700));
local59 = FILE_plus_STR_FILE(local58, cname);
(fwrite(((STR) &S_zero)->arr_part,((STR) &S_zero)->asize,1,local59->fp));
BE_comment_FILE_STR(self, self->typedefs_h, ((STR) &automaticallyini));
local60 = FILE_plus_CHAR_FILE(self->typedefs_h, '\n');
FILE_plus_CHAR(local60, '\n');
BE_forbid_STR(self, STR_plus_STR_STR(cname, ((STR) &S_blob_3701)));
BE_forbid_STR(self, STR_plus_STR_STR(cname, ((STR) &S_zero_3702)));
local61 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &typedefstruct_3703));
local62 = FILE_plus_STR_FILE(local61, cname);
(fwrite(((STR) &S_boxed_struct)->arr_part,((STR) &S_boxed_struct)->asize,1,local62->fp));
(fwrite(((STR) &OB_HEADERheader_3704)->arr_part,((STR) &OB_HEADERheader_3704)->asize,1,self->typedefs_h->fp));
local63 = FILE_plus_CHAR_FILE(self->typedefs_h, ' ');
local64 = FILE_plus_STR_FILE(local63, cname);
(fwrite(((STR) &value_part)->arr_part,((STR) &value_part)->asize,1,local64->fp));
local65 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_3705));
local66 = FILE_plus_STR_FILE(local65, cname);
(fwrite(((STR) &S_boxed)->arr_part,((STR) &S_boxed)->asize,1,local66->fp));
BE_forbid_STR(self, STR_plus_STR_STR(cname, ((STR) &S_boxed_3706)));
BE_forbid_STR(self, STR_plus_STR_STR(cname, ((STR) &S_boxed_struct_3707)));
}
else {
local67 = FILE_plus_STR_FILE(self->typedefs_h, ((STR) &name_3708));
local68 = FILE_plus_STR_FILE(local67, cname);
(fwrite(((STR) &name_3709)->arr_part,((STR) &name_3709)->asize,1,local68->fp));
}
}
}
}
}
}
}
after_loop_3668: ;
local69 = FLISTTP_CLASS_si(next_todo);
if (!((local69<FLISTTP_CLASS_si(todo)))) {
fprintf(stderr,"Violation of assertion ./be.sa:1039:18\n");
exit(16);
}
todo = next_todo;
}
after_loop_3666: ;
}
void BE_init(BE self) {
STR fn;
STR comp_home;
STR local0;
STR local1;
STR local2;
STR local3;
STR local4;
STR local5;
STR local6;
STR local7;
FILE_20 local8;
FILE_20 local9;
FILE_20 local10;
FILE_20 local11;
FILE_20 local12;
FILE_20 local13;
self->indent = 0;
self->code_dir = STR_plus_STR_STR(self->prog->options_55->executable_9, ((STR) &cod));
FILE_create_dire(((FILE_20) NULL), self->code_dir);
BE_new_c_file(self);
local0 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local0, ((STR) &typedefsh));
self->typedefs_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->typedefs_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen), fn));
}
local1 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local1, ((STR) &satherh));
self->sather_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->sather_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3710), fn));
}
local2 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local2, ((STR) &decsh));
self->decs_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->decs_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3711), fn));
}
local3 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local3, ((STR) &globalsh));
self->globals_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->globals_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3712), fn));
}
local4 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local4, ((STR) &globalsc));
self->globals_c = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->globals_c)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3713), fn));
}
(fwrite(((STR) &includesatherh_3714)->arr_part,((STR) &includesatherh_3714)->asize,1,self->globals_c->fp));
local5 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local5, ((STR) &tagsh));
self->tags_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->tags_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3715), fn));
}
local6 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local6, ((STR) &stringsh));
self->strings_h = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->strings_h)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3716), fn));
}
local7 = STR_plus_CHAR_STR(self->code_dir, '/');
fn = STR_plus_STR_STR(local7, ((STR) &Makefile));
self->makefile = FILE_open_for_wr(((FILE_20) NULL), fn);
if (FILE_error_BOOL(self->makefile)) {
BE_barf_STR(self, STR_plus_STR_STR(((STR) &Couldntopen_3717), fn));
}
if (self->prog->options_55->deterministic_12) {
(fwrite(((STR) &defineDETERMINISTIC)->arr_part,((STR) &defineDETERMINISTIC)->asize,1,self->sather_h->fp));
}
comp_home = self->prog->options_55->home;
if (STR_is_eq_STR_BOOL(comp_home, ((STR) &name_3718))) {
comp_home = ((STR) &name_3719);
}
local8 = FILE_plus_STR_FILE(self->sather_h, ((STR) &include_3720));
local9 = FILE_plus_STR_FILE(local8, comp_home);
(fwrite(((STR) &SystemGCgch)->arr_part,((STR) &SystemGCgch)->asize,1,local9->fp));
local10 = FILE_plus_STR_FILE(self->sather_h, ((STR) &include_3721));
local11 = FILE_plus_STR_FILE(local10, comp_home);
(fwrite(((STR) &Systemheaderh)->arr_part,((STR) &Systemheaderh)->asize,1,local11->fp));
if (self->prog->options_55->deterministic_12) {
(fwrite(((STR) &BOOLdeterministi)->arr_part,((STR) &BOOLdeterministi)->asize,1,self->globals_c->fp));
}
else {
(fwrite(((STR) &BOOLdeterministi_3722)->arr_part,((STR) &BOOLdeterministi_3722)->asize,1,self->globals_c->fp));
}
(fwrite(((STR) &externjmp_buflas)->arr_part,((STR) &externjmp_buflas)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externOBexception)->arr_part,((STR) &externOBexception)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externvoidsbi_al)->arr_part,((STR) &externvoidsbi_al)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externvoidsbi_ar)->arr_part,((STR) &externvoidsbi_ar)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externvoidsbi_al_3723)->arr_part,((STR) &externvoidsbi_al_3723)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externvoidsbi_ar_3724)->arr_part,((STR) &externvoidsbi_ar_3724)->asize,1,self->sather_h->fp));
(fwrite(((STR) &externvoidsbi_se)->arr_part,((STR) &externvoidsbi_se)->asize,1,self->sather_h->fp));
(fwrite(((STR) &includetagsh)->arr_part,((STR) &includetagsh)->asize,1,self->sather_h->fp));
(fwrite(((STR) &includetypedefsh)->arr_part,((STR) &includetypedefsh)->asize,1,self->sather_h->fp));
(fwrite(((STR) &includedecsh)->arr_part,((STR) &includedecsh)->asize,1,self->sather_h->fp));
(fwrite(((STR) &includeglobalsh)->arr_part,((STR) &includeglobalsh)->asize,1,self->sather_h->fp));
local12 = FILE_plus_STR_FILE(self->sather_h, ((STR) &include_3725));
local13 = FILE_plus_STR_FILE(local12, comp_home);
(fwrite(((STR) &Systemprotoh)->arr_part,((STR) &Systemprotoh)->asize,1,local13->fp));
self->tags = FMAPTPINT_create(((FMAPTPINT) NULL));
self->neg_tag_count = 1;
self->pos_tag_count = 1;
self->main_sig = self->prog->prog_get_main->main_sig;
BE_generate_layouts(self);
}
SIG SIG_TBL_get_SIG_SIG(SIG_TBL self, SIG e_3726) {
SIG noname3727;
INT h = ((INT) 0);
SIG te;
SIG te_3728;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((SIG_TBL) NULL))) {
return SIG_TBL_elt_nil_SIG(self);
}
local0 = SIG_TBL_elt_hash(self, e_3726);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
te = SIG_TBL_aget_INT_SIG(self, h);
if (SIG_TBL_elt_eq_S(self, te, e_3726)) {
return te;
}
else {
if (SIG_TBL_elt_eq_S(self, te, SIG_TBL_elt_nil_SIG(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) {
te_3728 = SIG_TBL_aget_INT_SIG(self, h);
if (SIG_TBL_elt_eq_S(self, te_3728, e_3726)) {
return te_3728;
}
else {
if (SIG_TBL_elt_eq_S(self, te_3728, SIG_TBL_elt_nil_SIG(self))) {
goto after_loop_3730;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_3730: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fqset.sa:187:15\n");
exit(16);
}
}
return SIG_TBL_elt_nil_SIG(self);
if (!SIG_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ../Library/fqset.sa:170:6\n");
exit(16);
}
}
SIG SIG_TBL_sig_eq_t(SIG_TBL self, SIG s_3732) {
SIG noname3733;
SIG r_3734;
if (!((!((s_3732==((SIG) NULL)))))) {
fprintf(stderr,"Violation of precondition ./sig.sa:395:13\n");
exit(16);
}
r_3734 = SIG_TBL_get_SIG_SIG(self, s_3732);
return r_3734;
if (!SIG_TBL_invarian(self)) {
fprintf(stderr,"Failed invariant SIG_TBL::invariant:BOOL ./sig.sa:395:13\n");
exit(16);
}
}
AM_ROUT_DEF AM_ROUT_DEF_crea(AM_ROUT_DEF self, INT nargs, SFILE_ID source_3735) {
AM_ROUT_DEF noname3736;
AM_ROUT_DEF r_3737;
AM_ROUT_DEF local0;
local0 = ((AM_ROUT_DEF) sbi_arr_alloc(sizeof(struct AM_ROUT_DEF_struct), AM_ROUT_DEF_tag, sizeof(AM_LOCAL_EXPR) , nargs));
local0->asize = nargs;
r_3737 = local0;
r_3737->source_38 = source_3735;
return r_3737;
}
FSETTP TP_GRAPH_ABS_DES_3738(TP_GRAPH_ABS_DES self, TP_CLASS tp_3739) {
FSETTP noname3740;
return FMAPTP_CLASSFSET_3200(self->tbl, tp_3739);
}
FSETTP PROG_descendants(PROG self, TP_CLASS t_3741) {
FSETTP noname3742;
if ((!((self->tp_graph_abs_des==((TP_GRAPH_ABS_DES) NULL))))) {
return TP_GRAPH_ABS_DES_3738(self->tp_graph_abs_des, t_3741);
}
return ((FSETTP) NULL);
}
INT FLISTSIG_asize_INT(FLISTSIG self) {
INT noname3743 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT FLISTSIG_size_INT(FLISTSIG self) {
INT noname3744 = ((INT) 0);
if ((self==((FLISTSIG) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTSIG_is_empt(FLISTSIG self) {
BOOL noname3745 = ((BOOL) 0);
INT local0;
local0 = FLISTSIG_size_INT(self);
return (local0==0);
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTSIG_aclear(FLISTSIG self) {
SIG nil = ((SIG) NULL);
FLISTSIG noname3746;
if (!((!((self==((FLISTSIG) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTSIG_aset_SIG_frame_struct temp3747_0;
FLISTSIG_aset_SIG_frame
noname3748 = &temp3747_0;
noname3748->state = 0;
while (1) {
if (noname3748->state == 0) {
noname3746 = self;
noname3748->arg0 = noname3746;
}
noname3748->arg1 = nil;
FLISTSIG_aset_SIG(noname3748);
if (noname3748->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTSIG_clear(FLISTSIG self) {
if (FLISTSIG_is_empt(self)) {
return;
}
else {
FLISTSIG_aclear(self);
self->loc_17 = 0;
}
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTSIG_aref_as(FLISTSIG self, INT ind_3749, SIG val_3750) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTSIG) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3749, 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_3749<0||ind_3749>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_3749] = val_3750;
}
void FLISTSIG_aset_IN(FLISTSIG self, INT ind_3751, SIG val_3752) {
BOOL local0;
INT local1;
if ((!((self==((FLISTSIG) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_3751, 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);
}
FLISTSIG_aref_as(self, ind_3751, val_3752);
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTSIG FLISTSIG_push_SI(FLISTSIG self, SIG e_3753) {
FLISTSIG noname3754;
FLISTSIG r_3755 = ((FLISTSIG) NULL);
FLISTSIG noname3756;
FLISTSIG noname3757;
FLISTSIG local0;
INT local1;
FLISTSIG local2;
INT local3;
SIG local4;
INT local5;
if ((self==((FLISTSIG) NULL))) {
local0 = ((FLISTSIG) sbi_arr_alloc(sizeof(struct FLISTSIG_struct), FLISTSIG_tag, sizeof(SIG) , 5));
local0->asize = 5;
r_3755 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_3755 = self;
}
else {
local3 = 2;
local2 = ((FLISTSIG) sbi_arr_alloc(sizeof(struct FLISTSIG_struct), FLISTSIG_tag, sizeof(SIG) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_3755 = local2;
r_3755->loc_17 = self->loc_17;
{
struct FLISTSIG_elt_SIG_frame_struct temp3758_0;
FLISTSIG_elt_SIG_frame
noname3759 = &temp3758_0;
struct FLISTSIG_aset_SIG_frame_struct temp3758_1;
FLISTSIG_aset_SIG_frame
noname3760 = &temp3758_1;
noname3759->state = 0;
noname3760->state = 0;
while (1) {
if (noname3760->state == 0) {
noname3757 = r_3755;
noname3760->arg0 = noname3757;
}
if (noname3759->state == 0) {
noname3756 = self;
noname3759->arg0 = noname3756;
}
local4 = FLISTSIG_elt_SIG(noname3759);
if (noname3759->state == -1) goto after_loop;
noname3760->arg1 = local4;
FLISTSIG_aset_SIG(noname3760);
if (noname3760->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTSIG_clear(self);
}
}
r_3755->loc_17 = (c_INT_plus_INT_INT_chk(r_3755->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_3755->loc_17,1));
FLISTSIG_aset_IN(r_3755, local5, e_3753);
return r_3755;
if (!FLISTSIG_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{SIG}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
INT AM_ROUT_DEF_asiz(AM_ROUT_DEF self) {
INT noname3761 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT AM_ROUT_DEF_size_INT(AM_ROUT_DEF self) {
INT noname3762 = ((INT) 0);
if ((self==((AM_ROUT_DEF) NULL))) {
return 0;
}
return (self->asize);
}
AM_LOCAL_EXPR AM_ROUT_DEF_aget(AM_ROUT_DEF self, INT ind_3763) {
AM_LOCAL_EXPR noname3764;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((AM_ROUT_DEF) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3763, 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_3763<0||ind_3763>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3763];
}
void AM_OUT_AM_LOCAL_(AM_OUT self, AM_LOCAL_EXPR a_3765) {
OUT local0;
BOOL local1;
OUT local2;
OUT local3;
OUT local4;
TP local5;
OUT local6;
OUT local7;
OUT local8;
OUT local9;
OUT local10;
TP local11;
if ((a_3765==((AM_LOCAL_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_LOCAL_EXPR));
return;
}
if ((a_3765->name_19.str_4==(STR)0)) {
local1 = (a_3765->tp_at==((TP) NULL));
} else {
local1 = FALSE;
}
if (local1) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &nonamenotype));
}
else {
if ((a_3765->name_19.str_4==(STR)0)) {
local3 = OUT_create_OUT(((OUT) NULL));
local4 = OUT_plus_STR_OUT(local3, ((STR) &noname_3766));
local5 = a_3765->tp_at;
OUT_plus_STR(local4, (*TP_str_STR[local5->header.tag+TP_str_STR_offset])(local5));
}
else {
if ((a_3765->tp_at==((TP) NULL))) {
local6 = OUT_create_OUT(((OUT) NULL));
local7 = OUT_plus_STR_OUT(local6, a_3765->name_19.str_4);
OUT_plus_STR(local7, ((STR) ¬ype));
}
else {
local8 = OUT_create_OUT(((OUT) NULL));
local9 = OUT_plus_STR_OUT(local8, a_3765->name_19.str_4);
local10 = OUT_plus_STR_OUT(local9, ((STR) &name_3767));
local11 = a_3765->tp_at;
OUT_plus_STR(local10, (*TP_str_STR[local11->header.tag+TP_str_STR_offset])(local11));
}
}
}
}
INT FLISTAM_LOCAL_EX(FLISTAM_LOCAL_EXPR self) {
INT noname3768 = ((INT) 0);
if ((self==((FLISTAM_LOCAL_EXPR) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTAM_LOCAL_EX_3769(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_LOCAL_EXPR}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
INT FLISTAM_LOCAL_EX_3770(FLISTAM_LOCAL_EXPR self) {
INT noname3771 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
AM_LOCAL_EXPR FLISTAM_LOCAL_EX_3772(FLISTAM_LOCAL_EXPR self, INT ind_3773) {
AM_LOCAL_EXPR noname3774;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_LOCAL_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3773, 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_3773<0||ind_3773>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3773];
}
AM_LOCAL_EXPR FLISTAM_LOCAL_EX_3775(FLISTAM_LOCAL_EXPR self, INT ind_3776) {
AM_LOCAL_EXPR noname3777;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_LOCAL_EXPR) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_3776, 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_LOCAL_EX_3772(self, ind_3776);
if (!FLISTAM_LOCAL_EX_3769(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_LOCAL_EXPR}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
void AM_OUT_AM_ARRAY_(AM_OUT self, AM_ARRAY_EXPR a_3778) {
AM_ARRAY_EXPR noname3779;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
TP local4;
OUT local5;
AM_EXPR local6;
if ((a_3778==((AM_ARRAY_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &void_3780));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ARRAY_EXPR_3781));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &tp_3782));
local4 = a_3778->tp_at;
OUT_plus_STR(local3, (*TP_str_STR[local4->header.tag+TP_str_STR_offset])(local4));
{
struct AM_ARRAY_EXPR_el_frame_struct temp3783_0;
AM_ARRAY_EXPR_el_frame
noname3784 = &temp3783_0;
noname3784->state = 0;
while (1) {
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &name_3785));
if (noname3784->state == 0) {
noname3779 = a_3778;
noname3784->arg0 = noname3779;
}
local6 = AM_ARRAY_EXPR_el(noname3784);
if (noname3784->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local6);
}
}
after_loop: ;
}
INT AM_BND_CREATE_EX(AM_BND_CREATE_EXPR self) {
INT noname3786 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
AM_EXPR AM_BND_CREATE_EX_3787(AM_BND_CREATE_EXPR self, INT ind_3788) {
AM_EXPR noname3789;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((AM_BND_CREATE_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3788, 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_3788<0||ind_3788>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3788];
}
INT ARRAYINT_asize_INT(ARRAYINT self) {
INT noname3790 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT ARRAYINT_aget_IN(ARRAYINT self, INT ind_3791) {
INT noname3792 = ((INT) 0);
BOOL local0;
INT local1;
INT local2;
if ((!((self==((ARRAYINT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3791, 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_3791<0||ind_3791>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3791];
}
void OUT_plus_INT(OUT self, INT i) {
c_out_str(((INT_str_STR(i)==NULL)?NULL:INT_str_STR(i)->arr_part));
}
void AM_OUT_AM_BND_CR(AM_OUT self, AM_BND_CREATE_EXPR a_3793) {
AM_BND_CREATE_EXPR noname3794;
INT i = ((INT) 0);
ARRAYINT noname3795;
INT j = ((INT) 0);
ARRAYINT noname3796;
INT j_3797 = ((INT) 0);
OUT local0;
OUT local1;
OUT local2;
INT local3;
OUT local4;
OUT local5;
OUT local6;
OUT local7;
OUT local8;
INT local9;
OUT local10;
OUT local11;
OUT local12;
INT local13;
OUT local14;
OUT local15;
OUT local16;
OUT local17;
OUT local18;
TP local19;
if ((a_3793==((AM_BND_CREATE_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_BMD_CREAT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_BMD_CREATE_EXPR));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &args_3798));
{
struct AM_BND_CREATE_EX_3800_frame_struct temp3799_0;
AM_BND_CREATE_EX_3800_frame
noname3801 = &temp3799_0;
noname3801->state = 0;
while (1) {
if (noname3801->state == 0) {
noname3794 = a_3793;
noname3801->arg0 = noname3794;
}
local3 = AM_BND_CREATE_EX_3800(noname3801);
if (noname3801->state == -1) goto after_loop;
i = local3;
if ((i!=0)) {
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &name_3802));
}
AM_OUT_AM_EXPR_o(self, AM_BND_CREATE_EX_3787(a_3793, i));
}
}
after_loop: ;
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &name_3803));
local6 = OUT_create_OUT(((OUT) NULL));
local7 = OUT_plus_STR_OUT(local6, ((STR) &fun_3804));
OUT_plus_STR(local7, SIG_str_STR(a_3793->fun));
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &bnd_args_3805));
{
struct ARRAYINT_ind_INT_frame_struct temp3807_0;
ARRAYINT_ind_INT_frame
noname3808 = &temp3807_0;
noname3808->state = 0;
while (1) {
if (noname3808->state == 0) {
noname3795 = a_3793->bnd_args;
noname3808->arg0 = noname3795;
}
local9 = ARRAYINT_ind_INT(noname3808);
if (noname3808->state == -1) goto after_loop_3806;
j = local9;
if ((j!=0)) {
local10 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local10, ((STR) &name_3809));
}
local11 = OUT_create_OUT(((OUT) NULL));
OUT_plus_INT(local11, ARRAYINT_aget_IN(a_3793->bnd_args, j));
}
}
after_loop_3806: ;
local12 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local12, ((STR) &unbnd_args_3810));
{
struct ARRAYINT_ind_INT_frame_struct temp3812_0;
ARRAYINT_ind_INT_frame
noname3813 = &temp3812_0;
noname3813->state = 0;
while (1) {
if (noname3813->state == 0) {
noname3796 = a_3793->unbnd_args;
noname3813->arg0 = noname3796;
}
local13 = ARRAYINT_ind_INT(noname3813);
if (noname3813->state == -1) goto after_loop_3811;
j_3797 = local13;
if ((j_3797!=0)) {
local14 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local14, ((STR) &name_3814));
}
local15 = OUT_create_OUT(((OUT) NULL));
OUT_plus_INT(local15, ARRAYINT_aget_IN(a_3793->unbnd_args, j_3797));
}
}
after_loop_3811: ;
local16 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local16, ((STR) &name_3815));
local17 = OUT_create_OUT(((OUT) NULL));
local18 = OUT_plus_STR_OUT(local17, ((STR) &tp_at_3816));
local19 = a_3793->tp_at;
OUT_plus_STR(local18, (*TP_str_STR[local19->header.tag+TP_str_STR_offset])(local19));
}
void AM_OUT_AM_IF_EXP(AM_OUT self, AM_IF_EXPR a_3817) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
if ((a_3817==((AM_IF_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_IF_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_IF_EXPR_3818));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_3819));
AM_OUT_AM_EXPR_o(self, a_3817->test_40);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &if_true_3820));
AM_OUT_AM_EXPR_o(self, a_3817->if_true);
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &if_false_3821));
AM_OUT_AM_EXPR_o(self, a_3817->if_false);
}
void AM_OUT_AM_NEW_EX(AM_OUT self, AM_NEW_EXPR a_3822) {
OUT local0;
OUT local1;
OUT local2;
if ((a_3822==((AM_NEW_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_NEW_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_NEW_EXPR_3823));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &asz_3824));
AM_OUT_AM_EXPR_o(self, a_3822->asz);
}
void AM_OUT_AM_IS_VOI(AM_OUT self, AM_IS_VOID_EXPR a_3825) {
OUT local0;
OUT local1;
OUT local2;
if ((a_3825==((AM_IS_VOID_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_IS_VOID_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_IS_VOID_EXPR_3826));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &arg_3827));
AM_OUT_AM_EXPR_o(self, a_3825->arg_51);
}
void AM_OUT_AM_GLOBAL(AM_OUT self, AM_GLOBAL_EXPR a_3828) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
OUT local6;
OUT local7;
TP local8;
OUT local9;
OUT local10;
OUT local11;
TP local12;
OUT local13;
if ((a_3828==((AM_GLOBAL_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_GLOBAL_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_GLOBAL_EXPR_3829));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &name_3830));
if ((a_3828->name_19.str_4==(STR)0)) {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &void_3831));
}
else {
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, a_3828->name_19.str_4);
}
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &tp_3832));
if ((a_3828->tp_at==((TP) NULL))) {
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &void_3833));
}
else {
local7 = OUT_create_OUT(((OUT) NULL));
local8 = a_3828->tp_at;
OUT_plus_STR(local7, (*TP_str_STR[local8->header.tag+TP_str_STR_offset])(local8));
}
local9 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local9, ((STR) &class_tp_3834));
if ((a_3828->class_tp==((TP) NULL))) {
local10 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local10, ((STR) &void_3835));
}
else {
local11 = OUT_create_OUT(((OUT) NULL));
local12 = a_3828->class_tp;
OUT_plus_STR(local11, (*TP_str_STR[local12->header.tag+TP_str_STR_offset])(local12));
}
local13 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local13, ((STR) &init_3836));
AM_OUT_AM_EXPR_o(self, a_3828->init);
}
void AM_OUT_AM_ATTR_E(AM_OUT self, AM_ATTR_EXPR a_3837) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
OUT local6;
TP local7;
if ((a_3837==((AM_ATTR_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ATTR_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ATTR_EXPR_3838));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &ob_3839));
AM_OUT_AM_EXPR_o(self, a_3837->ob);
local3 = OUT_create_OUT(((OUT) NULL));
local4 = OUT_plus_STR_OUT(local3, ((STR) &at_3840));
OUT_plus_STR(local4, a_3837->at.str_4);
local5 = OUT_create_OUT(((OUT) NULL));
local6 = OUT_plus_STR_OUT(local5, ((STR) &tp_3841));
local7 = a_3837->tp_at;
OUT_plus_STR(local6, (*TP_str_STR[local7->header.tag+TP_str_STR_offset])(local7));
}
void AM_OUT_AM_ARR_EX(AM_OUT self, AM_ARR_EXPR a_3842) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
TP local6;
if ((a_3842==((AM_ARR_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ARR_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ARR_EXPR_3843));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &ob_3844));
AM_OUT_AM_EXPR_o(self, a_3842->ob);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &ind_3845));
AM_OUT_AM_EXPR_o(self, a_3842->ind);
local4 = OUT_create_OUT(((OUT) NULL));
local5 = OUT_plus_STR_OUT(local4, ((STR) &tp_3846));
local6 = a_3842->tp_at;
OUT_plus_STR(local5, (*TP_str_STR[local6->header.tag+TP_str_STR_offset])(local6));
}
void AM_OUT_AM_VATTR_(AM_OUT self, AM_VATTR_ASSIGN_EXPR a_3847) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
OUT local6;
OUT local7;
OUT local8;
if ((a_3847==((AM_VATTR_ASSIGN_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_VATTR_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_VATTR_EXPR));
if ((a_3847->ob==((AM_EXPR) NULL))) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &voidob));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &ob_3848));
AM_OUT_AM_EXPR_o(self, a_3847->ob);
}
if ((a_3847->at.str_4==(STR)0)) {
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &voidat));
}
else {
local5 = OUT_create_OUT(((OUT) NULL));
local6 = OUT_plus_STR_OUT(local5, ((STR) &at_3849));
OUT_plus_STR(local6, a_3847->at.str_4);
}
if ((a_3847->val_16==((AM_EXPR) NULL))) {
local7 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local7, ((STR) &voidval));
}
else {
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &val_3850));
AM_OUT_AM_EXPR_o(self, a_3847->val_16);
}
}
void AM_OUT_AM_VARR_A(AM_OUT self, AM_VARR_ASSIGN_EXPR a_3851) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
OUT local6;
OUT local7;
if ((a_3851==((AM_VARR_ASSIGN_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_VARR_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_VARR_EXPR));
if ((a_3851->ob==((AM_EXPR) NULL))) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &voidob_3852));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &ob_3853));
AM_OUT_AM_EXPR_o(self, a_3851->ob);
}
if ((a_3851->ind==((AM_EXPR) NULL))) {
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &voidind));
}
else {
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &ind_3854));
AM_OUT_AM_EXPR_o(self, a_3851->ind);
}
if ((a_3851->val_16==((AM_EXPR) NULL))) {
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &voidval_3855));
}
else {
local7 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local7, ((STR) &val_3856));
AM_OUT_AM_EXPR_o(self, a_3851->val_16);
}
}
void AM_OUT_AM_EXCEPT(AM_OUT self, AM_EXCEPT_EXPR a_3857) {
OUT local0;
OUT local1;
if ((a_3857==((AM_EXCEPT_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_EXCEPT_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_EXCEPT_EXPR_3858));
}
void AM_OUT_AM_STMT_E(AM_OUT self, AM_STMT_EXPR a_3859) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
if ((a_3859==((AM_STMT_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_STMT_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_STMT_EXPR_3860));
if ((a_3859->stmts==((AM_STMT) NULL))) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &voidstmts));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &stmts_3861));
AM_OUT_AM_STMT_o(self, a_3859->stmts);
}
if ((a_3859->expr==((AM_EXPR) NULL))) {
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &voidexpr));
}
else {
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &expr_3862));
AM_OUT_AM_EXPR_o(self, a_3859->expr);
}
}
void AM_OUT_AM_ROUT_C(AM_OUT self, AM_ROUT_CALL_EXPR a_3863) {
AM_ROUT_CALL_EXPR noname3864;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
AM_EXPR local5;
if ((a_3863==((AM_ROUT_CALL_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ROUT_CALL));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ROUT_CALL_EXP_3865));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &fun_3866));
OUT_plus_STR(local3, SIG_str_STR(a_3863->fun));
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &args_3867));
{
struct AM_ROUT_CALL_EXP_frame_struct temp3868_0;
AM_ROUT_CALL_EXP_frame
noname3869 = &temp3868_0;
noname3869->state = 0;
while (1) {
if (noname3869->state == 0) {
noname3864 = a_3863;
noname3869->arg0 = noname3864;
}
local5 = AM_ROUT_CALL_EXP(noname3869);
if (noname3869->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local5);
}
}
after_loop: ;
}
void AM_OUT_AM_ITER_C(AM_OUT self, AM_ITER_CALL_EXPR a_3870) {
AM_ITER_CALL_EXPR noname3871;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
AM_EXPR local6;
if ((a_3870==((AM_ITER_CALL_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ITER_CALL));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ITER_CALL_EXP_3872));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &fun_3873));
OUT_plus_STR(local3, SIG_str_STR(a_3870->fun));
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &init_3874));
AM_OUT_AM_STMT_o(self, a_3870->init);
local5 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local5, ((STR) &args_3875));
{
struct AM_ITER_CALL_EXP_frame_struct temp3876_0;
AM_ITER_CALL_EXP_frame
noname3877 = &temp3876_0;
noname3877->state = 0;
while (1) {
if (noname3877->state == 0) {
noname3871 = a_3870;
noname3877->arg0 = noname3871;
}
local6 = AM_ITER_CALL_EXP(noname3877);
if (noname3877->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local6);
}
}
after_loop: ;
}
void AM_OUT_AM_BND_RO(AM_OUT self, AM_BND_ROUT_CALL a_3878) {
AM_BND_ROUT_CALL noname3879;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
AM_EXPR local4;
if ((a_3878==((AM_BND_ROUT_CALL) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_BND_ROUT_));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_BND_ROUT_CALL_3880));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &br_3881));
AM_OUT_AM_EXPR_o(self, a_3878->br);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &args_3882));
{
struct AM_BND_ROUT_CALL_3884_frame_struct temp3883_0;
AM_BND_ROUT_CALL_3884_frame
noname3885 = &temp3883_0;
noname3885->state = 0;
while (1) {
if (noname3885->state == 0) {
noname3879 = a_3878;
noname3885->arg0 = noname3879;
}
local4 = AM_BND_ROUT_CALL_3884(noname3885);
if (noname3885->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local4);
}
}
after_loop: ;
}
void AM_OUT_AM_BND_IT(AM_OUT self, AM_BND_ITER_CALL a_3886) {
AM_BND_ITER_CALL noname3887;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
AM_EXPR local5;
if ((a_3886==((AM_BND_ITER_CALL) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_BND_ITER_));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_BND_ITER_CALL_3888));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &bi_3889));
AM_OUT_AM_EXPR_o(self, a_3886->bi);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &init_3890));
AM_OUT_AM_STMT_o(self, a_3886->init);
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &args_3891));
{
struct AM_BND_ITER_CALL_3893_frame_struct temp3892_0;
AM_BND_ITER_CALL_3893_frame
noname3894 = &temp3892_0;
noname3894->state = 0;
while (1) {
if (noname3894->state == 0) {
noname3887 = a_3886;
noname3894->arg0 = noname3887;
}
local5 = AM_BND_ITER_CALL_3893(noname3894);
if (noname3894->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local5);
}
}
after_loop: ;
}
void AM_OUT_AM_EXT_CA(AM_OUT self, AM_EXT_CALL_EXPR a_3895) {
AM_EXT_CALL_EXPR noname3896;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
AM_EXPR local5;
if ((a_3895==((AM_EXT_CALL_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_EXT_CALL_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_EXT_CALL_EXPR_3897));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &fun_3898));
OUT_plus_STR(local3, SIG_str_STR(a_3895->fun));
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &args_3899));
{
struct AM_EXT_CALL_EXPR_3901_frame_struct temp3900_0;
AM_EXT_CALL_EXPR_3901_frame
noname3902 = &temp3900_0;
noname3902->state = 0;
while (1) {
if (noname3902->state == 0) {
noname3896 = a_3895;
noname3902->arg0 = noname3896;
}
local5 = AM_EXT_CALL_EXPR_3901(noname3902);
if (noname3902->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, local5);
}
}
after_loop: ;
}
void AM_OUT_AM_VOID_C(AM_OUT self, AM_VOID_CONST a_3903) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
TP local4;
OUT local5;
if ((a_3903==((AM_VOID_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidvoidAM_VOID_));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_VOID_CONST_3904));
if ((a_3903->tp_at==((TP) NULL))) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &void_3905));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
local4 = a_3903->tp_at;
local5 = OUT_plus_STR_OUT(local3, (*TP_str_STR[local4->header.tag+TP_str_STR_offset])(local4));
OUT_plus_STR(local5, ((STR) &name_3906));
}
}
void AM_OUT_AM_ARR_CO(AM_OUT self, AM_ARR_CONST a_3907) {
ARRAYAM_CONST noname3908;
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
AM_CONST local5;
if ((a_3907==((AM_ARR_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ARR_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ARR_CONST_3909));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &elt_tp_3910));
OUT_plus_STR(local3, TP_CLASS_str_STR(a_3907->elt_tp));
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &elts_3911));
{
struct ARRAYAM_CONST_el_frame_struct temp3912_0;
ARRAYAM_CONST_el_frame
noname3913 = &temp3912_0;
noname3913->state = 0;
while (1) {
if (noname3913->state == 0) {
noname3908 = a_3907->elts;
noname3913->arg0 = noname3908;
}
local5 = ARRAYAM_CONST_el(noname3913);
if (noname3913->state == -1) goto after_loop;
AM_OUT_AM_EXPR_o(self, ((AM_EXPR) local5));
}
}
after_loop: ;
}
void AM_OUT_AM_BOOL_C(AM_OUT self, AM_BOOL_CONST a_3914) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3914==((AM_BOOL_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_BOOL_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_BOOL_CONST_3915));
if (a_3914->val_16) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &valtrue));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &valfalse));
}
}
OUT OUT_plus_CHAR_OUT(OUT self, CHAR c_3916) {
OUT noname3917;
c_out_char(c_3916);
return self;
}
void AM_OUT_AM_CHAR_C(AM_OUT self, AM_CHAR_CONST a_3918) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
if ((a_3918==((AM_CHAR_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_CHAR_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_CHAR_CONST_3919));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &bval_3920));
local4 = OUT_plus_CHAR_OUT(local3, a_3918->bval);
OUT_plus_STR(local4, ((STR) &name_3921));
}
void AM_OUT_AM_STR_CO(AM_OUT self, AM_STR_CONST a_3922) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3922==((AM_STR_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_STR_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_STR_CONST_3923));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &bval_3924));
OUT_plus_STR(local3, a_3922->bval);
}
INT FLISTINT_pop_INT(FLISTINT self) {
INT noname3925 = ((INT) 0);
INT r_3926 = ((INT) 0);
INT local0;
INT local1;
local0 = FLISTINT_size_INT(self);
if ((local0==0)) {
return ((INT) 0);
}
r_3926 = FLISTINT_aget_IN(self, (c_INT_minus_INT_INT_chk(self->loc_17,1)));
local1 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
FLISTINT_aset_IN(self, local1, ((INT) 0));
self->loc_17 = (c_INT_minus_INT_INT_chk(self->loc_17,1));
return r_3926;
if (!FLISTINT_invaria(self)) {
fprintf(stderr,"Failed invariant FLIST{INT}::invariant:BOOL ../Library/flist.sa:90:6\n");
exit(16);
}
}
FSTR INTI_str_in_FSTR_3927(INTI self, FSTR s_3928) {
FSTR noname3929;
INTI x;
FLISTINT d = ((FLISTINT) NULL);
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
if ((self->len_37==0)) {
return FSTR_plus_CHAR_FSTR(s_3928, '0');
}
if ((self->len_37<0)) {
s_3928 = FSTR_plus_CHAR_FSTR(s_3928, '-');
}
local0 = INT_abs_INT(self->len_37);
if ((local0==1)) {
local1 = INTI_aget_INT_INT(self, 0);
return INT_str_in_FSTR_FSTR(local1, s_3928);
}
x = INTI_copy_INTI(self);
while (1) {
d = FLISTINT_push_IN(d, INTI_u_mod_INTI_(self, x, shared_INTI_D));
if ((x->len_37==0)) {
goto after_loop;
}
}
after_loop: ;
local2 = FLISTINT_pop_INT(d);
s_3928 = INT_str_in_FSTR_FSTR(local2, s_3928);
while (1) {
local3 = FLISTINT_size_INT(d);
if ((local3>0)) {
}
else {
goto after_loop_3931;
}
local4 = FLISTINT_pop_INT(d);
s_3928 = INT_str_in_FSTR_(local4, s_3928, shared_INTI_log10D, 10, '0');
}
after_loop_3931: ;
return s_3928;
}
void INTI_buf_FSTR(INTI self, FSTR buf_3933) {
shared_INTI_buf = buf_3933;
}
STR INTI_str_STR(INTI self) {
STR noname3934;
FSTR_clear(shared_INTI_buf);
INTI_buf_FSTR(self, INTI_str_in_FSTR_3927(self, shared_INTI_buf));
return FSTR_str_STR(shared_INTI_buf);
}
void OUT_plus_INTI(OUT self, INTI i) {
c_out_str(((INTI_str_STR(i)==NULL)?NULL:INTI_str_STR(i)->arr_part));
}
void AM_OUT_AM_INT_CO(AM_OUT self, AM_INT_CONST a_3935) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3935==((AM_INT_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_INT_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_INT_CONST_3936));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3937));
OUT_plus_INTI(local3, a_3935->val_16);
}
void AM_OUT_AM_INTI_C(AM_OUT self, AM_INTI_CONST a_3938) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3938==((AM_INTI_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_INTI_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_INTI_CONST_3939));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3940));
OUT_plus_STR(local3, INTI_str_STR(a_3938->val_16));
}
STR RAT_str_STR(RAT self) {
STR noname3941;
STR local0;
STR local1;
if (RAT_is_int_BOOL(self)) {
return INTI_str_STR(self.u);
}
local0 = INTI_str_STR(self.u);
local1 = STR_plus_CHAR_STR(local0, '/');
return STR_plus_STR_STR(local1, INTI_str_STR(self.v));
}
void AM_OUT_AM_FLT_CO(AM_OUT self, AM_FLT_CONST a_3942) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3942==((AM_FLT_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_FLT_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_FLT_CONST_3943));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3944));
OUT_plus_STR(local3, RAT_str_STR(a_3942->val_16));
}
void AM_OUT_AM_FLTD_C(AM_OUT self, AM_FLTD_CONST a_3945) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3945==((AM_FLTD_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_FLTD_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_FLTD_CONST_3946));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3947));
OUT_plus_STR(local3, RAT_str_STR(a_3945->val_16));
}
void AM_OUT_AM_FLTX_C(AM_OUT self, AM_FLTX_CONST a_3948) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3948==((AM_FLTX_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_FLTX_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_FLTX_CONST_3949));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3950));
OUT_plus_STR(local3, RAT_str_STR(a_3948->val_16));
}
void AM_OUT_AM_FLTDX_(AM_OUT self, AM_FLTDX_CONST a_3951) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3951==((AM_FLTDX_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_FLTDX_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_FLTDX_CONST_3952));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3953));
OUT_plus_STR(local3, RAT_str_STR(a_3951->val_16));
}
void AM_OUT_AM_FLTI_C(AM_OUT self, AM_FLTI_CONST a_3954) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3954==((AM_FLTI_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_FLTI_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_FLTI_CONST_3955));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &val_3956));
OUT_plus_STR(local3, RAT_str_STR(a_3954->val_16));
}
void AM_OUT_AM_EXPR_o(AM_OUT self, AM_EXPR a_3957) {
OUT local0;
OUT local1;
OUT local2;
if ((a_3957==((AM_EXPR) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_EXPR));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &name_3958));
if (a_3957==NULL) {
} else
switch (a_3957->header.tag) {
case AM_LOCAL_EXPR_tag:
AM_OUT_AM_LOCAL_(self, ((AM_LOCAL_EXPR) a_3957)); break;
case AM_ARRAY_EXPR_tag:
AM_OUT_AM_ARRAY_(self, ((AM_ARRAY_EXPR) a_3957)); break;
case AM_BND_CREATE_EXPR_tag:
AM_OUT_AM_BND_CR(self, ((AM_BND_CREATE_EXPR) a_3957)); break;
case AM_IF_EXPR_tag:
AM_OUT_AM_IF_EXP(self, ((AM_IF_EXPR) a_3957)); break;
case AM_NEW_EXPR_tag:
AM_OUT_AM_NEW_EX(self, ((AM_NEW_EXPR) a_3957)); break;
case AM_IS_VOID_EXPR_tag:
AM_OUT_AM_IS_VOI(self, ((AM_IS_VOID_EXPR) a_3957)); break;
case AM_GLOBAL_EXPR_tag:
AM_OUT_AM_GLOBAL(self, ((AM_GLOBAL_EXPR) a_3957)); break;
case AM_ATTR_EXPR_tag:
AM_OUT_AM_ATTR_E(self, ((AM_ATTR_EXPR) a_3957)); break;
case AM_ARR_EXPR_tag:
AM_OUT_AM_ARR_EX(self, ((AM_ARR_EXPR) a_3957)); break;
case AM_VATTR_ASSIGN_EXPR_tag:
AM_OUT_AM_VATTR_(self, ((AM_VATTR_ASSIGN_EXPR) a_3957)); break;
case AM_VARR_ASSIGN_EXPR_tag:
AM_OUT_AM_VARR_A(self, ((AM_VARR_ASSIGN_EXPR) a_3957)); break;
case AM_EXCEPT_EXPR_tag:
AM_OUT_AM_EXCEPT(self, ((AM_EXCEPT_EXPR) a_3957)); break;
case AM_STMT_EXPR_tag:
AM_OUT_AM_STMT_E(self, ((AM_STMT_EXPR) a_3957)); break;
case AM_ROUT_CALL_EXPR_tag:
AM_OUT_AM_ROUT_C(self, ((AM_ROUT_CALL_EXPR) a_3957)); break;
case AM_ITER_CALL_EXPR_tag:
AM_OUT_AM_ITER_C(self, ((AM_ITER_CALL_EXPR) a_3957)); break;
case AM_BND_ROUT_CALL_tag:
AM_OUT_AM_BND_RO(self, ((AM_BND_ROUT_CALL) a_3957)); break;
case AM_BND_ITER_CALL_tag:
AM_OUT_AM_BND_IT(self, ((AM_BND_ITER_CALL) a_3957)); break;
case AM_EXT_CALL_EXPR_tag:
AM_OUT_AM_EXT_CA(self, ((AM_EXT_CALL_EXPR) a_3957)); break;
case AM_VOID_CONST_tag:
AM_OUT_AM_VOID_C(self, ((AM_VOID_CONST) a_3957)); break;
case AM_ARR_CONST_tag:
AM_OUT_AM_ARR_CO(self, ((AM_ARR_CONST) a_3957)); break;
case AM_BOOL_CONST_tag:
AM_OUT_AM_BOOL_C(self, ((AM_BOOL_CONST) a_3957)); break;
case AM_CHAR_CONST_tag:
AM_OUT_AM_CHAR_C(self, ((AM_CHAR_CONST) a_3957)); break;
case AM_STR_CONST_tag:
AM_OUT_AM_STR_CO(self, ((AM_STR_CONST) a_3957)); break;
case AM_INT_CONST_tag:
AM_OUT_AM_INT_CO(self, ((AM_INT_CONST) a_3957)); break;
case AM_INTI_CONST_tag:
AM_OUT_AM_INTI_C(self, ((AM_INTI_CONST) a_3957)); break;
case AM_FLT_CONST_tag:
AM_OUT_AM_FLT_CO(self, ((AM_FLT_CONST) a_3957)); break;
case AM_FLTD_CONST_tag:
AM_OUT_AM_FLTD_C(self, ((AM_FLTD_CONST) a_3957)); break;
case AM_FLTX_CONST_tag:
AM_OUT_AM_FLTX_C(self, ((AM_FLTX_CONST) a_3957)); break;
case AM_FLTDX_CONST_tag:
AM_OUT_AM_FLTDX_(self, ((AM_FLTDX_CONST) a_3957)); break;
case AM_FLTI_CONST_tag:
AM_OUT_AM_FLTI_C(self, ((AM_FLTI_CONST) a_3957)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./am_out.sa:94:14\n");
exit(16);
}
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &name_3959));
}
void AM_OUT_AM_ASSIGN(AM_OUT self, AM_ASSIGN_STMT a_3960) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
if ((a_3960==((AM_ASSIGN_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ASSIGN_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ASSIGN_STMT_3961));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &dest_3962));
AM_OUT_AM_EXPR_o(self, a_3960->dest);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &src_3963));
AM_OUT_AM_EXPR_o(self, a_3960->src_42);
}
void AM_OUT_AM_IF_STM(AM_OUT self, AM_IF_STMT a_3964) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
if ((a_3964==((AM_IF_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_IF_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_IF_STMT_3965));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_3966));
AM_OUT_AM_EXPR_o(self, a_3964->test_40);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &if_true_3967));
AM_OUT_AM_STMT_o(self, a_3964->if_true);
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &if_false_3968));
AM_OUT_AM_STMT_o(self, a_3964->if_false);
}
void AM_OUT_AM_LOOP_S(AM_OUT self, AM_LOOP_STMT a_3969) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
if ((a_3969==((AM_LOOP_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_LOOP_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_LOOP_STMT_3970));
if (a_3969->has_yield) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &has_yieldtrue));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &has_yieldfalse));
}
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &body_3971));
AM_OUT_AM_STMT_o(self, a_3969->body);
}
void AM_OUT_AM_BREAK_(AM_OUT self, AM_BREAK_STMT a_3972) {
OUT local0;
OUT local1;
if ((a_3972==((AM_BREAK_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_BREAK_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_BREAK_STMT_3973));
}
void AM_OUT_AM_RETURN(AM_OUT self, AM_RETURN_STMT a_3974) {
OUT local0;
OUT local1;
OUT local2;
if ((a_3974==((AM_RETURN_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_RETURN_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_RETURN_STMT_3975));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &val_3976));
AM_OUT_AM_EXPR_o(self, a_3974->val_16);
}
void AM_OUT_AM_YIELD_(AM_OUT self, AM_YIELD_STMT a_3977) {
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
if ((a_3977==((AM_YIELD_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_YIELD_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_YIELD_STMT_3978));
local2 = OUT_create_OUT(((OUT) NULL));
local3 = OUT_plus_STR_OUT(local2, ((STR) &ret_3979));
OUT_plus_INT(local3, a_3977->ret);
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &val_3980));
AM_OUT_AM_EXPR_o(self, a_3977->val_16);
}
INT FLISTFLISTAM_CON(FLISTFLISTAM_CONST self) {
INT noname3981 = ((INT) 0);
if ((self==((FLISTFLISTAM_CONST) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
INT FLISTFLISTAM_CON_3983(FLISTFLISTAM_CONST self) {
INT noname3984 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FLISTAM_CONST FLISTFLISTAM_CON_3985(FLISTFLISTAM_CONST self, INT ind_3986) {
FLISTAM_CONST noname3987;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTFLISTAM_CONST) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3986, 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_3986<0||ind_3986>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3986];
}
FLISTAM_CONST FLISTFLISTAM_CON_3988(FLISTFLISTAM_CONST self, INT ind_3989) {
FLISTAM_CONST noname3990;
BOOL local0;
INT local1;
if ((!((self==((FLISTFLISTAM_CONST) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_3989, 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 FLISTFLISTAM_CON_3985(self, ind_3989);
if (!FLISTFLISTAM_CON_3982(self)) {
fprintf(stderr,"Failed invariant FLIST{FLIST{$AM_CONST}}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
INT FLISTAM_CONST_si(FLISTAM_CONST self) {
INT noname3991 = ((INT) 0);
if ((self==((FLISTAM_CONST) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
INT FLISTAM_CONST_as(FLISTAM_CONST self) {
INT noname3992 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
AM_CONST FLISTAM_CONST_ar(FLISTAM_CONST self, INT ind_3993) {
AM_CONST noname3994;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_CONST) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_3993, 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_3993<0||ind_3993>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_3993];
}
AM_CONST FLISTAM_CONST_ag(FLISTAM_CONST self, INT ind_3995) {
AM_CONST noname3996;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_CONST) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_3995, 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_CONST_ar(self, ind_3995);
if (!FLISTAM_CONST_in(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_CONST}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
void AM_OUT_AM_CONST_(AM_OUT self, AM_CONST a_3997) {
OUT local0;
OUT local1;
OUT local2;
if ((a_3997==((AM_CONST) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_CONST));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &name_3998));
if (a_3997==NULL) {
} else
switch (a_3997->header.tag) {
case AM_VOID_CONST_tag:
AM_OUT_AM_VOID_C(self, ((AM_VOID_CONST) a_3997)); break;
case AM_ARR_CONST_tag:
AM_OUT_AM_ARR_CO(self, ((AM_ARR_CONST) a_3997)); break;
case AM_BOOL_CONST_tag:
AM_OUT_AM_BOOL_C(self, ((AM_BOOL_CONST) a_3997)); break;
case AM_CHAR_CONST_tag:
AM_OUT_AM_CHAR_C(self, ((AM_CHAR_CONST) a_3997)); break;
case AM_STR_CONST_tag:
AM_OUT_AM_STR_CO(self, ((AM_STR_CONST) a_3997)); break;
case AM_INT_CONST_tag:
AM_OUT_AM_INT_CO(self, ((AM_INT_CONST) a_3997)); break;
case AM_INTI_CONST_tag:
AM_OUT_AM_INTI_C(self, ((AM_INTI_CONST) a_3997)); break;
case AM_FLT_CONST_tag:
AM_OUT_AM_FLT_CO(self, ((AM_FLT_CONST) a_3997)); break;
case AM_FLTD_CONST_tag:
AM_OUT_AM_FLTD_C(self, ((AM_FLTD_CONST) a_3997)); break;
case AM_FLTX_CONST_tag:
AM_OUT_AM_FLTX_C(self, ((AM_FLTX_CONST) a_3997)); break;
case AM_FLTDX_CONST_tag:
AM_OUT_AM_FLTDX_(self, ((AM_FLTDX_CONST) a_3997)); break;
case AM_FLTI_CONST_tag:
AM_OUT_AM_FLTI_C(self, ((AM_FLTI_CONST) a_3997)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./am_out.sa:141:14\n");
exit(16);
}
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &name_3999));
}
INT FLISTAM_STMT_asi(FLISTAM_STMT self) {
INT noname4000 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
AM_STMT FLISTAM_STMT_are(FLISTAM_STMT self, INT ind_4001) {
AM_STMT noname4002;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_STMT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4001, 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_4001<0||ind_4001>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4001];
}
AM_STMT FLISTAM_STMT_age(FLISTAM_STMT self, INT ind_4003) {
AM_STMT noname4004;
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_STMT) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_4003, 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_STMT_are(self, ind_4003);
if (!FLISTAM_STMT_inv(self)) {
fprintf(stderr,"Failed invariant FLIST{$AM_STMT}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
void AM_OUT_AM_CASE_S(AM_OUT self, AM_CASE_STMT a_4005) {
INT i = ((INT) 0);
INT j = ((INT) 0);
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
FLISTAM_CONST local5;
OUT local6;
OUT local7;
OUT local8;
if ((a_4005==((AM_CASE_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_CASE_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_CASE_STMT_4006));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_4007));
AM_OUT_AM_EXPR_o(self, a_4005->test_40);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &branches));
i = 0;
while (1) {
if ((i<FLISTFLISTAM_CON(a_4005->tgts))) {
}
else {
goto after_loop;
}
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &name_4009));
j = 0;
while (1) {
if ((j<FLISTAM_CONST_si(FLISTFLISTAM_CON_3988(a_4005->tgts, i)))) {
}
else {
goto after_loop_4010;
}
local5 = FLISTFLISTAM_CON_3988(a_4005->tgts, i);
AM_OUT_AM_CONST_(self, FLISTAM_CONST_ag(local5, j));
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &name_4012));
j = (c_INT_plus_INT_INT_chk(j,1));
}
after_loop_4010: ;
AM_OUT_AM_STMT_o(self, FLISTAM_STMT_age(a_4005->stmts, i));
local7 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local7, ((STR) &name_4013));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &else_stmts_4014));
AM_OUT_AM_STMT_o(self, a_4005->else_stmts);
}
INT FLISTTP_size_INT(FLISTTP self) {
INT noname4015 = ((INT) 0);
if ((self==((FLISTTP) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
INT FLISTTP_asize_INT(FLISTTP self) {
INT noname4016 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
TP FLISTTP_aref_age(FLISTTP self, INT ind_4017) {
TP noname4018;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTTP) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4017, 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_4017<0||ind_4017>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4017];
}
TP FLISTTP_aget_INT_TP(FLISTTP self, INT ind_4019) {
TP noname4020;
BOOL local0;
INT local1;
if ((!((self==((FLISTTP) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_4019, 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 FLISTTP_aref_age(self, ind_4019);
if (!FLISTTP_invarian(self)) {
fprintf(stderr,"Failed invariant FLIST{$TP}::invariant:BOOL ../Library/flist.sa:68:7\n");
exit(16);
}
}
void AM_OUT_AM_TYPECA(AM_OUT self, AM_TYPECASE_STMT a_4021) {
INT i = ((INT) 0);
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
TP local6;
OUT local7;
OUT local8;
OUT local9;
if ((a_4021==((AM_TYPECASE_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_TYPECASE_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_TYPECASE_STMT_4022));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_4023));
AM_OUT_AM_LOCAL_(self, a_4021->test_40);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &branches_4024));
i = 0;
while (1) {
if ((i<FLISTTP_size_INT(a_4021->tgts))) {
}
else {
goto after_loop;
}
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &name_4026));
local5 = OUT_create_OUT(((OUT) NULL));
local6 = FLISTTP_aget_INT_TP(a_4021->tgts, i);
local7 = OUT_plus_STR_OUT(local5, (*TP_str_STR[local6->header.tag+TP_str_STR_offset])(local6));
OUT_plus_STR(local7, ((STR) &name_4027));
AM_OUT_AM_STMT_o(self, FLISTAM_STMT_age(a_4021->stmts, i));
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &name_4028));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
local9 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local9, ((STR) &else_stmts_4029));
AM_OUT_AM_STMT_o(self, a_4021->else_stmts);
}
void AM_OUT_AM_PRE_ST(AM_OUT self, AM_PRE_STMT a_4030) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4030==((AM_PRE_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_PRE_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_PRE_STMT_4031));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_4032));
AM_OUT_AM_EXPR_o(self, a_4030->test_40);
}
void AM_OUT_AM_POST_S(AM_OUT self, AM_POST_STMT a_4033) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4033==((AM_POST_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_POST_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_POST_STMT_4034));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_4035));
AM_OUT_AM_EXPR_o(self, a_4033->test_40);
}
void AM_OUT_AM_INITIA(AM_OUT self, AM_INITIAL_STMT a_4036) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4036==((AM_INITIAL_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_INITIAL_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_INITIAL_STMT_4037));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &stmts_4038));
AM_OUT_AM_STMT_o(self, a_4036->stmts);
}
void AM_OUT_AM_ASSERT(AM_OUT self, AM_ASSERT_STMT a_4039) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4039==((AM_ASSERT_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ASSERT_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ASSERT_STMT_4040));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &test_4041));
AM_OUT_AM_EXPR_o(self, a_4039->test_40);
}
void AM_OUT_AM_INVARI(AM_OUT self, AM_INVARIANT_STMT a_4042) {
OUT local0;
OUT local1;
if ((a_4042==((AM_INVARIANT_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_INVARIANT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_INVARIANT_STM_4043));
}
void AM_OUT_AM_PROTEC(AM_OUT self, AM_PROTECT_STMT a_4044) {
INT i = ((INT) 0);
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
TP local6;
OUT local7;
OUT local8;
OUT local9;
if ((a_4044==((AM_PROTECT_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_PROTECT_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_PROTECT_STMT_4045));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &body_4046));
AM_OUT_AM_STMT_o(self, a_4044->body);
local3 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local3, ((STR) &branches_4047));
i = 0;
while (1) {
if ((i<FLISTTP_size_INT(a_4044->tgts))) {
}
else {
goto after_loop;
}
local4 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local4, ((STR) &name_4049));
local5 = OUT_create_OUT(((OUT) NULL));
local6 = FLISTTP_aget_INT_TP(a_4044->tgts, i);
local7 = OUT_plus_STR_OUT(local5, (*TP_str_STR[local6->header.tag+TP_str_STR_offset])(local6));
OUT_plus_STR(local7, ((STR) &name_4050));
AM_OUT_AM_STMT_o(self, FLISTAM_STMT_age(a_4044->stmts, i));
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &name_4051));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
local9 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local9, ((STR) &else_stmts_4052));
AM_OUT_AM_STMT_o(self, a_4044->else_stmts);
}
void AM_OUT_AM_RAISE_(AM_OUT self, AM_RAISE_STMT a_4053) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4053==((AM_RAISE_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_RAISE_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_RAISE_STMT_4054));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &val_4055));
AM_OUT_AM_EXPR_o(self, a_4053->val_16);
}
void AM_OUT_AM_EXPR_S(AM_OUT self, AM_EXPR_STMT a_4056) {
OUT local0;
OUT local1;
OUT local2;
if ((a_4056==((AM_EXPR_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_EXPR_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_EXPR_STMT_4057));
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &expr_4058));
AM_OUT_AM_EXPR_o(self, a_4056->expr);
}
void AM_OUT_AM_STMT_o(AM_OUT self, AM_STMT a_4059) {
OUT local0;
OUT local1;
OUT local2;
AM_STMT local3;
AM_STMT local4;
if ((a_4059==((AM_STMT) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_STMT));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &name_4060));
if (a_4059==NULL) {
} else
switch (a_4059->header.tag) {
case AM_ASSIGN_STMT_tag:
AM_OUT_AM_ASSIGN(self, ((AM_ASSIGN_STMT) a_4059)); break;
case AM_IF_STMT_tag:
AM_OUT_AM_IF_STM(self, ((AM_IF_STMT) a_4059)); break;
case AM_LOOP_STMT_tag:
AM_OUT_AM_LOOP_S(self, ((AM_LOOP_STMT) a_4059)); break;
case AM_BREAK_STMT_tag:
AM_OUT_AM_BREAK_(self, ((AM_BREAK_STMT) a_4059)); break;
case AM_RETURN_STMT_tag:
AM_OUT_AM_RETURN(self, ((AM_RETURN_STMT) a_4059)); break;
case AM_YIELD_STMT_tag:
AM_OUT_AM_YIELD_(self, ((AM_YIELD_STMT) a_4059)); break;
case AM_CASE_STMT_tag:
AM_OUT_AM_CASE_S(self, ((AM_CASE_STMT) a_4059)); break;
case AM_TYPECASE_STMT_tag:
AM_OUT_AM_TYPECA(self, ((AM_TYPECASE_STMT) a_4059)); break;
case AM_PRE_STMT_tag:
AM_OUT_AM_PRE_ST(self, ((AM_PRE_STMT) a_4059)); break;
case AM_POST_STMT_tag:
AM_OUT_AM_POST_S(self, ((AM_POST_STMT) a_4059)); break;
case AM_INITIAL_STMT_tag:
AM_OUT_AM_INITIA(self, ((AM_INITIAL_STMT) a_4059)); break;
case AM_ASSERT_STMT_tag:
AM_OUT_AM_ASSERT(self, ((AM_ASSERT_STMT) a_4059)); break;
case AM_INVARIANT_STMT_tag:
AM_OUT_AM_INVARI(self, ((AM_INVARIANT_STMT) a_4059)); break;
case AM_PROTECT_STMT_tag:
AM_OUT_AM_PROTEC(self, ((AM_PROTECT_STMT) a_4059)); break;
case AM_RAISE_STMT_tag:
AM_OUT_AM_RAISE_(self, ((AM_RAISE_STMT) a_4059)); break;
case AM_EXPR_STMT_tag:
AM_OUT_AM_EXPR_S(self, ((AM_EXPR_STMT) a_4059)); break;
default: ;
fprintf(stderr,"No applicable type in typecase ./am_out.sa:69:14\n");
exit(16);
}
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &name_4061));
local3 = a_4059;
if ((!(((*AM_STMT_next_AM_STMT[local3->header.tag+AM_STMT_next_AM_STMT_offset])(local3)==((AM_STMT) NULL))))) {
local4 = a_4059;
AM_OUT_AM_STMT_o(self, (*AM_STMT_next_AM_STMT[local4->header.tag+AM_STMT_next_AM_STMT_offset])(local4));
}
}
void AM_OUT_AM_ROUT_D(AM_OUT self, AM_ROUT_DEF a_4062) {
INT i = ((INT) 0);
INT i_4063 = ((INT) 0);
OUT local0;
OUT local1;
OUT local2;
OUT local3;
OUT local4;
OUT local5;
OUT local6;
INT local7;
OUT local8;
OUT local9;
OUT local10;
OUT local11;
OUT local12;
OUT local13;
OUT local14;
OUT local15;
OUT local16;
OUT local17;
if ((a_4062==((AM_ROUT_DEF) NULL))) {
local0 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local0, ((STR) &voidAM_ROUT_DEF));
return;
}
local1 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local1, ((STR) &AM_ROUT_DEF_4064));
if ((a_4062->sig_6==((SIG) NULL))) {
local2 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local2, ((STR) &voidsig));
}
else {
local3 = OUT_create_OUT(((OUT) NULL));
local4 = OUT_plus_STR_OUT(local3, ((STR) &sig_4065));
local5 = OUT_plus_STR_OUT(local4, SIG_str_STR(a_4062->sig_6));
OUT_plus_STR(local5, ((STR) &name_4066));
}
if (a_4062->is_abstract) {
local6 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local6, ((STR) &isabstract));
return;
}
local7 = AM_ROUT_DEF_size_INT(a_4062);
if ((local7>1)) {
local8 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local8, ((STR) &args_4067));
i = 1;
while (1) {
if ((i<(a_4062->asize))) {
}
else {
goto after_loop;
}
AM_OUT_AM_LOCAL_(self, AM_ROUT_DEF_aget(a_4062, i));
local9 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local9, ((STR) &name_4069));
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
local10 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local10, ((STR) &name_4070));
}
if ((a_4062->locals_57==((FLISTAM_LOCAL_EXPR) NULL))) {
local11 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local11, ((STR) &voidlocals));
}
else {
local12 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local12, ((STR) &locals_4071));
i_4063 = 0;
while (1) {
if ((i_4063<FLISTAM_LOCAL_EX(a_4062->locals_57))) {
}
else {
goto after_loop_4072;
}
AM_OUT_AM_LOCAL_(self, FLISTAM_LOCAL_EX_3775(a_4062->locals_57, i_4063));
local13 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local13, ((STR) &name_4074));
i_4063 = (c_INT_plus_INT_INT_chk(i_4063,1));
}
after_loop_4072: ;
local14 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local14, ((STR) &name_4075));
}
if ((a_4062->code_56==((AM_STMT) NULL))) {
local15 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local15, ((STR) &voidcode));
}
else {
local16 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local16, ((STR) &code_4076));
AM_OUT_AM_STMT_o(self, a_4062->code_56);
}
local17 = OUT_create_OUT(((OUT) NULL));
OUT_plus_STR(local17, ((STR) &name_4077));
}
void OUT_plus_CHAR(OUT self, CHAR c_4078) {
c_out_char(c_4078);
}
INT FLISTAM_ROUT_DEF_4079(FLISTAM_ROUT_DEF self) {
INT noname4080 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT FLISTAM_ROUT_DEF_4081(FLISTAM_ROUT_DEF self) {
INT noname4082 = ((INT) 0);
if ((self==((FLISTAM_ROUT_DEF) NULL))) {
return 0;
}
return self->loc_17;
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:50:7\n");
exit(16);
}
}
BOOL FLISTAM_ROUT_DEF_4083(FLISTAM_ROUT_DEF self) {
BOOL noname4084 = ((BOOL) 0);
INT local0;
local0 = FLISTAM_ROUT_DEF_4081(self);
return (local0==0);
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:113:11\n");
exit(16);
}
}
void FLISTAM_ROUT_DEF_4085(FLISTAM_ROUT_DEF self) {
AM_ROUT_DEF nil = ((AM_ROUT_DEF) NULL);
FLISTAM_ROUT_DEF noname4086;
if (!((!((self==((FLISTAM_ROUT_DEF) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/aref.sa:43:9\n");
exit(16);
}
{
struct FLISTAM_ROUT_DEF_4088_frame_struct temp4087_0;
FLISTAM_ROUT_DEF_4088_frame
noname4089 = &temp4087_0;
noname4089->state = 0;
while (1) {
if (noname4089->state == 0) {
noname4086 = self;
noname4089->arg0 = noname4086;
}
noname4089->arg1 = nil;
FLISTAM_ROUT_DEF_4088(noname4089);
if (noname4089->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
void FLISTAM_ROUT_DEF_4090(FLISTAM_ROUT_DEF self) {
if (FLISTAM_ROUT_DEF_4083(self)) {
return;
}
else {
FLISTAM_ROUT_DEF_4085(self);
self->loc_17 = 0;
}
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:117:8\n");
exit(16);
}
}
void FLISTAM_ROUT_DEF_4091(FLISTAM_ROUT_DEF self, INT ind_4092, AM_ROUT_DEF val_4093) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FLISTAM_ROUT_DEF) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4092, 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_4092<0||ind_4092>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_4092] = val_4093;
}
void FLISTAM_ROUT_DEF_4094(FLISTAM_ROUT_DEF self, INT ind_4095, AM_ROUT_DEF val_4096) {
BOOL local0;
INT local1;
if ((!((self==((FLISTAM_ROUT_DEF) NULL))))) {
local1 = 0;
local0 = INT_is_bet_INT_I(ind_4095, 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_ROUT_DEF_4091(self, ind_4095, val_4096);
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:73:7\n");
exit(16);
}
}
FLISTAM_ROUT_DEF FLISTAM_ROUT_DEF_4097(FLISTAM_ROUT_DEF self, AM_ROUT_DEF e_4098) {
FLISTAM_ROUT_DEF noname4099;
FLISTAM_ROUT_DEF r_4100 = ((FLISTAM_ROUT_DEF) NULL);
FLISTAM_ROUT_DEF noname4101;
FLISTAM_ROUT_DEF noname4102;
FLISTAM_ROUT_DEF local0;
INT local1;
FLISTAM_ROUT_DEF local2;
INT local3;
AM_ROUT_DEF local4;
INT local5;
if ((self==((FLISTAM_ROUT_DEF) NULL))) {
local0 = ((FLISTAM_ROUT_DEF) sbi_arr_alloc(sizeof(struct FLISTAM_ROUT_DEF_struct), FLISTAM_ROUT_DEF_tag, sizeof(AM_ROUT_DEF) , 5));
local0->asize = 5;
r_4100 = local0;
}
else {
local1 = self->loc_17;
if ((local1<(self->asize))) {
r_4100 = self;
}
else {
local3 = 2;
local2 = ((FLISTAM_ROUT_DEF) sbi_arr_alloc(sizeof(struct FLISTAM_ROUT_DEF_struct), FLISTAM_ROUT_DEF_tag, sizeof(AM_ROUT_DEF) , (c_INT_times_INT_INT_chk(local3,(self->asize)))));
local2->asize = (c_INT_times_INT_INT_chk(local3,(self->asize)));
r_4100 = local2;
r_4100->loc_17 = self->loc_17;
{
struct FLISTAM_ROUT_DEF_4104_frame_struct temp4103_0;
FLISTAM_ROUT_DEF_4104_frame
noname4105 = &temp4103_0;
struct FLISTAM_ROUT_DEF_4088_frame_struct temp4103_1;
FLISTAM_ROUT_DEF_4088_frame
noname4106 = &temp4103_1;
noname4105->state = 0;
noname4106->state = 0;
while (1) {
if (noname4106->state == 0) {
noname4102 = r_4100;
noname4106->arg0 = noname4102;
}
if (noname4105->state == 0) {
noname4101 = self;
noname4105->arg0 = noname4101;
}
local4 = FLISTAM_ROUT_DEF_4104(noname4105);
if (noname4105->state == -1) goto after_loop;
noname4106->arg1 = local4;
FLISTAM_ROUT_DEF_4088(noname4106);
if (noname4106->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
FLISTAM_ROUT_DEF_4090(self);
}
}
r_4100->loc_17 = (c_INT_plus_INT_INT_chk(r_4100->loc_17,1));
local5 = (c_INT_minus_INT_INT_chk(r_4100->loc_17,1));
FLISTAM_ROUT_DEF_4094(r_4100, local5, e_4098);
return r_4100;
if (!FLISTAM_ROUT_DEF_1041(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ROUT_DEF}::invariant:BOOL ../Library/flist.sa:79:7\n");
exit(16);
}
}
BOOL INLINE_TBL_query_4107(INLINE_TBL self, SIG s_4108, INLINE in_4109) {
BOOL noname4110 = ((BOOL) 0);
INLINE local0;
SIG local1;
if ((in_4109==((INLINE) NULL))) {
return FALSE;
}
local0 = in_4109;
local1 = (*INLINE_sig_SIG[local0->header.tag+INLINE_sig_SIG_offset])(local0);
return SIG_is_eq_SIG_BOOL(local1, s_4108);
if (!INLINE_TBL_invar(self)) {
fprintf(stderr,"Failed invariant INLINE_TBL::invariant:BOOL ./inline.sa:310:13\n");
exit(16);
}
}
INLINE INLINE_TBL_get_q(INLINE_TBL self, SIG q) {
INLINE noname4111;
INT h = ((INT) 0);
INLINE e_4112;
INLINE e_4113;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((INLINE_TBL) NULL))) {
return ((INLINE) NULL);
}
local0 = INLINE_TBL_query(self, q);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
e_4112 = INLINE_TBL_aget_(self, h);
if (INLINE_TBL_query_4107(self, q, e_4112)) {
return e_4112;
}
else {
if (INLINE_TBL_elt_e(self, e_4112, INLINE_TBL_elt_n(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) {
e_4113 = INLINE_TBL_aget_(self, h);
if (INLINE_TBL_query_4107(self, q, e_4113)) {
return e_4113;
}
else {
if (INLINE_TBL_elt_e(self, e_4113, INLINE_TBL_elt_n(self))) {
goto after_loop_4115;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4115: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fqset.sa:142:15\n");
exit(16);
}
}
return INLINE_TBL_elt_n(self);
if (!INLINE_TBL_invar(self)) {
fprintf(stderr,"Failed invariant INLINE_TBL::invariant:BOOL ../Library/fqset.sa:128:12\n");
exit(16);
}
}
BOOL BE_inlined_SIG_BOOL(BE self, SIG s_4117) {
BOOL noname4118 = ((BOOL) 0);
INLINE inl;
inl = INLINE_TBL_get_q(self->prog->prog_am_generate->inline_tbl, s_4117);
return (!((inl==((INLINE) NULL))));
}
SIG FMAPSIGAM_ROUT_D_4119(FMAPSIGAM_ROUT_DEF self) {
SIG noname4120;
SIG k = ((SIG) NULL);
return ((SIG) NULL);
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:54:10\n");
exit(16);
}
}
TUPSIGAM_ROUT_DEF TUPSIGAM_ROUT_DE(TUPSIGAM_ROUT_DEF self, SIG t1_4121) {
TUPSIGAM_ROUT_DEF local0;
local0 = self;
local0.t1 = t1_4121;
return local0;
}
TUPSIGAM_ROUT_DEF TUPSIGAM_ROUT_DE_4122(TUPSIGAM_ROUT_DEF self, AM_ROUT_DEF t2_4123) {
TUPSIGAM_ROUT_DEF local0;
local0 = self;
local0.t2 = t2_4123;
return local0;
}
TUPSIGAM_ROUT_DEF TUPSIGAM_ROUT_DE_4124(TUPSIGAM_ROUT_DEF self, SIG at1, AM_ROUT_DEF at2) {
TUPSIGAM_ROUT_DEF noname4125 = TUPSIGAM_ROUT_DEF_zero;
TUPSIGAM_ROUT_DEF local0;
local0 = TUPSIGAM_ROUT_DE(self, at1);
return TUPSIGAM_ROUT_DE_4122(local0, at2);
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4126(FMAPSIGAM_ROUT_DEF self, INT n_4127) {
FMAPSIGAM_ROUT_DEF noname4128;
FMAPSIGAM_ROUT_DEF r_4129;
FMAPSIGAM_ROUT_DEF noname4130;
FMAPSIGAM_ROUT_DEF local0;
TUPSIGAM_ROUT_DEF local1;
SIG local2;
local0 = ((FMAPSIGAM_ROUT_DEF) sbi_arr_alloc(sizeof(struct FMAPSIGAM_ROUT_DEF_struct), FMAPSIGAM_ROUT_DEF_tag, sizeof(TUPSIGAM_ROUT_DEF) , n_4127));
local0->asize = n_4127;
r_4129 = local0;
if ((!((FMAPSIGAM_ROUT_D_4119(self)==((SIG) NULL))))) {
{
struct FMAPSIGAM_ROUT_D_4132_frame_struct temp4131_0;
FMAPSIGAM_ROUT_D_4132_frame
noname4133 = &temp4131_0;
noname4133->state = 0;
while (1) {
if (noname4133->state == 0) {
noname4130 = r_4129;
noname4133->arg0 = noname4130;
}
local1 = TUPSIGAM_ROUT_DEF_zero;
local2 = FMAPSIGAM_ROUT_D_4119(self);
noname4133->arg1 = TUPSIGAM_ROUT_DE_4124(local1, local2, ((AM_ROUT_DEF) NULL));
FMAPSIGAM_ROUT_D_4132(noname4133);
if (noname4133->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_4129;
}
INT FMAPSIGAM_ROUT_D_4134(FMAPSIGAM_ROUT_DEF self) {
INT noname4135 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4136(FMAPSIGAM_ROUT_DEF self, TUPSIGAM_ROUT_DEF p) {
FMAPSIGAM_ROUT_DEF noname4137;
return FMAPSIGAM_ROUT_D_4138(self, p.t1, p.t2);
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4139(FMAPSIGAM_ROUT_DEF self) {
FMAPSIGAM_ROUT_DEF noname4140;
INT ns = ((INT) 0);
FMAPSIGAM_ROUT_DEF r_4141;
FMAPSIGAM_ROUT_DEF noname4142;
INT local0;
INT local1;
INT local2;
TUPSIGAM_ROUT_DEF local3;
if (!((!((self==((FMAPSIGAM_ROUT_DEF) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_4141 = FMAPSIGAM_ROUT_D_4126(self, ns);
{
struct FMAPSIGAM_ROUT_D_4144_frame_struct temp4143_0;
FMAPSIGAM_ROUT_D_4144_frame
noname4145 = &temp4143_0;
noname4145->state = 0;
while (1) {
if (noname4145->state == 0) {
noname4142 = self;
noname4145->arg0 = noname4142;
}
local3 = FMAPSIGAM_ROUT_D_4144(noname4145);
if (noname4145->state == -1) goto after_loop;
r_4141 = FMAPSIGAM_ROUT_D_4136(r_4141, local3);
}
}
after_loop: ;
return r_4141;
}
INT FMAPSIGAM_ROUT_D_4146(FMAPSIGAM_ROUT_DEF self, SIG k) {
INT noname4147 = ((INT) 0);
return (c_SYS_id_OB_INT(((SYS) NULL),((OB) k)));
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
TUPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4148(FMAPSIGAM_ROUT_DEF self, INT ind_4149) {
TUPSIGAM_ROUT_DEF noname4150 = TUPSIGAM_ROUT_DEF_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSIGAM_ROUT_DEF) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4149, 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_4149<0||ind_4149>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4149];
}
BOOL FMAPSIGAM_ROUT_D_4151(FMAPSIGAM_ROUT_DEF self, SIG k1, SIG k2) {
BOOL noname4152 = ((BOOL) 0);
return SIG_is_eq_SIG_BOOL(k1, k2);
return c_SYS_ob_eq_OB_OB_BOOL(((OB) k1),((OB) k2));
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
void FMAPSIGAM_ROUT_D_4153(FMAPSIGAM_ROUT_DEF self, INT ind_4154, TUPSIGAM_ROUT_DEF val_4155) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPSIGAM_ROUT_DEF) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4154, 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_4154<0||ind_4154>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_4154] = val_4155;
}
FMAPSIGAM_ROUT_DEF FMAPSIGAM_ROUT_D_4138(FMAPSIGAM_ROUT_DEF self, SIG k, AM_ROUT_DEF t_4156) {
FMAPSIGAM_ROUT_DEF noname4157;
FMAPSIGAM_ROUT_DEF r_4158;
INT h = ((INT) 0);
INT asm_4159 = ((INT) 0);
SIG tk;
SIG tk_4160;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_4158 = self;
if ((r_4158==((FMAPSIGAM_ROUT_DEF) NULL))) {
r_4158 = FMAPSIGAM_ROUT_D_4126(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_4158 = FMAPSIGAM_ROUT_D_4139(self);
}
}
local2 = FMAPSIGAM_ROUT_D_4146(r_4158, k);
local3 = (r_4158->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_4158->asize);
asm_4159 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(r_4158, h)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk, FMAPSIGAM_ROUT_D_4119(self))) {
goto after_loop;
}
if (FMAPSIGAM_ROUT_D_4151(self, tk, k)) {
FMAPSIGAM_ROUT_D_4153(r_4158, h, TUPSIGAM_ROUT_DE_4124(TUPSIGAM_ROUT_DEF_zero, k, t_4156));
return r_4158;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_4159)) {
h = 0;
while (1) {
tk_4160 = (TUPSIGAM_ROUT_DEF_blob=FMAPSIGAM_ROUT_D_4148(r_4158, h)).t1;
if (FMAPSIGAM_ROUT_D_4151(self, tk_4160, FMAPSIGAM_ROUT_D_4119(self))) {
goto after_loop_4162;
}
if (FMAPSIGAM_ROUT_D_4151(self, tk_4160, k)) {
FMAPSIGAM_ROUT_D_4153(r_4158, h, TUPSIGAM_ROUT_DE_4124(TUPSIGAM_ROUT_DEF_zero, k, t_4156));
return r_4158;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4162: ;
if (!((h!=asm_4159))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPSIGAM_ROUT_D_4153(r_4158, h, TUPSIGAM_ROUT_DE_4124(TUPSIGAM_ROUT_DEF_zero, k, t_4156));
r_4158->hsize = (c_INT_plus_INT_INT_chk(r_4158->hsize,1));
return r_4158;
if (!FMAPSIGAM_ROUT_D_1046(self)) {
fprintf(stderr,"Failed invariant FMAP{SIG,AM_ROUT_DEF}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
FSETOB FSETOB_create_FSETOB(FSETOB self) {
FSETOB noname4164;
return ((FSETOB) NULL);
if (!FSETOB_invariant(self)) {
fprintf(stderr,"Failed invariant FSET{$OB}::invariant:BOOL ../Library/fset.sa:73:9\n");
exit(16);
}
}
void BE_start_mangling(BE self) {
self->thisrout = FSETOB_create_FSETOB(((FSETOB) NULL));
self->local_counter = 0;
}
BOOL OPTIONS_pre_chk_(OPTIONS self, STR n_4165) {
BOOL noname4166 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->pre_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->pre_in, n_4165);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->pre_out, n_4165)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_post_chk(OPTIONS self, STR n_4167) {
BOOL noname4168 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->post_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->post_in, n_4167);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->post_out, n_4167)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_invarian(OPTIONS self, STR n_4169) {
BOOL noname4170 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->invariant_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->invariant_in, n_4169);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->invariant_out, n_4169)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_assert_c(OPTIONS self, STR n_4171) {
BOOL noname4172 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->assert_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->assert_in, n_4171);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->assert_out, n_4171)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_arith_ch(OPTIONS self, STR n_4173) {
BOOL noname4174 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->arith_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->arith_in, n_4173);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->arith_out, n_4173)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_bounds_c(OPTIONS self, STR n_4175) {
BOOL noname4176 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->bounds_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->bounds_in, n_4175);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->bounds_out, n_4175)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_void_chk(OPTIONS self, STR n_4177) {
BOOL noname4178 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->void_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->void_in, n_4177);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->void_out, n_4177)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_when_chk(OPTIONS self, STR n_4179) {
BOOL noname4180 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->when_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->when_in, n_4179);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->when_out, n_4179)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_return_c(OPTIONS self, STR n_4181) {
BOOL noname4182 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->return_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->return_in, n_4181);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->return_out, n_4181)));
} else {
local0 = FALSE;
}
return local0;
}
BOOL OPTIONS_destroy_(OPTIONS self, STR n_4183) {
BOOL noname4184 = ((BOOL) 0);
BOOL local0;
BOOL local1;
if (self->destroy_all) {
local1 = TRUE;
} else {
local1 = FSETSTR_test_STR(self->destroy_in, n_4183);
}
if (local1) {
local0 = (!(FSETSTR_test_STR(self->destroy_out, n_4183)));
} else {
local0 = FALSE;
}
return local0;
}
void BE_set_chks(BE self) {
STR n_4185;
TP local0;
local0 = self->current_function->tp;
n_4185 = (*TP_str_STR[local0->header.tag+TP_str_STR_offset])(local0);
self->chk_pre = OPTIONS_pre_chk_(self->prog->options_55, n_4185);
self->chk_post = OPTIONS_post_chk(self->prog->options_55, n_4185);
self->chk_invariant = OPTIONS_invarian(self->prog->options_55, n_4185);
self->chk_assert = OPTIONS_assert_c(self->prog->options_55, n_4185);
self->chk_arith = OPTIONS_arith_ch(self->prog->options_55, n_4185);
self->chk_bounds = OPTIONS_bounds_c(self->prog->options_55, n_4185);
self->chk_void = OPTIONS_void_chk(self->prog->options_55, n_4185);
self->chk_when = OPTIONS_when_chk(self->prog->options_55, n_4185);
self->chk_return = OPTIONS_return_c(self->prog->options_55, n_4185);
self->chk_destroy = OPTIONS_destroy_(self->prog->options_55, n_4185);
}
BOOL SIG_is_iter_BOOL(SIG self) {
BOOL noname4186 = ((BOOL) 0);
return IDENT_is_iter_BOOL(self->name_19);
}
FLISTAM_ITER_CAL FLISTAM_ITER_CAL_4187(FLISTAM_ITER_CAL self, INT n_4188) {
FLISTAM_ITER_CAL noname4189;
FLISTAM_ITER_CAL local0;
if (!((n_4188>=1))) {
fprintf(stderr,"Violation of precondition ../Library/flist.sa:57:9\n");
exit(16);
}
local0 = ((FLISTAM_ITER_CAL) sbi_arr_alloc(sizeof(struct FLISTAM_ITER_CAL_struct), FLISTAM_ITER_CAL_tag, sizeof(AM_ITER_CALL_EXPR) , n_4188));
local0->asize = n_4188;
return local0;
if (!FLISTAM_ITER_CAL_4190(self)) {
fprintf(stderr,"Failed invariant FLIST{AM_ITER_CALL_EXPR}::invariant:BOOL ../Library/flist.sa:57:9\n");
exit(16);
}
}
void BE_setup_routine(BE self, AM_ROUT_DEF func) {
self->current_function = func->sig_6;
BE_set_chks(self);
self->current_function_str = SIG_str_STR(func->sig_6);
if (SIG_is_iter_BOOL(func->sig_6)) {
self->nested_its = FLISTAM_ITER_CAL_4187(((FLISTAM_ITER_CAL) NULL), 5);
}
else {
self->nested_its = ((FLISTAM_ITER_CAL) NULL);
}
self->routine_code = FSTR_create_FSTR(((FSTR) NULL));
}
STR BE_eol_STR(BE self) {
STR noname4191;
if (self->prog->options_55->debug_11) {
return ((STR) &name_4192);
}
return ((STR) &name_4193);
}
void BE_newline(BE self) {
INT noname4194 = ((INT) 0);
FILE_20 local0;
INT local1;
INT noname4196t;
local0 = self->code_c;
(fwrite(BE_eol_STR(self)->arr_part,BE_eol_STR(self)->asize,1,local0->fp));
{
BOOL noname4196 = TRUE;
while (1) {
if (noname4196) {
noname4196 = FALSE;
noname4194 = self->indent;
local1 = noname4194;
noname4196t = local1;
} else {
noname4196t--;
}
if (noname4196t<=0) goto after_loop;
0 /* no return value from inlined iter */;
FILE_plus_CHAR(self->code_c, ' ');
}
}
after_loop: ;
}
BOOL AM_ROUT_DEF_is_i(AM_ROUT_DEF self) {
BOOL noname4197 = ((BOOL) 0);
return SIG_is_iter_BOOL(self->sig_6);
}
void BE_remangle_OB_STR(BE self, OB ob_4198, STR s_4199) {
STR x;
BOOL local0;
x = FMAPOBSTR_get_OB_STR(self->manglemap, ob_4198);
if ((x==((STR) NULL))) {
local0 = TRUE;
} else {
local0 = STR_is_neq_STR_BOOL(x, s_4199);
}
if (local0) {
self->manglemap = FMAPOBSTR_insert_1222(self->manglemap, ob_4198, s_4199);
self->mangleset = FSETSTR_insert_S(self->mangleset, s_4199);
}
}
void BE_in(BE self) {
self->indent = (c_INT_plus_INT_INT_chk(self->indent,1));
}
STR BE_default_init_(BE self, TP t_4200) {
STR noname4201;
TP local0;
STR local1;
STR local2;
STR local3;
STR local4;
STR local5;
STR local6;
STR local7;
local0 = t_4200;
if ((*TP_is_value_BOOL[local0->header.tag+TP_is_value_BOOL_offset])(local0)) {
if (BE_is_built_in_t(self, t_4200)) {
local1 = ((STR) &name_4202);
local2 = STR_plus_STR_STR(local1, BE_mangle_OB_STR(self, ((OB) t_4200)));
local3 = STR_plus_STR_STR(local2, ((STR) &name_4203));
return STR_plus_STR_STR(local3, ((STR) &S0));
}
else {
local4 = BE_mangle_OB_STR(self, ((OB) t_4200));
return STR_plus_STR_STR(local4, ((STR) &S_zero_4204));
}
}
local5 = ((STR) &name_4205);
local6 = STR_plus_STR_STR(local5, BE_mangle_OB_STR(self, ((OB) t_4200)));
local7 = STR_plus_STR_STR(local6, ((STR) &name_4206));
return STR_plus_STR_STR(local7, ((STR) &NULL_4207));
}
void BE_defer_newline(BE self) {
INT noname4208 = ((INT) 0);
FSTR local0;
INT local1;
INT noname4210t;
local0 = self->routine_code;
self->routine_code = FSTR_plus_STR_FSTR(local0, BE_eol_STR(self));
{
BOOL noname4210 = TRUE;
while (1) {
if (noname4210) {
noname4210 = FALSE;
noname4208 = self->indent;
local1 = noname4208;
noname4210t = local1;
} else {
noname4210t--;
}
if (noname4210t<=0) goto after_loop;
0 /* no return value from inlined iter */;
self->routine_code = FSTR_plus_CHAR_FSTR(self->routine_code, ' ');
}
}
after_loop: ;
}
void BE_ndefer_STR(BE self, STR s_4211) {
BE_defer_newline(self);
self->routine_code = FSTR_plus_STR_FSTR(self->routine_code, s_4211);
}
void BE_out(BE self) {
self->indent = (c_INT_minus_INT_INT_chk(self->indent,1));
}
void BE_emit_prologue(BE self, AM_ROUT_DEF f_4212) {
SIG sig_4213;
AM_LOCAL_EXPR lv;
FLISTAM_LOCAL_EXPR noname4214;
STR was_4215;
AM_LOCAL_EXPR lv_4216;
AM_ROUT_DEF noname4217;
INT noname4218 = ((INT) 0);
ARRAYTP noname4219;
TP e_4220;
INT noname4221 = ((INT) 0);
BOOL flag_4222 = ((BOOL) 0);
AM_ROUT_DEF noname4223;
AM_LOCAL_EXPR e_4224;
STR noname4225;
AM_ROUT_DEF noname4226;
AM_LOCAL_EXPR e_4227;
STR noname4228;
AM_LOCAL_EXPR lv_4229;
FLISTAM_LOCAL_EXPR noname4230;
STR def;
INT noname4231 = ((INT) 0);
INT noname4232 = ((INT) 0);
INT i = ((INT) 0);
FLISTAM_LOCAL_EXPR noname4233;
AM_LOCAL_EXPR i_4234;
FILE_20 local0;
STR local1;
FILE_20 local2;
FILE_20 local3;
TP local4;
STR local5;
STR local6;
FILE_20 local7;
FILE_20 local8;
FILE_20 local9;
FILE_20 local10;
AM_LOCAL_EXPR local11;
AM_LOCAL_EXPR local12;
STR local13;
INT local14;
FILE_20 local15;
FILE_20 local16;
TP local17;
FILE_20 local18;
FILE_20 local19;
FILE_20 local20;
INT local21;
AM_LOCAL_EXPR local22;
BOOL local23;
FILE_20 local24;
STR local25;
STR local26;
STR local27;
AM_LOCAL_EXPR local28;
BOOL local29;
FILE_20 local30;
STR local31;
STR local32;
STR local33;
BOOL local34;
AM_LOCAL_EXPR local35;
BOOL local36;
BOOL local37;
TP local38;
FILE_20 local39;
FILE_20 local40;
FILE_20 local41;
FILE_20 local42;
FILE_20 local43;
FILE_20 local44;
FILE_20 local45;
FILE_20 local46;
FILE_20 local47;
FILE_20 local48;
FILE_20 local49;
FILE_20 local50;
FILE_20 local51;
INT local52;
INT local53;
INT local54;
STR local55;
STR local56;
STR local57;
AM_LOCAL_EXPR local58;
STR local59;
STR local60;
STR local61;
if (!((!((f_4212->sig_6==((SIG) NULL)))))) {
fprintf(stderr,"Violation of precondition ./be.sa:1138:17\n");
exit(16);
}
self->saw_outer_return = FALSE;
sig_4213 = f_4212->sig_6;
BE_newline(self);
BE_newline(self);
local0 = self->code_c;
local1 = ((STR) &Definitionof);
BE_comment_FILE_STR(self, local0, STR_plus_STR_STR(local1, SIG_str_STR(sig_4213)));
FILE_plus_CHAR(self->code_c, '\n');
if ((!((sig_4213->ret==((TP) NULL))))) {
local2 = self->code_c;
local3 = FILE_plus_STR_FILE(local2, BE_mangle_OB_STR(self, ((OB) sig_4213->ret)));
FILE_plus_CHAR(local3, ' ');
}
else {
(fwrite(((STR) &void_4235)->arr_part,((STR) &void_4235)->asize,1,self->code_c->fp));
}
if (f_4212->is_external) {
local4 = f_4212->sig_6->tp;
local5 = (*TP_str_STR[local4->header.tag+TP_str_STR_offset])(local4);
local6 = STR_plus_CHAR_STR(local5, '_');
BE_force_mangle_(self, ((OB) sig_4213), STR_plus_STR_STR(local6, f_4212->sig_6->name_19.str_4));
}
local7 = self->code_c;
local8 = FILE_plus_STR_FILE(local7, BE_mangle_OB_STR(self, ((OB) sig_4213)));
FILE_plus_CHAR(local8, '(');
if (AM_ROUT_DEF_is_i(f_4212)) {
local9 = self->code_c;
local10 = FILE_plus_STR_FILE(local9, BE_mangle_OB_STR(self, ((OB) f_4212->sig_6)));
(fwrite(((STR) &S_frameframe)->arr_part,((STR) &S_frameframe)->asize,1,local10->fp));
if ((!((f_4212->locals_57==((FLISTAM_LOCAL_EXPR) NULL))))) {
{
struct FLISTAM_LOCAL_EX_4237_frame_struct temp4236_0;
FLISTAM_LOCAL_EX_4237_frame
noname4238 = &temp4236_0;
noname4238->state = 0;
while (1) {
if (noname4238->state == 0) {
noname4214 = f_4212->locals_57;
noname4238->arg0 = noname4214;
}
local11 = FLISTAM_LOCAL_EX_4237(noname4238);
if (noname4238->state == -1) goto after_loop;
lv = local11;
was_4215 = BE_mangle_OB_STR(self, ((OB) lv));
BE_remangle_OB_STR(self, ((OB) lv), STR_plus_STR_STR(((STR) &frame_4239), was_4215));
}
}
after_loop: ;
}
{
struct AM_ROUT_DEF_elt__frame_struct temp4241_0;
AM_ROUT_DEF_elt__frame
noname4242 = &temp4241_0;
struct INT_up_INT_frame_struct temp4241_1;
INT_up_INT_frame
noname4243 = &temp4241_1;
noname4242->state = 0;
noname4243->state = 0;
while (1) {
if (noname4242->state == 0) {
noname4217 = f_4212;
noname4242->arg0 = noname4217;
}
local12 = AM_ROUT_DEF_elt_(noname4242);
if (noname4242->state == -1) goto after_loop_4240;
lv_4216 = local12;
local13 = ((STR) &framearg);
if (noname4243->state == 0) {
noname4218 = 0;
noname4243->arg0 = noname4218;
}
local14 = INT_up_INT(noname4243);
if (noname4243->state == -1) goto after_loop_4240;
BE_remangle_OB_STR(self, ((OB) lv_4216), STR_plus_INT_STR(local13, local14));
}
}
after_loop_4240: ;
}
else {
if (f_4212->is_abstract) {
local15 = self->code_c;
local16 = FILE_plus_STR_FILE(local15, BE_mangle_OB_STR(self, ((OB) f_4212->sig_6->tp)));
(fwrite(((STR) &arg0)->arr_part,((STR) &arg0)->asize,1,local16->fp));
if ((!((f_4212->sig_6->args_7==((ARRAYTP) NULL))))) {
{
struct ARRAYTP_elt_TP_frame_struct temp4245_0;
ARRAYTP_elt_TP_frame
noname4246 = &temp4245_0;
struct INT_up_INT_frame_struct temp4245_1;
INT_up_INT_frame
noname4247 = &temp4245_1;
noname4246->state = 0;
noname4247->state = 0;
while (1) {
if (noname4246->state == 0) {
noname4219 = f_4212->sig_6->args_7;
noname4246->arg0 = noname4219;
}
local17 = ARRAYTP_elt_TP(noname4246);
if (noname4246->state == -1) goto after_loop_4244;
e_4220 = local17;
local18 = FILE_plus_STR_FILE(self->code_c, ((STR) &name_4248));
local19 = FILE_plus_STR_FILE(local18, BE_mangle_OB_STR(self, ((OB) e_4220)));
local20 = FILE_plus_STR_FILE(local19, ((STR) &arg_4249));
if (noname4247->state == 0) {
noname4221 = 1;
noname4247->arg0 = noname4221;
}
local21 = INT_up_INT(noname4247);
if (noname4247->state == -1) goto after_loop_4244;
FILE_plus_INT(local20, local21);
}
}
after_loop_4244: ;
}
}
else {
if (f_4212->is_external) {
flag_4222 = FALSE;
{
struct AM_ROUT_DEF_elt__frame_struct temp4251_0;
AM_ROUT_DEF_elt__frame
noname4252 = &temp4251_0;
struct STR_separate_STR_STR_frame_struct temp4251_1;
STR_separate_STR_STR_frame
noname4253 = &temp4251_1;
noname4252->state = 0;
noname4253->state = 0;
while (1) {
if (noname4252->state == 0) {
noname4223 = f_4212;
noname4252->arg0 = noname4223;
}
local22 = AM_ROUT_DEF_elt_(noname4252);
if (noname4252->state == -1) goto after_loop_4250;
e_4224 = local22;
if ((!((e_4224==((AM_LOCAL_EXPR) NULL))))) {
local23 = (!((e_4224->tp_at==((TP) NULL))));
} else {
local23 = FALSE;
}
if (!(local23)) {
fprintf(stderr,"Violation of assertion ./be.sa:1186:26\n");
exit(16);
}
if (flag_4222) {
local24 = self->code_c;
if (noname4253->state == 0) {
noname4225 = ((STR) &name_4254);
noname4253->arg0 = noname4225;
}
local26 = BE_mangle_OB_STR(self, ((OB) e_4224->tp_at));
local27 = STR_plus_CHAR_STR(local26, ' ');
noname4253->arg1 = STR_plus_STR_STR(local27, BE_mangle_OB_STR(self, ((OB) e_4224)));
local25 = STR_separate_STR_STR(noname4253);
if (noname4253->state == -1) goto after_loop_4250;
(fwrite(local25->arr_part,local25->asize,1,local24->fp));
}
flag_4222 = TRUE;
}
}
after_loop_4250: ;
}
else {
{
struct AM_ROUT_DEF_elt__frame_struct temp4256_0;
AM_ROUT_DEF_elt__frame
noname4257 = &temp4256_0;
struct STR_separate_STR_STR_frame_struct temp4256_1;
STR_separate_STR_STR_frame
noname4258 = &temp4256_1;
noname4257->state = 0;
noname4258->state = 0;
while (1) {
if (noname4257->state == 0) {
noname4226 = f_4212;
noname4257->arg0 = noname4226;
}
local28 = AM_ROUT_DEF_elt_(noname4257);
if (noname4257->state == -1) goto after_loop_4255;
e_4227 = local28;
if ((!((e_4227==((AM_LOCAL_EXPR) NULL))))) {
local29 = (!((e_4227->tp_at==((TP) NULL))));
} else {
local29 = FALSE;
}
if (!(local29)) {
fprintf(stderr,"Violation of assertion ./be.sa:1195:26\n");
exit(16);
}
local30 = self->code_c;
if (noname4258->state == 0) {
noname4228 = ((STR) &name_4259);
noname4258->arg0 = noname4228;
}
local32 = BE_mangle_OB_STR(self, ((OB) e_4227->tp_at));
local33 = STR_plus_CHAR_STR(local32, ' ');
noname4258->arg1 = STR_plus_STR_STR(local33, BE_mangle_OB_STR(self, ((OB) e_4227)));
local31 = STR_separate_STR_STR(noname4258);
if (noname4258->state == -1) goto after_loop_4255;
(fwrite(local31->arr_part,local31->asize,1,local30->fp));
}
}
after_loop_4255: ;
}
}
}
self->current_self = BE_mangle_OB_STR(self, ((OB) AM_ROUT_DEF_aget(f_4212, 0)));
(fwrite(((STR) &name_4260)->arr_part,((STR) &name_4260)->asize,1,self->code_c->fp));
BE_in(self);
if ((!(AM_ROUT_DEF_is_i(f_4212)))) {
local34 = (!((f_4212->locals_57==((FLISTAM_LOCAL_EXPR) NULL))));
} else {
local34 = FALSE;
}
if (local34) {
{
struct FLISTAM_LOCAL_EX_4237_frame_struct temp4262_0;
FLISTAM_LOCAL_EX_4237_frame
noname4263 = &temp4262_0;
noname4263->state = 0;
while (1) {
if (noname4263->state == 0) {
noname4230 = f_4212->locals_57;
noname4263->arg0 = noname4230;
}
local35 = FLISTAM_LOCAL_EX_4237(noname4263);
if (noname4263->state == -1) goto after_loop_4261;
lv_4229 = local35;
if ((!((lv_4229==((AM_LOCAL_EXPR) NULL))))) {
local36 = (!((lv_4229->tp_at==((TP) NULL))));
} else {
local36 = FALSE;
}
if (!(local36)) {
fprintf(stderr,"Violation of assertion ./be.sa:1210:22\n");
exit(16);
}
BE_newline(self);
if (lv_4229->is_volatile) {
(fwrite(((STR) &volatile_4264)->arr_part,((STR) &volatile_4264)->asize,1,self->code_c->fp));
}
if (lv_4229->needs_init) {
local37 = TRUE;
} else {
local38 = lv_4229->tp_at;
local37 = (*TP_is_value_BOOL[local38->header.tag+TP_is_value_BOOL_offset])(local38);
}
if (local37) {
def = BE_default_init_(self, lv_4229->tp_at);
local39 = self->code_c;
local40 = FILE_plus_STR_FILE(local39, BE_mangle_OB_STR(self, ((OB) lv_4229->tp_at)));
local41 = FILE_plus_CHAR_FILE(local40, ' ');
local42 = FILE_plus_STR_FILE(local41, BE_mangle_OB_STR(self, ((OB) lv_4229)));
local43 = FILE_plus_STR_FILE(local42, ((STR) &name_4265));
local44 = FILE_plus_STR_FILE(local43, def);
FILE_plus_CHAR(local44, ';');
}
else {
local45 = self->code_c;
local46 = FILE_plus_STR_FILE(local45, BE_mangle_OB_STR(self, ((OB) lv_4229->tp_at)));
local47 = FILE_plus_CHAR_FILE(local46, ' ');
local48 = FILE_plus_STR_FILE(local47, BE_mangle_OB_STR(self, ((OB) lv_4229)));
FILE_plus_CHAR(local48, ';');
}
}
}
after_loop_4261: ;
}
if (AM_ROUT_DEF_is_i(f_4212)) {
if ((!((sig_4213->ret==((TP) NULL))))) {
BE_newline(self);
local49 = self->code_c;
local50 = FILE_plus_STR_FILE(local49, BE_mangle_OB_STR(self, ((OB) sig_4213->ret)));
local51 = FILE_plus_CHAR_FILE(local50, ' ');
(fwrite(((STR) &dummy_4266)->arr_part,((STR) &dummy_4266)->asize,1,local51->fp));
}
BE_ndefer_STR(self, ((STR) &switchframestate));
BE_in(self);
{
BOOL noname4269 = TRUE;
while (1) {
if (noname4269) {
noname4269 = FALSE;
noname4231 = 0;
noname4232 = f_4212->num_yields;
local53 = noname4231;
local54 = noname4232;
local52 = local53;
} else {
local52++;
}
if (local52>local54) goto after_loop_4267;
i = local52;
local55 = STR_plus_INT_STR(((STR) &case_4270), i);
local56 = STR_plus_STR_STR(local55, ((STR) &gotostate));
local57 = STR_plus_INT_STR(local56, i);
BE_ndefer_STR(self, STR_plus_CHAR_STR(local57, ';'));
}
}
after_loop_4267: ;
BE_ndefer_STR(self, ((STR) &name_4271));
BE_out(self);
BE_ndefer_STR(self, ((STR) &state0));
self->state_counter = 1;
if ((!((f_4212->locals_57==((FLISTAM_LOCAL_EXPR) NULL))))) {
{
struct FLISTAM_LOCAL_EX_4237_frame_struct temp4273_0;
FLISTAM_LOCAL_EX_4237_frame
noname4274 = &temp4273_0;
noname4274->state = 0;
while (1) {
if (noname4274->state == 0) {
noname4233 = f_4212->locals_57;
noname4274->arg0 = noname4233;
}
local58 = FLISTAM_LOCAL_EX_4237(noname4274);
if (noname4274->state == -1) goto after_loop_4272;
i_4234 = local58;
if (i_4234->needs_init) {
local59 = BE_mangle_OB_STR(self, ((OB) i_4234));
local60 = STR_plus_STR_STR(local59, ((STR) &name_4275));
local61 = STR_plus_STR_STR(local60, BE_default_init_(self, i_4234->tp_at));
BE_ndefer_STR(self, STR_plus_STR_STR(local61, ((STR) &name_4276)));
}
}
}
after_loop_4272: ;
}
}
}
INT SIG_num_args_INT(SIG self) {
INT noname4277 = ((INT) 0);
return ARRAYTP_size_INT(self->args_7);
}
BOOL BE_is_asize_SIG_BOOL(BE self, SIG s_4278) {
BOOL noname4279 = ((BOOL) 0);
BOOL local0;
BOOL local1;
BOOL local2;
BOOL local3;
BOOL local4;
TP local5;
INT local6;
TP local7;
if (STR_is_eq_STR_BOOL(s_4278->name_19.str_4, ((STR) &asize_4280))) {
local5 = s_4278->tp;
local4 = (!((*TP_is_abstract_BOOL[local5->header.tag+TP_is_abstract_BOOL_offset])(local5)));
} else {
local4 = FALSE;
}
if (local4) {
local3 = (!((IMPL_TBL_impl_of(self->prog->impl_tbl, s_4278->tp)->arr==((TP_CLASS) NULL))));
} else {
local3 = FALSE;
}
if (local3) {
local6 = SIG_num_args_INT(s_4278);
local2 = (local6==0);
} else {
local2 = FALSE;
}
if (local2) {
local1 = (!((s_4278->ret==((TP) NULL))));
} else {
local1 = FALSE;
}
if (local1) {
local7 = s_4278->tp;
local0 = (!((*TP_is_value_BOOL[local7->header.tag+TP_is_value_BOOL_offset])(local7)));
} else {
local0 = FALSE;
}
return local0;
}
void BE_runtime_error(BE self, STR s_4281, PROG_ERR l) {
STR local0;
STR local1;
PROG_ERR local2;
STR local3;
local0 = STR_plus_STR_STR(((STR) &fprintfstderr), s_4281);
local1 = STR_plus_STR_STR(local0, ((STR) &name_4282));
local2 = l;
local3 = STR_plus_STR_STR(local1, SFILE_ID_str_STR((*PROG_ERR_source_[local2->header.tag+PROG_ERR_source__offset])(local2)));
BE_ndefer_STR(self, STR_plus_STR_STR(local3, ((STR) &n_4283)));
BE_ndefer_STR(self, ((STR) &exit16));
}
FSTR FSTR_plus_INT_FSTR(FSTR self, INT i) {
FSTR noname4284;
return INT_str_in_FSTR_FSTR(i, self);
if (!FSTR_invariant_BOOL(self)) {
fprintf(stderr,"Failed invariant FSTR::invariant:BOOL ../Library/fstr.sa:140:7\n");
exit(16);
}
}
void BE_announce_at_S(BE self, SFILE_ID s_4285) {
INT lineno = ((INT) 0);
FSTR local0;
FSTR local1;
FSTR local2;
FSTR local3;
if (self->prog->options_55->debug_11) {
lineno = SFILE_ID_line_nu(s_4285);
if ((lineno>0)) {
PROG_set_eloc_SF(self->prog, s_4285);
local0 = FSTR_plus_STR_FSTR(self->routine_code, ((STR) &line_4286));
local1 = FSTR_plus_INT_FSTR(local0, lineno);
local2 = FSTR_plus_STR_FSTR(local1, ((STR) &name_4287));
local3 = FSTR_plus_STR_FSTR(local2, SFILE_ID_file_in_STR(s_4285));
self->routine_code = FSTR_plus_STR_FSTR(local3, ((STR) &name_4288));
}
}
}
void ARRAYSTR_aset_IN_4289(ARRAYSTR self, INT ind_4290, STR val_4291) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((ARRAYSTR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4290, 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_4290<0||ind_4290>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_4290] = val_4291;
}
STR BE_genlocal_STR(BE self) {
STR noname4292;
STR res = ((STR) NULL);
while (1) {
res = STR_plus_INT_STR(((STR) &local_4294), self->local_counter);
self->local_counter = (c_INT_plus_INT_INT_chk(self->local_counter,1));
if ((!(FSETSTR_test_STR(self->mangleset, res)))) {
goto after_loop;
}
}
after_loop: ;
return res;
}
STR BE_dec_local_TP_STR(BE self, TP t_4295) {
STR noname4296;
STR res;
FILE_20 local0;
FILE_20 local1;
FILE_20 local2;
FILE_20 local3;
FILE_20 local4;
FILE_20 local5;
res = BE_genlocal_STR(self);
local0 = self->code_c;
local1 = FILE_plus_STR_FILE(local0, BE_eol_STR(self));
local2 = FILE_plus_CHAR_FILE(local1, ' ');
local3 = FILE_plus_STR_FILE(local2, BE_mangle_OB_STR(self, ((OB) t_4295)));
local4 = FILE_plus_CHAR_FILE(local3, ' ');
local5 = FILE_plus_STR_FILE(local4, res);
FILE_plus_CHAR(local5, ';');
return res;
}
ARRAYSTR BE_emit_args_AM_(BE self, AM_CALL_EXPR arg_4297) {
ARRAYSTR noname4298;
ARRAYSTR res;
BOOL is_ext = ((BOOL) 0);
INT last_4299 = ((INT) 0);
INT noname4300 = ((INT) 0);
INT noname4301 = ((INT) 0);
AM_EXPR e_4302;
INT noname4303 = ((INT) 0);
INT noname4304 = ((INT) 0);
INT i = ((INT) 0);
AM_EXPR e_4305;
STR subexpr;
STR subexpr_4306;
ARRAYSTR local0;
AM_CALL_EXPR local1;
INT local2;
AM_CALL_EXPR local3;
INT local4;
AM_CALL_EXPR local5;
INT local6;
AM_CALL_EXPR local7;
INT local8;
INT local9;
INT local10;
INT local11;
INT local9e;
AM_CALL_EXPR local12;
BOOL local13;
AM_CALL_EXPR local14;
AM_EXPR local15;
STR local16;
STR local17;
STR local18;
AM_EXPR local19;
STR local20;
STR local21;
STR local22;
local0 = ((ARRAYSTR) NULL);
local1 = arg_4297;
res = ARRAYSTR_create_(local0, (*AM_CALL_EXPR_asi[local1->header.tag+AM_CALL_EXPR_asi_offset])(local1));
is_ext = FALSE;
if (arg_4297==NULL) {
} else
switch (arg_4297->header.tag) {
case AM_EXT_CALL_EXPR_tag:
is_ext = TRUE; break;
default: ;
}
{
struct INT_downto_INT_INT_frame_struct temp4307_0;
INT_downto_INT_INT_frame
noname4308 = &temp4307_0;
noname4308->state = 0;
while (1) {
if (noname4308->state == 0) {
local3 = arg_4297;
local4 = (*AM_CALL_EXPR_asi[local3->header.tag+AM_CALL_EXPR_asi_offset])(local3);
noname4300 = (c_INT_minus_INT_INT_chk(local4,1));
noname4301 = -1;
noname4308->arg0 = noname4300;
noname4308->arg1 = noname4301;
}
local2 = INT_downto_INT_INT(noname4308);
if (noname4308->state == -1) goto after_loop;
last_4299 = local2;
if ((last_4299>=0)) {
}
else {
goto after_loop;
}
local5 = arg_4297;
e_4302 = (*AM_CALL_EXPR_age[local5->header.tag+AM_CALL_EXPR_age_offset])(local5, last_4299);
if (e_4302==NULL) {
} else
switch (e_4302->header.tag) {
case AM_ITER_CALL_EXPR_tag:
case AM_BND_ROUT_CALL_tag:
case AM_EXT_CALL_EXPR_tag:
case AM_BND_ITER_CALL_tag:
case AM_ROUT_CALL_EXPR_tag:
goto after_loop; break;
default: ;
}
}
}
after_loop: ;
local6 = (c_INT_plus_INT_INT_chk(last_4299,1));
local7 = arg_4297;
local8 = (*AM_CALL_EXPR_asi[local7->header.tag+AM_CALL_EXPR_asi_offset])(local7);
last_4299 = INT_min_INT_INT(local6, (c_INT_minus_INT_INT_chk(local8,1)));
{
BOOL noname4311 = TRUE;
while (1) {
if (noname4311) {
noname4311 = FALSE;
noname4303 = 0;
local12 = arg_4297;
noname4304 = (*AM_CALL_EXPR_asi[local12->header.tag+AM_CALL_EXPR_asi_offset])(local12);
local10 = noname4303;
local11 = noname4304;
local9 = local10; local9e = local10+local11;
} else {
local9++;
}
if (local9>=local9e) goto after_loop_4309;
i = local9;
if (is_ext) {
local13 = (i==0);
} else {
local13 = FALSE;
}
if ((!(local13))) {
local14 = arg_4297;
e_4305 = (*AM_CALL_EXPR_age[local14->header.tag+AM_CALL_EXPR_age_offset])(local14, i);
ARRAYSTR_aset_IN_4289(res, i, BE_emit_expr_AM_(self, e_4305));
if (e_4305==NULL) {
if ((i<last_4299)) {
subexpr_4306 = ARRAYSTR_aget_IN(res, i);
local15 = e_4305;
ARRAYSTR_aset_IN_4289(res, i, BE_dec_local_TP_STR(self, (*AM_EXPR_tp_TP[local15->header.tag+AM_EXPR_tp_TP_offset])(local15)));
local16 = ARRAYSTR_aget_IN(res, i);
local17 = STR_plus_STR_STR(local16, ((STR) &name_4312));
local18 = STR_plus_STR_STR(local17, subexpr_4306);
BE_ndefer_STR(self, STR_plus_CHAR_STR(local18, ';'));
}
} else
switch (e_4305->header.tag) {
case AM_LOCAL_EXPR_tag: break;
default: ;
if ((i<last_4299)) {
subexpr = ARRAYSTR_aget_IN(res, i);
local19 = e_4305;
ARRAYSTR_aset_IN_4289(res, i, BE_dec_local_TP_STR(self, (*AM_EXPR_tp_TP[local19->header.tag+AM_EXPR_tp_TP_offset])(local19)));
local20 = ARRAYSTR_aget_IN(res, i);
local21 = STR_plus_STR_STR(local20, ((STR) &name_4313));
local22 = STR_plus_STR_STR(local21, subexpr);
BE_ndefer_STR(self, STR_plus_CHAR_STR(local22, ';'));
}
}
}
}
}
after_loop_4309: ;
return res;
}
INT AM_ROUT_CALL_EXP_4314(AM_ROUT_CALL_EXPR self) {
INT noname4315 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
AM_EXPR AM_ROUT_CALL_EXP_4316(AM_ROUT_CALL_EXPR self, INT ind_4317) {
AM_EXPR noname4318;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((AM_ROUT_CALL_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4317, 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_4317<0||ind_4317>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4317];
}
STR BE_dec_local_com(BE self, TP t_4319, STR com_4320) {
STR noname4321;
STR res;
res = BE_dec_local_TP_STR(self, t_4319);
BE_comment_FILE_STR(self, self->code_c, com_4320);
return res;
}
STR BE_sizeof_boxed_(BE self, TP tp_4322) {
STR noname4323;
TP local0;
STR local1;
STR local2;
local0 = tp_4322;
if (!((*TP_is_value_BOOL[local0->header.tag+TP_is_value_BOOL_offset])(local0))) {
fprintf(stderr,"Violation of precondition ./be.sa:691:16\n");
exit(16);
}
local1 = ((STR) &sizeofstruct);
local2 = STR_plus_STR_STR(local1, BE_mangle_OB_STR(self, ((OB) tp_4322)));
return STR_plus_STR_STR(local2, ((STR) &S_boxed_struct_4324));
}
INT FMAPTPINT_key_ha(FMAPTPINT self, TP k) {
INT noname4325 = ((INT) 0);
HASH local0;
if (k==NULL) {
} else
switch (k->header.tag) {
case TUPIMPL_INCLUDEI_tag:
case TUPAM_BND_CREATE_tag:
case TUPIFCIFC_tag:
case TUPSTRITER_INLINE_tag:
case TUPAM_GLOBAL_EXP_tag:
case FSTR_tag:
case TUPSIGSIG_tag:
case CHAR_tag:
case INT_tag:
case TUPTP_CLASSFSETTP_tag:
case TUPSTRSTR_tag:
case TUPINTINTINT_tag:
case STR_tag:
case TUPSFILE_IDSFILE_ID_tag:
case TUPAM_ITER_CALL__tag:
case TUPTR_EXPRTR_EXPR_tag:
case TUPTPFMAPIDENTAM_tag:
case TUPARRAYTPTP_tag:
case TUPAM_CONSTAM_CONST_tag:
case TUPSTRTUPSTRSTR_tag:
case TUPTPIMPL_tag:
case TUPSIGAM_ROUT_DEF_tag:
case TUPARRAYTPARRAYB_tag:
case TUPIDENTAM_GLOBA_tag:
case TUPAM_BND_ITER_C_tag:
case TUPAM_LOCAL_EXPR_tag:
case TUPSTRFSETSTR_tag:
case TUPAM_ROUT_DEFAM_tag:
case TUPTPTP_tag:
case IDENT_tag:
case TUPTPINT_tag:
case TUPIDENTINT_tag:
case TUPIDENTIDENT_tag:
case TUPTP_CLASSFSETT_tag:
case TUPCHARCHAR_tag:
case TUPIDENTTP_tag:
case TUPIDENTARRAYTP_tag:
case TUPAM_EXPRAM_EXPR_tag:
case TUPTPIFC_tag:
case TUPTP_CLASSTP_CLASS_tag:
case TUPAM_STMTAM_STMT_tag:
case TUPINTINT_tag:
case TUPOBSTR_tag:
case TUPFLISTAM_CONST_tag:
case TUPAM_EXPRTP_tag:
case TUPBOOLINTIINTBOOL_tag:
local0 = ((HASH) k);
return (*HASH_hash_INT[local0->header.tag+HASH_hash_INT_offset])(local0); break;
default: ;
}
return (c_SYS_id_OB_INT(((SYS) NULL),((OB) k)));
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:64:11\n");
exit(16);
}
}
INT FMAPTPINT_asize_INT(FMAPTPINT self) {
INT noname4326 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
TUPTPINT FMAPTPINT_aget_I(FMAPTPINT self, INT ind_4327) {
TUPTPINT noname4328 = TUPTPINT_zero;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPTPINT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4327, 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_4327<0||ind_4327>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4327];
}
BOOL FMAPTPINT_key_eq(FMAPTPINT self, TP k1, TP k2) {
BOOL noname4329 = ((BOOL) 0);
if (k1==NULL) {
} else
switch (k1->header.tag) {
default: ;
}
return c_SYS_ob_eq_OB_OB_BOOL(((OB) k1),((OB) k2));
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:44:9\n");
exit(16);
}
}
TP FMAPTPINT_key_nil_TP(FMAPTPINT self) {
TP noname4330;
TP k = ((TP) NULL);
if (k==NULL) {
} else
switch (k->header.tag) {
default: ;
}
return ((TP) NULL);
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:54:10\n");
exit(16);
}
}
BOOL FMAPTPINT_test_T(FMAPTPINT self, TP k) {
BOOL noname4331 = ((BOOL) 0);
INT h = ((INT) 0);
TP tk;
TP tk_4332;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPTPINT) NULL))) {
return FALSE;
}
local0 = FMAPTPINT_key_ha(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t1;
if (FMAPTPINT_key_eq(self, tk, k)) {
return TRUE;
}
else {
if (FMAPTPINT_key_eq(self, tk, FMAPTPINT_key_nil_TP(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_4332 = (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t1;
if (FMAPTPINT_key_eq(self, tk_4332, k)) {
return TRUE;
}
else {
if (FMAPTPINT_key_eq(self, tk_4332, FMAPTPINT_key_nil_TP(self))) {
goto after_loop_4334;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4334: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:133:15\n");
exit(16);
}
}
return FALSE;
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:119:7\n");
exit(16);
}
}
TUPTPINT TUPTPINT_t1_TP_T(TUPTPINT self, TP t1_4336) {
TUPTPINT local0;
local0 = self;
local0.t1 = t1_4336;
return local0;
}
TUPTPINT TUPTPINT_t2_INT_(TUPTPINT self, INT t2_4337) {
TUPTPINT local0;
local0 = self;
local0.t2 = t2_4337;
return local0;
}
TUPTPINT TUPTPINT_create_(TUPTPINT self, TP at1, INT at2) {
TUPTPINT noname4338 = TUPTPINT_zero;
TUPTPINT local0;
local0 = TUPTPINT_t1_TP_T(self, at1);
return TUPTPINT_t2_INT_(local0, at2);
}
FMAPTPINT FMAPTPINT_alloca(FMAPTPINT self, INT n_4339) {
FMAPTPINT noname4340;
FMAPTPINT r_4341;
FMAPTPINT noname4342;
FMAPTPINT local0;
TUPTPINT local1;
TP local2;
local0 = ((FMAPTPINT) sbi_arr_alloc(sizeof(struct FMAPTPINT_struct), FMAPTPINT_tag, sizeof(TUPTPINT) , n_4339));
local0->asize = n_4339;
r_4341 = local0;
if ((!((FMAPTPINT_key_nil_TP(self)==((TP) NULL))))) {
{
struct FMAPTPINT_aset_T_frame_struct temp4343_0;
FMAPTPINT_aset_T_frame
noname4344 = &temp4343_0;
noname4344->state = 0;
while (1) {
if (noname4344->state == 0) {
noname4342 = r_4341;
noname4344->arg0 = noname4342;
}
local1 = TUPTPINT_zero;
local2 = FMAPTPINT_key_nil_TP(self);
noname4344->arg1 = TUPTPINT_create_(local1, local2, ((INT) 0));
FMAPTPINT_aset_T(noname4344);
if (noname4344->state == -1) goto after_loop;
0 /* No return value from iter call */;
}
}
after_loop: ;
}
return r_4341;
}
FMAPTPINT FMAPTPINT_insert(FMAPTPINT self, TUPTPINT p) {
FMAPTPINT noname4345;
return FMAPTPINT_insert_4346(self, p.t1, p.t2);
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:202:14\n");
exit(16);
}
}
FMAPTPINT FMAPTPINT_double(FMAPTPINT self) {
FMAPTPINT noname4347;
INT ns = ((INT) 0);
FMAPTPINT r_4348;
FMAPTPINT noname4349;
INT local0;
INT local1;
INT local2;
TUPTPINT local3;
if (!((!((self==((FMAPTPINT) NULL)))))) {
fprintf(stderr,"Violation of precondition ../Library/fmap.sa:172:22\n");
exit(16);
}
local0 = (self->asize);
local1 = (c_INT_minus_INT_INT_chk(local0,1));
local2 = (c_INT_times_INT_INT_chk(local1,2));
ns = (c_INT_plus_INT_INT_chk(local2,1));
r_4348 = FMAPTPINT_alloca(self, ns);
{
struct FMAPTPINT_pairs__frame_struct temp4350_0;
FMAPTPINT_pairs__frame
noname4351 = &temp4350_0;
noname4351->state = 0;
while (1) {
if (noname4351->state == 0) {
noname4349 = self;
noname4351->arg0 = noname4349;
}
local3 = FMAPTPINT_pairs_(noname4351);
if (noname4351->state == -1) goto after_loop;
r_4348 = FMAPTPINT_insert(r_4348, local3);
}
}
after_loop: ;
return r_4348;
}
void FMAPTPINT_aset_I(FMAPTPINT self, INT ind_4352, TUPTPINT val_4353) {
BOOL local0;
INT local1;
INT local2;
if ((!((self==((FMAPTPINT) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4352, 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_4352<0||ind_4352>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:38:7\n");
exit(16);
}
self->arr_part[ind_4352] = val_4353;
}
FMAPTPINT FMAPTPINT_insert_4346(FMAPTPINT self, TP k, INT t_4354) {
FMAPTPINT noname4355;
FMAPTPINT r_4356;
INT h = ((INT) 0);
INT asm_4357 = ((INT) 0);
TP tk;
TP tk_4358;
INT local0;
INT local1;
INT local2;
INT local3;
INT local4;
r_4356 = self;
if ((r_4356==((FMAPTPINT) NULL))) {
r_4356 = FMAPTPINT_alloca(self, 5);
}
else {
local0 = (c_INT_plus_INT_INT_chk(self->hsize,1));
local1 = (c_INT_times_INT_INT_chk(local0,2));
if ((local1>(self->asize))) {
r_4356 = FMAPTPINT_double(self);
}
}
local2 = FMAPTPINT_key_ha(r_4356, k);
local3 = (r_4356->asize);
h = (local2&(c_INT_minus_INT_INT_chk(local3,2)));
local4 = (r_4356->asize);
asm_4357 = (c_INT_minus_INT_INT_chk(local4,1));
while (1) {
tk = (TUPTPINT_blob=FMAPTPINT_aget_I(r_4356, h)).t1;
if (FMAPTPINT_key_eq(self, tk, FMAPTPINT_key_nil_TP(self))) {
goto after_loop;
}
if (FMAPTPINT_key_eq(self, tk, k)) {
FMAPTPINT_aset_I(r_4356, h, TUPTPINT_create_(TUPTPINT_zero, k, t_4354));
return r_4356;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop: ;
if ((h==asm_4357)) {
h = 0;
while (1) {
tk_4358 = (TUPTPINT_blob=FMAPTPINT_aget_I(r_4356, h)).t1;
if (FMAPTPINT_key_eq(self, tk_4358, FMAPTPINT_key_nil_TP(self))) {
goto after_loop_4360;
}
if (FMAPTPINT_key_eq(self, tk_4358, k)) {
FMAPTPINT_aset_I(r_4356, h, TUPTPINT_create_(TUPTPINT_zero, k, t_4354));
return r_4356;
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4360: ;
if (!((h!=asm_4357))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:199:15\n");
exit(16);
}
}
FMAPTPINT_aset_I(r_4356, h, TUPTPINT_create_(TUPTPINT_zero, k, t_4354));
r_4356->hsize = (c_INT_plus_INT_INT_chk(r_4356->hsize,1));
return r_4356;
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:180:9\n");
exit(16);
}
}
INT FMAPTPINT_get_TP_INT(FMAPTPINT self, TP k) {
INT noname4362 = ((INT) 0);
INT h = ((INT) 0);
TP tk;
TP tk_4363;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPTPINT) NULL))) {
return ((INT) 0);
}
local0 = FMAPTPINT_key_ha(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t1;
if (FMAPTPINT_key_eq(self, tk, k)) {
return (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t2;
}
else {
if (FMAPTPINT_key_eq(self, tk, FMAPTPINT_key_nil_TP(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_4363 = (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t1;
if (FMAPTPINT_key_eq(self, tk_4363, k)) {
return (TUPTPINT_blob=FMAPTPINT_aget_I(self, h)).t2;
}
else {
if (FMAPTPINT_key_eq(self, tk_4363, FMAPTPINT_key_nil_TP(self))) {
goto after_loop_4365;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4365: ;
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 ((INT) 0);
if (!FMAPTPINT_invari(self)) {
fprintf(stderr,"Failed invariant FMAP{$TP,INT}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
INT BE_num_tag_for_T(BE self, TP tp_4367) {
INT noname4368 = ((INT) 0);
INT tag_4369 = ((INT) 0);
TP local0;
if ((!(FMAPTPINT_test_T(self->tags, tp_4367)))) {
local0 = tp_4367;
if ((*TP_is_value_BOOL[local0->header.tag+TP_is_value_BOOL_offset])(local0)) {
tag_4369 = INT_negate_INT(self->neg_tag_count);
self->neg_tag_count = (c_INT_plus_INT_INT_chk(self->neg_tag_count,1));
}
else {
tag_4369 = self->pos_tag_count;
self->pos_tag_count = (c_INT_plus_INT_INT_chk(self->pos_tag_count,1));
}
self->tags = FMAPTPINT_insert_4346(self->tags, tp_4367, tag_4369);
}
else {
tag_4369 = FMAPTPINT_get_TP_INT(self->tags, tp_4367);
}
return tag_4369;
}
STR BE_tag_for_TP_STR(BE self, TP tp_4370) {
STR noname4371;
INT dummy_4372 = ((INT) 0);
STR res;
STR local0;
dummy_4372 = BE_num_tag_for_T(self, tp_4370);
local0 = BE_mangle_OB_STR(self, ((OB) tp_4370));
res = STR_plus_STR_STR(local0, ((STR) &S_tag));
BE_forbid_STR(self, res);
return res;
}
STR BE_sizeof_TP_STR(BE self, TP tp_4373) {
STR noname4374;
TP local0;
STR local1;
STR local2;
STR local3;
STR local4;
local0 = tp_4373;
if ((*TP_is_value_BOOL[local0->header.tag+TP_is_value_BOOL_offset])(local0)) {
local1 = ((STR) &sizeof_4375);
local2 = STR_plus_STR_STR(local1, BE_mangle_OB_STR(self, ((OB) tp_4373)));
return STR_plus_STR_STR(local2, ((STR) &name_4376));
}
local3 = ((STR) &sizeofstruct_4377);
local4 = STR_plus_STR_STR(local3, BE_mangle_OB_STR(self, ((OB) tp_4373)));
return STR_plus_STR_STR(local4, ((STR) &S_struct_4378));
}
STR BE_allocate_TP_STR(BE self, TP t_4379) {
STR noname4380;
STR call_string = ((STR) NULL);
TP local0;
TP local1;
STR local2;
STR local3;
STR local4;
STR local5;
STR local6;
STR local7;
STR local8;
STR local9;
STR local10;
STR local11;
STR local12;
STR local13;
STR local14;
STR local15;
local0 = t_4379;
if ((*TP_is_atomic_BOOL[local0->header.tag+TP_is_atomic_BOOL_offset])(local0)) {
call_string = ((STR) &sbi_alloc_atomic_4381);
}
else {
call_string = ((STR) &sbi_alloc_4382);
}
local1 = t_4379;
if ((*TP_is_value_BOOL[local1->header.tag+TP_is_value_BOOL_offset])(local1)) {
local2 = ((STR) &name_4383);
local3 = STR_plus_STR_STR(local2, BE_mangle_OB_STR(self, ((OB) t_4379)));
local4 = STR_plus_STR_STR(local3, ((STR) &S_boxed_4384));
local5 = STR_plus_STR_STR(local4, call_string);
local6 = STR_plus_STR_STR(local5, BE_sizeof_boxed_(self, t_4379));
local7 = STR_plus_STR_STR(local6, ((STR) &name_4385));
local8 = STR_plus_STR_STR(local7, BE_tag_for_TP_STR(self, t_4379));
return STR_plus_STR_STR(local8, ((STR) &name_4386));
}
local9 = ((STR) &name_4387);
local10 = STR_plus_STR_STR(local9, BE_mangle_OB_STR(self, ((OB) t_4379)));
local11 = STR_plus_STR_STR(local10, ((STR) &name_4388));
local12 = STR_plus_STR_STR(local11, call_string);
local13 = STR_plus_STR_STR(local12, BE_sizeof_TP_STR(self, t_4379));
local14 = STR_plus_STR_STR(local13, ((STR) &name_4389));
local15 = STR_plus_STR_STR(local14, BE_tag_for_TP_STR(self, t_4379));
return STR_plus_STR_STR(local15, ((STR) &name_4390));
}
STR BE_cast_TP_TP_ST(BE self, TP dest_tp, TP src_tp, STR expr_4391) {
STR noname4392;
STR res = ((STR) NULL);
BOOL local0;
BOOL local1;
BOOL local2;
TP local3;
BOOL local4;
TP local5;
TP local6;
TP local7;
TP local8;
BOOL local9;
TP local10;
TP local11;
STR local12;
TP local13;
STR local14;
STR local15;
STR local16;
STR local17;
STR local18;
STR local19;
STR local20;
STR local21;
STR local22;
STR local23;
BOOL local24;
TP local25;
TP local26;
STR local27;
TP local28;
STR local29;
STR local30;
STR local31;
STR local32;
TP local33;
STR local34;
STR local35;
STR local36;
STR local37;
local3 = dest_tp;
if ((*TP_is_eq_TP_BOOL[local3->header.tag+TP_is_eq_TP_BOOL_offset])(local3, src_tp)) {
local2 = TRUE;
} else {
local5 = dest_tp;
if ((*TP_is_abstract_BOOL[local5->header.tag+TP_is_abstract_BOOL_offset])(local5)) {
local6 = src_tp;
local4 = (*TP_is_abstract_BOOL[local6->header.tag+TP_is_abstract_BOOL_offset])(local6);
} else {
local4 = FALSE;
}
local2 = local4;
}
if (local2) {
local1 = TRUE;
} else {
local7 = dest_tp;
local1 = (*TP_is_subtype_TP[local7->header.tag+TP_is_subtype_TP_offset])(local7, src_tp);
}
if (local1) {
local0 = TRUE;
} else {
local8 = src_tp;
local0 = (*TP_is_subtype_TP[local8->header.tag+TP_is_subtype_TP_offset])(local8, dest_tp);
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ./be.sa:658:8\n");
exit(16);
}
local10 = dest_tp;
if ((*TP_is_abstract_BOOL[local10->header.tag+TP_is_abstract_BOOL_offset])(local10)) {
local11 = src_tp;
local9 = (*TP_is_value_BOOL[local11->header.tag+TP_is_value_BOOL_offset])(local11);
} else {
local9 = FALSE;
}
if (local9) {
local12 = ((STR) &localforboxed);
local13 = src_tp;
res = BE_dec_local_com(self, dest_tp, STR_plus_STR_STR(local12, (*TP_str_STR[local13->header.tag+TP_str_STR_offset])(local13)));
local14 = STR_plus_STR_STR(res, ((STR) &name_4393));
local15 = STR_plus_STR_STR(local14, BE_mangle_OB_STR(self, ((OB) dest_tp)));
local16 = STR_plus_STR_STR(local15, ((STR) &name_4394));
local17 = STR_plus_STR_STR(local16, BE_allocate_TP_STR(self, src_tp));
BE_ndefer_STR(self, STR_plus_STR_STR(local17, ((STR) &name_4395)));
local18 = ((STR) &name_4396);
local19 = STR_plus_STR_STR(local18, BE_mangle_OB_STR(self, ((OB) src_tp)));
local20 = STR_plus_STR_STR(local19, ((STR) &S_boxed_4397));
local21 = STR_plus_STR_STR(local20, res);
local22 = STR_plus_STR_STR(local21, ((STR) &value_part_4398));
local23 = STR_plus_STR_STR(local22, expr_4391);
BE_ndefer_STR(self, STR_plus_STR_STR(local23, ((STR) &name_4399)));
}
else {
local25 = dest_tp;
if ((*TP_is_value_BOOL[local25->header.tag+TP_is_value_BOOL_offset])(local25)) {
local26 = src_tp;
local24 = (*TP_is_abstract_BOOL[local26->header.tag+TP_is_abstract_BOOL_offset])(local26);
} else {
local24 = FALSE;
}
if (local24) {
local27 = ((STR) &localforunboxed);
local28 = src_tp;
res = BE_dec_local_com(self, dest_tp, STR_plus_STR_STR(local27, (*TP_str_STR[local28->header.tag+TP_str_STR_offset])(local28)));
local29 = STR_plus_STR_STR(res, ((STR) &name_4400));
local30 = STR_plus_STR_STR(local29, BE_mangle_OB_STR(self, ((OB) dest_tp)));
local31 = STR_plus_STR_STR(local30, ((STR) &S_boxed_4401));
local32 = STR_plus_STR_STR(local31, expr_4391);
BE_ndefer_STR(self, STR_plus_STR_STR(local32, ((STR) &value_part_4402)));
}
else {
local33 = dest_tp;
if ((*TP_is_neq_TP_BOOL[local33->header.tag+TP_is_neq_TP_BOOL_offset])(local33, src_tp)) {
local34 = ((STR) &name_4403);
local35 = STR_plus_STR_STR(local34, BE_mangle_OB_STR(self, ((OB) dest_tp)));
local36 = STR_plus_STR_STR(local35, ((STR) &name_4404));
local37 = STR_plus_STR_STR(local36, expr_4391);
res = STR_plus_STR_STR(local37, ((STR) &name_4405));
}
else {
res = expr_4391;
}
}
}
return res;
}
ARRAYSTR BE_emit_and_cast(BE self, AM_ROUT_CALL_EXPR arce) {
ARRAYSTR noname4406;
ARRAYSTR arg_list;
INT noname4407 = ((INT) 0);
INT noname4408 = ((INT) 0);
INT i = ((INT) 0);
INT local0;
TP local1;
AM_EXPR local2;
TP local3;
INT local4;
INT local5;
INT local6;
INT local7;
ARRAYTP local8;
TP local9;
AM_EXPR local10;
TP local11;
arg_list = BE_emit_args_AM_(self, ((AM_CALL_EXPR) arce));
local0 = 0;
local1 = arce->fun->tp;
local2 = AM_ROUT_CALL_EXP_4316(arce, 0);
local3 = (*AM_EXPR_tp_TP[local2->header.tag+AM_EXPR_tp_TP_offset])(local2);
ARRAYSTR_aset_IN_4289(arg_list, local0, BE_cast_TP_TP_ST(self, local1, local3, ARRAYSTR_aget_IN(arg_list, 0)));
{
BOOL noname4410 = TRUE;
while (1) {
if (noname4410) {
noname4410 = FALSE;
noname4407 = 1;
local7 = ARRAYSTR_size_INT(arg_list);
noname4408 = (c_INT_minus_INT_INT_chk(local7,1));
local5 = noname4407;
local6 = noname4408;
local4 = local5;
} else {
local4++;
}
if (local4>local6) goto after_loop;
i = local4;
local8 = arce->fun->args_7;
local9 = ARRAYTP_aget_INT_TP(local8, (c_INT_minus_INT_INT_chk(i,1)));
local10 = AM_ROUT_CALL_EXP_4316(arce, i);
local11 = (*AM_EXPR_tp_TP[local10->header.tag+AM_EXPR_tp_TP_offset])(local10);
ARRAYSTR_aset_IN_4289(arg_list, i, BE_cast_TP_TP_ST(self, local9, local11, ARRAYSTR_aget_IN(arg_list, i)));
}
}
after_loop: ;
return arg_list;
}
TUPSTRSTR FMAPSTRTUPSTRSTR_4411(FMAPSTRTUPSTRSTR self, STR k) {
TUPSTRSTR noname4412 = TUPSTRSTR_zero;
INT h = ((INT) 0);
STR tk;
STR tk_4413;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPSTRTUPSTRSTR) NULL))) {
return TUPSTRSTR_zero;
}
local0 = FMAPSTRTUPSTRSTR_1082(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(self, h)).t1;
if (FMAPSTRTUPSTRSTR_1087(self, tk, k)) {
return (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(self, h)).t2;
}
else {
if (FMAPSTRTUPSTRSTR_1087(self, tk, FMAPSTRTUPSTRSTR_1055(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_4413 = (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(self, h)).t1;
if (FMAPSTRTUPSTRSTR_1087(self, tk_4413, k)) {
return (TUPSTRTUPSTRSTR_blob=FMAPSTRTUPSTRSTR_1084(self, h)).t2;
}
else {
if (FMAPSTRTUPSTRSTR_1087(self, tk_4413, FMAPSTRTUPSTRSTR_1055(self))) {
goto after_loop_4415;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4415: ;
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 TUPSTRSTR_zero;
if (!FMAPSTRTUPSTRSTR_1035(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,TUP{STR,STR}}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
void BE_runtime_error_STR(BE self, STR s_4417) {
STR local0;
local0 = STR_plus_STR_STR(((STR) &fprintfstderr_4418), s_4417);
BE_ndefer_STR(self, STR_plus_STR_STR(local0, ((STR) &n_4419)));
BE_ndefer_STR(self, ((STR) &exit16_4420));
}
STR BE_emit_call_SIG(BE self, SIG fun_4421, ARRAYSTR arg_list) {
STR noname4422;
STR res = ((STR) NULL);
STR biname;
BOOL process_as_builtin = ((BOOL) 0);
CHAR noname4423 = ((CHAR) 0);
STR carg1;
STR carg2;
INT i = ((INT) 0);
CHAR noname4424 = ((CHAR) 0);
STR self_ob;
INT noname4425 = ((INT) 0);
INT noname4426 = ((INT) 0);
INT i_4427 = ((INT) 0);
BOOL local0;
BOOL local1;
FMAPSTRTUPSTRSTR local2;
FMAPSTRTUPSTRSTR local3;
FMAPSTRTUPSTRSTR local4;
CHAR local5;
BOOL local6;
BOOL local7;
BOOL local8;
TP local9;
TP local10;
TP local11;
TP local12;
STR local13;
STR local14;
STR local15;
STR local16;
STR local17;
STR local18;
CHAR local19;
BOOL local20;
STR local21;
STR local22;
STR local23;
STR local24;
TP local25;
STR local26;
STR local27;
BOOL local28;
STR local29;
STR local30;
STR local31;
STR local32;
STR local33;
STR local34;
STR local35;
STR local36;
STR local37;
INT local38;
INT local39;
INT local40;
INT local41;
STR local42;
biname = ((STR) NULL);
process_as_builtin = fun_4421->is_builtin;
if (process_as_builtin) {
if (self->chk_arith) {
local1 = TRUE;
} else {
local1 = self->chk_bounds;
}
local0 = local1;
} else {
local0 = FALSE;
}
if (local0) {
local2 = self->built_in_routines;
biname = (TUPSTRSTR_blob=FMAPSTRTUPSTRSTR_4411(local2, SIG_str_STR(fun_4421))).t2;
if (STR_is_eq_STR_BOOL(biname, ((STR) &nomacro))) {
process_as_builtin = FALSE;
}
}
if (process_as_builtin) {
if (self->chk_arith) {
local3 = self->built_in_routines;
biname = (TUPSTRSTR_blob=FMAPSTRTUPSTRSTR_4411(local3, SIG_str_STR(fun_4421))).t2;
}
else {
local4 = self->built_in_routines;
biname = (TUPSTRSTR_blob=FMAPSTRTUPSTRSTR_4411(local4, SIG_str_STR(fun_4421))).t1;
}
local5 = STR_aget_INT_CHAR(biname, 0);
if ((local5=='@')) {
noname4423 = STR_aget_INT_CHAR(biname, 1);
switch (noname4423) {
case '1':
carg1 = ARRAYSTR_aget_IN(arg_list, 1);
carg2 = ARRAYSTR_aget_IN(arg_list, 2);
local9 = ARRAYTP_aget_INT_TP(fun_4421->args_7, 0);
if ((*TP_is_value_BOOL[local9->header.tag+TP_is_value_BOOL_offset])(local9)) {
local8 = TRUE;
} else {
local10 = ARRAYTP_aget_INT_TP(fun_4421->args_7, 1);
local8 = (*TP_is_value_BOOL[local10->header.tag+TP_is_value_BOOL_offset])(local10);
}
if (local8) {
local7 = TRUE;
} else {
local11 = ARRAYTP_aget_INT_TP(fun_4421->args_7, 0);
local7 = (*TP_is_abstract_BOOL[local11->header.tag+TP_is_abstract_BOOL_offset])(local11);
}
if (local7) {
local6 = TRUE;
} else {
local12 = ARRAYTP_aget_INT_TP(fun_4421->args_7, 1);
local6 = (*TP_is_abstract_BOOL[local12->header.tag+TP_is_abstract_BOOL_offset])(local12);
}
if (local6) {
local13 = STR_plus_STR_STR(((STR) &c_SYS_ob_eq_OB_O), carg1);
local14 = STR_plus_CHAR_STR(local13, ',');
local15 = STR_plus_STR_STR(local14, carg2);
return STR_plus_CHAR_STR(local15, ')');
}
else {
local16 = STR_plus_STR_STR(((STR) &name_4428), carg1);
local17 = STR_plus_STR_STR(local16, ((STR) &name_4429));
local18 = STR_plus_STR_STR(local17, carg2);
return STR_plus_CHAR_STR(local18, ')');
}
break;
default: ;
BE_barf_STR(self, ((STR) &Dontrecognizefun));
}
}
res = ((STR) &name_4430);
i = 0;
while (1) {
if ((i>=STR_length_INT(biname))) {
goto after_loop;
}
local19 = STR_aget_INT_CHAR(biname, i);
if ((local19=='#')) {
i = (c_INT_plus_INT_INT_chk(i,1));
noname4424 = STR_aget_INT_CHAR(biname, i);
switch (noname4424) {
case '1':
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 0));
break;
case '2':
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 1));
break;
case '3':
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 2));
break;
case '4':
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 3));
break;
case '5':
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 4));
break;
default: ;
BE_barf_STR(self, ((STR) &BadspecinMACROS));
}
}
else {
res = STR_plus_CHAR_STR(res, STR_aget_INT_CHAR(biname, i));
}
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
return STR_plus_CHAR_STR(res, ')');
}
else {
if (BE_is_asize_SIG_BOOL(self, fun_4421)) {
if (self->chk_void) {
local20 = (!(self->prog->options_55->null_segfaults));
} else {
local20 = FALSE;
}
if (local20) {
local21 = ((STR) &if_4432);
local22 = STR_plus_STR_STR(local21, ARRAYSTR_aget_IN(arg_list, 0));
BE_ndefer_STR(self, STR_plus_STR_STR(local22, ((STR) &NULL_4433)));
BE_in(self);
BE_runtime_error_STR(self, STR_plus_STR_STR(((STR) &asizeaccessofvoidin), self->current_function_str));
BE_out(self);
BE_ndefer_STR(self, ((STR) &name_4434));
}
local23 = ((STR) &name_4435);
local24 = STR_plus_STR_STR(local23, ARRAYSTR_aget_IN(arg_list, 0));
return STR_plus_STR_STR(local24, ((STR) &asize_4436));
}
else {
local25 = fun_4421->tp;
if ((*TP_is_abstract_BOOL[local25->header.tag+TP_is_abstract_BOOL_offset])(local25)) {
self_ob = BE_dec_local_TP_STR(self, fun_4421->tp);
local26 = STR_plus_STR_STR(self_ob, ((STR) &name_4437));
local27 = STR_plus_STR_STR(local26, ARRAYSTR_aget_IN(arg_list, 0));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local27, ';'));
ARRAYSTR_aset_IN_4289(arg_list, 0, self_ob);
if (self->chk_void) {
local28 = (!(self->prog->options_55->null_segfaults));
} else {
local28 = FALSE;
}
if (local28) {
local29 = ((STR) &if_4438);
local30 = STR_plus_STR_STR(local29, ARRAYSTR_aget_IN(arg_list, 0));
BE_ndefer_STR(self, STR_plus_STR_STR(local30, ((STR) &NULL_4439)));
BE_in(self);
BE_runtime_error_STR(self, STR_plus_STR_STR(((STR) &Dispatchonvoidin), self->current_function_str));
BE_out(self);
BE_ndefer_STR(self, ((STR) &name_4440));
}
local31 = ((STR) &name_4441);
local32 = STR_plus_STR_STR(local31, BE_mangle_OB_STR(self, ((OB) fun_4421)));
local33 = STR_plus_STR_STR(local32, ((STR) &name_4442));
local34 = STR_plus_STR_STR(local33, ARRAYSTR_aget_IN(arg_list, 0));
local35 = STR_plus_STR_STR(local34, ((STR) &headertag));
local36 = STR_plus_STR_STR(local35, BE_mangle_OB_STR(self, ((OB) fun_4421)));
res = STR_plus_STR_STR(local36, ((STR) &S_offset));
}
else {
local37 = BE_mangle_OB_STR(self, ((OB) fun_4421));
res = STR_plus_CHAR_STR(local37, '(');
}
}
}
res = STR_plus_STR_STR(res, ARRAYSTR_aget_IN(arg_list, 0));
{
BOOL noname4445 = TRUE;
while (1) {
if (noname4445) {
noname4445 = FALSE;
noname4425 = 1;
local41 = ARRAYSTR_size_INT(arg_list);
noname4426 = (c_INT_minus_INT_INT_chk(local41,1));
local39 = noname4425;
local40 = noname4426;
local38 = local39;
} else {
local38++;
}
if (local38>local40) goto after_loop_4443;
i_4427 = local38;
local42 = STR_plus_STR_STR(res, ((STR) &name_4446));
res = STR_plus_STR_STR(local42, ARRAYSTR_aget_IN(arg_list, i_4427));
}
}
after_loop_4443: ;
return STR_plus_CHAR_STR(res, ')');
}
STR BE_emit_rout_cal(BE self, AM_ROUT_CALL_EXPR arce) {
STR noname4447;
ARRAYSTR arg_list;
arg_list = BE_emit_and_cast(self, arce);
return BE_emit_call_SIG(self, arce->fun, arg_list);
}
BOOL FMAPSTRITER_INLI_4448(FMAPSTRITER_INLINE self, STR k) {
BOOL noname4449 = ((BOOL) 0);
INT h = ((INT) 0);
STR tk;
STR tk_4450;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPSTRITER_INLINE) NULL))) {
return FALSE;
}
local0 = FMAPSTRITER_INLI_1149(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk, k)) {
return TRUE;
}
else {
if (FMAPSTRITER_INLI_1154(self, tk, FMAPSTRITER_INLI_1122(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_4450 = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk_4450, k)) {
return TRUE;
}
else {
if (FMAPSTRITER_INLI_1154(self, tk_4450, FMAPSTRITER_INLI_1122(self))) {
goto after_loop_4452;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4452: ;
local3 = (self->asize);
if (!((h!=(c_INT_minus_INT_INT_chk(local3,1))))) {
fprintf(stderr,"Violation of assertion ../Library/fmap.sa:133:15\n");
exit(16);
}
}
return FALSE;
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:119:7\n");
exit(16);
}
}
BOOL BE_is_built_in_i(BE self, SIG s_4454) {
BOOL noname4455 = ((BOOL) 0);
FMAPSTRITER_INLINE local0;
local0 = self->built_in_iters;
return FMAPSTRITER_INLI_4448(local0, SIG_str_STR(s_4454));
}
ITER_INLINE FMAPSTRITER_INLI_4456(FMAPSTRITER_INLINE self, STR k) {
ITER_INLINE noname4457;
INT h = ((INT) 0);
STR tk;
STR tk_4458;
INT local0;
INT local1;
INT local2;
INT local3;
if ((self==((FMAPSTRITER_INLINE) NULL))) {
return ((ITER_INLINE) NULL);
}
local0 = FMAPSTRITER_INLI_1149(self, k);
local1 = (self->asize);
h = (local0&(c_INT_minus_INT_INT_chk(local1,2)));
while (1) {
tk = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk, k)) {
return (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t2;
}
else {
if (FMAPSTRITER_INLI_1154(self, tk, FMAPSTRITER_INLI_1122(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_4458 = (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t1;
if (FMAPSTRITER_INLI_1154(self, tk_4458, k)) {
return (TUPSTRITER_INLINE_blob=FMAPSTRITER_INLI_1151(self, h)).t2;
}
else {
if (FMAPSTRITER_INLI_1154(self, tk_4458, FMAPSTRITER_INLI_1122(self))) {
goto after_loop_4460;
}
}
h = (c_INT_plus_INT_INT_chk(h,1));
}
after_loop_4460: ;
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 ((ITER_INLINE) NULL);
if (!FMAPSTRITER_INLI_1037(self)) {
fprintf(stderr,"Failed invariant FMAP{STR,ITER_INLINE}::invariant:BOOL ../Library/fmap.sa:136:6\n");
exit(16);
}
}
BOOL ARRAYBOOL_aget_I(ARRAYBOOL self, INT ind_4462) {
BOOL noname4463 = ((BOOL) 0);
BOOL local0;
INT local1;
INT local2;
if ((!((self==((ARRAYBOOL) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4462, 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_4462<0||ind_4462>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4462];
}
INT AM_ITER_CALL_EXP_4464(AM_ITER_CALL_EXPR self) {
INT noname4465 = ((INT) 0);
return self->asize;
fprintf(stderr,"Last statement wasn't return ../Library/aref.sa:20:8\n");
exit(16);
}
INT AM_ITER_CALL_EXP_4466(AM_ITER_CALL_EXPR self) {
INT noname4467 = ((INT) 0);
if ((self==((AM_ITER_CALL_EXPR) NULL))) {
return 0;
}
return (self->asize);
}
AM_EXPR AM_ITER_CALL_EXP_4468(AM_ITER_CALL_EXPR self, INT ind_4469) {
AM_EXPR noname4470;
BOOL local0;
INT local1;
INT local2;
if ((!((self==((AM_ITER_CALL_EXPR) NULL))))) {
local1 = 0;
local2 = (self->asize);
local0 = INT_is_bet_INT_I(ind_4469, 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_4469<0||ind_4469>=self->asize) {
fprintf(stderr,"Index out of bounds ../Library/aref.sa:33:7\n");
exit(16);
}
return self->arr_part[ind_4469];
}
STR BE_iter_inline_x(BE self, STR this_4471, STR arg1_4472, STR arg2_4473, STR s_4474) {
STR noname4475;
STR res;
INT i = ((INT) 0);
CHAR c_4476 = ((CHAR) 0);
CHAR noname4477 = ((CHAR) 0);
CHAR noname4478 = ((CHAR) 0);
STR local0;
res = ((STR) &name_4479);
i = 0;
while (1) {
if ((i>=STR_size_INT(s_4474))) {
goto after_loop;
}
c_4476 = STR_aget_INT_CHAR(s_4474, i);
noname4477 = c_4476;
switch (noname4477) {
case '@':
local0 = STR_plus_STR_STR(res, ((STR) &goto_4481));
res = STR_plus_STR_STR(local0, self->current_loop);
break;
case '#':
i = (c_INT_plus_INT_INT_chk(i,1));
noname4478 = STR_aget_INT_CHAR(s_4474, i);
switch (noname4478) {
case '#':
res = STR_plus_STR_STR(res, this_4471);
break;
case '1':
res = STR_plus_STR_STR(res, arg1_4472);
break;
case '2':
res = STR_plus_STR_STR(res, arg2_4473);
break;
default: ;
BE_barf_STR(self, ((STR) &Couldntinterpret));
}
break;
default: ;
res = STR_plus_CHAR_STR(res, c_4476);
}
i = (c_INT_plus_INT_INT_chk(i,1));
}
after_loop: ;
return res;
}
void BE_comment_STR(BE self, STR com_4482) {
STR local0;
if (self->prog->options_55->pretty) {
local0 = STR_plus_STR_STR(((STR) &name_4483), com_4482);
BE_ndefer_STR(self, STR_plus_STR_STR(local0, ((STR) &name_4484)));
}
}
STR BE_emit_builtin_(BE self, AM_ITER_CALL_EXPR aice) {
STR noname4485;
ITER_INLINE it;
STR not_seen;
STR this_4486 = ((STR) NULL);
STR arg1_4487;
BOOL arg2nothot = ((BOOL) 0);
STR arg2_4488 = ((STR) NULL);
FMAPSTRITER_INLINE local0;
BOOL local1;
INT local2;
TP local3;
FILE_20 local4;
FILE_20 local5;
FILE_20 local6;
STR local7;
STR local8;
STR local9;
STR local10;
BOOL local11;
STR local12;
TP local13;
AM_EXPR local14;
TP local15;
STR local16;
self->inlined_iter_count = (c_INT_plus_INT_INT_chk(self->inlined_iter_count,1));
local0 = self->built_in_iters;
it = FMAPSTRITER_INLI_4456(local0, SIG_str_STR(aice->fun));
if ((it==((ITER_INLINE) NULL))) {
BE_barf_STR(self, ((STR) &Couldntgetiterin));
}
not_seen = BE_mangle_OB_STR(self, ((OB) aice));
if ((!((aice->fun->ret==((TP) NULL))))) {
this_4486 = BE_dec_local_com(self, aice->fun->ret, ((STR) &Inlinedreturnvalue));
}
else {
this_4486 = STR_plus_CHAR_STR(not_seen, 't');
BE_forbid_STR(self, this_4486);
}
arg1_4487 = BE_dec_local_com(self, aice->fun->tp, ((STR) &Inlinedselftoiter));
if ((aice->fun->hot==((ARRAYBOOL) NULL))) {
local1 = TRUE;
} else {
local1 = (!(ARRAYBOOL_aget_I(aice->fun->hot, 0)));
}
arg2nothot = local1;
local2 = AM_ITER_CALL_EXP_4466(aice);
if ((local2>1)) {
if (arg2nothot) {
local3 = ARRAYTP_aget_INT_TP(aice->fun->args_7, 0);
arg2_4488 = BE_dec_local_com(self, local3, ((STR) &Inlined1stargtoiter));
}
else {
arg2_4488 = BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, 1));
}
}
local4 = self->code_c;
local5 = FILE_plus_STR_FILE(local4, BE_eol_STR(self));
local6 = FILE_plus_CHAR_FILE(local5, ' ');
(fwrite(BE_iter_inline_x(self, this_4486, arg1_4487, arg2_4488, it->at_decs)->arr_part,BE_iter_inline_x(self, this_4486, arg1_4487, arg2_4488, it->at_decs)->asize,1,local6->fp));
local7 = STR_plus_STR_STR(((STR) &if_4489), not_seen);
BE_ndefer_STR(self, STR_plus_STR_STR(local7, ((STR) &name_4490)));
BE_in(self);
BE_ndefer_STR(self, STR_plus_STR_STR(not_seen, ((STR) &FALSE_4491)));
local8 = ((STR) &Initializeinline);
BE_comment_STR(self, STR_plus_STR_STR(local8, SIG_str_STR(aice->fun)));
BE_emit_code_AM_STMT(self, aice->init);
local9 = STR_plus_STR_STR(arg1_4487, ((STR) &name_4492));
local10 = STR_plus_STR_STR(local9, BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, 0)));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local10, ';'));
if ((!((arg2_4488==((STR) NULL))))) {
local11 = arg2nothot;
} else {
local11 = FALSE;
}
if (local11) {
local12 = STR_plus_STR_STR(arg2_4488, ((STR) &name_4493));
local13 = ARRAYTP_aget_INT_TP(aice->fun->args_7, 0);
local14 = AM_ITER_CALL_EXP_4468(aice, 1);
local15 = (*AM_EXPR_tp_TP[local14->header.tag+AM_EXPR_tp_TP_offset])(local14);
local16 = STR_plus_STR_STR(local12, BE_cast_TP_TP_ST(self, local13, local15, BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, 1))));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local16, ';'));
}
BE_ndefer_STR(self, BE_iter_inline_x(self, this_4486, arg1_4487, arg2_4488, it->when_first_seen));
BE_out(self);
BE_ndefer_STR(self, ((STR) &else_4494));
BE_in(self);
BE_ndefer_STR(self, BE_iter_inline_x(self, this_4486, arg1_4487, arg2_4488, it->after_29));
BE_out(self);
BE_ndefer_STR(self, ((STR) &name_4495));
BE_ndefer_STR(self, BE_iter_inline_x(self, this_4486, arg1_4487, arg2_4488, it->before_28));
if ((!((aice->fun->ret==((TP) NULL))))) {
return this_4486;
}
return ((STR) &S0noreturnvaluef);
}
TP AM_ITER_CALL_EXP_4496(AM_ITER_CALL_EXPR self) {
TP noname4497;
return self->fun->ret;
}
STR BE_emit_iter_cal(BE self, AM_ITER_CALL_EXPR aice) {
STR noname4498;
STR s1 = ((STR) NULL);
STR res = ((STR) NULL);
AM_ITER_CALL_EXPR noname4499;
INT i = ((INT) 0);
INT noname4500 = ((INT) 0);
INT noname4501 = ((INT) 0);
INT i_4502 = ((INT) 0);
BOOL local0;
TP local1;
TP local2;
STR local3;
STR local4;
STR local5;
STR local6;
INT local7;
STR local8;
STR local9;
STR local10;
STR local11;
STR local12;
BOOL local13;
ARRAYBOOL local14;
STR local15;
STR local16;
STR local17;
STR local18;
ARRAYTP local19;
TP local20;
AM_EXPR local21;
TP local22;
STR local23;
INT local24;
INT local25;
INT local26;
INT local27;
ARRAYBOOL local28;
STR local29;
STR local30;
STR local31;
STR local32;
ARRAYTP local33;
TP local34;
AM_EXPR local35;
TP local36;
STR local37;
STR local38;
STR local39;
STR local40;
STR local41;
STR local42;
STR local43;
STR local44;
STR local45;
STR local46;
STR local47;
STR local48;
if ((!(SIG_is_iter_BOOL(self->current_function)))) {
local0 = BE_is_built_in_i(self, aice->fun);
} else {
local0 = FALSE;
}
if (local0) {
return BE_emit_builtin_(self, aice);
}
local1 = aice->fun->tp;
if ((*TP_is_abstract_BOOL[local1->header.tag+TP_is_abstract_BOOL_offset])(local1)) {
BE_barf_at_STR_P(self, ((STR) &Dispatcheditersn), ((PROG_ERR) aice));
}
if ((!((AM_ITER_CALL_EXP_4496(aice)==((TP) NULL))))) {
local2 = AM_ITER_CALL_EXP_4496(aice);
local3 = ((STR) &Holdsresultofcallto);
s1 = BE_dec_local_com(self, local2, STR_plus_STR_STR(local3, SIG_str_STR(aice->fun)));
}
local4 = ((STR) &if_4503);
local5 = STR_plus_STR_STR(local4, BE_mangle_OB_STR(self, ((OB) aice)));
BE_ndefer_STR(self, STR_plus_STR_STR(local5, ((STR) &state0_4504)));
BE_in(self);
local6 = ((STR) &Initializeoncear);
BE_comment_STR(self, STR_plus_STR_STR(local6, SIG_str_STR(aice->fun)));
BE_emit_code_AM_STMT(self, aice->init);
{
struct AM_ITER_CALL_EXP_4506_frame_struct temp4505_0;
AM_ITER_CALL_EXP_4506_frame
noname4507 = &temp4505_0;
noname4507->state = 0;
while (1) {
if (noname4507->state == 0) {
noname4499 = aice;
noname4507->arg0 = noname4499;
}
local7 = AM_ITER_CALL_EXP_4506(noname4507);
if (noname4507->state == -1) goto after_loop;
i = local7;
if ((i==0)) {
local8 = BE_mangle_OB_STR(self, ((OB) aice));
local9 = STR_plus_STR_STR(local8, ((STR) &arg_4508));
local10 = STR_plus_INT_STR(local9, i);
local11 = STR_plus_STR_STR(local10, ((STR) &name_4509));
local12 = STR_plus_STR_STR(local11, BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, i)));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local12, ';'));
}
else {
if ((aice->fun->hot==((ARRAYBOOL) NULL))) {
local13 = TRUE;
} else {
local14 = aice->fun->hot;
local13 = (!(ARRAYBOOL_aget_I(local14, (c_INT_minus_INT_INT_chk(i,1)))));
}
if (local13) {
local15 = BE_mangle_OB_STR(self, ((OB) aice));
local16 = STR_plus_STR_STR(local15, ((STR) &arg_4510));
local17 = STR_plus_INT_STR(local16, i);
local18 = STR_plus_STR_STR(local17, ((STR) &name_4511));
local19 = aice->fun->args_7;
local20 = ARRAYTP_aget_INT_TP(local19, (c_INT_minus_INT_INT_chk(i,1)));
local21 = AM_ITER_CALL_EXP_4468(aice, i);
local22 = (*AM_EXPR_tp_TP[local21->header.tag+AM_EXPR_tp_TP_offset])(local21);
local23 = STR_plus_STR_STR(local18, BE_cast_TP_TP_ST(self, local20, local22, BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, i))));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local23, ';'));
}
}
}
}
after_loop: ;
BE_out(self);
BE_ndefer_STR(self, ((STR) &name_4512));
if ((!((aice->fun->hot==((ARRAYBOOL) NULL))))) {
{
BOOL noname4515 = TRUE;
while (1) {
if (noname4515) {
noname4515 = FALSE;
noname4500 = 1;
local27 = (aice->asize);
noname4501 = (c_INT_minus_INT_INT_chk(local27,1));
local25 = noname4500;
local26 = noname4501;
local24 = local25;
} else {
local24++;
}
if (local24>local26) goto after_loop_4513;
i_4502 = local24;
local28 = aice->fun->hot;
if (ARRAYBOOL_aget_I(local28, (c_INT_minus_INT_INT_chk(i_4502,1)))) {
local29 = BE_mangle_OB_STR(self, ((OB) aice));
local30 = STR_plus_STR_STR(local29, ((STR) &arg_4516));
local31 = STR_plus_INT_STR(local30, i_4502);
local32 = STR_plus_STR_STR(local31, ((STR) &name_4517));
local33 = aice->fun->args_7;
local34 = ARRAYTP_aget_INT_TP(local33, (c_INT_minus_INT_INT_chk(i_4502,1)));
local35 = AM_ITER_CALL_EXP_4468(aice, i_4502);
local36 = (*AM_EXPR_tp_TP[local35->header.tag+AM_EXPR_tp_TP_offset])(local35);
local37 = STR_plus_STR_STR(local32, BE_cast_TP_TP_ST(self, local34, local36, BE_emit_expr_AM_(self, AM_ITER_CALL_EXP_4468(aice, i_4502))));
BE_ndefer_STR(self, STR_plus_CHAR_STR(local37, ';'));
BE_comment_STR(self, ((STR) &hotargument));
}
}
}
after_loop_4513: ;
}
if ((!((AM_ITER_CALL_EXP_4496(aice)==((TP) NULL))))) {
local38 = STR_plus_STR_STR(s1, ((STR) &name_4518));
local39 = STR_plus_STR_STR(local38, BE_mangle_OB_STR(self, ((OB) aice->fun)));
local40 = STR_plus_CHAR_STR(local39, '(');
local41 = STR_plus_STR_STR(local40, BE_mangle_OB_STR(self, ((OB) aice)));
BE_ndefer_STR(self, STR_plus_STR_STR(local41, ((STR) &name_4519)));
res = s1;
}
else {
local42 = BE_mangle_OB_STR(self, ((OB) aice->fun));
local43 = STR_plus_CHAR_STR(local42, '(');
local44 = STR_plus_STR_STR(local43, BE_mangle_OB_STR(self, ((OB) aice)));
BE_ndefer_STR(self, STR_plus_STR_STR(local44, ((STR) &name_4520)));
res = ((STR) &S0Noreturnvaluef);
}
local45 = ((STR) &if_4521);
local46 = STR_plus_STR_STR(local45, BE_mangle_OB_STR(self, ((OB) aice)));
local47 = STR_plus_STR_STR(local46, ((STR) &state1goto));
local48 = STR_plus_STR_STR(local47, self->current_loop);
BE_ndefer_STR(self, STR_plus_STR_STR(local48, ((STR) &name_4522)));
return res;
}
STR BE_Cify_CHAR_STR(BE self, CHAR c_4523) {
STR noname4524;
STR res;
CHAR noname4525 = ((CHAR) 0);
STR oc;
INT local0;
INT local1;
STR local2;
res = ((STR) &name_4526);
noname4525 = c_4523;
switch (noname4525) {
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
case 'y':
case 'z':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'A':
case 'B':
case 'C':
case 'D':
case 'E':
case 'F':
case 'G':
case 'H':
case 'I':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
case 'S':
case 'T':
case 'U':
case 'V':
case 'W':
case 'X':
case 'Y':
case 'Z':
case '!':
case '@':
case '#':
case '$':
case '%':
case '^':
case '&':
case '*':
case '(':
case ')':
case '-':
case '=':
case '+':
case '|':
case ':':
case ';':
case '`':
case '~':
case '_':
case ' ':
case ',':
case '.':
case '<':
case '>':
case '/':
case '?':
case '[':
case ']':
case '{':
case '}':
res = STR_plus_CHAR_STR(res, c_4523);
break;
case '\b':
res = STR_plus_STR_STR(res, ((STR) &b_4527));
break;
case '\f':
res = STR_plus_STR_STR(res, ((STR) &f_4528));
break;
case '\n':
res = STR_plus_STR_STR(res, ((STR) &n_4529));
break;
case '\r':
res = STR_plus_STR_STR(res, ((STR) &r_4530));
break;
case '\t':
res = STR_plus_STR_STR(res, ((STR) &t_4531));
break;
case '\v':
res = STR_plus_STR_STR(res, ((STR) &v_4532));
break;
case '\\':
res = STR_plus_STR_STR(res, ((STR) &name_4533));
break;
case '\'':
res = STR_plus_STR_STR(res, ((STR) &name_4534));
break;
case '\"':
res = STR_plus_STR_STR(res, ((STR) &name_4535));
break;
default: ;
oc = INT_octal_str_STR(((INT)c_4523));
local0 = 2;
local1 = STR_length_INT(oc);
oc = STR_substring_IN(oc, local0, (c_INT_minus_INT_INT_chk(local1,2)));
local2 = STR_plus_CHAR_STR(res, '\\');
res = STR_plus_STR_STR(local2, oc);
}
return res;
}
STR BE_Cify_STR_STR(BE self, STR arg_4536) {
STR noname4537;
FSTR res;
STR noname4538;
CHAR local0;
STR local1;
CHAR *local0p; INT local0n;
res = FSTR_create_FSTR(((FSTR) NULL));
{
BOOL noname4540 = TRUE;
while (1) {
if (noname4540) {
noname4540 = FALSE;
noname4538 = arg_4536;
local1 = noname4538;
local0p = local1->arr_part; local0n = local1->asize;
} else {
local0p++; local0n--;
}
if (local0n<=0) goto after_loop; local0 = *local0p;
res = FSTR_plus_STR_FSTR(res, BE_Cify_CHAR_STR(self, local0));
}
}
after_loop: ;
return FSTR_str_STR(res);
}
STR BE_emit_str_cons(BE self, AM_STR_CONST asc) {
STR noname4541;
STR res;
STR local0;
STR local1;
FILE_20 local2;
INT 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;
FILE_20 local17;
local0 = ((STR) &STR_4542);
local1 = STR_plus_STR_STR(local0, BE_mangle_OB_STR(self, ((OB) asc)));
res = STR_plus_CHAR_STR(local1, ')');
(fwrite(((STR) &struct_4543)->arr_part,((STR) &struct_4543)->asize,1,self->globals_c->fp));
(fwrite(((STR) &OB_HEADERheader_4544)->arr_part,((STR) &OB_HEADERheader_4544)->asize,1,self->globals_c->fp));
(fwrite(((STR) &INTasize_4545)->arr_part,((STR) &INTasize_4545)->asize,1,self->globals_c->fp));
local2 = FILE_plus_STR_FILE(self->globals_c, ((STR) &CHARarr_part));
local3 = STR_length_INT(asc->bval);
local4 = FILE_plus_INT_FILE(local2, (c_INT_plus_INT_INT_chk(local3,1)));
local5 = FILE_plus_STR_FILE(local4, ((STR) &name_4546));
local6 = FILE_plus_STR_FILE(local5, BE_mangle_OB_STR(self, ((OB) asc)));
(fwrite(((STR) &name_4547)->arr_part,((STR) &name_4547)->asize,1,local6->fp));
if (self->prog->options_55->deterministic_12) {
local7 = FILE_plus_STR_FILE(self->globals_c, ((STR) &name_4548));
local8 = FILE_plus_STR_FILE(local7, BE_tag_for_TP_STR(self, ((TP) self->prog->tp_builtin->str_4)));
local9 = FILE_plus_STR_FILE(local8, ((STR) &name_4549));
local10 = FILE_plus_INT_FILE(local9, self->str_count);
(fwrite(((STR) &name_4550)->arr_part,((STR) &name_4550)->asize,1,local10->fp));
self->str_count = (c_INT_plus_INT_INT_chk(self->str_count,1));
}
else {
local11 = self->globals_c;
(fwrite(BE_tag_for_TP_STR(self, ((TP) self->prog->tp_builtin->str_4))->arr_part,BE_tag_for_TP_STR(self, ((TP) self->prog->tp_builtin->str_4))->asize,1,local11->fp));
}
local12 = FILE_plus_STR_FILE(self->globals_c, ((STR) &name_4551));
local13 = FILE_plus_INT_FILE(local12, STR_length_INT(asc->bval));
local14 = FILE_plus_STR_FILE(local13, ((STR) &name_4552));
local15 = FILE_plus_STR_FILE(local14, BE_Cify_STR_STR(self, asc->bval));
(fwrite(((STR) &name_4553)->arr_part,((STR) &name_4553)->asize,1,local15->fp));
local16 = FILE_plus_STR_FILE(self->strings_h, ((STR) &externSTR));
local17 = FILE_plus_STR_FILE(local16, BE_mangle_OB_STR(self, ((OB) asc)));
FILE_plus_CHAR(local17, ';');
return res;
}
TUPBOOLINTIINTBOOL TUPBOOLINTIINTBO(TUPBOOLINTIINTBOOL self, BOOL t1_4554) {
TUPBOOLINTIINTBOOL local0;
local0 = self;
local0.t1 = t1_4554;
return local0;
}
TUPBOOLINTIINTBOOL TUPBOOLINTIINTBO_4555(TUPBOOLINTIINTBOOL self, INTI t2_4556) {
TUPBOOLINTIINTBOOL local0;
local0 = self;
local0.t2 = t2_4556;
return local0;
}
TUPBOOLINTIINTBOOL TUPBOOLINTIINTBO_4557(TUPBOOLINTIINTBOOL self, INT t3_4558) {
TUPBOOLINTIINTBOOL local0;
local0 = self;
local0.t3 = t3_4558;
return local0;
}
TUPBOOLINTIINTBOOL TUPBOOLINTIINTBO_4559(TUPBOOLINTIINTBOOL self, BOOL t4_4560) {
TUPBOOLINTIINTBOOL local0;
local0 = self;
local0.t4 = t4_4560;
return local0;
}
TUPBOOLINTIINTBOOL TUPBOOLINTIINTBO_4561(TUPBOOLINTIINTBOOL self, BOOL at1, INTI at2, INT at3, BOOL at4) {
TUPBOOLINTIINTBOOL noname4562 = TUPBOOLINTIINTBOOL_zero;
TUPBOOLINTIINTBOOL local0;
TUPBOOLINTIINTBOOL local1;
TUPBOOLINTIINTBOOL local2;
local0 = TUPBOOLINTIINTBO(self, at1);
local1 = TUPBOOLINTIINTBO_4555(local0, at2);
local2 = TUPBOOLINTIINTBO_4557(local1, at3);
return TUPBOOLINTIINTBO_4559(local2, at4);
}
INT INTI_log2_INT(INTI self) {
INT noname4563 = ((INT) 0);
INT local0;
INT local1;
if (!((self->len_37>0))) {
fprintf(stderr,"Violation of assertion ../Library/inti.sa:326:12\n");
exit(16);
}
local0 = (c_INT_minus_INT_INT_chk(self->len_37,1));
local1 = (c_INT_times_INT_INT_chk(local0,shared_INTI_log2B));
return (c_INT_plus_INT_INT_chk(local1,INT_highest_bit_INT(INTI_aget_INT_INT(self, (c_INT_minus_INT_INT_chk(self->len_37,1))))));
}
FLTD FLTD_log10_FLTD(FLTD self) {
FLTD noname4564 = ((FLTD) 0);
return log10(self);
}
FLTD FLTD_log2_FLTD(FLTD self) {
FLTD noname4565 = ((FLTD) 0);
FLTD local0;
local0 = FLTD_log10_FLTD(self);
return (local0/shared_FLTD_log10_2);
}
FLT FLT_log2_FLT(FLT self) {
FLT noname4566 = ((FLT) 0);
return ((FLT)FLTD_log2_FLTD(((FLTD)self)));
}
FLTD FLTD_round_FLTD(FLTD self) {
FLTD noname4567 = ((FLTD) 0);
return rint(self);
}
FLT FLT_round_FLT(FLT self) {
FLT noname4568 = ((FLT) 0);
return ((FLT)FLTD_round_FLTD(((FLTD)self)));
}
INT FLTD_int_INT(FLTD self) {
INT noname4569 = ((INT) 0);
FLTD local0;
return c_fltd_int(self);
local0 = ((FLTD)noname4569);
if (!((local0==self))) {
fprintf(stderr,"Violation of postcondition ../Library/fltd.sa:472:6\n");
exit(16);
}
}
INT FLT_int_INT(FLT self) {
INT noname4570 = ((INT) 0);
return FLTD_int_INT(((FLTD)self));
}
BOOL INTI_is_lt_INTI_BOOL(INTI self, INTI y) {
BOOL noname4571 = ((BOOL) 0);
INT local0;
local0 = INTI_cmp_INTI_INT(self, y);
return (local0<0);
}
BOOL INTI_is_geq_INTI(INTI self, INTI y) {
BOOL noname4572 = ((BOOL) 0);
INT local0;
local0 = INTI_cmp_INTI_INT(self, y);
return (local0>=0);
}
BOOL INTI_is_gt_INTI_BOOL(INTI self, INTI y) {
BOOL noname4573 = ((BOOL) 0);
INT local0;
local0 = INTI_cmp_INTI_INT(self, y);
return (local0>0);
}
BOOL INT_is_even_BOOL(INT self) {
BOOL noname4574 = ((BOOL) 0);
INT local0;
local0 = (self&1);
return (local0==0);
}
BOOL INTI_is_odd_BOOL(INTI self) {
BOOL noname4575 = ((BOOL) 0);
BOOL local0;
if (!(INT_is_even_BOOL(shared_INTI_B))) {
fprintf(stderr,"Violation of assertion ../Library/inti.sa:289:25\n");
exit(16);
}
if ((self->len_37==0)) {
local0 = TRUE;
} else {
local0 = INT_is_odd_BOOL(INTI_aget_INT_INT(self, 0));
}
return local0;
}
TUPBOOLINTIINTBOOL RAT_float_INT_IN(RAT self, INT n_4576, INT b_4577) {
TUPBOOLINTIINTBOOL noname4578 = TUPBOOLINTIINTBOOL_zero;
INTI beta;
INTI beta_n1;
INTI beta_n;
BOOL s_4579 = ((BOOL) 0);
INTI u_4580;
INTI v_4581;
INT e_4582 = ((INT) 0);
INTI m = ((INTI) NULL);
INTI r_4583;
INTI v_r;
BOOL local0;
TUPBOOLINTIINTBOOL local1;
BOOL local2;
INTI local3;
INT local4;
FLT local5;
BOOL local6;
BOOL local7;
TUPBOOLINTIINTBOOL local8;
if ((n_4576>0)) {
local0 = (b_4577>1);
} else {
local0 = FALSE;
}
if (!(local0)) {
fprintf(stderr,"Violation of precondition ../Library/rat.sa:90:8\n");
exit(16);
}
if (INTI_is_zero_BOOL(self.u)) {
local1 = TUPBOOLINTIINTBOOL_zero;
local2 = FALSE;
local3 = INTI_create_INT_INTI(((INTI) NULL), 0);
return TUPBOOLINTIINTBO_4561(local1, local2, local3, 0, TRUE);
}
beta = INTI_create_INT_INTI(((INTI) NULL), b_4577);
beta_n1 = INTI_pow_INT_INTI(beta, (c_INT_minus_INT_INT_chk(n_4576,1)));
beta_n = INTI_times_INTI_INTI(beta_n1, beta);
s_4579 = INTI_is_neg_BOOL(self.u);
u_4580 = INTI_abs_INTI(self.u);
v_4581 = self.v;
if (!(INTI_is_pos_BOOL(v_4581))) {
fprintf(stderr,"Violation of assertion ../Library/rat.sa:112:29\n");
exit(16);
}
local4 = INTI_log2_INT(u_4580);
e_4582 = (c_INT_minus_INT_INT_chk(local4,INTI_log2_INT(v_4581)));
if ((b_4577!=2)) {
local5 = ((FLT)e_4582);
e_4582 = FLT_int_INT(FLT_round_FLT((local5/FLT_log2_FLT(((FLT)b_4577)))));
}
e_4582 = (c_INT_minus_INT_INT_chk(e_4582,n_4576));
if ((e_4582<0)) {
u_4580 = INTI_times_INTI_INTI(u_4580, INTI_pow_INT_INTI(beta, INT_negate_INT(e_4582)));
}
else {
v_4581 = INTI_times_INTI_INTI(v_4581, INTI_pow_INT_INTI(beta, e_4582));
}
while (1) {
m = INTI_div_INTI_INTI(u_4580, v_4581);
if (INTI_is_lt_INTI_BOOL(m, beta_n1)) {
u_4580 = INTI_times_INTI_INTI(u_4580, beta);
e_4582 = (c_INT_minus_INT_INT_chk(e_4582,1));
}
else {
if (INTI_is_geq_INTI(m, beta_n)) {
v_4581 = INTI_times_INTI_INTI(v_4581, beta);
e_4582 = (c_INT_plus_INT_INT_chk(e_4582,1));
}
else {
goto after_loop;
}
}
}
after_loop: ;
r_4583 = INTI_mod_INTI_INTI(u_4580, v_4581);
v_r = INTI_minus_INTI_INTI(v_4581, r_4583);
if (INTI_is_gt_INTI_BOOL(r_4583, v_r)) {
local6 = TRUE;
} else {
if (INTI_is_eq_INTI_BOOL(r_4583, v_r)) {
local7 = INTI_is_odd_BOOL(m);
} else {
local7 = FALSE;
}
local6 = local7;
}
if (local6) {
m = INTI_plus_INTI_INTI(m, INTI_create_INT_INTI(((INTI) NULL), 1));
if (INTI_is_eq_INTI_BOOL(m, beta_n)) {
m = beta_n1;
e_4582 = (c_INT_plus_INT_INT_chk(e_4582,1));
}
}
local8 = TUPBOOLINTIINTBOOL_zero;
return TUPBOOLINTIINTBO_4561(local8, s_4579, m, e_4582, INTI_is_zero_BOOL(r_4583));
}
STR RAT_str_INT_STR(RAT self, INT n_4585) {
STR noname4586;
TUPBOOLINTIINTBOOL x = TUPBOOLINTIINTBOOL_zero;
STR s_4587;
STR local0;
if (!((n_4585>0))) {
fprintf(stderr,"Violation of precondition ../Library/rat.sa:155:6\n");
exit(16);
}
x = RAT_float_INT_IN(self, n_4585, 10);
s_4587 = ((STR) &name_4588);
if (x.t1) {
s_4587 = STR_plus_CHAR_STR(s_4587, '-');
}
s_4587 = STR_plus_STR_STR(s_4587, INTI_str_STR(x.t2));
if ((x.t3!=0)) {
local0 = STR_plus_CHAR_STR(s_4587, 'e');
s_4587 = STR_plus_INT_STR(local0, x.t3);
}
return s_4587;
}
STR BE_array_allocat(BE self, TP t_4589, STR n_4590) {
STR noname4591;
STR res = ((STR) NULL);
STR call_string = ((STR) NULL);
TP t2_4592;
TP local0;
TP local1;
STR local2;
STR local3;
STR local4;
STR local5;
STR local6;
STR local7;
STR local8;
STR local9;
STR local10;
STR local11;
STR local12;
STR local13;
STR local14;
STR local15;
t2_4592 = PROG_am_ob_def_f(self->prog, t_4589)->arr;
local0 = t_4589;
if ((*TP_is_atomic_BOOL[local0->header.tag+TP_is_atomic_BOOL_offset])(local0)) {
call_string = ((STR) &sbi_arr_alloc_at_4593);
}
else {
call_string = ((STR) &sbi_arr_alloc_4594);
}
local1 = t_4589;
if ((*TP_is_value_BOOL[local1->header.tag+TP_is_value_BOOL_offset])(local1)) {
local2 = ((STR) &name_4595);
local3 = STR_plus_STR_STR(local2, BE_mangle_OB_STR(self, ((OB) t_4589)));
local4 = STR_plus_STR_STR(local3, ((STR) &S_boxed_4596));
local5 = STR_plus_STR_STR(local4, call_string);
res = STR_plus_STR_STR(local5, BE_sizeof_boxed_(self, t_4589));
}
else {
local6 = ((STR) &name_4597);
local7 = STR_plus_STR_STR(local6, BE_mangle_OB_STR(self, ((OB) t_4589)));
local8 = STR_plus_STR_STR(local7, ((STR) &name_4598));
local9 = STR_plus_STR_STR(local8, call_string);
res = STR_plus_STR_STR(local9, BE_sizeof_TP_STR(self, t_4589));
}
local10 = STR_plus_STR_STR(res, ((STR) &name_4599));
local11 = STR_plus_STR_STR(local10, BE_tag_for_TP_STR(self, t_4589));
res = STR_plus_STR_STR(local11, ((STR) &name_4600));
local12 = STR_plus_STR_STR(res, ((STR) &sizeof_4601));
local13 = STR_plus_STR_STR(local12, BE_mangle_OB_STR(self, ((OB) t2_4592)));
local14 = STR_plus_STR_STR(local13, ((STR) &name_4602));
local15 = STR_plus_STR_STR(local14, n_4590);
return STR_plus_STR_STR(local15, ((STR) &name_4603));
}
TP AM_VATTR_ASSIGN_(AM_VATTR_ASSIGN_EXPR self) {
TP noname4604;
AM_EXPR local0;
local0 = self->ob;
return (*AM_EXPR_tp_TP[local0->header.tag+AM_EXPR_tp_TP_offset])(local0);
}