LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::Start()
int SSDPDB::Start(){
    int ret = 0;
    pthread_attr_t  attr;

    //Start the cache control thread
    ret = pthread_attr_init(&attr);
    STAT(ret);
    ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
    STAT(ret);
    ret = pthread_create(&mCacheControlThread, &attr, SSDPDB::sCacheControlLoop, (void*)this);
    pthread_attr_destroy(&attr);
EXIT:
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
callq 0x32f0
testl %eax, %eax
je 0x4ea8
movl %eax, %ebx
callq 0x3040
movl (%rax), %ecx
leaq 0x321a(%rip), %rax      # 0x80a4
movq %rax, (%rsp)
leaq 0x3215(%rip), %rdi      # 0x80aa
leaq 0x359b(%rip), %r9       # 0x8437
movl %ebx, %esi
xorl %edx, %edx
movl $0x44, %r8d
jmp 0x4ee7
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x3300
testl %eax, %eax
je 0x4efa
movl %eax, %ebx
callq 0x3040
movl (%rax), %ecx
leaq 0x31d9(%rip), %rax      # 0x80a4
movq %rax, (%rsp)
leaq 0x31d4(%rip), %rdi      # 0x80aa
leaq 0x355a(%rip), %r9       # 0x8437
movl %ebx, %esi
xorl %edx, %edx
movl $0x46, %r8d
xorl %eax, %eax
callq 0x3050
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x60(%r14), %rdi
leaq 0x1d(%rip), %rdx        # 0x4f22
leaq 0x8(%rsp), %r15
movq %r15, %rsi
movq %r14, %rcx
callq 0x3440
movl %eax, %ebx
movq %r15, %rdi
callq 0x33d0
jmp 0x4eee
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::InsertDevice(unsigned char*, unsigned int)
SSDPDBDevice* SSDPDB::InsertDevice(u8* usn, u32 usnlen){
    SSDPDBDevice* thisdevice = new SSDPDBDevice();
    thisdevice->usn.assign((const char*)usn, (size_t)usnlen);

    Lock();
    mDevices.push_back(thisdevice);
    Unlock();

    return thisdevice;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x150, %edi            # imm = 0x150
callq 0x3260
movq %rax, %r14
movq %rax, %rdi
callq 0x591c
movq %r14, (%rsp)
movq %r14, %rdi
addq $0x48, %rdi
movl %ebp, %r8d
movq 0x50(%r14), %rdx
xorl %esi, %esi
movq %r15, %rcx
callq 0x3390
leaq 0x38(%rbx), %r15
movq %r15, %rdi
callq 0x3330
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4fa8
movq %r14, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4fb3
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x56a4
movq %r15, %rdi
callq 0x31c0
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x150, %esi            # imm = 0x150
movq %r14, %rdi
callq 0x3280
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::DeleteDevice(unsigned char*, unsigned int)
int SSDPDB::DeleteDevice(u8* usn, u32 usnlen){
    int tel = 0;
    SSDPDBDevice* thisdevice = NULL;
    int updated = 0;

    Lock();
    unsigned int i=0;
    while(i<mDevices.size()){
        thisdevice = mDevices[i];
        if( (thisdevice->usn.length() == usnlen &&  memcmp(thisdevice->usn.c_str(), usn, usnlen) == 0) ){
            mDevices.erase(mDevices.begin()+i);
            delete(thisdevice);
            updated++;
        }else{
            i++;
        }
    }
    Unlock();

    if(updated > 0){
        DeviceUpdate(NULL);
    }

    return tel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x3330
movq (%rbx), %r15
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %r13
cmpq %r15, %r13
je 0x50f5
movq %r14, 0x18(%rsp)
movl %ebp, %r12d
xorl %ebx, %ebx
xorl %r14d, %r14d
movl $0x0, 0x8(%rsp)
movq (%r15,%rbx,8), %rbp
cmpq %r12, 0x50(%rbp)
jne 0x504f
movq 0x48(%rbp), %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
callq 0x3290
testl %eax, %eax
je 0x5066
incl %r14d
movl %r14d, %ebx
movq %r13, %rax
subq %r15, %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x5030
jmp 0x50b1
leaq (%r15,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
cmpq %r13, %rsi
movq 0x10(%rsp), %rbx
je 0x5087
subq %rsi, %r13
movq %r13, %rdx
callq 0x33c0
movq 0x8(%rbx), %r13
addq $-0x8, %r13
movq %r13, 0x8(%rbx)
movq %rbp, %rdi
callq 0x5be6
movl $0x150, %esi            # imm = 0x150
movq %rbp, %rdi
callq 0x3280
incl 0x8(%rsp)
movq (%rbx), %r15
movq 0x8(%rbx), %r13
jmp 0x5052
movq 0x18(%rsp), %rdi
callq 0x31c0
cmpl $0x0, 0x8(%rsp)
jle 0x50fd
movl $0x1, 0xc(%rsp)
movq 0x10(%rsp), %r15
movq 0x18(%r15), %rbx
cmpq 0x20(%r15), %rbx
jae 0x50fd
leaq 0xc(%rsp), %r14
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
addq $0x8, %rbx
cmpq 0x20(%r15), %rbx
jb 0x50de
jmp 0x50fd
movq %r14, %rdi
callq 0x31c0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::DeleteDevicesByUuid(unsigned char*, unsigned int)
int SSDPDB::DeleteDevicesByUuid(u8* uuid, u32 uuidlen){
    int tel = 0;
    SSDPDBDevice* thisdevice = NULL;
    int updated = 0;

    Lock();
    unsigned int i=0;
    while(i<mDevices.size()){
        thisdevice = mDevices[i];
        if( (thisdevice->uuid.length() == uuidlen &&  memcmp(thisdevice->uuid.c_str(), uuid, uuidlen) == 0) ){
            mDevices.erase(mDevices.begin()+i);
            delete(thisdevice);
            updated++;
        }else{
            i++;
        }
    }
    Unlock();

    if(updated > 0){
        DeviceUpdate(NULL);
    }

    return tel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, 0x20(%rsp)
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x3330
movq (%rbx), %r15
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %r13
cmpq %r15, %r13
je 0x5263
movq %r14, 0x18(%rsp)
movl %ebp, %r12d
xorl %ebx, %ebx
xorl %r14d, %r14d
movl $0x0, 0x8(%rsp)
movq (%r15,%rbx,8), %rbp
cmpq %r12, 0x10(%rbp)
jne 0x51bd
movq 0x8(%rbp), %rdi
movq 0x20(%rsp), %rsi
movq %r12, %rdx
callq 0x3290
testl %eax, %eax
je 0x51d4
incl %r14d
movl %r14d, %ebx
movq %r13, %rax
subq %r15, %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x519e
jmp 0x521f
leaq (%r15,%rbx,8), %rdi
leaq 0x8(%rdi), %rsi
cmpq %r13, %rsi
movq 0x10(%rsp), %rbx
je 0x51f5
subq %rsi, %r13
movq %r13, %rdx
callq 0x33c0
movq 0x8(%rbx), %r13
addq $-0x8, %r13
movq %r13, 0x8(%rbx)
movq %rbp, %rdi
callq 0x5be6
movl $0x150, %esi            # imm = 0x150
movq %rbp, %rdi
callq 0x3280
incl 0x8(%rsp)
movq (%rbx), %r15
movq 0x8(%rbx), %r13
jmp 0x51c0
movq 0x18(%rsp), %rdi
callq 0x31c0
cmpl $0x0, 0x8(%rsp)
jle 0x526b
movl $0x1, 0xc(%rsp)
movq 0x10(%rsp), %r15
movq 0x18(%r15), %rbx
cmpq 0x20(%r15), %rbx
jae 0x526b
leaq 0xc(%rsp), %r14
movq (%rbx), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
addq $0x8, %rbx
cmpq 0x20(%r15), %rbx
jb 0x524c
jmp 0x526b
movq %r14, %rdi
callq 0x31c0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::RemoveAllDevices()
void SSDPDB::RemoveAllDevices() {
    printf("SSDPDB::RemoveAllDevices\n");
    Lock();
    mDevices.clear();
    Unlock();

    SSDPDBMsg msg;
    std::vector<SSDPDBObserver*>::iterator it;
    msg.type = SSDPDBMsg_DeviceUpdate;
    for(it=mObservers.begin();it<mObservers.end();it++){
        ((SSDPDBObserver*)*it)->SSDPDBMessage(&msg);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x316b(%rip), %rdi      # 0x845a
callq 0x3380
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x3330
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x530d
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x31c0
movl $0x1, 0xc(%rsp)
movq 0x18(%rbx), %r15
cmpq 0x20(%rbx), %r15
jae 0x5341
leaq 0xc(%rsp), %r14
movq (%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
addq $0x8, %r15
cmpq 0x20(%rbx), %r15
jb 0x532c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::RemoveObserver(SSDPDBObserver*)
int SSDPDB::RemoveObserver(SSDPDBObserver* observer){
    u8 found = 0;
    int tel = 0;
    std::vector<SSDPDBObserver*>::iterator it;
    for(it=mObservers.begin();it<mObservers.end();it++){
        if(observer == *it){
            //Remove this one and stop
            found = 1;
            break;
        }
        tel++;
    }
    if(found){
        mObservers.erase(mObservers.begin()+tel);
    }
    return 0;

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x20(%rbx), %rax
cmpq %rax, %rdi
jae 0x5415
movq %rax, %rdx
subq %rdi, %rdx
addq $-0x8, %rdx
cmpq %rsi, (%rdi)
je 0x53fb
addq $0x8, %rdi
addq $-0x8, %rdx
cmpq %rax, %rdi
jb 0x53e7
jmp 0x5415
leaq 0x8(%rdi), %rsi
cmpq %rax, %rsi
je 0x540d
callq 0x33c0
movq 0x20(%rbx), %rax
addq $-0x8, %rax
movq %rax, 0x20(%rbx)
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::ServiceUpdate(SSDPDBDevice*)
void SSDPDB::ServiceUpdate(SSDPDBDevice* service){
    SSDPDBMsg msg;
    std::vector<SSDPDBObserver*>::iterator it;
    msg.type = SSDPDBMsg_ServiceUpdate;
    for(it=mObservers.begin();it<mObservers.end();it++){
        ((SSDPDBObserver*)*it)->SSDPDBMessage(&msg);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x2, 0xc(%rsp)
movq 0x18(%rdi), %r15
cmpq 0x20(%rdi), %r15
jae 0x5452
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movq (%r15), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *(%rax)
addq $0x8, %r15
cmpq 0x20(%rbx), %r15
jb 0x543d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::UpdateCacheControl(unsigned char*, unsigned int, int)
int SSDPDB::UpdateCacheControl(u8* uuid, u32 uuidlen, int cachecontrol){
    int tel = 0;
    SSDPDBDevice* thisdevice = NULL;

    Lock();
    vector<SSDPDBDevice*>::const_iterator it;
    it=mDevices.begin();
    while(it < mDevices.end()){
        thisdevice = *it;
        if( (thisdevice->uuid.length() == uuidlen &&  memcmp(thisdevice->uuid.c_str(), uuid, uuidlen) == 0) ){
            thisdevice->cachecontrol = cachecontrol;
            thisdevice->lastupdate = systimeinseconds;
            tel++;
        }
        it++;
    }
    Unlock();

    return tel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x4(%rsp)
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
addq $0x38, %rdi
movq %rdi, 0x8(%rsp)
callq 0x3330
movq (%rbx), %r14
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rbx
xorl %r13d, %r13d
cmpq %rbx, %r14
jae 0x54eb
movl %ebp, %ebp
xorl %r13d, %r13d
movq (%r14), %r12
cmpq %rbp, 0x10(%r12)
jne 0x54e2
movq 0x8(%r12), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x3290
testl %eax, %eax
jne 0x54e2
movl 0x4(%rsp), %eax
movl %eax, 0x140(%r12)
xorl %edi, %edi
callq 0x3220
movq %rax, 0x148(%r12)
incl %r13d
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rbx
addq $0x8, %r14
cmpq %rbx, %r14
jb 0x549d
movq 0x8(%rsp), %rdi
callq 0x31c0
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpdb.cpp
// Function: SSDPDB::CacheControlLoop()
int SSDPDB::CacheControlLoop(){
    mRun = 1;
    SSDPDBDevice* thisdevice = NULL;
    vector<SSDPDBDevice*>::iterator it;
    time_t nows;
    u8 updated;
    while(mRun){
        sleep(CACHE_CONTROL_TIMEOUT);

        Lock();
        updated = 0;
        nows = time(NULL);
        unsigned int i=0;
        while(i<mDevices.size()){
            thisdevice = mDevices[i];
            if((time_t)(thisdevice->lastupdate + thisdevice->cachecontrol) <= nows){
                mDevices.erase(mDevices.begin()+i);
                delete(thisdevice);
                updated++;
            }else{
                i++;
            }
        }
        Unlock();

        if(updated > 0){
            DeviceUpdate(NULL);
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movb $0x1, 0x68(%rdi)
leaq 0x38(%rdi), %r13
leaq 0xc(%rsp), %r15
movq %r13, 0x10(%rsp)
movl $0x1e, %edi
callq 0x31a0
movq %r13, %rdi
callq 0x3330
xorl %edi, %edi
callq 0x3220
movq %rax, %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
cmpq %rax, %rdx
je 0x5601
xorl %ecx, %ecx
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rax,%rcx,8), %r13
movl 0x140(%r13), %esi
addq 0x148(%r13), %rsi
cmpq %r12, %rsi
jle 0x557a
incl %r14d
jmp 0x55ba
leaq (%rax,%rcx,8), %rdi
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0x5593
subq %rsi, %rdx
callq 0x33c0
movq 0x8(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x8(%rbx)
movq %r13, %rdi
callq 0x5be6
movl $0x150, %esi            # imm = 0x150
movq %r13, %rdi
callq 0x3280
incb %bpl
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movl %r14d, %ecx
movq %rdx, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rcx, %rsi
ja 0x555e
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x31c0
testb %bpl, %bpl
je 0x5609
movl $0x1, 0xc(%rsp)
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
jae 0x5609
movq (%r14), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *(%rax)
addq $0x8, %r14
jmp 0x55ea
movq %r13, %rdi
callq 0x31c0
cmpb $0x0, 0x68(%rbx)
jne 0x552b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpmessage.cpp
// Function: SSDPMessage::~SSDPMessage()
SSDPMessage::~SSDPMessage(){
    std::vector<SSDP_HTTP_HEADER*>::iterator it;
    for(it=mHeaderSignature.begin();it<mHeaderSignature.end();it++){
        free(*it);
    }
    mHeaderSignature.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5ccc(%rip), %rax      # 0xb9a8
movq %rax, (%rdi)
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rax
cmpq %rax, %r14
jae 0x5d05
movq (%r14), %rdi
callq 0x32d0
addq $0x8, %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jb 0x5cec
movq 0x8(%rbx), %r14
cmpq %r14, %rax
je 0x5d0e
movq %r14, 0x10(%rbx)
testq %r14, %r14
je 0x5d29
movq 0x18(%rbx), %rsi
subq %r14, %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3280
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpmessage.cpp
// Function: SSDPMessage::AddSignatureHeader(char*, char*)
int SSDPMessage::AddSignatureHeader(char* fieldname, char* fieldvalue){
    SSDP_HTTP_HEADER *thisHeader = (SSDP_HTTP_HEADER*)malloc(sizeof(SSDP_HTTP_HEADER));
    thisHeader->fieldname = (u8*)fieldname;
    thisHeader->fieldnamelen = (unsigned int)strlen(fieldname);
    thisHeader->fieldvalue = (u8*)fieldvalue;
    thisHeader->fieldvaluelen = (unsigned int)strlen(fieldvalue);
    mHeaderSignature.push_back(thisHeader);
    return (int)mHeaderSignature.size();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl $0x28, %edi
callq 0x3310
movq %rax, %r15
movq %rax, (%rsp)
movq %r12, (%rax)
movq %r12, %rdi
callq 0x3100
movl %eax, 0x8(%r15)
movq %r14, 0x10(%r15)
movq %r14, %rdi
callq 0x3100
movl %eax, 0x18(%r15)
leaq 0x8(%rbx), %r14
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x5e8c
movq %r15, (%rsi)
movq 0x10(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x10(%rbx)
jmp 0x5e9b
movq %rsp, %rdx
movq %r14, %rdi
callq 0x5f56
movq 0x10(%rbx), %rax
subq (%r14), %rax
shrq $0x3, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpnotifyalive.cpp
// Function: SSDPNotifyAlive::SSDPNotifyAlive()
SSDPNotifyAlive::SSDPNotifyAlive(){
    AddSignatureHeader((char*)"HOST", (char*)"");
    AddSignatureHeader((char*)"CACHE-CONTROL", (char*)"");
    AddSignatureHeader((char*)"LOCATION", (char*)"");
    AddSignatureHeader((char*)"NT", (char*)"");
    AddSignatureHeader((char*)"NTS", (char*)"ssdp:alive");
    AddSignatureHeader((char*)"SERVER", (char*)"");
    AddSignatureHeader((char*)"USN", (char*)"");
    /* Disabled because some devices don't send it
    AddSignatureHeader("BOOTID.UPNP.ORG", "");
    AddSignatureHeader("CONFIGID.UPNP.ORG", "");
    */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5cb8
leaq 0x5a55(%rip), %rax      # 0xbaf0
movq %rax, (%rbx)
leaq 0x2401(%rip), %rsi      # 0x84a6
leaq 0x22b5(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23f0(%rip), %rsi      # 0x84ab
leaq 0x229f(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23e8(%rip), %rsi      # 0x84b9
leaq 0x2289(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23db(%rip), %rsi      # 0x84c2
leaq 0x2273(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23c8(%rip), %rsi      # 0x84c5
leaq 0x23c5(%rip), %rdx      # 0x84c9
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23c1(%rip), %rsi      # 0x84d4
leaq 0x2247(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x23b2(%rip), %rsi      # 0x84db
leaq 0x2231(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5cce
movq %r14, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpnotifybye.cpp
// Function: SSDPNotifyBye::SSDPNotifyBye()
SSDPNotifyBye::SSDPNotifyBye(){
    AddSignatureHeader((char*)"HOST", (char*)"");
    AddSignatureHeader((char*)"NT", (char*)"");
    AddSignatureHeader((char*)"NTS", (char*)"ssdp:byebye");
    AddSignatureHeader((char*)"USN", (char*)"");
    /*
    AddSignatureHeader("BOOTID.UPNP.ORG", "");
    AddSignatureHeader("CONFIGID.UPNP.ORG", "");
    */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5cb8
leaq 0x55cd(%rip), %rax      # 0xbb60
movq %rax, (%rbx)
leaq 0x1f09(%rip), %rsi      # 0x84a6
leaq 0x1dbd(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1f0f(%rip), %rsi      # 0x84c2
leaq 0x1da7(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1efc(%rip), %rsi      # 0x84c5
leaq 0x1f7e(%rip), %rdx      # 0x854e
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1efc(%rip), %rsi      # 0x84db
leaq 0x1d7b(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5cce
movq %r14, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpnotifybye.cpp
// Function: SSDPNotifyBye::Process(sockaddr*, std::vector<SSDP_HTTP_HEADER*, std::allocator<SSDP_HTTP_HEADER*>>)
int SSDPNotifyBye::Process(struct sockaddr* sender, std::vector<SSDP_HTTP_HEADER*> msgheaders){
    int ret = 0;
    u8* usn;
    int usnlen;
    ssdpuuid uuid;

    //Get the Device USN (Unique Service Name)
    ret=GetHeaderValueFromCollection(msgheaders, (u8*)"USN", 3, &usn, &usnlen);
    if(ret != 0 || usnlen<=0){
        ret = -1;
        goto EXIT;
    }

    ret = ParseUSN(usn, usnlen, &uuid);
    if(ret < 0){
        goto EXIT;//Unknown format
    }

    //Delete the UUID
    //Specs : If a control point has received at least one ssdp:byebye message of a root device, any of its embedded devices or any of its
    //        services then the control point can assume that all are no longer available.
    mDB->DeleteDevicesByUuid(uuid.uuid, uuid.uuidlen);



EXIT:
    return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x5eba
leaq 0x1eaa(%rip), %rsi      # 0x84db
leaq 0x10(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %r14, %rdi
movl $0x3, %edx
callq 0x7590
movl %eax, %ebp
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6661
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
testl %ebp, %ebp
setne %al
movl 0xc(%rsp), %esi
testl %esi, %esi
setle %cl
orb %al, %cl
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jne 0x669f
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x760e
movl %eax, %ebp
testl %eax, %eax
js 0x669f
movq 0x20(%rbx), %rdi
movq 0x30(%rsp), %rsi
movl 0x38(%rsp), %edx
callq 0x5150
movl %ebp, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x66c7
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpnotifyupdate.cpp
// Function: SSDPNotifyUpdate::SSDPNotifyUpdate()
SSDPNotifyUpdate::SSDPNotifyUpdate(){
    AddSignatureHeader((char*)"HOST", (char*)"");
    AddSignatureHeader((char*)"LOCATION", (char*)"");
    AddSignatureHeader((char*)"NT", (char*)"");
    AddSignatureHeader((char*)"NTS", (char*)"ssdp:update");
    AddSignatureHeader((char*)"USN", (char*)"");
    /*
    AddSignatureHeader("BOOTID.UPNP.ORG", "");
    AddSignatureHeader("CONFIGID.UPNP.ORG", "");
    AddSignatureHeader("NEXTBOOTID.UPNP.ORG", "");
    */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5cb8
leaq 0x54d5(%rip), %rax      # 0xbbd0
movq %rax, (%rbx)
leaq 0x1da1(%rip), %rsi      # 0x84a6
leaq 0x1c55(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1d9e(%rip), %rsi      # 0x84b9
leaq 0x1c3f(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1d91(%rip), %rsi      # 0x84c2
leaq 0x1c29(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1d7e(%rip), %rsi      # 0x84c5
leaq 0x1e1c(%rip), %rdx      # 0x856a
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1d7e(%rip), %rsi      # 0x84db
leaq 0x1bfd(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5cce
movq %r14, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpparser.cpp
// Function: SSDPParser::SSDPParser(SSDPDB*)
SSDPParser::SSDPParser(SSDPDB* db):mType(SSDP_TYPE_UNKNOWN){
    mDB = db;

    /*
     * Register all implemented message types
     */
    SSDPMessage* msg;
    msg = new SSDPNotifyAlive();
    msg->SetDB(mDB);
    mMessages.push_back(msg);

    msg = new SSDPNotifyBye();
    msg->SetDB(mDB);
    mMessages.push_back(msg);

    msg = new SSDPNotifyUpdate();
    msg->SetDB(mDB);
    mMessages.push_back(msg);

    msg = new SSDPSearchReq();
    msg->SetDB(mDB);
    mMessages.push_back(msg);

    msg = new SSDPSearchResp();
    msg->SetDB(mDB);
    mMessages.push_back(msg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, (%rdi)
leaq 0x20(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %rsi, 0x38(%rdi)
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x6088
movq %r12, (%rsp)
movq 0x38(%rbx), %rsi
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x680f
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x681a
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6e5e
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x6580
movq %r12, (%rsp)
movq 0x38(%rbx), %rsi
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x6859
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x6864
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6e5e
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x66e8
movq %r12, (%rsp)
movq 0x38(%rbx), %rsi
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x68a3
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x68ae
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6e5e
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x6f9c
movq %r12, (%rsp)
movq 0x38(%rbx), %rsi
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x68ed
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x68f8
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6e5e
movl $0x28, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x7030
movq %r12, (%rsp)
movq 0x38(%rbx), %rsi
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x6937
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x6942
movq %rsp, %rdx
movq %r14, %rdi
callq 0x6e5e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6956
jmp 0x6956
jmp 0x6956
jmp 0x6956
movq %rax, %r15
movl $0x28, %esi
movq %r12, %rdi
callq 0x3280
jmp 0x696b
movq %rax, %r15
leaq 0x8(%rbx), %r12
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6983
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x3280
movq (%r12), %rdi
testq %rdi, %rdi
je 0x6998
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r15, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpparser.cpp
// Function: SSDPParser::~SSDPParser()
SSDPParser::~SSDPParser(){
    std::vector<SSDP_HTTP_HEADER*>::iterator it;
    for(it=mHeaders.begin();it<mHeaders.end();it++){
        free(*it);
    }
    mHeaders.clear();

    std::vector<SSDPMessage*>::iterator itmsg;
    for(itmsg=mMessages.begin();itmsg<mMessages.end();itmsg++){
        delete(*itmsg);
    }
    mMessages.clear();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rax
cmpq %rax, %r14
jae 0x69cd
movq (%r14), %rdi
callq 0x32d0
addq $0x8, %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jb 0x69b4
movq 0x8(%rbx), %r14
cmpq %r14, %rax
je 0x69d6
movq %r14, 0x10(%rbx)
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %rax
cmpq %rax, %r14
jae 0x6a02
movq (%r14), %rdi
testq %rdi, %rdi
je 0x69f5
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rbx), %rax
addq $0x8, %r14
cmpq %rax, %r14
jb 0x69e3
movq 0x20(%rbx), %r14
cmpq %r14, %rax
je 0x6a0b
movq %r14, 0x28(%rbx)
testq %r14, %r14
je 0x6a1f
movq 0x30(%rbx), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x3280
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6a3b
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3280
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpparser.cpp
// Function: SSDPParser::ReInit()
int SSDPParser::ReInit(){
    //Clear all headers of previous session (if any)
    if(mHeaders.size() > 0){
        std::vector<SSDP_HTTP_HEADER*>::iterator it;
        for(it=mHeaders.begin();it<mHeaders.end();it++){
            free(*it);
        }
        mHeaders.clear();
    }


    //ReInit all messages
    if(mMessages.size() > 0){
        std::vector<SSDPMessage*>::const_iterator itmsg;
        for(itmsg=mMessages.begin();itmsg<mMessages.end();itmsg++){
            ((SSDPMessage*)*itmsg)->ReInit();
        }
    }

    //Clear all members
    mType = SSDP_TYPE_UNKNOWN;


    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rax
cmpq %r14, %rax
je 0x6a7c
jbe 0x6a73
movq (%r14), %rdi
callq 0x32d0
addq $0x8, %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jb 0x6a5a
movq 0x8(%rbx), %r14
cmpq %r14, %rax
je 0x6a7c
movq %r14, 0x10(%rbx)
movq 0x20(%rbx), %r14
cmpq 0x28(%rbx), %r14
jae 0x6a95
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
addq $0x8, %r14
jmp 0x6a80
movl $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpparser.cpp
// Function: SSDPParser::ReadLine(unsigned char*, unsigned int, unsigned char**, unsigned int*)
int SSDPParser::ReadLine(u8 *buf, u32 len, u8 **restbuf, u32 *restlen){
    int ret = 0;

    // If len is <2 it's not possible that we're going to find \r\n
    if (len < 2) {
        return -1;
    }

    //Search the \r\n
    u8 *pos = (u8 *)strnstr((char*)buf, "\r\n", len);
    if( !pos )
        return -1;
    // \r\n or eof
    *restlen = len - (u32)(pos + 2 - buf);

    if( *restlen == 0 ){
        ret = -1;//eof
    }else{
        *restbuf = pos + 2;
        ret = len - *restlen - 2;
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x2, %edx
jb 0x6dee
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movl %edx, %edx
leaq 0x1599(%rip), %rsi      # 0x835f
movq %r14, %rdi
callq 0x6dfd
testq %rax, %rax
je 0x6dee
addq $0x2, %rax
subl %eax, %r14d
addl %r14d, %ebp
movl %ebp, (%r12)
je 0x6dee
movq %rax, (%r15)
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
subl %r14d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpparser.cpp
// Function: strnstr(char*, char const*, unsigned long)
char *strnstr(char *str, const char *substr, size_t n)
{
    char *p = str, *pEnd = str+n;
    size_t substr_len = strlen(substr);

    if(0 == substr_len)
        return str; // the empty string is contained everywhere.

    pEnd -= (substr_len - 1);
    for(;p < pEnd; ++p)
    {
        if(0 == strncmp(p, substr, substr_len))
            return p;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3100
testq %rax, %rax
je 0x6e4f
movq %rax, %r12
leaq (%rbx,%r14), %rax
subq %r12, %rax
incq %rax
cmpq %rbx, %rax
jbe 0x6e4d
incq %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3110
testl %eax, %eax
je 0x6e4f
incq %rbx
decq %r14
cmpq %r14, %r12
jne 0x6e30
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdpsearchresp.cpp
// Function: SSDPSearchResp::SSDPSearchResp()
SSDPSearchResp::SSDPSearchResp(){
    AddSignatureHeader((char*)"CACHE-CONTROL", (char*)"");
    AddSignatureHeader((char*)"EXT", (char*)"");
    AddSignatureHeader((char*)"LOCATION", (char*)"");
    AddSignatureHeader((char*)"SERVER", (char*)"");
    AddSignatureHeader((char*)"ST", (char*)"");
    AddSignatureHeader((char*)"USN", (char*)"");
    /*
    AddSignatureHeader("BOOTID.UPNP.ORG", "");
     */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5cb8
leaq 0x4c6d(%rip), %rax      # 0xbcb0
movq %rax, (%rbx)
leaq 0x145e(%rip), %rsi      # 0x84ab
leaq 0x130d(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x15c5(%rip), %rsi      # 0x8628
leaq 0x12f7(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1440(%rip), %rsi      # 0x84b9
leaq 0x12e1(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1445(%rip), %rsi      # 0x84d4
leaq 0x12cb(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1403(%rip), %rsi      # 0x84a8
leaq 0x12b5(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
leaq 0x1420(%rip), %rsi      # 0x84db
leaq 0x129f(%rip), %rdx      # 0x8361
movq %rbx, %rdi
callq 0x5e2c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5cce
movq %r14, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/ssdptools.cpp
// Function: cachecontroltoi(unsigned char*, unsigned int)
int cachecontroltoi(u8* s, u32 l){
    u32 ret = -1;
    u32 p;

    char buf[1024];
    int buflen=1024;

    if((int)l >= buflen){
        return ret;
    }

    memcpy(&buf, s, l);
    buf[l]=0;

    //max-age=nn
    trimspaces(&s, &l);
    if(l >= 7 && caseinstringcmp(s, 7, (u8*)"max-age", 7) == 0){
        //search the =
        p = getchar((u8*)buf, (unsigned int)strlen(buf), '=');
        if(p > 0){
            ret = atoi(buf+p+1);
        }
    }

    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3ff, %esi            # imm = 0x3FF
jg 0x7a23
movq %rdi, %rax
movl %esi, %r14d
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x31f0
movb $0x0, 0x10(%rsp,%r14)
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %r14
movq %r14, %rsi
callq 0x3871
cmpl $0x7, (%r14)
jb 0x7a23
movq 0x8(%rsp), %rdi
leaq 0xcc3(%rip), %rdx       # 0x86a2
movl $0x7, %esi
movl $0x7, %ecx
callq 0x380a
testl %eax, %eax
jne 0x7a23
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3100
movq %r14, %rdi
movl %eax, %esi
movl $0x3d, %edx
callq 0x38bf
testl %eax, %eax
je 0x7a23
movl %eax, %eax
leaq (%rsp,%rax), %rdi
addq $0x11, %rdi
callq 0x33a0
movl %eax, %ebx
movl %ebx, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    int timeout = 3;
    int c;
    while ( ((c = getopt( argc, argv, "t:?" ) ) ) != -1 )
    {
        switch (c)
        {
        case 't':
          timeout = atoi(optarg);
          break;
        case '?':
          default:
        usage(argv[0]);
        return -1;
        }
    }


    SSDP* ssdp = new SSDP();
    SSDPDB* db = ssdp->GetDB();
    MainClass mm(db, timeout==0);
    db->AddObserver(&mm);
    ssdp->AddObserver(&mm);
    ssdp->Start();
    
    int t = 0;
    while(timeout == 0 || t < timeout){
        ssdp->Search();
        sleep(timeout==0?15:1);
        t += 1;
    }

    mm.dump_results();

    delete(ssdp);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl $0x3, %ebx
leaq 0xb87(%rip), %r15       # 0x8726
movq 0x4422(%rip), %r12      # 0xbfc8
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x30a0
cmpl $0x74, %eax
jne 0x7bc5
movq (%r12), %rdi
callq 0x33a0
movl %eax, %ebx
jmp 0x7ba6
cmpl $-0x1, %eax
jne 0x7c77
movl $0x250, %edi            # imm = 0x250
callq 0x3260
movq %rax, %r14
movq %rax, %rdi
callq 0x3918
movq %r14, %rdi
callq 0x4b3c
leaq 0x8(%rsp), %rsi
leaq 0x4129(%rip), %rcx      # 0xbd20
movq %rcx, -0x8(%rsi)
leaq 0x413e(%rip), %rcx      # 0xbd40
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
testl %ebx, %ebx
sete 0x10(%rsi)
movq %rax, %rdi
callq 0x534c
movq %rsp, %rsi
movq %r14, %rdi
callq 0x4696
movq %r14, %rdi
callq 0x3b9c
testl %ebx, %ebx
js 0x7c62
movl $0xf, %ebp
movl $0x1, %r15d
cmovnel %r15d, %ebp
testl %ebx, %ebx
sete %r12b
movq %r14, %rdi
callq 0x43e2
movl %ebp, %edi
callq 0x31a0
cmpl %ebx, %r15d
setl %al
orb %r12b, %al
incl %r15d
testb %al, %al
jne 0x7c3d
movq %rsp, %rdi
callq 0x7caa
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
xorl %eax, %eax
jmp 0x7c84
movq (%r14), %rdi
callq 0x7ac4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x250, %esi            # imm = 0x250
movq %r14, %rdi
callq 0x3280
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O3/brunokeymolen[P]ssdp/src/main.cpp
// Function: MainClass::dump_results()
void dump_results()
    {
          db_->Lock();
          vector<SSDPDBDevice*>devices = db_->GetDevices();
          std::vector<SSDPDBDevice*>::iterator it;
          int x = 0;
          for(it=devices.begin();it<devices.end();it++){
              x++;
              printf("%.3d. usn=%s, type=%s, version=%s, location=%s\n", x, ((SSDPDBDevice*)*it)->usn.c_str(), ((SSDPDBDevice*)*it)->type.c_str(), ((SSDPDBDevice*)*it)->version.c_str(), ((SSDPDBDevice*)*it)->location.c_str());
          }
          db_->Unlock();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x4f34
movq 0x10(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x52ce
movq (%r14), %r15
cmpq 0x8(%r14), %r15
jae 0x7d19
movl $0x1, %ebp
leaq 0xa46(%rip), %r14       # 0x872a
movq (%r15), %rax
movq 0x48(%rax), %rdx
movq 0xb8(%rax), %rcx
movq 0xd8(%rax), %r8
movq 0x118(%rax), %r9
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x3050
addq $0x8, %r15
incl %ebp
cmpq 0x8(%rsp), %r15
jb 0x7ce4
movq 0x10(%rbx), %rdi
callq 0x4f3e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7d38
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7d5c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/ast.cpp
// Function: Program::getStringRepr[abi:cxx11]()
std::string Program::getStringRepr()
{
	std::string res;

	for (auto stmt : statements)
		res += stmt->getStringRepr() + "\n";

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rbp
movq 0x10(%rsi), %r13
cmpq %r13, %rbp
je 0xe931
leaq 0x18(%rsp), %r12
leaq 0x28(%rsp), %r14
leaq 0x1af7a(%rip), %r15     # 0x297fe
movq (%rbp), %rsi
movq (%rsi), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5360
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe8bf
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xe8c7
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x50b0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xe908
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xe924
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
addq $0x8, %rbp
cmpq %r13, %rbp
jne 0xe884
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xe983
movq %rax, %r14
jmp 0xe967
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xe967
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xe983
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xe99b
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5330
nop
// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/ast.cpp
// Function: ExpressionStatement::getStringRepr[abi:cxx11]()
std::string ExpressionStatement::getStringRepr()
{
	std::string res = "";

	if (expression != nullptr)
		res += expression->getStringRepr();

	res.push_back(';');

	return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x1a630(%rip), %rdx     # 0x297ff
movq %rdx, %rsi
callq 0xbe5c
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0xf215
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x8(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x50b0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf215
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
movq %rbx, %rdi
movl $0x3b, %esi
callq 0x5180
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf254
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x51c0
jmp 0xf254
jmp 0xf251
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0xf267
movq (%r15), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5330
nop
// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/ast.cpp
// Function: BlockStatement::getStringRepr[abi:cxx11]()
std::string BlockStatement::getStringRepr()
{
	if (statements.size() == 0)
		return "{ }";

	std::string res = "{ ";
	for (auto stmt : statements)
		res += stmt->getStringRepr() + " ";

	res += " }";

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x50(%rsi), %rax
leaq 0x10(%rdi), %rcx
cmpq 0x48(%rsi), %rax
movq %rcx, (%rdi)
je 0xf89d
movq %rsi, %r14
movq %rcx, (%rsp)
leaq 0x199ef(%rip), %rsi     # 0x2919d
leaq 0x199ea(%rip), %rdx     # 0x2919f
movq %rbx, %rdi
callq 0xbe5c
movq 0x48(%r14), %rbp
movq 0x50(%r14), %r13
cmpq %r13, %rbp
je 0xf88c
leaq 0x18(%rsp), %r12
leaq 0x28(%rsp), %r14
leaq 0x199d7(%rip), %r15     # 0x291b6
movq (%rbp), %rsi
movq (%rsi), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5360
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf81a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xf822
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x50b0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf863
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf87f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
addq $0x8, %rbp
cmpq %r13, %rbp
jne 0xf7df
leaq 0x19902(%rip), %rsi     # 0x29195
movq %rbx, %rdi
callq 0x5360
jmp 0xf8b3
leaq 0x198f0(%rip), %rsi     # 0x29194
leaq 0x198ec(%rip), %rdx     # 0x29197
movq %rbx, %rdi
callq 0xbe5c
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf8c7
movq %rax, %r14
jmp 0xf907
movq %rax, %r14
jmp 0xf8eb
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xf8eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf907
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xf91f
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5330
nop
// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/ast.cpp
// Function: CallExpression::getStringRepr[abi:cxx11]()
std::string CallExpression::getStringRepr()
{
	std::string res = function->getStringRepr() + "(";

	for (auto arg : arguments)
		res += arg->getStringRepr() + ", ";

	if (arguments.size() != 0)
	{
		res.pop_back();
		res.pop_back();
	}

	res.push_back(')');

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rsi), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq *0x8(%rax)
leaq 0x18bc1(%rip), %rsi     # 0x291ae
movq %r15, %rdi
callq 0x5360
leaq 0x10(%rbx), %rsi
movq %rsi, (%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rsi, 0x28(%rsp)
je 0x1061c
movq %rdx, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x10622
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x10654
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x50(%r12), %r14
movq 0x58(%r12), %rbp
cmpq %rbp, %r14
je 0x10743
movq %r12, 0x30(%rsp)
leaq 0x38(%rsp), %r15
leaq 0x18b3d(%rip), %r12     # 0x291b5
movq (%r14), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5360
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x106b2
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x106ba
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x50b0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x106fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x10717
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x51c0
addq $0x8, %r14
cmpq %rbp, %r14
jne 0x10678
movq 0x30(%rsp), %rcx
movq 0x58(%rcx), %rax
cmpq 0x50(%rcx), %rax
je 0x10743
movq %rbx, %rdi
callq 0x5220
movq %rbx, %rdi
callq 0x5220
movq %rbx, %rdi
movl $0x29, %esi
callq 0x5180
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1077c
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x107d6
movq 0x18(%rsp), %rsi
jmp 0x107ce
movq %rax, %r14
jmp 0x107bc
movq %rax, %r14
jmp 0x107a0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x107a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x107bc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rbx), %rdi
cmpq 0x28(%rsp), %rdi
je 0x107d6
movq 0x28(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x51c0
movq %r14, %rdi
callq 0x5330
// File: /workspace/github_cpp_makefile_star2_O3/pranavmodx[P]modlang/src/ast.cpp
// Function: ArrayLiteral::getStringRepr[abi:cxx11]()
std::string ArrayLiteral::getStringRepr()
{
	std::string res = "[";

	for (auto elem : elements)
		res += elem->getStringRepr() + ", ";

	if (elements.size() != 0)
	{
		res.pop_back();
		res.pop_back();
	}

	res.push_back(']');

	return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0x18987(%rip), %rsi     # 0x2918c
leaq 0x18981(%rip), %rdx     # 0x2918d
callq 0xbe5c
movq 0x48(%r14), %r13
movq 0x50(%r14), %rbp
cmpq %rbp, %r13
je 0x10903
movq %r14, 0x30(%rsp)
leaq 0x20(%rsp), %r14
leaq 0x38(%rsp), %r15
leaq 0x1897d(%rip), %r12     # 0x291b5
movq (%r13), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5360
movq %r14, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x10873
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x1087a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x50b0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x108bb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x108d7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x51c0
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x10838
movq 0x30(%rsp), %rcx
movq 0x50(%rcx), %rax
cmpq 0x48(%rcx), %rax
je 0x10903
movq %rbx, %rdi
callq 0x5220
movq %rbx, %rdi
callq 0x5220
movq %rbx, %rdi
movl $0x5d, %esi
callq 0x5180
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10924
movq %rax, %r15
jmp 0x10964
movq %rax, %r15
jmp 0x10948
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x10948
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x51c0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x10964
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x51c0
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x1097e
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x51c0
movq %r15, %rdi
callq 0x5330