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 "data31.txt"
mem_lock *sf_mem_lock;
new_mem_lock();
sf_mem_lock=mem_lock_tmp;
sf_mem_lock->type=3;
libqb_check_stack();
if (is_error_pending()) goto exit_subfunc;
do{
if(!qbevent)break;evnt(16327);}while(r);
do{
if(!qbevent)break;evnt(16328);}while(r);
do{
if(!qbevent)break;evnt(16329);}while(r);
do{
if(!qbevent)break;evnt(16330);}while(r);
do{
if(!qbevent)break;evnt(16331);}while(r);
do{
if(!qbevent)break;evnt(16332);}while(r);
S_18856:;
if ((-(*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIMENSION_COUNT<= 0 ))||is_error_pending()){
if(qbevent){evnt(16342);if(r)goto S_18856;}
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(16342);}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(16342);}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(16344);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2767=*__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(16346);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2768=*__LONG_GLOBTXTBUF),qbs_new_txt_len("switch(qb_dim){",15));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(16347);}while(r);
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_DESC_POS= 1 ;
if(!qbevent)break;evnt(16349);}while(r);
S_18864:;
fornext_value2770= 1 ;
fornext_finalvalue2770=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIMENSION_COUNT;
fornext_step2770= 1 ;
if (fornext_step2770<0) fornext_step_negative2770=1; else fornext_step_negative2770=0;
if (is_error_pending()) goto fornext_error2770;
goto fornext_entrylabel2770;
while(1){
fornext_value2770=fornext_step2770+(*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_I);
fornext_entrylabel2770:
*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_I=fornext_value2770;
if (fornext_step_negative2770){
if (fornext_value2770<fornext_finalvalue2770) break;
}else{
if (fornext_value2770>fornext_finalvalue2770) break;
}
fornext_error2770:;
if(qbevent){evnt(16350);if(r)goto S_18864;}
S_18865:;
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(16351);if(r)goto S_18865;}
do{
SUB_GIVE_ERROR(qbs_new_txt_len("Cannot process the declared bounds of this TYPE member array",60));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(16352);}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(16352);}while(r);
}
S_18869:;
if ((*_FUNC_UDTARRAYBOUNDEXPR_LONG_WANT_UPPER)||is_error_pending()){
if(qbevent){evnt(16355);if(r)goto S_18869;}
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_BOUND_VALUE=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_LOWER+*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_ELEMENTS- 1 ;
if(!qbevent)break;evnt(16356);}while(r);
}else{
do{
*_FUNC_UDTARRAYBOUNDEXPR_LONG_BOUND_VALUE=*_FUNC_UDTARRAYBOUNDEXPR_LONG_DIM_LOWER;
if(!qbevent)break;evnt(16358);}while(r);
}
do{
SUB_WRITEBUFLINE(&(pass2771=*__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(16361);}while(r);
fornext_continue_2769:;
}
fornext_exit_2769:;
do{
SUB_WRITEBUFLINE(&(pass2772=*__LONG_GLOBTXTBUF),qbs_new_txt_len("default: error(9); return 0;",28));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(16364);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2773=*__LONG_GLOBTXTBUF),qbs_new_txt_len("}",1));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(16365);}while(r);
do{
SUB_WRITEBUFLINE(&(pass2774=*__LONG_GLOBTXTBUF),qbs_new_txt_len("}",1));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(16366);}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(16368);}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free31.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;
}
