LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/httpd.cpp
// Function: bad_request(int)
void bad_request(int client)
{
	char buf[1024];
//发送400
	sprintf(buf, "HTTP/1.0 400 BAD REQUEST\r\n");
	send(client, buf, sizeof(buf), 0);
	sprintf(buf, "Content-type: text/html\r\n");
	send(client, buf, sizeof(buf), 0);
	sprintf(buf, "\r\n");
	send(client, buf, sizeof(buf), 0);
	sprintf(buf, "<P>Your browser sent a bad request, ");
	send(client, buf, sizeof(buf), 0);
	sprintf(buf, "such as a POST without a Content-Length.\r\n");
	send(client, buf, sizeof(buf), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %edi, %ebx
movups 0x2d33(%rip), %xmm0     # 0x703d
leaq -0x410(%rbp), %r14
movups %xmm0, 0xb(%r14)
movups 0x2d15(%rip), %xmm0     # 0x7032
movaps %xmm0, (%r14)
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x31b0
movups 0x2d16(%rip), %xmm0     # 0x704d
movaps %xmm0, (%r14)
movups 0x2d15(%rip), %xmm0     # 0x7057
movups %xmm0, 0xa(%r14)
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x31b0
movw $0xa0d, (%r14)          # imm = 0xA0D
movb $0x0, 0x2(%r14)
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x31b0
movabsq $0x202c7473657571, %rax # imm = 0x202C7473657571
movq %rax, 0x1d(%r14)
movups 0x2cde(%rip), %xmm0     # 0x7067
movaps %xmm0, (%r14)
movups 0x2ce3(%rip), %xmm0     # 0x7077
movaps %xmm0, 0x10(%r14)
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x31b0
movups 0x2cdb(%rip), %xmm0     # 0x708c
movaps %xmm0, (%r14)
movups 0x2ce0(%rip), %xmm0     # 0x709c
movaps %xmm0, 0x10(%r14)
movups 0x2cdf(%rip), %xmm0     # 0x70a7
movups %xmm0, 0x1b(%r14)
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x31b0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/httpd.cpp
// Function: cat(int, _IO_FILE*)
void cat(int client, FILE *resource)
{
//发送文件的内容
	char buf[1024];
//读取文件到buf中
	fgets(buf, sizeof(buf), resource);
	while (!feof(resource))//判断文件是否读取到末尾
	{
 //读取并发送文件内容
		send(client, buf, strlen(buf), 0);
		fgets(buf, sizeof(buf), resource);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x420(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdx
callq 0x34b0
movq %rbx, %rdi
callq 0x3490
testl %eax, %eax
jne 0x445b
leaq -0x420(%rbp), %r15
movq %r15, %rdi
callq 0x3150
movl %r14d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdx
callq 0x34b0
movq %rbx, %rdi
callq 0x3490
testl %eax, %eax
je 0x4427
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/httpd.cpp
// Function: cannot_execute(int)
void cannot_execute(int client)
{
	char buf[1024];
//发送500
	sprintf(buf, "HTTP/1.0 500 Internal Server Error\r\n");
	send(client, buf, strlen(buf), 0);
	sprintf(buf, "Content-type: text/html\r\n");
	send(client, buf, strlen(buf), 0);
	sprintf(buf, "\r\n");
	send(client, buf, strlen(buf), 0);
	sprintf(buf, "<P>Error prohibited CGI execution.\r\n");
	send(client, buf, strlen(buf), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %edi, %ebx
movups 0x2c47(%rip), %xmm0     # 0x70c7
leaq -0x410(%rbp), %r14
movaps %xmm0, 0x10(%r14)
movups 0x2c24(%rip), %xmm0     # 0x70b7
movaps %xmm0, (%r14)
movabsq $0xa0d726f727245, %rax  # imm = 0xA0D726F727245
movq %rax, 0x1d(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movups 0x2b8a(%rip), %xmm0     # 0x704d
movaps %xmm0, (%r14)
movups 0x2b89(%rip), %xmm0     # 0x7057
movups %xmm0, 0xa(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movw $0xa0d, (%r14)          # imm = 0xA0D
movb $0x0, 0x2(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movabsq $0xa0d2e6e6f6974, %rax  # imm = 0xA0D2E6E6F6974
movq %rax, 0x1d(%r14)
movups 0x2bbb(%rip), %xmm0     # 0x70dc
movaps %xmm0, (%r14)
movups 0x2bc0(%rip), %xmm0     # 0x70ec
movaps %xmm0, 0x10(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/httpd.cpp
// Function: headers(int, char const*)
void headers(int client, const char *filename)
{
	char buf[1024];
	(void)filename;  /* could use filename to determine file type */
//发送HTTP头
	strcpy(buf, "HTTP/1.0 200 OK\r\n");
	send(client, buf, strlen(buf), 0);
	strcpy(buf, SERVER_STRING);
	send(client, buf, strlen(buf), 0);
	sprintf(buf, "Content-Type: text/html\r\n");
	send(client, buf, strlen(buf), 0);
	strcpy(buf, "\r\n");
	send(client, buf, strlen(buf), 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %edi, %ebx
movups 0x2b93(%rip), %xmm0     # 0x7111
leaq -0x410(%rbp), %r14
movaps %xmm0, (%r14)
movw $0xa, 0x10(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movups 0x2ba9(%rip), %xmm0     # 0x7157
movaps %xmm0, (%r14)
movups 0x2ba7(%rip), %xmm0     # 0x7160
movups %xmm0, 0x9(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movups 0x2b94(%rip), %xmm0     # 0x7170
movaps %xmm0, (%r14)
movups 0x2b93(%rip), %xmm0     # 0x717a
movups %xmm0, 0xa(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
movw $0xa0d, (%r14)          # imm = 0xA0D
movb $0x0, 0x2(%r14)
movq %r14, %rdi
callq 0x3150
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x31b0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/httpd.cpp
// Function: startup(unsigned short*)
int startup(u_short *port)
{

//服务器处理步骤
/*
第一步：创建端口号，使用函数int socketid = socket(family, type, protocol);;
第二步：将地址结构体绑定在端口号上，使用函数int bind(int fd, const struct sockaddr *, socklen_t);
第三步：循环监听客户端请求，使用函数listen(sockfd, 5);（第一个参数是 socket 描述符，第二个参数是最大连接数）

第四步：接受客户端的请求，new_socket = accept(socket_desc, (struct sockaddr *)&client, (socklen_t*)&c);
第五步：使用read()/write()进行数据交换
第六步：关闭连接，使用close(socketid);
*/


//客户端处理步骤
/*
第一步：创建端口号，使用函数int socketid = socket(family, type, protocol);
第二步：将地址结构体绑定在端口号上，使用函数int bind(int fd, const struct sockaddr *, socklen_t);
第三步：请求连接，使用函数int connect(int socket, const struct sockaddr* address, size_t address_len)；

第四步：使用read()/write()进行数据交换；
第五步：关闭连接，使用close(socketid);
*/
	int httpd = 0;
	struct sockaddr_in name;
//设置http socket
	httpd = socket(PF_INET, SOCK_STREAM, 0);
	if (httpd == -1)
		error_die("socket");
	memset(&name, 0, sizeof(name));

 //创建地址结构体struct sockaddr_in，主要包含地址和端口号
	name.sin_family = AF_INET;
	name.sin_port = htons(*port);
	name.sin_addr.s_addr = htonl(INADDR_ANY);


 //绑定端口
	if (bind(httpd, (struct sockaddr *)&name, sizeof(name)) < 0)
		error_die("bind");
	if (*port == 0)  /*动态分配一个端口 */
	{
		socklen_t  namelen = sizeof(name);
		if (getsockname(httpd, (struct sockaddr *)&name, &namelen) == -1)
			error_die("getsockname");
		*port = ntohs(name.sin_port);
	}
 //监听连接
	if (listen(httpd, 5) < 0)
		error_die("listen");
	return(httpd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3090
cmpl $-0x1, %eax
je 0x46d1
movl %eax, %ebx
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
movaps %xmm0, (%rsi)
movw $0x2, (%rsi)
movzwl (%r14), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rsi)
movl $0x0, 0x4(%rsi)
movl %ebx, %edi
movl $0x10, %edx
callq 0x3060
testl %eax, %eax
js 0x46d6
cmpw $0x0, (%r14)
jne 0x46b6
leaq -0x14(%rbp), %rdx
movl $0x10, (%rdx)
leaq -0x30(%rbp), %rsi
movl %ebx, %edi
callq 0x32f0
cmpl $-0x1, %eax
je 0x46e0
movzwl -0x2e(%rbp), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movl %ebx, %edi
movl $0x5, %esi
callq 0x3390
testl %eax, %eax
js 0x46db
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x35f4
callq 0x35dc
callq 0x35ac
callq 0x35c4
// File: /workspace/github_cpp_makefile_star2_O1/fltflt[P]Tinyhttpd_with_threadpool_epoll/./ThreadPool.h
// Function: std::future<std::result_of<void* (& (void*))(void*)>::type> ThreadPool::enqueue<void* (&)(void*), void*>(void* (&)(void*), void*&&)
auto ThreadPool::enqueue(F&& f, Args&&... args) 
    -> std::future<typename std::result_of<F(Args...)>::type>
{
    using return_type = typename std::result_of<F(Args...)>::type;

    auto task = std::make_shared< std::packaged_task<return_type()> >(
            std::bind(std::forward<F>(f), std::forward<Args>(args)...)
        );
        
    std::future<return_type> res = task->get_future();
    {
        std::unique_lock<std::mutex> lock(queue_mutex);

        // don't allow enqueueing after stopping the pool
        if(stop)
            throw std::runtime_error("enqueue on stopped ThreadPool");

        tasks.emplace([task](){ (*task)(); });
    }
    condition.notify_one();
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %rax
movq %rdx, (%rax)
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
leaq -0x30(%rbp), %rdi
movq $0x0, -0x8(%rdi)
leaq -0x38(%rbp), %r15
leaq -0x28(%rbp), %rdx
movq %r15, %rsi
movq %rax, %rcx
callq 0x558e
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x551c
leaq 0x68(%r14), %rax
leaq -0x48(%rbp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x51b0
movb $0x1, -0x40(%rbp)
cmpb $0x1, 0xc0(%r14)
je 0x4b3a
leaq 0x18(%r14), %rdi
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x4aef
movq 0x64d7(%rip), %rcx      # 0xafb8
cmpb $0x0, (%rcx)
je 0x4aeb
incl 0x8(%rax)
jmp 0x4aef
lock
incl 0x8(%rax)
leaq -0x28(%rbp), %rsi
callq 0x6440
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x4b06
callq 0x54b0
leaq -0x48(%rbp), %rdi
callq 0x5196
addq $0x90, %r14
movq %r14, %rdi
callq 0x31a0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4b2c
callq 0x54b0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3190
movq %rax, %r15
leaq 0x284a(%rip), %rsi      # 0x7398
movq %rax, %rdi
callq 0x3130
movq 0x6493(%rip), %rsi      # 0xaff0
movq 0x6444(%rip), %rdx      # 0xafa8
movq %r15, %rdi
callq 0x3520
movq %rax, %r14
jmp 0x4b8f
movq %rax, %r14
movq %r15, %rdi
callq 0x3220
jmp 0x4b8f
movq %rax, %r14
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0x4b8f
callq 0x54b0
leaq -0x48(%rbp), %rdi
callq 0x5196
jmp 0x4b9d
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4bb0
callq 0x54b0
jmp 0x4bb0
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x4bbe
callq 0x54b0
movq %r14, %rdi
callq 0x3530
// File: /workspace/github_cpp_makefile_star2_O1/111116[P]console/example.cpp
// Function: main
int main()
{
	console.log("Here prints a log");
	console.info("Here prints an info.");
	console.warn("Here prints a warning!");
	console.error("Here prints an error!!");
	console.log("multiple variables",1,2,3);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x2ccc(%rip), %rbx      # 0x40c8
leaq 0xc01(%rip), %rsi       # 0x2004
movq %rbx, %rdi
callq 0x14ce
leaq 0xc04(%rip), %rsi       # 0x2016
movq %rbx, %rdi
callq 0x153a
leaq 0xc0a(%rip), %rsi       # 0x202b
movq %rbx, %rdi
callq 0x15d8
leaq 0xc12(%rip), %rsi       # 0x2042
movq %rbx, %rdi
callq 0x1676
leaq -0x14(%rbp), %rdx
movl $0x1, (%rdx)
leaq -0x10(%rbp), %rcx
movl $0x2, (%rcx)
leaq -0xc(%rbp), %r8
movl $0x3, (%r8)
leaq 0xbfb(%rip), %rsi       # 0x2059
movq %rbx, %rdi
callq 0x1714
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./utils.h
// Function: getopt(int, char* const*, char const*, char*&)
char getopt(int argc, char * const argv[], char const *optstr, char *&optarg) {
    static int optind = 1;
    if (optind >= argc || *argv[optind] != '-')
        return -1;
    auto opt = *(argv[optind++] + 1);
    auto p = strchr(optstr, opt);
    if (!p)
        return '?';
    if (p[1] == ':') {
        if (optind >= argc)
            return ':';
        optarg = argv[optind++];
    }
    return opt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x5d32(%rip), %r15      # 0x81b0
movb $-0x1, %al
cmpl %edi, %r15d
jge 0x24dc
movq %rcx, %rbx
movq %rsi, %r14
movq (%rsi,%r15,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x24dc
movl %edi, %ebp
leal 0x1(%r15), %r13d
movl %r13d, 0x5d0f(%rip)     # 0x81b0
movb 0x1(%rcx), %r12b
movsbl %r12b, %esi
movq %rdx, %rdi
callq 0x20d0
testq %rax, %rax
je 0x24da
cmpb $0x3a, 0x1(%rax)
jne 0x24d5
movb $0x3a, %al
cmpl %ebp, %r13d
jge 0x24dc
leal 0x2(%r15), %eax
movl %eax, 0x5ce3(%rip)      # 0x81b0
movq 0x8(%r14,%r15,8), %rax
movq %rax, (%rbx)
movl %r12d, %eax
jmp 0x24dc
movb $0x3f, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/implementations.cpp
// Function: main
int main(int argc, char * const argv[]) {
#if defined imdb
    int clauses = 3200, threshold = 12, epochs = 35;
    double p = .012, gamma = .0006;
    std::string const experiment = "imdb";
#elif defined connect4
    int clauses = 200, threshold = 12, epochs = 200;
    double p = .037, gamma = .0001;
    std::string const experiment = "con4";
#else // default: mnist
    int clauses = 500, threshold = 25, epochs = 400;
    double p = .085, gamma = .0025;
    std::string const experiment = "mnist";
#endif

    bool shuffle = false, resume = false, write = false;
    update(argc, argv, clauses, p, threshold, gamma, epochs, shuffle, write, resume);
    fit(experiment, clauses, p, gamma, threshold, epochs, shuffle, write, resume);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbp
movl %edi, %r12d
leaq 0x14(%rsp), %rax
movl $0x1f4, (%rax)          # imm = 0x1F4
leaq 0x10(%rsp), %rax
movl $0x19, (%rax)
leaq 0xc(%rsp), %rax
movl $0x190, (%rax)          # imm = 0x190
movabsq $0x3fb5c28f5c28f5c3, %rax # imm = 0x3FB5C28F5C28F5C3
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movabsq $0x3f647ae147ae147b, %rax # imm = 0x3F647AE147AE147B
leaq 0x40(%rsp), %r13
movq %rax, (%r13)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1e0a(%rip), %rsi      # 0x5289
leaq 0x1e08(%rip), %rdx      # 0x528e
leaq 0x20(%rsp), %rdi
callq 0x489e
xorl %eax, %eax
leaq 0xb(%rsp), %rbx
movb %al, (%rbx)
leaq 0xa(%rsp), %r14
movb %al, (%r14)
leaq 0x9(%rsp), %r15
movb %al, (%r15)
movl %r12d, %edi
movq %rbp, %rsi
leaq 0x14(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r13, %r9
pushq %r14
pushq %r15
pushq %rbx
leaq 0x24(%rsp), %rax
pushq %rax
callq 0x24eb
addq $0x20, %rsp
leaq 0x14(%rsp), %rax
movl (%rax), %esi
leaq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd (%r13), %xmm1
leaq 0x10(%rsp), %rax
movl (%rax), %edx
leaq 0xc(%rsp), %rax
movl (%rax), %ecx
movzbl (%rbx), %r8d
movzbl (%r15), %r9d
movzbl (%r14), %eax
subq $0x8, %rsp
leaq 0x28(%rsp), %rdi
pushq %rax
callq 0x2fca
addq $0x10, %rsp
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x352c
callq 0x21b0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3554
callq 0x21b0
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::multiweightm(std::istream&)
explicit multiweightm(std::istream &is)
    : epoch{get<int>(is)},
    classes{get<int>(is)},
    machine{classes} {
        for (int c = 0; c < classes; ++c)
            new (&machine(c)) weightm(is);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movl $0x4, %edx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r15), %eax
movl %eax, (%rbx)
leaq 0x4(%rsp), %r15
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movslq (%r15), %rax
movl %eax, 0x4(%rbx)
movl %eax, 0x8(%rbx)
imulq $0x70, %rax, %rdi
callq 0x2030
movq %rax, 0x10(%rbx)
cmpl $0x0, 0x4(%rbx)
jle 0x36cc
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rdi
addq %r15, %rdi
movq %r14, %rsi
callq 0x3a4a
incq %r12
movslq 0x4(%rbx), %rax
addq $0x70, %r15
cmpq %rax, %r12
jl 0x36ad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x36e9
callq 0x2230
movq %r14, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::multiweightm(int, int, int, double, double, int, int)
multiweightm(int classes, int features, int clauses, double p, double gamma, int threshold, int state_bits = 8)
    : epoch{0},
    classes{classes},
    machine{classes} {
        while (classes--)
            new (&machine(classes)) weightm(features, clauses, p, gamma, threshold, state_bits);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %r14
movl $0x0, (%rdi)
movl %esi, 0x4(%rdi)
movl %esi, 0x8(%rdi)
movslq %esi, %rbx
imulq $0x70, %rbx, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
incq %rbx
addq $-0x70, %r13
decq %rbx
je 0x3778
leaq -0x70(%r13), %rbp
addq 0x10(%r14), %r13
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movl (%rsp), %ecx
movl 0x4(%rsp), %r8d
callq 0x3cbe
movq %rbp, %r13
jmp 0x3744
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3798
callq 0x2230
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::fit(array2d<unsigned int>&, array1d<int>&, int, bool)
void fit(array2d<word> &x, array1d<int> &y, int epochs, bool mix = false) {
        array1d<int> idx{x.rows};
        // no need to serialize
        for (int i = 0; i < idx.columns; ++i)
            idx(i) = i;
        while (epochs--) {
            if (mix)
                shuffle(idx);
            for (int i = 0; i < x.rows; ++i)
                train(x(idx(i)), y(idx(i)));
            ++epoch;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0xc(%rsp)
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movslq (%rsi), %rbp
leaq (,%rbp,4), %rdi
callq 0x2030
movq %rax, %r13
movq %rbp, 0x10(%rsp)
testq %rbp, %rbp
jle 0x3872
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %eax
andl $-0x2, %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x1871(%rip), %xmm1     # 0x5070
xorl %ecx, %ecx
movdqa 0x1877(%rip), %xmm2     # 0x5080
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1877(%rip), %xmm4     # 0x5090
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %edx
notl %edx
testb $0x1, %dl
je 0x384f
movl %ecx, (%r13,%rcx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x3865
leal 0x1(%rcx), %edx
movl %edx, 0x4(%r13,%rcx,4)
addq $0x2, %rcx
paddq %xmm4, %xmm1
cmpq %rcx, %rax
jne 0x3819
testl %ebx, %ebx
je 0x3942
cmpl $0x0, 0x10(%rsp)
setne %al
andb 0xc(%rsp), %al
movb %al, 0xb(%rsp)
movabsq $0x5851f42d4c957f2d, %rbp # imm = 0x5851F42D4C957F2D
movl %ebx, 0xc(%rsp)
cmpb $0x0, 0xb(%rsp)
je 0x38f9
movq 0x4912(%rip), %rax      # 0x81b8
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
movq %rax, %rcx
movl %esi, %edi
imulq %rbp, %rax
movq %rcx, %r8
shrq $0x16, %r8
xorq %rcx, %r8
shrq $0x3d, %rcx
addb $0x16, %cl
shrq %cl, %r8
movl %r8d, %ecx
imulq %rdi, %rcx
sarq $0x20, %rcx
movl -0x4(%r13,%rsi,4), %edi
movl (%r13,%rcx,4), %r8d
movl %r8d, -0x4(%r13,%rsi,4)
movl %edi, (%r13,%rcx,4)
decq %rdx
movq %rdx, %rsi
jne 0x38ae
movq %rax, 0x48bf(%rip)      # 0x81b8
cmpl $0x0, (%r15)
jle 0x3930
xorl %ebx, %ebx
movslq (%r13,%rbx,4), %rax
movslq 0x4(%r15), %rsi
imulq %rax, %rsi
shlq $0x2, %rsi
addq 0x8(%r15), %rsi
movq 0x8(%r14), %rcx
movl (%rcx,%rax,4), %edx
movq %r12, %rdi
callq 0x3efc
incq %rbx
movslq (%r15), %rax
cmpq %rax, %rbx
jl 0x3901
movl 0xc(%rsp), %ebx
decl %ebx
incl (%r12)
testl %ebx, %ebx
jne 0x3894
movq %r13, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2230
movq %rax, %rbx
movq %r13, %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::evaluate(array2d<unsigned int>&, array1d<int>&)
double evaluate(array2d<word> &x, array1d<int> &y) {
        int correct = 0;
        for (int i = 0; i < x.rows; ++i)
            correct += predict(x(i)) == y(i);
        return (double) correct / x.rows;
    }

// Assembly:
movl (%rsi), %eax
testl %eax, %eax
jle 0x39cb
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq 0x4(%r14), %rax
movslq %r12d, %rsi
imulq %rax, %rsi
shlq $0x2, %rsi
addq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x46a2
movq 0x8(%rbx), %rcx
xorl %edx, %edx
cmpl (%rcx,%r12,4), %eax
sete %dl
addl %edx, %ebp
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x3988
cvtsi2sd %ebp, %xmm0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x39cf
xorpd %xmm0, %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::serialize(std::ostream&)
void serialize(std::ostream &os) {
        put(os, epoch);
        put(os, classes);
        for (int c = 0; c < classes; ++c)
            machine(c).serialize(os);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2240
movl 0x4(%r14), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2240
cmpl $0x0, 0x4(%r14)
jle 0x3a3e
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%r14), %rdi
addq %r15, %rdi
movq %rbx, %rsi
callq 0x471e
incq %r12
movslq 0x4(%r14), %rax
addq $0x70, %r15
cmpq %rax, %r12
jl 0x3a1f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::train(unsigned int*, int)
void train(word *x, int y) {
        int zero = fastrandrange(classes - 1), one = y;
        zero += zero >= one;
        machine(zero).train(x, 0);
        machine(one).train(x, 1);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %eax
decl %eax
movq 0x42a4(%rip), %rcx      # 0x81b8
movabsq $0x5851f42d4c957f2d, %rdx # imm = 0x5851F42D4C957F2D
imulq %rcx, %rdx
movq %rcx, %rsi
shrq $0x16, %rsi
xorq %rcx, %rsi
shrq $0x3d, %rcx
addb $0x16, %cl
shrq %cl, %rsi
movq %rdx, 0x427b(%rip)      # 0x81b8
movl %esi, %ecx
imulq %rax, %rcx
shrq $0x20, %rcx
xorl %eax, %eax
cmpl %ebp, %ecx
setge %al
addl %ecx, %eax
cltq
imulq $0x70, %rax, %rdi
addq 0x10(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3f80
movslq %ebp, %rax
imulq $0x70, %rax, %rdi
addq 0x10(%r14), %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x3f80
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::train(unsigned int const*, int)
void train(word const *x, int y) {
        double const diversion = .5 + (.5 - y) * infer(x, true) / threshold;
        for (int c = 0; c < clauses; ++c)
            if (fastrandom() < diversion)
                y != (c & 1)? setter(c, x): clearer(c, x);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edx
callq 0x406a
cmpl $0x0, 0x4(%r15)
jle 0x405c
cvtsi2sd %ebx, %xmm1
movsd 0x112b(%rip), %xmm2     # 0x50e0
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsi2sdl 0x18(%r15), %xmm0
divsd %xmm0, %xmm3
addsd %xmm2, %xmm3
xorl %ebp, %ebp
movabsq $0x5851f42d4c957f2d, %r12 # imm = 0x5851F42D4C957F2D
movsd 0x1102(%rip), %xmm1     # 0x50e8
movsd %xmm3, 0x8(%rsp)
movq 0x41c5(%rip), %rcx      # 0x81b8
movq %rcx, %rax
movq %rcx, %rdx
shrq $0x16, %rdx
xorq %rcx, %rdx
shrq $0x3d, %rcx
addb $0x16, %cl
shrq %cl, %rdx
imulq %r12, %rax
movl %edx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movq %rax, 0x4199(%rip)      # 0x81b8
mulsd %xmm1, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x4054
movl %ebp, %eax
andl $0x1, %eax
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
cmpl %ebx, %eax
jne 0x4041
callq 0x41e6
jmp 0x4046
callq 0x40dc
movsd 0x8(%rsp), %xmm3
movsd 0x1094(%rip), %xmm1     # 0x50e8
incl %ebp
cmpl 0x4(%r15), %ebp
jl 0x3fec
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::infer(unsigned int const*, bool)
double infer(word const *x, bool training = false) {
        double inference = 0;
        for (int c = 0; c < clauses; ++c)
            if (value(c, x, training))
                inference += weight(c);
        return inference;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x4(%rdi)
jle 0x40c2
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
movzbl %dl, %ebp
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x427a
testl %eax, %eax
je 0x40b4
movq 0x68(%r14), %rax
movsd (%rsp), %xmm0
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rsp)
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x408c
jmp 0x40cb
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::setter(int, unsigned int const*)
void setter(int c, word const *x) {
        literal_mask();
        if (clause(c)) {
            weight(c) *= 1 + gamma;
            for (int l = 0; l < literals; ++l) {
                add(state(c, l), x[l]);
                subtract(state(c, l), lmask(l) & ~x[l]);
            }
        }
        else
            for (int l = 0; l < literals; ++l)
                subtract(state(c, l), lmask(l));
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
callq 0x4334
movq 0x58(%r14), %rcx
movslq %ebx, %rax
cmpl $0x0, (%rcx,%rax,4)
je 0x4196
movsd 0x10(%r14), %xmm0
addsd 0xfe0(%rip), %xmm0      # 0x50f0
movq 0x68(%r14), %rcx
mulsd (%rcx,%rax,8), %xmm0
movsd %xmm0, (%rcx,%rax,8)
cmpl $0x0, 0x20(%r14)
jle 0x41d9
xorl %r12d, %r12d
movl 0x2c(%r14), %eax
imull %ebx, %eax
addl %r12d, %eax
movslq 0x30(%r14), %rcx
movslq %eax, %rsi
imulq %rcx, %rsi
shlq $0x2, %rsi
addq 0x38(%r14), %rsi
movl (%r15,%r12,4), %edx
movq %r14, %rdi
callq 0x45f4
movl 0x2c(%r14), %eax
imull %ebx, %eax
addl %r12d, %eax
movslq 0x30(%r14), %rcx
movslq %eax, %rsi
imulq %rcx, %rsi
shlq $0x2, %rsi
addq 0x38(%r14), %rsi
movq 0x48(%r14), %rax
movl (%r15,%r12,4), %edx
notl %edx
andl (%rax,%r12,4), %edx
movq %r14, %rdi
callq 0x464a
incq %r12
movslq 0x20(%r14), %rax
cmpq %rax, %r12
jl 0x412c
jmp 0x41d9
cmpl $0x0, 0x20(%r14)
jle 0x41d9
xorl %r15d, %r15d
movl 0x2c(%r14), %eax
imull %ebx, %eax
addl %r15d, %eax
movslq 0x30(%r14), %rcx
movslq %eax, %rsi
imulq %rcx, %rsi
shlq $0x2, %rsi
addq 0x38(%r14), %rsi
movq 0x48(%r14), %rax
movl (%rax,%r15,4), %edx
movq %r14, %rdi
callq 0x464a
incq %r15
movslq 0x20(%r14), %rax
cmpq %rax, %r15
jl 0x41a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::value(int, unsigned int const*, bool)
int value(int c, word const *x, bool training = false) {
        word active = 0;
        state(c, literals, -1) &= actmask; // == state(c, literals - 1, states - 1)
        for (int l = 0; l < literals; ++l) {
            auto s = state(c, l, states - 1); // bit (states - 1) is the action bit of the automata
            if ((s & x[l]) != s)
                return clause(c) = 0;
            active |= s;
        }
        return clause(c) = training || active;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x24(%rdi), %eax
movslq 0x20(%rdi), %r10
movq 0x38(%rdi), %r9
movslq 0x2c(%rdi), %r11
movslq %esi, %r8
imulq %r8, %r11
addq %r10, %r11
movslq 0x30(%rdi), %r10
imulq %r11, %r10
andl %eax, -0x4(%r9,%r10,4)
xorl %eax, %eax
cmpl $0x0, 0x20(%rdi)
setg %r10b
jle 0x4313
movq 0x58(%rdi), %r11
xorl %ebx, %ebx
xorl %ebp, %ebp
movslq 0x1c(%rdi), %r14
movl 0x2c(%rdi), %r15d
imull %esi, %r15d
addl %ebx, %r15d
movslq 0x30(%rdi), %r12
movslq %r15d, %r15
imulq %r12, %r15
addq %r14, %r15
movl -0x4(%r9,%r15,4), %r14d
movl (%rdx,%rbx,4), %r15d
andl %r14d, %r15d
cmpl %r14d, %r15d
jne 0x42ef
orl %r14d, %ebp
jmp 0x42f7
movl $0x0, (%r11,%r8,4)
cmpl %r14d, %r15d
jne 0x430c
incq %rbx
movslq 0x20(%rdi), %r10
cmpq %r10, %rbx
setl %r10b
jl 0x42bc
testl %ebp, %ebp
setne %dl
jmp 0x4315
xorl %edx, %edx
testb $0x1, %r10b
jne 0x432b
orb %dl, %cl
movzbl %cl, %eax
andl $0x1, %eax
movq 0x58(%rdi), %rcx
movl %eax, (%rcx,%r8,4)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::add(unsigned int*, unsigned int)
void add(word *state_word, word addend) {
        for (int b = 0; addend && b < states; ++b) {
            state_word[b] ^= addend;
            addend &= state_word[b] ^ addend;
        }
        if (addend)
            for (int b = 0; b < states; ++b)
                state_word[b] ^= addend;
    }

// Assembly:
testl %edx, %edx
setne %al
je 0x462e
cmpl $0x0, 0x1c(%rdi)
jle 0x462e
movl $0x1, %ecx
movl %edx, %eax
movl -0x4(%rsi,%rcx,4), %edx
movl %edx, %r8d
xorl %eax, %r8d
movl %r8d, -0x4(%rsi,%rcx,4)
andl %eax, %edx
setne %al
je 0x462e
leaq 0x1(%rcx), %r8
movslq 0x1c(%rdi), %r9
cmpq %r9, %rcx
movq %r8, %rcx
jl 0x4606
testb %al, %al
je 0x4649
cmpl $0x0, 0x1c(%rdi)
jle 0x4649
xorl %eax, %eax
xorl %edx, (%rsi,%rax,4)
incq %rax
movslq 0x1c(%rdi), %rcx
cmpq %rcx, %rax
jl 0x463a
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::subtract(unsigned int*, unsigned int)
void subtract(word *state_word, word subtrahend) {
        for (int b = 0; subtrahend && b < states; ++b) {
            state_word[b] ^= subtrahend;
            subtrahend &= ~(state_word[b] ^ subtrahend);
        }
        if (subtrahend)
            for (int b = 0; b < states; ++b)
                state_word[b] ^= subtrahend;
    }

// Assembly:
testl %edx, %edx
setne %al
je 0x4686
cmpl $0x0, 0x1c(%rdi)
jle 0x4686
movl $0x1, %ecx
movl %edx, %eax
movl -0x4(%rsi,%rcx,4), %edx
movl %edx, %r8d
xorl %eax, %r8d
movl %r8d, -0x4(%rsi,%rcx,4)
notl %edx
andl %eax, %edx
setne %al
je 0x4686
leaq 0x1(%rcx), %r8
movslq 0x1c(%rdi), %r9
cmpq %r9, %rcx
movq %r8, %rcx
jl 0x465c
testb %al, %al
je 0x46a1
cmpl $0x0, 0x1c(%rdi)
jle 0x46a1
xorl %eax, %eax
xorl %edx, (%rsi,%rax,4)
incq %rax
movslq 0x1c(%rdi), %rcx
cmpq %rcx, %rax
jl 0x4692
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./multiweightm.h
// Function: multiweightm::predict(unsigned int*)
int predict(word *input) {
        int mxi = 0;
        double mxv = machine(0).infer(input), v;
        for (int m = 1; m < classes; ++m)
            if (mxv < (v = machine(m).infer(input))) {
                mxv = v;
                mxi = m;
            }
        return mxi;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
xorl %ebp, %ebp
xorl %edx, %edx
callq 0x406a
cmpl $0x2, 0x4(%r14)
jl 0x470f
xorl %ebp, %ebp
movl $0x1, %r15d
movl $0x70, %r12d
movsd %xmm0, 0x8(%rsp)
movq 0x10(%r14), %rdi
addq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x406a
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
maxsd %xmm1, %xmm0
cmoval %r15d, %ebp
incq %r15
movslq 0x4(%r14), %rax
addq $0x70, %r12
cmpq %rax, %r15
jl 0x46d6
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/adrianphoulady[P]weighted-tsetlin-machine-cpp/./weightm.h
// Function: weightm::serialize(std::ostream&)
void serialize(std::ostream &os) {
        put(os, features);
        put(os, clauses);
        put(os, p);
        put(os, gamma);
        put(os, threshold);
        put(os, states);
        put(os, mcg_state);
        for (int c = 0; c < clauses; ++c)
            for (int l = 0; l < literals; ++l)
                for (int b = 0; b < states; ++b)
                    put(os, state(c, l, b));
        for (int c = 0; c < clauses; ++c)
            put(os, weight(c));
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movq %rsp, %r15
movl %eax, (%r15)
movl $0x4, %edx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x2240
movl 0x4(%r14), %eax
movl %eax, (%r15)
movq %rsp, %r15
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
movsd 0x8(%r14), %xmm0
movsd %xmm0, (%r15)
movq %rsp, %r15
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
movsd 0x10(%r14), %xmm0
movsd %xmm0, (%r15)
movq %rsp, %r15
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
movl 0x18(%r14), %eax
movl %eax, (%r15)
movq %rsp, %r15
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
movl 0x1c(%r14), %eax
movl %eax, (%r15)
movq %rsp, %r15
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
movq 0x39e0(%rip), %rax      # 0x81b8
movq %rax, (%r15)
movq %rsp, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2240
cmpl $0x0, 0x4(%r14)
jle 0x4857
xorl %r12d, %r12d
movq %rsp, %r15
cmpl $0x0, 0x20(%r14)
jle 0x484e
xorl %ebp, %ebp
cmpl $0x0, 0x1c(%r14)
jle 0x4846
xorl %r13d, %r13d
movq 0x38(%r14), %rax
movslq 0x30(%r14), %rcx
movl 0x2c(%r14), %edx
imull %r12d, %edx
addl %ebp, %edx
movslq %edx, %rdx
imulq %rcx, %rdx
addq %r13, %rdx
movl (%rax,%rdx,4), %eax
movl %eax, (%rsp)
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
incq %r13
cmpl 0x1c(%r14), %r13d
jl 0x480b
incl %ebp
cmpl 0x20(%r14), %ebp
jl 0x4801
incl %r12d
cmpl 0x4(%r14), %r12d
jl 0x47f8
cmpl $0x0, 0x4(%r14)
jle 0x488f
xorl %r12d, %r12d
movq %rsp, %r15
movq 0x68(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rsp)
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2240
incq %r12
movslq 0x4(%r14), %rax
cmpq %rax, %r12
jl 0x4864
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/gen-bases.c
// Function: generate
void
generate (int limb_bits, int nail_bits, int base)
{
  int  numb_bits = limb_bits - nail_bits;

  mpz_set_ui (t, 1L);
  mpz_mul_2exp (t, t, numb_bits);
  mpz_set_ui (big_base, 1L);
  chars_per_limb = 0;
  for (;;)
    {
      mpz_mul_ui (big_base, big_base, (long) base);
      if (mpz_cmp (big_base, t) > 0)
        break;
      chars_per_limb++;
    }

  mpz_ui_pow_ui (big_base, (long) base, (long) chars_per_limb);

  normalization_steps = limb_bits - mpz_sizeinbase (big_base, 2);

  mpz_set_ui (t, 1L);
  mpz_mul_2exp (t, t, 2*limb_bits - normalization_steps);
  mpz_tdiv_q (big_base_inverted, t, big_base);
  mpz_set_ui (t, 1L);
  mpz_mul_2exp (t, t, limb_bits);
  mpz_sub (big_base_inverted, big_base_inverted, t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movl %edi, %ebx
movl %edi, %eax
subl %esi, %eax
movl $0x1, %r14d
movl %r14d, 0x6629(%rip)     # 0xf0d4
leaq 0x661e(%rip), %rdi      # 0xf0d0
movq 0x661f(%rip), %rcx      # 0xf0d8
movl $0x1, %r12d
movq %r12, (%rcx)
movslq %eax, %rdx
movq %rdi, %rsi
callq 0x369f
movl %r14d, 0x6610(%rip)     # 0xf0e4
leaq 0x6605(%rip), %r13      # 0xf0e0
movq 0x6606(%rip), %rax      # 0xf0e8
movq %r12, (%rax)
movslq %r15d, %r15
movl $0x0, 0x65fe(%rip)      # 0xf0f0
movq %r13, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x34b4
movq %r13, %rdi
leaq 0x65c6(%rip), %rsi      # 0xf0d0
callq 0x2d6a
testl %eax, %eax
jg 0x8b44
leaq 0x65c6(%rip), %r12      # 0xf0e0
leaq 0x65af(%rip), %r13      # 0xf0d0
incl 0x65c9(%rip)            # 0xf0f0
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x34b4
movq %r12, %rdi
movq %r13, %rsi
callq 0x2d6a
testl %eax, %eax
jle 0x8b21
movslq 0x65a5(%rip), %rdx      # 0xf0f0
leaq -0x30(%rbp), %rax
movq %r15, (%rax)
leaq -0x40(%rbp), %rsi
movl $0x0, (%rsi)
movq %rax, 0x8(%rsi)
xorl %eax, %eax
testl %r15d, %r15d
setne %al
movl %eax, 0x4(%rsi)
leaq 0x656e(%rip), %rdi      # 0xf0e0
callq 0x560e
movl 0x6567(%rip), %eax      # 0xf0e4
testl %eax, %eax
je 0x8ba7
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x6559(%rip), %rax      # 0xf0e8
leaq -0x1(%rcx), %r15
shll $0x6, %r15d
movq -0x8(%rax,%rcx,8), %rdi
callq 0x7a60
movq %rax, %r14
addl %r15d, %r14d
movslq %ebx, %r15
movl %ebx, %eax
subl %r14d, %eax
movl %eax, 0x653f(%rip)      # 0xf0f4
movl $0x1, %r12d
movl %r12d, 0x6512(%rip)     # 0xf0d4
leaq 0x6507(%rip), %r14      # 0xf0d0
movq 0x6508(%rip), %rcx      # 0xf0d8
movl $0x1, %r13d
movq %r13, (%rcx)
addl %ebx, %ebx
subl %eax, %ebx
movslq %ebx, %rdx
movq %r14, %rdi
movq %r14, %rsi
callq 0x369f
leaq 0x650e(%rip), %rbx      # 0xf100
leaq 0x64e7(%rip), %rcx      # 0xf0e0
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl $0x2, %r8d
callq 0x39b9
movl %r12d, 0x64c1(%rip)     # 0xf0d4
movq 0x64be(%rip), %rax      # 0xf0d8
movq %r13, (%rax)
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x369f
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x3442
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/gen-bases.c
// Function: header
void
header (int limb_bits, int nail_bits)
{
  int  numb_bits = limb_bits - nail_bits;

  generate (limb_bits, nail_bits, 10);

  printf ("/* This file generated by gen-bases.c - DO NOT EDIT. */\n");
  printf ("\n");
  printf ("#if GMP_NUMB_BITS != %d\n", numb_bits);
  printf ("Error, error, this data is for %d bits\n", numb_bits);
  printf ("#endif\n");
  printf ("\n");
  printf ("/* mp_bases[10] data, as literal values */\n");
  printf ("#define MP_BASES_CHARS_PER_LIMB_10      %d\n", chars_per_limb);
  printf ("#define MP_BASES_BIG_BASE_10            CNST_LIMB(0x");
  mpz_out_str (stdout, 16, big_base);
  printf (")\n");
  printf ("#define MP_BASES_BIG_BASE_INVERTED_10   CNST_LIMB(0x");
  mpz_out_str (stdout, 16, big_base_inverted);
  printf (")\n");
  printf ("#define MP_BASES_NORMALIZATION_STEPS_10 %d\n", normalization_steps);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
subl %esi, %ebx
movl $0xa, %edx
callq 0x8a84
leaq 0x28e9(%rip), %rdi      # 0xb54d
callq 0x1060
movl $0xa, %edi
callq 0x1040
leaq 0x1e69(%rip), %rdi      # 0xaae3
movl %ebx, %esi
xorl %eax, %eax
callq 0x1080
leaq 0x1e72(%rip), %rdi      # 0xaafc
movl %ebx, %esi
xorl %eax, %eax
callq 0x1080
leaq 0x2912(%rip), %rdi      # 0xb5ac
callq 0x1060
movl $0xa, %edi
callq 0x1040
leaq 0x2872(%rip), %rdi      # 0xb522
callq 0x1060
movl 0x6435(%rip), %esi      # 0xf0f0
leaq 0x1e62(%rip), %rdi      # 0xab24
xorl %eax, %eax
callq 0x1080
leaq 0x1e80(%rip), %rdi      # 0xab50
xorl %eax, %eax
callq 0x1080
movq 0x62fa(%rip), %r14      # 0xefd8
movq (%r14), %rdi
leaq 0x63f8(%rip), %rdx      # 0xf0e0
movl $0x10, %esi
callq 0x8196
leaq 0x1c4a(%rip), %rbx      # 0xa943
movq %rbx, %rdi
callq 0x1060
leaq 0x1e7d(%rip), %rdi      # 0xab85
xorl %eax, %eax
callq 0x1080
movq (%r14), %rdi
leaq 0x63e7(%rip), %rdx      # 0xf100
movl $0x10, %esi
callq 0x8196
movq %rbx, %rdi
callq 0x1060
movl 0x63c3(%rip), %esi      # 0xf0f4
leaq 0x1e82(%rip), %rdi      # 0xabba
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1080
// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/gen-bases.c
// Function: mp_2logb
void
mp_2logb (mpz_t r, int bi, int prec)
{
  mpz_t t, t2, two, b;
  int i;

  mpz_init_set_ui (t, 1);
  mpz_mul_2exp (t, t, prec+EXTRA);

  mpz_init (t2);

  mpz_init_set_ui (two, 2);
  mpz_mul_2exp (two, two, prec+EXTRA);

  mpz_set_ui (r, 0);

  mpz_init_set_ui (b, bi);
  mpz_mul_2exp (b, b, prec+EXTRA);

  for (i = prec-1; i >= 0; i--)
    {
      mpz_mul_2exp (b, b, prec+EXTRA);
      mpz_sqrt (b, b);

      mpz_mul (t2, t, b);
      mpz_tdiv_q_2exp (t2, t2, prec+EXTRA);

      if (mpz_cmp (t2, two) < 0)	/* not too large? */
	{
	  mpz_setbit (r, i);		/* set next less significant bit */
	  mpz_set (t, t2);		/* new value acceptable */
	}
    }

  mpz_clear (t);
  mpz_clear (t2);
  mpz_clear (two);
  mpz_clear (b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %r15d
movl %esi, -0x2c(%rbp)
movq %rdi, %rbx
movl $0x1, %r13d
leaq -0x80(%rbp), %r12
movq %r13, (%r12)
movl $0x8, %edi
callq *0x6332(%rip)           # 0xf0a8
movq %rax, 0x8(%r12)
movl $0x1, %ecx
movl %ecx, 0x4(%r12)
movq %r13, (%rax)
leal 0x10(%r15), %eax
movslq %eax, %r14
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x369f
movq %r13, -0x50(%rbp)
movl $0x8, %edi
callq *0x62fc(%rip)           # 0xf0a8
movq %rax, -0x48(%rbp)
leaq -0x70(%rbp), %r12
movq %r13, (%r12)
movl $0x8, %edi
callq *0x62e5(%rip)           # 0xf0a8
movq %rax, 0x8(%r12)
movl $0x1, %ecx
movl %ecx, 0x4(%r12)
movq $0x2, (%rax)
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x369f
movq %rbx, -0x58(%rbp)
movl $0x0, 0x4(%rbx)
movq %r13, -0x40(%rbp)
movl $0x8, %edi
callq *0x62a7(%rip)           # 0xf0a8
movl -0x2c(%rbp), %ecx
movq %rax, -0x38(%rbp)
testl %ecx, %ecx
je 0x8e1b
movslq %ecx, %rcx
movl $0x1, -0x3c(%rbp)
movq %rcx, (%rax)
jmp 0x8e22
movl $0x0, -0x3c(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x369f
testl %r15d, %r15d
jle 0x8ebe
movl %r15d, %ebx
incq %rbx
leaq -0x40(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq -0x80(%rbp), %r13
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x369f
movl $0x2, %ecx
movq %r15, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x607f
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3585
movq %r12, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl $0x2, %ecx
callq 0x3ed2
movq %r12, %rdi
leaq -0x70(%rbp), %rsi
callq 0x2d6a
testl %eax, %eax
jns 0x8eb5
leaq -0x2(%rbx), %rsi
movq -0x58(%rbp), %rdi
callq 0x539d
movq %r13, %rdi
movq %r12, %rsi
callq 0x24ee
decq %rbx
cmpq $0x1, %rbx
jg 0x8e4c
movq -0x78(%rbp), %rdi
xorl %esi, %esi
callq *0x61ee(%rip)           # 0xf0b8
movq -0x48(%rbp), %rdi
xorl %esi, %esi
callq *0x61e2(%rip)           # 0xf0b8
movq -0x68(%rbp), %rdi
xorl %esi, %esi
callq *0x61d6(%rip)           # 0xf0b8
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq *0x61ca(%rip)           # 0xf0b8
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/gen-bases.c
// Function: main
int
main (int argc, char **argv)
{
  int  limb_bits, nail_bits;

  mpz_init (big_base);
  mpz_init (big_base_inverted);
  mpz_init (t);

  if (argc != 4)
    {
      fprintf (stderr, "Usage: gen-bases <header|table> <limbbits> <nailbits>\n");
      exit (1);
    }

  limb_bits = atoi (argv[2]);
  nail_bits = atoi (argv[3]);

  if (limb_bits <= 0
      || nail_bits < 0
      || nail_bits >= limb_bits)
    {
      fprintf (stderr, "Invalid limb/nail bits: %d %d\n",
               limb_bits, nail_bits);
      exit (1);
    }

  if (strcmp (argv[1], "header") == 0)
    header (limb_bits, nail_bits);
  else if (strcmp (argv[1], "table") == 0)
    table (limb_bits, nail_bits);
  else
    {
      fprintf (stderr, "Invalid header/table choice: %s\n", argv[1]);
      exit (1);
    }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movl $0x1, %r15d
movq %r15, 0x5eb3(%rip)      # 0xf0e0
movl $0x8, %edi
callq *0x5e70(%rip)           # 0xf0a8
movq %rax, 0x5ea9(%rip)      # 0xf0e8
movq %r15, 0x5eba(%rip)      # 0xf100
movl $0x8, %edi
callq *0x5e57(%rip)           # 0xf0a8
movq %rax, 0x5eb0(%rip)      # 0xf108
movq %r15, 0x5e71(%rip)      # 0xf0d0
movl $0x8, %edi
callq *0x5e3e(%rip)           # 0xf0a8
movq %rax, 0x5e67(%rip)      # 0xf0d8
cmpl $0x4, %r14d
jne 0x92ed
movq 0x10(%rbx), %rdi
callq 0x10f0
movl %eax, %r14d
movq 0x18(%rbx), %rdi
callq 0x10f0
movl %eax, %r15d
testl %r14d, %r14d
jle 0x92f2
testl %r15d, %r15d
js 0x92f2
cmpl %r14d, %r15d
jge 0x92f2
movq 0x8(%rbx), %rbx
leaq 0x1a1c(%rip), %rsi      # 0xacc5
movq %rbx, %rdi
callq 0x10b0
testl %eax, %eax
je 0x92d5
leaq 0x1a10(%rip), %rsi      # 0xaccc
movq %rbx, %rdi
callq 0x10b0
testl %eax, %eax
jne 0x92fd
movl %r14d, %edi
movl %r15d, %esi
callq 0x8efd
jmp 0x92e0
movl %r14d, %edi
movl %r15d, %esi
callq 0x8c48
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x12a8
movl %r14d, %edi
movl %r15d, %esi
callq 0x12d0
movq %rbx, %rdi
callq 0x12f8