LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/test1.cpp
// Function: testFunc(void*)
static void testFunc(void *data)
{
    CoroPtr self = CoroSelf();
    printf("###testFunc:%d\n", self->id);
    CoroSleep(2000);
    printf("###testFunc:%d after 2000\n", self->id);
    auto f = [](void* data)
    {
        CoroPtr self = CoroSelf();
        printf("###subrun:%d\n", self->id);
        int32_t sleep_ms = 2000 + 1000 - self->id;
        int64_t start = mstime();
        CoroSleep(sleep_ms);
        printf("###subTestFunc:%d after %lldms actual %lldms\n", self->id, sleep_ms, mstime() - start);
    };
    auto cid = StartCoro(f, NULL);
    printf("###Join coro:%d\n", cid);
    JoinCoro(cid);
    printf("###Join coro done:%d\n", cid);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
callq 0x4206
movq %rax, %rbx
movq 0x10(%rax), %rsi
leaq 0x3963(%rip), %rdi      # 0x6020
xorl %eax, %eax
callq 0x2050
movl $0x7d0, %edi            # imm = 0x7D0
callq 0x44d0
movq 0x10(%rbx), %rsi
leaq 0x3957(%rip), %rdi      # 0x6030
xorl %eax, %eax
callq 0x2050
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
leaq 0x8c(%rip), %rax        # 0x277c
movq %rax, 0x18(%rdi)
leaq 0x147(%rip), %rax       # 0x2842
movq %rax, 0x10(%rdi)
xorl %esi, %esi
callq 0x43e7
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2720
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x3924(%rip), %rdi      # 0x604b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x4442
leaq 0x391c(%rip), %rdi      # 0x605c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
addq $0x20, %rsp
popq %rbx
retq
jmp 0x2774
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x276c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x285a
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::LibCoroCoroutine::LibCoroCoroutine(coroxx::CoroOptions const&, bool)
LibCoroCoroutine::LibCoroCoroutine(const CoroOptions& opt, bool main)
            : stack(NULL), id(0), ctx_inited(false), waiting(false), save_buffer(NULL), save_buffer_size(0), stack_sp(
            NULL)
    {
        id = g_coro_id_seed++;
        data_ctx.coro = this;

        g_create_mutex.Lock();
        if (main)
        {
            coro_create(&ctx, NULL, NULL, NULL, 0);
            ctx_inited = true;
        }
        g_create_mutex.Unlock();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movw $0x0, 0x48(%rdi)
movups %xmm0, 0x50(%rdi)
movq $0x0, 0x60(%rdi)
movq 0x7948(%rip), %rax      # 0xa210
leaq 0x1(%rax), %rcx
movq %rcx, 0x793d(%rip)      # 0xa210
movq %rax, 0x10(%rdi)
movq %rdi, 0x40(%rdi)
leaq 0x7906(%rip), %rdi      # 0xa1e8
callq 0x2270
testl %ebp, %ebp
je 0x2904
leaq 0x18(%rbx), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x5c8d
movb $0x1, 0x48(%rbx)
leaq 0x78dd(%rip), %rdi      # 0xa1e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2180
movq %rax, %r15
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x2933
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x285a
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::LibCoroCoroutine::SaveStackBuffer()
void LibCoroCoroutine::SaveStackBuffer()
    {
        if (NULL != stack && stack->shared && NULL != stack_sp)
        {
            if (NULL != save_buffer)
            {
                free(save_buffer);
            }
            save_buffer = malloc(save_buffer_size);
            memcpy(save_buffer, stack_sp, save_buffer_size);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2999
cmpb $0x1, 0x18(%rax)
jne 0x2999
movq %rdi, %rbx
movq 0x60(%rdi), %r14
testq %r14, %r14
je 0x2999
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x2976
callq 0x2210
movq 0x60(%rbx), %r14
movq 0x58(%rbx), %r15
movq %r15, %rdi
callq 0x2250
movq %rax, 0x50(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::LibCoroCoroutine::ResumeStackBuffer()
void LibCoroCoroutine::ResumeStackBuffer()
    {
        if (NULL != save_buffer && NULL != stack && stack->shared)
        {
            memcpy(stack_sp, save_buffer, save_buffer_size);
            free(save_buffer);
            save_buffer = NULL;
            stack_sp = NULL;
            save_buffer_size = 0;

        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x50(%rdi), %rsi
testq %rsi, %rsi
je 0x29e8
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x29e8
cmpb $0x1, 0x18(%rax)
jne 0x29e8
leaq 0x50(%rbx), %r14
movq 0x58(%rbx), %rdx
movq 0x60(%rbx), %rdi
callq 0x21a0
movq 0x50(%rbx), %rdi
callq 0x2210
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::LibCoroCoroutine::~LibCoroCoroutine()
LibCoroCoroutine::~LibCoroCoroutine()
    {
        if (NULL != stack)
        {
            if (stack->shared)
            {
                if (stack->coro == this)
                {
                    stack->coro = NULL;
                }
            }
            else
            {
                delete stack;
            }
        }
        if (NULL != save_buffer)
        {
            free(save_buffer);
        }
        coro_destroy(&ctx);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x2a54
cmpb $0x1, 0x18(%r14)
jne 0x2a3f
cmpq %rbx, 0x10(%r14)
jne 0x2a54
movq $0x0, 0x10(%r14)
jmp 0x2a54
movq %r14, %rdi
callq 0x5e6d
movl $0x20, %esi
movq %r14, %rdi
callq 0x21e0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x2a62
callq 0x2210
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x2a7c
addq $0x18, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x2a86
movq %rax, %rdi
callq 0x285a
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::LibCoroCoroutine::Yield(bool)
void LibCoroCoroutine::Yield(bool release_current)
    {
        CoroutineStack& coro_stack = getCoroEnv().coro_stack;
        LibCoroCoroutine* next = getCoroEnv().main;
        if (!coro_stack.empty())
        {
            next = coro_stack.top();
            coro_stack.pop();
        }
        next->Resume(release_current);

    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
leaq 0x7730(%rip), %r15      # 0xa1d8
movq %r15, %rdi
callq 0x2f3e
movq %rax, %r14
movq %r15, %rdi
callq 0x2f3e
movq 0x40(%r14), %rcx
cmpq 0x20(%r14), %rcx
je 0x2aea
movq %r14, %rdi
addq $0x10, %rdi
cmpq 0x48(%r14), %rcx
jne 0x2adf
movq 0x58(%r14), %rax
movl $0x200, %ecx            # imm = 0x200
addq -0x8(%rax), %rcx
movq -0x8(%rcx), %r14
callq 0x3332
jmp 0x2aee
movq 0x8(%rax), %r14
movzbl %bl, %esi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2afe
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::swapCoroFunc(void*)
static void swapCoroFunc(void* data)
    {
        while (1)
        {
            CoroEnv& coro_env = getCoroEnv();
            SwapContext& swap = coro_env.swap_ctx;
            swap.from->SaveStackBuffer();
            swap.to->ResumeStackBuffer();

            //printf("####%d resumex %d\n", swap.to->id,coro_env.current->id);
            coro_env.current = swap.to;
            coro_transfer(&(swap.swap_coro), &(swap.to->ctx));
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x7485(%rip), %rbx      # 0xa1d8
movq %rbx, %rdi
callq 0x2f3e
movq %rax, %r14
movq 0x80(%rax), %rdi
callq 0x2944
movq 0x88(%r14), %rdi
callq 0x29a0
movq 0x88(%r14), %rsi
movq %rsi, (%r14)
addq $0x90, %r14
movq %r14, %rdi
callq 0x5c70
jmp 0x2d53
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::CoroEnv::GetCoroStack()
CoroStack* GetCoroStack()
            {
                if (share_stack_pool.size() < share_stack_count)
                {
                    CoroStack* s = new CoroStack(stack_size, true);
                    share_stack_pool.pool.push_back(s);
                    return s;
                }
                if (share_stack_pool.pool.empty())
                {
                    return new CoroStack(stack_size, false);
                }
                size_t idx = share_stack_pool.cursor;
                if (idx >= share_stack_pool.size())
                {
                    idx = 0;
                    share_stack_pool.cursor = 0;
                }
                share_stack_pool.cursor++;
                return share_stack_pool.pool[idx];
            }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movl 0xb4(%rdi), %esi
cmpq %rsi, %rcx
jae 0x2e59
movl $0x20, %edi
callq 0x21d0
movq %rax, %r14
movl 0xb0(%rbx), %esi
movq $0x0, 0x10(%rax)
movb $0x1, 0x18(%rax)
movq %rax, %rdi
callq 0x5d3c
movq %r14, (%rsp)
movq 0x68(%rbx), %rsi
cmpq 0x70(%rbx), %rsi
je 0x2ea8
movq %r14, (%rsi)
addq $0x8, 0x68(%rbx)
jmp 0x2ebd
cmpq %rdx, %rax
je 0x2e7f
movq 0x78(%rbx), %rdx
cmpq %rcx, %rdx
jb 0x2e71
movq $0x0, 0x78(%rbx)
xorl %edx, %edx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x78(%rbx)
movq (%rax,%rdx,8), %r14
jmp 0x2ebd
movl $0x20, %edi
callq 0x21d0
movq %rax, %r14
movl 0xb0(%rbx), %esi
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
movq %rax, %rdi
callq 0x5d3c
jmp 0x2ebd
addq $0x60, %rbx
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x31c0
movq (%r14), %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x2eca
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/libcoro.cpp
// Function: coroxx::SwapContext::Init()
void Init()
            {
                if (inited)
                {
                    return;
                }
                coro_stack_alloc(&swap_stack, 0);
                coro_create(&swap_coro, swapCoroFunc, NULL, swap_stack.sptr, swap_stack.ssze);
                inited = true;
            }

// Assembly:
cmpb $0x0, 0x28(%rdi)
jne 0x2f16
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
xorl %esi, %esi
callq 0x5d3c
leaq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %r8
leaq -0x1c2(%rip), %rsi      # 0x2d48
xorl %edx, %edx
callq 0x5c8d
movb $0x1, 0x28(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/./thread_local.h
// Function: coroxx::ThreadLocal<coroxx::CoroEnv>::GetValue()
T& GetValue()
			{
				T* local_thread_value = static_cast<T*>(pthread_getspecific(
				        m_key));
				if (NULL == local_thread_value)
				{
					T* newObj = InitialValue();
					pthread_setspecific(m_key, newObj);
					local_thread_value = newObj;
				}
				return *local_thread_value;
			}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %edi
callq 0x22c0
movq %rax, %r14
testq %rax, %rax
jne 0x2f69
movq %rbx, %rdi
callq 0x2f74
movq %rax, %r14
movl (%rbx), %edi
movq %rax, %rsi
callq 0x2080
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::RunFunc(void*)
void* Scheduler::RunFunc(void* data)
    {
        Scheduler* s = (Scheduler*) data;
        s->Run();
        delete s;
        return NULL;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3630
leaq 0x178(%rbx), %rdi
callq 0x3168
movq 0x160(%rbx), %rdi
testq %rdi, %rdi
je 0x35c4
movq 0x170(%rbx), %rsi
subq %rdi, %rsi
callq 0x21e0
leaq 0x674d(%rip), %rax      # 0x9d18
movq %rax, 0x128(%rbx)
leaq 0x130(%rbx), %rdi
callq 0x2360
leaq 0x6703(%rip), %rax      # 0x9ce8
movq %rax, 0xf8(%rbx)
leaq 0x100(%rbx), %rdi
callq 0x2200
leaq 0xc8(%rbx), %rdi
callq 0x4b90
leaq 0x78(%rbx), %rdi
callq 0x4be8
leaq 0x38(%rbx), %rdi
callq 0x4c40
movq %rbx, %rdi
callq 0x4c40
movl $0x208, %esi            # imm = 0x208
movq %rbx, %rdi
callq 0x21e0
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::Run()
void Scheduler::Run()
    {
        g_current_scheduler.SetValue(this);
        InitCoroPool();
        sched_coro = new CoroType(options);
        sched_coro->ResetContext(Scheduler::RoutineFunc, this);
        sched_coro->Resume();
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x6bd7(%rip), %rdi      # 0xa218
callq 0x478a
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x379c
movl $0x68, %edi
callq 0x21d0
movq %rax, %r14
leaq 0x1e0(%rbx), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x2890
movq %r14, 0x1c8(%rbx)
leaq 0x8(%rsp), %rsi
movq $0x0, 0x8(%rsi)
leaq 0x4dc(%rip), %rax       # 0x3b66
movq %rax, (%rsi)
leaq -0xe2e(%rip), %rax      # 0x2866
movq %rax, 0x18(%rsi)
leaq -0xe31(%rip), %rax      # 0x286e
movq %rax, 0x10(%rsi)
movq %r14, %rdi
addq $0x18, %rdi
movq %rbx, 0x38(%r14)
callq 0x47ca
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x36cc
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x1c8(%rbx), %rdi
xorl %esi, %esi
callq 0x2afe
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x3702
movq %rax, %rbx
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x371a
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x371a
movq %rax, %rdi
callq 0x285a
movq %rax, %rbx
movl $0x68, %esi
movq %r14, %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::Start()
int Scheduler::Start()
    {
        options.share_stack = CoroType::NewShareStack(options.share_stack_count, options.max_stack_size);
        if (options.create_thread)
        {
            pthread_attr_t attr;
            pthread_attr_init(&attr);
            if (0 != pthread_create(&tid, &attr, RunFunc, this))
            {
                return errno;
            }
        }
        else
        {
            g_current_scheduler.SetValue(this);
            InitCoroPool();
        }
        return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x1e4(%rdi), %esi
movl 0x1f4(%rdi), %edi
callq 0x2d16
movq %rax, 0x200(%rbx)
cmpb $0x1, 0x1e0(%rbx)
jne 0x377b
movq %rsp, %r14
movq %r14, %rdi
callq 0x2230
leaq 0x70(%rbx), %rdi
leaq -0x1cf(%rip), %rdx      # 0x3594
movq %r14, %rsi
movq %rbx, %rcx
callq 0x2350
testl %eax, %eax
je 0x3792
callq 0x2040
movl (%rax), %eax
jmp 0x3794
leaq 0x6a96(%rip), %rdi      # 0xa218
callq 0x478a
movq %rbx, (%rax)
movq %rbx, %rdi
callq 0x379c
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::GetCoroutineById(unsigned long)
CoroPtr Scheduler::GetCoroutineById(coro_id id)
    {
        CoroutineTable::iterator found = exec_table.find(id);
        if (found == exec_table.end())
        {
            return NULL;
        }
        return found->second;
    }

// Assembly:
pushq %rax
movq %rsp, %rax
movq %rsi, (%rax)
addq $0x38, %rdi
movq %rax, %rsi
callq 0x4fea
testq %rax, %rax
je 0x3878
movq 0x10(%rax), %rax
jmp 0x387a
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::Routine(bool)
void Scheduler::Routine(bool wait)
    {
        CoroGC();
        while (1)
        {
            CoroDiaptchData* data = NULL;
            {
                coro_queue_mutex.Lock();
                if ((coro_queue.empty()) && wait)
                {
                    if (routine_wait_ms <= 0 || routine_wait_ms > 100)
                    {
                        routine_wait_ms = 10;
                    }
                    //printf("###before wait %d %lld\n", routine_wait_ms, nowMs());
                    coro_queue_mutex.Wait(routine_wait_ms);
                    //printf("###after wait %d %lld %d\n", routine_wait_ms, nowMs(), v);
                }
                if (!coro_queue.empty())
                {
                    data = coro_queue.front();
                    coro_queue.pop_front();
                }
                coro_queue_mutex.Unlock();
            }

            if (NULL == data)
            {
                routine_wait_ms = CheckTimeQueue();
                return;
            }
            else
            {
                data->Invoke();
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x3afa
leaq 0xf8(%rbx), %r15
leaq 0x100(%rbx), %r14
leaq 0x78(%rbx), %r12
xorb $0x1, %bpl
movq %r14, %rdi
callq 0x2270
movq 0x88(%rbx), %rax
movq 0xa8(%rbx), %rcx
cmpq %rax, %rcx
setne %dl
orb %bpl, %dl
jne 0x3aad
movq 0x1d0(%rbx), %rsi
leaq -0x65(%rsi), %rax
cmpq $-0x65, %rax
ja 0x3a97
movq $0xa, 0x1d0(%rbx)
movl $0xa, %esi
movq %r15, %rdi
callq 0x4630
movq 0x88(%rbx), %rax
movq 0xa8(%rbx), %rcx
cmpq %rax, %rcx
je 0x3ad4
movq (%rax), %r13
movq %r12, %rdi
callq 0x46d6
movq %r14, %rdi
callq 0x2180
testq %r13, %r13
je 0x3adc
movq %r13, %rdi
callq 0x4588
jmp 0x3a55
movq %r14, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x387c
movq %rax, 0x1d0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::StartCoroAfter(std::function<void (void*)> const&, void*, long, bool)
int Scheduler::StartCoroAfter(const CoroutineFunction& func, void* data, int64_t wait_time, bool create_coro)
    {
        if (NULL == g_current_scheduler.GetValue())
        {
            return PushCoroTask(func, data, false, wait_time);
        }
        CoroDiaptchData* task = new CoroDiaptchData;
        task->call = func;
        task->data = data;
        task->create_coro = create_coro;
        AddTimeCoroTask(task, wait_time);
        return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x65e1(%rip), %rdi      # 0xa218
callq 0x478a
cmpq $0x0, (%rax)
je 0x3c80
movl $0x30, %edi
callq 0x21d0
movq %rax, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x19(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x47ca
movq %r14, 0x20(%r13)
movb %bpl, 0x28(%r13)
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3b7a
jmp 0x3c93
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x3ca4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::PushCoroTask(std::function<void (void*)> const&, void*, bool, long)
int Scheduler::PushCoroTask(const CoroutineFunction& func, void* data, bool create_coro, int64_t wait_time)
    {
        if (create_coro && IsOverload())
        {
            return -1;
        }
        CoroDiaptchData* task = new CoroDiaptchData;
        task->call = func;
        task->data = data;
        task->create_coro = create_coro;

        coro_queue_mutex.Lock();
        if (wait_time > 0)
        {
            AddTimeCoroTask(task, wait_time);
        }
        else
        {
            coro_queue.push_back(task);
            if (options.eventfd > 0)
            {
                int64_t ev = 1;
                ::write(options.eventfd, &ev, sizeof(ev));
            }
            else
            {
                coro_queue_mutex.Notify();
            }
        }
        coro_queue_mutex.Unlock();
        return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movl $0x30, %edi
callq 0x21d0
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x19(%rax)
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %rbp, %rsi
callq 0x47ca
movq %r13, 0x20(%r12)
movb %bl, 0x28(%r12)
leaq 0x100(%r14), %rbx
movq %rbx, %rdi
callq 0x2270
testq %r15, %r15
jle 0x3d19
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3b7a
jmp 0x3d7d
movq 0xa8(%r14), %rax
movq 0xb8(%r14), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3d3d
movq %r12, (%rax)
addq $0x8, 0xa8(%r14)
jmp 0x3d4b
leaq 0x78(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5320
movl 0x1f8(%r14), %edi
testl %edi, %edi
jle 0x3d6e
leaq 0x10(%rsp), %rsi
movq $0x1, (%rsi)
movl $0x8, %edx
callq 0x20d0
jmp 0x3d7d
addq $0x130, %r14            # imm = 0x130
movq %r14, %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2180
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/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::CreateCoroutine(std::function<void (void*)> const&, void*, bool)
CoroPtr Scheduler::CreateCoroutine(const CoroutineFunction& func, void* data, bool pool)
    {
        CoroPtr task = new CoroType(options);
        CoroutineDataContext& data_ctx = task->GetDataContext();
        CoroCallData* cdata = new CoroCallData;
        data_ctx.data = cdata;
        cdata->data = data;
        cdata->coro = task;
        cdata->func = func;
        cdata->scheduler = this;
        if (pool)
        {
            data_ctx.func = CoroutinePoolFunc;
        }
        else
        {
            data_ctx.func = CoroutineNonPoolFunc;
        }

        return task;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, 0x4(%rsp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movl $0x68, %edi
callq 0x21d0
movq %rax, %rbx
leaq 0x1e0(%r14), %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x2890
movq %rbx, %r13
addq $0x18, %r13
movl $0x38, %edi
callq 0x21d0
movq %rax, %rbp
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
movq %rax, 0x38(%rbx)
movq %r12, 0x8(%rax)
movq %rbx, (%rax)
movq %r15, %rsi
callq 0x47ca
movq %r14, 0x30(%rbp)
leaq 0x196(%rip), %rax       # 0x3fab
leaq 0x1ed(%rip), %rsi       # 0x4009
cmpb $0x0, 0x4(%rsp)
cmovneq %rax, %rsi
movq %r13, %rdi
callq 0x4890
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x68, %esi
movq %rbx, %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::CoroDone(coroxx::LibCoroCoroutine*, bool)
void Scheduler::CoroDone(CoroPtr coro, bool pool)
    {
        if (exec_table.erase(coro->id) > 0)
        {
            exec_coro_num--;
        }
        if (pool)
        {
            coro_pool.push_back(coro);
        }
        else
        {
            deleting_coros.push_back(coro);
        }

        /*
         * Wake join coroutine first
         */
        CoroutineTable::iterator jit = join_table.find(coro->id);
        if (jit != join_table.end())
        {
            CoroPtr waiting = jit->second;
            join_table.erase(jit);
            //printf("####Join Resume \n");
            waiting->Resume(true);
        }
        else
        {
            coro->Yield(true);
        }
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
addq $0x38, %rdi
addq $0x10, %rsi
callq 0x564a
testq %rax, %rax
je 0x3e9c
decq 0x1d8(%rbx)
testb %bpl, %bpl
je 0x3ec5
movq 0x1a8(%rbx), %rax
movq 0x1b8(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x3ee2
movq %r14, (%rax)
addq $0x8, 0x1a8(%rbx)
jmp 0x3f06
movq 0x168(%rbx), %rsi
cmpq 0x170(%rbx), %rsi
je 0x3ef5
movq %r14, (%rsi)
addq $0x8, 0x168(%rbx)
jmp 0x3f06
leaq 0x178(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x337e
jmp 0x3f06
leaq 0x160(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x573a
movq 0x8(%rsp), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x4fea
testq %rax, %rax
je 0x3f3a
movq 0x10(%rax), %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x585a
movq %r14, %rdi
movl $0x1, %esi
callq 0x2afe
jmp 0x3f49
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x2a9a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::GetCoroutine(std::function<void (void*)> const&, void*)
CoroPtr Scheduler::GetCoroutine(const CoroutineFunction& func, void* data)
    {
        if (coro_pool.empty())
        {
            return CreateCoroutine(func, data, false);
        }
        else
        {
            CoroPtr coro = coro_pool.front();
            coro_pool.pop_front();
            CoroutineDataContext& data_ctx = coro->GetDataContext();
            CoroCallData* cdata = (CoroCallData*) data_ctx.data;
            cdata->data = data;
            cdata->func = func;
            return coro;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq 0x188(%rdi), %rax
cmpq %rax, 0x1a8(%rdi)
je 0x3f99
addq $0x178, %rdi            # imm = 0x178
movq (%rax), %r15
callq 0x4842
movq 0x38(%r15), %rdi
movq %r14, 0x8(%rdi)
addq $0x10, %rdi
movq %rbx, %rsi
callq 0x47ca
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x3d96
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::CoroutinePoolFunc(void*)
static void CoroutinePoolFunc(void* cdata)
    {
        CoroCallData* data = (CoroCallData*) cdata;
        Scheduler* scheduler = data->scheduler;
        CoroPtr coro = data->coro;
        while (1)
        {
            data->func(data->data);
            scheduler->CoroDone(coro, true);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0x30(%rdi), %r14
movq (%rdi), %r15
movq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x20(%rdi)
je 0x4004
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq *0x28(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x3e6e
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x20(%rbx)
jne 0x3fdb
callq 0x20f0
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::StartCoro(std::function<void (void*)> const&, void*, bool)
coro_id Scheduler::StartCoro(const CoroutineFunction& func, void* data, bool create_coro)
    {
        //start from another thread
        if (NULL == g_current_scheduler.GetValue())
        {
            return PushCoroTask(func, data, create_coro, 0);
        }
        if (IsOverload())
        {
            return (coro_id) -1;
        }
        CoroGC();
        CoroPtr task = GetCoroutine(func, data);
        coro_id id = task->id;
        exec_table[id] = task;
        exec_coro_num++;
        Wakeup(task);
        return id;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x617a(%rip), %rdi      # 0xa218
callq 0x478a
cmpq $0x0, (%rax)
je 0x40f3
movq %rbx, %rdi
callq 0x3afa
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3f52
movq %rax, %r14
movq 0x10(%rax), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x38(%rbx), %rdi
movq %r15, %rsi
callq 0x5884
movq %r14, (%rax)
incq 0x1d8(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x2afe
movq (%r15), %r12
jmp 0x410b
movzbl %bpl, %ecx
xorl %r12d, %r12d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x3ca4
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::GetCoroById(unsigned long)
CoroPtr Scheduler::GetCoroById(coro_id id)
    {
        CoroutineTable::iterator found = exec_table.find(id);
        if (found != exec_table.end())
        {
            return found->second;
        }
        return NULL;
    }

// Assembly:
pushq %rax
movq %rsp, %rax
movq %rsi, (%rax)
addq $0x38, %rdi
movq %rax, %rsi
callq 0x4fea
testq %rax, %rax
je 0x413a
movq 0x10(%rax), %rax
jmp 0x413c
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::Join(unsigned long)
int Scheduler::Join(coro_id cid)
    {
        CoroutineTable::iterator it = exec_table.find(cid);
        if (it == exec_table.end())
        {
            return 0;
        }
        it = join_table.find(cid);
        if (it != join_table.end())
        {
            return -2;
        }
        CoroPtr current = CoroType::CurrentCoro();
        join_table[cid] = current;
        Wait(current);
        return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %rax
movq %rsi, (%rax)
addq $0x38, %rdi
movq %rax, %rsi
callq 0x4fea
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4199
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4fea
movq %rax, %rcx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rcx, %rcx
jne 0x4199
callq 0x2d04
movq %rax, %r14
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x5884
movq %r14, (%rax)
movq %r14, %rdi
callq 0x2a8e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::Scheduler::Join(unsigned long, unsigned long, unsigned long)
int Scheduler::Join(coro_id c1, coro_id c2, coro_id c3)
    {
        Join(c1);
        Join(c2);
        Join(c3);
        return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x413e
movq %r15, %rdi
movq %r14, %rsi
callq 0x413e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x413e
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::SchedulerManager::Singleton()
SchedulerManager& SchedulerManager::Singleton()
    {
        if (NULL == g_scheduler_manager)
        {
            CoroOptions opt;
            CreateSingleton(opt);
        }
        return *g_scheduler_manager;
    }

// Assembly:
movq 0x600d(%rip), %rax      # 0xa220
testq %rax, %rax
je 0x4219
retq
subq $0x28, %rsp
movq %rsp, %rdi
movb $0x1, (%rdi)
movaps 0x1de6(%rip), %xmm0     # 0x6010
movups %xmm0, 0x4(%rdi)
movabsq $-0xfffffff0, %rax      # imm = 0xFFFFFFFF00000010
movq %rax, 0x14(%rdi)
movq $0x0, 0x20(%rdi)
callq 0x4256
movq 0x5fd0(%rip), %rax      # 0xa220
addq $0x28, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::SchedulerManager::GetScheduler()
Scheduler& SchedulerManager::GetScheduler()
    {
        Scheduler* s = g_current_scheduler.GetValue();
        if (NULL != s)
        {
            return *s;
        }
        uint32_t min_coro_num = 0;
        uint32_t min_scheduler_idx = 0;
        SchedulerManager& singleton = SchedulerManager::Singleton();
        if (singleton.schedulers_.size() > 1)
        {
            for (size_t i = 0; i < singleton.schedulers_.size(); i++)
            {
                uint32_t numk = singleton.schedulers_[i]->GetCoroNum();
                if (0 == numk)
                {
                    min_scheduler_idx = i;
                    break;
                }
                if (numk < min_coro_num)
                {
                    min_coro_num = numk;
                    min_scheduler_idx = i;
                }
            }
        }
        return *(singleton.schedulers_[min_scheduler_idx]);
    }

// Assembly:
pushq %rax
leaq 0x5e9c(%rip), %rdi      # 0xa218
callq 0x478a
movq (%rax), %rax
testq %rax, %rax
jne 0x43d3
callq 0x420c
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
jb 0x43cd
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq 0x168(%rsi), %rdi
subq 0x160(%rsi), %rdi
shrq $0x3, %rdi
addl 0x50(%rsi), %edi
je 0x43c9
incq %rdx
cmpq %rdx, %rax
jne 0x43a4
xorl %edx, %edx
movl %edx, %eax
jmp 0x43cf
xorl %eax, %eax
movq (%rcx,%rax,8), %rax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::CoroDiaptchData::Invoke()
void Invoke()
            {
                if (create_coro)
                {
                    StartCoro(CoroDiaptchData::InvokeFunc, this);
                }
                else
                {
                    CoroDiaptchData::InvokeFunc(this);
                }
            }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x28(%rdi)
jne 0x45f7
movq $0x0, 0x8(%rsp)
leaq 0x70a(%rip), %rax       # 0x4cb0
movq %rax, (%rsp)
leaq -0x1d4b(%rip), %rax     # 0x2866
movq %rax, 0x18(%rsp)
leaq -0x1d4f(%rip), %rax     # 0x286e
movq %rax, 0x10(%rsp)
callq 0x4374
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x4080
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x45f1
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
jmp 0x4cb0
jmp 0x4628
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x4620
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x285a
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/scheduler.cpp
// Function: coroxx::CoroDiaptchData::InvokeFunc(void*)
static void InvokeFunc(void* data)
            {
                CoroDiaptchData* v = (CoroDiaptchData*) data;
                if (NULL != v && v->call)
                {
                    v->call(v->data);
                    delete v;
                }
            }

// Assembly:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x4cf9
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x4cf9
movq 0x20(%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq *0x18(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x4cec
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movl $0x30, %esi
movq %rbx, %rdi
callq 0x21e0
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x285a
nop
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/coro.c
// Function: coro_stack_alloc
int
coro_stack_alloc (struct coro_stack *stack, unsigned int size)
{
  if (!size)
    size = 256 * 1024;

  stack->sptr = 0;
  stack->ssze = ((size_t)size * sizeof (void *) + PAGESIZE - 1) / PAGESIZE * PAGESIZE;

#if CORO_FIBER

  stack->sptr = (void *)stack;
  return 1;

#else

  size_t ssze = stack->ssze + CORO_GUARDPAGES * PAGESIZE;
  void *base;

  #if CORO_MMAP
    /* mmap supposedly does allocate-on-write for us */
    base = mmap (0, ssze, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);

    if (base == (void *)-1)
      {
        /* some systems don't let us have executable heap */
        /* we assume they won't need executable stack in that case */
        base = mmap (0, ssze, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);

        if (base == (void *)-1)
          return 0;
      }

    #if CORO_GUARDPAGES
      mprotect (base, CORO_GUARDPAGES * PAGESIZE, PROT_NONE);
    #endif

    base = (void*)((char *)base + CORO_GUARDPAGES * PAGESIZE);
  #else
    base = malloc (ssze);
    if (!base)
      return 0;
  #endif

  #if CORO_USE_VALGRIND
    stack->valgrind_id = VALGRIND_STACK_REGISTER ((char *)base, ((char *)base) + ssze - CORO_GUARDPAGES * PAGESIZE);
  #endif

  stack->sptr = base;
  return 1;

#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
movl $0x40000, %r14d         # imm = 0x40000
cmovnel %esi, %r14d
movq $0x0, (%rdi)
shlq $0x3, %r14
movq 0x44e3(%rip), %rcx      # 0xa248
testq %rcx, %rcx
je 0x5d72
addq %rcx, %r14
decq %r14
jmp 0x5da7
movl $0x1e, %edi
callq 0x2150
movq %rax, 0x44c5(%rip)      # 0xa248
addq %rax, %r14
decq %r14
testq %rax, %rax
je 0x5d93
movq %rax, %rcx
jmp 0x5da7
movl $0x1e, %edi
callq 0x2150
movq %rax, %rcx
movq %rax, 0x44a1(%rip)      # 0xa248
movq %r14, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r14
movq %r14, 0x8(%rbx)
leaq (%r14,%rcx,4), %r12
xorl %r15d, %r15d
xorl %edi, %edi
movq %r12, %rsi
movl $0x7, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x2340
cmpq $-0x1, %rax
jne 0x5e03
xorl %edi, %edi
movq %r12, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x2340
cmpq $-0x1, %rax
je 0x5e5e
movq %rax, %r14
movq 0x443b(%rip), %rsi      # 0xa248
testq %rsi, %rsi
jne 0x5e26
movl $0x1e, %edi
callq 0x2150
movq %rax, %rsi
movq %rax, 0x4422(%rip)      # 0xa248
shlq $0x2, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x22f0
movq 0x440d(%rip), %rax      # 0xa248
testq %rax, %rax
jne 0x5e51
movl $0x1e, %edi
callq 0x2150
movq %rax, 0x43f7(%rip)      # 0xa248
leaq (%r14,%rax,4), %rax
movq %rax, (%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/yinqiwen[P]coroxx/coro.c
// Function: coro_stack_free
void
coro_stack_free (struct coro_stack *stack)
{
#if CORO_FIBER
  /* nop */
#else
  #if CORO_USE_VALGRIND
    VALGRIND_STACK_DEREGISTER (stack->valgrind_id);
  #endif

  #if CORO_MMAP
    if (stack->sptr)
      munmap ((void*)((char *)stack->sptr - CORO_GUARDPAGES * PAGESIZE),
              stack->ssze                 + CORO_GUARDPAGES * PAGESIZE);
  #else
    free (stack->sptr);
  #endif
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x5e8e
movq %rdi, %r14
movq 0x43c5(%rip), %rax      # 0xa248
testq %rax, %rax
je 0x5e96
movq 0x8(%r14), %r14
jmp 0x5eb0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x1e, %edi
callq 0x2150
movq %rax, 0x43a1(%rip)      # 0xa248
movq 0x8(%r14), %r14
testq %rax, %rax
je 0x5ecd
movq %rax, %rcx
shlq $0x2, %rax
subq %rax, %rbx
leaq (%r14,%rcx,4), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2130
movl $0x1e, %edi
callq 0x2150
movq %rax, %rcx
movq %rax, 0x4367(%rip)      # 0xa248
xorl %eax, %eax
jmp 0x5eb3
// File: /workspace/github_cpp_makefile_star2_O3/rthoelen[P]NXCore_Kenwood/main.cc
// Function: rpton_64001(int)
void rpton_64001(int rpt_no)
{
		int o_bufsize;

		up_packet[24] = (char)repeater[rpt_no].tx_ran;
		while(tx_sem==1)
			usleep(1);
		tx_sem=1;
		sendto(socket_01, up_packet, sizeof(up_packet), 0, (struct sockaddr *)&repeater[rpt_no].rpt_addr_01,
		 	sizeof(repeater[rpt_no].rpt_addr_01));
		tx_sem=0;
		while(1)
		{
			#ifdef __FreeBSD__
			ioctl(socket_01,FIONWRITE,&o_bufsize);
			#else
			ioctl(socket_01,SIOCOUTQ,&o_bufsize);
			#endif
			if(o_bufsize == 0)
				break;
			usleep(500);
		}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xf210(%rip), %rax      # 0x153d0
movslq %edi, %rcx
leaq (%rcx,%rcx,8), %rbx
shlq $0x4, %rbx
movb 0x48(%rax,%rbx), %cl
movb %cl, 0xf1a3(%rip)       # 0x15378
cmpl $0x1, 0xf228(%rip)      # 0x15404
jne 0x61f8
movl $0x1, %edi
callq 0x4450
cmpl $0x1, 0xf215(%rip)      # 0x15404
je 0x61de
movq 0xf1d8(%rip), %rax      # 0x153d0
movl $0x1, 0xf202(%rip)      # 0x15404
movl 0xf1f8(%rip), %edi      # 0x15400
leaq (%rax,%rbx), %r8
addq $0x10, %r8
leaq 0xf149(%rip), %rsi      # 0x15360
movl $0x1c, %edx
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x4060
movl $0x0, 0xf1d1(%rip)      # 0x15404
movl 0xf1c7(%rip), %edi      # 0x15400
leaq -0xc(%rbp), %rbx
movl $0x5411, %esi           # imm = 0x5411
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4430
cmpl $0x0, (%rbx)
je 0x6276
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x4450
movl 0xf19f(%rip), %edi      # 0x15400
movl $0x5411, %esi           # imm = 0x5411
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4430
cmpl $0x0, -0xc(%rbp)
jne 0x6251
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/rthoelen[P]NXCore_Kenwood/main.cc
// Function: shutdown_64001(int)
void shutdown_64001(int rpt_no)
{

	down_packet[12] = (char)(repeater[rpt_no].tx_uid >> 8);
	down_packet[13] = (char)repeater[rpt_no].tx_uid & 0xff;

	while(tx_sem==1)
		usleep(1);

	tx_sem=1;
	sendto(socket_01, down_packet, sizeof(down_packet), 0, (struct sockaddr *)&repeater[rpt_no].rpt_addr_01,
		sizeof(repeater[rpt_no].rpt_addr_01));
	tx_sem=0;

	if(--repeater[rpt_no].keydown < 0)
		repeater[rpt_no].keydown = 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xeeb0(%rip), %rax      # 0x153d0
movslq %edi, %rbx
leaq (%rbx,%rbx,8), %rcx
shlq $0x4, %rcx
movb 0x6d(%rax,%rcx), %dl
movb %dl, 0xee57(%rip)       # 0x1538c
movb 0x6c(%rax,%rcx), %cl
movb %cl, 0xee4e(%rip)       # 0x1538d
cmpl $0x1, 0xeebe(%rip)      # 0x15404
jne 0x6562
movl $0x1, %edi
callq 0x4450
cmpl $0x1, 0xeeab(%rip)      # 0x15404
je 0x6548
movq 0xee6e(%rip), %rax      # 0x153d0
movl $0x1, 0xee98(%rip)      # 0x15404
movl 0xee8e(%rip), %edi      # 0x15400
shlq $0x4, %rbx
leaq (%rbx,%rbx,8), %rbx
leaq (%rax,%rbx), %r8
addq $0x10, %r8
leaq 0xedf7(%rip), %rsi      # 0x15380
xorl %r14d, %r14d
movl $0x14, %edx
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x4060
movl %r14d, 0xee5f(%rip)     # 0x15404
movq 0xee24(%rip), %rax      # 0x153d0
movl 0x74(%rax,%rbx), %ecx
leal -0x1(%rcx), %edx
testl %ecx, %ecx
cmovlel %r14d, %edx
movl %edx, 0x74(%rax,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/siolag161[P]louvain-original/main_hierarchy.cpp
// Function: parse_args(int, char**)
void
parse_args(int argc, char **argv) {
  if (argc<2)
    usage(argv[0], "Bad arguments number\n");

  for (int i = 1; i < argc; i++) {
    if(argv[i][0] == '-') {
      switch(argv[i][1]) {
      case 'l':
	display_level = atoi(argv[i+1]);
	i++;
	break;
      case 'n':
	display_level = -1;
	break;
      default:
	usage(argv[0], "Unknown option\n");
      }
    } else {
      if (filename==NULL)
        filename = argv[i];
      else
        usage(argv[0], "More than one filename\n");
    }
  }
  if (filename==NULL)
    usage(argv[0], "No input file has been provided.\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jl 0x14a6
movl %edi, %ebp
movl $0x1, %r15d
movq 0x2ce3(%rip), %r14      # 0x4108
movslq %r15d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x1455
movzbl 0x1(%rcx), %ecx
cmpl $0x6e, %ecx
je 0x1466
cmpl $0x6c, %ecx
jne 0x1497
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1170
movl %eax, 0x2c95(%rip)      # 0x40e8
jmp 0x1470
testq %r14, %r14
jne 0x1488
movq %rcx, 0x2ca7(%rip)      # 0x4108
movq %rcx, %r14
jmp 0x1470
movl $0xffffffff, 0x2c78(%rip) # imm = 0xFFFFFFFF
incl %r15d
cmpl %ebp, %r15d
jl 0x1425
testq %r14, %r14
je 0x14b5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
leaq 0xcf4(%rip), %rsi       # 0x2186
callq 0x130c
movq (%rbx), %rdi
leaq 0xcd5(%rip), %rsi       # 0x2176
callq 0x130c
movq (%rbx), %rdi
leaq 0xcb0(%rip), %rsi       # 0x2160
callq 0x130c
movq (%rbx), %rdi
leaq 0xcdf(%rip), %rsi       # 0x219e
callq 0x130c
// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/src/service_registry/service_registry.cpp
// Function: Boss::ServiceRegistry::GetServiceInfo(unsigned int, Boss::IServiceInfo**) const
RetCode BOSS_CALL ServiceRegistry::GetServiceInfo(ClassId clsId, IServiceInfo **info) const
  {
    if (!info || *info)
      return Status::InvalidArgument;
    
    try
    {
      std::lock_guard<std::recursive_mutex> Lock(Mtx);
      auto Iter = Services.find(clsId);
      return Iter != std::end(Services) ? Iter->second.QueryInterface(info) : Status::NotFound;
    }
    catch (...)
    {
    }
    return Status::Fail;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, 0x4(%rsp)
movl $0x5, %ebp
testq %rdx, %rdx
je 0x1c326
movq %rdx, %r14
cmpq $0x0, (%rdx)
jne 0x1c326
movq %rdi, %r15
leaq 0x28(%rdi), %rbx
movq %rbx, %rdi
callq 0x19620
testl %eax, %eax
jne 0x1c333
addq $0x50, %r15
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0x1eac6
testq %rax, %rax
je 0x1c312
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x1c319
movq (%rdi), %rax
movl $0x7bd8c883, %esi       # imm = 0x7BD8C883
movq %r14, %rdx
callq *0x20(%rax)
movl %eax, %ebp
jmp 0x1c31e
movl $0x3, %ebp
jmp 0x1c31e
movl $0x2, %ebp
movq %rbx, %rdi
callq 0x19680
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x1b2b1
jmp 0x1c33c
movq %rax, %r14
movq %rbx, %rdi
callq 0x19680
jmp 0x1c34c
movq %rax, %r14
movq %r14, %rdi
callq 0x2a440
callq 0x2a4b0
movl $0x2, %ebp
jmp 0x1c326
// File: /workspace/github_cpp_makefile_star2_O3/tdv[P]boss/boss/src/service_registry/service_registry.cpp
// Function: Boss::ServiceRegistry::DelService(unsigned int)
RetCode BOSS_CALL ServiceRegistry::DelService(ServiceId serviceId)
  {
    try
    {
      std::lock_guard<std::recursive_mutex> Lock(Mtx);
      typedef std::vector<ClassId> ClassIdPool;
      ClassIdPool ClassIds;
      for (auto const &i : Services)
      {
        ServiceId SrvId = 0;
        RetCode Res = i.second->GetServiceId(&SrvId);
        if (Res != Status::Ok)
          return Res;
        ClassIds.push_back(i.first);
      }
      for (auto const &i : ClassIds)
        Services.erase(i);
    }
    catch (...)
    {
      return Status::Fail;
    }
    return Status::Ok;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
movq %rbx, %rdi
callq 0x19620
testl %eax, %eax
jne 0x1c810
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x60(%r14), %r13
testq %r13, %r13
je 0x1c7df
addq $0x50, %r14
leaq 0xc(%rsp), %r15
leaq 0x10(%rsp), %r12
movl $0x0, 0xc(%rsp)
movq 0x10(%r13), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x28(%rax)
movl %eax, %ebp
testl %eax, %eax
jne 0x1c7e1
leaq 0x8(%r13), %rdx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x1c7ab
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x1c7b3
movq %r12, %rdi
callq 0x1ece4
movq (%r13), %r13
testq %r13, %r13
jne 0x1c771
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r12, %r15
je 0x1c80c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1f0ee
addq $0x4, %r15
cmpq %r12, %r15
jne 0x1c7cb
xorl %ebp, %ebp
movq 0x10(%rsp), %r15
testq %r15, %r15
je 0x1c7f3
movq %r15, %rdi
callq 0x29fe0
movq %rbx, %rdi
callq 0x19680
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x1c7e6
movl %eax, %edi
callq 0x1b2b1
movq %rax, %r14
jmp 0x1c838
jmp 0x1c81e
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1c830
callq 0x29fe0
movq %rbx, %rdi
callq 0x19680
movq %r14, %rdi
callq 0x2a440
callq 0x2a4b0
movl $0x2, %ebp
jmp 0x1c7fb