void SUB_BUFTOFILE(int16*_SUB_BUFTOFILE_INTEGER_HANDLE,qbs*_SUB_BUFTOFILE_STRING_FILESPEC){
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 "data173.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(28168,115,"simplebuffer.bm");}while(r);
S_38279:;
if ((~(FUNC_CHECKHANDLE(_SUB_BUFTOFILE_INTEGER_HANDLE)))||is_error_pending()){
if(qbevent){evnt(28168,117,"simplebuffer.bm");if(r)goto S_38279;}
do{
error( 258 );
if(!qbevent)break;evnt(28168,117,"simplebuffer.bm");}while(r);
do{
close_program=1;
end();
if(!qbevent)break;evnt(28168,117,"simplebuffer.bm");}while(r);
}
do{
*_SUB_BUFTOFILE_LONG_BUF=*_SUB_BUFTOFILE_INTEGER_HANDLE* 106 ;
if(!qbevent)break;evnt(28168,118,"simplebuffer.bm");}while(r);
do{
*_SUB_BUFTOFILE_INTEGER_FF=func_freefile();
if(!qbevent)break;evnt(28168,120,"simplebuffer.bm");}while(r);
do{
qbs_set(_SUB_BUFTOFILE_STRING_DAT,qbs_left(((qbs*)(((uint64*)(__ARRAY_STRING_SIMPLEBUFFER_ARRAY[0]))[array_check((*_SUB_BUFTOFILE_LONG_BUF+ 0 )-__ARRAY_STRING_SIMPLEBUFFER_ARRAY[4],__ARRAY_STRING_SIMPLEBUFFER_ARRAY[5])])),FUNC_GETBUFLEN(_SUB_BUFTOFILE_INTEGER_HANDLE)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28168,120,"simplebuffer.bm");}while(r);
do{
sub_open(_SUB_BUFTOFILE_STRING_FILESPEC, 4 ,NULL, 4 ,*_SUB_BUFTOFILE_INTEGER_FF,NULL,0);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28168,121,"simplebuffer.bm");}while(r);
do{
sub_close(*_SUB_BUFTOFILE_INTEGER_FF,1);
if(!qbevent)break;evnt(28168,121,"simplebuffer.bm");}while(r);
do{
sub_open(_SUB_BUFTOFILE_STRING_FILESPEC, 2 ,NULL, 4 ,*_SUB_BUFTOFILE_INTEGER_FF,NULL,0);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28168,122,"simplebuffer.bm");}while(r);
do{
sub_put2(*_SUB_BUFTOFILE_INTEGER_FF,NULL,byte_element((uint64)_SUB_BUFTOFILE_STRING_DAT->chr,_SUB_BUFTOFILE_STRING_DAT->len,byte_element_4598),0);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28168,123,"simplebuffer.bm");}while(r);
do{
sub_close(*_SUB_BUFTOFILE_INTEGER_FF,1);
if(!qbevent)break;evnt(28168,124,"simplebuffer.bm");}while(r);
do{
sub_mid(((qbs*)(((uint64*)(__ARRAY_STRING_SIMPLEBUFFER_ARRAY[0]))[array_check((*_SUB_BUFTOFILE_LONG_BUF+ 1 )-__ARRAY_STRING_SIMPLEBUFFER_ARRAY[4],__ARRAY_STRING_SIMPLEBUFFER_ARRAY[5])])), 13 , 4 ,l2string( 0 ),1);
if(!qbevent)break;evnt(28168,126,"simplebuffer.bm");}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free173.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;
}
