LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::async_write(void const*, unsigned long, std::function<void (int, int)>)
void socket::async_write(const void *buff, size_t length, ocallback ocb){
	std::lock_guard<std::mutex> locker(rd_mutex);
	wr_request.push_back(
			std::bind(&socket::async_wr_action, this, reinterpret_cast<const char *>(buff), length, ocb));

	if(wrable)
		wr_worker.active();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
addq $0x120, %rdi            # imm = 0x120
movq %rdi, -0x30(%rbp)
callq 0x32a0
testl %eax, %eax
jne 0x647b
leaq 0x186(%rip), %rax       # 0x64de
leaq -0x88(%rbp), %r14
movq %rax, -0x10(%r14)
movq $0x0, -0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7656
movq %r12, -0x68(%rbp)
movq %r13, -0x60(%rbp)
movq %r15, -0x58(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x40(%rbp)
movl $0x48, %edi
callq 0x3200
leaq 0x1b0(%r15), %rdi
movups -0x98(%rbp), %xmm0
movups %xmm0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x78(%rbp), %rcx
testq %rcx, %rcx
je 0x63e4
movq %rax, %rdx
addq $0x10, %rdx
leaq -0x78(%rbp), %rsi
movups (%r14), %xmm0
movups %xmm0, (%rdx)
movq %rcx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq %r12, 0x30(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x40(%rax)
leaq -0x50(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x12b6(%rip), %rax      # 0x76bc
movq %rax, 0x18(%rdx)
leaq 0x12c9(%rip), %rax      # 0x76da
movq %rax, 0x10(%rdx)
movq %rdi, %rsi
callq 0x6ea2
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x6434
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x78(%rbp), %rax
testq %rax, %rax
je 0x644a
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
cmpb $0x1, 0x1f1(%r15)
jne 0x6463
addq $0x98, %r15
movq %r15, %rdi
callq 0x82aa
movq -0x30(%rbp), %rdi
callq 0x3180
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
jmp 0x64c9
jmp 0x64c1
jmp 0x64c1
movq %rax, %r15
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x64a9
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x64a9
jmp 0x64c1
movq %rax, %r15
movq -0x78(%rbp), %rax
testq %rax, %rax
je 0x64cc
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x64cc
movq %rax, %rdi
callq 0x3a3f
movq %rax, %r15
movq -0x30(%rbp), %rdi
callq 0x3180
movq %r15, %rdi
callq 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::async_wr_action(char const*, unsigned long, std::function<void (int, int)>)
void socket::async_wr_action(const char *buff, size_t length, ocallback ocb){
	int transfered = write_some(buff, length);
	int ec = 0;
	if(transfered == -1){
		socklen_t len = sizeof(ec);
		if(::getsockopt(sock, SOL_SOCKET, SO_ERROR, &ec, &len) < 0){
			//
		}
	}

	singleton<scheduler>::instance()->arrange(std::bind(ocb, ec, transfered));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x6520
movq %rdx, %r15
movq %rsi, %r12
xorl %r13d, %r13d
movl 0x8(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x30c0
testl %eax, %eax
jle 0x6525
addl %eax, %r13d
cmpq %r15, %r13
jb 0x6503
jmp 0x6525
xorl %r13d, %r13d
xorl %eax, %eax
testl %eax, %eax
jle 0x652e
movl %r13d, %r12d
jmp 0x654d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
jne 0x654d
callq 0x3040
cmpl $0xb, (%rax)
jne 0x654d
movb $0x0, 0x1f1(%r14)
jmp 0x6529
movl $0x0, -0x2c(%rbp)
cmpl $-0x1, %r12d
jne 0x657c
leaq -0x78(%rbp), %r8
movl $0x4, (%r8)
movl 0x8(%r14), %edi
leaq -0x2c(%rbp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x3170
callq 0x42be
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7656
movl %r12d, 0x20(%r15)
movl -0x2c(%rbp), %eax
movl %eax, 0x24(%r15)
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x6c52
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x4a9e
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x65cd
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x68(%rbp), %rax
testq %rax, %rax
je 0x65e4
leaq -0x78(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6637
jmp 0x6637
movq %rax, %rbx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x6618
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6618
jmp 0x6637
movq %rax, %rbx
movq -0x68(%rbp), %rax
testq %rax, %rax
je 0x662f
leaq -0x78(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x3a3f
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::async_read(void*, unsigned long, std::function<void (int, int)>)
void socket::async_read(void *buff, size_t length, icallback icb){
	std::lock_guard<std::mutex> locker(wr_mutex);
	rd_request.push_back(
			std::bind(&socket::async_rd_action, this, reinterpret_cast<char*>(buff), length, icb));

	if(rdable)
		rd_worker.active();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
addq $0x148, %rdi            # imm = 0x148
movq %rdi, -0x30(%rbp)
callq 0x32a0
testl %eax, %eax
jne 0x679c
leaq 0x182(%rip), %rax       # 0x67fe
leaq -0x88(%rbp), %r14
movq %rax, -0x10(%r14)
movq $0x0, -0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7656
movq %r12, -0x68(%rbp)
movq %r13, -0x60(%rbp)
movq %r15, -0x58(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x40(%rbp)
movl $0x48, %edi
callq 0x3200
leaq 0x198(%r15), %rdi
movups -0x98(%rbp), %xmm0
movups %xmm0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x78(%rbp), %rcx
testq %rcx, %rcx
je 0x6708
movq %rax, %rdx
addq $0x10, %rdx
leaq -0x78(%rbp), %rsi
movups (%r14), %xmm0
movups %xmm0, (%rdx)
movq %rcx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq %r12, 0x30(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x40(%rax)
leaq -0x50(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x1162(%rip), %rax      # 0x788c
movq %rax, 0x18(%rdx)
leaq 0x1175(%rip), %rax      # 0x78aa
movq %rax, 0x10(%rdx)
movq %rdi, %rsi
callq 0x6ea2
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x6758
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x78(%rbp), %rax
testq %rax, %rax
je 0x676e
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
cmpb $0x1, 0x1f0(%r15)
jne 0x6784
addq $0x10, %r15
movq %r15, %rdi
callq 0x82aa
movq -0x30(%rbp), %rdi
callq 0x3180
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
jmp 0x67ea
jmp 0x67e2
jmp 0x67e2
movq %rax, %r15
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x67ca
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x67ca
jmp 0x67e2
movq %rax, %r15
movq -0x78(%rbp), %rax
testq %rax, %rax
je 0x67ed
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x67ed
movq %rax, %rdi
callq 0x3a3f
movq %rax, %r15
movq -0x30(%rbp), %rdi
callq 0x3180
movq %r15, %rdi
callq 0x3330
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::async_rd_action(char*, unsigned long, std::function<void (int, int)>)
void socket::async_rd_action(char *buff, size_t length, icallback icb){
	int transfered = read_some(buff, length);
	int ec = 0;
	if(transfered == -1){
		socklen_t len = sizeof(ec);
		if(::getsockopt(sock, SOL_SOCKET, SO_ERROR, &ec, &len) < 0){
			//
		}
	}
	singleton<scheduler>::instance()->arrange(std::bind(icb, ec, transfered));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x6840
movq %rdx, %r15
movq %rsi, %r12
xorl %r13d, %r13d
movl 0x8(%r14), %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3280
testl %eax, %eax
jle 0x6845
addl %eax, %r13d
cmpq %r15, %r13
jb 0x6823
jmp 0x6845
xorl %r13d, %r13d
xorl %eax, %eax
testl %eax, %eax
jle 0x684e
movl %r13d, %r12d
jmp 0x686d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
jne 0x686d
callq 0x3040
cmpl $0xb, (%rax)
jne 0x686d
movb $0x0, 0x1f0(%r14)
jmp 0x6849
movl $0x0, -0x2c(%rbp)
cmpl $-0x1, %r12d
jne 0x689c
leaq -0x78(%rbp), %r8
movl $0x4, (%r8)
movl 0x8(%r14), %edi
leaq -0x2c(%rbp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x3170
callq 0x42be
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7656
movl %r12d, 0x20(%r15)
movl -0x2c(%rbp), %eax
movl %eax, 0x24(%r15)
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x6c52
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x4a9e
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x68ed
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x68(%rbp), %rax
testq %rax, %rax
je 0x6904
leaq -0x78(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6957
jmp 0x6957
movq %rax, %rbx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x6938
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x6938
jmp 0x6957
movq %rax, %rbx
movq -0x68(%rbp), %rax
testq %rax, %rax
je 0x694f
leaq -0x78(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x3a3f
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::rdhupevent()
void socket::rdhupevent(){
	unregister_epoll_req();
	connect_status = PRECONNECT;
	rdable = false;
	wrable = false;
	close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x7d2a
movl $0x0, 0x1f4(%rbx)
movw $0x0, 0x1f0(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7d5a
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket.cpp
// Function: socket::eevent()
void socket::eevent(){
	if(CONNECTING == connect_status){
		std::function<void()> callback;
		{
			std::lock_guard<std::mutex> locker(conn_mutex);
			if(conn_request.empty()){
				return;
			}
			callback = conn_request.front();
			conn_request.pop_front();
			if(nullptr == callback)
				return;
		}
		callback();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x1, 0x1f4(%rdi)
jne 0x6a70
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
leaq 0x170(%rdi), %rbx
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x6a79
movq 0x1c8(%r14), %rsi
addq $0x1c8, %r14            # imm = 0x1C8
cmpq %r14, %rsi
je 0x6a51
addq $0x10, %rsi
leaq -0x30(%rbp), %rdi
callq 0x6cb0
movq (%r14), %rsi
movq %r14, %rdi
callq 0x7bfc
movq -0x20(%rbp), %r14
movq %rbx, %rdi
callq 0x3180
testq %r14, %r14
je 0x6a59
cmpq $0x0, -0x20(%rbp)
je 0x6a80
leaq -0x30(%rbp), %rdi
callq *0x18(%rdi)
jmp 0x6a59
movq %rbx, %rdi
callq 0x3180
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x6a70
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x3140
callq 0x30e0
jmp 0x6ab8
movq %rax, %r14
movq %rbx, %rdi
callq 0x3180
jmp 0x6a99
jmp 0x6a96
movq %rax, %r14
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x6ab0
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x3a3f
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket_base.cpp
// Function: socket_base::register_epoll_req()
void socket_base::register_epoll_req(){
	if(-1 == sock){
		return;
	}
	if(!epolled){
		singleton<epoll>::instance()->add_request(
				this, EPOLLHUP|EPOLLRDHUP|EPOLLPRI|EPOLLOUT|EPOLLIN|EPOLLET);
		epolled = true;
	}
}

// Assembly:
cmpl $-0x1, 0x8(%rdi)
je 0x7cc2
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0xc(%rdi)
jne 0x7cbc
callq 0x7dfc
movq %rax, %rdi
movq %rbx, %rsi
movl $0x80002017, %edx       # imm = 0x80002017
callq 0x8544
movb $0x1, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket_base.cpp
// Function: socket_base::unregister_epoll_req()
void socket_base::unregister_epoll_req(){
	if(-1 == sock){
		return;
	}
	if(epolled){
		singleton<epoll>::instance()->del_request(this);
		epolled = false;
	}
}

// Assembly:
cmpl $-0x1, 0x8(%rdi)
je 0x7d59
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0xc(%rdi)
jne 0x7d53
callq 0x7dfc
movq %rax, %rdi
movq %rbx, %rsi
callq 0x85bc
movb $0x0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/socket_base.cpp
// Function: socket_base::set_noblock()
bool socket_base::set_noblock(){
	if(-1 == sock){
		return false;
	}
	int flags = fcntl(sock, F_GETFL, 0);
	if(flags < 0){
		return false;
	}

	if(fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) {
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl 0x8(%rdi), %edi
xorl %ebx, %ebx
cmpl $-0x1, %edi
je 0x7dd0
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3130
testl %eax, %eax
js 0x7dd0
movl 0x8(%r14), %edi
orl $0x800, %eax            # imm = 0x800
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x3130
testl %eax, %eax
setns %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/worker.cpp
// Function: worker::worker()
worker::worker():stop(false), onced(true){
	mutex.lock();
	stop = false;
	thread = std::shared_ptr<std::thread>(
			new std::thread(std::bind(&worker::work, this)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x19(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movb $0x1, 0x2a(%rdi)
addq $0x30, %rdi
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movq $0x0, 0x80(%rbx)
callq 0x32a0
testl %eax, %eax
jne 0x807c
movb $0x0, 0x28(%rbx)
movl $0x8, %edi
callq 0x3200
movq %rax, %r15
leaq 0xc6(%rip), %rax        # 0x80d6
leaq -0x48(%rbp), %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movb $0x1, %r12b
movq %r15, %rdi
callq 0x82b8
leaq -0x28(%rbp), %rdi
movq %r15, -0x8(%rdi)
xorl %r12d, %r12d
movq %r15, %rsi
callq 0x8386
movaps -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x30(%rbp)
movq 0x80(%rbx), %rdi
movups %xmm0, 0x78(%rbx)
testq %rdi, %rdi
je 0x8061
callq 0x3a4e
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x806f
callq 0x3a4e
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
jmp 0x8085
movq %rax, %r14
jmp 0x809a
movq %rax, %r14
testb %r12b, %r12b
je 0x809a
movq %r15, %rdi
callq 0x31e0
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x80ab
callq 0x3a4e
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x80c5
addq $0x58, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r14, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x3a3f
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/worker.cpp
// Function: worker::work()
void worker::work(){
	while(true){
		while(!mutex.try_lock_for(std::chrono::milliseconds(30))){
			if(stop)
				return;
		}
		std::lock_guard<std::mutex> locker(task_safe);
		if(proc != nullptr)
			proc();
		if(once){
			proc = nullptr;
			onced = true;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
leaq 0x58(%rdi), %r15
leaq 0x68(%rdi), %r13
leaq -0x30(%rbp), %r12
movq $0x1e, -0x30(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x8434
testb %al, %al
je 0x8159
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x816e
cmpq $0x0, (%r13)
je 0x8127
movq %r15, %rdi
callq *0x70(%rbx)
cmpb $0x1, 0x29(%rbx)
jne 0x814f
movq (%r13), %rax
testq %rax, %rax
je 0x814b
movq %r15, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movb $0x1, 0x2a(%rbx)
movq %rbx, %rdi
callq 0x3180
jmp 0x80f7
cmpb $0x1, 0x28(%rbx)
jne 0x80f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3140
movq %rax, %rdi
callq 0x3a3f
movq %rax, %r14
movq %rbx, %rdi
callq 0x3180
movq %r14, %rdi
callq 0x3330
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/worker.cpp
// Function: worker::interrupt()
void worker::interrupt(){
	if(nullptr != thread){
		stop = true;
		if(thread->joinable()){
			thread->join();
		}
		thread = nullptr;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x8219
movb $0x1, 0x28(%rbx)
cmpq $0x0, (%rdi)
je 0x81fb
callq 0x3300
xorps %xmm0, %xmm0
movq 0x80(%rbx), %rdi
movups %xmm0, 0x78(%rbx)
testq %rdi, %rdi
je 0x8219
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3a4e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/worker.cpp
// Function: worker::task(std::function<void ()>)
bool worker::task(std::function<void()> job){
	if(task_safe.try_lock()){
		once = false;
		proc = job;
		task_safe.unlock();
		return true;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3070
movl %eax, %r14d
testl %eax, %eax
jne 0x8254
movb $0x0, 0x29(%rbx)
leaq 0x58(%rbx), %rdi
movq %r15, %rsi
callq 0x6cb0
movq %rbx, %rdi
callq 0x3180
testl %r14d, %r14d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/worker.cpp
// Function: worker::task_once(std::function<void ()>)
bool worker::task_once(std::function<void()> job){
	if(onced && task_safe.try_lock()){
		once = true;
		onced = false;
		proc = job;
		task_safe.unlock();
		return true;
	}
	return false;
}

// Assembly:
cmpb $0x1, 0x2a(%rdi)
jne 0x8286
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3070
testl %eax, %eax
je 0x8289
xorl %eax, %eax
jmp 0x82a5
xorl %eax, %eax
retq
movw $0x1, 0x29(%rbx)
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x6cb0
movq %rbx, %rdi
callq 0x3180
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/epoll.cpp
// Function: epoll::interrupt()
void epoll::interrupt(){
	if(nullptr != service){
		polling = false;
		if(service->joinable()){
			service->join();
		}
		service = nullptr;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x853d
movb $0x0, (%rbx)
cmpq $0x0, (%rdi)
je 0x8522
callq 0x3300
xorps %xmm0, %xmm0
movq 0x10(%rbx), %rdi
movups %xmm0, 0x8(%rbx)
testq %rdi, %rdi
je 0x853d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3a4e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/epoll.cpp
// Function: epoll::add_request(socket_base*, int)
void epoll::add_request(socket_base *sock, int events){
	struct epoll_event ev;
	ev.events = events;
	ev.data.ptr = sock;

	epoll_ctl(fd, EPOLL_CTL_ADD, sock->fd(), &ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x1c(%rbp), %rbx
movl %edx, (%rbx)
movq %rsi, 0x4(%rbx)
movl 0x4(%rdi), %r14d
movq %rsi, %rdi
callq 0x7d84
movl %r14d, %edi
movl $0x1, %esi
movl %eax, %edx
movq %rbx, %rcx
callq 0x3260
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nightmeng[P]net/src/epoll.cpp
// Function: epoll::poll_service()
void epoll::poll_service(){
	struct epoll_event evs[20000];
	polling = true;
	while(polling){
		int cnt = ::epoll_wait(fd, evs, 20000, 30);

		for(int i = 0; i != cnt; ++i){
			struct epoll_event &ev = evs[i];

			socket_base *sock = reinterpret_cast<socket_base*>(ev.data.ptr);
			if(nullptr == sock){
				continue;
			}

			if(ev.events & EPOLLRDHUP){
				sock->rdhupevent();
			}
			else{
				if(ev.events & EPOLLERR){
					sock->eevent();
				}
				if(ev.events & EPOLLIN){
					sock->ievent();
				}
				if(ev.events & EPOLLOUT){
					sock->oevent();
				}
				if(ev.events & EPOLLHUP){
					sock->hupevent();
				}
				if(ev.events & EPOLLPRI){
					sock->prievent();
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a988, %rsp          # imm = 0x3A988
movq %rdi, %rbx
movb $0x1, (%rdi)
leaq -0x3a9b0(%rbp), %r14
movl 0x4(%rbx), %edi
movq %r14, %rsi
movl $0x4e20, %edx           # imm = 0x4E20
movl $0x1e, %ecx
callq 0x3110
testl %eax, %eax
je 0x8773
movl %eax, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %r12
xorl %r13d, %r13d
movq -0x3a9ac(%rbp,%r13), %r15
testq %r15, %r15
je 0x8766
movl -0x3a9b0(%rbp,%r13), %ecx
movl $0x38, %eax
btl $0xd, %ecx
jb 0x875d
testb $0x8, %cl
je 0x8711
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
testb $0x1, -0x3a9b0(%rbp,%r13)
je 0x8725
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
testb $0x4, -0x3a9b0(%rbp,%r13)
je 0x8739
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
testb $0x10, -0x3a9b0(%rbp,%r13)
je 0x874d
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
movl $0x28, %eax
testb $0x2, -0x3a9b0(%rbp,%r13)
je 0x8766
movq (%r15), %rcx
movq %r15, %rdi
callq *(%rcx,%rax)
addq $0xc, %r13
cmpq %r13, %r12
jne 0x86e3
cmpb $0x1, (%rbx)
je 0x86b9
addq $0x3a988, %rsp          # imm = 0x3A988
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/stemmer/stemmer.cpp
// Function: main
int main(int argc, char** argv) {
	int inputFD = -1;
	int outputFD = -1;

	const char* inputPath = "STDIN";
	if(argc < 2) {
		inputFD = 0;
	} else {
		inputPath = argv[1];
		inputFD = open(inputPath, O_RDONLY);
		if(inputFD < 0) {
			printf("Cannot open file %s\n", inputPath);
			return 1;
		}
	}

	if(argc < 3) {
		outputFD = 1;
	} else {
		char* outputPath = argv[2];
		outputFD = open(outputPath, O_WRONLY | O_CREAT, 0664);
		if(outputFD < 0) {
			printf("Cannot open file %s\n", outputPath);
			return 1;
		}
	}

	struct stat fileStat;
	if(fstat(inputFD, &fileStat) != 0) {
		printf("Cannot stat file %s\n", inputPath);
		return 1;
	}

	processFile(inputFD, outputFD, &fileStat);

	if(outputFD == 1) {
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r12
movl %edi, %r13d
xorl %ebx, %ebx
cmpl $0x2, %edi
jge 0x1205
leaq 0xe03(%rip), %r14       # 0x2004
xorl %ebp, %ebp
jmp 0x1220
movq 0x8(%r12), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x129e
movl %eax, %ebp
movl $0x1, %r15d
cmpl $0x3, %r13d
jl 0x1269
movq 0x10(%r12), %r12
xorl %ebx, %ebx
movq %r12, %rdi
movl $0x41, %esi
movl $0x1b4, %edx            # imm = 0x1B4
xorl %eax, %eax
callq 0x1070
movl %eax, %r15d
testl %eax, %eax
jns 0x1264
leaq 0xdb5(%rip), %rdi       # 0x200a
movq %r12, %rsi
xorl %eax, %eax
callq 0x1040
movl $0x1, %ebx
testl %r15d, %r15d
js 0x12b4
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
callq 0x10d0
testl %eax, %eax
je 0x1282
leaq 0xd9f(%rip), %rdi       # 0x201f
jmp 0x12a5
movl %ebp, %edi
movl %r15d, %esi
callq 0x12c8
cmpl $0x1, %r15d
jne 0x12b4
movl $0xa, %edi
callq 0x10a0
jmp 0x12b4
leaq 0xd65(%rip), %rdi       # 0x200a
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
movl $0x1, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/stemmer/stemmer.cpp
// Function: processFile(int, int, stat*)
void processFile(int inputFD, int outputFD, struct stat* const fileStat) {
	char* fullData = 0;
	readFullData(inputFD, &fullData);

	char* buffer = new char[4096];
	int offset = 0;
	readToken(fullData, offset, buffer, 4096);
	stemToken(buffer);
	writeToken(buffer, outputFD);
	while(readToken(fullData, offset, buffer, 4096)) {
		writeToken(" ", outputFD);
		stemToken(buffer);
		writeToken(buffer, outputFD);
	}
	delete fullData;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
leaq 0x10(%rsp), %r15
movq $0x0, (%r15)
movq %r15, %rsi
callq 0x1f2e
movl $0x1000, %edi           # imm = 0x1000
callq 0x1030
movq %rax, %r14
leaq 0xc(%rsp), %r12
movl $0x0, (%r12)
movq (%r15), %rdi
movq %r12, %rsi
movq %rax, %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x1e51
movq %r14, %rdi
callq 0x139c
movq %r14, %rdi
movl %ebx, %esi
callq 0x1dc4
movq (%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x1e51
testb %al, %al
je 0x1380
leaq 0xcee(%rip), %r15       # 0x2034
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0x1dc4
movq %r14, %rdi
callq 0x139c
movq %r14, %rdi
movl %ebx, %esi
callq 0x1dc4
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
movl $0x1000, %ecx           # imm = 0x1000
callq 0x1e51
testb %al, %al
jne 0x134b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x138f
callq 0x1080
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/stem.cpp
// Function: ends(char const*)
static int ends(const char * s)
{  int length = s[0];
   if (s[length] != b[k]) return FALSE; /* tiny speed-up */
   if (length > k-k0+1) return FALSE;
   if (memcmp(b+k-length+1,s+1,length) != 0) return FALSE;
   j = k-length;
   return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rsi
movsbq (%rdi), %r14
movb (%rdi,%r14), %al
movq 0x249c(%rip), %rdi      # 0x4088
movslq 0x249d(%rip), %r15      # 0x4090
xorl %ebx, %ebx
cmpb (%rdi,%r15), %al
jne 0x1c32
movl %r15d, %eax
subl 0x2490(%rip), %eax      # 0x4094
incl %eax
cmpl %r14d, %eax
jl 0x1c32
addq %r15, %rdi
subq %r14, %rdi
incq %rdi
incq %rsi
movq %r14, %rdx
callq 0x1090
testl %eax, %eax
jne 0x1c32
subl %r14d, %r15d
movl %r15d, 0x246b(%rip)     # 0x4098
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/stem.cpp
// Function: m()
static int m()
{  int n = 0;
   int i = k0;
   while(TRUE)
   {  if (i > j) return n;
      if (! cons(i)) break; i++;
   }
   i++;
   while(TRUE)
   {  while(TRUE)
      {  if (i > j) return n;
            if (cons(i)) break;
            i++;
      }
      i++;
      n++;
      while(TRUE)
      {  if (i > j) return n;
         if (! cons(i)) break;
         i++;
      }
      i++;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x244c(%rip), %ebp      # 0x4094
movl 0x2449(%rip), %r15d     # 0x4098
xorl %ebx, %ebx
cmpl %r15d, %ebp
jg 0x1c6c
leal 0x1(%r15), %r14d
movl %ebp, %edi
callq 0x1d7e
testl %eax, %eax
je 0x1c77
incl %ebp
cmpl %ebp, %r14d
jne 0x1c5a
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
cmpl %r15d, %ebp
movl %r15d, %r12d
cmovgl %ebp, %r12d
incl %ebp
negl %r12d
movl %ebp, %r14d
leal (%r12,%r14), %eax
cmpl $0x1, %eax
je 0x1c6c
movl %r14d, %edi
callq 0x1d7e
leal 0x1(%r14), %ebp
testl %eax, %eax
je 0x1c88
incl %ebx
cmpl %r15d, %ebp
jg 0x1c6c
leal 0x1(%r14), %ebp
movl %ebp, %edi
callq 0x1d7e
testl %eax, %eax
je 0x1cc4
movl %ebp, %r14d
cmpl %r15d, %ebp
jl 0x1cab
jmp 0x1c6c
incl %r14d
movl %r14d, %ebp
jmp 0x1c79
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/stem.cpp
// Function: cvc(int)
static int cvc(int i)
{  if (i < k0+2 || !cons(i) || cons(i-1) || !cons(i-2)) return FALSE;
   {  int ch = b[i];
      if (ch == 'w' || ch == 'x' || ch == 'y') return FALSE;
   }
   return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x2365(%rip), %eax      # 0x4094
addl $0x2, %eax
xorl %ebx, %ebx
cmpl %edi, %eax
jg 0x1d74
movl %edi, %r14d
callq 0x1d7e
testl %eax, %eax
je 0x1d74
leal -0x1(%r14), %edi
callq 0x1d7e
testl %eax, %eax
jne 0x1d74
leal -0x2(%r14), %edi
callq 0x1d7e
testl %eax, %eax
je 0x1d74
movq 0x2323(%rip), %rax      # 0x4088
movslq %r14d, %rcx
movb (%rax,%rcx), %al
addb $-0x7a, %al
xorl %ebx, %ebx
cmpb $-0x3, %al
setb %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/utils.cpp
// Function: writeToken(char const*, int)
void writeToken(const char* buffer, int fd) {
	int len = strlen(buffer);
	int bytesWritten = write(fd, buffer, len);
	if(len != bytesWritten) {
		printf("Error writing token\n");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x1060
movslq %eax, %r15
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1050
cmpl %eax, %r15d
jne 0x1dee
popq %rbx
popq %r14
popq %r15
retq
leaq 0x451(%rip), %rdi       # 0x2246
popq %rbx
popq %r14
popq %r15
jmp 0x10c0
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/utils.cpp
// Function: lowercaseToken(char*)
void lowercaseToken(char* token) {
	char* str = token;
	while(*str != '\0') {
		char c = *str;
		if(c >= 'A' && c <= 'Z') {
			*str = c + DIFF;
		}		
		str++;
	}
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x1e1e
incq %rdi
leal -0x41(%rax), %ecx
cmpb $0x19, %cl
ja 0x1e15
orb $0x20, %al
movb %al, -0x1(%rdi)
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x1e08
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/utils.cpp
// Function: readToken(char const*, int&, char*, int)
bool readToken(const char* data, int& offset, char* buffer, int buffLength) {
	const char* str = data + offset;
	if(*str == '\0')
		return false;
	int leading = 0;
	while(!isAlphanumeric(*str) && *str != '\0') {
		str++;
		leading++;
	}

	int i = 0;
	while(shouldRead(*str) && i < buffLength) {
		*(buffer + i) = *str;
		i++;
		str++;
	}

	offset = offset + leading + i;
	buffer[i] = 0;
	return i > 0;
}

// Assembly:
movslq (%rsi), %r8
xorl %eax, %eax
cmpb $0x0, (%rdi,%r8)
je 0x1f2d
addq %r8, %rdi
movb (%rdi), %r8b
testb %r8b, %r8b
je 0x1eae
leal -0x30(%r8), %r9d
cmpb $0xa, %r9b
jb 0x1eae
andb $-0x21, %r8b
addb $-0x41, %r8b
cmpb $0x1a, %r8b
jb 0x1eae
xorl %eax, %eax
movb 0x1(%rdi,%rax), %r8b
incq %rax
testb %r8b, %r8b
je 0x1eab
leal -0x30(%r8), %r9d
cmpb $0xa, %r9b
jb 0x1eab
andb $-0x21, %r8b
addb $-0x41, %r8b
cmpb $0x1a, %r8b
jae 0x1e86
addq %rax, %rdi
movb (%rdi), %r8b
movl %r8d, %r9d
andb $-0x21, %r9b
addb $-0x41, %r9b
cmpb $0x1a, %r9b
setae %r9b
leal -0x30(%r8), %r10d
cmpb $0xa, %r10b
setae %r10b
andb %r9b, %r10b
testl %ecx, %ecx
setle %r11b
xorl %r9d, %r9d
orb %r10b, %r11b
jne 0x1f1b
movl %ecx, %ecx
xorl %r9d, %r9d
movb %r8b, (%rdx,%r9)
movb 0x1(%rdi,%r9), %r8b
incq %r9
movl %r8d, %r10d
andb $-0x21, %r10b
addb $-0x41, %r10b
cmpb $0x1a, %r10b
setae %r10b
leal -0x30(%r8), %r11d
cmpb $0xa, %r11b
setae %r11b
testb %r10b, %r11b
jne 0x1f1b
cmpq %rcx, %r9
jb 0x1ee6
addl %r9d, %eax
addl %eax, (%rsi)
movl %r9d, %eax
movb $0x0, (%rdx,%rax)
testl %r9d, %r9d
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/ivanzamanov[P]kmeans/src/common/utils.cpp
// Function: readFullData(int, char**)
int readFullData(int fd, char** data) {
	const int BUFF_SIZE = 4096 * 1024;
	char* buffer = new char[BUFF_SIZE];
	int bytes = 1;
	bytes = read(fd, buffer, BUFF_SIZE);
	if(bytes >= 0)
		buffer[bytes] = 0;
	*data = buffer;
	return bytes;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movl $0x400000, %edi         # imm = 0x400000
callq 0x1030
movq %rax, %r14
movl $0x400000, %edx         # imm = 0x400000
movl %ebp, %edi
movq %rax, %rsi
callq 0x10b0
testl %eax, %eax
js 0x1f64
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movb $0x0, (%r14,%rcx)
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/./thirdparty/gsl-lite.hpp
// Function: gsl::span<char>::subspan(unsigned long, unsigned long) const
span subspan( index_type offset, index_type count ) const gsl_noexcept
    {
        Expects(
            0 <= offset && offset <= this->size() &&
            0 <= count  && count <= this->size() - offset );
        return span( this->data() + offset, count );
    }

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
subq %rsi, %rcx
jb 0x7a69
cmpq %rdx, %rcx
jb 0x7a69
testq %rdx, %rdx
sete %cl
testq %rax, %rax
setne %dil
orb %cl, %dil
je 0x7a69
addq %rsi, %rax
addq %rax, %rdx
popq %rcx
retq
callq 0x50e0
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/./thirdparty/gsl-lite.hpp
// Function: std::ostream& gsl::detail::write_to_stream<std::ostream, gsl::basic_string_span<char>>(std::ostream&, gsl::basic_string_span<char> const&)
gsl_api Stream & write_to_stream( Stream & os, Span const & spn )
{
    typename Stream::sentry sentry( os );

    if ( !os )
        return os;

    const std::streamsize length = narrow<std::streamsize>( spn.length() );

    // Whether, and how, to pad
    const bool pad = ( length < os.width() );
    const bool left_pad = pad && ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::right;

    if ( left_pad )
        write_padding( os, os.width() - length );

    // Write span characters
    os.rdbuf()->sputn( spn.begin(), length );

    if ( pad && !left_pad )
        write_padding( os, os.width() - length );

    // Reset output stream width
    os.width(0);

    return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x52f0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x7d98
movq 0x8(%r15), %r14
subq (%r15), %r14
js 0x7db0
movq 0x10(%rbx,%rax), %r12
movq %r12, %rsi
subq %r14, %rsi
jg 0x7d2b
xorl %ebp, %ebp
jmp 0x7d3e
movl $0xb0, %ecx
andl 0x18(%rbx,%rax), %ecx
cmpl $0x80, %ecx
sete %bpl
testb %bpl, %bpl
je 0x7d4b
movq %rbx, %rdi
callq 0x7dc8
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0xe8(%rbx,%rax), %rdi
movq (%r15), %rsi
movq (%rdi), %rax
movq %r14, %rdx
callq *0x60(%rax)
cmpq %r14, %r12
setle %al
orb %bpl, %al
jne 0x7d88
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0x10(%rbx,%rax), %rsi
subq %r14, %rsi
movq %rbx, %rdi
callq 0x7dc8
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x0, 0x10(%rbx,%rax)
movq %rsp, %rdi
callq 0x5720
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x50e0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5720
movq %rbx, %rdi
callq 0x56d0
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/call_faust.cpp
// Function: parse_cstrlit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, gsl::basic_string_span<char const>)
static bool parse_cstrlit(std::string &dst, const gsl::cstring_span src)
{
    size_t n = src.size();
    if (src.size() < 2 || src[0] != '"' || src[n - 1] != '"')
        return false;

    for (size_t i = 1; i < n - 1; ++i) {
        char c = src[i];
        if (c != '\\')
            dst.push_back(c);
        else {
            if (++i == n - 1)
                return false;
            c = src[i];
            switch (c) {
            case '0': dst.push_back('\0'); break;
            case 'a': dst.push_back('\a'); break;
            case 'b': dst.push_back('\b'); break;
            case 't': dst.push_back('\t'); break;
            case 'n': dst.push_back('\n'); break;
            case 'v': dst.push_back('\v'); break;
            case 'f': dst.push_back('\f'); break;
            case 'r': dst.push_back('\r'); break;
            default: dst.push_back(c); break;
            }
        }
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
subq %rsi, %rbx
cmpq $0x2, %rbx
jb 0x9b57
movq %rsi, %r14
cmpb $0x22, (%rsi)
jne 0x9b57
cmpb $0x22, -0x1(%r14,%rbx)
jne 0x9b57
cmpq $0x2, %rbx
sete %bpl
je 0x9b59
movq %rdi, %r15
leaq -0x1(%rbx), %r12
movl $0x1, %r13d
cmpq %r13, %rbx
jbe 0x9b6e
movb (%r14,%r13), %al
cmpb $0x5c, %al
jne 0x9b34
incq %r13
cmpq %r12, %r13
jne 0x9ad5
xorl %eax, %eax
jmp 0x9b41
cmpq %r13, %rbx
jbe 0x9b6e
movb (%r14,%r13), %al
movzbl %al, %ecx
cmpl $0x65, %ecx
jg 0x9afd
cmpl $0x30, %ecx
je 0x9b19
cmpl $0x61, %ecx
je 0x9b1d
cmpl $0x62, %ecx
jne 0x9b34
movb $0x8, %al
jmp 0x9b34
leal -0x6e(%rcx), %edx
cmpl $0x8, %edx
ja 0x9b21
leaq 0x256e0(%rip), %rsi     # 0x2f1ec
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movb $0xa, %al
jmp 0x9b34
xorl %eax, %eax
jmp 0x9b34
movb $0x7, %al
jmp 0x9b34
cmpl $0x66, %ecx
jne 0x9b34
movb $0xc, %al
jmp 0x9b34
movb $0xb, %al
jmp 0x9b34
movb $0xd, %al
jmp 0x9b34
movb $0x9, %al
movsbl %al, %esi
movq %r15, %rdi
callq 0x5310
movb $0x1, %al
testb %al, %al
je 0x9b59
incq %r13
cmpq %r12, %r13
setae %bpl
jb 0x9ab8
jmp 0x9b59
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x50e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: cstrlit[abi:cxx11](gsl::basic_string_span<char const>)
static const std::string cstrlit(gsl::cstring_span text)
{
    std::string lit;
    lit.push_back('u');
    lit.push_back('8');
    lit.push_back('"');

    for (char c : text) {
        switch (c) {
        case '\a': lit.push_back('\\'); lit.push_back('a'); break;
        case '\b': lit.push_back('\\'); lit.push_back('b'); break;
        case '\t': lit.push_back('\\'); lit.push_back('t'); break;
        case '\n': lit.push_back('\\'); lit.push_back('n'); break;
        case '\v': lit.push_back('\\'); lit.push_back('v'); break;
        case '\f': lit.push_back('\\'); lit.push_back('f'); break;
        case '\r': lit.push_back('\\'); lit.push_back('r'); break;
        case '"': case '\\': lit.push_back('\\'); lit.push_back(c); break;
        default: lit.push_back(c); break;
        }
    }

    lit.push_back('"');
    return lit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x75, %esi
callq 0x5310
movq %rbx, %rdi
movl $0x38, %esi
callq 0x5310
movq %rbx, %rdi
movl $0x22, %esi
callq 0x5310
cmpq %r14, %r15
je 0x19292
leaq 0x170f7(%rip), %r13     # 0x302c0
movb (%r15), %bpl
movzbl %bpl, %eax
leal -0x7(%rax), %ecx
cmpl $0x6, %ecx
ja 0x191f7
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x61, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
cmpl $0x22, %eax
je 0x19201
cmpl $0x5c, %eax
jne 0x1927a
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x76, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x74, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x6e, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x62, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x66, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
jmp 0x1927a
movb $0x72, %bpl
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x5310
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x5310
incq %r15
cmpq %r14, %r15
jne 0x191c9
movq %rbx, %rdi
movl $0x22, %esi
callq 0x5310
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x192b3
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x192ca
movq (%r12), %rsi
incq %rsi
callq 0x5380
movq %r14, %rdi
callq 0x56d0
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: Metadata::Widget::type_from_name(gsl::basic_string_span<char const>)
Metadata::Widget::Type Metadata::Widget::type_from_name(gsl::cstring_span name)
{
    Metadata::Widget::Type t = (Metadata::Widget::Type)-1;

    if (name == "button")
        t = Type::Button;
    else if (name == "checkbox")
        t = Type::CheckBox;
    else if (name == "vslider")
        t = Type::VSlider;
    else if (name == "hslider")
        t = Type::HSlider;
    else if (name == "nentry")
        t = Type::NEntry;
    else if (name == "vbargraph")
        t = Type::VBarGraph;
    else if (name == "hbargraph")
        t = Type::HBarGraph;

    return t;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x160e8(%rip), %rax     # 0x306c2
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a624
xorl %ebx, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x1609e(%rip), %rax     # 0x306c9
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a678
movl $0x1, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x16053(%rip), %rax     # 0x306d2
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a6cc
movl $0x2, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x16007(%rip), %rax     # 0x306da
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a720
movl $0x3, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x15fbb(%rip), %rax     # 0x306e2
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a76c
movl $0x4, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x15f76(%rip), %rax     # 0x306e9
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %rdx, %rcx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
subq %rdi, %rdx
subq %rax, %rcx
cmpq %rcx, %rdx
jne 0x1a7b8
movl $0x5, %ebx
cmpq %rdi, %rsi
je 0x1a7d1
movq %rax, %rsi
callq 0x53a0
testl %eax, %eax
je 0x1a7d1
leaq 0x15f34(%rip), %rsi     # 0x306f3
leaq 0x8(%rsp), %rdi
callq 0x1aa7d
movzbl %al, %ebx
decl %ebx
orl $0x6, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x1a7e3
jmp 0x1a7e3
jmp 0x1a7e3
jmp 0x1a7e3
jmp 0x1a7e3
movq %rax, %rdi
callq 0x75c6
nop
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: Metadata::Widget::scale_from_name(gsl::basic_string_span<char const>)
Metadata::Widget::Scale Metadata::Widget::scale_from_name(gsl::cstring_span name)
{
    Metadata::Widget::Scale s = (Metadata::Widget::Scale)-1;

    if (name == "log")
        s = Scale::Log;
    else if (name == "exp")
        s = Scale::Exp;

    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x15efd(%rip), %rax     # 0x306fd
movq %rsp, %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
movq %r14, %r15
subq %rbx, %r15
subq %rax, %rdx
cmpq %rdx, %r15
jne 0x1a83c
movl $0x1, %ebp
cmpq %rbx, %r14
je 0x1a885
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x53a0
testl %eax, %eax
je 0x1a885
leaq 0x15ebe(%rip), %rax     # 0x30701
movq %rsp, %rdi
movq %rax, (%rdi)
movq $-0x1, %rsi
callq 0x76fa
subq %rax, %rdx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %rdx, %r15
jne 0x1a885
cmpq %rbx, %r14
je 0x1a880
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x53a0
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
orl $0x2, %ebp
jmp 0x1a885
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a894
movq %rax, %rdi
callq 0x75c6
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: operator<<(std::ostream&, Metadata::Widget::Type)
std::ostream &operator<<(std::ostream &o, Metadata::Widget::Type t)
{
    switch (t) {
    case Metadata::Widget::Type::Button: return o << "button";
    case Metadata::Widget::Type::CheckBox: return o << "checkbox";
    case Metadata::Widget::Type::VSlider: return o << "vslider";
    case Metadata::Widget::Type::HSlider: return o << "hslider";
    case Metadata::Widget::Type::NEntry: return o << "nentry";
    case Metadata::Widget::Type::VBarGraph: return o << "vbargraph";
    case Metadata::Widget::Type::HBarGraph: return o << "hbargraph";
    }

    assert(false);
    return o;
}

// Assembly:
pushq %rbx
cmpl $0x6, %esi
ja 0x1a915
movq %rdi, %rbx
movl %esi, %eax
leaq 0x15a2e(%rip), %rcx     # 0x302dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x15e04(%rip), %rsi     # 0x306c2
jmp 0x1a8c7
leaq 0x15e1b(%rip), %rsi     # 0x306e2
movl $0x6, %edx
jmp 0x1a908
leaq 0x15dfd(%rip), %rsi     # 0x306d2
jmp 0x1a8de
leaq 0x15dfc(%rip), %rsi     # 0x306da
movl $0x7, %edx
jmp 0x1a908
leaq 0x15ddd(%rip), %rsi     # 0x306c9
movl $0x8, %edx
jmp 0x1a908
leaq 0x15def(%rip), %rsi     # 0x306e9
jmp 0x1a903
leaq 0x15df0(%rip), %rsi     # 0x306f3
movl $0x9, %edx
movq %rbx, %rdi
callq 0x53f0
movq %rbx, %rax
popq %rbx
retq
leaq 0x15de9(%rip), %rdi     # 0x30705
leaq 0x15de8(%rip), %rsi     # 0x3070b
leaq 0x15dee(%rip), %rcx     # 0x30718
movl $0x1b8, %edx            # imm = 0x1B8
callq 0x5260
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: operator<<(std::ostream&, Metadata::Widget::Scale)
std::ostream &operator<<(std::ostream &o, Metadata::Widget::Scale s)
{
    switch (s) {
    case Metadata::Widget::Scale::Linear: return o << "linear";
    case Metadata::Widget::Scale::Log: return o << "log";
    case Metadata::Widget::Scale::Exp: return o << "exp";
    }

    assert(false);
    return o;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x2, %esi
je 0x1a95d
cmpl $0x1, %esi
je 0x1a954
testl %esi, %esi
jne 0x1a976
leaq 0x15e0c(%rip), %rsi     # 0x30759
movl $0x6, %edx
jmp 0x1a969
leaq 0x15da2(%rip), %rsi     # 0x306fd
jmp 0x1a964
leaq 0x15d9d(%rip), %rsi     # 0x30701
movl $0x3, %edx
movq %rbx, %rdi
callq 0x53f0
movq %rbx, %rax
popq %rbx
retq
leaq 0x15d88(%rip), %rdi     # 0x30705
leaq 0x15d87(%rip), %rsi     # 0x3070b
leaq 0x15dd5(%rip), %rcx     # 0x30760
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x5260
// File: /workspace/github_cpp_makefile_star2_O1/jpcima[P]faustmd/metadata.cpp
// Function: mangle[abi:cxx11](gsl::basic_string_span<char const>)
static const std::string mangle(gsl::cstring_span name)
{
    std::string id;
    size_t n = name.size();
    id.reserve(n);

    for (size_t i = 0; i < n; ++i) {
        char c = name[i];
        bool al = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
        bool num = c >= '0' && c <= '9';
        c = (!al && (!num || i == 0)) ? '_' : c;
        id.push_back(c);
    }

    return id;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rdx, %r15
subq %rsi, %r15
movq %r15, %rsi
callq 0x55f0
cmpq %r14, %r12
je 0x1aa13
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %r12d, %r12d
movb (%r14,%r12), %al
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x1a, %cl
jb 0x1a9fe
leal -0x3a(%rax), %ecx
cmpb $-0xa, %cl
setb %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
movb $0x5f, %cl
jne 0x1aa00
movl %eax, %ecx
movsbl %cl, %esi
movq %rbx, %rdi
callq 0x5310
incq %r12
cmpq %r12, %r15
jne 0x1a9d8
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x1aa22
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x1aa39
movq (%r13), %rsi
incq %rsi
callq 0x5380
movq %r14, %rdi
callq 0x56d0
nop