LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: viterbiTest6::test_method()
BOOST_AUTO_TEST_CASE(viterbiTest6)
{
    map<string, flt_type> vocab;
    string str1("a"); string str2("b");
    string str3("c"); string str4("d");
    vocab[str1] = -1.0;
    vocab[str2] = -2.0;
    vocab[str3] = 0.0;
    vocab[str4] = 0.0;
    string sentence("a-bcd");
    int maxlen = 1;
    vector<string> correct_path;
    viterbiChecks(vocab, maxlen, sentence, correct_path, MIN_FLOAT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xe8, %rsp
leaq -0x48(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x28986(%rip), %rsi     # 0x53f2c
leaq -0xf0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq 0x28649(%rip), %rsi     # 0x53c09
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x5160
leaq 0x2861f(%rip), %rsi     # 0x53bf9
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x5160
leaq 0x27a1d(%rip), %rsi     # 0x53011
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x5160
leaq -0x50(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x1b338
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x50(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x1b338
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
movq %rcx, (%rax)
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x1b338
andq $0x0, (%rax)
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1b338
andq $0x0, (%rax)
leaq 0x285d2(%rip), %rsi     # 0x53c3f
leaq -0x70(%rbp), %rdi
leaq -0x20(%rbp), %rdx
callq 0x5160
xorps %xmm0, %xmm0
leaq -0x20(%rbp), %rcx
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movsd 0x27f27(%rip), %xmm0    # 0x535c0
pushq $0x1
popq %rsi
movl %esi, %r8d
callq 0x295d8
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0x70(%rbp), %rdi
callq 0x57b8
leaq -0x90(%rbp), %rdi
callq 0x57b8
leaq -0xb0(%rbp), %rdi
callq 0x57b8
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0xf0(%rbp), %rdi
callq 0x57b8
leaq -0x50(%rbp), %rdi
callq 0x1bba4
addq $0xe8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x9574
leaq -0x70(%rbp), %rdi
callq 0x57b8
jmp 0x2b729
jmp 0x2b726
movq %rax, %rbx
jmp 0x2b735
movq %rax, %rbx
jmp 0x2b741
movq %rax, %rbx
jmp 0x2b74d
movq %rax, %rbx
jmp 0x2b759
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x57b8
leaq -0xb0(%rbp), %rdi
callq 0x57b8
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0xf0(%rbp), %rdi
callq 0x57b8
leaq -0x50(%rbp), %rdi
callq 0x1bba4
movq %rbx, %rdi
callq 0x56b0
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: includes_path(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool includes_path(vector<vector<string> > &all_paths, vector<string> &path) {
    for (unsigned int i=0; i<all_paths.size(); i++) {
        if (path.size() != all_paths[i].size()) continue;
        unsigned int j=0;
        for (; j<path.size(); j++)
            if (all_paths[i][j] != path[j]) break;
        if (j==path.size()) return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
pushq $0x18
popq %rsi
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
idivq %rsi
cmpq %r12, %rax
jbe 0x34dc4
movq 0x8(%rbx), %rdi
subq (%rbx), %rdi
imulq $0x18, %r12, %r13
movq 0x8(%rcx,%r13), %rdx
subq (%rcx,%r13), %rdx
cmpq %rdx, %rdi
jne 0x34dbc
movq %rax, -0x30(%rbp)
xorl %ecx, %ecx
movl %ecx, %r15d
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x34db0
movq (%r14), %rax
movq %r15, %rdi
shlq $0x5, %rdi
addq %rdi, %rsi
addq (%rax,%r13), %rdi
callq 0x10fbf
leal 0x1(%r15), %ecx
testb %al, %al
je 0x34d71
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
cmpq %r15, %rax
pushq $0x18
popq %rsi
movq -0x30(%rbp), %rax
je 0x34dc4
incl %r12d
jmp 0x34d3b
cmpq %r12, %rax
seta %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/common/io_utils.cc
// Function: parse_clustering_args(int, char**, char**, char**, char**, bool*, char**)
void parse_clustering_args(int argc, char* argv[], char** input,
	char** output, char** config, bool* complete, char** method) {
		// default arguments
		*complete = false;
		// parse through comand line arguments
		for (int i = 1; i < argc; i++) {
			if (!strcmp(argv[i], "-i")) {
				*input = strdup(argv[++i]);
			}
			if (!strcmp(argv[i], "-c")) {
				*config = strdup(argv[++i]);
			}	
			if (!strcmp(argv[i], "-o")) {
				*output = strdup(argv[++i]);
			}
			if (!strcmp(argv[i], "-m")) {
				*method = strdup(argv[++i]);
			}
			if (!strcmp(argv[i], "-complete")) {
				*complete = true;
			}
		}
		assert(*input && *config && *output && *method);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r13
movl %edi, %ebp
movb $0x0, (%r9)
pushq $0x1
popq %r14
leaq 0x4619(%rip), %rbx      # 0x7118
cmpl %ebp, %r14d
jge 0x2be4
movslq %r14d, %r12
movq (%r13,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x2bcc
cmpb $0x69, 0x1(%rdi)
jne 0x2b48
cmpb $0x0, 0x2(%rdi)
jne 0x2b48
incl %r14d
movq 0x8(%r13,%r12,8), %rdi
callq 0x2390
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r13,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x2bcc
cmpb $0x63, 0x1(%rdi)
jne 0x2b76
cmpb $0x0, 0x2(%rdi)
jne 0x2b76
movslq %r14d, %r12
incl %r14d
movq 0x8(%r13,%r12,8), %rdi
callq 0x2390
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r13,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x2bcc
cmpb $0x6f, 0x1(%rdi)
jne 0x2ba3
cmpb $0x0, 0x2(%rdi)
jne 0x2ba3
movslq %r14d, %r12
incl %r14d
movq 0x8(%r13,%r12,8), %rdi
callq 0x2390
movq (%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r13,%r12,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x2bcc
cmpb $0x6d, 0x1(%rdi)
jne 0x2bcc
cmpb $0x0, 0x2(%rdi)
jne 0x2bcc
movslq %r14d, %r12
incl %r14d
movq 0x8(%r13,%r12,8), %rdi
callq 0x2390
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r13,%r12,8), %rdi
movq %rbx, %rsi
callq 0x2260
testl %eax, %eax
jne 0x2bdc
movb $0x1, (%r15)
incl %r14d
jmp 0x2aff
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2c1e
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2c1e
movq (%rsp), %rax
cmpq $0x0, (%rax)
je 0x2c1e
movq 0x50(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2c1e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44fd(%rip), %rdi      # 0x7122
leaq 0x4410(%rip), %rsi      # 0x703c
leaq 0x4517(%rip), %rcx      # 0x714a
movl $0xa0, %edx
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../utils/math_utils.h
// Function: our_math::compute_w_value(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, int)
inline double compute_w_value(std::vector<std::vector<double>>feature_vectors, int n_images) {
		// Initialize the BF class
		BruteForce<double> bf_instant(n_images, feature_vectors.at(1).size(), feature_vectors);
		int sum_result = 0;
		for (int i = 0; i < n_images; i++) {
			list<pair<int, double>> kBF = bf_instant.kNeighboursBF(feature_vectors.at(i), 2);
			// ge the second element of the list, as the first is the vector itself
			int distance_from_nn = kBF.back().second;
			sum_result += distance_from_nn;
		}
		return sum_result / (n_images * 1.0);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebp
movq %rdi, %r14
pushq $0x1
popq %rsi
callq 0x3cce
movq 0x8(%rax), %rbx
subq (%rax), %rbx
shrq $0x3, %rbx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3c74
leaq 0x18(%rsp), %rdi
movl %ebp, -0x8(%rdi)
movl %ebx, -0x4(%rdi)
movq %rdi, 0x8(%rsp)
movq %r15, %rsi
callq 0x3c74
leaq 0x60(%rsp), %rdi
callq 0x2ede
xorl %r15d, %r15d
testl %ebp, %ebp
movl $0x0, %ebx
movl %ebp, (%rsp)
cmovgl %ebp, %ebx
leaq 0x30(%rsp), %r12
leaq 0x48(%rsp), %r13
xorl %ebp, %ebp
cmpq %r15, %rbx
je 0x3c15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3cce
movq %r12, %rdi
movq %rax, %rsi
callq 0x31a2
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0x4590
movq %r12, %rdi
callq 0x2f56
movq 0x50(%rsp), %rax
cvttsd2si 0x18(%rax), %eax
addl %eax, %ebp
movq %r13, %rdi
callq 0x4af4
incq %r15
jmp 0x3bc6
cvtsi2sd %ebp, %xmm1
cvtsi2sdl (%rsp), %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
leaq 0x18(%rsp), %rdi
callq 0x2ede
movsd (%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, 0x8(%rsp)
jmp 0x3c61
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2f56
jmp 0x3c61
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x2ede
movq %rbx, %rdi
callq 0x2380
nop
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../utils/../algorithms/Search/BruteForce/headers/../../../common/metrics.h
// Function: double metrics::ManhatanDistance<double>(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, int)
T ManhatanDistance(std::vector<T>x, std::vector<T>y, int dim) {
		T result{};
		for (int i = 0; i < dim; i++) {
			result += std::abs(x[i] - y[i]);
		}
		return result;
	}

// Assembly:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
xorpd %xmm0, %xmm0
movapd 0x2626(%rip), %xmm1     # 0x7210
cmpq %rax, %rdx
je 0x4c0c
movq (%rdi), %rcx
movsd (%rcx,%rax,8), %xmm2
movq (%rsi), %rcx
subsd (%rcx,%rax,8), %xmm2
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incq %rax
jmp 0x4bea
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../algorithms/Search/Hypercube/headers/../../LSH/headers/hashing.h
// Function: lsh::HashFunction::HashFunction(int, double, unsigned int, unsigned int)
HashFunction(int dim, double w, uint32_t m, uint32_t M) : dim(dim), w(w), s(dim, 0), m(m), M(M), const_m_values(dim) {
				// we want to use a uniform real distributor, thus we must initialize it
				// we want to randomize the input each time
				std::random_device mch;
				std::default_random_engine generator(mch());
				std::uniform_real_distribution<double> distribution(0.0, w);
				// initialize the random vector in the space `dim` using the uniform distribution
				for (int i = 0; i < this->dim; i++) {
					s.at(i) = distribution(generator);
				}

				// initialize the const m vector
				for (int i = 0; i < this->dim; i++) {
					const_m_values[i] = our_math::modular_power(m, i, M);
				}
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x13b8, %rsp           # imm = 0x13B8
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
movl %esi, (%rdi)
movsd %xmm0, (%rsp)
movsd %xmm0, 0x8(%rdi)
addq $0x10, %rdi
movslq %esi, %rbx
leaq 0x30(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rdi, 0x8(%rsp)
movq %rbx, %rsi
callq 0x50b6
movl %r14d, 0x28(%r15)
movl %ebp, 0x2c(%r15)
leaq 0x30(%r15), %r12
leaq 0x30(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x510c
leaq 0x30(%rsp), %rdi
movq %r12, 0x10(%rsp)
callq 0x4ebc
leaq 0x30(%rsp), %rdi
callq 0x2250
xorl %r13d, %r13d
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl $0x1, %edx
adcl $0x0, %edx
leaq 0x28(%rsp), %r12
movq %rdx, (%r12)
leaq 0x18(%rsp), %rbx
andq $0x0, (%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rbx)
movslq (%r15), %rax
cmpq %rax, %r13
jge 0x4df5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x515e
movsd %xmm0, (%rsp)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x5166
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r13
jmp 0x4dc2
xorl %ebx, %ebx
cltq
cmpq %rax, %rbx
jge 0x4e19
movl %r14d, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x5187
movq 0x30(%r15), %rcx
movl %eax, (%rcx,%rbx,4)
incq %rbx
movl (%r15), %eax
jmp 0x4df7
leaq 0x30(%rsp), %rdi
callq 0x5062
addq $0x13b8, %rsp           # imm = 0x13B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e41
movq %rax, %rbx
jmp 0x4e4e
movq %rax, %rbx
jmp 0x4e58
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5062
movq 0x10(%rsp), %rdi
callq 0x523a
movq 0x8(%rsp), %rdi
callq 0x2f56
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../algorithms/Search/Hypercube/headers/hypercube.h
// Function: Hypercube<double>::hash_to_hypercube(std::vector<double, std::allocator<double>>)
int hash_to_hypercube(std::vector<T> vec) {
			// store the string produced
			std::string bucket_str;
			// hash k times
			int k = 0;
			for (std::list<lsh::HashFunction>::iterator it = hash_fns.begin(); 
				it != hash_fns.end(); it++) {
					// hash with the i-th hash fn
					int res = it->hash(vec);
					// find its pre-maped result of a coin flip
					bool bit = flipped_coins.at(k)[res];
					// append the 0/1 value to the string
					bucket_str += to_string(bit);
			}
			// convert the string into an integer
			return (int)std::bitset<32>(bucket_str).to_ulong();
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rdi), %rbx
addq $0x70, %r14
leaq 0x50(%rsp), %r15
leaq 0x30(%rsp), %r13
movq %rbx, %rbp
movq (%rbp), %rbp
cmpq %rbx, %rbp
je 0x4fed
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x31a2
leaq 0x10(%rbp), %rdi
movq %r15, %rsi
callq 0x6210
movl %eax, %r12d
movq %r15, %rdi
callq 0x2f56
movl %r12d, 0x4(%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x633c
movq %rax, %rdi
leaq 0x4(%rsp), %rsi
callq 0x64bc
movzbl (%rax), %esi
movq %r13, %rdi
callq 0x635a
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x23a0
movq %r13, %rdi
callq 0x20c0
jmp 0x4f82
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x63b4
movl 0x30(%rsp), %ebx
leaq 0x10(%rsp), %rdi
callq 0x20c0
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5041
jmp 0x5041
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c0
jmp 0x5044
jmp 0x5041
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2f56
jmp 0x5044
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../utils/math_utils.h
// Function: our_math::modular_power(int, int, int)
inline int modular_power(int x, int y, int p) {
		int res = 1;

		x = x % p;
		while (y > 0) {
			if (y & 1)
				res = (res * x) % p;
			y = y >> 1;
			x = (x * x) % p;
		}
		return res;
	}

// Assembly:
movl %edx, %ecx
movl %edi, %r8d
pushq $0x1
popq %rdi
movl %r8d, %eax
cltd
idivl %ecx
testl %esi, %esi
jle 0x51b5
movl %edx, %r8d
testb $0x1, %sil
je 0x51ad
imull %r8d, %edi
movl %edi, %eax
cltd
idivl %ecx
movl %edx, %edi
shrl %esi
imull %r8d, %r8d
jmp 0x518f
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../algorithms/Search/Hypercube/headers/../../LSH/headers/hashing.h
// Function: unsigned int lsh::HashFunction::hash<double>(std::vector<double, std::allocator<double>>)
uint32_t hash(std::vector<T> x) {
				uint32_t h = 0;
				// vector a computed by the lsh method
				std::vector<int> a(dim, 0);
				// compute the values of the vector a
				for (int i = 0; i < dim; i++) {
					a[i] = floor((x.at(i) - s.at(i)) / (w * 1.0));
				}
				// compute the hash result of the vector x
				for (int i = 0; i < dim; i++) {
					// each time apply a modulo operation
					h += our_math::modulo(our_math::modulo(a.at(dim - i - 1), M) * const_m_values.at(i), M);
				}
				// return the position in the hash
				return h % M;
			}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rsi
leaq 0x1c(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x20(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x63ea
leaq 0x10(%rbx), %r15
xorl %r12d, %r12d
movslq (%rbx), %rcx
cmpq %rcx, %r12
jge 0x6293
movq %r14, %rdi
movq %r12, %rsi
callq 0x5166
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5166
movsd 0x10(%rsp), %xmm0
subsd (%rax), %xmm0
divsd 0x8(%rbx), %xmm0
callq 0x2330
cvttsd2si %xmm0, %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx,%r12,4)
incq %r12
jmp 0x6245
leaq 0x30(%rbx), %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
pushq $-0x1
popq %r12
xorl %ebp, %ebp
movslq %ecx, %rax
cmpq %rax, %r15
jge 0x6301
addl %r12d, %ecx
movslq %ecx, %rsi
leaq 0x20(%rsp), %rdi
callq 0x6440
movl (%rax), %r13d
movl 0x2c(%rbx), %r14d
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x6440
movq %rax, %rcx
movl %r13d, %eax
cltd
idivl %r14d
movl %edx, %eax
sarl $0x1f, %eax
andl %r14d, %eax
addl %edx, %eax
imull (%rcx), %eax
movl (%rbx), %ecx
movl 0x2c(%rbx), %esi
cltd
idivl %esi
addl %edx, %ebp
sarl $0x1f, %edx
andl %esi, %edx
addl %edx, %ebp
incq %r15
decl %r12d
jmp 0x62a5
movl %ebp, %eax
xorl %edx, %edx
divl 0x2c(%rbx)
movl %edx, %ebx
leaq 0x20(%rsp), %rdi
callq 0x523a
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6327
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x523a
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O2/nikosgalanis[P]Vectors-Similarity-Search-and-Clustering/programs/Hypercube/../../utils/math_utils.h
// Function: our_math::hamming_distance(int, int)
inline int hamming_distance(int a, int b) {
		int x = a ^ b;
		int bits = 0;

		while (x > 0) {
			bits += x & 1;
			x >>= 1;
		}

		return bits;
	}

// Assembly:
xorl %esi, %edi
xorl %eax, %eax
testl %edi, %edi
jle 0x6780
movl %edi, %ecx
andl $0x1, %ecx
addl %ecx, %eax
shrl %edi
jmp 0x6771
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/weak.cc
// Function: main
int main()
{
	auto p = make_shared<int>(42);

	weak_ptr<int> wp(p);  // wp weakly shares with p; use count in p is unchanged

	p.reset(); // assuming p.unique() was true, the int is deleted

	if (shared_ptr<int> np = wp.lock()) { // true if np is not null
		// inside the if, np shares its object with p
		cout << "np is not null." << endl;
	}

	cout << "np is null." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq -0x20(%rbp), %rsi
movl $0x2a, (%rsi)
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x12e0
leaq -0x20(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x159c
movq %rbx, %rdi
callq 0x1300
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15da
cmpq $0x0, (%rbx)
je 0x1274
movq 0x2d78(%rip), %rdi      # 0x3fd8
leaq 0xd9d(%rip), %rsi       # 0x2004
callq 0x1070
movq %rax, %rdi
callq 0x1040
leaq -0x28(%rbp), %rdi
callq 0x132e
movq 0x2d54(%rip), %rdi      # 0x3fd8
leaq 0xd89(%rip), %rsi       # 0x2014
callq 0x1070
movq %rax, %rdi
callq 0x1040
leaq -0x18(%rbp), %rdi
callq 0x13be
leaq -0x38(%rbp), %rdi
callq 0x132e
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x132e
jmp 0x12c6
movq %rax, %rbx
leaq -0x18(%rbp), %rdi
callq 0x13be
leaq -0x38(%rbp), %rdi
callq 0x132e
movq %rbx, %rdi
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/algorithm.cpp
// Function: nda::test_algorithm_equal_body()
TEST(algorithm_equal) {
  dense_array<int, 3> a1({10, 20, {0, 30, 205}});
  generate(a1, rand);
  dense_array<int, 3> a2 = make_compact_copy(a1);
  dense_array<int, 3> b(a2);
  fill(b, 0);

  ASSERT(a1 != a2);
  ASSERT(equal(a1, a2));
  ASSERT(!equal(a1, b));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x628, %rsp            # imm = 0x628
leaq 0x40(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq $0x14, 0x8(%rdx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq 0x28(%rsp), %rcx
andq $0x0, (%rcx)
movq %rax, 0x10(%rdx)
movq $0xa, 0x8(%rsi)
movq $0x1e, 0x8(%rcx)
movq $0xcd, 0x10(%rcx)
leaq 0xa8(%rsp), %rbx
movq %rbx, %rdi
callq 0x66f8
leaq 0x110(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6750
movq 0xdc1ef(%rip), %rsi     # 0xe1fa8
movq %r14, %rdi
callq 0x677b
leaq 0xa8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x67ab
leaq 0x40(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x67de
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x40(%rsp), %rdi
callq 0x680d
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x683e
movl %eax, %ebx
leaq 0x871f7(%rip), %rsi     # 0x8d014
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x498(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x498(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x696c
movl %eax, %ebx
leaq 0x871a7(%rip), %rsi     # 0x8d01d
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x308(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x308(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x696c
movl %eax, %ebx
leaq 0x8715f(%rip), %rsi     # 0x8d02b
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x178(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x178(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x40(%rsp), %rdi
callq 0x69c2
leaq 0xa8(%rsp), %rdi
callq 0x69c2
leaq 0x110(%rsp), %rdi
callq 0x69c2
addq $0x628, %rsp            # imm = 0x628
popq %rbx
popq %r14
retq
jmp 0x5f60
jmp 0x5f60
jmp 0x5f60
jmp 0x5f60
movq %rax, %rbx
jmp 0x5f6d
jmp 0x5f48
movq %rax, %rbx
jmp 0x5f7a
jmp 0x5f51
jmp 0x5f51
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
jmp 0x5f63
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x69c2
leaq 0xa8(%rsp), %rdi
callq 0x69c2
leaq 0x110(%rsp), %rdi
callq 0x69c2
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/algorithm.cpp
// Function: nda::test_algorithm_copy_body()
TEST(algorithm_copy) {
  array_of_rank<int, 2> a({10, 20});
  generate(a, rand);

  for (int crop_min : {0, 1}) {
    for (int crop_max : {0, 1}) {
      int x_min = a.shape().x().min() + crop_min;
      int x_max = a.shape().x().max() - crop_max;
      int y_min = a.shape().y().min() + crop_min;
      int y_max = a.shape().y().max() - crop_max;
      shape_of_rank<2> b_shape({{x_min, x_max - x_min + 1}, {y_min, y_max - y_min + 1}});
      array_of_rank<int, 2> b(b_shape);

      copy(a, b);
      ASSERT(equal(a(b.x(), b.y()), b));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq 0xd0(%rsp), %rsi
andq $0x0, (%rsi)
movq $0x14, 0x8(%rsi)
movq %rax, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
movq $0xa, 0x20(%rsi)
movq %rax, 0x28(%rsi)
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x69d2
movq 0xdbfc1(%rip), %rsi     # 0xe1fa8
movq %rbx, %rdi
callq 0x6a07
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x18(%rsp)
xorl %eax, %eax
leaq 0xd0(%rsp), %r14
leaq 0xa0(%rsp), %rbp
leaq 0x158(%rsp), %r15
cmpq $0x8, %rax
je 0x6172
movq %rax, 0x8(%rsp)
movl 0x18(%rsp,%rax), %r13d
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x6164
movl 0x10(%rsp,%r12), %eax
movl 0x70(%rsp), %ecx
movl 0x88(%rsp), %edx
leal (%rdx,%r13), %esi
addl 0x90(%rsp), %edx
leal (%rcx,%r13), %edi
addl 0x78(%rsp), %ecx
movslq %esi, %rsi
subl %esi, %edx
subl %eax, %edx
movslq %edx, %rdx
movslq %edi, %rdi
addl %edi, %eax
subl %eax, %ecx
movslq %ecx, %rax
movq %rdi, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x30(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x69d2
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x6a3a
leaq 0x108(%rsp), %rdx
movq 0x10(%rdx), %rax
leaq 0xb8(%rsp), %rcx
movq %rax, 0x10(%rcx)
movups (%rdx), %xmm0
movups %xmm0, (%rcx)
movq -0x8(%rdx), %rax
movq %rax, 0xb0(%rsp)
movups -0x18(%rdx), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
leaq 0x70(%rsp), %rdx
movq %rbp, %rcx
callq 0x7d3a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a96
movl %eax, %ebx
movq %rbp, %rdi
leaq 0x86f1d(%rip), %rsi     # 0x8d048
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
movq %r15, %rdi
movq %rbp, %rdx
callq 0x6894
movq %r15, %rdi
callq 0x68d4
movq %rbp, %rdi
callq 0x2090
movq %r14, %rdi
callq 0x6aca
addq $0x4, %r12
jmp 0x603e
movq 0x8(%rsp), %rax
addq $0x4, %rax
jmp 0x6018
leaq 0x50(%rsp), %rdi
callq 0x6aca
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6192
jmp 0x61ab
movq %rax, %rbx
jmp 0x61bb
jmp 0x61ab
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2090
jmp 0x61ae
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x6aca
leaq 0x50(%rsp), %rdi
callq 0x6aca
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/algorithm.cpp
// Function: nda::test_algorithm_copy_scalar_body()
TEST(algorithm_copy_scalar) {
  array_of_rank<int, 0> a;
  generate(a, rand);

  array_of_rank<int, 0> b;
  copy(a, b);
  ASSERT(a == b);
}

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x6b36
movq 0xdbb81(%rip), %rsi     # 0xe1fa8
movq %rbx, %rdi
callq 0x6b43
leaq 0x30(%rsp), %rdi
callq 0x6b36
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b5d
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6b84
movl %eax, %ebx
leaq 0x86c27(%rip), %rsi     # 0x8d087
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x6894
leaq 0x80(%rsp), %rdi
callq 0x68d4
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
jmp 0x64d0
jmp 0x64bc
movq %rax, %rbx
jmp 0x64dd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2090
jmp 0x64d3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/algorithm.cpp
// Function: nda::test_algorithm_move_scalar_body()
TEST(algorithm_move_scalar) {
  array_of_rank<int, 0> a;
  move_only token;
  generate(a, [token = std::move(token)]() {
    unused(token);
    return rand();
  });

  array_of_rank<int, 0> b;
  copy(a, b);
  ASSERT(a == b);
}

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x6b36
movq 0x18(%rbx), %rbx
leaq 0x18(%rsp), %rdi
movq %rbx, -0x8(%rdi)
callq 0x9eda
testq %rbx, %rbx
je 0x65af
callq 0x2320
movl %eax, (%rbx)
leaq 0x10(%rsp), %rdi
callq 0x6b36
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6b5d
leaq 0x58(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6b84
movl %eax, %ebx
leaq 0x86b30(%rip), %rsi     # 0x8d087
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x80(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x6894
leaq 0x80(%rsp), %rdi
callq 0x68d4
leaq 0x38(%rsp), %rdi
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
leaq 0x86cd9(%rip), %rdi     # 0x8d28f
leaq 0x86b14(%rip), %rsi     # 0x8d0d1
leaq 0x885fe(%rip), %rcx     # 0x8ebc2
movl $0x6a1, %edx            # imm = 0x6A1
callq 0x20e0
jmp 0x65e6
jmp 0x65d2
movq %rax, %rbx
jmp 0x65f3
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2090
jmp 0x65e9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6baa
leaq 0x58(%rsp), %rdi
callq 0x6baa
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: auto nda::make_compact<nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>>(nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>> const&)
NDARRAY_HOST_DEVICE auto make_compact(const Shape& s) {
  auto static_compact =
      make_shape_from_tuple(internal::make_compact_dims(s.dims(), typename Shape::dim_indices()));
  static_compact.resolve();
  return static_compact;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r14)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x18(%r14)
movq %r14, %rdi
callq 0x1423d
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps 0x20(%r14), %xmm2
leaq 0x30(%rsp), %r14
movaps %xmm2, 0x20(%r14)
movaps %xmm1, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x13ae7
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: nda::array<int, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>>, std::allocator<int>>::allocate()
void allocate() {
    assert(!buffer_);
    shape_.resolve();
    size_type flat_extent = shape_.flat_extent();
    if (flat_extent > 0) {
      buffer_size_ = flat_extent;
      buffer_ = alloc_traits::allocate(alloc_, buffer_size_);
    }
    base_ = buffer_ - shape_.flat_min();
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
jne 0x13a55
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x13ae7
movq %r14, %rdi
callq 0x13ab6
testq %rax, %rax
je 0x13a28
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6e66
movq %rax, 0x8(%rbx)
jmp 0x13a2c
movq 0x8(%rbx), %rax
pushq $0x1
popq %rcx
subq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
andq %rdx, %rsi
imulq %rcx, %rsi
leaq (%rax,%rsi,4), %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7966c(%rip), %rdi     # 0x8d0c8
leaq 0x7966e(%rip), %rsi     # 0x8d0d1
leaq 0x7c66d(%rip), %rcx     # 0x900d7
movl $0x8eb, %edx            # imm = 0x8EB
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: void nda::internal::resolve_unknown_strides<std::tuple<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>(std::tuple<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&, nda::dim<-9l, -9l, -9l>&)
NDARRAY_HOST_DEVICE void resolve_unknown_strides(AllDims& all_dims, Dim0& dim0, Dims&... dims) {
  if (is_unresolved(dim0.stride())) {
    constexpr size_t rank = std::tuple_size<AllDims>::value;
    dim0.set_stride(find_stride(dim0.extent(), all_dims, make_index_sequence<rank>()));
  }
  resolve_unknown_strides(all_dims, dims...);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbp
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r9
xorl %eax, %eax
cmpq 0x10(%rsi), %rax
jno 0x7d58b
movq %rsi, %r13
movq 0x8(%rsi), %rdi
movq %rbp, %rsi
callq 0x7d5b2
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r9
movq %rax, 0x10(%r13)
movq %rcx, (%rsp)
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x7d8e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: long nda::internal::filter_stride<nda::dim<-9l, -9l, 3l>, nda::dim<-9l, -9l, -9l>, nda::dim<0l, 3l, 1l>>(long, long, nda::dim<-9l, -9l, 3l> const&, nda::dim<-9l, -9l, -9l> const&, nda::dim<0l, 3l, 1l> const&)
NDARRAY_HOST_DEVICE index_t filter_stride(index_t stride, index_t extent, const Dims&... dims) {
  if (all(is_stride_ok(stride, extent, dims)...)) {
    return stride;
  } else {
    return std::numeric_limits<index_t>::max();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x523c4
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x706f
movq %r14, %rcx
xorq $0x1, %rcx
movq %rbx, %rdx
negq %rdx
cmovsq %rbx, %rdx
xorq $0x1, %rdx
orq %rcx, %rdx
jne 0x52381
pushq $0x1
popq %rcx
jmp 0x52398
cmpq $0x2, %rbx
jg 0x52396
imulq %rbx, %r14
xorl %ecx, %ecx
cmpq $0x2, %r14
setge %cl
jmp 0x52398
xorl %ecx, %ecx
xorb $0x1, %bpl
movzbl %bpl, %edx
xorb $0x1, %al
movzbl %al, %eax
addq %rdx, %rax
orq %rcx, %rax
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmoveq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: decltype(make_shape_from_tuple((decltype(array_to_tuple(internal::declval<std::array<nda::dim<-9l, -9l, -9l>, nda::shape<nda::dim<-9l, 20l, 1l>, nda::dim<-9l, 12l, 20l>>::rank()>>())))())) nda::internal::dynamic_optimize_shape<nda::shape<nda::dim<-9l, 20l, 1l>, nda::dim<-9l, 12l, 20l>>>(nda::shape<nda::dim<-9l, 20l, 1l>, nda::dim<-9l, 12l, 20l>> const&)
NDARRAY_HOST_DEVICE shape_of_rank<Shape::rank()> dynamic_optimize_shape(const Shape& shape) {
  auto dims = internal::tuple_to_array<dim<>>(shape.dims());

  // Sort the dims by stride.
  bubble_sort(dims.begin(), dims.end());

  // Find dimensions that are contiguous and fuse them.
  size_t rank = dims.size();
  for (size_t i = 0; i + 1 < rank;) {
    if (can_fuse(dims[i], dims[i + 1])) {
      dims[i] = fuse(dims[i], dims[i + 1]);
      for (size_t j = i + 1; j + 1 < rank; j++) {
        dims[j] = dims[j + 1];
      }
      rank--;
    } else {
      i++;
    }
  }

  // Unfortunately, we can't make the rank of the resulting shape smaller. Fill
  // the end of the array with size 1 dimensions.
  for (size_t i = rank; i < dims.size(); i++) {
    dims[i] = dim<>(0, 1, 0);
  }

  return shape_of_rank<Shape::rank()>(array_to_tuple(dims));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq 0x10(%rsi), %rax
leaq 0x50(%rsp), %r14
movq %rax, -0x18(%r14)
pushq $0x14
popq %rax
movq %rax, -0x10(%r14)
movq $0x1, -0x8(%r14)
movq (%rsi), %rcx
movq %rcx, (%r14)
movq $0xc, 0x8(%r14)
movq %rax, 0x10(%r14)
leaq 0x68(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x73e8
leaq 0x78(%rsp), %rax
pushq $0x2
popq %rcx
xorl %edx, %edx
imulq $0x18, %rdx, %r10
leaq (%rsp,%r10), %r8
addq $0x38, %r8
addq %r14, %r10
leaq 0x2(%rdx), %r15
incq %rdx
cmpq %rcx, %rdx
jae 0x4827c
movq %r10, %rdi
movq %r15, %rsi
movq 0x8(%r8), %r9
movq 0x10(%r8), %r12
imulq %r9, %r12
leaq 0x18(%r8), %r11
addq $0x18, %r10
incq %r15
cmpq 0x28(%r8), %r12
movq %r11, %r8
jne 0x481f9
movq (%r11), %r8
imulq %r9, %r8
imulq 0x8(%r11), %r9
addq %r8, -0x18(%r11)
movq %r9, -0x10(%r11)
decq %rdx
cmpq %rcx, %rsi
jae 0x4825b
movq 0x28(%rdi), %r8
movq %r8, 0x10(%rdi)
movups 0x18(%rdi), %xmm0
movups %xmm0, (%rdi)
addq $0x18, %rdi
incq %rsi
jmp 0x4823e
decq %rcx
addq $-0x18, %rax
jmp 0x481e6
andq $0x0, -0x10(%rax)
movq $0x1, -0x8(%rax)
andq $0x0, (%rax)
incq %rcx
addq $0x18, %rax
cmpq $0x2, %rcx
jb 0x48264
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x18(%rsp)
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x18(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: void nda::internal::assert_dims_compatible<std::tuple<nda::dim<-9l, 3l, -9l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, -9l, 1l>>, std::tuple<nda::dim<-9l, 3l, -9l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, -9l, 1l>>, 0ul, 1ul, 2ul, 3ul>(std::tuple<nda::dim<-9l, 3l, -9l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, 3l, 0l>, nda::dim<-9l, -9l, 1l>> const&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>)
NDARRAY_HOST_DEVICE void assert_dims_compatible(const DimsSrc& src, index_sequence<Is...>) {
  // This is ugly, in C++17, we'd use a fold  expression over the comma operator (f(), ...).
  int unused[] = {(assert_dim_compatible<typename std::tuple_element<Is, DimsDst>::type>(
                       Is, nda::dim<>(std::get<Is>(src))),
      0)...};
  (void)unused;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0x38(%rdi), %rax
leaq 0x50(%rsp), %rsi
movq %rax, (%rsi)
pushq $0x3
popq %rbx
movq %rbx, 0x8(%rsi)
movq 0x48(%rdi), %rax
movq %rax, 0x10(%rsi)
xorl %edi, %edi
callq 0x48833
movq 0x28(%r14), %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
pushq $0x1
popq %rdi
callq 0x4887c
movq 0x18(%r14), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
pushq $0x2
popq %rdi
callq 0x4887c
movups (%r14), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x1, 0x10(%rsi)
movq %rbx, %rdi
callq 0x7cbf
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: auto nda::internal::make_array_ref_at<int*, nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, nda::interval<-9l, -9l>, nda::interval<-9l, -9l>, int>(int*, nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>> const&, std::tuple<nda::interval<-9l, -9l>, nda::interval<-9l, -9l>, int> const&)
NDARRAY_HOST_DEVICE auto make_array_ref_at(
    T base, const Shape& shape, const std::tuple<Args...>& args) {
  auto new_shape = shape[args];
  auto new_mins = mins_of_intervals(args, shape.dims(), make_index_sequence<sizeof...(Args)>());
  auto old_min_offset = shape[new_mins];
  return make_array_ref_no_resolve(internal::pointer_add(base, old_min_offset), new_shape);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %r15
movq 0x40(%rdx), %r12
movslq (%rcx), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movups 0x8(%rcx), %xmm0
movaps %xmm0, 0x10(%rsp)
movlps %xmm0, 0x8(%rsi)
movups 0x18(%rcx), %xmm0
movaps %xmm0, (%rsp)
movlps %xmm0, 0x10(%rsi)
movq %rdx, %rdi
callq 0x127e0
testq %rbx, %rbx
leaq (%rbx,%rax,4), %rax
cmoveq %rbx, %rax
movq %rax, (%r14)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x8(%r14)
movq %r15, 0x18(%r14)
movaps (%rsp), %xmm0
movups %xmm0, 0x20(%r14)
movq %r12, 0x30(%r14)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: nda::array<int, nda::shape<nda::dim<0l, -9l, 1l>, nda::dim<-9l, -9l, -9l>>, std::allocator<int>>::deallocate()
void deallocate() {
    if (base_) {
      destroy();
      base_ = nullptr;
      shape_ = Shape();
      alloc_traits::deallocate(alloc_, buffer_, buffer_size_);
      buffer_ = nullptr;
    }
  }

// Assembly:
cmpq $0x0, 0x18(%rdi)
je 0x3e677
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
callq 0x3e678
andq $0x0, 0x18(%rbx)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3e718
movb 0x28(%r14), %al
movb %al, 0x48(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x38(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
shlq $0x2, %rsi
callq 0x21e0
andq $0x0, 0x8(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: nda::array<nda::lifetime_counter, nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, nda::auto_allocator<nda::lifetime_counter, 256ul, 1ul, std::allocator<nda::lifetime_counter>>>::assign(nda::array<nda::lifetime_counter, nda::shape<nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, nda::auto_allocator<nda::lifetime_counter, 256ul, 1ul, std::allocator<nda::lifetime_counter>>> const&)
void assign(const array& other) {
    if (base_ == other.base_) {
      if (base_) {
        assert(shape_ == other.shape_);
      } else {
        shape_ = other.shape_;
        assert(shape_.empty());
      }
      return;
    }
    if (base_ && shape_ == other.shape_) {
      destroy();
    } else {
      deallocate();
      shape_ = other.shape_;
      allocate();
    }
    copy_construct(other);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x118(%rdi), %rax
cmpq 0x118(%rsi), %rax
je 0x359da
testq %rax, %rax
je 0x3597e
movl $0x120, %esi            # imm = 0x120
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x15a78
testb %al, %al
je 0x3597e
movq %rbx, %rdi
callq 0x322de
jmp 0x359c8
movq %rbx, %rdi
callq 0x3227a
movq 0x148(%r14), %rax
movq %rax, 0x148(%rbx)
movups 0x138(%r14), %xmm0
movups %xmm0, 0x138(%rbx)
movups 0x120(%r14), %xmm0
movups %xmm0, 0x120(%rbx)
movq 0x130(%r14), %rax
movq %rax, 0x130(%rbx)
movq %rbx, %rdi
callq 0x320a2
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x35a8e
testq %rax, %rax
je 0x35a18
movl $0x120, %eax            # imm = 0x120
addq %rax, %rbx
addq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15a78
testb %al, %al
jne 0x35a66
leaq 0x57fa6(%rip), %rdi     # 0x8d9a6
leaq 0x576ca(%rip), %rsi     # 0x8d0d1
leaq 0x603f7(%rip), %rcx     # 0x95e05
movl $0x9b9, %edx            # imm = 0x9B9
callq 0x20e0
movq 0x148(%r14), %rax
movq %rax, 0x148(%rbx)
movups 0x138(%r14), %xmm0
movups %xmm0, 0x138(%rbx)
movups 0x120(%r14), %xmm0
movups %xmm0, 0x120(%rbx)
movq 0x130(%r14), %rax
movq %rax, 0x130(%rbx)
movq 0x128(%rbx), %rax
imulq 0x140(%rbx), %rax
testq %rax, %rax
jg 0x35a6e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5773d(%rip), %rdi     # 0x8d1b2
leaq 0x57655(%rip), %rsi     # 0x8d0d1
leaq 0x60382(%rip), %rcx     # 0x95e05
movl $0x9bc, %edx            # imm = 0x9BC
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: nda::array<int, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, std::allocator<int>>::copy_construct(nda::array<int, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, std::allocator<int>> const&)
void copy_construct(const array& other) {
    assert(base_ || shape_.empty());
    assert(shape_ == other.shape_);
    copy_shape_traits_type::for_each_value(other.shape_, other.base_, shape_, base_,
        [&](const_reference src, reference dst) { alloc_traits::construct(alloc_, &dst, src); });
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
jne 0x82e6
movq 0x40(%rbx), %rax
imulq 0x58(%rbx), %rax
imulq 0x28(%rbx), %rax
testq %rax, %rax
jg 0x8341
leaq 0x20(%rbx), %r15
leaq 0x20(%r14), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x8360
testb %al, %al
je 0x8322
movq 0x18(%r14), %rsi
movq 0x18(%rbx), %rcx
movq %rsp, %r8
movq %rbx, (%r8)
movq %r12, %rdi
movq %r15, %rdx
callq 0x83c4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8567d(%rip), %rdi     # 0x8d9a6
leaq 0x84da1(%rip), %rsi     # 0x8d0d1
leaq 0x85764(%rip), %rcx     # 0x8da9b
movl $0x900, %edx            # imm = 0x900
callq 0x20e0
leaq 0x84e61(%rip), %rdi     # 0x8d1a9
leaq 0x84d82(%rip), %rsi     # 0x8d0d1
leaq 0x85745(%rip), %rcx     # 0x8da9b
movl $0x8ff, %edx            # imm = 0x8FF
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: nda::array_ref<int const, nda::shape<>>::operator!=(nda::array_ref<int const, nda::shape<>> const&) const
NDARRAY_HOST_DEVICE bool operator!=(const array_ref& other) const {
    if (shape_ != other.shape_) { return true; }

    // TODO: This currently calls operator!= on all elements of the array_ref,
    // even after we find a non-equal element
    // (https://github.com/dsharlet/array/issues/4).
    bool result = false;
    copy_shape_traits<Shape, Shape>::for_each_value(
        shape_, base_, other.shape_, other.base_, [&](const_reference a, const_reference b) {
          if (a != b) { result = true; }
        });
    return result;
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x7(%rsp), %rbx
movb $0x0, (%rbx)
movq (%rdi), %rax
addq $0x8, %rdi
movq (%rsi), %rcx
leaq 0x8(%rsi), %rdx
leaq 0x8(%rsp), %r8
movq %rbx, (%r8)
movq %rax, %rsi
callq 0xa092
movb (%rbx), %al
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/include/array/array.h
// Function: bool nda::equal<int const, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, int const, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>>(nda::array_ref<int const, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>> const&, nda::array_ref<int const, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>> const&)
NDARRAY_HOST_DEVICE bool equal(const array_ref<TA, ShapeA>& a, const array_ref<TB, ShapeB>& b) {
  if (a.shape().min() != b.shape().min() || a.shape().extent() != b.shape().extent()) {
    return false;
  }

  bool result = true;
  copy_shape_traits<ShapeA, ShapeB>::for_each_value(
      a.shape(), a.base(), b.shape(), b.base(), [&](const TA& a, const TB& b) {
        if (a != b) { result = false; }
      });
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x20(%rdi), %rdx
leaq 0x18(%rsp), %rdi
movq %rcx, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq 0x38(%rsi), %rax
movq 0x8(%rsi), %rcx
movq 0x20(%rsi), %rdx
movq %rsp, %r15
movq %rcx, (%r15)
movq %rdx, 0x8(%r15)
movq %rax, 0x10(%r15)
movq %r15, %rsi
callq 0x8aea
testb %al, %al
jne 0x8ab4
movq 0x40(%r14), %rax
movq 0x10(%r14), %rcx
movq 0x28(%r14), %rdx
leaq 0x48(%rsp), %rdi
movq %rcx, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq 0x40(%rbx), %rax
movq 0x10(%rbx), %rcx
movq 0x28(%rbx), %rdx
leaq 0x30(%rsp), %rsi
movq %rcx, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
callq 0x8aea
testb %al, %al
je 0x8ab8
xorl %eax, %eax
jmp 0x8ae0
movb $0x1, (%rsp)
movq (%r14), %rsi
addq $0x8, %r14
movq (%rbx), %rcx
addq $0x8, %rbx
leaq 0x18(%rsp), %r8
movq %r15, (%r8)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8af4
movb (%rsp), %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq