LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/kthread.c
// Function: kt_init
kthread_t *kt_init(int n_threads)
{
	kthread_t *t;
	int i;
	t = (kthread_t*)calloc(1, sizeof(kthread_t));
	t->n_threads = n_threads;
	t->w = (kts_worker_t*)calloc(t->n_threads, sizeof(kts_worker_t));
	pthread_mutex_init(&t->lock, 0);
	pthread_cond_init(&t->cv, 0);
	for (i = 0; i < t->n_threads; ++i) {
		t->w[i].i = i, t->w[i].t = t, t->w[i].pending = -1;
		pthread_create(&t->w[i].tid, 0, kts_worker, &t->w[i]);
	}
	return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebp
movl $0x1, %edi
movl $0x6070, %esi           # imm = 0x6070
callq 0x71a0
movq %rax, %rbx
movl %ebp, 0x8(%rax)
movslq %ebp, %rdi
movl $0x20, %esi
callq 0x71a0
movq %rax, (%rbx)
leaq 0x6018(%rbx), %rdi
xorl %esi, %esi
callq 0x74d0
leaq 0x6040(%rbx), %rdi
xorl %esi, %esi
callq 0x73a0
cmpl $0x0, 0x8(%rbx)
jle 0x3fbb4
xorl %r15d, %r15d
leaq 0x46(%rip), %r14        # 0x3fbc0
xorl %r12d, %r12d
movq (%rbx), %rcx
leaq (%rcx,%r15), %rdi
addq $0x10, %rdi
addq %r15, %rcx
movl %r12d, -0x8(%rdi)
movq %rbx, -0x10(%rdi)
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
xorl %esi, %esi
movq %r14, %rdx
callq 0x7630
incq %r12
movslq 0x8(%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x3fb7d
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/kthread.c
// Function: kt_sync
void kt_sync(kthread_t *t)
{
	int i;
	pthread_mutex_lock(&t->lock);
	t->to_sync = 1;
	pthread_cond_broadcast(&t->cv);
	pthread_mutex_unlock(&t->lock);
	for (i = 0; i < t->n_threads; ++i)
		pthread_join(t->w[i].tid, 0);
	free(t->w); free(t);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6018(%rdi), %r14
movq %r14, %rdi
callq 0x74a0
movl $0x1, 0xc(%rbx)
leaq 0x6040(%rbx), %rdi
callq 0x7110
movq %r14, %rdi
callq 0x7220
cmpl $0x0, 0x8(%rbx)
jle 0x3fdcc
movl $0x10, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r14), %rdi
xorl %esi, %esi
callq 0x7290
incq %r15
movslq 0x8(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x3fdae
movq (%rbx), %rdi
callq 0x7380
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7380
// File: /workspace/github_cpp_makefile_star2_O1/readmapping[P]alfalfa/src/kthread.c
// Function: kt_spawn
int kt_spawn(kthread_t *t, int n, void (*func)(void*,int,int), void *data)
{
	kts_task_t *task;
	if (t->n_tasks >= KT_MAX_TASKS) return -1;
	pthread_mutex_lock(&t->lock);
	task = &t->tasks[t->n_tasks++];
	task->n = n, task->func = func, task->data = data;
	t->n_slots += n;
	pthread_cond_broadcast(&t->cv);
	pthread_mutex_unlock(&t->lock);
	return 0;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x3ff, 0x10(%rdi)      # imm = 0x3FF
jg 0x3fe51
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x6018(%rdi), %r12
movq %r12, %rdi
callq 0x74a0
movslq 0x10(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
leaq (%rax,%rax,2), %rax
movl %ebp, 0x18(%rbx,%rax,8)
movq %r15, 0x20(%rbx,%rax,8)
movq %r14, 0x28(%rbx,%rax,8)
addl %ebp, 0x14(%rbx)
addq $0x6040, %rbx           # imm = 0x6040
movq %rbx, %rdi
callq 0x7110
movq %r12, %rdi
callq 0x7220
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_binomial_coefficient.cpp
// Function: double ncr_println<double>(double, double, double)
inline T ncr_println(T n, T r, T ncr)
{
   printf("ncr(%2d,%2d) = %2llu\n",
          static_cast<int>(n),
          static_cast<int>(r),
          static_cast<unsigned long long>(ncr));

   return T(0);
}

// Assembly:
pushq %rax
cvttsd2si %xmm0, %esi
cvttsd2si %xmm1, %edx
cvttsd2si %xmm2, %rax
movq %rax, %rdi
sarq $0x3f, %rdi
subsd 0x1b430c(%rip), %xmm2   # 0x2d1008
cvttsd2si %xmm2, %rcx
andq %rdi, %rcx
orq %rax, %rcx
leaq 0x1b8dab(%rip), %rdi    # 0x2d5ab9
xorl %eax, %eax
callq 0x119050
xorpd %xmm0, %xmm0
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/white0dew[P]WebServer/timer/lst_timer.cpp
// Function: cb_func(client_data*)
void cb_func(client_data *user_data)
{
    //删除非活动连接在socket上的注册事件
    epoll_ctl(Utils::u_epollfd, EPOLL_CTL_DEL, user_data->sockfd, 0);
    assert(user_data);
    //删除非活动连接在socket上的注册事件
    close(user_data->sockfd);
    //减少连接数
    http_conn::m_user_count--;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x91fa(%rip), %edi      # 0xd3e0
movl 0x10(%rbx), %edx
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x34e0
testq %rbx, %rbx
je 0x420d
movl 0x10(%rbx), %edi
callq 0x36b0
leaq 0x923f(%rip), %rax      # 0xd448
decl (%rax)
popq %rbx
retq
leaq 0x4e88(%rip), %rdi      # 0x909c
leaq 0x4e40(%rip), %rsi      # 0x905b
leaq 0x4e84(%rip), %rcx      # 0x90a6
movl $0x10d, %edx            # imm = 0x10D
callq 0x3290
// File: /workspace/github_cpp_makefile_star2_O1/white0dew[P]WebServer/http/http_conn.cpp
// Function: http_conn::parse_headers(char*)
http_conn::HTTP_CODE http_conn::parse_headers(char *text)
{
    //判断是空行还是请求头
    if (text[0] == '\0')
    {
        //判断是GET还是POST请求
        //!0 is POST
        if (m_content_length != 0)
        {
            //POST需要跳转到消息体处理状态
            m_check_state = CHECK_STATE_CONTENT;
            return NO_REQUEST;
        }
        //==0 is GET
        return GET_REQUEST;
    }
    //解析请求头部connection字段
    else if (strncasecmp(text, "Connection:", 11) == 0)
    {
        text += 11;

        //跳过空格和\t字符
        text += strspn(text, " \t");
        if (strcasecmp(text, "keep-alive") == 0)
        {
            //如果是长连接，则将linger标志设置为true
            m_linger = true;
        }
    }
    //解析请求头部Content-length字段
    else if (strncasecmp(text, "Content-length:", 15) == 0)
    {
        text += 15;
        text += strspn(text, " \t");
        m_content_length = atol(text);
    }
    //解析请求头部Host字段
    else if (strncasecmp(text, "Host:", 5) == 0)
    {
        text += 5;
        text += strspn(text, " \t");
        m_host = text;
    }
    else
    {
        LOG_INFO("oop!unknow header: %s", text);
    }
    return NO_REQUEST;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rsi)
je 0x4a02
movq %rsi, %r14
leaq 0x490c(%rip), %rsi      # 0x9280
movl $0xb, %edx
movq %r14, %rdi
callq 0x34a0
testl %eax, %eax
je 0x4a17
leaq 0x4907(%rip), %rsi      # 0x9297
movl $0xf, %edx
movq %r14, %rdi
callq 0x34a0
testl %eax, %eax
je 0x4a4a
leaq 0x48fb(%rip), %rsi      # 0x92a7
movl $0x5, %edx
movq %r14, %rdi
callq 0x34a0
testl %eax, %eax
je 0x4a76
xorl %ebp, %ebp
cmpl $0x0, 0xe34(%rbx)
jne 0x4a96
callq 0x590c
leaq 0x48d1(%rip), %rdx      # 0x92ad
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x1, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x6460
callq 0x590c
movq %rax, %rdi
callq 0x6882
jmp 0x4a96
cmpl $0x0, 0xd20(%rbx)
je 0x4a6f
movl $0x2, 0xc38(%rbx)
jmp 0x4a94
leaq 0xb(%r14), %rdi
leaq 0x482d(%rip), %rsi      # 0x924f
callq 0x3140
leaq (%r14,%rax), %rdi
addq $0xb, %rdi
leaq 0x4856(%rip), %rsi      # 0x928c
callq 0x33d0
xorl %ebp, %ebp
testl %eax, %eax
jne 0x4a96
movb $0x1, 0xd24(%rbx)
jmp 0x4a96
leaq 0xf(%r14), %rdi
leaq 0x47fa(%rip), %rsi      # 0x924f
callq 0x3140
leaq (%r14,%rax), %rdi
addq $0xf, %rdi
callq 0x3460
movl %eax, 0xd20(%rbx)
jmp 0x4a94
movl $0x1, %ebp
jmp 0x4a96
leaq 0x5(%r14), %rdi
leaq 0x47ce(%rip), %rsi      # 0x924f
callq 0x3140
addq %r14, %rax
addq $0x5, %rax
movq %rax, 0xd18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/white0dew[P]WebServer/http/http_conn.cpp
// Function: http_conn::add_response(char const*, ...)
bool http_conn::add_response(const char *format, ...)
{
    //如果写入内容超出m_write_buf大小则报错
    if (m_write_idx >= WRITE_BUFFER_SIZE)
        return false;
    //定义可变参数列表
    va_list arg_list;
    //将变量arg_list初始化为传入参数
    va_start(arg_list, format);
    //将数据format从可变参数列表写入缓冲区写，返回写入数据的长度
    int len = vsnprintf(m_write_buf + m_write_idx, WRITE_BUFFER_SIZE - 1 - m_write_idx, format, arg_list);
    //如果写入的数据长度超过缓冲区剩余空间，则报错
    if (len >= (WRITE_BUFFER_SIZE - 1 - m_write_idx))
    {
        va_end(arg_list);
        return false;
    }
    //更新m_write_idx位置
    m_write_idx += len;
    //清空可变参列表
    va_end(arg_list);

    LOG_INFO("request:%s", m_write_buf);

    return true;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x5479
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
cmpl $0x3ff, 0xc34(%rdi)     # imm = 0x3FF
jle 0x549b
xorl %ebp, %ebp
jmp 0x553f
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
movslq 0xc34(%rdi), %rax
addq %rax, %rdi
addq $0x834, %rdi            # imm = 0x834
movl $0x3ff, %esi            # imm = 0x3FF
subq %rax, %rsi
movq %r10, %rdx
callq 0x3260
movl 0xc34(%rbx), %ecx
movl $0x3ff, %edx            # imm = 0x3FF
subl %ecx, %edx
cmpl %edx, %eax
setl %bpl
jge 0x553f
addl %eax, %ecx
movl %ecx, 0xc34(%rbx)
cmpl $0x0, 0xe34(%rbx)
jne 0x553f
addq $0x834, %rbx            # imm = 0x834
callq 0x590c
leaq 0x3e45(%rip), %rdx      # 0x9365
movq %rax, %rdi
movl $0x1, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6460
callq 0x590c
movq %rax, %rdi
callq 0x6882
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/white0dew[P]WebServer/././threadpool/threadpool.h
// Function: threadpool<http_conn>::run()
void threadpool<T>::run()
{
    while (true)
    {
        m_queuestat.wait();
        m_queuelocker.lock();
        if (m_workqueue.empty())
        {
            m_queuelocker.unlock();
            continue;
        }
        //
        T *request = m_workqueue.front();
        m_workqueue.pop_front();
        m_queuelocker.unlock();
        if (!request)
            continue;
        //Reactor
        if (1 == m_actor_model)
        {
            //IO事件类型：0为读
            if (0 == request->m_state)
            {
                if (request->read_once())
                {
                    request->improv = 1;
                    connectionRAII mysqlcon(&request->mysql, m_connPool);
                    request->process();
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
            else
            {
                if (request->write())
                {
                    request->improv = 1;
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
        }
        //default:Proactor，线程池不需要进行数据读取，而是直接开始业务处理
        //之前的操作已经将数据读取到http的read和write的buffer中了
        else
        {
            connectionRAII mysqlcon(&request->mysql, m_connPool);
            request->process();
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
leaq 0x28(%rdi), %r15
leaq 0x10(%rdi), %r12
movq %r14, %rdi
callq 0x3250
movq %r15, %rdi
callq 0x3500
movq (%r12), %rbp
cmpq %r12, %rbp
je 0x85b3
movq 0x10(%rbp), %r13
decq 0x20(%rbx)
movq %rbp, %rdi
callq 0x3590
movl $0x18, %esi
movq %rbp, %rdi
callq 0x33a0
movq %r15, %rdi
callq 0x3300
testq %r13, %r13
je 0x854d
cmpl $0x1, 0x78(%rbx)
jne 0x85bd
cmpl $0x0, 0x10(%r13)
je 0x85e7
movq %r13, %rdi
callq 0x5230
movl $0x1, 0x4(%r13)
testb %al, %al
jne 0x854d
jmp 0x861a
movq %r15, %rdi
callq 0x3300
jmp 0x854d
leaq 0x8(%r13), %rsi
movq 0x70(%rbx), %rdx
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x7022
movq %r13, %rdi
callq 0x5832
movq %rbp, %rdi
callq 0x7048
jmp 0x854d
movq %r13, %rdi
callq 0x46de
movl $0x1, 0x4(%r13)
testb %al, %al
je 0x861a
leaq 0x8(%r13), %rsi
movq 0x70(%rbx), %rdx
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x7022
movq %r13, %rdi
callq 0x5832
jmp 0x85da
movl $0x1, (%r13)
jmp 0x854d
jmp 0x8629
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7048
movq %rbx, %rdi
callq 0x35e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/geoloc.cpp
// Function: usage(char const*)
static void usage(const char* condition)
{
    if (condition)
    {
        fprintf(stderr, "%s\n", condition);
    }

    fprintf(stderr, "usage:");
    fprintf(stderr, "\tgeoloc -f file ... [--headers]\n");
    fprintf(stderr, "\tgeoloc -q ip ...\n");
    fprintf(stderr, "\n");
    fprintf(stderr, "This software includes GeoLite data created by MaxMind\n");
    fprintf(stderr, "available from http://www.maxmind.com\n");

    exit(1);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4059
movq %rdi, %rdx
movq 0xbf90(%rip), %rax      # 0xffd8
movq (%rax), %rdi
leaq 0x70be(%rip), %rsi      # 0xb110
xorl %eax, %eax
callq 0x32e0
movq 0xbf78(%rip), %rbx      # 0xffd8
movq (%rbx), %rcx
leaq 0x712a(%rip), %rdi      # 0xb194
movl $0x6, %esi
movl $0x1, %edx
callq 0x33a0
movq (%rbx), %rcx
leaq 0x7118(%rip), %rdi      # 0xb19b
movl $0x20, %esi
movl $0x1, %edx
callq 0x33a0
movq (%rbx), %rcx
leaq 0x7120(%rip), %rdi      # 0xb1bc
movl $0x12, %esi
movl $0x1, %edx
callq 0x33a0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x3290
movq (%rbx), %rcx
leaq 0x710d(%rip), %rdi      # 0xb1cf
movl $0x37, %esi
movl $0x1, %edx
callq 0x33a0
movq (%rbx), %rcx
leaq 0x712c(%rip), %rdi      # 0xb207
movl $0x26, %esi
movl $0x1, %edx
callq 0x33a0
movl $0x1, %edi
callq 0x3260
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/etl.hpp
// Function: etl(char const*, char const*, char const*, char const*)
inline void etl(const char* city_blocks,
                const char* city_locs,
                const char* geo_asns,
                const char* output)
{
    LOG_CONTEXT("etl blocks %s locs %s asns %s into file %s", 
                 city_blocks,
                 city_locs,
                 geo_asns,
                 output);

    BinaryFile file;
    bool ok = file.open(output);

    if (!ok)
    {
        FATAL_ERROR("could not open %s for writing", output);
    }

    char buf[32]; get_header(buf, sizeof(buf));

    file.save_bytes_raw(buf, sizeof(buf));
    build_geo_data(file, city_blocks, city_locs, geo_asns);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, (%rsp)
leaq 0x7096(%rip), %rdi      # 0xb277
leaq 0x709e(%rip), %rdx      # 0xb286
movl $0x6b, %esi
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0xa3f4
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x70be(%rip), %rsi      # 0xb2cf
movq %r12, %rdi
callq 0x3240
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x4240
leaq 0x704d(%rip), %rdi      # 0xb277
leaq 0x7080(%rip), %rdx      # 0xb2b1
movl $0x72, %esi
movq %r12, %rcx
xorl %eax, %eax
callq 0xa50c
movaps 0x6dc9(%rip), %xmm0     # 0xb010
leaq 0x30(%rsp), %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x7077(%rip), %rdx      # 0xb2d1
leaq 0x70a1(%rip), %rcx      # 0xb302
movl $0x20, %esi
xorl %eax, %eax
callq 0x3320
movl %eax, %ebp
testl %eax, %eax
jns 0x428d
leaq 0x6ffd(%rip), %rdi      # 0xb277
leaq 0x7069(%rip), %rdx      # 0xb2ea
movl $0x57, %esi
xorl %eax, %eax
callq 0xa50c
cmpl $0x1f, %ebp
movl $0x1f, %eax
cmovll %ebp, %eax
cltq
movb $0x2d, 0x30(%rsp,%rax)
leaq 0x30(%rsp), %rsi
movb $0xa, 0x1f(%rsi)
leaq 0x10(%rsp), %rdi
movl $0x20, %edx
callq 0x445a
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x44b8
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x464c
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x47fd
leaq 0x10(%rsp), %rdi
callq 0x4496
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42f7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4496
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdi
callq 0x40f4
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: query(char const*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, bool)
inline void query(const char* data_file_name,
                  const std::vector<std::string> &data_sources,
                  bool show_headers)
{
    LOG_CONTEXT("query data %s with %zu sources", data_file_name, data_sources.size());

    GeoData data;
    data.open(data_file_name);

    if (show_headers)
    {
        IPResultEmitter::show_headers();
    }

    for (size_t i = 0; i < data_sources.size(); ++i)
    {
        query(data, data_sources[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r8
subq (%rsi), %r8
sarq $0x5, %r8
leaq 0x72db(%rip), %rdi      # 0xb618
leaq 0x72e5(%rip), %rdx      # 0xb629
movl $0x1b3, %esi            # imm = 0x1B3
movq %r14, %rcx
xorl %eax, %eax
callq 0xa3f4
leaq 0x8(%rsp), %r15
movl $0x98, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3120
movq %r15, %rdi
movq %r14, %rsi
callq 0x87c2
testb %bpl, %bpl
je 0x4397
movq 0xbc3a(%rip), %rax      # 0xffb8
movq (%rax), %rcx
leaq 0x74c8(%rip), %rdi      # 0xb850
movl $0x39, %esi
movl $0x1, %edx
callq 0x33a0
movq (%rbx), %rsi
cmpq %rsi, 0x8(%rbx)
je 0x43d0
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
xorl %r12d, %r12d
addq %r15, %rsi
movq %r14, %rdi
callq 0x88db
incq %r12
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rax, %r12
jb 0x43ab
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x43e4
movq 0x10(%rsp), %rsi
callq 0x3140
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43f6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x440d
movq 0x10(%rsp), %rsi
callq 0x3140
movq %rbx, %rdi
callq 0x3350
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_blocks(BinaryFile&, char const*)
inline void build_blocks(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_blocks from %s", source);

    FileReader reader(source);
    BlockParser parser;

    std::vector<Block> blocks;
    Collector<Block> collector(blocks);

    reader | parser | collector;
    reader.produce();

    save_blocks(file, blocks);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6da2(%rip), %rdi      # 0xb277
leaq 0x6e69(%rip), %rdx      # 0xb345
movl $0x27, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0xa3f4
leaq 0x48(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30e0
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %r15
movq %r15, %rsi
callq 0x49ae
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4523
callq 0x31d0
xorl %eax, %eax
leaq 0x68(%rsp), %r12
movq %rax, -0x18(%r12)
leaq 0xb562(%rip), %r13      # 0xfa98
movq %r13, -0x20(%r12)
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb $0x0, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movups %xmm0, 0x20(%r12)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0x98(%rsp), %rcx
movq %rax, 0x8(%rcx)
leaq 0xb573(%rip), %rax      # 0xfae8
movq %rax, (%rcx)
movq %r14, 0x10(%rcx)
leaq 0x20(%rsp), %r14
movq %r15, 0x8(%r14)
movq %rcx, -0x18(%r12)
movq %r14, %rdi
callq 0x513a
testb %al, %al
jne 0x458a
leaq 0x20(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4a46
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x45ba
callq 0x31d0
movq %r13, 0x48(%rsp)
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x45ce
callq 0x31d0
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x45dd
callq 0x31d0
leaq 0x20(%rsp), %rdi
callq 0x4c44
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x463c
callq 0x31d0
jmp 0x463c
movq %rax, %rbx
jmp 0x463c
jmp 0x4617
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4628
callq 0x31d0
leaq 0x48(%rsp), %rdi
callq 0x4c12
leaq 0x20(%rsp), %rdi
callq 0x4c44
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdi
callq 0x40f4
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_locations(BinaryFile&, char const*)
inline void build_locations(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_locations from %s", source);

    FileReader reader(source);
    LocationParser parser;

    std::vector<Location> locations;
    Collector<Location> collector(locations);

    reader | parser | collector;
    reader.produce();

    save_locations(file, locations);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6c0d(%rip), %rdi      # 0xb277
leaq 0x6e89(%rip), %rdx      # 0xb4fa
movl $0x17, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0xa3f4
leaq 0x40(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30e0
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %r15
movq %r15, %rsi
callq 0x49ae
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46b8
callq 0x31d0
xorl %eax, %eax
leaq 0x60(%rsp), %r12
movq %rax, -0x18(%r12)
leaq 0xb46d(%rip), %rbp      # 0xfb38
movq %rbp, -0x20(%r12)
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movups %xmm0, 0x20(%r13)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0xb0(%rsp), %rcx
movq %rax, 0x8(%rcx)
leaq 0xb46d(%rip), %rax      # 0xfb88
movq %rax, (%rcx)
movq %r14, 0x10(%rcx)
leaq 0x18(%rsp), %r14
movq %r15, 0x8(%r14)
movq %rcx, -0x38(%r13)
movq %r14, %rdi
callq 0x513a
testb %al, %al
jne 0x472f
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x59cc
movq %rsp, %rdi
callq 0x5dec
movq %rbp, 0x40(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4770
callq 0x31d0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x477f
callq 0x31d0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x478e
callq 0x31d0
leaq 0x18(%rsp), %rdi
callq 0x4c44
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x47d9
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47ed
callq 0x31d0
jmp 0x47ed
movq %rax, %rbx
jmp 0x47ed
jmp 0x47ce
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5dec
leaq 0x40(%rsp), %rdi
callq 0x5e30
leaq 0x18(%rsp), %rdi
callq 0x4c44
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdi
callq 0x40f4
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/etl.hpp
// Function: build_asns(BinaryFile&, char const*)
inline void build_asns(BinaryFile &file, const char* source)
{
    LOG_CONTEXT("build_asns from %s", source);

    FileReader reader(source);
    ASNParser parser;

    std::vector<ASN> asns;
    Collector<ASN> collector(asns);

    reader | parser | collector;
    reader.produce();

    save_asns(file, asns);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6a5c(%rip), %rdi      # 0xb277
leaq 0x6d32(%rip), %rdx      # 0xb554
movl $0x37, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0xa3f4
leaq 0x40(%rsp), %rdi
movq %rsp, %r14
movq %r15, %rsi
movq %r14, %rdx
callq 0x30e0
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %r15
movq %r15, %rsi
callq 0x49ae
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4869
callq 0x31d0
xorl %eax, %eax
leaq 0x60(%rsp), %r12
movq %rax, -0x18(%r12)
leaq 0xb35c(%rip), %rbp      # 0xfbd8
movq %rbp, -0x20(%r12)
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movups %xmm0, 0x20(%r13)
movq %rax, 0x10(%rsp)
movaps %xmm0, (%rsp)
leaq 0xb0(%rsp), %rcx
movq %rax, 0x8(%rcx)
leaq 0xb35c(%rip), %rax      # 0xfc28
movq %rax, (%rcx)
movq %r14, 0x10(%rcx)
leaq 0x18(%rsp), %r14
movq %r15, 0x8(%r14)
movq %rcx, -0x38(%r13)
movq %r14, %rdi
callq 0x513a
testb %al, %al
jne 0x48e0
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7751
movq %rsp, %rdi
callq 0x7b52
movq %rbp, 0x40(%rsp)
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4921
callq 0x31d0
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x4930
callq 0x31d0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x493f
callq 0x31d0
leaq 0x18(%rsp), %rdi
callq 0x4c44
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x498a
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x499e
callq 0x31d0
jmp 0x499e
movq %rax, %rbx
jmp 0x499e
jmp 0x497f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7b52
leaq 0x40(%rsp), %rdi
callq 0x7ba0
leaq 0x18(%rsp), %rdi
callq 0x4c44
movq %rbx, %rdi
callq 0x3350
movq %rax, %rdi
callq 0x40f4
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/pipeline.hpp
// Function: FileReader::FileReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
explicit FileReader(const std::string &fn)
        :
        buffer_(0),
        cap_(0),
        file_(0)
    {
        if (fn == "-")
        {
            file_ = stdin;
        }
        else
        {
            file_ = fopen(fn.c_str(), "r");
        }

        if (!file_)
        {
            FATAL_ERROR("could not open %s", fn.c_str());
        }

        if (file_ == 0)
        {
            fprintf(stderr, "file %s dne\n", fn.c_str());
            exit(1);
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
movq %rax, 0x8(%rdi)
leaq 0xb02b(%rip), %rcx      # 0xf9f0
movq %rcx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rax, 0x20(%rdi)
leaq 0x6980(%rip), %rsi      # 0xb35a
movq %rbx, %rdi
callq 0x3080
testl %eax, %eax
je 0x49f7
movq (%rbx), %rdi
leaq 0x6c98(%rip), %rsi      # 0xb688
callq 0x3240
jmp 0x4a01
movq 0xb5d2(%rip), %rax      # 0xffd0
movq (%rax), %rax
movq %rax, 0x20(%r14)
testq %rax, %rax
jne 0x4a27
movq (%rbx), %rcx
leaq 0x6948(%rip), %rdi      # 0xb35c
leaq 0x6955(%rip), %rdx      # 0xb370
movl $0x28, %esi
xorl %eax, %eax
callq 0xa50c
cmpq $0x0, 0x20(%r14)
je 0x4a36
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x33fa
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/blocks.hpp
// Function: save_blocks(BinaryFile&, std::vector<Block, std::allocator<Block>> const&)
inline bool save_blocks(BinaryFile &file, const std::vector<Block> &v)
{
    std::vector<unsigned> start_ip;
    std::vector<unsigned> end_ip;
    std::vector<unsigned> loc;

    start_ip.resize(v.size());
    end_ip.resize(v.size());
    loc.resize(v.size());

    unsigned last = 0;

    // split into columns and check sortedness

    for (size_t i = 0; i < v.size(); ++i)
    {
        assert(v[i].start_ip > last);
        assert(v[i].end_ip >= v[i].start_ip);

        start_ip[i] = v[i].start_ip;
        end_ip[i] = v[i].end_ip;
        loc[i] = v[i].loc;

        last = v[i].end_ip;
    }

    file.save_pod_vector(start_ip);
    file.save_pod_vector(end_ip);
    file.save_pod_vector(loc);

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movq %rcx, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
movq %rdi, %rbx
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x51a2
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
imulq %r15, %rsi
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
callq 0x51a2
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x2, %rsi
imulq %r15, %rsi
movq %rsp, %rdi
xorl %edx, %edx
callq 0x51a2
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
je 0x4b3e
sarq $0x2, %rcx
imulq %r15, %rcx
movq 0x40(%rsp), %rdx
movq 0x20(%rsp), %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq (%rsp), %rdi
addq $0x8, %rax
xorl %r8d, %r8d
xorl %r9d, %r9d
movl -0x8(%rax), %r10d
cmpl %r9d, %r10d
jbe 0x4bba
cmpl %r10d, -0x4(%rax)
jb 0x4b9b
movl %r10d, (%rdx,%r8,4)
movl -0x4(%rax), %r9d
movl %r9d, (%rsi,%r8,4)
movl (%rax), %r9d
movl %r9d, (%rdi,%r8,4)
movl -0x4(%rax), %r9d
incq %r8
addq $0xc, %rax
cmpq %r8, %rcx
jne 0x4b04
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x51e0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x51e0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x51e0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4b71
callq 0x31d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4b80
callq 0x31d0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4b8f
callq 0x31d0
movb $0x1, %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6869(%rip), %rdi      # 0xb40b
leaq 0x6815(%rip), %rsi      # 0xb3be
leaq 0x6820(%rip), %rcx      # 0xb3d0
movl $0x68, %edx
callq 0x3170
leaq 0x67e8(%rip), %rdi      # 0xb3a9
leaq 0x67f6(%rip), %rsi      # 0xb3be
leaq 0x6801(%rip), %rcx      # 0xb3d0
movl $0x67, %edx
callq 0x3170
jmp 0x4bdb
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x4bec
callq 0x31d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4bfb
callq 0x31d0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4c0a
callq 0x31d0
movq %rbx, %rdi
callq 0x3350
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/pipeline.hpp
// Function: FileReader::~FileReader()
virtual ~FileReader()
    {
        if (file_ && file_ != stdin)
        {
            fclose(file_);
        }

        if (buffer_)
        {
            free(buffer_);
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xada1(%rip), %rax      # 0xf9f0
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x4c6c
movq 0xb36e(%rip), %rax      # 0xffd0
cmpq (%rax), %rdi
je 0x4c6c
callq 0x31e0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4c7b
popq %rbx
jmp 0x3250
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/blocks.hpp
// Function: BlockParser::consume(Buffer const&)
void consume(const Buffer &b)
    {
        line_++;
        if (line_ < 3) return;

        csv_split((const char*) b.data(), b.size(), scratch_, toks_);

        if (toks_.size() != 3)
        {
            // we just silently drop bad lines
            return;
        }

        Block block;

        block.start_ip = to_u(toks_[0]);
        block.end_ip = to_u(toks_[1]);
        block.loc = to_u(toks_[2]);

        emit(Buffer(&block, sizeof(block)));
    }

// Assembly:
movq 0x48(%rdi), %rax
incq %rax
movq %rax, 0x48(%rdi)
cmpq $0x3, %rax
jb 0x4d82
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
leaq 0x10(%rbx), %rdx
leaq 0x30(%rbx), %rcx
callq 0x4d83
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rcx
subq %rax, %rcx
cmpq $0x18, %rcx
jne 0x4d7b
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
leaq 0xc(%rsp), %r14
movl %eax, (%r14)
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movl %eax, 0x4(%r14)
movq 0x30(%rbx), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movl %eax, 0x8(%r14)
leaq 0x18(%rsp), %rsi
movq %r14, (%rsi)
movq $0xc, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/csv.hpp
// Function: csv_split(char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<char*, std::allocator<char*>>&)
inline void csv_split(const char* s,
                      size_t n,
                      std::string &scratch,
                      std::vector<char*> &toks)
{
    toks.clear();
    scratch.clear();

    scratch.assign(s, n);

    // csv splitter needs to handle quote marks.
 
    char* ptr = &scratch[0];
    bool first = true;
    char* begin = 0;

    while (*ptr)
    {
        if (!first)
        {
            *ptr = '\0';
            ++ptr;
        }
        else
        {
            first = false;
        }

        if (*ptr != '"')
        {
            begin = ptr;
            while (*ptr && *ptr != ',') ++ptr;
            toks.push_back(begin);
        }
        else
        {
            // skip quote
            ++ptr;
            begin = ptr;

            while (*ptr && *ptr != '"') ++ptr;

            if (*ptr == '"')
            {
                *ptr = '\0';
                ++ptr;
            }

            toks.push_back(begin);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r8
movq %rdi, %rcx
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4da3
movq %rax, 0x8(%rbx)
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax)
movq 0x8(%r14), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3300
movq (%r14), %rax
movq %r15, (%rsp)
cmpb $0x0, (%rax)
je 0x4e61
movb $0x1, %bpl
movq %rsp, %r14
testb $0x1, %bpl
je 0x4dde
xorl %ebp, %ebp
jmp 0x4de4
movb $0x0, (%rax)
incq %rax
cmpb $0x22, (%rax)
jne 0x4e05
incq %rax
movq %rax, (%rsp)
movq %rax, %r15
movzbl (%r15), %eax
testl %eax, %eax
je 0x4e31
cmpl $0x22, %eax
je 0x4e2a
incq %r15
jmp 0x4df3
movq %rax, (%rsp)
movq %rax, %r15
movzbl (%r15), %ecx
testl %ecx, %ecx
je 0x4e1e
cmpl $0x2c, %ecx
je 0x4e1e
incq %r15
jmp 0x4e0c
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x4e3f
jmp 0x4e49
movb $0x0, (%r15)
incq %r15
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4e49
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x4e54
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4e6c
cmpb $0x0, (%r15)
movq %r15, %rax
jne 0x4dd4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/pipeline.hpp
// Function: FileReader::produce_one()
bool produce_one()
    {
        ssize_t n = getline(&buffer_, &cap_, file_);

        if (n <= 0)
        {
            return false;
        }

        if (buffer_[n-1] == '\n')
        {
            buffer_[n-1] = '\0';
            n--;
        }

        emit(Buffer(buffer_, n));

        return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
leaq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdx
movq %r15, %rdi
callq 0x32a0
movq %rax, %r14
testq %rax, %rax
jle 0x5192
movq (%r15), %rax
cmpb $0xa, -0x1(%rax,%r14)
jne 0x5179
movb $0x0, -0x1(%rax,%r14)
leaq -0x1(%r14), %rax
jmp 0x517c
movq %r14, %rax
movq 0x10(%rbx), %rcx
movq %rsp, %rsi
movq %rcx, (%rsi)
movq %rax, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
testq %r14, %r14
setg %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: void BinaryFile::save_pod_vector<unsigned int>(std::vector<unsigned int, std::allocator<unsigned int>> const&)
void save_pod_vector(const std::vector<T> &v)
    {
        save_type("PODV");
        save_unsigned(0);

        off_t top = offset();
        save_unsigned(v.size());
        save_bytes_padded(&v[0], v.size() * sizeof(T));

        off_t bottom = offset();
        unsigned size = (bottom - top);

        seek(top-4);
        save_unsigned(size);
        seek(bottom);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x624b(%rip), %rsi      # 0xb43f
callq 0x584c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58c8
movq (%rbx), %rdi
callq 0x3280
movq %rax, %r14
movq 0x8(%r15), %rsi
subq (%r15), %rsi
shrq $0x2, %rsi
movq %rbx, %rdi
callq 0x58c8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0x5908
movq (%rbx), %rdi
callq 0x3280
movq %rax, %r15
movl %r15d, %ebp
subl %r14d, %ebp
addq $-0x4, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5956
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58c8
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5956
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: BinaryFile::save_type(char const*)
void save_type(const char* x)
    {
        assert(strlen(x) == 4);
        size_t rn = fwrite(x, 1, 4, file_);

        if (rn != 4)
        {
            FATAL_ERROR("failed to save_type 4 bytes");
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3100
cmpq $0x4, %rax
jne 0x58a8
movq (%r14), %rcx
movl $0x1, %esi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x33a0
cmpq $0x4, %rax
jne 0x5887
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5a7b(%rip), %rdi      # 0xb309
leaq 0x5be7(%rip), %rdx      # 0xb47c
movl $0xcb, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa50c
leaq 0x5b95(%rip), %rdi      # 0xb444
leaq 0x5a53(%rip), %rsi      # 0xb309
leaq 0x5b96(%rip), %rcx      # 0xb453
movl $0xc6, %edx
callq 0x3170
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: BinaryFile::save_bytes_padded(void const*, unsigned long)
void save_bytes_padded(const void* b, size_t n)
    {
        size_t rn = fwrite(b, 1, n, file_);

        if (rn != n)
        {
            FATAL_ERROR("failed to save_bytes_padded %zu bytes", n);
        }

        return pad();
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
callq 0x33a0
cmpq %r14, %rax
je 0x5947
leaq 0x59d8(%rip), %rdi      # 0xb309
leaq 0x5b80(%rip), %rdx      # 0xb4b8
movl $0xdf, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0xa50c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x598c
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/serialization.hpp
// Function: BinaryFile::pad()
void pad()
    {
        // given the current offset, emit some padding bytes.

        unsigned padded = ((unsigned) (offset()) + 3) & ~0x3U;
        unsigned pad_bytes = padded - offset();
        char padding[] = {0,0,0,0};

        return save_bytes_raw(padding, pad_bytes);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3280
leal 0x3(%rax), %r14d
andl $-0x4, %r14d
movq (%rbx), %rdi
callq 0x3280
subl %eax, %r14d
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x445a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/string_table.hpp
// Function: StringTable::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void insert(const std::string &s)
    {
        if (string_to_id_.count(s))
        {
            return;
        }

        unsigned index = indices_.size();
        string_to_id_[s] = index;

        indices_.push_back(strings_.size());

        strings_.insert(strings_.end(), s.begin(), s.end());
        strings_.push_back('\0');
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x696a
testq %rax, %rax
jne 0x66f8
movq 0x38(%rbx), %r15
subq 0x30(%rbx), %r15
shrq $0x2, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x69e4
movl %r15d, (%rax)
leaq 0x48(%rbx), %r15
movl 0x50(%rbx), %eax
subl 0x48(%rbx), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x66af
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x38(%rbx)
jmp 0x66bd
leaq 0x30(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x6fb0
movq 0x50(%rbx), %rsi
movq (%r14), %rdx
movq 0x8(%r14), %rcx
addq %rdx, %rcx
movq %r15, %rdi
callq 0x7088
movb $0x0, 0xb(%rsp)
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x66eb
movb $0x0, (%rsi)
incq 0x50(%rbx)
jmp 0x66f8
leaq 0xb(%rsp), %rdx
movq %r15, %rdi
callq 0x729c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/asns.hpp
// Function: ASNParser::consume(Buffer const&)
void consume(const Buffer &b)
    {
        ++line_;

        csv_split((const char*) b.data(), b.size(), scratch_, toks);

        if (toks.size() != 3)
        {
            return;
        }

        ASN asn;

        asn.start_ip = to_u(toks[0]);
        asn.end_ip = to_u(toks[1]);
        parse_text(toks[2], asn.number, asn.text);

        emit(Buffer(&asn, sizeof(asn)));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
incq 0x68(%rdi)
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
leaq 0x30(%rbx), %rdx
leaq 0x50(%rbx), %rcx
callq 0x4d83
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rcx
subq %rax, %rcx
cmpq $0x18, %rcx
jne 0x7ca4
leaq 0x10(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movl %eax, -0x20(%r15)
movq 0x50(%rbx), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movl %eax, -0x1c(%r15)
movq 0x50(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x7cca
movq %rsp, %rax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movq $0x30, 0x8(%rsi)
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x7ca4
callq 0x31d0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x7cb0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x7cc2
callq 0x31d0
movq %rbx, %rdi
callq 0x3350
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/asns.hpp
// Function: ASNParser::parse_text(char*, unsigned int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void parse_text(char* str, unsigned &num, std::string &txt)
    {
        scratch_ = str;

        char* iter = &scratch_[0];
        char* end = iter + scratch_.size();

        char* sp = strchr(iter, ' ');

        const char* tok0 = iter;
        const char* tok1 = sp ? sp + 1 : end;

        REL_ASSERT(strlen(tok0) > 2);

        num = to_u(tok0 + 2);
        txt = tok1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x30(%rdi), %r13
movq 0x38(%rdi), %rbp
movq %rsi, %rdi
callq 0x3100
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x3300
movq 0x30(%r12), %r15
movq 0x38(%r12), %rbp
movq %r15, %rdi
movl $0x20, %esi
callq 0x30d0
movq %rax, %r12
movq %r15, %rdi
callq 0x3100
cmpq $0x2, %rax
ja 0x7d46
leaq 0x3834(%rip), %rdi      # 0xb567
leaq 0x383d(%rip), %rdx      # 0xb577
movl $0x48, %esi
xorl %eax, %eax
callq 0xa50c
addq %r15, %rbp
leaq 0x1(%r12), %r13
testq %r12, %r12
cmoveq %rbp, %r13
addq $0x2, %r15
movq %r15, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x30b0
movl %eax, (%r14)
movq 0x8(%rbx), %r14
movq %r13, %rdi
callq 0x3100
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r13, %rcx
movq %rax, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3300
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/query.hpp
// Function: GeoData::open(char const*)
void open(const char* fn)
    {
        LOG_CONTEXT("GeoData open %s", fn);

        bool ok = mem_file_.open(fn);

        if (!ok)
        {
            FATAL_ERROR("could not open %s for reading", fn);
        }

        LOG_CONTEXT("GeoData read header");
        read_header();

        LOG_CONTEXT("GeoData load location_ip_blocks");
        location_ip_blocks_.load(mem_file_);

        LOG_CONTEXT("GeoData load location_data");
        location_data_.load(mem_file_);

        LOG_CONTEXT("GeoData load asn_ip_blocks");
        asn_ip_blocks_.load(mem_file_);

        LOG_CONTEXT("GeoData load asn_data");
        asn_data_.load(mem_file_);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2e45(%rip), %rdi      # 0xb618
leaq 0x2e6e(%rip), %rdx      # 0xb648
movl $0x40, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0xa3f4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8e04
testb %al, %al
jne 0x8815
leaq 0x2e19(%rip), %rdi      # 0xb618
leaq 0x2e52(%rip), %rdx      # 0xb658
movl $0x46, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0xa50c
leaq 0x2dfc(%rip), %r14      # 0xb618
leaq 0x2e53(%rip), %rdx      # 0xb676
movq %r14, %rdi
movl $0x49, %esi
xorl %eax, %eax
callq 0xa3f4
movq %rbx, %rdi
callq 0x8b54
leaq 0x2e49(%rip), %rdx      # 0xb68a
movq %r14, %rdi
movl $0x4c, %esi
xorl %eax, %eax
callq 0xa3f4
leaq 0x18(%rbx), %rdi
movq %rbx, %rsi
callq 0x8d6e
leaq 0x2e47(%rip), %rdx      # 0xb6aa
movq %r14, %rdi
movl $0x4f, %esi
xorl %eax, %eax
callq 0xa3f4
leaq 0x30(%rbx), %rdi
movq %rbx, %rsi
callq 0x8dc0
leaq 0x2e40(%rip), %rdx      # 0xb6c5
movq %r14, %rdi
movl $0x52, %esi
xorl %eax, %eax
callq 0xa3f4
leaq 0x68(%rbx), %rdi
movq %rbx, %rsi
callq 0x8d6e
leaq 0x2e39(%rip), %rdx      # 0xb6e0
movq %r14, %rdi
movl $0x55, %esi
xorl %eax, %eax
callq 0xa3f4
leaq 0x80(%rbx), %rsi
movq %rbx, %rdi
callq 0x90bc
leaq 0x90(%rbx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9230
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/blocks.hpp
// Function: BlockTable::load(MemoryFile&)
void load(MemoryFile& file)
    {
        LOG_CONTEXT("BlockTable load");

        file.load_mapped_vector(start_ip);
        file.load_mapped_vector(end_ip);
        file.load_mapped_vector(loc);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x263f(%rip), %rdi      # 0xb3be
leaq 0x2a23(%rip), %rdx      # 0xb7a9
movl $0x22, %esi
xorl %eax, %eax
callq 0xa3f4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8fd0
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x8fd0
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8fd0
nop
// File: /workspace/github_cpp_makefile_star2_O1/loadzero[P]geoloc/geoloc/locations.hpp
// Function: LocationTable::load(MemoryFile&)
void load(MemoryFile& file)
    {
        file.load_mapped_string_vector(country);
        file.load_mapped_string_vector(region);
        file.load_mapped_string_vector(city);
        file.load_mapped_vector(locations);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x90bc
leaq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x90bc
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x90bc
addq $0x30, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x912a
nop