LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::Analizer_ACL()
Analizer_ACL::Analizer_ACL(){
    myfile = new ifstream( "base.dnl" );
    map<string,string> * global_scope = new map<string,string>;
    scopes.push_back(global_scope);
    scope_iterator = scopes.begin();
    #ifdef DEBUGGING
    cout << "Constructor: start getting tokens" << endl;
    #endif
    get_tokens();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
andl $0x0, 0x40(%rdi)
movl $0x208, %edi            # imm = 0x208
callq 0x21e0
movq %rax, %r15
leaq 0x418f(%rip), %rsi      # 0x7046
pushq $0x8
popq %rdx
movq %rax, %rdi
callq 0x2350
movq %r15, 0x48(%rbx)
pushq $0x30
popq %rdi
callq 0x21e0
movq %rax, %rcx
addq $0x8, %rcx
andl $0x0, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x5b46
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x2f44
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x21f0
jmp 0x2f2b
jmp 0x2f28
movq %rax, %r14
leaq 0x20(%rbx), %rdi
callq 0x29ec
movq %rbx, %rdi
callq 0x2a2a
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::Analizer_ACL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Analizer_ACL::Analizer_ACL( string file_path ){
    myfile = new ifstream( file_path );
    map<string,string> * global_scope = new map<string,string>;
    scopes.push_back(global_scope);
    scope_iterator = scopes.begin();
    #ifdef DEBUGGING
    cout << "Constructor: start getting tokens" << endl;
    #endif
    get_tokens();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
andl $0x0, 0x40(%rdi)
movl $0x208, %edi            # imm = 0x208
callq 0x21e0
movq %rax, %r15
pushq $0x8
popq %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x22d0
movq %r15, 0x48(%rbx)
pushq $0x30
popq %rdi
callq 0x21e0
movq %rax, %rcx
addq $0x8, %rcx
andl $0x0, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x5b46
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x2f44
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x21f0
jmp 0x356a
jmp 0x3567
movq %rax, %r14
leaq 0x20(%rbx), %rdi
callq 0x29ec
movq %rbx, %rdi
callq 0x2a2a
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::eat_tokens_if_match(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
bool Analizer_ACL::eat_tokens_if_match( vector<string> type_sequence ){
    vector<Token *>::iterator after_state = token_iterator;
    if(equal( type_sequence.begin(), type_sequence.end(), token_iterator, [&](string first, Token * second){
        ++after_state;
        if( first.at(0) == '_'){
            first.erase(0,1);
            return second->content == first;
        }else{
            return second->type == first;
        }
    })){
        token_iterator = after_state;//Eat the tokens.
        return true;
    }else{
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, -0x38(%rbp)
movq 0x38(%rdi), %r14
movq (%rsi), %rbx
movq 0x8(%rsi), %rax
movq %rax, -0x30(%rbp)
leaq -0x58(%rbp), %r15
movq %r14, %r12
cmpq -0x30(%rbp), %rbx
je 0x360f
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2260
movq (%r12), %r13
movq %r15, %rdi
xorl %esi, %esi
callq 0x2380
cmpb $0x5f, (%rax)
jne 0x35e2
movq %r15, %rdi
xorl %esi, %esi
pushq $0x1
popq %rdx
callq 0x2070
jmp 0x35e6
addq $0x20, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x5e48
movl %eax, %r13d
movq %r15, %rdi
callq 0x2110
testb %r13b, %r13b
je 0x3617
addq $0x8, %r12
addq $0x20, %rbx
addq $0x8, %r14
jmp 0x35af
movq -0x38(%rbp), %rax
movq %r14, 0x38(%rax)
cmpq -0x30(%rbp), %rbx
sete %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::search_scopes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Analizer_ACL::search_scopes( string key ){
    string return_value = "__ERRCODE: Couldn't find variable name";

    //First chek if it is on global scope.
    if( (**(scopes.begin())).count(key) ){
        return_value = (**(scopes.begin()))[key];
    }else{
        for( auto search_iterator = scope_iterator; search_iterator != scopes.begin(); --search_iterator ){
            if( (**search_iterator).count(key) ){//If there is at least one occurence of the key on the current map.
                return_value = (**search_iterator)[key];
                break;//find the value, so break the loop.
            }
        }
    }
    if( return_value == "__ERRCODE: Couldn't find variable name\n"){
        cout << "Couldn't find the variable name.\n";
        return "__ERR";
    }

    return return_value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x39ee(%rip), %rsi      # 0x704f
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x28b4
movq (%r15), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x5b56
testq %rax, %rax
je 0x369f
movq (%r15), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x5b7a
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x2140
jmp 0x36da
movq 0x18(%r15), %r12
cmpq (%r15), %r12
je 0x36da
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x5b56
testq %rax, %rax
jne 0x36c1
movq 0x8(%r12), %r12
jmp 0x36a3
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq 0x5b7a
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x2140
leaq 0x3995(%rip), %rsi      # 0x7076
leaq -0x48(%rbp), %rdi
callq 0x5be3
testb %al, %al
je 0x3716
movq 0x78e3(%rip), %rdi      # 0xafd8
leaq 0x39a2(%rip), %rsi      # 0x709e
callq 0x21d0
leaq 0x39b8(%rip), %rsi      # 0x70c0
leaq -0x21(%rbp), %rdx
movq %rbx, %rdi
callq 0x28b4
jmp 0x3752
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x3737
movq %rdx, (%rbx)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x373d
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, -0x48(%rbp)
andq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2110
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3775
jmp 0x3775
jmp 0x3775
jmp 0x3775
jmp 0x3775
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::get_relative_token_content[abi:cxx11](int)
string Analizer_ACL::get_relative_token_content( int relative_position ){
    string content;

    content = (*(token_iterator+relative_position))->content;
    #ifdef DEBUGGING
    cout << "get_relative_token_content:The readed token is " << content << endl;
    #endif
    return content;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movslq %edx, %rax
movq 0x38(%rsi), %rcx
movq (%rcx,%rax,8), %rsi
callq 0x2140
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::skip_block()
void Analizer_ACL::skip_block(){
    int scope_level = 0;
    do{

        ++token_iterator; //start analizing the next token.
        #ifdef DEBUGGING2
        cout << "skip_block: Token being analized is   " << (*token_iterator)->content << "      From type        " << (*token_iterator)->type << "       scope_level has value     "<< scope_level  <<endl;
        #endif
        if((*token_iterator)->type == "END"){
            cout << "SKIPING IF BLOCK ERROR: coudn`t find the end of if block\n";
            break;
        }else if( (*token_iterator)->content == "if" ){
            ++scope_level;
        }else if( (*token_iterator)->content == "endif" ){
            --scope_level;
        }

    }while( !(  ( (*token_iterator)->content == "else" && scope_level == 0 )   ||  ( (*token_iterator)->content != "endif" && scope_level == -1 ) ) );
    ++token_iterator;//The token skiped was a else to run instead of an if, or it was the endif in case the if didn`t had an else.

    #ifdef DEBUGGING2
    cout << "skip_block: When exiting the function the current token is   " << (*token_iterator)->content << "      From type        " << (*token_iterator)->type << endl;
    #endif
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x3891(%rip), %r14      # 0x70c6
leaq 0x3a03(%rip), %r12      # 0x723f
leaq 0x3a39(%rip), %r13      # 0x727c
movq 0x38(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rbx)
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x5be3
testb %al, %al
jne 0x38cb
movq 0x38(%rbx), %rax
movq (%rax), %rdi
leaq 0x3942(%rip), %rsi      # 0x71b3
callq 0x5be3
pushq $0x1
popq %rcx
testb %al, %al
jne 0x3891
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r13, %rsi
callq 0x5be3
movzbl %al, %ecx
negl %ecx
addl %ecx, %r15d
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x5be3
testb %al, %al
je 0x38ac
testl %r15d, %r15d
je 0x38de
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r13, %rsi
callq 0x5bf3
testb %al, %al
je 0x3843
cmpl $-0x1, %r15d
jne 0x3843
jmp 0x38de
movq 0x7706(%rip), %rdi      # 0xafd8
leaq 0x37f1(%rip), %rsi      # 0x70ca
callq 0x21d0
addq $0x8, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/7bao[P]TarEverything/tareverything.cpp
// Function: main
int main(int argc ,char **argv){
    string arg_1;
    string arg_2;
    Tareverything tar;
    switch(argc){
        case tar.sing_suff:
            arg_1 = argv[1];
            tar.write_para(arg_1); 
            cout << tar.command << endl;
            tar.tar_command(tar.command);
            break;
        case tar.doub_suff:
            arg_1 = argv[1];
            arg_2 = argv[2];
            tar.write_para(arg_1,arg_2); 
            cout << tar.command << endl;
            tar.tar_command(tar.command);
            break;
        default:
            cout << "No such file or dirctory" << endl;     
            exit(1);
    }
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
leaq 0x50(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
andq $0x0, -0x8(%rsi)
movb %cl, (%rax)
movb %cl, (%rdx)
movb %cl, (%rsi)
cmpl $0x3, %edi
je 0x3039
cmpl $0x2, %edi
jne 0x30ab
movq 0x8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2330
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2484
jmp 0x3067
movq 0x8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2330
movq 0x10(%rbx), %rsi
leaq 0x40(%rsp), %rdi
callq 0x2330
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x2940
movq 0x6f6a(%rip), %rdi      # 0x9fd8
movq %rsp, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20f0
movq (%rsp), %rdi
callq 0x2170
movq %rsp, %rdi
callq 0x20d0
leaq 0x40(%rsp), %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x20d0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
movq 0x6f26(%rip), %rdi      # 0x9fd8
leaq 0x2ffd(%rip), %rsi      # 0x60b6
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rdi
callq 0x2220
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
leaq 0x40(%rsp), %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: randn(double, double, double, double)
double randn(double miu,double sigma, double min ,double max)
{
    double x,y,dScope;
    do{
        x=rand(min,max);
        y=normal(x,miu,sigma);
        dScope=rand(0.0,normal(miu,miu,sigma));
    }while(dScope>y);
    return x;
}

// Assembly:
subq $0x38, %rsp
movsd %xmm3, 0x28(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x27cc
movsd %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x2802
movsd %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x2802
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
callq 0x27cc
ucomisd 0x30(%rsp), %xmm0
ja 0x2860
movsd 0x18(%rsp), %xmm0
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: vec_len(std::vector<double, std::allocator<double>>&)
double vec_len(vector<double> &a)
{
	double res=0;
/*	if (L1_flag)
		for (int i=0; i<a.size(); i++)
			res+=fabs(a[i]);
	else*/
	{
		for (int i=0; i<a.size(); i++)
			res+=a[i]*a[i];
		res = sqrt(res);
	}
	return res;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x28f3
movsd (%rax,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x28dc
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2130
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: main
int main(int argc,char**argv)
{
    //随机数种子
    srand((unsigned) time(NULL));
    if (argc!=2)
        return 0;
    else
    {
        version = argv[1];
        positive_margin = atof(version.c_str());
        prepare();
        train.run();
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x2160
movl %eax, %edi
callq 0x2180
cmpl $0x2, %ebp
jne 0x375f
movq 0x8(%rbx), %rsi
leaq 0xabc3(%rip), %rdi      # 0xe2f8
callq 0x2340
movq 0xabb7(%rip), %rdi      # 0xe2f8
callq 0x2210
movsd %xmm0, 0xabca(%rip)     # 0xe318
callq 0x2906
leaq 0x54086(%rip), %rdi     # 0x577e0
callq 0x3ca6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::add(int, int, int, std::vector<std::pair<std::vector<int, std::allocator<int>>, double>, std::allocator<std::pair<std::vector<int, std::allocator<int>>, double>>>)
void add(int x,int y,int z, vector<pair<vector<int>,double> > path_list)
    {
        fb_h.push_back(x);
        fb_r.push_back(z);
        fb_l.push_back(y);
        // 保存该三元组对应的所有路径
		fb_path.push_back(path_list);
        ok[make_pair(x,z)][y]=1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r15
movq %rdi, %r14
leaq 0x14(%rsp), %r12
movl %esi, (%r12)
leaq 0x10(%rsp), %rbx
movl %edx, (%rbx)
leaq 0xc(%rsp), %r13
movl %ecx, (%r13)
addq $0x68, %rdi
movq %r12, %rsi
callq 0x3a76
leaq 0x98(%r14), %rdi
movq %r13, %rsi
callq 0x3a76
leaq 0x80(%r14), %rdi
movq %rbx, %rsi
callq 0x3a76
leaq 0xb0(%r14), %rdi
movq %r15, %rsi
callq 0x4508
movl (%r12), %eax
movl (%r13), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
leaq 0x18(%rsp), %rsi
movq %rcx, (%rsi)
movq %r14, %rdi
callq 0x4534
movq %rax, %rdi
movq %rbx, %rsi
callq 0x459a
movl $0x1, (%rax)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::norm(std::vector<double, std::allocator<double>>&)
double norm(vector<double> &a)
    {
        double x = vec_len(a);
        if (x>1)
        for (int ii=0; ii<a.size(); ii++)
                a[ii]/=x;
        return 0;
    }

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x28c8
ucomisd 0x421e(%rip), %xmm0     # 0x9018
jbe 0x4e24
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x4e24
movsd (%rax,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rdx,8)
incq %rdx
jmp 0x4e0c
xorpd %xmm0, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_kb(int, int, int, int, int, int, double)
void train_kb(int e1_a,int e2_a,int rel_a,int e1_b,int e2_b,int rel_b,double margin)
    {
        double sum1 = calc_kb(e1_a,e2_a,rel_a);
        double sum2 = calc_kb(e1_b,e2_b,rel_b);
        if (sum1+margin>sum2)
        {
            // 两者的差距在marign之内，才计算损失函数，调整参数
        	res+=margin+sum1-sum2;
        	gradient_kb(e1_a, e2_a, rel_a, -1);
			gradient_kb(e1_b, e2_b, rel_b, 1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %r9d, %ebp
movl %r8d, %r14d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r15
movl 0x60(%rsp), %r12d
movl %ecx, 0xc(%rsp)
callq 0x67e2
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movl %r14d, 0x10(%rsp)
movl %r14d, %esi
movl %ebp, 0x14(%rsp)
movl %ebp, %edx
movl %r12d, %ecx
callq 0x67e2
movsd 0x18(%rsp), %xmm1
addsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x611f
subsd %xmm0, %xmm1
addsd 0x38(%r15), %xmm1
movsd %xmm1, 0x38(%r15)
movsd 0x2f6b(%rip), %xmm0     # 0x9050
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl 0xc(%rsp), %ecx
callq 0x6864
movsd 0x2f1a(%rip), %xmm0     # 0x9018
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
movl %r12d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6864
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_pos(int, int, int, int, int, int, double)
void train_pos(int e1_a,int e2_a,int rel_a,int e1_b,int e2_b,int rel_b,double margin) {
        double sum1 = calc_kb(e1_a, e2_a, rel_a);
        double sum2 = calc_kb(e1_b, e2_b, rel_b);
        if(sum1 - sum2 > margin) {
            res += sum1 - sum2 - margin;
            gradient_kb(e1_a, e2_a, rel_a, -1);
            gradient_kb(e1_b, e2_b, rel_b, 1);
        } else if(sum2 - sum1 > margin) {
            res += sum2 - sum1 - margin;
            gradient_kb(e1_a, e2_a, rel_a, 1);
            gradient_kb(e1_b, e2_b, rel_b, -1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %r9d, %ebp
movl %r8d, %r14d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r15
movl 0x60(%rsp), %r12d
movl %ecx, 0x14(%rsp)
callq 0x67e2
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r14d, 0x18(%rsp)
movl %r14d, %esi
movl %ebp, 0x1c(%rsp)
movl %ebp, %edx
movl %r12d, %ecx
callq 0x67e2
movsd 0x20(%rsp), %xmm3
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
ucomisd %xmm3, %xmm2
jbe 0x6219
movsd 0x2e0f(%rip), %xmm0     # 0x9018
movsd %xmm0, 0x8(%rsp)
movsd 0x2e39(%rip), %xmm0     # 0x9050
jmp 0x623d
subsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x6285
movsd 0x2e25(%rip), %xmm0     # 0x9050
movsd %xmm0, 0x8(%rsp)
movsd 0x2ddf(%rip), %xmm0     # 0x9018
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
addsd 0x38(%r15), %xmm2
movsd %xmm2, 0x38(%r15)
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl 0x14(%rsp), %ecx
callq 0x6864
movq %r15, %rdi
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
movl %r12d, %ecx
movsd 0x8(%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6864
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_path(int, int, std::vector<int, std::allocator<int>>, double, double)
void train_path(int rel, int rel_neg, vector<int> rel_path, double margin,double x)
    {
        double sum1 = calc_path(rel,rel_path);
        double sum2 = calc_path(rel_neg,rel_path);
		double lambda = 1;
        if (sum1+margin>sum2)
        {
            // 训练path
            // 记录误差
        	res+=x*lambda*(margin+sum1-sum2);
        	gradient_path(rel,rel_path, -x*lambda);
			gradient_path(rel_neg,rel_path, x*lambda);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movaps %xmm1, (%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x444a
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x725e
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
callq 0x4498
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x444a
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x725e
movsd %xmm0, 0x18(%rsp)
movq %r12, %rdi
callq 0x4498
movsd 0x18(%rsp), %xmm1
movsd 0x20(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x642e
subsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
addsd 0x38(%r14), %xmm0
movsd %xmm0, 0x38(%r14)
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x444a
movaps 0x2c75(%rip), %xmm0     # 0x9060
xorps (%rsp), %xmm0
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x72e6
movq %r12, %rdi
callq 0x4498
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x444a
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movapd (%rsp), %xmm0
callq 0x72e6
movq %r12, %rdi
callq 0x4498
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::calc_kb(int, int, int)
double calc_kb(int e1,int e2,int rel)
    {
        double sum=0;
        for (int ii=0; ii<n; ii++)
		{
			double tmp = entity_vec[e2][ii]-entity_vec[e1][ii]-relation_vec[rel][ii];
	        if (L1_flag)
				sum+=fabs(tmp);
			else
				sum+=sqr(tmp);
		}
        return sum;
    }

// Assembly:
movl 0x30(%rdi), %eax
movslq %edx, %rdx
movq 0xf8(%rdi), %r8
imulq $0x18, %rdx, %rdx
addq %r8, %rdx
movslq %esi, %rsi
imulq $0x18, %rsi, %rsi
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq 0xe0(%rdi), %rcx
addq %r8, %rsi
movb 0x79ab(%rip), %dil      # 0xe1c0
xorl %r8d, %r8d
testl %eax, %eax
cmovlel %r8d, %eax
xorpd %xmm0, %xmm0
movapd 0x2856(%rip), %xmm1     # 0x9080
cmpq %r8, %rax
je 0x6863
movq (%rdx), %r9
movsd (%r9,%r8,8), %xmm2
movq (%rsi), %r9
subsd (%r9,%r8,8), %xmm2
movq (%rcx), %r9
subsd (%r9,%r8,8), %xmm2
testb $0x1, %dil
jne 0x6856
mulsd %xmm2, %xmm2
jmp 0x685a
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incq %r8
jmp 0x682a
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::gradient_kb(int, int, int, double)
void gradient_kb(int e1,int e2,int rel, double belta)
    {
        for (int ii=0; ii<n; ii++)
        {
            // entity_vec vector<vector<double> >
            double x = 2*(entity_vec[e2][ii]-entity_vec[e1][ii]-relation_vec[rel][ii]);
            if (L1_flag)
            	if (x>0)
            		x=1;
            	else
            		x=-1;
            relation_tmp[rel][ii]-=belta*rate*x;
            entity_tmp[e1][ii]-=belta*rate*x;
            entity_tmp[e2][ii]+=belta*rate*x;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x30(%rdi), %eax
movslq %edx, %r8
movq 0xf8(%rdi), %rdx
imulq $0x18, %r8, %rbx
leaq (%rdx,%rbx), %r8
movslq %esi, %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
movq 0xe0(%rdi), %r9
addq %rcx, %r9
movb 0x791f(%rip), %r10b     # 0xe1c0
addq 0x110(%rdi), %rcx
movq 0x128(%rdi), %r11
addq %r11, %rsi
addq %rbx, %r11
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
xorpd %xmm1, %xmm1
leaq 0x27c9(%rip), %r14      # 0x9090
cmpq %rbx, %rax
je 0x696d
movq (%r8), %r15
movsd (%r15,%rbx,8), %xmm2
movq (%rdx), %r15
subsd (%r15,%rbx,8), %xmm2
movq (%r9), %r15
subsd (%r15,%rbx,8), %xmm2
addsd %xmm2, %xmm2
xorl %r15d, %r15d
ucomisd %xmm1, %xmm2
seta %bpl
testb $0x1, %r10b
je 0x6909
movb %bpl, %r15b
movsd (%r14,%r15,8), %xmm2
movq (%rcx), %r15
movsd (%r15,%rbx,8), %xmm3
movsd 0x58(%rdi), %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm3
movsd %xmm3, (%r15,%rbx,8)
movq (%rsi), %r15
movsd (%r15,%rbx,8), %xmm3
movsd 0x58(%rdi), %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm3
movsd %xmm3, (%r15,%rbx,8)
movsd 0x58(%rdi), %xmm3
mulsd %xmm0, %xmm3
movq (%r11), %r15
mulsd %xmm2, %xmm3
addsd (%r15,%rbx,8), %xmm3
movsd %xmm3, (%r15,%rbx,8)
incq %rbx
jmp 0x68c7
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::calc_path(int, std::vector<int, std::allocator<int>>)
double calc_path(int r1,vector<int> rel_path)
    {
        double sum=0;
        for (int ii=0; ii<n; ii++)
		{
			double tmp = relation_vec[r1][ii];
            // 直连关系-路径里面的每个关系
			for (int j=0; j<rel_path.size(); j++)
				tmp-=relation_vec[rel_path[j]][ii];
	        if (L1_flag)
				sum+=fabs(tmp);
			else
				sum+=sqr(tmp);
		}
        return sum;
    }

// Assembly:
pushq %rbx
movl 0x30(%rdi), %eax
movslq %esi, %rsi
movq 0xe0(%rdi), %rcx
imulq $0x18, %rsi, %rsi
addq %rcx, %rsi
movb 0x6f46(%rip), %dil      # 0xe1c0
xorl %r8d, %r8d
testl %eax, %eax
cmovlel %r8d, %eax
xorpd %xmm0, %xmm0
movapd 0x1df1(%rip), %xmm1     # 0x9080
cmpq %rax, %r8
je 0x72e3
movq (%rsi), %r9
movsd (%r9,%r8,8), %xmm2
movq (%rdx), %r9
movq 0x8(%rdx), %r10
subq %r9, %r10
sarq $0x2, %r10
xorl %r11d, %r11d
cmpq %r11, %r10
je 0x72ca
movslq (%r9,%r11,4), %rbx
imulq $0x18, %rbx, %rbx
movq (%rcx,%rbx), %rbx
subsd (%rbx,%r8,8), %xmm2
incq %r11
jmp 0x72ae
testb $0x1, %dil
jne 0x72d6
mulsd %xmm2, %xmm2
jmp 0x72da
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incq %r8
jmp 0x728f
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::gradient_path(int, std::vector<int, std::allocator<int>>, double)
void gradient_path(int r1,vector<int> rel_path, double belta)
    {
        for (int ii=0; ii<n; ii++)
        {

			double x = relation_vec[r1][ii];
			for (int j=0; j<rel_path.size(); j++)
				x-=relation_vec[rel_path[j]][ii];
            if (L1_flag)
            	if (x>0)
            		x=1;
            	else
            		x=-1;
            relation_tmp[r1][ii]+=belta*rate*x;
			for (int j=0; j<rel_path.size(); j++)
            	relation_tmp[rel_path[j]][ii]-=belta*rate*x;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x30(%rdi), %eax
movslq %esi, %rsi
movq 0xe0(%rdi), %rcx
imulq $0x18, %rsi, %rsi
leaq (%rcx,%rsi), %r8
movb 0x6eb4(%rip), %r9b      # 0xe1c0
movq 0x110(%rdi), %r10
addq %r10, %rsi
xorl %r11d, %r11d
testl %eax, %eax
cmovlel %r11d, %eax
xorpd %xmm1, %xmm1
leaq 0x1d66(%rip), %rbx      # 0x9090
cmpq %rax, %r11
je 0x73e0
movq (%r8), %r14
movsd (%r14,%r11,8), %xmm2
movq (%rdx), %r14
movq 0x8(%rdx), %r15
subq %r14, %r15
sarq $0x2, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x736a
movslq (%r14,%r12,4), %r13
imulq $0x18, %r13, %r13
movq (%rcx,%r13), %r13
subsd (%r13,%r11,8), %xmm2
incq %r12
jmp 0x734d
xorl %r12d, %r12d
ucomisd %xmm1, %xmm2
seta %bpl
testb $0x1, %r9b
je 0x7384
movb %bpl, %r12b
movsd (%rbx,%r12,8), %xmm2
movsd 0x58(%rdi), %xmm3
mulsd %xmm0, %xmm3
movq (%rsi), %r12
mulsd %xmm2, %xmm3
addsd (%r12,%r11,8), %xmm3
movsd %xmm3, (%r12,%r11,8)
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x73d8
movslq (%r14,%r12,4), %r13
imulq $0x18, %r13, %r13
movq (%r10,%r13), %r13
movsd (%r13,%r11,8), %xmm3
movsd 0x58(%rdi), %xmm4
mulsd %xmm0, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm4, %xmm3
movsd %xmm3, (%r13,%r11,8)
incq %r12
jmp 0x73a3
incq %r11
jmp 0x732a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/SYZYGYfpga[P]brain-tools/src/i2cread.c
// Function: main
int main (int argc, char *argv[])
{
	int file;
	int error = 0;
	int addr = 0;
	char buf[2];

	char filename[20];

	if (argc < 4) {
		printf("Usage: i2cread [i2c device #] [i2c address] [i2c sub-address]\n");
		exit(1);
	}

	snprintf(filename,19,"/dev/i2c-%d", atoi(argv[1]));
	file = open(filename, O_RDWR);
	if (file < 0) {
		printf("Error opening device\n");
		exit(1);
	}

	addr = strtoul(argv[2], NULL, 16);

	if (ioctl(file, I2C_SLAVE, addr) < 0) {
		printf("Error during address set\n");
		exit(1);
	}

	buf[0] = (strtoul(argv[3], NULL, 16) >> 8) & 0xFF;
	buf[1] = (strtoul(argv[3], NULL, 16)) & 0xFF;

	if (write(file,buf,2) != 2) {
		printf("Error during write\n");
		exit(1);
	}

	if (read(file,buf,1) != 1) {
		printf("Error during read\n");
		exit(1);
	} else {
		printf("Result: %.2X\n", buf[0]);
	}

	return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpl $0x3, %edi
jle 0x12b0
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x10b0
leaq 0xe14(%rip), %rdx       # 0x2004
leaq 0x10(%rsp), %r14
pushq $0x13
popq %rsi
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x1060
pushq $0x2
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
testl %eax, %eax
js 0x12b9
movl %eax, %ebp
movq 0x10(%rbx), %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x10a0
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x12c2
movq 0x18(%rbx), %rdi
pushq $0x10
popq %r14
xorl %esi, %esi
movl %r14d, %edx
callq 0x10a0
movb %ah, 0xe(%rsp)
movq 0x18(%rbx), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x10a0
leaq 0xe(%rsp), %rsi
movb %al, 0x1(%rsi)
pushq $0x2
popq %rdx
movl %ebp, %edi
callq 0x1040
cmpq $0x2, %rax
jne 0x12cb
leaq 0xe(%rsp), %rsi
pushq $0x1
popq %rdx
movl %ebp, %edi
callq 0x1080
cmpq $0x1, %rax
jne 0x12d4
movsbl 0xe(%rsp), %esi
leaq 0xd72(%rip), %rdi       # 0x2010
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xdba(%rip), %rdi       # 0x2071
jmp 0x12db
leaq 0xd9c(%rip), %rdi       # 0x205c
jmp 0x12db
leaq 0xd7a(%rip), %rdi       # 0x2043
jmp 0x12db
leaq 0xd5e(%rip), %rdi       # 0x2030
jmp 0x12db
leaq 0xd43(%rip), %rdi       # 0x201e
callq 0x1030
pushq $0x1
popq %rdi
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSession::ServerSession(StatsWriter*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, packet*)
ServerSession::ServerSession (StatsWriter* writer, string peer, int port, packet* p) {
    this->minSeq = p->seqNum;
    this->maxSeq = p->seqNum;
    this->clientStartTime = p->clientStartTime;
    lastArrival = 0;
    stats = new Stats ();
    statsWriters = new StatsWriterSet(writer, p->guid, peer, port);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movl 0x28(%r8), %eax
movl %eax, 0x30(%rdi)
movl %eax, 0x34(%rdi)
movq 0x8(%r8), %rax
movq %rax, (%rdi)
andq $0x0, 0x28(%rdi)
pushq $0x20
popq %rdi
callq 0x2300
movq %rax, %r14
movq %rax, %rdi
callq 0x48b8
movq %r14, 0x38(%rbx)
pushq $0x50
popq %rdi
callq 0x2300
movq %rax, %r14
addq $0x10, %r13
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r13, %rsi
callq 0x2120
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2390
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %r8d
callq 0x4908
movq %r14, 0x40(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x2160
leaq 0x28(%rsp), %rdi
callq 0x2160
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x2160
jmp 0x3735
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x2160
jmp 0x3746
jmp 0x3743
movq %rax, %r15
movq %r14, %rdi
callq 0x22e0
jmp 0x3753
movq %rax, %r15
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2160
movq %r15, %rdi
callq 0x2470
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSession::recordSeq(unsigned int)
void ServerSession::recordSeq(seqnum_t seqNum) {
    seqnum_t diff;
    diff = seqNum - maxSeq;
    if ((diff > 0) && (diff < 10)) {
        maxSeq = seqNum;
    }
    diff = minSeq - seqNum;
    if ((diff > 0) && (diff < 10)) {
        minSeq = seqNum;
    }
}

// Assembly:
movl %esi, %eax
subl 0x34(%rdi), %eax
sete %cl
cmpl $0xa, %eax
setae %al
orb %cl, %al
jne 0x37d1
movl %esi, 0x34(%rdi)
movl 0x30(%rdi), %eax
subl %esi, %eax
sete %cl
cmpl $0xa, %eax
setae %al
orb %cl, %al
jne 0x37e6
movl %esi, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSessionManager::sweepServerSessions()
void ServerSessionManager::sweepServerSessions () {
    int ix;
    time_t now = time(0);
    for (map<string, ServerSession*>::iterator it = sessionMap.begin(); it != sessionMap.end(); it++) {
        ServerSession* ds = it->second;
        if (ds) {
            if (ds->getLastArrival() < now - keepalive) {
                // If the session has a successor, set the max packet index to one before the
                // successor's minimum index to detect gaps in the packet sequence between sessions
                if (sessionMap.find(ds->getSuccessor()) != sessionMap.end()) {
                    ServerSession* successor = sessionMap[ds->getSuccessor()];
                    if (successor) {
                        ds->recordSeq(successor->getMinSeq() - 1);
                    }
                }
                ds->writeStats();
                delete ds;
                sessionMap.erase(it->first);
            }
        } else {
            break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x22c0
movq %rax, %r15
movq 0x18(%rbx), %r12
movq %rbx, 0x8(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %rbx
cmpq 0x10(%rsp), %r12
je 0x3b45
movq 0x40(%r12), %r13
testq %r13, %r13
je 0x3b45
movq 0x8(%rsp), %rax
movslq 0xa0(%rax), %rax
movq %r15, %rcx
subq %rax, %rcx
cmpq %rcx, 0x28(%r13)
jge 0x3b35
leaq 0x8(%r13), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2390
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4422
movq %rax, %r14
movq %rbx, %rdi
callq 0x2160
cmpq 0x10(%rsp), %r14
je 0x3b06
leaq 0x18(%rsp), %rdi
movq %rbp, %rsi
movq %rdi, %rbx
callq 0x2390
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3f3e
movq (%rax), %r14
movq %rbx, %rdi
callq 0x2160
testq %r14, %r14
je 0x3b06
movl 0x30(%r14), %esi
decl %esi
movq %r13, %rdi
callq 0x37bc
leaq 0x20(%r12), %r14
movq %r13, %rdi
callq 0x37a4
movq %r13, %rdi
callq 0x3768
movq %r13, %rdi
callq 0x22e0
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x4460
leaq 0x18(%rsp), %rbx
movq %r12, %rdi
callq 0x21e0
movq %rax, %r12
jmp 0x3a68
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b56
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2470
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSessionManager::receivePing(packet*, timespec*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void ServerSessionManager::receivePing (packet* ph, struct timespec* rcvd, string peer, int port) {
    intervalPacketsReceived++;
    ServerSession* ds = getServerSession(peer, port, ph);
    ds->setLastArrival(time(0));
    ds->recordSeq(ph->seqNum);
    double elapsed = 1000000000L * (rcvd->tv_sec - ph->sent.tv_sec) + rcvd->tv_nsec - ph->sent.tv_nsec;
    ds->getStats()->addDataPoint (elapsed/1000000);
    sweepServerSessions();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
incl 0x90(%rdi)
movq %rsp, %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x2390
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x37e8
movq %rax, %r12
movq %rsp, %rdi
callq 0x2160
xorl %edi, %edi
callq 0x22c0
movq %rax, 0x28(%r12)
movl 0x28(%r14), %esi
movq %r12, %rdi
callq 0x37bc
movq (%r15), %rax
subq 0x30(%r14), %rax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
addq 0x8(%r15), %rax
subq 0x38(%r14), %rax
cvtsi2sd %rax, %xmm0
movq 0x38(%r12), %rdi
divsd 0x285d(%rip), %xmm0     # 0x6450
callq 0x48d2
movq %rbx, %rdi
callq 0x3a36
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2470
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/serversession.cc
// Function: ServerSessionManager::ServerSessionManager(StatsWriter*, int)
ServerSessionManager::ServerSessionManager (StatsWriter* writer, int theKeepalive) {
    if (theSessionManager) {
        err(1, "Attempt to create multiple session managers");
    }
    theSessionManager = this;
    intervalPacketsReceived = 0;
    this->writer = writer;
    this->keepalive = theKeepalive;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x38(%rdi), %rax
andl $0x0, 0x38(%rdi)
andq $0x0, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
leaq 0x68(%rdi), %rax
andl $0x0, 0x68(%rdi)
andq $0x0, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movq %rax, 0x80(%rdi)
andq $0x0, 0x88(%rdi)
xorl %eax, %eax
cmpq %rax, 0x6413(%rip)      # 0xa290
jne 0x3ea0
movq %rbx, 0x640a(%rip)      # 0xa290
andl $0x0, 0x90(%rbx)
movq %rsi, 0x98(%rbx)
movl %edx, 0xa0(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2658(%rip), %rsi      # 0x64ff
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x22a0
movq %rax, %r14
leaq 0x60(%rbx), %rdi
leaq 0x30(%rbx), %r15
callq 0x2e20
movq %r15, %rdi
callq 0x2e8c
movq %rbx, %rdi
callq 0x2e8c
movq %r14, %rdi
callq 0x2470
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/stats.cc
// Function: Stats::addDataPoint(double)
int Stats::addDataPoint (double datapoint) {
    count++;
    sum += datapoint;
    sumOfSquares += datapoint * datapoint;
    if (max < datapoint) {
        max = datapoint;
    }
    return count;
}

// Assembly:
movl 0x4(%rdi), %eax
incl %eax
movl %eax, 0x4(%rdi)
movsd 0x8(%rdi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rdi)
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
addsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x10(%rdi)
ucomisd 0x18(%rdi), %xmm0
jbe 0x4906
movsd %xmm0, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/statswriter.cc
// Function: StatsWriterSet::StatsWriterSet(StatsWriter*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
StatsWriterSet::StatsWriterSet (StatsWriter* writer, string guid, string peer, int port) {
    this->writer = writer;
    this->guid = guid;
    this->peer = peer;
    this->port = port;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r15
movq %rdi, %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x8(%rdi), %r12
leaq 0x28(%rdi), %r13
movb %al, 0x38(%rdi)
movq %rsi, (%rdi)
movq %r12, %rdi
movq %rdx, %rsi
callq 0x21a0
movq %r13, %rdi
movq %r15, %rsi
callq 0x21a0
movl %ebx, 0x48(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0x2160
movq %r12, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2470
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/statswriter.cc
// Function: StatsWriter::writeStats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, Stats*)
void StatsWriter::writeStats (string guid, string peer, int port, Stats *stats) {
    int n = peer.length();
    char* peerCopy = new char[n + 1];
    strncpy(peerCopy, peer.c_str(), n);
    peerCopy[n] = 0;
    char* c = peerCopy;
    while (*c) {
        if (*c == '.') {
            *c = '_';
        }
        c++;
    }

    if (!this->quiet) {
        writeConsoleStats(guid, peerCopy, port, stats);
    }
    if (this->statsd_sa) {
        writeStatsdStats(guid, peerCopy, port, stats);
    }
    if (this->tags_sa) {
        writeTagsStats(guid, peerCopy, port, stats);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdx), %rbx
leal 0x1(%rbx), %eax
cltq
testq %rax, %rax
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, %r12
movq (%r13), %rsi
movslq %ebx, %r13
movq %rax, %rdi
movq %r13, %rdx
callq 0x2190
movb $0x0, (%r12,%r13)
movq %r12, %rax
movzbl (%rax), %ecx
cmpl $0x2e, %ecx
je 0x4a6c
testl %ecx, %ecx
jne 0x4a6f
jmp 0x4a74
movb $0x5f, (%rax)
incq %rax
jmp 0x4a5e
cmpl $0x0, 0x28(%r14)
jne 0x4ad8
leaq 0xb8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2390
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r12, %rsi
callq 0x2120
leaq 0xb8(%rsp), %r13
leaq 0x98(%rsp), %rbx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movq 0x10(%rsp), %r8
callq 0x4ed8
movq %rbx, %rdi
callq 0x2160
movq %r13, %rdi
callq 0x2160
cmpq $0x0, 0x10(%r14)
je 0x4b29
leaq 0x78(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2390
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r12, %rsi
callq 0x2120
leaq 0x38(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %ecx
movq 0x10(%rsp), %r8
callq 0x4fba
leaq 0x38(%rsp), %rdi
callq 0x2160
leaq 0x78(%rsp), %rdi
callq 0x2160
cmpq $0x0, 0x18(%r14)
je 0x4b7a
leaq 0x58(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2390
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r12, %rsi
callq 0x2120
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %ecx
movq 0x10(%rsp), %r8
callq 0x5410
leaq 0x18(%rsp), %rdi
callq 0x2160
leaq 0x58(%rsp), %rdi
callq 0x2160
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ba9
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x4ba2
jmp 0x4ba9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2160
jmp 0x4bac
movq %rax, %rbx
movq %r13, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2470
// File: /workspace/github_cpp_makefile_star2_O2/yahoo[P]UDPing/src/statswriter.cc
// Function: StatsWriter::writeConsoleStats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, Stats*)
void StatsWriter::writeConsoleStats (string guid, string peer, int port, Stats* stats) {
    printf ("{");
    printf ("\"from_host\":\"%s\",", peer.c_str());
    printf ("\"from_port\":\"%d\",", port);
    printf ("\"to_host\":\"%s\",", this->receive_hostname);
    printf ("\"to_port\":\"%d\",", this->listen_port);
    printf ("\"guid\":\"%s\",", guid.c_str());
    printf ("\"count\":\"%d\",", stats->getCount());
    printf ("\"targetCount\":\"%d\",", stats->getTargetCount());
    printf ("\"sum\":\"%lf\",", stats->getSum());
    printf ("\"sumOfSquares\":\"%lf\",", stats->getSumOfSquares());
    printf ("\"max\":\"%lf\"", stats->getMax());
    printf ("}\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
pushq $0x7b
popq %rdi
callq 0x23b0
movq (%r12), %rsi
leaq 0x162b(%rip), %rdi      # 0x652c
xorl %eax, %eax
callq 0x2060
leaq 0x162f(%rip), %rdi      # 0x653e
movl %ebp, %esi
xorl %eax, %eax
callq 0x2060
movq (%r15), %rsi
leaq 0x162e(%rip), %rdi      # 0x6550
xorl %eax, %eax
callq 0x2060
movl 0x8(%r15), %esi
leaq 0x162c(%rip), %rdi      # 0x6560
xorl %eax, %eax
callq 0x2060
movq (%r14), %rsi
leaq 0x162b(%rip), %rdi      # 0x6570
xorl %eax, %eax
callq 0x2060
movl 0x4(%rbx), %esi
leaq 0x1627(%rip), %rdi      # 0x657d
xorl %eax, %eax
callq 0x2060
movl (%rbx), %esi
leaq 0x1625(%rip), %rdi      # 0x658b
xorl %eax, %eax
callq 0x2060
movsd 0x8(%rbx), %xmm0
leaq 0x1626(%rip), %rdi      # 0x659f
movb $0x1, %al
callq 0x2060
movsd 0x10(%rbx), %xmm0
leaq 0x1620(%rip), %rdi      # 0x65ac
movb $0x1, %al
callq 0x2060
movsd 0x18(%rbx), %xmm0
leaq 0x1623(%rip), %rdi      # 0x65c2
movb $0x1, %al
callq 0x2060
leaq 0x16c1(%rip), %rdi      # 0x666e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x23f0
// File: /workspace/github_cpp_makefile_star2_O2/xnevs[P]bullimp/examples/compare.cpp
// Function: read1(std::istream&)
unsigned int read1(std::istream & in) {
    unsigned char a, b;
    a = static_cast<unsigned char>(in.get());
    b = static_cast<unsigned char>(in.get());
    return a | (b << 8);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2190
movq %rbx, %rdi
movl %eax, %ebp
callq 0x2190
shll $0x8, %eax
movzbl %bpl, %ecx
movzwl %ax, %eax
orl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xnevs[P]bullimp/examples/compare.cpp
// Function: boost::adjacency_list<boost::setS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::no_property, boost::no_property, boost::listS> read_amalfi<boost::adjacency_list<boost::setS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::no_property, boost::no_property, boost::listS>>(std::istream&)
R read_amalfi(std::istream & in) {
    using namespace boost;

    auto n = read1(in);
    R g{n};
    for(int i=0; i<n; i++) {
        auto cnt = read1(in);
        for(int j=0; j<cnt; j++) {
            auto k = read1(in);
            add_edge(i,k,g);
        }
    }
    return g;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rsi, %rdi
movq %rsi, %r14
callq 0x236c
leaq 0x8(%rsp), %r12
movl %eax, %r15d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x41f4
xorl %r13d, %r13d
cmpq %r15, %r13
je 0x4067
movq %r14, %rdi
callq 0x236c
movl %eax, %ebp
subl $0x1, %ebp
jb 0x4062
movq %r14, %rdi
callq 0x236c
movl %eax, %edx
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x4227
jmp 0x4043
incq %r13
jmp 0x4034
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x407d
jmp 0x407d
movq %rbx, %rdi
movq %rax, %r14
callq 0x4090
movq %r14, %rdi
callq 0x2220