qbs* FUNC_UDTARRAYBOUNDEXPR(qbs*_FUNC_UDTARRAYBOUNDEXPR_STRING_DESCRIPTOR,int32*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIMENSION_COUNT,qbs*_FUNC_UDTARRAYBOUNDEXPR_STRING_DIMENSION_EXPR,int32*_FUNC_UDTARRAYBOUNDEXPR_LONG_WANT_UPPER){
qbs *tqbs;
ptrszint tmp_long;
int32 tmp_fileno;
uint32 qbs_tmp_base=qbs_tmp_list_nexti;
uint8 *tmp_mem_static_pointer=mem_static_pointer;
uint32 tmp_cmem_sp=cmem_sp;
#include "data16.txt"
mem_lock *sf_mem_lock;
new_mem_lock();
sf_mem_lock=mem_lock_tmp;
sf_mem_lock->type=3;
if (is_error_pending()) goto exit_subfunc;
do{
if(!qbevent)break;evnt(15146);}while(r);
do{
if(!qbevent)break;evnt(15147);}while(r);
do{
if(!qbevent)break;evnt(15148);}while(r);
do{
if(!qbevent)break;evnt(15149);}while(r);
do{
if(!qbevent)break;evnt(15150);}while(r);
do{
if(!qbevent)break;evnt(15151);}while(r);
S_17615:;
if ((-(*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIMENSION_COUNT<= 0 ))||is_error_pending()){
if(qbevent){evnt(15161);if(r)goto S_17615;}
do{
SUB_GIVE_ERROR(qbs_new_txt_len("TYPE member is not an array",27));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15161);}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(15161);}while(r);
}
do{
qbs_set(_FUNC_UDTARRAYBOUNDEXPR_STRING_HELPER_NAME,qbs_add(qbs_new_txt_len("udt_array_bound_",16),qbs__tostr((int32)(FUNC_UNIQUENUMBER()),NULL,0)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15163);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2571=*__LONG_GLOBTXTBUF),qbs_add(qbs_add(qbs_new_txt_len("static int64 ",13),_FUNC_UDTARRAYBOUNDEXPR_STRING_HELPER_NAME),qbs_new_txt_len("(int64 qb_dim){",15)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15165);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2572=*__LONG_GLOBTXTBUF),qbs_new_txt_len("switch(qb_dim){",15));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15166);}while(r);
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_DESC_POS= 1 ;
if(!qbevent)break;evnt(15168);}while(r);
S_17623:;
fornext_value2574= 1 ;
fornext_finalvalue2574=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIMENSION_COUNT;
fornext_step2574= 1 ;
if (fornext_step2574<0) fornext_step_negative2574=1; else fornext_step_negative2574=0;
if (is_error_pending()) goto fornext_error2574;
goto fornext_entrylabel2574;
while(1){
fornext_value2574=fornext_step2574+(*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_I);
fornext_entrylabel2574:
*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_I=fornext_value2574;
if (fornext_step_negative2574){
if (fornext_value2574<fornext_finalvalue2574) break;
}else{
if (fornext_value2574>fornext_finalvalue2574) break;
}
fornext_error2574:;
if(qbevent){evnt(15169);if(r)goto S_17623;}
S_17624:;
if ((qbs_cleanup(qbs_tmp_base,-(FUNC_PARSENEXTUDTARRAYDESCRIPTORDIM(_FUNC_UDTARRAYBOUNDEXPR_STRING_DESCRIPTOR,_FUNC_UDTARRAYBOUNDEXPR_LONG_DESC_POS,_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_LOWER,_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_ELEMENTS)== 0 )))||is_error_pending()){
if(qbevent){evnt(15170);if(r)goto S_17624;}
do{
SUB_GIVE_ERROR(qbs_new_txt_len("Invalid TYPE member array metadata",34));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15171);}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(15171);}while(r);
}
S_17628:;
if ((*_FUNC_UDTARRAYBOUNDEXPR_LONG_WANT_UPPER)||is_error_pending()){
if(qbevent){evnt(15174);if(r)goto S_17628;}
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_BOUND_VALUE=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_LOWER+*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_ELEMENTS- 1 ;
if(!qbevent)break;evnt(15175);}while(r);
}else{
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_BOUND_VALUE=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_LOWER;
if(!qbevent)break;evnt(15177);}while(r);
}
do{
SUB_WRITEBUFLINE(&(pass2575=*__LONG_GLOBTXTBUF),qbs_add(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("case ",5),qbs__tostr((int32)(*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_I),NULL,0)),qbs_new_txt_len(": return ",9)),qbs__tostr((int32)(*_FUNC_UDTARRAYBOUNDEXPR_LONG_BOUND_VALUE),NULL,0)),qbs_new_txt_len(";",1)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15180);}while(r);
fornext_continue_2573:;
}
fornext_exit_2573:;
do{
SUB_WRITEBUFLINE(&(pass2576=*__LONG_GLOBTXTBUF),qbs_new_txt_len("default: error(9); return 0;",28));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15183);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2577=*__LONG_GLOBTXTBUF),qbs_new_txt_len("}",1));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15184);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2578=*__LONG_GLOBTXTBUF),qbs_new_txt_len("}",1));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15185);}while(r);
do{
qbs_set(_FUNC_UDTARRAYBOUNDEXPR_STRING_UDTARRAYBOUNDEXPR,qbs_add(qbs_add(qbs_add(_FUNC_UDTARRAYBOUNDEXPR_STRING_HELPER_NAME,qbs_new_txt_len("(",1)),_FUNC_UDTARRAYBOUNDEXPR_STRING_DIMENSION_EXPR),qbs_new_txt_len(")",1)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(15187);}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free16.txt"
if ((tmp_mem_static_pointer>=mem_static)&&(tmp_mem_static_pointer<=mem_static_limit)) mem_static_pointer=tmp_mem_static_pointer; else mem_static_pointer=mem_static;
cmem_sp=tmp_cmem_sp;
qbs_maketmp(_FUNC_UDTARRAYBOUNDEXPR_STRING_UDTARRAYBOUNDEXPR);return _FUNC_UDTARRAYBOUNDEXPR_STRING_UDTARRAYBOUNDEXPR;
}
