LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/build/tools/mconfig-gen.cc
// Function: stringify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static std::string stringify(std::string a)
{
    std::string out = "\"";

    for (std::string::size_type i = 0; i < a.length(); i++) {
        char c = a[i];
        if (c == '\n') out += "\\n";
        else if (c == '\t') out += "\\t";
        else if (c == '\"') out += "\\\"";
        else if (c < 0x20) {
            out += "\\x" ;
            out += to_hex_digit((c & 0xF0) >> 4);
            out += to_hex_digit((c & 0x0F));
        }
        else out += c;
    }

    out += "\"";
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
leaq 0x1089(%rip), %rsi      # 0x43d7
leaq 0x1083(%rip), %rdx      # 0x43d8
callq 0x3666
cmpq $0x0, 0x8(%r14)
je 0x3414
xorl %r13d, %r13d
leaq 0x1064(%rip), %rbp      # 0x43d3
leaq 0x105a(%rip), %r15      # 0x43d0
movq (%r14), %rax
movzbl (%rax,%r13), %r12d
movq %rbp, %rsi
cmpl $0x9, %r12d
je 0x339f
cmpl $0x22, %r12d
je 0x3398
cmpl $0xa, %r12d
jne 0x33a9
movq %r15, %rsi
jmp 0x339f
leaq 0x1037(%rip), %rsi      # 0x43d6
movq %rbx, %rdi
callq 0x21e0
jmp 0x3407
cmpb $0x1f, %r12b
jg 0x33fb
movq %rbx, %rdi
leaq 0x1020(%rip), %rsi      # 0x43d9
callq 0x21e0
movl $0x30, %eax
cmpb $-0x60, %r12b
jb 0x33ce
movl $0x37, %eax
movl %r12d, %ecx
shrb $0x4, %cl
addb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x20f0
andb $0xf, %r12b
movl $0x30, %eax
cmpb $0xa, %r12b
jb 0x33f5
movl $0x37, %eax
addb %r12b, %al
movl %eax, %r12d
movsbl %r12b, %esi
movq %rbx, %rdi
callq 0x20f0
incq %r13
cmpq 0x8(%r14), %r13
jb 0x3376
leaq 0xfbc(%rip), %rsi       # 0x43d7
movq %rbx, %rdi
callq 0x21e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3437
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x3452
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2120
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/shengzh-oOoO[P]CodeSim/src/text_moss.cpp
// Function: CodeFile::CreateHashList()
void CreateHashList(){
        FILE *fid = fopen(filename,"r");
        if(fid == NULL){
            printf("打开%s失败\n",filename);
            assert(false);
        }
        char ch = 0;
        char prev_ch = 0;
        while(EOF!=(ch= fgetc(fid))){
        	if (ch=='\n'||ch=='\t'){
        		ch = ' ';
        	}
        	if(prev_ch == ' '&& ch ==' '){
        		continue;
        	}
            if (hashwindow.size() < N_GRAM_K){
                hashwindow.push_back(ch);    
            }
            else{
                hashlist.push_back(RSHash());
                hashwindow.pop_front();
                hashwindow.push_back(ch);
            }
            prev_ch = ch;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xa88(%rip), %rsi       # 0x207b
callq 0x10d0
testq %rax, %rax
je 0x16da
movq %rax, %r14
leaq 0x68(%rbx), %r15
leaq 0x80(%rbx), %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x1100
movl %eax, %r13d
movzbl %r13b, %eax
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jae 0x1632
movb $0x20, %r13b
jmp 0x163d
cmpl $0xff, %eax
je 0x16cb
cmpb $0x20, %r12b
jne 0x1649
cmpb $0x20, %r13b
je 0x1616
cmpq $0xa, 0x78(%rbx)
jb 0x16a6
movq %rbx, %rdi
callq 0x18f4
movq %rax, -0x38(%rbp)
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x167c
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x1689
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x1952
movq 0x68(%rbx), %r12
decq 0x78(%rbx)
movq %r12, %rdi
callq 0x1120
movl $0x18, %esi
movq %r12, %rdi
callq 0x10c0
movl $0x18, %edi
callq 0x10b0
movb %r13b, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x1040
incq 0x78(%rbx)
movl %r13d, %r12d
jmp 0x1616
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x99c(%rip), %rdi       # 0x207d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0x946(%rip), %rdi       # 0x2038
leaq 0x945(%rip), %rsi       # 0x203e
leaq 0x98d(%rip), %rcx       # 0x208d
movl $0x2b, %edx
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/shengzh-oOoO[P]CodeSim/src/text_moss.cpp
// Function: CodeFile::Winnowing()
void Winnowing(){
        list<long> win;
        vector<long>::iterator h;
        long before = LONG_LONG_MAX;
        for (h = hashlist.begin(); h != hashlist.end(); h++){
            if (win.size() < WINNOWING_SIZE){
                win.push_back(*h);
            }
            else{
                list<long>::iterator i;
                long min = LONG_LONG_MAX;
                for (i = win.begin(); i != win.end(); i++){
                    if(*i < min) min = *i;
                }
                if(min !=  before){
                    before = min;
                    result.push_back(min);
                }
                win.pop_front();
                win.push_back(*h);
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x48(%rbp), %rbx
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x80(%rdi), %r12
cmpq 0x88(%rdi), %r12
je 0x1834
movq %rdi, %r14
movabsq $0x7fffffffffffffff, %r15 # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x98(%rdi), %rax
movq %rax, -0x50(%rbp)
cmpq $0x4, -0x38(%rbp)
ja 0x1770
movl $0x18, %edi
callq 0x10b0
jmp 0x180c
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
cmpq %rbx, %rax
je 0x17a9
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x10(%rax), %rdx
cmpq %rcx, %rdx
jge 0x17a1
movq %rdx, -0x30(%rbp)
movq %rdx, %rcx
movq (%rax), %rax
cmpq %rbx, %rax
jne 0x1791
movq -0x30(%rbp), %r13
cmpq %r15, %r13
je 0x17e5
movq 0xa0(%r14), %rsi
cmpq 0xa8(%r14), %rsi
je 0x17d5
movq %r13, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xa0(%r14)
movq %r13, %r15
jmp 0x17e5
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x1a92
movq %r13, %r15
movq -0x48(%rbp), %r13
decq -0x38(%rbp)
movq %r13, %rdi
callq 0x1120
movl $0x18, %esi
movq %r13, %rdi
callq 0x10c0
movl $0x18, %edi
callq 0x10b0
movq (%r12), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1040
incq -0x38(%rbp)
addq $0x8, %r12
cmpq 0x88(%r14), %r12
jne 0x175a
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1852
movq (%rdi), %r14
movl $0x18, %esi
callq 0x10c0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x183d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1863
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1884
movq (%rdi), %r15
movl $0x18, %esi
callq 0x10c0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x186f
movq %r14, %rdi
callq 0x1130
// File: /workspace/github_cpp_makefile_star2_O1/shengzh-oOoO[P]CodeSim/src/text_moss.cpp
// Function: CodeFile::RSHash()
long RSHash(){
        long b = 378551;
        long a = 63689;
        long hash = 0;
        assert(hashwindow.size() == N_GRAM_K);
        list<char>::iterator i;
        for (i = hashwindow.begin(); i != hashwindow.end(); i++){
        	// printf("%c", (*i));
            hash = hash * a + (long) (*i);
            a = a * b;
        }
        // printf("\n");
        return hash;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0xa, 0x78(%rdi)
jne 0x1933
addq $0x68, %rdi
movq (%rdi), %rcx
cmpq %rdi, %rcx
je 0x192f
movl $0xf8c9, %edx           # imm = 0xF8C9
xorl %eax, %eax
imulq %rdx, %rax
movsbq 0x10(%rcx), %rsi
addq %rsi, %rax
imulq $0x5c6b7, %rdx, %rdx    # imm = 0x5C6B7
movq (%rcx), %rcx
cmpq %rdi, %rcx
jne 0x1912
jmp 0x1931
xorl %eax, %eax
popq %rbp
retq
leaq 0x78d(%rip), %rdi       # 0x20c7
leaq 0x6fd(%rip), %rsi       # 0x203e
leaq 0x79d(%rip), %rcx       # 0x20e5
movl $0x18, %edx
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/EvalContinua.c
// Function: show_reactivo(unsigned int)
int show_reactivo(unsigned int index)
{
  printf("\n/************************************************/\n");
  if((index>=0)&&(index<NUMDREAC)){
    printf("REACTIVO %u:\n",index+1);
    printf("%s\n",REACTIVO[index]);
    printf("\n/************************************************/\n");
  }else{
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
leaq 0xcb2(%rip), %rdi       # 0x30bf
callq 0x2210
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2, %r14d
ja 0x2450
leal 0x1(%r14), %esi
leaq 0xbdc(%rip), %rdi       # 0x3004
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2040
movl %r14d, %edi
shlq $0xb, %rdi
addq 0x2b79(%rip), %rdi      # 0x4fb8
callq 0x2210
leaq 0xc74(%rip), %rdi       # 0x30bf
callq 0x2210
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/EvalContinua.c
// Function: siguiente_turno()
unsigned int siguiente_turno(){
  int candidato_a_ser_reactivo_en_turno;
  if(cantidad_de_reactivos_usados==NUMDREAC){
    modificado=false;
    return 0;
  }
  if((NUMDREAC-cantidad_de_reactivos_usados)==1){
unsigned int usar_NUMDREAC_buckets();
    if((reactivo_en_turno=usar_NUMDREAC_buckets())>0){
//printf("candidato_a_ser_reactivo_en_turno=%u\n",candidato_a_ser_reactivo_en_turno);
      goto actualizacion;
    }
  }
  if(cantidad_de_reactivos_usados<NUMDREAC){
    srand(time(NULL));
    candidato_a_ser_reactivo_en_turno=1+rand()%NUMDREAC;
bool asignado(unsigned int);
    while(asignado(candidato_a_ser_reactivo_en_turno)){
      candidato_a_ser_reactivo_en_turno=1+rand()%NUMDREAC;
    }
    reactivo_en_turno=candidato_a_ser_reactivo_en_turno;
    assert(reactivo_en_turno<=NUMDREAC);
void actualizar_reactivos_usados(unsigned int);
actualizacion:
    actualizar_reactivos_usados(reactivo_en_turno);
  }
  return reactivo_en_turno;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x450b(%rip), %rbx      # 0x6970
movl (%rbx), %r14d
cmpl $0x2, %r14d
je 0x2485
cmpl $0x3, %r14d
jne 0x249b
leaq 0x4505(%rip), %rax      # 0x6980
movb $0x0, (%rax)
xorl %eax, %eax
jmp 0x2534
callq 0x2558
leaq 0x44f3(%rip), %rcx      # 0x6984
movl %eax, (%rcx)
testl %eax, %eax
jne 0x251d
cmpl $0x2, %r14d
ja 0x252b
xorl %edi, %edi
callq 0x2120
movl %eax, %edi
callq 0x2130
leaq 0x44be(%rip), %r14      # 0x6978
callq 0x2080
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %ecx, %eax
incl %eax
movl (%rbx), %ecx
testq %rcx, %rcx
setne %dl
je 0x250b
movq (%r14), %rdx
cmpl %eax, (%rdx)
je 0x24ba
movl $0x1, %edi
movq %rdi, %rsi
cmpq %rdi, %rcx
je 0x2505
leaq 0x1(%rsi), %rdi
cmpl %eax, (%rdx,%rsi,4)
jne 0x24f4
cmpq %rcx, %rsi
setb %dl
testb %dl, %dl
jne 0x24ba
leaq 0x446e(%rip), %rcx      # 0x6984
movl %eax, (%rcx)
cmpl $0x4, %eax
jae 0x2539
leaq 0x4460(%rip), %rax      # 0x6984
movl (%rax), %edi
callq 0x25e5
leaq 0x4452(%rip), %rax      # 0x6984
movl (%rax), %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xad2(%rip), %rdi       # 0x3012
leaq 0xae7(%rip), %rsi       # 0x302e
leaq 0xaef(%rip), %rcx       # 0x303d
movl $0x43, %edx
callq 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/EvalContinua.c
// Function: usar_NUMDREAC_buckets()
unsigned int usar_NUMDREAC_buckets()
{
  char bucket[NUMDREAC+1]={0};        /* buckets o cubetas a utilizar */
  int i;
  for(i=0;i<cantidad_de_reactivos_usados;i++){
    bucket[reactivos_usados[i]]=1;
  }
  for(i=1;i<NUMDREAC;i++){
    if(bucket[i]==0){
      return i;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
leaq 0x4406(%rip), %rax      # 0x6970
movl (%rax), %eax
testq %rax, %rax
je 0x258d
leaq 0x4400(%rip), %rcx      # 0x6978
movq (%rcx), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movb $0x1, -0x4(%rbp,%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x257d
movl $0x1, %eax
cmpb $0x0, -0x4(%rbp,%rax)
je 0x25a4
incq %rax
cmpq $0x3, %rax
jne 0x2592
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/EvalContinua.c
// Function: asignado(unsigned int)
bool asignado(unsigned int candidato)
{
  unsigned int i;
  for(i=0;i<cantidad_de_reactivos_usados;i++){
    if(*(reactivos_usados+i)==candidato){
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x43bf(%rip), %rax      # 0x6970
movl (%rax), %ecx
testq %rcx, %rcx
setne %al
je 0x25e3
leaq 0x43b6(%rip), %rdx      # 0x6978
movq (%rdx), %rdx
cmpl %edi, (%rdx)
je 0x25e3
movl $0x1, %esi
movq %rsi, %rax
cmpl %eax, %ecx
je 0x25de
leaq 0x1(%rax), %rsi
cmpl %edi, (%rdx,%rax,4)
jne 0x25ce
cmpl %ecx, %eax
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/EvalContinua.c
// Function: actualizar_reactivos_usados(unsigned int)
void actualizar_reactivos_usados(unsigned int reactivo_en_uso)
{
  unsigned int i,*tmp=(unsigned int *)malloc(cantidad_de_reactivos_usados*sizeof(unsigned int));
  for(i=0;i<cantidad_de_reactivos_usados;i++){
    *(tmp+i)=reactivos_usados[i];
  }
  reactivos_usados=(unsigned int *)malloc(
                   (cantidad_de_reactivos_usados+1)*sizeof(unsigned int));
  for(i=0;i<cantidad_de_reactivos_usados;i++){
    reactivos_usados[i]=*(tmp+i);
  }
  reactivos_usados[cantidad_de_reactivos_usados]=reactivo_en_uso;
  cantidad_de_reactivos_usados++;
  modificado=true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x4374(%rip), %r13      # 0x6970
movl (%r13), %r15d
leaq (,%r15,4), %r12
movq %r12, %rdi
callq 0x21c0
movq %rax, %r14
testq %r15, %r15
je 0x262d
leaq 0x4359(%rip), %rax      # 0x6978
movq (%rax), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x20f0
incl %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x21c0
movq %rax, %r15
leaq 0x4332(%rip), %rax      # 0x6978
movq %r15, (%rax)
movl (%r13), %r12d
testl %r12d, %r12d
je 0x266f
movl (%r13), %r12d
cmpl $0x1, %r12d
movl %r12d, %edx
adcl $0x0, %edx
shlq $0x2, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x20f0
movl %r12d, %eax
movl %ebx, (%r15,%rax,4)
incl %r12d
movl %r12d, (%r13)
leaq 0x42fc(%rip), %rax      # 0x6980
movb $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/test_EvalContinua.c
// Function: main
int main(int argc,char *argv[])
{
  unsigned int indice_de_reactivo,reactivo_index,ret;
  if(argc<2){
    printf("FORMA DE USO:%s <file_index_reactivos_intro>\n",
            argv[0]);
    exit(1);
  }
void run_ctor(char *);
  run_ctor(argv[1]);
unsigned int init_REACTIVO();
   if((ret=init_REACTIVO())==NUMDREAC){
unsigned int siguiente_turno();
     if((reactivo_index=siguiente_turno())>0){
#ifndef NDEBUG
       printf("reactivo_index=%u\n",reactivo_index);
#endif
       indice_de_reactivo=reactivo_index-1;
int show_reactivo(unsigned int);
       show_reactivo(indice_de_reactivo);
void save_reactivos_asignados(unsigned int);
       if(modificado){
         save_reactivos_asignados(reactivo_index);
       }
     }else{ 
       printf("Reactivos YA asignados ...\n");
       return 0;
     }
   }else{
#ifndef NDEBUG
     printf("ret=%u\n",ret);
#endif
     return -1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x1, %edi
jle 0x29ca
movq 0x8(%rsi), %rdi
callq 0x29e8
callq 0x2c14
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, %eax
jne 0x29c3
callq 0x2457
testl %eax, %eax
je 0x29b5
movl %eax, %r14d
leal -0x1(%r14), %edi
callq 0x23fc
leaq 0x3fdc(%rip), %rax      # 0x6980
xorl %ebx, %ebx
cmpb $0x1, (%rax)
jne 0x29c3
movl %r14d, %edi
callq 0x2696
jmp 0x29c3
leaq 0x765(%rip), %rdi       # 0x3121
callq 0x2210
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq (%rsi), %rsi
leaq 0x71f(%rip), %rdi       # 0x30f3
xorl %eax, %eax
callq 0x2040
movl $0x1, %edi
callq 0x21a0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/sotrteacher[P]1MM1INTRO/20190925_1MM1_INTRO/ctors.c
// Function: init_REACTIVO()
unsigned int init_REACTIVO()
{
  unsigned int i,j=0;
  FILE *fent;
  int car,res=0;
  char nombre_de_archivo[1024];
  
  for(i=0;i<NUMDREAC;i++){
    sprintf(nombre_de_archivo,"./reactivos/reactivo%d.txt",i+1);
#ifndef NDEBUG
    printf("Abriendo %s\n",nombre_de_archivo);
#endif
    /**Apertura del i-esimo archivo de entrada*/
    fent=fopen(nombre_de_archivo,"r");
    if(fent==NULL){
      fprintf(stderr,"Error abriendo %s\n",nombre_de_archivo);
      return i;
    }
    while((car=fgetc(fent))!=EOF){
      REACTIVO[i][j++]=car;
    }
    j=0;
    /**Cierre del i-esimo archivo*/ 
    fclose(fent);
#ifndef NDEBUG
    printf("%s\n",REACTIVO[i]);
#endif
  }/*end for()*/
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
leaq 0x2541(%rip), %r12      # 0x5170
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
leaq -0x430(%rbp), %r14
movq %r14, %rdi
leaq 0x4f8(%rip), %rsi       # 0x313e
movl %r13d, %edx
xorl %eax, %eax
callq 0x2050
movq %r14, %rdi
leaq 0x4ff(%rip), %rsi       # 0x3159
callq 0x2190
testq %rax, %rax
je 0x2cbf
movq %rax, %r14
movq %rax, %rdi
callq 0x2240
cmpl $-0x1, %eax
je 0x2c95
xorl %r15d, %r15d
shlq $0xb, %rbx
movl %r15d, %ecx
incl %r15d
leaq (%rbx,%r12), %rdx
movb %al, (%rcx,%rdx)
movq %r14, %rdi
callq 0x2240
cmpl $-0x1, %eax
jne 0x2c7b
movq %r14, %rdi
callq 0x2150
movq %r13, %rbx
cmpq $0x3, %r13
jne 0x2c31
movl $0x3, %ebx
movl %ebx, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2312(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
leaq 0x48b(%rip), %rsi       # 0x315b
leaq -0x430(%rbp), %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x2cab
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/serverd/src/main.cpp
// Function: loadProcessor(char const*)
Processor *loadProcessor(const char *lib)
{
	void *dh = dlopen(lib, RTLD_NOW);
	if (dh == NULL) {
		SYSLOG_ERROR("can not load plugin %s, error: %s", lib, dlerror());
		return NULL;
	}

	Processor *(*creator)();
	if ((creator = (Processor *(*)())dlsym(dh, "createProcessor")) == NULL) {
		SYSLOG_ERROR("plugin %s has no createProcessor defined: %s", lib, dlerror());
		dlclose(dh);
		return NULL;
	}
	
	Processor *processor = (*creator)();
	if (processor == NULL) {
		SYSLOG_ERROR("plugin %s createProcessor failed: %m", lib);
		dlclose(dh);
		return NULL;
	}

	return processor;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
callq 0x34a0
testq %rax, %rax
je 0x393e
movq %rax, %r14
leaq 0x672a(%rip), %rsi      # 0xa026
movq %rax, %rdi
callq 0x3300
testq %rax, %rax
je 0x3974
callq *%rax
movq %rax, %r15
testq %rax, %rax
jne 0x39b0
leaq 0xcbea(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x39a5
leaq 0x6736(%rip), %rdx      # 0xa063
movl $0x2, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x7310
jmp 0x39a5
leaq 0xcbc3(%rip), %rax      # 0x10508
movq (%rax), %r14
cmpl $0x2, (%r14)
jl 0x39ad
callq 0x3310
leaq 0x66aa(%rip), %rdx      # 0xa004
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x7310
jmp 0x39b0
leaq 0xcb8d(%rip), %rax      # 0x10508
movq (%rax), %r15
cmpl $0x2, (%r15)
jl 0x39a5
callq 0x3310
leaq 0x66a6(%rip), %rdx      # 0xa036
movq %r15, %rdi
movl $0x2, %esi
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x7310
movq %r14, %rdi
callq 0x3290
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::EventManager(beyondy::Async::Queue<beyondy::Async::Message>*, int)
EventManager::EventManager(Queue<Message> *_outQueue, int _esize)
	: epoll_fd(-1), event_next(0), event_total(0), epoll_size(_esize), epoll_events(NULL),
	  outQueue(_outQueue)
{
	if (epoll_size < 1) epoll_size = 1024;

	if ((epoll_fd = epoll_create(epoll_size)) < 0) {
		char buf[512];
		snprintf(buf, sizeof buf, "epoll_create(%ld) failed: %m", (long)epoll_size);
		throw std::runtime_error(buf);
	}

	epoll_events = (struct epoll_event *)malloc(epoll_size * sizeof(struct epoll_event));
	if (epoll_events == NULL) {
		::close(epoll_fd);

		char buf[512];
		snprintf(buf, sizeof buf, "new epoll events[%ld] failed: %m", (long)epoll_size);
		throw std::runtime_error(buf);
	}

	event_next = 0;
	event_total = 0;

	INIT_LIST_HEAD(&lruHead);
	INIT_LIST_HEAD(&connectorsHead);
		
	struct rlimit r0;
	int retval = getrlimit(RLIMIT_NOFILE, &r0);
	if (retval < 0) {
		throw std::runtime_error("rlimit(NOFILE) failed");
	}

	next_flow = 1;
	flowRoot.rb_node = NULL;

	perCheckOutQueue = 100;
	connectionMaxIdle = 5 * 1000;
	reconnectDelay = 2 * 1000;	// will delay 2, 4, 6, 8, 10
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
movl %edx, 0xc(%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
testl %edx, %edx
jg 0x4a5f
movl $0x400, 0xc(%rbx)       # imm = 0x400
movl 0xc(%rbx), %edi
callq 0x3620
movl %eax, (%rbx)
testl %eax, %eax
js 0x4af6
movl %eax, %ebp
movslq 0xc(%rbx), %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdi
callq 0x3480
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x4b2d
movq $0x0, 0x4(%rbx)
leaq 0x20(%rbx), %rax
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movq %rsp, %rsi
movl $0x7, %edi
callq 0x34c0
testl %eax, %eax
js 0x4b6b
movl $0x1, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movl $0x64, 0x54(%rbx)
movl $0x1388, 0x60(%rbx)     # imm = 0x1388
movl $0x7d0, 0x6c(%rbx)      # imm = 0x7D0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movslq 0xc(%rbx), %rcx
leaq 0x58f4(%rip), %rdx      # 0xa3f5
movq %rsp, %rbx
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3560
movl $0x10, %edi
callq 0x3170
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3120
jmp 0x4b87
movl %ebp, %edi
callq 0x3630
movslq 0xc(%rbx), %rcx
leaq 0x58d3(%rip), %rdx      # 0xa412
movq %rsp, %rbx
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3560
movl $0x10, %edi
callq 0x3170
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3120
jmp 0x4b87
movl $0x10, %edi
callq 0x3170
movq %rax, %r14
leaq 0x58b4(%rip), %rsi      # 0xa433
movq %rax, %rdi
callq 0x3120
movq 0xb46a(%rip), %rsi      # 0xfff8
movq 0xb43b(%rip), %rdx      # 0xffd0
movq %r14, %rdi
callq 0x35b0
jmp 0x4ba1
jmp 0x4ba1
movq %rax, %rbx
movq %r14, %rdi
callq 0x3220
movq %rbx, %rdi
callq 0x35d0
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::addListener(char const*, beyondy::Async::Queue<beyondy::Async::Message>*, beyondy::Async::Processor*, int)
int EventManager::addListener(const char *address, Queue<Message> *inQueue, Processor *processor, int maxActive)
{
	Listener *listener = new Listener(address, maxActive, this, inQueue, processor);
	if (listener == NULL) {
		SYSLOG_ERROR("open listener at %s failed", address);
		return -1;
	}
	
	if (listener->open() < 0 || this->addHandler(listener, EVENT_IN) < 0) {
		SYSLOG_ERROR("open or watch-IN failed for listener at %s", address);
		delete listener;
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movl $0xb0, %edi
callq 0x3330
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq %r13, %r8
movq %r12, %r9
callq 0x6f30
movq %rbx, %rdi
callq 0x7286
testl %eax, %eax
js 0x4c15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x4c70
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x4c48
leaq 0xb8ec(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x4c3a
leaq 0x581e(%rip), %rdx      # 0xa449
movl $0x2, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x7310
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xb0, %esi
movq %rbx, %rdi
callq 0x3340
movq %r14, %rdi
callq 0x35d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::addHandler(beyondy::Async::EventHandler*, int)
int EventManager::addHandler(EventHandler *handler, int events)
{
	struct epoll_event ee;
	int retval;
	
	ee.events = events;
	ee.data.ptr = (void *)handler;
	
	retval = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, handler->fd, &ee);
	if (retval == 0) {
		handler->events = events;
		SYSLOG_DEBUG("addHandler fd=%d events=%d OK", handler->fd, events);
	}
	else {
		SYSLOG_DEBUG("addHandler fd=%d failed: %m", handler->fd);
	}

	return retval;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
leaq 0x4(%rsp), %rcx
movl %edx, (%rcx)
movq %rsi, 0x4(%rcx)
movl (%rdi), %edi
movl 0x8(%rsi), %edx
movl $0x1, %esi
callq 0x3490
movl %eax, %ebx
testl %eax, %eax
je 0x4cc5
leaq 0xb864(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x4cf2
movl 0x8(%r14), %ecx
leaq 0x57f7(%rip), %rdx      # 0xa4ae
movl $0x5, %esi
xorl %eax, %eax
callq 0x7310
jmp 0x4cf2
movl %ebp, 0xc(%r14)
leaq 0xb838(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x4cf2
movl 0x8(%r14), %ecx
leaq 0x57ad(%rip), %rdx      # 0xa490
movl $0x5, %esi
movl %ebp, %r8d
xorl %eax, %eax
callq 0x7310
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::addConnector(char const*, beyondy::Async::Queue<beyondy::Async::Message>*, beyondy::Async::Processor*, int)
int EventManager::addConnector(const char *address, Queue<Message> *inQueue, Processor *processor, int openImmediately)
{
	int flow = nextFlow();
	Connector *connector = new Connector(flow, address, this, inQueue, processor);

	if (openImmediately && connector->open() < 0) {
		SYSLOG_ERROR("open Connector to %s failed", address);
		return -1;
	}

	mapFlow(flow, connector);
	_list_add_tail(&connector->connectorsEntry, &connectorsHead);

	return flow;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0xc(%rsp)
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r15
movl 0x40(%rdi), %ebx
leal 0x1(%rbx), %eax
movl %eax, 0x40(%rdi)
movl $0x138, %edi            # imm = 0x138
callq 0x3330
movq %rax, %r12
movq %rax, %rdi
movl %ebx, %esi
movq %rbp, 0x10(%rsp)
movq %rbp, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %r13, %r9
callq 0x6878
cmpl $0x0, 0xc(%rsp)
je 0x4d61
movq %r12, %rdi
callq 0x6a60
testl %eax, %eax
js 0x4da7
movq %r15, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x4df8
movq %r12, %rax
addq $0x90, %rax
leaq 0x30(%r15), %rcx
movq 0x38(%r15), %rdx
movq %rax, 0x38(%r15)
movq %rcx, 0x90(%r12)
movq %rdx, 0x98(%r12)
movq %rax, (%rdx)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb75a(%rip), %rax      # 0x10508
movq (%rax), %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2, (%rdi)
jl 0x4d96
leaq 0x56b2(%rip), %rdx      # 0xa474
movl $0x2, %esi
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x7310
jmp 0x4d96
movq %rax, %rbx
movl $0x138, %esi            # imm = 0x138
movq %r12, %rdi
callq 0x3340
movq %rbx, %rdi
callq 0x35d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::mapFlow(int, beyondy::Async::Connection*)
int EventManager::mapFlow(int flow, Connection *connection)
{
	assert(flow2Connection(flow) == NULL);
	Connection *ret = __insert(flow, &connection->flowEntry);
	if (ret == NULL) rb_insert_color(&connection->flowEntry, &flowRoot);

	SYSLOG_DEBUG("mapFlow=%d => %d", flow, connection->fd);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %rsi
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x4e39
movq %rax, %rcx
leaq -0x38(%rcx), %rdx
movl $0x10, %edi
cmpl %ebx, -0x28(%rcx)
jg 0x4e25
movl $0x8, %edi
jge 0x4e30
movq (%rcx,%rdi), %rcx
testq %rcx, %rcx
jne 0x4e10
xorl %edx, %edx
testq %rdx, %rdx
jne 0x4ebe
addq $0x48, %rsi
leaq 0x38(%r14), %rdi
testq %rax, %rax
je 0x4e6c
movq %rax, %rcx
addq $-0x38, %rax
movl $0x8, %edx
cmpl %ebx, -0x28(%rcx)
jl 0x4e5e
movl $0x10, %edx
jle 0x4eb7
movq (%rcx,%rdx), %rax
testq %rax, %rax
jne 0x4e46
addq %rcx, %rdx
jmp 0x4e71
xorl %ecx, %ecx
movq %rsi, %rdx
movq %rcx, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r14)
movq %rdi, (%rdx)
callq 0x7d00
leaq 0xb67c(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x4ead
movl 0x8(%r14), %r8d
leaq 0x57ec(%rip), %rdx      # 0xa68b
movl $0x5, %esi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x7310
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %rax, %rax
jne 0x4e85
jmp 0x4e80
leaq 0x56f4(%rip), %rdi      # 0xa5b9
leaq 0x570b(%rip), %rsi      # 0xa5d7
leaq 0x5715(%rip), %rcx      # 0xa5e8
movl $0xdc, %edx
callq 0x31f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::addConnection(beyondy::Async::Connection*, int)
int EventManager::addConnection(Connection *connection, int events)
{
	if (addHandler(connection, events) < 0) {
		SYSLOG_ERROR("can not add connection fd=%d flow=%d", connection->fd, connection->flow);
		return -1;
	}

	/* init it */
	gettimeofday(&connection->tsLastRead, NULL);
	_list_add_tail(&connection->lruEntry, &lruHead);

	SYSLOG_DEBUG("addConneciton fd=%d flow=%d OK", connection->fd, connection->flow);
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4c70
testl %eax, %eax
js 0x4f41
leaq 0x28(%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x3570
leaq 0x18(%r14), %rax
leaq 0x20(%r15), %rcx
movq 0x28(%r15), %rdx
movq %rax, 0x28(%r15)
movq %rcx, 0x18(%r14)
movq %rdx, 0x20(%r14)
movq %rax, (%rdx)
leaq 0xb5e7(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x4f70
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
leaq 0x55b7(%rip), %rdx      # 0xa4ef
xorl %ebx, %ebx
movl $0x5, %esi
jmp 0x4f69
leaq 0xb5c0(%rip), %rax      # 0x10508
movq (%rax), %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2, (%rdi)
jl 0x4f70
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
leaq 0x5566(%rip), %rdx      # 0xa4ca
movl $0x2, %esi
xorl %eax, %eax
callq 0x7310
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::modifyConnection(beyondy::Async::Connection*, int, int)
int EventManager::modifyConnection(Connection *connection, int add, int remove)
{
	struct epoll_event ee;
	int retval;

	ee.events = (connection->events | add) & ~remove;
	ee.data.ptr = (void *)(EventHandler *)connection;

	retval = epoll_ctl(epoll_fd, EPOLL_CTL_MOD, connection->fd, &ee);
	if (retval == 0) {
		connection->events = ee.events;
		SYSLOG_DEBUG("modifyConneciton fd=%d flow=%d events=%d OK", connection->fd, connection->flow, ee.events);
	}
	else {
		SYSLOG_DEBUG("modifyConneciton fd=%d flow=%d events=%d failed: %m", connection->fd, connection->flow, ee.events);
	}

	return retval;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
orl 0xc(%rsi), %edx
notl %ecx
andl %edx, %ecx
leaq 0xc(%rsp), %rax
movl %ecx, (%rax)
movq %rsi, 0x4(%rax)
movl (%rdi), %edi
movl 0x8(%rsi), %edx
movl $0x3, %esi
movq %rax, %rcx
callq 0x3490
movl %eax, %ebx
testl %eax, %eax
je 0x4fd1
leaq 0xb555(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x5004
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
movl 0xc(%rsp), %r9d
leaq 0x556b(%rip), %rdx      # 0xa53a
jmp 0x4ff8
movl 0xc(%rsp), %r9d
movl %r9d, 0xc(%r14)
leaq 0xb527(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x5004
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
leaq 0x5516(%rip), %rdx      # 0xa50e
movl $0x5, %esi
xorl %eax, %eax
callq 0x7310
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::deleteConnection(beyondy::Async::Connection*)
int EventManager::deleteConnection(Connection *connection)
{
	struct epoll_event ee;
	int retval;

	ee.events = 0;
	ee.data.ptr = (void *)(EventHandler *)connection;

	if (!(retval = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, connection->fd, &ee))) {
		_list_del(&connection->lruEntry);

		SYSLOG_ERROR("delete connection fd=%d flow=%d", connection->fd, connection->flow);
	}
	else {
		SYSLOG_ERROR("delete connection fd=%d flow=%d failed: %m", connection->fd, connection->flow);
	}
	
	return retval;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movq %rsi, 0x4(%rcx)
movl (%rdi), %edi
movl 0x8(%rsi), %edx
movl $0x2, %esi
callq 0x3490
movl %eax, %ebx
testl %eax, %eax
je 0x505c
leaq 0xb4c5(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x509d
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
leaq 0x5534(%rip), %rdx      # 0xa58e
jmp 0x5091
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
leaq 0xb48e(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x509d
movl 0x8(%r14), %ecx
movl 0x10(%r14), %r8d
leaq 0x54dd(%rip), %rdx      # 0xa56e
movl $0x2, %esi
xorl %eax, %eax
callq 0x7310
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::__insert(int, rb_node*)
Connection *EventManager::__insert(int flow, struct rb_node *node)
{
	struct rb_node **p = &flowRoot.rb_node;
	struct rb_node *parent = NULL;
	struct Connection *connection;

	while (*p != NULL) {
		parent = *p;
		connection = rb_entry(parent, Connection, flowEntry);
		if (flow > connection->flow)
			p = &(*p)->rb_right;
		else if (flow < connection->flow)
			p = &(*p)->rb_left;
		else
			return connection;
	}

	rb_link_node(node, parent, p);
	return NULL;
}

// Assembly:
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x50ff
movq %rax, %rcx
addq $-0x38, %rax
movl $0x8, %edi
cmpl %esi, -0x28(%rcx)
jl 0x50f1
movl $0x10, %edi
jle 0x5114
movq (%rcx,%rdi), %rax
testq %rax, %rax
jne 0x50d9
addq %rcx, %rdi
jmp 0x5105
addq $0x48, %rdi
xorl %ecx, %ecx
movq %rcx, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdx)
movq %rdx, (%rdi)
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::unmapFlow(beyondy::Async::Connection*)
Connection *EventManager::flow2Connection(int flow)
{
	struct rb_node *n = flowRoot.rb_node;
	Connection *connection;

	while (n != NULL) {
		connection = rb_entry(n, Connection, flowEntry);
		if (flow < connection->flow)
			n = n->rb_left;
		else if (flow > connection->flow)
			n = n->rb_right;
		else
			return connection;
	}

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x48(%rdi), %rax
testq %rax, %rax
je 0x5194
movq %rsi, %r14
movq %rdi, %rbx
movl 0x10(%rsi), %ecx
addq $0x48, %rbx
leaq -0x38(%rax), %rdx
movl $0x10, %esi
cmpl %ecx, -0x28(%rax)
jg 0x5145
movl $0x8, %esi
jge 0x5150
movq (%rax,%rsi), %rax
testq %rax, %rax
jne 0x5130
xorl %edx, %edx
testq %rdx, %rdx
je 0x5194
leaq 0xb3ac(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x5, (%rdi)
jl 0x517b
movl 0x8(%r14), %r8d
leaq 0x551a(%rip), %rdx      # 0xa689
movl $0x5, %esi
xorl %eax, %eax
callq 0x7310
addq $0x38, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7ea8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x548a(%rip), %rdi      # 0xa625
leaq 0x5435(%rip), %rsi      # 0xa5d7
leaq 0x54a6(%rip), %rcx      # 0xa64f
movl $0xe6, %edx
callq 0x31f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::waitingEvents()
int EventManager::waitingEvents()
{
	BPROF_TRACE(BPT_EM_WAITING)
	// TODO: wtime = min(gap-to-next-timer, 10ms)
	long wtime = 10; /* 1s */

	event_next = event_total = 0;
	int cnt = epoll_wait(epoll_fd, epoll_events, epoll_size, wtime);
	if (cnt >= 0) event_total = cnt;

	return cnt;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x4(%rdi)
movq 0x10(%rdi), %rsi
movl (%rdi), %edi
movl 0xc(%rbx), %edx
movl $0xa, %ecx
callq 0x3160
testl %eax, %eax
js 0x51da
movl %eax, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::handleEvent(int, beyondy::Async::EventHandler*, int)
void EventManager::handleEvent(int fd, EventHandler *handler, int event)
{
	BPROF_TRACE(BPT_EM_HEVENT)
	int retval = 0;

	if ((event & EVENT_OUT) && (retval = handler->onWritable(fd)) < 0) {
		SYSLOG_ERROR("fd=%d onWritable failed", handler->fd);
	}

	if (retval >= 0 && (event & EVENT_IN) && (retval = handler->onReadable(fd)) < 0) {
		SYSLOG_ERROR("fd=%d onReadable failed", handler->fd);
	}

	if (retval < 0 || (event & EVENT_ERR)) {
		SYSLOG_ERROR("fd=%d got retval=%d or ERR event=%d", fd, retval, event);
		retval = handler->onError(fd);
		// Note!!!
		// handler is not available now
	}

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %ebx
xorl %r15d, %r15d
testb $0x4, %bpl
je 0x522b
movq (%r14), %rax
movq %r14, %rdi
movl %ebx, %esi
callq *0x18(%rax)
movl %eax, %r15d
testl %eax, %eax
jns 0x522b
leaq 0xb2fc(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x522b
movl 0x8(%r14), %ecx
leaq 0x547d(%rip), %rdx      # 0xa69c
movl $0x2, %esi
xorl %eax, %eax
callq 0x7310
testb $0x1, %bpl
je 0x526e
testl %r15d, %r15d
js 0x526e
movq (%r14), %rax
movq %r14, %rdi
movl %ebx, %esi
callq *0x10(%rax)
movl %eax, %r15d
testl %eax, %eax
jns 0x526e
leaq 0xb2b9(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x526e
movl 0x8(%r14), %ecx
leaq 0x5452(%rip), %rdx      # 0xa6b4
movl $0x2, %esi
xorl %eax, %eax
callq 0x7310
testb $0x8, %bpl
jne 0x5284
testl %r15d, %r15d
js 0x5284
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb27d(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x52ae
leaq 0x5432(%rip), %rdx      # 0xa6cc
movl $0x2, %esi
movl %ebx, %ecx
movl %r15d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x7310
movq (%r14), %rax
movq 0x20(%rax), %rax
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::handleEvents()
void EventManager::handleEvents()
{
	BPROF_TRACE(BPT_EM_HEVENTS)

	for (event_next = 0; event_next < event_total; ++event_next) {
		struct epoll_event *ee = &epoll_events[event_next];
		EventHandler *handler = static_cast<EventHandler *>(ee->data.ptr);
		handleEvent(handler->fd, handler, ee->events);
	}

	return;
}

// Assembly:
movl $0x0, 0x4(%rdi)
cmpl $0x0, 0x8(%rdi)
jle 0x5301
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movq 0x10(%rbx), %rcx
cltq
leaq (%rax,%rax,2), %rax
movq 0x4(%rcx,%rax,4), %rdx
movl 0x8(%rdx), %esi
movl (%rcx,%rax,4), %ecx
callq 0x51dc
movl 0x4(%rbx), %eax
incl %eax
movl %eax, 0x4(%rbx)
cmpl 0x8(%rbx), %eax
jl 0x52d9
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::dispatchOutMessage()
void EventManager::dispatchOutMessage()
{
	BPROF_TRACE(BPT_EM_DISPATCH)

	for (int i = 0; i < perCheckOutQueue; ++i) {
		Message *msg = outQueue->pop();
		if (msg == NULL)
			break;

		gettimeofday(&msg->ts_dequeue, NULL);
		int flow = msg->flow;

		Connection *connection = flow2Connection(flow);
		if (connection == NULL) {
			SYSLOG_ERROR("can not find connection for fd=%d flow=%d discard it", msg->fd, msg->flow);
			// TODO: how to call proc-onSent(msg, SS_SOCKET_NON_EXIST)
			Message::destroy(msg);
			continue;
		}
		
		int retval = connection->sendMessage(msg);
		if (retval != 0) {
			// msg has been freed
			SYSLOG_ERROR("sendMessage to fd=%d flow=%d failed", connection->fd, flow);
			continue;
		}
	}
}

// Assembly:
cmpl $0x0, 0x54(%rdi)
jle 0x5422
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
xorl %esi, %esi
callq 0x5630
movl $0x2, %r14d
testq %rax, %rax
je 0x5401
movq %rax, %r12
movq %rax, %rdi
addq $0x50, %rdi
xorl %esi, %esi
callq 0x3570
movl 0x28(%r12), %ebp
movq 0x48(%rbx), %rax
movl $0x0, %r13d
testq %rax, %rax
je 0x537d
leaq -0x38(%rax), %r13
movl $0x10, %ecx
cmpl %ebp, -0x28(%rax)
jg 0x5371
movl $0x8, %ecx
jge 0x537d
movq (%rax,%rcx), %rax
testq %rax, %rax
jne 0x535c
xorl %r13d, %r13d
testq %r13, %r13
je 0x53c4
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
callq *0x28(%rax)
testl %eax, %eax
je 0x53fe
leaq 0xb16e(%rip), %rax      # 0x10508
movq (%rax), %rdi
movl $0x4, %r14d
cmpl $0x2, (%rdi)
jl 0x5401
movl 0x8(%r13), %ecx
movl $0x2, %esi
leaq 0x536d(%rip), %rdx      # 0xa725
movl %ebp, %r8d
xorl %eax, %eax
callq 0x7310
jmp 0x5401
leaq 0xb13d(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x53ee
movl 0x24(%r12), %ecx
movl $0x2, %esi
leaq 0x530c(%rip), %rdx      # 0xa6f0
movl %ebp, %r8d
xorl %eax, %eax
callq 0x7310
movq %r12, %rdi
callq 0x7600
movl $0x4, %r14d
jmp 0x5401
xorl %r14d, %r14d
testb $0x3, %r14b
jne 0x5414
incl %r15d
cmpl 0x54(%rbx), %r15d
jl 0x531d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::checkTimeout()
void EventManager::checkTimeout()
{
	BPROF_TRACE(BPT_EM_CHKTIMEOUT)
	struct timeval tNow;
	struct list_head *pl, *pn;

	gettimeofday(&tNow, NULL);
	list_for_each_safe(pl, pn, &lruHead) {
		Connection *connection = list_entry(pl, Connection, lruEntry);
		if (TV2MS(connection->tsLastRead, tNow) > connectionMaxIdle) {
			SYSLOG_ERROR("connection fd=%d flow=%d timed out. close it now.", connection->fd, connection->flow);
			connection->onError(connection->fd);
			continue;
		}

		// the rest should be more active
		// so no need check this time.
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3570
leaq 0x20(%rbx), %r12
movq 0x20(%rbx), %r14
cmpq %r12, %r14
je 0x54dd
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq 0x10(%r14), %rcx
subq 0x18(%r14), %rax
imulq $0x3e8, %rcx, %rcx      # imm = 0x3E8
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
imulq %rdx
movq %rdx, %r15
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r15
addq %rax, %r15
addq %rcx, %r15
movslq 0x60(%rbx), %rbp
cmpq %rbp, %r15
jle 0x54dd
movq (%r14), %r13
leaq 0xb069(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x54c2
movl -0x10(%r14), %ecx
movl -0x8(%r14), %r8d
movl $0x2, %esi
leaq 0x528e(%rip), %rdx      # 0xa749
xorl %eax, %eax
callq 0x7310
leaq -0x18(%r14), %rdi
movl -0x10(%r14), %esi
movq -0x18(%r14), %rax
callq *0x20(%rax)
movq %r13, %r14
cmpq %rbp, %r15
jg 0x5449
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/EventManager.cpp
// Function: beyondy::Async::EventManager::reconnectWhenNecessary()
void EventManager::reconnectWhenNecessary()
{
	struct timeval tNow;
	struct list_head *pl, *pn;

	gettimeofday(&tNow, NULL);
	list_for_each_safe(pl, pn, &connectorsHead) {
		Connector *connector = list_entry(pl, Connector, connectorsEntry);
		if (connector->getStatus() == Connector::CONN_CLOSE
				&& TV2MS(connector->tsLastClosed, tNow) > (connector->cntRetryConnect + 1) * reconnectDelay) {
			SYSLOG_ERROR("connector flow=%d is closed, re-connecting it", connector->flow);
			if (connector->open() < 0) {
				SYSLOG_WARN("re-connecting for low=%ld failed: %m", connector->flow);
				// retry next time but update tsLastClosed to avoid connect too often
			}

		}

		connector->checkMessageExpiration();
	}

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3570
leaq 0x30(%rbx), %r13
movq 0x30(%rbx), %r15
cmpq %r13, %r15
je 0x55e3
movabsq $0x20c49ba5e353f7cf, %r14 # imm = 0x20C49BA5E353F7CF
movq %r15, %rbp
movq (%r15), %r15
leaq -0x90(%rbp), %r12
cmpl $0x0, 0x24(%rbp)
jne 0x55d2
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
subq 0x10(%rbp), %rcx
subq 0x18(%rbp), %rax
imulq %r14
imulq $0x3e8, %rcx, %rax      # imm = 0x3E8
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rcx, %rdx
addq %rax, %rdx
movslq 0x20(%rbp), %rax
incq %rax
movslq 0x6c(%rbx), %rcx
imulq %rax, %rcx
cmpq %rcx, %rdx
jle 0x55d2
leaq 0xaf85(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x2, (%rdi)
jl 0x55a1
movl -0x80(%rbp), %ecx
movl $0x2, %esi
leaq 0x51e1(%rip), %rdx      # 0xa77b
xorl %eax, %eax
callq 0x7310
movq %r12, %rdi
callq 0x6a60
testl %eax, %eax
jns 0x55d2
leaq 0xaf54(%rip), %rax      # 0x10508
movq (%rax), %rdi
cmpl $0x3, (%rdi)
jl 0x55d2
movl -0x80(%rbp), %ecx
movl $0x3, %esi
leaq 0x51de(%rip), %rdx      # 0xa7a9
xorl %eax, %eax
callq 0x7310
movq %r12, %rdi
callq 0x66d4
cmpq %r13, %r15
jne 0x5524
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/./Queue.h
// Function: beyondy::Async::Queue<beyondy::Async::Message>::pop(long)
T* Queue<T>::pop(long ms) 
{
	pthread_mutex_lock(&lock);
	if (queue.empty() && ms > 0) {
		// TODO:		
		pthread_cond_wait(&cond, &lock);
	}

	T *obj = NULL;
	if (!queue.empty()) {
		obj = queue.front();
		queue.pop();
	}
	
	pthread_mutex_unlock(&lock);
	return obj;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3510
testq %r14, %r14
jle 0x565d
movq 0x70(%rbx), %rax
cmpq %rax, 0x90(%rbx)
jne 0x565d
leaq 0x28(%rbx), %rdi
movq %rbx, %rsi
callq 0x3540
movq 0x70(%rbx), %rax
cmpq %rax, 0x90(%rbx)
je 0x5678
leaq 0x60(%rbx), %rdi
movq (%rax), %r14
callq 0x568e
jmp 0x567b
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x3260
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/roberty65[P]bServer/frame/main/MtWorker.cpp
// Function: beyondy::Async::MtWorker::workerEntry()
void MtWorker::workerEntry()
{
	int no = workerId();
	SYSLOG_DEBUG("thread-%d (TID=%lu) start...", no, (unsigned long)pthread_self());

	while (isRunning) {
		Message *msg = inQueue->pop(10);
		if (msg == NULL) {
			// TODO: idle
			continue;
		}

		gettimeofday(&msg->ts_dequeue, NULL);
		proc->onMessage(msg);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xadb4(%rip), %rax      # 0x10508
movq (%rax), %r14
cmpl $0x5, (%r14)
jl 0x57b9
movq %rbx, %rdi
callq 0x57c4
movl %eax, %ebp
callq 0x32d0
leaq 0x505b(%rip), %rdx      # 0xa7ce
movq %r14, %rdi
movl $0x5, %esi
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x7310
jmp 0x57b9
movq (%rbx), %rdi
movl $0xa, %esi
callq 0x5630
testq %rax, %rax
je 0x57b9
movq %rax, %r14
movq %rax, %rdi
addq $0x50, %rdi
xorl %esi, %esi
callq 0x3570
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x30(%rax)
cmpl $0x0, 0x10(%rbx)
jne 0x5789
popq %rbx
popq %r14
popq %rbp
retq