#line 59 "internal/support/include/afterlastline.bm"
qbs* FUNC__ENCODEURL(qbs*_FUNC__ENCODEURL_STRING__URL){
#line 59 "internal/support/include/afterlastline.bm"
qbs *tqbs;
#line 59 "internal/support/include/afterlastline.bm"
ptrszint tmp_long;
#line 59 "internal/support/include/afterlastline.bm"
int32 tmp_fileno;
#line 59 "internal/support/include/afterlastline.bm"
uint32 qbs_tmp_base=qbs_tmp_list_nexti;
#line 59 "internal/support/include/afterlastline.bm"
uint8 *tmp_mem_static_pointer=mem_static_pointer;
#line 59 "internal/support/include/afterlastline.bm"
uint32 tmp_cmem_sp=cmem_sp;
#line 59 "internal/support/include/afterlastline.bm"
#include "data509.txt"
#line 59 "internal/support/include/afterlastline.bm"
mem_lock *sf_mem_lock;
#line 59 "internal/support/include/afterlastline.bm"
new_mem_lock();
#line 59 "internal/support/include/afterlastline.bm"
sf_mem_lock=mem_lock_tmp;
#line 59 "internal/support/include/afterlastline.bm"
sf_mem_lock->type=3;
#line 59 "internal/support/include/afterlastline.bm"
libqb_check_stack();
#line 59 "internal/support/include/afterlastline.bm"
if (is_error_pending()) goto exit_subfunc;
#line 66 "internal/support/include/afterlastline.bm"
qbs_set(_FUNC__ENCODEURL_STRING__TMP,qbs_new_txt_len("",0));
#line 66 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 66 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__INQUERY= 0ll ;
#line 66 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__ISKEY= 0ll ;
#line 68 "internal/support/include/afterlastline.bm"
fornext_value7483= 1 ;
#line 68 "internal/support/include/afterlastline.bm"
fornext_finalvalue7483=_FUNC__ENCODEURL_STRING__URL->len;
#line 68 "internal/support/include/afterlastline.bm"
fornext_step7483= 1 ;
#line 68 "internal/support/include/afterlastline.bm"
if (fornext_step7483<0) fornext_step_negative7483=1; else fornext_step_negative7483=0;
#line 68 "internal/support/include/afterlastline.bm"
if (is_error_pending()) goto fornext_error7483;
#line 68 "internal/support/include/afterlastline.bm"
goto fornext_entrylabel7483;
#line 68 "internal/support/include/afterlastline.bm"
while(1){
#line 68 "internal/support/include/afterlastline.bm"
fornext_value7483=fornext_step7483+(*_FUNC__ENCODEURL_INTEGER__P);
#line 68 "internal/support/include/afterlastline.bm"
fornext_entrylabel7483:
#line 68 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__P=fornext_value7483;
#line 68 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 68 "internal/support/include/afterlastline.bm"
if (fornext_step_negative7483){
#line 68 "internal/support/include/afterlastline.bm"
if (fornext_value7483<fornext_finalvalue7483) break;
#line 68 "internal/support/include/afterlastline.bm"
}else{
#line 68 "internal/support/include/afterlastline.bm"
if (fornext_value7483>fornext_finalvalue7483) break;
#line 68 "internal/support/include/afterlastline.bm"
}
#line 68 "internal/support/include/afterlastline.bm"
fornext_error7483:;
#line 69 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__A=qbs_asc(_FUNC__ENCODEURL_STRING__URL,*_FUNC__ENCODEURL_INTEGER__P);
#line 69 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 69 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__VALID= 0ll ;
#line 72 "internal/support/include/afterlastline.bm"
if (((*_FUNC__ENCODEURL_INTEGER__A==( 45ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 46ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 95ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 126ll ))||((*_FUNC__ENCODEURL_INTEGER__A>=( 48 ))&&(*_FUNC__ENCODEURL_INTEGER__A<=( 57 )))||((*_FUNC__ENCODEURL_INTEGER__A>=( 65 ))&&(*_FUNC__ENCODEURL_INTEGER__A<=( 90 )))||((*_FUNC__ENCODEURL_INTEGER__A>=( 97 ))&&(*_FUNC__ENCODEURL_INTEGER__A<=( 122 ))))||is_error_pending()){
#line 73 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__VALID= -1ll ;
#line 74 "internal/support/include/afterlastline.bm"
sc_ec_613_end:;
#line 74 "internal/support/include/afterlastline.bm"
goto sc_7485_end;
#line 74 "internal/support/include/afterlastline.bm"
}
#line 74 "internal/support/include/afterlastline.bm"
if (((*_FUNC__ENCODEURL_INTEGER__A==( 35ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 47ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 58ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 63ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 64ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 91ll ))||(*_FUNC__ENCODEURL_INTEGER__A==( 93ll )))||is_error_pending()){
#line 75 "internal/support/include/afterlastline.bm"
if ((~(*_FUNC__ENCODEURL_INTEGER__INQUERY))||is_error_pending()){
#line 76 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__VALID= -1ll ;
#line 77 "internal/support/include/afterlastline.bm"
if ((-(*_FUNC__ENCODEURL_INTEGER__A== 63ll ))||is_error_pending()){
#line 77 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__INQUERY= -1ll ;
#line 77 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__ISKEY= -1ll ;
#line 77 "internal/support/include/afterlastline.bm"
}
#line 78 "internal/support/include/afterlastline.bm"
}
#line 79 "internal/support/include/afterlastline.bm"
sc_ec_614_end:;
#line 79 "internal/support/include/afterlastline.bm"
goto sc_7485_end;
#line 79 "internal/support/include/afterlastline.bm"
}
#line 79 "internal/support/include/afterlastline.bm"
if (((*_FUNC__ENCODEURL_INTEGER__A==( 61ll )))||is_error_pending()){
#line 80 "internal/support/include/afterlastline.bm"
if ((*_FUNC__ENCODEURL_INTEGER__INQUERY&*_FUNC__ENCODEURL_INTEGER__ISKEY)||is_error_pending()){
#line 80 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__VALID= -1ll ;
#line 80 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__ISKEY= 0ll ;
#line 80 "internal/support/include/afterlastline.bm"
}
#line 81 "internal/support/include/afterlastline.bm"
sc_ec_615_end:;
#line 81 "internal/support/include/afterlastline.bm"
goto sc_7485_end;
#line 81 "internal/support/include/afterlastline.bm"
}
#line 81 "internal/support/include/afterlastline.bm"
if (((*_FUNC__ENCODEURL_INTEGER__A==( 38ll )))||is_error_pending()){
#line 82 "internal/support/include/afterlastline.bm"
if ((*_FUNC__ENCODEURL_INTEGER__INQUERY&(~(*_FUNC__ENCODEURL_INTEGER__ISKEY)))||is_error_pending()){
#line 82 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__VALID= -1ll ;
#line 82 "internal/support/include/afterlastline.bm"
*_FUNC__ENCODEURL_INTEGER__ISKEY= -1ll ;
#line 82 "internal/support/include/afterlastline.bm"
}
#line 83 "internal/support/include/afterlastline.bm"
sc_ec_616_end:;
#line 83 "internal/support/include/afterlastline.bm"
goto sc_7485_end;
#line 83 "internal/support/include/afterlastline.bm"
}
#line 83 "internal/support/include/afterlastline.bm"
sc_7485_end:;
#line 85 "internal/support/include/afterlastline.bm"
if ((*_FUNC__ENCODEURL_INTEGER__VALID)||is_error_pending()){
#line 86 "internal/support/include/afterlastline.bm"
qbs_set(_FUNC__ENCODEURL_STRING__TMP,qbs_add(_FUNC__ENCODEURL_STRING__TMP,func_chr(*_FUNC__ENCODEURL_INTEGER__A)));
#line 86 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 87 "internal/support/include/afterlastline.bm"
}else{
#line 88 "internal/support/include/afterlastline.bm"
qbs_set(_FUNC__ENCODEURL_STRING__TMP,qbs_add(qbs_add(_FUNC__ENCODEURL_STRING__TMP,qbs_new_txt_len("%",1)),qbs_right(qbs_add(qbs_new_txt_len("00",2),func_hex(*_FUNC__ENCODEURL_INTEGER__A,4)), 2 )));
#line 88 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 89 "internal/support/include/afterlastline.bm"
}
#line 90 "internal/support/include/afterlastline.bm"
fornext_continue_7482:;
#line 90 "internal/support/include/afterlastline.bm"
}
#line 90 "internal/support/include/afterlastline.bm"
fornext_exit_7482:;
#line 92 "internal/support/include/afterlastline.bm"
qbs_set(_FUNC__ENCODEURL_STRING__ENCODEURL,_FUNC__ENCODEURL_STRING__TMP);
#line 92 "internal/support/include/afterlastline.bm"
qbs_cleanup(qbs_tmp_base,0);
#line 93 "internal/support/include/afterlastline.bm"
exit_subfunc:;
#line 93 "internal/support/include/afterlastline.bm"
free_mem_lock(sf_mem_lock);
#line 93 "internal/support/include/afterlastline.bm"
#include "free509.txt"
#line 93 "internal/support/include/afterlastline.bm"
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;
#line 93 "internal/support/include/afterlastline.bm"
cmem_sp=tmp_cmem_sp;
#line 93 "internal/support/include/afterlastline.bm"
qbs_maketmp(_FUNC__ENCODEURL_STRING__ENCODEURL);return _FUNC__ENCODEURL_STRING__ENCODEURL;
#line 93 "internal/support/include/afterlastline.bm"
}
