void SUB_REMOVEELEMENTS(qbs*_SUB_REMOVEELEMENTS_STRING_A,int32*_SUB_REMOVEELEMENTS_LONG_FIRST,int32*_SUB_REMOVEELEMENTS_LONG_LAST,int32*_SUB_REMOVEELEMENTS_LONG_KEEPINDEXING){
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 "data141.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(28165,179,"elements.bas");}while(r);
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_new_txt_len("",0));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,181,"elements.bas");}while(r);
do{
*_SUB_REMOVEELEMENTS_LONG_N=FUNC_NUMELEMENTS(_SUB_REMOVEELEMENTS_STRING_A);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,186,"elements.bas");}while(r);
S_36970:;
fornext_value4436= 1 ;
fornext_finalvalue4436=*_SUB_REMOVEELEMENTS_LONG_N;
fornext_step4436= 1 ;
if (fornext_step4436<0) fornext_step_negative4436=1; else fornext_step_negative4436=0;
if (is_error_pending()) goto fornext_error4436;
goto fornext_entrylabel4436;
while(1){
fornext_value4436=fornext_step4436+(*_SUB_REMOVEELEMENTS_LONG_I);
fornext_entrylabel4436:
*_SUB_REMOVEELEMENTS_LONG_I=fornext_value4436;
if (fornext_step_negative4436){
if (fornext_value4436<fornext_finalvalue4436) break;
}else{
if (fornext_value4436>fornext_finalvalue4436) break;
}
fornext_error4436:;
if(qbevent){evnt(28165,187,"elements.bas");if(r)goto S_36970;}
S_36971:;
if (((-(*_SUB_REMOVEELEMENTS_LONG_I<*_SUB_REMOVEELEMENTS_LONG_FIRST))|(-(*_SUB_REMOVEELEMENTS_LONG_I>*_SUB_REMOVEELEMENTS_LONG_LAST)))||is_error_pending()){
if(qbevent){evnt(28165,188,"elements.bas");if(r)goto S_36971;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_add(qbs_add(_SUB_REMOVEELEMENTS_STRING_A2,__STRING1_SP),FUNC_GETELEMENT(_SUB_REMOVEELEMENTS_STRING_A,_SUB_REMOVEELEMENTS_LONG_I)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,189,"elements.bas");}while(r);
}else{
S_36974:;
if ((*_SUB_REMOVEELEMENTS_LONG_KEEPINDEXING)||is_error_pending()){
if(qbevent){evnt(28165,191,"elements.bas");if(r)goto S_36974;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_add(_SUB_REMOVEELEMENTS_STRING_A2,__STRING1_SP));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,191,"elements.bas");}while(r);
}
}
fornext_continue_4435:;
}
fornext_exit_4435:;
S_36979:;
if ((qbs_cleanup(qbs_tmp_base,qbs_equal(qbs_left(_SUB_REMOVEELEMENTS_STRING_A2, 1 ),__STRING1_SP)))||is_error_pending()){
if(qbevent){evnt(28165,194,"elements.bas");if(r)goto S_36979;}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A2,qbs_right(_SUB_REMOVEELEMENTS_STRING_A2,_SUB_REMOVEELEMENTS_STRING_A2->len- 1 ));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,194,"elements.bas");}while(r);
}
do{
qbs_set(_SUB_REMOVEELEMENTS_STRING_A,_SUB_REMOVEELEMENTS_STRING_A2);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28165,196,"elements.bas");}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free141.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;
}
