/*
-- ANSI C code generated by :
-- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
-- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
-- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
--                 http://www.loria.fr/SmallEiffel              --
*/
#include "pretty.h"
/*No:FIXED_ARRAY[RUN_FEATURE_5].storage*/
/*No:FIXED_ARRAY[RUN_FEATURE_5].capacity*/
void r185with_capacity(T185* C,int a1){
/*IF*/if (((((T185*)C))->_capacity/*4*/)<(a1)) {
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI*/C->_upper=-(1);
}
/*No:FIXED_ARRAY[RUN_FEATURE_5].put*/
/*No:FIXED_ARRAY[RUN_FEATURE_5].upper*/
void r185add_last(T185* C,T0* a1){
int _new_capacity=0;
/*IF*/if ((((((T185*)C))->_upper/*8*/)+(1))<=(((((T185*)C))->_capacity/*4*/)-(1))) {
C->_upper=((((T185*)C))->_upper/*8*/)+(1);
}
 else if (((((T185*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else {
_new_capacity=(2)*((((T185*)C))->_capacity/*4*/);
C->_storage=r654realloc((((T185*)C))->_storage/*0*/,(((T185*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((((T185*)C))->_upper/*8*/)+(1);
}
/*FI*//*[IRF3.5put*/((((T185*)C))->_storage/*0*/)[(((T185*)C))->_upper/*8*/]=(a1);
/*]*/
}
T0* r96item(T96* C,int a1){
T0* R=NULL;
R=((((T96*)C))->_storage/*4*/)[(a1)-((((T96*)C))->_lower/*16*/)];
return R;
}
/*No:ARRAY[EXPRESSION].storage*/
T0* r96twin(T96* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T96*)R)=M96;
r96copy(((T96*)R),((T0*)C));
return R;
}
/*No:ARRAY[EXPRESSION].capacity*/
void r96copy(T96* C,T0* a1){
int _needed_capacity=0;
C->_lower=/*X96*/((int)(((T96*)((T96*)a1)))->_lower/*16*/);
C->_upper=/*X96*/((int)(((T96*)((T96*)a1)))->_upper/*12*/);
_needed_capacity=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
/*IF*/if (((((T96*)C))->_capacity/*8*/)<(_needed_capacity)) {
C->_capacity=_needed_capacity;
C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
}
/*FI*//*IF*/if ((_needed_capacity)>(0)) {
r500copy_from((((T96*)C))->_storage/*4*/,/*X96*/((T500)(((T96*)((T96*)a1)))->_storage/*4*/),(_needed_capacity)-(1));
}
/*FI*/}
/*No:ARRAY[EXPRESSION].lower*/
/*No:ARRAY[EXPRESSION].put*/
/*No:ARRAY[EXPRESSION].upper*/
int r96count(T96* C){
int R=0;
R=(((((T96*)C))->_upper/*12*/)-((((T96*)C))->_lower/*16*/))+(1);
return R;
}
void r96add_last(T96* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T96*)C))->_capacity/*8*/)<((r96count(C))+(1))) {
/*IF*/if (((((T96*)C))->_capacity/*8*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T96*)C))->_capacity/*8*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T96*)C))->_capacity/*8*/);
C->_storage=r500realloc((((T96*)C))->_storage/*4*/,(((T96*)C))->_capacity/*8*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T96*)C))->_upper/*12*/)+(1);
/*[IRF3.6put*/{T96* C1=C;
T0* b1=a1;
int b2=(((T96*)C))->_upper/*12*/;
((((T96*)C1))->_storage/*4*/)[(b2)-((((T96*)C1))->_lower/*16*/)]=(b1);
}/*]*/
}
T0* r96first(T96* C){
T0* R=NULL;
R=r96item(C,(((T96*)C))->_lower/*16*/);
return R;
}
T0* r681item(T681* C,int a1){
T0* R=NULL;
R=((((T681*)C))->_storage/*0*/)[(a1)-((((T681*)C))->_lower/*12*/)];
return R;
}
/*No:ARRAY[FORMAL_GENERIC_ARG].storage*/
/*No:ARRAY[FORMAL_GENERIC_ARG].capacity*/
/*No:ARRAY[FORMAL_GENERIC_ARG].lower*/
/*No:ARRAY[FORMAL_GENERIC_ARG].put*/
/*No:ARRAY[FORMAL_GENERIC_ARG].upper*/
int r681count(T681* C){
int R=0;
R=(((((T681*)C))->_upper/*8*/)-((((T681*)C))->_lower/*12*/))+(1);
return R;
}
void r681add_last(T681* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T681*)C))->_capacity/*4*/)<((r681count(C))+(1))) {
/*IF*/if (((((T681*)C))->_capacity/*4*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T681*)C))->_capacity/*4*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T681*)C))->_capacity/*4*/);
C->_storage=r973realloc((((T681*)C))->_storage/*0*/,(((T681*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T681*)C))->_upper/*8*/)+(1);
/*[IRF3.6put*/{T681* C1=C;
T0* b1=a1;
int b2=(((T681*)C))->_upper/*8*/;
((((T681*)C1))->_storage/*0*/)[(b2)-((((T681*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
/*No:ARRAY[STRING].clear_all*/
/*No:ARRAY[STRING].set_all_with*/
int r52empty(T52* C){
int R=0;
R=(r52count(C))==(0);
return R;
}
void r52make(T52* C,int a1,int a2){
int _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*IF*/if ((_needed)>(0)) {
/*IF*/if (((((T52*)C))->_capacity/*4*/)<(_needed)) {
/*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(_needed,sizeof(T0*));
}
else {
C->_storage=calloc(_needed,sizeof(T0*));
}
/*FI*/C->_capacity=_needed;
}
else {
/*[IRF3.6clear_all*/{T52* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T52* C2=C1;
T0* c1=__value;
r400set_all_with((((T52*)C2))->_storage/*0*/,c1,((((T52*)C2))->_upper/*8*/)-((((T52*)C2))->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI*/}
/*FI*/}
int r52fast_has(T52* C,T0* a1){
int R=0;
/*IF*/if ((r52count(C))>(0)) {
R=(r52fast_index_of(C,a1))<=((((T52*)C))->_upper/*8*/);
}
/*FI*/return R;
}
T0* r52item(T52* C,int a1){
T0* R=NULL;
R=((((T52*)C))->_storage/*0*/)[(a1)-((((T52*)C))->_lower/*12*/)];
return R;
}
void r52resize(T52* C,int a1,int a2){
int _mem=0;
int _up=0;
int _i=0;
T0* _other=NULL;
{T52*n=malloc(sizeof(*n));
*n=M52;
r52make(n,a1,a2);
_other=(T0*)n;
}
_i=r2max((((T52*)C))->_lower/*12*/,(((T52*)((T52*)_other)))->_lower/*12*/);
_up=r2min((((T52*)C))->_upper/*8*/,(((T52*)((T52*)_other)))->_upper/*8*/);
while (!((_i)>(_up))) {
/*[IRF3.6put*/{T52* C1=((T52*)_other);
T0* b1=r52item(C,_i);
int b2=_i;
((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
}/*]*/
_i=(_i)+(1);
}
*((T52*)(C))=*((T52*)(_other));
}
void r52clear(T52* C){
C->_upper=((((T52*)C))->_lower/*12*/)-(1);
}
/*No:ARRAY[STRING].storage*/
/*No:ARRAY[STRING].capacity*/
/*No:ARRAY[STRING].lower*/
int r52fast_index_of(T52* C,T0* a1){
int R=0;
R=((((T52*)C))->_lower/*12*/)+(r400fast_index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
return R;
}
/*No:ARRAY[STRING].put*/
/*No:ARRAY[STRING].upper*/
int r52count(T52* C){
int R=0;
R=(((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/))+(1);
return R;
}
void r52add_last(T52* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T52*)C))->_capacity/*4*/)<((r52count(C))+(1))) {
/*IF*/if (((((T52*)C))->_capacity/*4*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T52*)C))->_capacity/*4*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T52*)C))->_capacity/*4*/);
C->_storage=r400realloc((((T52*)C))->_storage/*0*/,(((T52*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T52*)C))->_upper/*8*/)+(1);
/*[IRF3.6put*/{T52* C1=C;
T0* b1=a1;
int b2=(((T52*)C))->_upper/*8*/;
((((T52*)C1))->_storage/*0*/)[(b2)-((((T52*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
T0* r52first(T52* C){
T0* R=NULL;
R=r52item(C,(((T52*)C))->_lower/*12*/);
return R;
}
int r52index_of(T52* C,T0* a1){
int R=0;
R=((((T52*)C))->_lower/*12*/)+(r400index_of((((T52*)C))->_storage/*0*/,a1,((((T52*)C))->_upper/*8*/)-((((T52*)C))->_lower/*12*/)));
return R;
}
/*No:FIXED_ARRAY[RUN_FEATURE_6].storage*/
/*No:FIXED_ARRAY[RUN_FEATURE_6].capacity*/
void r222with_capacity(T222* C,int a1){
/*IF*/if (((((T222*)C))->_capacity/*4*/)<(a1)) {
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI*/C->_upper=-(1);
}
/*No:FIXED_ARRAY[RUN_FEATURE_6].put*/
/*No:FIXED_ARRAY[RUN_FEATURE_6].upper*/
void r222add_last(T222* C,T0* a1){
int _new_capacity=0;
/*IF*/if ((((((T222*)C))->_upper/*8*/)+(1))<=(((((T222*)C))->_capacity/*4*/)-(1))) {
C->_upper=((((T222*)C))->_upper/*8*/)+(1);
}
 else if (((((T222*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else {
_new_capacity=(2)*((((T222*)C))->_capacity/*4*/);
C->_storage=r692realloc((((T222*)C))->_storage/*0*/,(((T222*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((((T222*)C))->_upper/*8*/)+(1);
}
/*FI*//*[IRF3.5put*/((((T222*)C))->_storage/*0*/)[(((T222*)C))->_upper/*8*/]=(a1);
/*]*/
}
int r907fast_has(T907* C,T0* a1){
int R=0;
/*IF*/if ((/*(IRF4.6count*/((((T907*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
R=(r907fast_index_of(C,a1))<=((((T907*)C))->_upper/*8*/);
}
/*FI*/return R;
}
/*No:FIXED_ARRAY[POSITION].item*/
/*No:FIXED_ARRAY[POSITION].clear*/
/*No:FIXED_ARRAY[POSITION].storage*/
/*No:FIXED_ARRAY[POSITION].capacity*/
/*No:FIXED_ARRAY[POSITION].lower*/
void r907with_capacity(T907* C,int a1){
/*IF*/if (((((T907*)C))->_capacity/*4*/)<(a1)) {
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI*/C->_upper=-(1);
}
int r907fast_index_of(T907* C,T0* a1){
int R=0;
R=r379fast_index_of((((T907*)C))->_storage/*0*/,a1,(((T907*)C))->_upper/*8*/);
return R;
}
/*No:FIXED_ARRAY[POSITION].put*/
/*No:FIXED_ARRAY[POSITION].upper*/
/*No:FIXED_ARRAY[POSITION].count*/
void r907add_last(T907* C,T0* a1){
int _new_capacity=0;
/*IF*/if ((((((T907*)C))->_upper/*8*/)+(1))<=(((((T907*)C))->_capacity/*4*/)-(1))) {
C->_upper=((((T907*)C))->_upper/*8*/)+(1);
}
 else if (((((T907*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(2,sizeof(T0*));
C->_capacity=2;
C->_upper=0;
}
else {
_new_capacity=(2)*((((T907*)C))->_capacity/*4*/);
C->_storage=r379realloc((((T907*)C))->_storage/*0*/,(((T907*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
C->_upper=((((T907*)C))->_upper/*8*/)+(1);
}
/*FI*//*[IRF3.5put*/((((T907*)C))->_storage/*0*/)[(((T907*)C))->_upper/*8*/]=(a1);
/*]*/
}
/*No:FIXED_ARRAY[POSITION].first*/
/*No:ARRAY[BASE_CLASS].clear_all*/
/*No:ARRAY[BASE_CLASS].set_all_with*/
void r863make(T863* C,int a1,int a2){
int _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*IF*/if ((_needed)>(0)) {
/*IF*/if (((((T863*)C))->_capacity/*4*/)<(_needed)) {
/*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(_needed,sizeof(T0*));
}
else {
C->_storage=calloc(_needed,sizeof(T0*));
}
/*FI*/C->_capacity=_needed;
}
else {
/*[IRF3.6clear_all*/{T863* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T863* C2=C1;
T0* c1=__value;
r113set_all_with((((T863*)C2))->_storage/*0*/,c1,((((T863*)C2))->_upper/*8*/)-((((T863*)C2))->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI*/}
/*FI*/}
int r863fast_has(T863* C,T0* a1){
int R=0;
/*IF*/if ((r863count(C))>(0)) {
R=(r863fast_index_of(C,a1))<=((((T863*)C))->_upper/*8*/);
}
/*FI*/return R;
}
T0* r863item(T863* C,int a1){
T0* R=NULL;
R=((((T863*)C))->_storage/*0*/)[(a1)-((((T863*)C))->_lower/*12*/)];
return R;
}
void r863resize(T863* C,int a1,int a2){
int _mem=0;
int _up=0;
int _i=0;
T0* _other=NULL;
{T863*n=malloc(sizeof(*n));
*n=M863;
r863make(n,a1,a2);
_other=(T0*)n;
}
_i=r2max((((T863*)C))->_lower/*12*/,(((T863*)((T863*)_other)))->_lower/*12*/);
_up=r2min((((T863*)C))->_upper/*8*/,(((T863*)((T863*)_other)))->_upper/*8*/);
while (!((_i)>(_up))) {
/*[IRF3.6put*/{T863* C1=((T863*)_other);
T0* b1=r863item(C,_i);
int b2=_i;
((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
}/*]*/
_i=(_i)+(1);
}
*((T863*)(C))=*((T863*)(_other));
}
void r863clear(T863* C){
C->_upper=((((T863*)C))->_lower/*12*/)-(1);
}
/*No:ARRAY[BASE_CLASS].storage*/
/*No:ARRAY[BASE_CLASS].capacity*/
/*No:ARRAY[BASE_CLASS].lower*/
void r863with_capacity(T863* C,int a1,int a2){
/*IF*/if (((((T863*)C))->_capacity/*4*/)<(a1)) {
C->_storage=calloc(a1,sizeof(T0*));
C->_capacity=a1;
}
/*FI*/C->_lower=a2;
C->_upper=(a2)-(1);
}
int r863fast_index_of(T863* C,T0* a1){
int R=0;
R=((((T863*)C))->_lower/*12*/)+(r113fast_index_of((((T863*)C))->_storage/*0*/,a1,((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/)));
return R;
}
/*No:ARRAY[BASE_CLASS].put*/
/*No:ARRAY[BASE_CLASS].upper*/
int r863count(T863* C){
int R=0;
R=(((((T863*)C))->_upper/*8*/)-((((T863*)C))->_lower/*12*/))+(1);
return R;
}
void r863add_last(T863* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T863*)C))->_capacity/*4*/)<((r863count(C))+(1))) {
/*IF*/if (((((T863*)C))->_capacity/*4*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T863*)C))->_capacity/*4*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T863*)C))->_capacity/*4*/);
C->_storage=r113realloc((((T863*)C))->_storage/*0*/,(((T863*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T863*)C))->_upper/*8*/)+(1);
/*[IRF3.6put*/{T863* C1=C;
T0* b1=a1;
int b2=(((T863*)C))->_upper/*8*/;
((((T863*)C1))->_storage/*0*/)[(b2)-((((T863*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
T0* r863first(T863* C){
T0* R=NULL;
R=r863item(C,(((T863*)C))->_lower/*12*/);
return R;
}
/*No:ARRAY[ASSERTION].clear_all*/
/*No:ARRAY[ASSERTION].set_all_with*/
int r608empty(T608* C){
int R=0;
R=(r608count(C))==(0);
return R;
}
void r608make(T608* C,int a1,int a2){
int _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*IF*/if ((_needed)>(0)) {
/*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed)) {
/*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(_needed,sizeof(T0*));
}
else {
C->_storage=calloc(_needed,sizeof(T0*));
}
/*FI*/C->_capacity=_needed;
}
else {
/*[IRF3.6clear_all*/{T608* C1=C;
T0* __value=NULL;
/*[IRF3.6set_all_with*/{T608* C2=C1;
T0* c1=__value;
r51set_all_with((((T608*)C2))->_storage/*0*/,c1,((((T608*)C2))->_upper/*8*/)-((((T608*)C2))->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI*/}
/*FI*/}
int r608fast_has(T608* C,T0* a1){
int R=0;
/*IF*/if ((r608count(C))>(0)) {
R=(r608fast_index_of(C,a1))<=((((T608*)C))->_upper/*8*/);
}
/*FI*/return R;
}
T0* r608item(T608* C,int a1){
T0* R=NULL;
R=((((T608*)C))->_storage/*0*/)[(a1)-((((T608*)C))->_lower/*12*/)];
return R;
}
void r608clear(T608* C){
C->_upper=((((T608*)C))->_lower/*12*/)-(1);
}
/*No:ARRAY[ASSERTION].storage*/
T0* r608twin(T608* C){
T0* R=NULL;
R=malloc(sizeof(*C));
*((T608*)R)=M608;
r608copy(((T608*)R),((T0*)C));
return R;
}
/*No:ARRAY[ASSERTION].capacity*/
void r608copy(T608* C,T0* a1){
int _needed_capacity=0;
C->_lower=(((T608*)((T608*)a1)))->_lower/*12*/;
C->_upper=(((T608*)((T608*)a1)))->_upper/*8*/;
_needed_capacity=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
/*IF*/if (((((T608*)C))->_capacity/*4*/)<(_needed_capacity)) {
C->_capacity=_needed_capacity;
C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
}
/*FI*//*IF*/if ((_needed_capacity)>(0)) {
r51copy_from((((T608*)C))->_storage/*0*/,(((T608*)((T608*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
}
/*FI*/}
/*No:ARRAY[ASSERTION].lower*/
int r608fast_index_of(T608* C,T0* a1){
int R=0;
R=((((T608*)C))->_lower/*12*/)+(r51fast_index_of((((T608*)C))->_storage/*0*/,a1,((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/)));
return R;
}
/*No:ARRAY[ASSERTION].put*/
/*No:ARRAY[ASSERTION].upper*/
int r608count(T608* C){
int R=0;
R=(((((T608*)C))->_upper/*8*/)-((((T608*)C))->_lower/*12*/))+(1);
return R;
}
void r608add_last(T608* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T608*)C))->_capacity/*4*/)<((r608count(C))+(1))) {
/*IF*/if (((((T608*)C))->_capacity/*4*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T608*)C))->_capacity/*4*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T608*)C))->_capacity/*4*/);
C->_storage=r51realloc((((T608*)C))->_storage/*0*/,(((T608*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T608*)C))->_upper/*8*/)+(1);
/*[IRF3.6put*/{T608* C1=C;
T0* b1=a1;
int b2=(((T608*)C))->_upper/*8*/;
((((T608*)C1))->_storage/*0*/)[(b2)-((((T608*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
T0* r382item(T382* C,int a1){
T0* R=NULL;
R=((((T382*)C))->_storage/*0*/)[(a1)-((((T382*)C))->_lower/*12*/)];
return R;
}
/*No:ARRAY[DECLARATION].storage*/
/*No:ARRAY[DECLARATION].capacity*/
/*No:ARRAY[DECLARATION].lower*/
/*No:ARRAY[DECLARATION].put*/
/*No:ARRAY[DECLARATION].upper*/
int r382count(T382* C){
int R=0;
R=(((((T382*)C))->_upper/*8*/)-((((T382*)C))->_lower/*12*/))+(1);
return R;
}
void r382add_last(T382* C,T0* a1){
int _new_capacity=0;
/*IF*/if (((((T382*)C))->_capacity/*4*/)<((r382count(C))+(1))) {
/*IF*/if (((((T382*)C))->_capacity/*4*/)==(0)) {
C->_capacity=16;
C->_storage=calloc((((T382*)C))->_capacity/*4*/,sizeof(T0*));
}
else {
_new_capacity=(2)*((((T382*)C))->_capacity/*4*/);
C->_storage=r667realloc((((T382*)C))->_storage/*0*/,(((T382*)C))->_capacity/*4*/,_new_capacity);
C->_capacity=_new_capacity;
}
/*FI*/}
/*FI*/C->_upper=((((T382*)C))->_upper/*8*/)+(1);
/*[IRF3.6put*/{T382* C1=C;
T0* b1=a1;
int b2=(((T382*)C))->_upper/*8*/;
((((T382*)C1))->_storage/*0*/)[(b2)-((((T382*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
T0* r382first(T382* C){
T0* R=NULL;
R=r382item(C,(((T382*)C))->_lower/*12*/);
return R;
}
/*No:ARRAY[BOOLEAN].clear_all*/
/*No:ARRAY[BOOLEAN].set_all_with*/
void r353force(T353* C,int a1,int a2){
/*IF*/if (((((T353*)C))->_upper/*8*/)<(a2)) {
r353resize(C,(((T353*)C))->_lower/*12*/,a2);
}
 else if ((a2)<((((T353*)C))->_lower/*12*/)) {
r353resize(C,a2,(((T353*)C))->_upper/*8*/);
}
/*FI*//*[IRF3.6put*/{T353* C1=C;
int b1=a1;
int b2=a2;
((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
}/*]*/
}
void r353make(T353* C,int a1,int a2){
int _needed=0;
C->_lower=a1;
C->_upper=a2;
_needed=((a2)-(a1))+(1);
/*IF*/if ((_needed)>(0)) {
/*IF*/if (((((T353*)C))->_capacity/*4*/)<(_needed)) {
/*IF*/if (((((T353*)C))->_capacity/*4*/)==(0)) {
C->_storage=calloc(_needed,sizeof(int));
}
else {
C->_storage=calloc(_needed,sizeof(int));
}
/*FI*/C->_capacity=_needed;
}
else {
/*[IRF3.6clear_all*/{T353* C1=C;
int __value=0;
/*[IRF3.6set_all_with*/{T353* C2=C1;
int c1=__value;
r567set_all_with((((T353*)C2))->_storage/*0*/,c1,((((T353*)C2))->_upper/*8*/)-((((T353*)C2))->_lower/*12*/));
}/*]*/
}/*]*/
}
/*FI*/}
/*FI*/}
int r353item(T353* C,int a1){
int R=0;
R=((((T353*)C))->_storage/*0*/)[(a1)-((((T353*)C))->_lower/*12*/)];
return R;
}
void r353resize(T353* C,int a1,int a2){
int _mem=0;
int _up=0;
int _i=0;
T0* _other=NULL;
{T353*n=malloc(sizeof(*n));
*n=M353;
r353make(n,a1,a2);
_other=(T0*)n;
}
_i=r2max((((T353*)C))->_lower/*12*/,(((T353*)((T353*)_other)))->_lower/*12*/);
_up=r2min((((T353*)C))->_upper/*8*/,(((T353*)((T353*)_other)))->_upper/*8*/);
while (!((_i)>(_up))) {
/*[IRF3.6put*/{T353* C1=((T353*)_other);
int b1=r353item(C,_i);
int b2=_i;
((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
}/*]*/
_i=(_i)+(1);
}
*((T353*)(C))=*((T353*)(_other));
}
/*No:ARRAY[BOOLEAN].storage*/
/*No:ARRAY[BOOLEAN].capacity*/
/*No:ARRAY[BOOLEAN].lower*/
/*No:ARRAY[BOOLEAN].put*/
/*No:ARRAY[BOOLEAN].upper*/
int r353valid_index(T353* C,int a1){
int R=0;
R=(((((T353*)C))->_lower/*12*/)<=(a1))&&((a1)<=((((T353*)C))->_upper/*8*/));
return R;
}
void r353set_slice_with(T353* C,int a1,int a2,int a3){
int _i=0;
_i=a2;
while (!((_i)>(a3))) {
/*[IRF3.6put*/{T353* C1=C;
int b1=a1;
int b2=_i;
((((T353*)C1))->_storage/*0*/)[(b2)-((((T353*)C1))->_lower/*12*/)]=(b1);
}/*]*/
_i=(_i)+(1);
}
}

