LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: dijkstra(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, std::priority_queue<std::tuple<int, int>, std::vector<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>, std::greater<std::tuple<int, int>>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<bool, std::allocator<bool>>&)
void dijkstra(const vector<ivec>& adj, PQ& pq, ivec& target, ivec& target_dist, vector<bool>& visited) {
    while(!pq.empty()) {
        int u, du;
        std::tie(du, u) = pq.top();
        pq.pop();
        if(visited[u]) {
            continue;
        }
        visited[u] = true;

        if(du != target_dist[u]) {
            fprintf(stderr, "u=%d, du=%d, target_dist[%d]=%d\n", u, du, u, target_dist[u]);
        }
        for(int v: adj[u]) {
            int dv = target_dist[v];
            if(dv == -1 || iipair(du+1, target[u]) < iipair(dv, target[v])) {
                target_dist[v] = du+1;
                target[v] = target[u];
                pq.emplace(du+1, v);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, 0x20(%rsp)
movq %rsi, %r12
movq %rdi, 0x18(%rsp)
movq (%r12), %rax
cmpq 0x8(%r12), %rax
je 0x817d
movl 0x4(%rax), %ecx
movq %rcx, 0x10(%rsp)
movslq (%rax), %rbp
movq %r12, %rdi
callq 0x71a2
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x71ba
testq %rdx, (%rax)
jne 0x8088
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x71ba
orq %rdx, (%rax)
movq (%r14), %rax
movl (%rax,%rbp,4), %r9d
movq 0x10(%rsp), %r15
cmpl %r9d, %r15d
jne 0x8158
movq 0x18(%rsp), %rax
movq (%rax), %rax
imulq $0x18, %rbp, %rcx
movq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %rbx
incl %r15d
cmpq %rbx, %r13
je 0x8088
movslq (%r13), %rax
movl %eax, (%rsp)
movq (%r14), %rcx
movl (%rcx,%rax,4), %esi
cmpl $-0x1, %esi
sete %dl
cmpl %esi, %r15d
setl %dil
orb %dl, %dil
movq 0x20(%rsp), %rdx
movq (%rdx), %rdx
jne 0x812f
cmpl 0x10(%rsp), %esi
jle 0x8152
movl (%rdx,%rax,4), %esi
cmpl %esi, (%rdx,%rbp,4)
jge 0x8152
movl %r15d, (%rcx,%rax,4)
movl (%rdx,%rbp,4), %eax
movslq (%rsp), %rcx
movl %eax, (%rdx,%rcx,4)
movl %r15d, 0x4(%rsp)
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x71f0
addq $0x4, %r13
jmp 0x80f5
movq 0x8e71(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
leaq 0x34c9(%rip), %rsi      # 0xb632
movl %ebp, %edx
movl %r15d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x2180
jmp 0x80dd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.cpp
// Function: multi_sample(std::vector<double, std::allocator<double>> const&, int, std::vector<int, std::allocator<int>>&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
void multi_sample(const vector<double>& weights, int m, ivec& indices, rng_t& rng) {
    int n = weights.size();
    indices.clear();
    if(m >= n) {
        for(int i=0; i<n; ++i) {
            indices.push_back(i);
        }
        return;
    }

    std::uniform_real_distribution<double> rdist;
    indices.reserve(m);
    SegTree segtree(weights);
    for(int i=0; i<m; ++i) {
        int index = segtree.cumsum_search(segtree.get_root() * rdist(rng));
        indices.push_back(index);
        segtree.update(index, 0.0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r12
movq 0x8(%rdi), %r15
subq (%rdi), %r15
shrq $0x3, %r15
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0xa6d9
movq %rax, 0x8(%rbx)
cmpl %ebp, %r15d
jle 0xa778
xorpd %xmm0, %xmm0
movhpd 0xda2(%rip), %xmm0      # xmm0 = xmm0[0],mem[0]
leaq 0x30(%rsp), %r15
movapd %xmm0, (%r15)
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x4892
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7ca
xorl %r12d, %r12d
testl %ebp, %ebp
cmovgl %ebp, %r12d
leaq 0x4(%rsp), %rbp
subl $0x1, %r12d
jb 0xa79b
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x5008
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movq %r13, %rdi
movapd %xmm1, %xmm0
callq 0xa826
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3326
movl 0x4(%rsp), %esi
xorpd %xmm0, %xmm0
movq %r13, %rdi
callq 0xa834
jmp 0xa721
xorl %eax, %eax
leaq 0x10(%rsp), %r14
movl %eax, 0x10(%rsp)
cmpl %r15d, %eax
jge 0xa7a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3326
movl 0x10(%rsp), %eax
incl %eax
jmp 0xa77f
leaq 0x18(%rsp), %rdi
callq 0x5ea6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5ea6
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/graph_gen.cpp
// Function: main
int main(int argc, char* argv[]) {
    char args_str[] = "n m seed";
    int n, m, seed=-1;
    if(argc <= 2 || argc >= 5) {
        fprintf(stderr, "usage: %s %s\n", argv[0], args_str);
        return 2;
    }
    else {
        n = atoi(argv[1]);
        m = atoi(argv[2]);
        if(argc == 4) {
            seed = atoi(argv[3]);
        }
    }
    if(seed == -1) {
        seed = int(time(nullptr));
    }

    ipvec l;

    make_random_connected_graph(n, m, l, seed);
    for(int i=0; i<n; ++i) {
        printf("%d\n", i);
    }

    for(const iipair& p: l) {
        int u = p.first, v = p.second;
        printf("%d %d\n", u, v);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %r15d
movabsq $0x64656573206d206e, %rax # imm = 0x64656573206D206E
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
leal -0x5(%r15), %eax
cmpl $-0x3, %eax
jbe 0xa9b8
movq 0x8(%r14), %rdi
callq 0x21b0
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x21b0
movl %eax, %ebp
cmpl $0x4, %r15d
jne 0xa92e
movq 0x18(%r14), %rdi
callq 0x21b0
cmpl $-0x1, %eax
jne 0xa935
xorl %edi, %edi
callq 0x2120
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
movl %ebx, %edi
movl %ebp, %esi
movl %eax, %ecx
callq 0x525a
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
leaq 0xd44(%rip), %r14       # 0xb6a2
xorl %ebp, %ebp
cmpl %ebp, %ebx
je 0xa974
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2030
incl %ebp
jmp 0xa960
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
leaq 0xda7(%rip), %rbx       # 0xb72c
cmpq %r15, %r14
je 0xa9a1
movl (%r14), %esi
movl 0x4(%r14), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
addq $0x8, %r14
jmp 0xa985
leaq 0x10(%rsp), %rdi
callq 0x366e
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x6611(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0xd52(%rip), %rsi       # 0xb71e
movq %rsp, %rcx
xorl %eax, %eax
callq 0x2180
pushq $0x2
popq %rax
jmp 0xa9ad
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x366e
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/main.cpp
// Function: (anonymous namespace)::report_(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void report_(int no, int subidx, int subnum, const std::string& title, bool err) noexcept
	{
		if(err) {
			std::cout << "\x1B[32;1m";
		} else {
			std::cout << "\x1B[31;1m";
		}

		std::cout << boost::format("(%2d) ") % no;
		std::cout << boost::format("(%2d/%2d) ") % subidx % subnum;
		std::cout << title;

		if(err) {
			std::cout << "  Pass." << std::endl;
		} else {
			auto i = static_cast<int>(err_st_);
			std::cout << ", " << errmsg_[i] << std::endl;
		}
		std::cout << "\x1B[37;m";
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
leaq 0x60a3(%rip), %rax      # 0xcb0d
leaq 0x60a4(%rip), %rsi      # 0xcb15
testl %r8d, %r8d
cmovneq %rax, %rsi
movq 0xb559(%rip), %rdi      # 0x11fd8
callq 0x4230
leaq 0x6092(%rip), %rsi      # 0xcb1d
leaq 0x18(%rsp), %rdi
callq 0x6bde
leaq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x97ed
movq 0xb52d(%rip), %rdi      # 0x11fd8
movq %rax, %rsi
callq 0x7058
leaq 0x18(%rsp), %rdi
callq 0x6dfc
leaq 0x6060(%rip), %rsi      # 0xcb24
leaq 0x18(%rsp), %rdi
callq 0x6bde
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x97ed
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x97ed
movq 0xb4e7(%rip), %rdi      # 0x11fd8
movq %rax, %rsi
callq 0x7058
leaq 0x18(%rsp), %rdi
callq 0x6dfc
movq 0xb4ce(%rip), %rdi      # 0x11fd8
movq %r14, %rsi
callq 0x41f0
testb %bl, %bl
je 0x6b2b
movq 0xb4bb(%rip), %rdi      # 0x11fd8
leaq 0x600b(%rip), %rsi      # 0xcb2f
callq 0x4230
jmp 0x6b5b
movzbl 0xb8ea(%rip), %ebx      # 0x1241c
movq 0xb49f(%rip), %rdi      # 0x11fd8
leaq 0x5ff7(%rip), %rsi      # 0xcb37
callq 0x4230
leaq 0x61e0(%rip), %rcx      # 0xcd2c
movslq (%rcx,%rbx,4), %rsi
addq %rcx, %rsi
movq %rax, %rdi
callq 0x4230
movq %rax, %rdi
callq 0x4100
movq 0xb46e(%rip), %rdi      # 0x11fd8
leaq 0x5fc9(%rip), %rsi      # 0xcb3a
callq 0x4230
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x71e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: utils::def_chainp::operator()()
char operator() () {
			if(unget_) {
				unget_ = false;
			} else {
				if(str_ == nullptr) {
					char ch;
					if(read(STDIN_FILENO, &ch, 1) == 1) {
						if(ch == '\n') ch = 0;
						last_ = ch;
					} else {
						last_ = 0;
					}
				} else {
					last_ = *str_;
					if(last_ != 0) { ++str_; }
				}
			}
			return last_;
		}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x9(%rdi)
jne 0xa8cc
movb $0x0, 0x9(%rbx)
movb 0x8(%rbx), %al
jmp 0xa913
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xa8e5
movb (%rcx), %al
movb %al, 0x8(%rbx)
testb %al, %al
je 0xa911
incq %rcx
movq %rcx, (%rbx)
jmp 0xa913
xorl %ebp, %ebp
leaq 0xf(%rsp), %r14
pushq $0x1
popq %rdx
xorl %edi, %edi
movq %r14, %rsi
callq 0x4330
movq %rax, %rcx
movzbl (%r14), %eax
cmpb $0xa, %al
cmovel %ebp, %eax
cmpq $0x1, %rcx
cmovnel %ebp, %eax
movb %al, 0x8(%rbx)
jmp 0xa913
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: unsigned int utils::basic_input<utils::def_chainp>::nb_dec_<unsigned int>()
T nb_dec_() noexcept
		{
			typedef typename std::make_unsigned<T>::type U;
			typedef typename std::make_signed<T>::type S;

			auto nbc = nbc_;
			auto neg = neg_();
			if(nbc > 0 && nbc_ == 0) {
				error_ = error::not_integer;
				return 0;
			}

			auto sign = std::is_signed<T>::value;
			T v = 0;
			switch(mode_) {
			case mode::BIN:
				v = bin_<U>();
				break;
			case mode::OCT:
				v = oct_<U>();
				break;
			case mode::DEC:
				if(!sign) {
					if(neg) {  // 符号無しにマイナス符号を付けた場合
						error_ = error::sign_type;
						return 0;
					}
				}
				v = dec_<T>();
				break;
			case mode::HEX:
				v = hex_<U>();
				break;
			case mode::AUTO:
				v = auto_num_<T>();
				break;
			default:
				error_ = error::not_integer;
				break;
			}
			if(error_ == error::none) {
				if(nbc == 0) {
					inp_.unget();
				}
				next_();
			}
			if(neg) {
				return -static_cast<S>(v);
			} else {
				return static_cast<S>(v);
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x1a(%rdi), %r15b
callq 0xa9ca
movl %eax, %ebp
testb %r15b, %r15b
je 0xb0c3
cmpb $0x0, 0x1a(%rbx)
jne 0xb0c3
movb $0x4, 0x19(%rbx)
xorl %eax, %eax
jmp 0xb149
movzbl 0x18(%rbx), %eax
addl $-0x2, %eax
cmpl $0x5, %eax
ja 0xb0e9
leaq 0x1132(%rip), %rcx      # 0xc208
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xaa00
jmp 0xb123
movb $0x4, 0x19(%rbx)
xorl %r14d, %r14d
jmp 0xb126
testb %bpl, %bpl
je 0xb11b
movb $0x5, 0x19(%rbx)
jmp 0xb0bc
movq %rbx, %rdi
callq 0xaa6c
jmp 0xb123
movq %rbx, %rdi
callq 0xab44
jmp 0xb123
movq %rbx, %rdi
callq 0xb1be
jmp 0xb123
movq %rbx, %rdi
callq 0xb154
movl %eax, %r14d
cmpb $0x0, 0x19(%rbx)
jne 0xb13d
testb %r15b, %r15b
jne 0xb135
movb $0x1, 0x11(%rbx)
movq %rbx, %rdi
callq 0xa74e
movl %r14d, %eax
negl %eax
testb %bpl, %bpl
cmovel %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: utils::basic_input<utils::def_chainp>::neg_()
bool neg_() noexcept {
			bool neg = false;
			auto s = inp_();
			if(s == '-') {
				neg = true;
				if(nbc_ > 0) nbc_--;
			} else if(s == '+') {
				neg = false;
				if(nbc_ > 0) nbc_--;
			} else {
				inp_.unget();
			}
			return neg;
		}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0xa8b2
cmpb $0x2d, %al
je 0xa9df
cmpb $0x2b, %al
jne 0xa9ed
movb 0x1a(%rbx), %cl
testb %cl, %cl
je 0xa9f1
decb %cl
movb %cl, 0x1a(%rbx)
jmp 0xa9f1
movb $0x1, 0x11(%rbx)
cmpb $0x2d, %al
sete %al
popq %rbx
retq
movq %rax, %rdi
callq 0x71e4
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: unsigned short utils::basic_input<utils::def_chainp>::bin_<unsigned short>()
T bin_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(1) << (sizeof(T) * 8 - 1);
			char ch;
			while((ch = inp_()) != 0) {
				if(ch >= '0' && ch <= '1') {
					if((a & lim) != 0) {
						ovf_ = true;
					}
					if(!ovf_) {
						a <<= 1;
						a += ch - '0';
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xa8b2
testb %al, %al
je 0xba10
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x30, %cl
jne 0xb9ed
testw %bx, %bx
js 0xb9fb
testb $0x1, 0x1b(%r14)
jne 0xba00
addl %ebx, %ebx
addb $-0x30, %al
movzbl %al, %eax
orl %ebx, %eax
movl %eax, %ebx
jmp 0xba00
cmpb $0x20, %al
jne 0xba10
movb 0x1a(%r14), %al
testb %al, %al
jne 0xba08
jmp 0xba10
movb $0x1, 0x1b(%r14)
movb 0x1a(%r14), %al
testb %al, %al
je 0xb9be
decb %al
movb %al, 0x1a(%r14)
jne 0xb9be
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x71e4
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: unsigned short utils::basic_input<utils::def_chainp>::oct_<unsigned short>()
T oct_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(0b111) << (sizeof(T) * 8 - 4);
			char ch;
			while((ch = inp_()) != 0) {
				if(ch >= '0' && ch <= '7') {
					if((a & lim) != 0) {
						ovf_ = true;
					}
					if(!ovf_) {
						a <<= 3;
						a += ch - '0';
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xa8b2
testb %al, %al
je 0xba83
movl %eax, %ecx
andb $-0x8, %cl
cmpb $0x30, %cl
jne 0xba52
testw $0x7000, %bx            # imm = 0x7000
je 0xba60
movb $0x1, 0x1b(%r14)
jmp 0xba73
cmpb $0x20, %al
jne 0xba83
movb 0x1a(%r14), %al
testb %al, %al
jne 0xba7b
jmp 0xba83
testb $0x1, 0x1b(%r14)
jne 0xba73
shll $0x3, %ebx
addb $-0x30, %al
movzbl %al, %eax
orl %ebx, %eax
movl %eax, %ebx
movb 0x1a(%r14), %al
testb %al, %al
je 0xba2e
decb %al
movb %al, 0x1a(%r14)
jne 0xba2e
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x71e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: int utils::basic_input<utils::def_chainp>::dec_<int>()
T dec_() noexcept {
			T a = 0;
			char ch;
			while((ch = inp_()) != 0) {
				if(!ovf_ && ch >= '0' && ch <= '9') {
					if constexpr (std::is_signed<T>::value) {
						a *= 10;
						a += ch - '0';
						if(a < 0) {
							ovf_ = true;
						}
					} else {
						auto b = a;
						a *= 10;
						a += ch - '0';
						if(b > a) {
							ovf_ = true;
						}
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xa8b2
testb %al, %al
je 0xab34
leal -0x3a(%rax), %ecx
cmpb $-0xa, %cl
jb 0xab20
cmpb $0x0, 0x1b(%r14)
jne 0xab20
imull $0xa, %ebx, %ecx
addb $-0x30, %al
movzbl %al, %ebx
addl %ecx, %ebx
jns 0xab16
movb $0x1, 0x1b(%r14)
movb 0x1a(%r14), %al
testb %al, %al
jne 0xab2c
jmp 0xaaea
cmpb $0x20, %al
jne 0xab34
movb 0x1a(%r14), %al
testb %al, %al
je 0xab34
decb %al
movb %al, 0x1a(%r14)
jne 0xaaea
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x71e4
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: unsigned int utils::basic_input<utils::def_chainp>::hex_<unsigned int>()
T hex_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(0b1111) << (sizeof(T) * 8 - 4);
			char ch;
			while((ch = inp_()) != 0) {
				auto ovf = (a & lim) != 0;
				if(ch >= 'a') { ch -= 0x20; }
				if(ch >= '0' && ch <= '9') {
					if(ovf) { ovf_ = true; }
					if(!ovf_) {
						a <<= 4;
						a += ch - '0';
					}
				} else if(ch >= 'A' && ch <= 'F') {
					if(ovf) { ovf_ = true; }
					if(!ovf_) {
						a <<= 4;
						a += ch - 'A' + 10;
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xa8b2
testb %al, %al
je 0xabd9
leal -0x20(%rax), %ecx
cmpb $0x61, %al
movzbl %al, %eax
movzbl %cl, %ecx
cmovll %eax, %ecx
movsbl %cl, %eax
leal -0x30(%rax), %edx
cmpb $0x9, %dl
ja 0xab90
cmpl $0x10000000, %ebx       # imm = 0x10000000
jae 0xabb1
testb $0x1, 0x1b(%r14)
jne 0xabb6
shll $0x4, %ebx
addl %eax, %ebx
addl $-0x30, %ebx
jmp 0xabb6
leal -0x41(%rcx), %edx
cmpb $0x5, %dl
ja 0xabc0
cmpl $0x10000000, %ebx       # imm = 0x10000000
jae 0xabb1
testb $0x1, 0x1b(%r14)
jne 0xabb6
shll $0x4, %ebx
addl %eax, %ebx
addl $-0x37, %ebx
jmp 0xabb6
movb $0x1, 0x1b(%r14)
movb 0x1a(%r14), %al
testb %al, %al
jne 0xabcd
jmp 0xab52
cmpb $0x20, %cl
jne 0xabd9
movb 0x1a(%r14), %al
testb %al, %al
je 0xabd9
decb %al
movb %al, 0x1a(%r14)
jne 0xab52
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x71e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: short utils::basic_input<utils::def_chainp>::auto_num_<short>()
T auto_num_() noexcept
		{
			enum class TYPE : uint8_t {
				dec,
				bin,
				oct,
				hex,
			};

			typedef typename std::make_unsigned<T>::type U;

			char ch = inp_();
			if(ch != '0') {  // 最初に０がある場合無視
				inp_.unget();
			}
			ch = inp_();
			if(ch >= 0x60) { ch -= 0x20; }
			T v = 0;
			TYPE t(TYPE::dec);
			if(ch == 'B') {
				t = TYPE::bin;
			} else if(ch == 'X') {
				t = TYPE::hex;
			} else if(ch == 'O') {
				t = TYPE::oct;
			} else {
				inp_.unget();
			}
			switch(t) {
			case TYPE::bin:
				v = bin_<U>();
				break;
			case TYPE::oct:
				v = oct_<U>();
				break;
			case TYPE::hex:
				v = hex_<U>();
				break;
			default:
				v = dec_<T>();
				break;
			}
			return v;
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0xa8b2
cmpb $0x30, %al
je 0xbbbd
movb $0x1, 0x11(%rbx)
movq %r14, %rdi
callq 0xa8b2
leal -0x20(%rax), %ecx
cmpb $0x60, %al
movzbl %al, %edx
movzbl %cl, %eax
cmovll %edx, %eax
cmpb $0x58, %al
je 0xbbf8
movzbl %al, %eax
cmpl $0x4f, %eax
je 0xbbee
cmpl $0x42, %eax
jne 0xbc08
movq %rbx, %rdi
callq 0xb9b0
jmp 0xbc00
movq %rbx, %rdi
callq 0xba20
jmp 0xbc00
movq %rbx, %rdi
callq 0xbafe
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x1, 0x11(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xba94
movq %rax, %rdi
callq 0x71e4
// File: /workspace/github_cpp_makefile_star2_O2/hirakuni45[P]input_class/./input.hpp
// Function: float utils::basic_input<utils::def_chainp>::nb_real_<float>()
T nb_real_() noexcept
		{
			bool neg = neg_();

			T v = 0.0f;
			switch(mode_) {
			case mode::REAL:
			case mode::AUTO:
				v = real_<T>();
				break;
			default:
				error_ = error::not_float;
				break;
			}
			if(error_ == error::none) {
				inp_.unget();
				next_();
			}
			if(neg) return -v;
			else return v;			
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
callq 0xa9ca
movl %eax, %ebx
movb 0x18(%r14), %al
andb $-0x2, %al
cmpb $0x6, %al
jne 0xad35
movq %r14, %rdi
callq 0xad50
cmpb $0x0, 0x19(%r14)
jne 0xad3d
movb $0x1, 0x11(%r14)
movq %r14, %rdi
movaps %xmm0, (%rsp)
callq 0xa74e
movaps (%rsp), %xmm0
jmp 0xad3d
movb $0x6, 0x19(%r14)
xorps %xmm0, %xmm0
testb %bl, %bl
je 0xad48
xorps 0x1318(%rip), %xmm0     # 0xc060
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Client.cpp
// Function: initalizeMiddleware()
void initalizeMiddleware()
{
// Create socket for sending/receiving datagrams 
   if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
      cout << "socket() failed" << endl;

   // Construct local address structure 
   memset(&servAddr, 0, sizeof(servAddr));   // Zero out structure 
   servAddr.sin_family = AF_INET;                  // Internet address family 
   servAddr.sin_addr.s_addr = htonl(INADDR_ANY);   // Any incoming interface 
   servAddr.sin_port = htons(port);       // Local port    
   
   // If user gave a dotted decimal address, we need to resolve it  
   if (servAddr.sin_addr.s_addr == -1) {
      thehost = gethostbyname(ip);
      servAddr.sin_addr.s_addr = *((unsigned long *) thehost->h_addr_list[0]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x2
popq %rdi
pushq $0x11
popq %rdx
movl %edi, %esi
callq 0x2070
movl %eax, 0x34e6(%rip)      # 0x6218
testl %eax, %eax
jns 0x2d51
movq 0x3293(%rip), %rdi      # 0x5fd0
leaq 0x1403(%rip), %rsi      # 0x4147
callq 0x2190
movq %rax, %rdi
callq 0x20d0
andq $0x0, 0x34cb(%rip)      # 0x6224
movw $0x2, 0x34ba(%rip)      # 0x621c
andl $0x0, 0x34b7(%rip)      # 0x6220
movzwl 0x34dc(%rip), %eax      # 0x624c
rolw $0x8, %ax
movw %ax, 0x34a3(%rip)       # 0x621e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Client.cpp
// Function: convertHeaderInfoToString[abi:cxx11](unsigned int)
string convertHeaderInfoToString(uint32_t header_info) 
{
    string header_info_string;
    char uint4_chunk;
    int size_of_uint32_t = 4;
    int bits_in_a_byte = 8;

    cout << "HEADER INFO:" << header_info << endl;

    for (int i = 0; i < size_of_uint32_t; ++i) {
        uint4_chunk = (char) ((header_info << (i * bits_in_a_byte)) >> (3 * bits_in_a_byte));
        cout << "step " << i << ": " << header_info << ", " << (uint32_t) uint4_chunk << endl;
        header_info_string.push_back(uint4_chunk);
    }

    return header_info_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, -0x2c(%rbp)
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x2fcb(%rip), %rdi      # 0x5fd0
leaq 0x114b(%rip), %rsi      # 0x4157
callq 0x2190
movl -0x2c(%rbp), %r15d
movq %rax, %rdi
movq %r15, %rsi
callq 0x2110
movq %rax, %rdi
callq 0x20d0
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0x4, %r13d
je 0x30bb
movl -0x2c(%rbp), %r14d
movl %r12d, %ecx
shll %cl, %r14d
movq 0x2f87(%rip), %rdi      # 0x5fd0
leaq 0x1114(%rip), %rsi      # 0x4164
callq 0x2190
movq %rax, %rdi
movl %r13d, %esi
callq 0x22b0
movq %rax, %rdi
leaq 0x115a(%rip), %rsi      # 0x41c4
callq 0x2190
movq %rax, %rdi
movq %r15, %rsi
callq 0x2110
movq %rax, %rdi
leaq 0x10e6(%rip), %rsi      # 0x416a
callq 0x2190
movl %r14d, %esi
sarl $0x18, %esi
movq %rax, %rdi
callq 0x2110
movq %rax, %rdi
callq 0x20d0
shrl $0x18, %r14d
movsbl %r14b, %esi
movq %rbx, %rdi
callq 0x2160
incl %r13d
addl $0x8, %r12d
jmp 0x302e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x2328
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O2/awbrenn[P]robot-controller/Client.cpp
// Function: addHeaderToCommands(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>>>>)
vector<string> addHeaderToCommands(vector<string> commands) 
{
    uint32_t number_of_commands = commands.size();
    string body;
    int i;

    /* add header to each of the fragmented responses */
    for (i = 0; i < (int) number_of_commands; i++) {
        body = commands[i];
        body = convertHeaderInfoToString(REQUEST_ID)
             + ROBOT_ID
             + body;
        commands[i] = body;
    }

    return commands;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, -0x38(%rbp)
movq 0x8(%rsi), %rcx
movq %rsi, -0x30(%rbp)
subq (%rsi), %rcx
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
shrq $0x5, %rcx
movb $0x0, (%rax)
xorl %r15d, %r15d
testl %ecx, %ecx
cmovlel %r15d, %ecx
shlq $0x5, %rcx
movq %rcx, -0x40(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %r14
leaq -0xa0(%rbp), %rbx
movq -0x30(%rbp), %rax
movq (%rax), %rsi
cmpq %r15, -0x40(%rbp)
je 0x31d0
addq %r15, %rsi
callq 0x20f0
movl 0x3048(%rip), %esi      # 0x61a0
movq %r14, %r13
movq %r14, %rdi
callq 0x2fda
movq %rbx, %rdi
movq %r13, %rsi
leaq 0xf7330(%rip), %rdx     # 0xfa4a0
callq 0x32d3
leaq -0xc0(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
leaq -0x60(%rbp), %r12
movq %r12, %rdx
callq 0x32d3
movq %r12, %rdi
movq %r13, %rsi
callq 0x21f0
movq %r13, %rdi
callq 0x2328
movq %rbx, %rdi
callq 0x2328
movq %r14, %rdi
callq 0x2328
movq -0x30(%rbp), %rax
movq (%rax), %rdi
addq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
addq $0x20, %r15
leaq -0x60(%rbp), %rdi
jmp 0x3139
movq -0x38(%rbp), %rbx
movq %rsi, (%rbx)
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, 0x8(%rbx)
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
leaq -0x60(%rbp), %rdi
callq 0x2328
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3228
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x2328
leaq -0x80(%rbp), %rdi
callq 0x2328
jmp 0x3238
jmp 0x3235
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2328
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTSpecial(int, int, int)
static void
GLUTSpecial(int key, int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;

  // Process keyboard button event 
  switch (key) {
  case GLUT_KEY_DOWN:
    grid_thresholds[selected_model_index] -= 0.025 * grid_ranges[selected_model_index].Diameter();
    if (grid_thresholds[selected_model_index] < grid_ranges[selected_model_index].Min() + 1E-20) 
      grid_thresholds[selected_model_index] = grid_ranges[selected_model_index].Min() + 1E-20;
    break;

  case GLUT_KEY_UP:
    grid_thresholds[selected_model_index] += 0.025 * grid_ranges[selected_model_index].Diameter();
    if (grid_thresholds[selected_model_index] > grid_ranges[selected_model_index].Max() - 1E-20)
      grid_thresholds[selected_model_index] = grid_ranges[selected_model_index].Max() - 1E-20;
    break;
      
  case GLUT_KEY_PAGE_UP:
    if (++selected_model_index > nmodels-1) selected_model_index = nmodels - 1;
    break;

  case GLUT_KEY_PAGE_DOWN:
    if (--selected_model_index < 0) selected_model_index = 0;
    break;
  }

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;

  // Remember modifiers 
  GLUTmodifiers = glutGetModifiers();

  // Redraw
  glutPostRedisplay();
}

// Assembly:
movl 0x191a7b(%rip), %eax    # 0x1bea14
addl $-0x65, %edi
cmpl $0x4, %edi
ja 0x2d095
leaq 0xfe368(%rip), %rcx     # 0x12b314
movslq (%rcx,%rdi,4), %rdi
addq %rcx, %rdi
jmpq *%rdi
movslq 0x1971e8(%rip), %rcx    # 0x1c41a4
movq %rcx, %rdi
shlq $0x4, %rdi
leaq 0x196db6(%rip), %r8     # 0x1c3d80
movsd 0x8(%rdi,%r8), %xmm0
movapd %xmm0, %xmm1
subsd (%rdi,%r8), %xmm1
mulsd 0xfe065(%rip), %xmm1    # 0x12b048
leaq 0x1971d6(%rip), %rdi    # 0x1c41c0
addsd (%rdi,%rcx,8), %xmm1
movsd %xmm1, (%rdi,%rcx,8)
addsd 0xfe054(%rip), %xmm0    # 0x12b050
ucomisd %xmm0, %xmm1
ja 0x2d077
jmp 0x2d095
movl 0x197197(%rip), %ecx    # 0x1c41a4
leal 0x1(%rcx), %edi
movl 0x1973cd(%rip), %r8d    # 0x1c43e4
decl %r8d
cmpl %r8d, %ecx
cmovll %edi, %r8d
movl %r8d, 0x19717c(%rip)    # 0x1c41a4
jmp 0x2d095
movslq 0x197173(%rip), %rcx    # 0x1c41a4
movq %rcx, %rdi
shlq $0x4, %rdi
leaq 0x196d41(%rip), %r8     # 0x1c3d80
movsd (%rdi,%r8), %xmm0
movsd 0x8(%rdi,%r8), %xmm1
subsd %xmm0, %xmm1
mulsd 0xfe000(%rip), %xmm1    # 0x12b058
leaq 0x197161(%rip), %rdi    # 0x1c41c0
addsd (%rdi,%rcx,8), %xmm1
movsd %xmm1, (%rdi,%rcx,8)
addsd 0xfdfef(%rip), %xmm0    # 0x12b060
ucomisd %xmm1, %xmm0
jbe 0x2d095
movsd %xmm0, (%rdi,%rcx,8)
jmp 0x2d095
movl 0x197120(%rip), %ecx    # 0x1c41a4
cmpl $0x2, %ecx
pushq $0x1
popq %rdi
cmovgel %ecx, %edi
decl %edi
movl %edi, 0x19710f(%rip)    # 0x1c41a4
pushq %rax
subl %edx, %eax
movl %esi, 0x19734a(%rip)    # 0x1c43e8
movl %eax, 0x197348(%rip)    # 0x1c43ec
callq 0xf82b6
popq %rax
jmp 0xf3818
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTMotion(int, int)
static void
GLUTMotion(int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;

  // Compute mouse movement
  int dx = x - GLUTmouse[0];
  int dy = y - GLUTmouse[1];
  
  // World in hand navigation 
  if (GLUTbutton[0]) viewer->RotateWorld(1.0, world_origin, x, y, dx, dy);
  else if (GLUTbutton[1]) viewer->ScaleWorld(1.0, world_origin, x, y, dx, dy);
  else if (GLUTbutton[2]) viewer->TranslateWorld(1.0, world_origin, x, y, dx, dy);
  if (GLUTbutton[0] || GLUTbutton[1] || GLUTbutton[2]) glutPostRedisplay();

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;

  // Update mouse drag movement
  GLUTmouse_drag_distance_squared += dx*dx + dy*dy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r15d
movl 0x1915ae(%rip), %r14d   # 0x1bea14
subl %esi, %r14d
movl %edi, %ebx
subl 0x196f77(%rip), %ebx    # 0x1c43e8
movl %r14d, %ebp
subl 0x196f72(%rip), %ebp    # 0x1c43ec
cmpl $0x0, 0x196f73(%rip)    # 0x1c43f4
je 0x2d487
pushq $0x58
jmp 0x2d49f
cmpl $0x0, 0x196f6a(%rip)    # 0x1c43f8
je 0x2d494
pushq $0x50
jmp 0x2d49f
cmpl $0x0, 0x196f61(%rip)    # 0x1c43fc
je 0x2d4c9
pushq $0x48
popq %rax
movq 0x196ce9(%rip), %rdi    # 0x1c4190
movq (%rdi), %r10
leaq 0x19689f(%rip), %rsi    # 0x1c3d50
movsd 0xfdbb7(%rip), %xmm0    # 0x12b070
movl %r15d, %edx
movl %r14d, %ecx
movl %ebx, %r8d
movl %ebp, %r9d
callq *(%r10,%rax)
cmpl $0x0, 0x196f24(%rip)    # 0x1c43f4
jne 0x2d4e4
cmpl $0x0, 0x196f1f(%rip)    # 0x1c43f8
jne 0x2d4e4
cmpl $0x0, 0x196f1a(%rip)    # 0x1c43fc
je 0x2d4e9
callq 0xf3818
movl %r15d, 0x196ef8(%rip)   # 0x1c43e8
movl %r14d, 0x196ef5(%rip)   # 0x1c43ec
imull %ebx, %ebx
imull %ebp, %ebp
addl %ebx, %ebp
addl %ebp, 0x196eeb(%rip)    # 0x1c43f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadColorIndex(int, int, int)
static void
LoadColorIndex(int model_index, int element_type, int element_index)
{
  // Set color to represent an integer (24 bits)
  int k = element_index + 1;
  unsigned char color[4];
  color[0] = (k      ) & 0xFF;
  color[1] = (k >>  8) & 0xFF;
  color[2] = (k >> 16) & 0xFF;
  color[3] = ((model_index + 1) & 0x0F) << 4;
  color[3] |= (element_type + 1) & 0x0F;
  RNLoadRgba(color);
}

// Assembly:
pushq %rax
incl %edx
leaq 0x4(%rsp), %rax
movb %dl, (%rax)
movb %dh, 0x5(%rsp)
shrl $0x10, %edx
movb %dl, 0x2(%rax)
shll $0x4, %edi
incl %esi
andl $0xf, %esi
orl %edi, %esi
addb $0x10, %sil
movb %sil, 0x3(%rax)
movq %rax, %rdi
callq 0x27430
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadColorValue(double)
static void 
LoadColorValue(double value) 
{
  // Initialize color
  unsigned char color[3];
  
  // Compute rgb based on blue-green-red heatmap
  if (value <= 0) {
    color[0] = 0;
    color[1] = 0;
    color[2] = 255;
  }
  else if (value < 0.1) {
    value *= 10 * 255;
    color[0] = 0;
    color[1] = value;
    color[2] = 255;
  }
  else if (value < 0.5) {
    value = (value - 0.1) * 2.5 * 255;
    color[0] = 0;
    color[1] = 255;
    color[2] = 255 - value;
  }
  else if (value < 0.9) {
    value = (value - 0.5) * 2.5 * 255;
    color[0] = value;
    color[1] = 255;
    color[2] = 0;
  }
  else if (value < 1) {
    value = (value - 0.9) * 10 * 255;
    color[0] = 255;
    color[1] = 255 - value;
    color[2] = 0;
  }
  else {
    color[0] = 255;
    color[1] = 0;
    color[2] = 0;
  }

  // Load color
  RNLoadRgb(color);
}

// Assembly:
pushq %rax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x2f8d9
movsd 0xfb7cc(%rip), %xmm1    # 0x12b088
ucomisd %xmm0, %xmm1
jbe 0x2f8f0
mulsd 0xfb826(%rip), %xmm0    # 0x12b0f0
movb $0x0, 0x5(%rsp)
cvttsd2si %xmm0, %eax
movb %al, 0x6(%rsp)
jmp 0x2f8df
andw $0x0, 0x5(%rsp)
movb $-0x1, %al
leaq 0x5(%rsp), %rdi
movb %al, 0x2(%rdi)
callq 0x27c20
popq %rax
retq
movsd 0xfb740(%rip), %xmm1    # 0x12b038
ucomisd %xmm0, %xmm1
jbe 0x2f92b
addsd 0xfb7da(%rip), %xmm0    # 0x12b0e0
mulsd 0xfb7da(%rip), %xmm0    # 0x12b0e8
movsd 0xfb7ba(%rip), %xmm1    # 0x12b0d0
mulsd %xmm1, %xmm0
movw $0xff00, 0x5(%rsp)      # imm = 0xFF00
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
jmp 0x2f8e1
movsd 0xfb785(%rip), %xmm1    # 0x12b0b8
ucomisd %xmm0, %xmm1
jbe 0x2f960
addsd 0xfb797(%rip), %xmm0    # 0x12b0d8
mulsd 0xfb6bf(%rip), %xmm0    # 0x12b008
mulsd 0xfb77f(%rip), %xmm0    # 0x12b0d0
cvttsd2si %xmm0, %eax
movb %al, 0x5(%rsp)
movb $-0x1, 0x6(%rsp)
jmp 0x2f9a4
movsd 0xfb708(%rip), %xmm1    # 0x12b070
ucomisd %xmm0, %xmm1
jbe 0x2f99d
addsd 0xfb74a(%rip), %xmm0    # 0x12b0c0
mulsd 0xfb74a(%rip), %xmm0    # 0x12b0c8
movsd 0xfb74a(%rip), %xmm1    # 0x12b0d0
mulsd %xmm1, %xmm0
movb $-0x1, 0x5(%rsp)
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, 0x6(%rsp)
jmp 0x2f9a4
movw $0xff, 0x5(%rsp)
xorl %eax, %eax
jmp 0x2f8e1
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: DrawDotOnImageInset(ImageData*, double, double, double, gaps::R2Point const&)
static void
DrawDotOnImageInset(ImageData *data,
  double x, double y, double scale,
  const R2Point& image_position)
{
  // Check if drawing image insets
  if (!show_image_insets) return;

  // Get convenient variables
  double w = scale * data->image_width;
  double h = scale * data->image_height;
  if ((w == 0) || (h == 0)) return;

  // Set viewport
  glViewport(x, y, w, h);

  // Set viewing transformation
  glMatrixMode(GL_PROJECTION);  
  glPushMatrix();
  glLoadIdentity();
  glOrtho(0, data->image_width, 0, data->image_height, 0, 1);
  glMatrixMode(GL_MODELVIEW);
  glPushMatrix();
  glLoadIdentity();

  // Draw dot
  RNLoadRgb(1, 0, 0);
  glPointSize(5);
  RNGrfxBegin(RN_GRFX_POINTS);
  R3LoadPoint(image_position.X(), image_position.Y(), -0.25);
  RNGrfxEnd();
  glPointSize(1);

  // Restore viewing transformation
  glMatrixMode(GL_PROJECTION);  
  glPopMatrix();
  glMatrixMode(GL_MODELVIEW);  
  glPopMatrix();

  // Resore viewport
  viewer->Viewport().Load();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x19485e(%rip)    # 0x1c43cc
je 0x2fb94
movq %rdi, %r14
cvtdq2pd 0x768(%rdi), %xmm1
mulpd 0xfb7fd(%rip), %xmm1    # 0x12b380
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movmskpd %xmm2, %eax
testl %eax, %eax
je 0x2fb9c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
cvttsd2si %xmm0, %edi
cvttsd2si %xmm1, %edx
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
cvttsd2si %xmm1, %ecx
xorl %esi, %esi
callq 0x27230
movl $0x1701, %edi           # imm = 0x1701
callq 0x27d40
callq 0x28000
callq 0x27cd0
cvtsi2sdl 0x768(%r14), %xmm1
cvtsi2sdl 0x76c(%r14), %xmm3
movsd 0xfb48c(%rip), %xmm5    # 0x12b070
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
xorps %xmm4, %xmm4
callq 0x28290
movl $0x1700, %edi           # imm = 0x1700
callq 0x27d40
callq 0x28000
callq 0x27cd0
movss 0xfb51c(%rip), %xmm0    # 0x12b12c
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x283c0
movss 0xfb517(%rip), %xmm0    # 0x12b13c
callq 0x270a0
xorl %edi, %edi
callq 0x271a0
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0xfb4be(%rip), %xmm2    # 0x12b100
callq 0x27f00
callq 0x27ce0
movss 0xfb4d8(%rip), %xmm0    # 0x12b12c
callq 0x270a0
movl $0x1701, %edi           # imm = 0x1701
callq 0x27d40
callq 0x28270
movl $0x1700, %edi           # imm = 0x1700
callq 0x27d40
callq 0x28270
movl $0x98, %edi
addq 0x19450d(%rip), %rdi    # 0x1c4190
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3103e
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: DrawImageRay(ImageData*, gaps::R2Point const&)
static void
DrawImageRay(ImageData *data,
  const R2Point& image_position)
{               
  // Check image position
  R2Box b = data->ray_origin_images[0].GridBox();
  if (!R2Contains(b, image_position)) return;

  // Get ray parameter from images
  RNScalar ox = data->ray_origin_images[0].GridValue(image_position);
  RNScalar oy = data->ray_origin_images[1].GridValue(image_position);
  RNScalar oz = data->ray_origin_images[2].GridValue(image_position);
  RNScalar dx = data->ray_direction_images[0].GridValue(image_position);
  RNScalar dy = data->ray_direction_images[1].GridValue(image_position);
  RNScalar dz = data->ray_direction_images[2].GridValue(image_position);

  // Create ray
  R3Point ray_origin(ox, oy, oz);
  R3Vector ray_direction(dx, dy, dz);
  R3Ray ray(ray_origin, ray_direction);

  // Find projection of selected position onto ray
  RNScalar t = ray.T(selected_position);
  if (t <= 0) return;
  R3Point p = ray.Point(t);

  // Draw ray
  glDisable(GL_LIGHTING);
  RNLoadRgb(0, 1, 1);
  R3Span(ray_origin, p).Draw();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x288(%rdi), %r15
leaq 0x80(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x31054
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc99b8
testl %eax, %eax
je 0x30901
movq %r15, %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x30(%rsp)
leaq 0x358(%r14), %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x28(%rsp)
leaq 0x428(%r14), %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x20(%rsp)
leaq 0x4f8(%r14), %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x18(%rsp)
leaq 0x5c8(%r14), %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x10(%rsp)
addq $0x698, %r14            # imm = 0x698
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31080
movsd %xmm0, 0x8(%rsp)
leaq 0x38(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
callq 0xc0dfc
leaq 0x68(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0xc15bc
leaq 0xa8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x68(%rsp), %rdx
xorl %ecx, %ecx
callq 0xc0a0e
leaq 0x1934d3(%rip), %rsi    # 0x1c3d68
leaq 0xa8(%rsp), %rdi
callq 0xc0a5c
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x30901
leaq 0x50(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xc0a20
movl $0xb50, %edi            # imm = 0xB50
callq 0x27220
movss 0xfa85c(%rip), %xmm1    # 0x12b12c
xorpd %xmm0, %xmm0
movapd %xmm1, %xmm2
callq 0x283c0
leaq 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xc02b0
leaq 0xd8(%rsp), %rdi
callq 0x836b6
leaq 0x80(%rsp), %rdi
callq 0xd8fba
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
jmp 0x30935
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xd8fba
movq %rbx, %rdi
callq 0x28170
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadTexture(ImageData*)
static void
LoadTexture(ImageData *data)
{
  // Check if already loaded
  if (data->texture_id > 0) return;

  // Check color image
  if (data->color_image.Width() <= 0) return;
  if (data->color_image.Height() <= 0) return;
  if (data->color_image.Depth() != 3) return;

  // Allocate texture id
  glGenTextures(1, &data->texture_id);
  assert(data->texture_id > 0);

  // Set texture parameters
  glBindTexture(GL_TEXTURE_2D, data->texture_id);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

  // Set texture pixels
  gluBuild2DMipmaps(GL_TEXTURE_2D, 3,
    data->color_image.Width(), data->color_image.Height(),
    GL_RGB, GL_UNSIGNED_BYTE, data->color_image.Pixels());
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x0, 0x770(%rdi)
je 0x30961
addq $0x10, %rsp
popq %rbx
retq
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x3095b
cmpl $0x0, 0x4(%rbx)
jle 0x3095b
cmpl $0x3, 0x8(%rbx)
jne 0x3095b
leaq 0x770(%rbx), %rsi
pushq $0x1
popq %rdi
callq 0x27d70
movl 0x770(%rbx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x27be0
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2802, %esi           # imm = 0x2802
movl $0x2900, %edx           # imm = 0x2900
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2803, %esi           # imm = 0x2803
movl $0x2900, %edx           # imm = 0x2900
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2701, %edx           # imm = 0x2701
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0x27d30
movl $0x2300, %edi           # imm = 0x2300
movl $0x2200, %esi           # imm = 0x2200
movl $0x2100, %edx           # imm = 0x2100
callq 0x27a50
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
pushq $0x3
popq %rsi
movl $0xde1, %edi            # imm = 0xDE1
movl $0x1907, %r8d           # imm = 0x1907
movl $0x1401, %r9d           # imm = 0x1401
callq 0x27520
jmp 0x3095b
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/apps/gapsview/../../pkgs/GSV/GSVScene.h
// Function: gaps::GSVScene::BBox() const
inline const R3Box& GSVScene::
BBox(void) const
{
  // Return bounding box 
  if (bbox.XMin() == FLT_MAX) 
    ((GSVScene *) this)->UpdateBBox();
  return bbox;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0x38(%rdi), %xmm0
ucomisd 0xfa1ef(%rip), %xmm0    # 0x12b028
jne 0x30e45
jp 0x30e45
movq %rbx, %rdi
callq 0x31972
addq $0x30, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::~GSVScene()
GSVScene::
~GSVScene(void)
{
  // Delete runs
  while (NRuns() > 0) delete Run(0);

  // Delete filename
  if (filename) free(filename);

  // Delete raw data directory name
  if (raw_data_directory_name) free(raw_data_directory_name);

  // Delete cache data_directory name
  if (cache_data_directory_name) free(cache_data_directory_name);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1843a2(%rip), %rax    # 0x1b5850
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
cmpl $0x0, 0x14(%r14)
jle 0x314cf
movq (%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x314b5
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x314b5
movq 0x18(%r14), %rdi
callq 0x27b40
movq 0x20(%r14), %rdi
callq 0x27b40
movq 0x28(%r14), %rdi
callq 0x27b40
leaq 0x68(%r14), %rdi
callq 0xaf516
addq $0x30, %r14
movq %r14, %rdi
callq 0xad65a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe1d40
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::Run(char const*) const
GSVRun *GSVScene::
Run(const char *name) const
{
  // Return run with matching name
  for (int ir = 0; ir < NRuns(); ir++) {
    GSVRun *run = Run(ir);
    if (!run->Name()) continue;
    if (!strcmp(run->Name(), name)) return run;
  }

  // None found
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0x14(%rdi), %r15
movq 0x8(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x31560
movq (%r12,%r13,8), %r14
movq 0x48(%r14), %rdi
testq %rdi, %rdi
je 0x3155b
movq %rbx, %rsi
callq 0x27db0
testl %eax, %eax
je 0x31563
incq %r13
jmp 0x3153d
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::NSegments() const
int GSVScene::
NSegments(void) const
{
  // Return number of segments in scene
  int count = 0;
  for (int ir = 0; ir < NRuns(); ir++) {
    GSVRun *run = Run(ir);
    count += run->NSegments();
  }
  return count;
}

// Assembly:
movl 0x14(%rdi), %ecx
movq 0x8(%rdi), %rdx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
xorl %eax, %eax
cmpq %rsi, %rcx
je 0x31591
movq (%rdx,%rsi,8), %rdi
addl 0x24(%rdi), %eax
incq %rsi
jmp 0x31580
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::NCameras() const
int GSVScene::
NCameras(void) const
{
  // Return number of cameras in scene
  int count = 0;
  for (int ir = 0; ir < NRuns(); ir++) {
    GSVRun *run = Run(ir);
    count += run->NCameras();
  }
  return count;
}

// Assembly:
movl 0x14(%rdi), %ecx
movq 0x8(%rdi), %rdx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
xorl %eax, %eax
cmpq %rsi, %rcx
je 0x315b3
movq (%rdx,%rsi,8), %rdi
addl 0x34(%rdi), %eax
incq %rsi
jmp 0x315a2
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::NTapestries() const
int GSVScene::
NTapestries(void) const
{
  // Return number of tapestries in scene
  int count = 0;
  for (int i = 0; i < NRuns(); i++) {
    GSVRun *run = Run(i);
    count += run->NTapestries();
  }
  return count;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jge 0x315dd
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3614c
addl %eax, %ebp
incq %r14
jmp 0x315c0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/GSV/GSVScene.cpp
// Function: gaps::GSVScene::InvalidateBBox()
int GSVScene::
NPanoramas(void) const
{
  // Return number of panoramas in scene
  int count = 0;
  for (int i = 0; i < NRuns(); i++) {
    GSVRun *run = Run(i);
    count += run->NPanoramas();
  }
  return count;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movsd 0x38(%rdi), %xmm0
ucomisd 0xf9658(%rip), %xmm0    # 0x12b028
jne 0x319d4
jnp 0x31a17
movq %rdi, %rbx
addq $0x30, %rbx
movq %rsp, %r14
movsd 0xf9642(%rip), %xmm0    # 0x12b028
movsd 0xf9732(%rip), %xmm3    # 0x12b120
movq %r14, %rdi
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0xaca42
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30d44
movq %rsp, %rdi
callq 0xad65a
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xad65a
movq %rbx, %rdi
callq 0x28170