LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./data.hpp
// Function: Data::addRelation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int addRelation(std::string relation) {
		if (relation_dict.find(relation) == relation_dict.end()) {
			int id = relation_counter;
			relation_dict[relation] = relation_counter;
			relation_dict_rev[relation_counter] = relation;
			++relation_counter;
			return id;
		} else {
			return relation_dict[relation];
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x3918
leaq 0x40(%r14), %rcx
cmpq %rcx, %rax
je 0x37dc
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3864
movl (%rax), %ebp
jmp 0x380f
leaq 0x4(%r14), %r12
movl 0x4(%r14), %ebp
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3864
movl %ebp, (%rax)
leaq 0x98(%r14), %rdi
movq %r12, %rsi
callq 0x38ca
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2130
incl 0x4(%r14)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/cp.cpp
// Function: CP::initializeModel(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, int, std::uniform_real_distribution<double>&)
void initializeModel(std::vector< std::vector<double> >& Vec, const int counter, std::uniform_real_distribution<>& dist){
		for (int i = 0; i < counter; i++) {
			Vec[i].resize(vecDim);
			for (int j = 0; j < vecDim; j++) {
				Vec[i][j] = dist(rnd);
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x208(%rdi), %r13
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, 0x8(%rsp)
cmpq 0x8(%rsp), %rax
je 0x433a
movq %rax, 0x10(%rsp)
imulq $0x18, %rax, %r14
movq (%r15), %rdi
addq %r14, %rdi
movslq 0x200(%r12), %rsi
callq 0x434a
xorl %ebp, %ebp
movslq 0x200(%r12), %rax
cmpq %rax, %rbp
jge 0x4330
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4652
movq (%r15), %rax
movq (%rax,%r14), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
jmp 0x4307
movq 0x10(%rsp), %rax
incq %rax
jmp 0x42e2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/cp.cpp
// Function: CP::computeGradients(Triple&, double)
double computeGradients(Triple& triple, double y) {
		const std::vector<double>& subj_v = subjVec[triple.subj];
		const std::vector<double>& obj_v = objVec[triple.obj];
		const std::vector<double>& relation_v = relationVec[triple.relation];

		op.product(subj_v, obj_v, relation_v, outVec1, outVec2, outVec3);

		double score = op.innerProduct(relation_v, outVec1);

		double yscore = y * score;
		double loss = std::log(1.0 + std::exp(-yscore));
		fs = -(y * sigmoid(-yscore));

		for (int i = 0; i < vecDim; i++) {
			outVec1[i] = fs * outVec1[i];
			outVec2[i] = fs * outVec2[i];
			outVec3[i] = fs * outVec3[i];
		}

		norms[0] = op.norm(outVec1);
		norms[1] = op.norm(outVec2);
		norms[2] = op.norm(outVec3);

		return loss;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq (%rsi), %rax
imulq $0x18, %rax, %rdx
addq 0x30(%rdi), %rdx
movslq 0x4(%rsi), %rax
imulq $0x18, %rax, %rcx
addq 0x48(%rdi), %rcx
movslq 0x8(%rsi), %rax
imulq $0x18, %rax, %r13
addq 0x60(%rdi), %r13
movsd %xmm0, (%rsp)
leaq 0x190(%rdi), %r12
leaq 0x1a8(%rdi), %r15
leaq 0x1c0(%rdi), %r14
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %r8
movq %r12, %r9
pushq %r14
pushq %r15
callq 0x5a50
addq $0x10, %rsp
movq %rbp, %rdi
callq 0x4ac8
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5ace
xorpd 0x125c(%rip), %xmm0     # 0x6030
mulsd (%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
callq 0x2360
addsd 0x122c(%rip), %xmm0     # 0x6018
callq 0x21b0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movapd 0x10(%rsp), %xmm0
callq 0x5afe
xorpd 0x1223(%rip), %xmm0     # 0x6030
mulsd (%rsp), %xmm0
movsd %xmm0, 0x1f0(%rbx)
movl 0x200(%rbx), %eax
movq 0x190(%rbx), %rcx
movq 0x1a8(%rbx), %rdx
movq 0x1c0(%rbx), %rsi
xorl %edi, %edi
testl %eax, %eax
cmovlel %edi, %eax
cmpq %rdi, %rax
je 0x4e7c
movsd 0x1f0(%rbx), %xmm0
mulsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%rcx,%rdi,8)
movsd 0x1f0(%rbx), %xmm0
mulsd (%rdx,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
movsd 0x1f0(%rbx), %xmm0
mulsd (%rsi,%rdi,8), %xmm0
movsd %xmm0, (%rsi,%rdi,8)
incq %rdi
jmp 0x4e3c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b22
movq 0x1d8(%rbx), %rax
movsd %xmm0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b22
movq 0x1d8(%rbx), %rax
movsd %xmm0, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b22
movq 0x1d8(%rbx), %rax
movsd %xmm0, 0x10(%rax)
movsd 0x8(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./random_sampler.hpp
// Function: RandomSampler::negativeSamplingSbj(Triple&, std::set<long long, std::less<long long>, std::allocator<long long>>&)
Triple negativeSamplingSbj(Triple& gold, std::set<long long>& triple_key_set) {
		for (;;) {
			int entity1 = getNextEnt();
			if (triple_key_set.find(key_gen.calcKey(entity1, gold.relation, gold.obj)) == triple_key_set.end()) 
			{
				triple.set(entity1, gold.relation, gold.obj);
				return triple;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x8(%rcx), %rbx
leaq 0x10(%rsp), %r13
movq %r14, %rdi
callq 0x5bb6
movl %eax, %ebp
movl 0x139c(%r14), %eax
imull %ebp, %eax
movl 0x13a0(%r14), %ecx
imull 0x4(%r15), %ecx
addl 0x8(%r15), %eax
addl %ecx, %eax
cltq
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5cbe
cmpq %rbx, %rax
jne 0x50cb
movl %ebp, 0x1388(%r14)
movq 0x4(%r15), %rax
movq %rax, 0x138c(%r14)
movl 0x1398(%r14), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movl 0x1388(%r14), %ecx
movl %ecx, (%rax)
movq 0x138c(%r14), %rcx
movq %rcx, 0x4(%rax)
movl 0x1394(%r14), %ecx
movl %ecx, 0xc(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./random_sampler.hpp
// Function: RandomSampler::negativeSamplingObj(Triple&, std::set<long long, std::less<long long>, std::allocator<long long>>&)
Triple negativeSamplingObj(Triple& gold, std::set<long long>& triple_key_set) {
		for (;;) {
			int entity1 = getNextEnt();
			if (triple_key_set.find(key_gen.calcKey(gold.subj, gold.relation, entity1)) == triple_key_set.end()) 
			{
				triple.set(gold.subj, gold.relation, entity1);
				return triple;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x8(%rcx), %rbx
leaq 0x10(%rsp), %r13
movq %r14, %rdi
callq 0x5bb6
movl 0x139c(%r14), %ecx
imull (%r15), %ecx
movl %eax, %ebp
movl 0x13a0(%r14), %eax
addl 0x8(%r15), %ecx
imull %ebp, %eax
addl %eax, %ecx
movslq %ecx, %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5cbe
cmpq %rbx, %rax
jne 0x517b
movl (%r15), %eax
movl 0x8(%r15), %ecx
movl %eax, 0x1388(%r14)
movl %ebp, 0x138c(%r14)
movl %ecx, 0x1390(%r14)
movl 0x1398(%r14), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movl 0x1388(%r14), %ecx
movl %ecx, (%rax)
movl 0x138c(%r14), %ecx
movl %ecx, 0x4(%rax)
movl 0x1390(%r14), %ecx
movl %ecx, 0x8(%rax)
movl 0x1394(%r14), %ecx
movl %ecx, 0xc(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./signal_operation.hpp
// Function: SignalOperation::product(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
std::vector<double> product(const std::vector<double>& a, const std::vector<double>& b, const std::vector<double>& c, std::vector<double>& out1, std::vector<double>& out2, std::vector<double>& out3) {
		for (int i = 0; i < a.size(); i++) {
			out1[i] = a[i] * b[i];
			out2[i] = b[i] * c[i];
			out3[i] = c[i] * a[i];
		}
		return out1;
	}

// Assembly:
pushq %rbx
movq %r9, %rsi
movq %rdi, %rbx
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movq (%rcx), %rcx
movq (%rsi), %rdi
movq (%r8), %r8
movq (%r9), %r9
movq (%r10), %r10
xorl %r11d, %r11d
cmpq %r11, %rdx
jbe 0x5ac1
movsd (%rax,%r11,8), %xmm0
mulsd (%rcx,%r11,8), %xmm0
movsd %xmm0, (%rdi,%r11,8)
movsd (%rcx,%r11,8), %xmm0
mulsd (%r8,%r11,8), %xmm0
movsd %xmm0, (%r9,%r11,8)
movsd (%r8,%r11,8), %xmm0
mulsd (%rax,%r11,8), %xmm0
movsd %xmm0, (%r10,%r11,8)
incq %r11
jmp 0x5a81
movq %rbx, %rdi
callq 0x5b42
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./signal_operation.hpp
// Function: SignalOperation::innerProduct(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
double innerProduct(const std::vector<double>& a, const std::vector<double>& b) {
		double score = 0.0;
		for (int i = 0; i < a.size(); i++) {
			score += a[i] * b[i];
		}
		return score;
	}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x5afd
movsd (%rax,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
jmp 0x5ae5
retq
// File: /workspace/github_cpp_makefile_star2_O2/lagoproject[P]arti/analysis/primaries.cc
// Function: Usage(char*, int)
void Usage(char *prog, int iverbose=0) {
  cout << endl << "primaries.cc, from ARTI     version " << VERSION << endl<< endl;
  cout << "  Read primary files and produce primary spectrum with and without geomagnetic field" << endl;
  cout << "  Usage: " << prog << " [flags] raw_file" << endl;
  cout << "    If 'raw_file' does not exits, switch to STDIN and use raw_file as" << endl;
  cout << "    basename for output file." << endl;
  cout << "    flags:"<<endl;
  cout << "      -m <n>          : Energy distribution of primaries per type, with <n> bins per decade."<<endl;
  cout << "      -n <a> <t>      : Normalize energy distribution in particles/(m2 s bin), <a>=detector area (m2), <t> = flux time (s)." <<endl;
  cout << "      -g <file> <col> : Include geomagentic effects. Read  rigidities from column <R> of <file>. Default R= " << cGeoCdef <<endl;
  cout << "                        3=R_U, 4=R_C 5=R_L"<<endl;
  cout << "      -v              : Enable verbose output (each -v increases verbosity level)"<< endl;
  cout << "      -?              : prints help and exits"<<endl << endl;
  if (iverbose) {
    // verbose help
  }
  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x3b74(%rip), %rbx      # 0x4fc8
movq %rbx, %rdi
callq 0x1060
leaq 0x1cdc(%rip), %rsi      # 0x313f
movq %rax, %rdi
callq 0x10c0
leaq 0x1cf2(%rip), %rsi      # 0x3164
movq %rax, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1060
leaq 0x1cd8(%rip), %rsi      # 0x3169
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d16(%rip), %rsi      # 0x31be
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x10c0
leaq 0x1d06(%rip), %rsi      # 0x31c8
movq %rax, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d01(%rip), %rsi      # 0x31da
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d30(%rip), %rsi      # 0x3220
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d37(%rip), %rsi      # 0x323e
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d2b(%rip), %rsi      # 0x3249
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1d71(%rip), %rsi      # 0x32a6
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1dd6(%rip), %rsi      # 0x3322
movq %rbx, %rdi
callq 0x10c0
movl 0x3bbe(%rip), %esi      # 0x5118
movq %rax, %rdi
callq 0x1170
movq %rax, %rdi
callq 0x1060
leaq 0x1e1e(%rip), %rsi      # 0x338f
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1e32(%rip), %rsi      # 0x33ba
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
leaq 0x1e6d(%rip), %rsi      # 0x340c
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1060
pushq $0x1
popq %rdi
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/merge.cpp
// Function: next(Seq*)
bool next(Seq* seq) {
    if (seq->source.good()) {
        seq->source >> seq->value;
        return true;
    }
    
    return false;
}

// Assembly:
pushq %rbx
movq 0x8(%rdi), %rax
movq -0x18(%rax), %rax
movl 0x28(%rdi,%rax), %ebx
testl %ebx, %ebx
jne 0x12f3
movq %rdi, %rsi
addq $0x8, %rdi
callq 0x1080
testl %ebx, %ebx
sete %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/merge.cpp
// Function: merge(std::vector<Seq*, std::allocator<Seq*>>&, std::basic_ofstream<char, std::char_traits<char>>&)
void merge(std::vector<Seq*>& sequences, std::ofstream& output) {
    /* Greater<Seq*> comparator for Seq* to create min heap */
    auto comp = []( const Seq* lhs, const Seq* rhs ) { return lhs->value > rhs->value; };
    std::priority_queue<Seq*, std::vector<Seq*>, decltype(comp)> pq(sequences.begin(), sequences.end(), comp);
    
    while(!pq.empty()) {
        /* Get and pop minimum element */
        Seq* top = pq.top();
        pq.pop();
        
        output << top->value << '\n';
        
        /* Since the minimum element is a sequence, if it has a next value,
           we can re-insert into the heap for the next iteration */
        if(next(top)) {
            pq.push(top);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq (%rdi), %rdx
movq 0x8(%rdi), %rcx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
xorl %esi, %esi
callq 0x169c
movq (%rsp), %r14
movq 0x8(%rsp), %r15
subq %r14, %r15
sarq $0x3, %r15
cmpq $0x2, %r15
jl 0x1365
leaq -0x2(%r15), %r12
shrq %r12
movq (%r14,%r12,8), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x158a
addq $-0x1, %r12
jb 0x134d
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x1668
pushq $0xa
popq %rbp
movq %rsp, %r15
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
cmpq %rax, %rdi
je 0x141b
movq (%rdi), %rsi
movq %rsi, 0x20(%rsp)
movq %rax, %rcx
subq %rdi, %rcx
cmpq $0x9, %rcx
jl 0x13c2
leaq -0x8(%rax), %rdx
movq -0x8(%rax), %rcx
movq %rsi, -0x8(%rax)
subq %rdi, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
callq 0x158a
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rsi
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movl (%rsi), %esi
movq %rbx, %rdi
callq 0x1140
movq %rax, %rdi
movl %ebp, %esi
callq 0x10f0
movq 0x20(%rsp), %rdi
callq 0x12d6
testb %al, %al
je 0x1378
movq %r15, %rdi
movq %r14, %rsi
callq 0x1640
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq -0x8(%rsi), %rcx
subq %rdi, %rsi
sarq $0x3, %rsi
decq %rsi
xorl %edx, %edx
callq 0x1604
jmp 0x1378
movq %rsp, %rdi
callq 0x1668
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1668
leaq 0x20(%rsp), %rdi
jmp 0x1448
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1668
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/merge.cpp
// Function: main
int main(int argc, char *argv[]) {
    /* Must provide -o and -f */
    if (argc < 5 || strncmp(argv[1], "-o", 3) != 0 || strncmp(argv[3], "-f", 3) != 0) {
        printUsage(argv[0]);
        return 1;
    }
    
    char* outputFilename = argv[2];
    std::ofstream output(outputFilename);
    
    std::vector<Seq*> sequences = std::vector<Seq*>();
    
    for (int i = 4; i < argc; i++) {
        char* inputFilename = argv[i];
        Seq* seq = new Seq(inputFilename);
        if(next(seq)) {
            sequences.push_back(seq);
        }
    }
    
    merge(sequences, output);
    output.close();
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
cmpl $0x5, %edi
jl 0x1498
movq 0x8(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x1498
cmpb $0x6f, 0x1(%rax)
jne 0x1498
cmpb $0x0, 0x2(%rax)
jne 0x1498
movq 0x18(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x1498
cmpb $0x66, 0x1(%rax)
jne 0x1498
cmpb $0x0, 0x2(%rax)
je 0x14b5
movq (%rbx), %rdi
callq 0x129c
pushq $0x1
popq %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %ebp
movq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x10e0
movl %ebp, %ebp
leaq 0x10(%rsp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
pushq $0x4
popq %r15
cmpq %rbp, %r15
jae 0x1523
movq (%rbx,%r15,8), %r13
movl $0x210, %edi            # imm = 0x210
callq 0x10c0
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
callq 0x1634
movq %r12, 0x8(%rsp)
movq %r12, %rdi
callq 0x12d6
testb %al, %al
je 0x151e
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0x1640
incq %r15
jmp 0x14df
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x12fa
leaq 0x28(%rsp), %rdi
callq 0x1100
leaq 0x10(%rsp), %rdi
callq 0x1668
leaq 0x28(%rsp), %rdi
callq 0x1110
xorl %eax, %eax
jmp 0x14a3
jmp 0x156b
movq %rax, %rbx
movl $0x210, %esi            # imm = 0x210
movq %r12, %rdi
callq 0x10d0
jmp 0x156e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1668
leaq 0x28(%rsp), %rdi
callq 0x1110
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/quantizedcp.cpp
// Function: QuantizeCP::computeGradients(Triple&, double)
double computeGradients(Triple& triple, double y) {
		const std::vector<double>& subj_v = subjVec[triple.subj];
		const std::vector<double>& obj_v = objVec[triple.obj];
		const std::vector<double>& relation_v = relationVec[triple.relation];

		double score = op.qproduct(subj_v, obj_v, relation_v, outVec1, outVec2, outVec3);

		// double score = op.innerProduct(relation_v, outVec1);

		double yscore = y * score;
		double loss = std::log(1.0 + std::exp(-yscore));
		fs = -(y * sigmoid(-yscore));

		for (int i = 0; i < vecDim; i++) {
			outVec1[i] = fs * outVec1[i];
			outVec2[i] = fs * outVec2[i];
			outVec3[i] = fs * outVec3[i];
		}

		norms[0] = op.norm(outVec1);
		norms[1] = op.norm(outVec2);
		norms[2] = op.norm(outVec3);

		return loss;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq (%rsi), %rax
imulq $0x18, %rax, %rax
addq 0x30(%rdi), %rax
movslq 0x4(%rsi), %rcx
imulq $0x18, %rcx, %rdx
addq 0x48(%rdi), %rdx
movslq 0x8(%rsi), %rcx
imulq $0x18, %rcx, %rcx
addq 0x60(%rdi), %rcx
movsd %xmm0, 0x10(%rsp)
leaq 0x190(%rdi), %r12
leaq 0x1a8(%rdi), %r15
leaq 0x1c0(%rdi), %r14
movq %r14, (%rsp)
movq %rax, %rsi
movq %r12, %r8
movq %r15, %r9
callq 0x5a24
xorpd 0x12c4(%rip), %xmm0     # 0x6040
mulsd 0x10(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
callq 0x2360
addsd 0x1283(%rip), %xmm0     # 0x6018
callq 0x21b0
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
movapd 0x20(%rsp), %xmm0
callq 0x5af4
xorpd 0x128a(%rip), %xmm0     # 0x6040
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x1f0(%rbx)
movl 0x1f8(%rbx), %eax
movq 0x190(%rbx), %rcx
movq 0x1a8(%rbx), %rdx
movq 0x1c0(%rbx), %rsi
xorl %edi, %edi
testl %eax, %eax
cmovlel %edi, %eax
cmpq %rdi, %rax
je 0x4e26
movsd 0x1f0(%rbx), %xmm0
mulsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%rcx,%rdi,8)
movsd 0x1f0(%rbx), %xmm0
mulsd (%rdx,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
movsd 0x1f0(%rbx), %xmm0
mulsd (%rsi,%rdi,8), %xmm0
movsd %xmm0, (%rsi,%rdi,8)
incq %rdi
jmp 0x4de6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5b18
movq 0x1d8(%rbx), %rax
movsd %xmm0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5b18
movq 0x1d8(%rbx), %rax
movsd %xmm0, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5b18
movq 0x1d8(%rbx), %rax
movsd %xmm0, 0x10(%rax)
movsd 0x18(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./signal_operation.hpp
// Function: SignalOperation::qproduct(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
double qproduct(const std::vector<double>& a, const std::vector<double>& b, const std::vector<double>& c, std::vector<double>& out1, std::vector<double>& out2, std::vector<double>& out3){
		double score = 0.0;
		for(int i = 0; i < a.size(); i++){
			double a_ = quantize(a[i]);
			double b_ = quantize(b[i]);
			double c_ = quantize(c[i]);
			out1[i] = a_ * b_;
			out2[i] = b_ * c_;
			out3[i] = c_ * a_;
			score += c_ * out1[i];
		}
		return score;
	}

// Assembly:
movq 0x8(%rsp), %r10
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movq (%rdx), %rdx
movq (%rcx), %rcx
movq (%r8), %rdi
movq (%r9), %r8
movq (%r10), %r9
xorpd %xmm1, %xmm1
xorl %r10d, %r10d
movsd 0x5db(%rip), %xmm2      # 0x6030
movsd 0x5db(%rip), %xmm3      # 0x6038
xorpd %xmm0, %xmm0
cmpq %r10, %rsi
je 0x5af3
movsd (%rax,%r10,8), %xmm4
cmpltsd %xmm1, %xmm4
movapd %xmm4, %xmm5
andpd %xmm2, %xmm5
andnpd %xmm3, %xmm4
orpd %xmm5, %xmm4
movsd (%rdx,%r10,8), %xmm5
cmpltsd %xmm1, %xmm5
movapd %xmm5, %xmm6
andpd %xmm2, %xmm6
andnpd %xmm3, %xmm5
orpd %xmm6, %xmm5
movsd (%rcx,%r10,8), %xmm6
cmpltsd %xmm1, %xmm6
movapd %xmm6, %xmm7
andpd %xmm2, %xmm7
andnpd %xmm3, %xmm6
orpd %xmm7, %xmm6
movapd %xmm6, %xmm7
mulsd %xmm4, %xmm7
mulsd %xmm5, %xmm4
movsd %xmm4, (%rdi,%r10,8)
mulsd %xmm6, %xmm5
movsd %xmm5, (%r8,%r10,8)
movsd %xmm7, (%r9,%r10,8)
movsd (%rdi,%r10,8), %xmm4
mulsd %xmm6, %xmm4
addsd %xmm4, %xmm0
incq %r10
jmp 0x5a61
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH06_Functions/examples/refret-ex.cc
// Function: main
int main() {
    int ia[10];  // array of ten uninitialized ints

    for (int i = 0; i != 10; ++i)
        get(ia, i) = i;  // call get to assign values to the elements

	for (auto i : ia)    // print the elements
		cout << i << " ";
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0xa, %rax
je 0x11e7
movl %eax, -0x40(%rbp,%rax,4)
incq %rax
jmp 0x11d8
xorl %r15d, %r15d
movq 0x2de7(%rip), %rbx      # 0x3fd8
leaq 0xe0c(%rip), %r14       # 0x2004
cmpq $0x28, %r15
je 0x121c
movl -0x40(%rbp,%r15), %esi
movq %rbx, %rdi
callq 0x1070
movq %rax, %rdi
movq %r14, %rsi
callq 0x1050
addq $0x4, %r15
jmp 0x11f8
movq 0x2db5(%rip), %rdi      # 0x3fd8
callq 0x1030
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: buildQuery()
void buildQuery()
{
    memset(query, '\0', sizeof(query));

    time_t now = time(nullptr);
    now += 20637;
    now = bswap_32(now) >> 16;

    query[24] = 0xE2;
    query[25] = 0x07;
    query[26] = 0x0C;
    query[27] = 0x09;
    query[28] = now >> 8;
    query[29] = now & 0x00FF;
}

// Assembly:
pushq %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x5d63(%rip)     # 0x8290
movaps %xmm0, 0x5d4c(%rip)     # 0x8280
movaps %xmm0, 0x5d35(%rip)     # 0x8270
movaps %xmm0, 0x5d1e(%rip)     # 0x8260
movaps %xmm0, 0x5d07(%rip)     # 0x8250
movaps %xmm0, 0x5cf0(%rip)     # 0x8240
movaps %xmm0, 0x5cd9(%rip)     # 0x8230
movaps %xmm0, 0x5cc2(%rip)     # 0x8220
xorl %edi, %edi
callq 0x21f0
addl $0x509d, %eax           # imm = 0x509D
bswapl %eax
movl %eax, %ecx
shrl $0x10, %ecx
movl $0x90c07e2, 0x5cbd(%rip) # imm = 0x90C07E2
shrl $0x18, %eax
movb %al, 0x5cb8(%rip)       # 0x823c
movb %cl, 0x5cb3(%rip)       # 0x823d
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: initializeCommand(command&)
void initializeCommand(command& c)
{
    memset(&c, '\0', sizeof(command));

    c.cmd     = MODIFY_SWITCH;
    c.counter = 0x55555555;
    c.type    = 2;
    c.op      = 2;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x72(%rdi)
movups %xmm0, 0x4(%rdi)
movups %xmm0, 0x64(%rdi)
movups %xmm0, 0x54(%rdi)
movups %xmm0, 0x44(%rdi)
movups %xmm0, 0x34(%rdi)
movups %xmm0, 0x24(%rdi)
movups %xmm0, 0x14(%rdi)
movl $0x50016, (%rdi)        # imm = 0x50016
movl $0x55555555, 0x74(%rdi) # imm = 0x55555555
movw $0x2, 0x8(%rdi)
movb $0x2, 0x80(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: toggle(unsigned long, bool)
void toggle(size_t ndx, bool on)
{
    response r = gFound.at(ndx);

    srand(time(nullptr));
    int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    struct sockaddr_in target = buildServerType(inet_addr(r.ip), COMMAND_PORT);

    command toggle;
    initializeCommand(toggle);

    toggle.id = rand();
    memcpy(toggle.model, r.model, 32);
    toggle.value = on;

    ssize_t sent = sendto(sock, &toggle, sizeof(command), 0, (sockaddr*)&target, sizeof(target));
    close(sock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x5cf3(%rip), %rdi      # 0x82d8
callq 0x318e
leaq 0x98(%rsp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
movq %rax, %rsi
callq 0x21b0
xorl %edi, %edi
callq 0x21f0
movl %eax, %edi
callq 0x2210
pushq $0x2
popq %rdi
pushq $0x11
popq %rdx
movl %edi, %esi
callq 0x2070
movl %eax, %ebp
leaq 0x21a(%rsp), %rdi
callq 0x2240
shlq $0x20, %rax
orq $0x50000002, %rax       # imm = 0x50000002
movq %rsp, %r15
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
xorps %xmm0, %xmm0
leaq 0x14(%rsp), %r12
movups %xmm0, 0x6a(%r12)
movups %xmm0, 0x5a(%r12)
movups %xmm0, 0x4a(%r12)
movups %xmm0, 0x3a(%r12)
movups %xmm0, 0x2a(%r12)
movups %xmm0, 0x1a(%r12)
movups %xmm0, 0xa(%r12)
andq $0x0, 0x78(%r12)
movl $0x50016, (%r12)        # imm = 0x50016
movl $0x55555555, 0x74(%r12) # imm = 0x55555555
movw $0x2, 0x8(%r12)
movb $0x2, 0x80(%r12)
callq 0x2090
movl %eax, 0x4(%r12)
movups 0xa(%r14), %xmm0
movups 0x1a(%r14), %xmm1
movups %xmm0, 0x10(%r12)
movups %xmm1, 0x20(%r12)
movb %bl, 0x81(%r12)
pushq $0x10
popq %r9
movl $0x82, %edx
movl %ebp, %edi
movq %r12, %rsi
xorl %ecx, %ecx
movq %r15, %r8
callq 0x2040
movl %ebp, %edi
callq 0x23a0
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: printTargets(bool)
void printTargets(bool cache)
{
    printf("Found (%zd)\n", gFound.size());

    int32_t count = 0;
    auto iter = gFound.begin();
    while(iter != gFound.end())
    {
        printf("[%d] %s\n", count, iter->name);
        if(cache)
        {
            FILE* json = fopen("cache.json", "a");
            fprintf(json, "{\"name\":\"%s\",\"parameters\":{\"ip\":\"%s\",\"model\":\"%s\"}}\n", iter->name, iter->ip, iter->model);
            fclose(json);
        }
        count++;
        iter++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x5bda(%rip), %rax      # 0x82e0
subq 0x5bcb(%rip), %rax      # 0x82d8
movl $0x198, %ecx            # imm = 0x198
cqto
idivq %rcx
leaq 0x28e6(%rip), %rdi      # 0x5004
movq %rax, %rsi
xorl %eax, %eax
callq 0x2030
movq 0x5ba9(%rip), %r13      # 0x82d8
leaq 0x28db(%rip), %r14      # 0x5011
xorl %ebp, %ebp
cmpq 0x5ba1(%rip), %r13      # 0x82e0
je 0x27a0
leaq 0x2a(%r13), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2030
testb %bl, %bl
je 0x2795
leaq 0x28bb(%rip), %rdi      # 0x501a
leaq 0x28bf(%rip), %rsi      # 0x5025
callq 0x2260
movq %rax, %r12
leaq 0x182(%r13), %rcx
leaq 0xa(%r13), %r8
movq %rax, %rdi
leaq 0x28a4(%rip), %rsi      # 0x5027
movq %r15, %rdx
xorl %eax, %eax
callq 0x22a0
movq %r12, %rdi
callq 0x2220
incl %ebp
addq $0x198, %r13            # imm = 0x198
jmp 0x2738
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: quit(int)
void quit(int sock)
{
    gKeepGoing = false;
    pthread_join(gRecvP1, nullptr);
    pthread_join(gRecvP1, nullptr);

    printTargets(true);

    close(sock);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movb $0x0, 0x5a2f(%rip)      # 0x81e8
movq 0x5b08(%rip), %rdi      # 0x82c8
xorl %esi, %esi
callq 0x21e0
movq 0x5afa(%rip), %rdi      # 0x82c8
xorl %esi, %esi
callq 0x21e0
pushq $0x1
popq %rdi
callq 0x26f2
movl %ebx, %edi
popq %rbx
jmp 0x23a0
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: recvBroadcast(void*)
void* recvBroadcast(void* arg)
{
    broadcastParams* params = (broadcastParams*)arg;

    struct sockaddr_in server = buildServerType(INADDR_BROADCAST, params->port);

    response target;
    socklen_t length;
    uint8_t buffer[RESPONSE_SIZE];

    while(gKeepGoing)
    {
        ssize_t recv = recvfrom(params->socket, buffer, RESPONSE_SIZE, 0, (sockaddr*)&server, &length);
        memcpy(&target, buffer, RESPONSE_SIZE);

        std::lock_guard<std::mutex> lock(gResponseMutex);

        bool found = false;
        auto iter = gFound.begin();
        while(iter != gFound.end())
        {
            if(!strcmp(iter->serial, target.serial))
            {
                found = true;
                break;
            }
            iter++;
        }
        if(!found)
        {
            gFound.push_back(target);
        }
    }

    return nullptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rdi, %rbx
movzwl 0x4(%rdi), %eax
rolw $0x8, %ax
shll $0x10, %eax
movabsq $-0xfffffffe, %rcx      # imm = 0xFFFFFFFF00000002
orq %rax, %rcx
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x62(%rsp), %r15
leaq 0x1b0(%rsp), %r12
leaq 0x5a52(%rip), %r14      # 0x82a0
cmpb $0x1, 0x5993(%rip)      # 0x81e8
jne 0x28d6
movl (%rbx), %edi
movl $0x198, %edx            # imm = 0x198
movq %r12, %rsi
xorl %ecx, %ecx
leaq 0x8(%rsp), %r8
leaq 0x4(%rsp), %r9
callq 0x2190
movl $0x198, %edx            # imm = 0x198
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x3220
movq 0x5a45(%rip), %r13      # 0x82d8
movq 0x5a46(%rip), %rbp      # 0x82e0
cmpq %rbp, %r13
je 0x28b8
leaq 0x4a(%r13), %rdi
movq %r15, %rsi
callq 0x2280
addq $0x198, %r13            # imm = 0x198
testl %eax, %eax
jne 0x289a
jmp 0x28c9
leaq 0x5a19(%rip), %rdi      # 0x82d8
leaq 0x18(%rsp), %rsi
callq 0x31b0
movq %r14, %rdi
callq 0x2180
jmp 0x284e
xorl %eax, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x59ac(%rip), %rdi      # 0x82a0
callq 0x2180
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: discover()
void discover()
{
    int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    if(sock < 0) return;

    int32_t broadcast = 1;
    int ret = setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast));
    if(ret != 0) return;

    struct sockaddr_in server = buildServerType(INADDR_BROADCAST, DISCOVER_PORT1);

    broadcastParams params1;
    params1.socket = sock;
    params1.port = DISCOVER_PORT1;
    broadcastParams params2 = params1;
    params2.port = DISCOVER_PORT2;

    pthread_t watchDog;
    pthread_create(&gRecvP1,  nullptr, recvBroadcast, &params1);
    pthread_create(&gRecvP1,  nullptr, recvBroadcast, &params2);
    pthread_create(&watchDog, nullptr, timeoutThread, &sock);

    buildQuery();

    int32_t count = 0;
    ssize_t sent = sendto(sock, query, QUERY_SIZE, 0, (sockaddr*)&server, sizeof(server));
    while(sent == QUERY_SIZE && count < ATTTEMPTS && gKeepGoing)
    {
        count++;
        server.sin_port = server.sin_port == htons(DISCOVER_PORT1) ? htons(DISCOVER_PORT2): htons(DISCOVER_PORT1);
        usleep(1000*72);
        buildQuery();

        sent = sendto(sock, query, QUERY_SIZE, 0, (sockaddr*)&server, sizeof(server));
    }

    quit(sock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
pushq $0x2
popq %rdi
pushq $0x11
popq %rdx
movl %edi, %esi
callq 0x2070
movl %eax, 0x8(%rsp)
testl %eax, %eax
js 0x2a5a
movl %eax, %ebp
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x2370
testl %eax, %eax
jne 0x2a5a
movabsq $-0xe6fffffe, %rax      # imm = 0xFFFFFFFF19000002
leaq 0x10(%rsp), %rbx
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
leaq 0x30(%rsp), %rcx
movl %ebp, (%rcx)
movw $0x19, 0x4(%rcx)
movq (%rcx), %rax
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
movw $0x1700, 0x4(%r14)      # imm = 0x1700
leaq 0x593d(%rip), %r15      # 0x82c8
leaq -0x191(%rip), %r12      # 0x2801
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2380
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2380
leaq -0x1d4(%rip), %rdx      # 0x27e5
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %r14
xorl %esi, %esi
movq %r14, %rcx
callq 0x2380
callq 0x2522
movl (%r14), %edi
leaq 0x5844(%rip), %r14      # 0x8220
pushq $0x10
popq %rbp
movl $0x80, %edx
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x2040
pushq $0x17
popq %r15
cmpq $0x80, %rax
jne 0x2a51
cmpl $0xd, %r13d
ja 0x2a51
cmpb $0x1, 0x57db(%rip)      # 0x81e8
jne 0x2a51
incl %r13d
cmpw $0x1900, 0x12(%rsp)     # imm = 0x1900
movl $0x1900, %eax           # imm = 0x1900
cmovel %r15d, %eax
movw %ax, 0x12(%rsp)
movl $0x11940, %edi          # imm = 0x11940
callq 0x2290
callq 0x2522
movl 0x8(%rsp), %edi
movl $0x80, %edx
movq %r14, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x2040
jmp 0x29f8
movl 0x8(%rsp), %edi
callq 0x27af
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: discoverWemo()
void discoverWemo()
{
    int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
    if(sock < 0) return;

    int32_t broadcast = 1;
    int ret = setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &broadcast, sizeof(broadcast));
    if(ret != 0) return;

    struct sockaddr_in server = buildServerType(inet_addr(SSDP), DISCOVER_WEMO);
    server.sin_port = htons(DISCOVER_WEMO);

    broadcastParams params1;
    params1.socket = sock;
    params1.port = DISCOVER_WEMO;

    pthread_t watchDog;
    pthread_create(&gRecvP1,  nullptr, recvBroadcast, &params1);
    pthread_create(&watchDog, nullptr, timeoutThread, &sock);

    const char* packet =
"M-SEARCH * HTTP/1.1\r\n"\
"HOST: 239.255.255.250:1900\r\n"\
"MAN: \"ssdp:discover\"\r\n"\
"MX: 10\r\n"\
//"ST: ssdp:all\r\n";
"ST: urn:Belkin:device:controllee:1\r\n\r\n";

    ssize_t sent = sendto(sock, packet, strlen(packet), 0, (sockaddr*)&server, sizeof(server));
    usleep(1000*1000*1);

    quit(sock);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
pushq $0x2
popq %rdi
pushq $0x11
popq %rdx
movl %edi, %esi
callq 0x2070
movl %eax, (%rsp)
testl %eax, %eax
js 0x2b3e
movl %eax, %ebx
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
pushq $0x1
popq %rsi
pushq $0x6
popq %rdx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x2370
testl %eax, %eax
jne 0x2b3e
leaq 0x25a7(%rip), %rdi      # 0x505c
callq 0x2240
shlq $0x20, %rax
orq $0x6c070002, %rax       # imm = 0x6C070002
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
andq $0x0, 0x8(%r14)
movw $0x6c07, 0x2(%r14)      # imm = 0x6C07
leaq 0x10(%rsp), %rcx
movl %ebx, (%rcx)
movw $0x76c, 0x4(%rcx)       # imm = 0x76C
leaq 0x57dc(%rip), %rdi      # 0x82c8
leaq -0x2f2(%rip), %rdx      # 0x2801
xorl %esi, %esi
callq 0x2380
leaq -0x31c(%rip), %rdx      # 0x27e5
leaq 0x8(%rsp), %rdi
movq %rsp, %rbx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2380
movl (%rbx), %edi
leaq 0x2550(%rip), %rsi      # 0x506c
pushq $0x75
popq %rdx
pushq $0x10
popq %r9
xorl %ecx, %ecx
movq %r14, %r8
callq 0x2040
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x2290
movl (%rbx), %edi
callq 0x27af
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: addCachedTarget(set_target&)
void addCachedTarget(set_target& t)
{
    response r;
    memset(&r, '\0', RESPONSE_SIZE);

    memcpy(r.name, t.get_name(), strlen(t.get_name()));
    memcpy(r.ip, t.get_ip(), strlen(t.get_ip()));
    memcpy(r.model, t.get_model(), strlen(t.get_model()));
    gFound.push_back(r);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %r14
movq %rsp, %rbx
movl $0x198, %edx            # imm = 0x198
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x2a(%rsp), %r15
leaq 0x8(%r14), %r12
movq %r12, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x21b0
leaq 0x182(%rsp), %r15
leaq 0x48(%r14), %r12
movq %r12, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x21b0
leaq 0xa(%rsp), %r15
addq $0x88, %r14
movq %r14, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
leaq 0x5592(%rip), %rdi      # 0x82d8
movq %rbx, %rsi
callq 0x31b0
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/main.cpp
// Function: loop()
void loop()
{
    int fd = open("/sys/class/gpio/export", O_WRONLY);
    if(fd < 0) return;

    size_t written = write(fd, "24", 2);
    close(fd);

    fd = open("/sys/class/gpio/gpio24/direction", O_WRONLY);
    if(fd < 0) return;

    if(write(fd, "in", 2) < 0) return;
    close(fd);

    char valueString[3];
    fd = open("/sys/class/gpio/gpio24/value", O_RDONLY);
    while(read(fd, valueString, 3) > 0)
    {
        close(fd);

        int32_t value = atoi(valueString);
        printf("%d\n", value);
        toggle(0, value ? true: false);
        usleep(1000*1000);
        fd = open("/sys/class/gpio/gpio24/value", O_RDONLY);
        if(fd < 0) return;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x250a(%rip), %rdi      # 0x527a
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x2170
testl %eax, %eax
js 0x2e57
movl %eax, %ebx
leaq 0x2506(%rip), %rsi      # 0x5291
pushq $0x2
popq %rdx
movl %eax, %edi
callq 0x20b0
movl %ebx, %edi
callq 0x23a0
leaq 0x24f1(%rip), %rdi      # 0x5294
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x2170
testl %eax, %eax
js 0x2e57
movl %eax, %ebx
leaq 0x24f7(%rip), %rsi      # 0x52b5
pushq $0x2
popq %rdx
movl %eax, %edi
callq 0x20b0
testq %rax, %rax
js 0x2e57
movl %ebx, %edi
callq 0x23a0
leaq 0x24d9(%rip), %rbx      # 0x52b8
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2170
movl %eax, %ebp
leaq 0xd(%rsp), %r14
pushq $0x3
popq %r15
leaq 0x2479(%rip), %r12      # 0x5276
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22b0
testq %rax, %rax
jle 0x2e57
movl %ebp, %edi
callq 0x23a0
movq %r14, %rdi
callq 0x2310
movl %eax, %ebp
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2030
xorl %esi, %esi
testl %ebp, %ebp
setne %sil
xorl %edi, %edi
callq 0x25ca
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x2290
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2170
movl %eax, %ebp
testl %eax, %eax
jns 0x2dfd
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/parser.cpp
// Function: target::populate(container_object*)
void target::populate(container_object* obj)
{
    for(int i = 0; i < obj->child_count(); i++)
    {
        object* child = obj->at(i);
        switch(child->get_type())
        {
            case LONG:
                break;
            case STRING:
                assert(!strcmp("name", child->get_name()));
                memset(m_name, '\0', MAX_BUFFER_SIZE);
                memcpy(m_name, child->get_string_value(), strlen(child->get_string_value()));
                break;
            case CONTAINER:
                assert(!strcmp("parameters", child->get_name()));
                container_object* container = (container_object*)child;
                populate_specific(container);
                break;
        }
        delete child;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebp, %ebp
movq 0x58(%rbx), %rax
subq 0x50(%rbx), %rax
shrq $0x3, %rax
cmpl %eax, %ebp
jge 0x346e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x39d2
movq %rax, %r12
movl 0x48(%rax), %eax
cmpl $0x2, %eax
je 0x343d
cmpl $0x1, %eax
jne 0x345f
movq %r12, %rsi
addq $0x8, %rsi
leaq 0x1fd1(%rip), %rdi      # 0x53bc
callq 0x2280
testl %eax, %eax
jne 0x347d
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq %rax, %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21b0
jmp 0x345f
movq %r12, %rsi
addq $0x8, %rsi
leaq 0x1fce(%rip), %rdi      # 0x5419
callq 0x2280
testl %eax, %eax
jne 0x3496
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
callq *(%rax)
movq %r12, %rdi
callq 0x2200
incl %ebp
jmp 0x33ab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f3d(%rip), %rdi      # 0x53c1
leaq 0x1f59(%rip), %rsi      # 0x53e4
leaq 0x1f5d(%rip), %rcx      # 0x53ef
pushq $0x57
jmp 0x34ad
leaq 0x1f87(%rip), %rdi      # 0x5424
leaq 0x1f40(%rip), %rsi      # 0x53e4
leaq 0x1f44(%rip), %rcx      # 0x53ef
pushq $0x5c
popq %rdx
callq 0x2150
nop
// File: /workspace/github_cpp_makefile_star2_O2/blakewford[P]kab/parser.cpp
// Function: set_target::populate_specific(container_object*)
void set_target::populate_specific(container_object* obj)
{
    container_object* container = (container_object*)obj;
    for(int i = 0; i < container->child_count(); i++)
    {
        object* param = container->at(i);
        const char* name = param->get_name();
        if(!strcmp(name, "ip"))
        {
            memcpy(m_ip, param->get_string_value(), strlen(param->get_string_value()));
        }
        else if(!strcmp(name, "model"))
        {
            memcpy(m_model, param->get_string_value(), strlen(param->get_string_value()));
        }
        else
        {
            assert(0);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x88(%rdi), %r15
addq $0x48, %rdi
movq %rdi, (%rsp)
xorl %ebp, %ebp
movq 0x58(%rbx), %rax
subq 0x50(%rbx), %rax
shrq $0x3, %rax
cmpl %eax, %ebp
jge 0x3558
movq %rbx, %rdi
movl %ebp, %esi
callq 0x39d2
movq %rax, %r12
cmpb $0x69, 0x8(%rax)
jne 0x350a
cmpb $0x70, 0x9(%r12)
jne 0x350a
cmpb $0x0, 0xa(%r12)
movq (%rsp), %r13
je 0x3524
movq %r12, %rdi
addq $0x8, %rdi
leaq 0x1f35(%rip), %rsi      # 0x544d
callq 0x2280
movq %r15, %r13
testl %eax, %eax
jne 0x3567
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq %rax, %r14
movq (%r12), %rax
movq %r12, %rdi
callq *0x8(%rax)
movq %rax, %rdi
callq 0x20f0
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21b0
incl %ebp
jmp 0x34d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f5e(%rip), %rdi      # 0x54cc
leaq 0x1e6f(%rip), %rsi      # 0x53e4
leaq 0x1ed7(%rip), %rcx      # 0x5453
pushq $0x76
popq %rdx
callq 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/ska_flat_hash_map/test.cpp
// Function: test_int(unsigned int, unsigned int)
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	ska::flat_hash_map<uint32_t, uint32_t, Hash32> h;
	h.max_load_factor(0.75f);
	for (i = 0, x = x0; i < n; ++i) {
		x = hash32(x);
#ifndef UDB2_TEST_DEL
		z += ++h[get_key(n, x)];
#else
		auto p = h.insert(std::pair<uint32_t, uint32_t>(get_key(n, x), i));
		if (p.second == false) h.erase(p.first);
#endif
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u\n", h.size(), z);
	return h.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebp
movl %edi, %ebx
callq 0x1656
leaq 0x10(%rsp), %r14
movq %rax, (%r14)
andq $0x0, 0x8(%r14)
movw $0x33f, 0x10(%r14)      # imm = 0x33F
andq $0x0, 0x18(%r14)
movl $0x3f400000, 0x14(%r14) # imm = 0x3F400000
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
cmpl %r12d, %ebx
je 0x1559
movl %ebp, %edi
callq 0x126c
movl %eax, %ebp
movl %ebx, %edi
movl %eax, %esi
callq 0x1297
movl %eax, 0x8(%rsp)
movl %r12d, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x16a6
testb $0x1, %dl
jne 0x1554
movq %r14, %rdi
movq %rax, %rsi
callq 0x15ae
incl %r12d
jmp 0x1519
movq 0x2a80(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
leaq 0x10(%rsp), %rbx
movq 0x18(%rbx), %rdx
leaq 0xb32(%rip), %rsi       # 0x20a5
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x10f0
movl 0x18(%rbx), %ebp
movq %rbx, %rdi
callq 0x15da
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1598
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x15da
movq %rbx, %rdi
callq 0x1110
nop
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/ska_flat_hash_map/./flat_hash_map.hpp
// Function: ska::detailv3::sherwood_v3_table<std::pair<unsigned int, unsigned int>, unsigned int, Hash32, ska::detailv3::KeyOrValueHasher<unsigned int, std::pair<unsigned int, unsigned int>, Hash32>, std::equal_to<unsigned int>, ska::detailv3::KeyOrValueEquality<unsigned int, std::pair<unsigned int, unsigned int>, std::equal_to<unsigned int>>, std::allocator<std::pair<unsigned int, unsigned int>>, std::allocator<ska::detailv3::sherwood_v3_entry<std::pair<unsigned int, unsigned int>>>>::erase(ska::detailv3::sherwood_v3_table<std::pair<unsigned int, unsigned int>, unsigned int, Hash32, ska::detailv3::KeyOrValueHasher<unsigned int, std::pair<unsigned int, unsigned int>, Hash32>, std::equal_to<unsigned int>, ska::detailv3::KeyOrValueEquality<unsigned int, std::pair<unsigned int, unsigned int>, std::equal_to<unsigned int>>, std::allocator<std::pair<unsigned int, unsigned int>>, std::allocator<ska::detailv3::sherwood_v3_entry<std::pair<unsigned int, unsigned int>>>>::templated_iterator<std::pair<unsigned int, unsigned int> const>)
convertible_to_iterator erase(const_iterator to_erase)
    {
        EntryPointer current = to_erase.current;
        current->destroy_value();
        --num_elements;
        for (EntryPointer next = current + ptrdiff_t(1); !next->is_at_desired_position(); ++current, ++next)
        {
            current->emplace(next->distance_from_desired - 1, std::move(next->value));
            next->destroy_value();
        }
        return { to_erase.current };
    }

// Assembly:
movq %rsi, %rax
movb $-0x1, (%rsi)
decq 0x18(%rdi)
leaq 0x10(%rsi), %rcx
movb -0x4(%rcx), %dl
testb %dl, %dl
jle 0x15d9
decb %dl
movq (%rcx), %rsi
movq %rsi, -0xc(%rcx)
movb %dl, -0x10(%rcx)
movb $-0x1, -0x4(%rcx)
addq $0xc, %rcx
jmp 0x15bc
retq
// File: /workspace/github_cpp_makefile_star2_O2/attractivechaos[P]udb2/ska_flat_hash_map/./flat_hash_map.hpp
// Function: ska::detailv3::sherwood_v3_table<std::pair<unsigned int, unsigned int>, unsigned int, Hash32, ska::detailv3::KeyOrValueHasher<unsigned int, std::pair<unsigned int, unsigned int>, Hash32>, std::equal_to<unsigned int>, ska::detailv3::KeyOrValueEquality<unsigned int, std::pair<unsigned int, unsigned int>, std::equal_to<unsigned int>>, std::allocator<std::pair<unsigned int, unsigned int>>, std::allocator<ska::detailv3::sherwood_v3_entry<std::pair<unsigned int, unsigned int>>>>::clear()
void clear()
    {
        for (EntryPointer it = entries, end = it + static_cast<ptrdiff_t>(num_slots_minus_one + max_lookups); it != end; ++it)
        {
            if (it->has_value())
                it->destroy_value();
        }
        num_elements = 0;
    }

// Assembly:
movq (%rdi), %rax
imulq $0xc, 0x8(%rdi), %rdx
movsbq 0x11(%rdi), %rcx
imulq $0xc, %rcx, %rcx
addq %rdx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x162b
cmpb $0x0, (%rax,%rdx)
js 0x1625
movb $-0x1, (%rax,%rdx)
addq $0xc, %rdx
jmp 0x1616
andq $0x0, 0x18(%rdi)
retq