LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::get_text_word[abi:cxx11](unsigned long long)
std::string get_text_word(uint64 word) {
        std::string ret;
        for (uint i = 42; i <= 42; i-=6) {
            ret += get_text_char(word >> i);
        }
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r15
movb $0x0, 0x10(%rdi)
pushq $0x2a
popq %rbp
movq %rsp, %r12
cmpl $0x2a, %ebp
ja 0x3304
movq %r14, %rax
movl %ebp, %ecx
shrq %cl, %rax
movzbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x3334
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22c0
movq %r12, %rdi
callq 0x20b0
addl $-0x6, %ebp
jmp 0x32d1
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x20b0
jmp 0x3324
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::gak[abi:cxx11](unsigned int)
std::string gak(uint i) {
        std::string ret("G");
        ret += 'A'+i/128;
        ret += 'K'+i/8%16;
        ret += '/';
        ret += '0'+i%8;
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x1a4a(%rip), %rsi      # 0x5444
leaq 0xf(%rsp), %rdx
callq 0x3360
movl %ebp, %eax
shrl $0x7, %eax
addb $0x41, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2110
movl %ebp, %eax
shrb $0x3, %al
andb $0xf, %al
addb $0x4b, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x2110
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x2110
andb $0x7, %bpl
orb $0x30, %bpl
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x2110
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::get_literal[abi:cxx11](unsigned int)
std::string get_literal(uint32 addr) {
    uint64 val = memory[addr + 3];
    std::string ret;
    if ((val >> 24) == 064000000) {
        uint d = val & 077777777;
        if (d > 10000)
            ret = strprintf("%08oB", d);
        else
            ret = strprintf("(%d)", d);
    } else if (is_likely_iso(val)) {
        ret = strprintf("iso('%s')", get_iso_word(val).c_str());
    } else if (is_likely_text(val)) {
        ret = strprintf("%lloC(*\"%s\"*)", val, get_text_word(val).c_str());
    } else if (val >= 0101 && val < 96) {
        ret = strprintf("char('%c')", char(val));
    } else {
        ret = strprintf("(%lloC)", val);
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
addl $0x3, %edx
movq 0x48(%rsi,%rdx,8), %r14
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %r14, %rax
shrq $0x18, %rax
cmpq $0xd00000, %rax         # imm = 0xD00000
jne 0x41e6
cmpl $0x2711, %r14d          # imm = 0x2711
jb 0x4220
leaq 0x1457(%rip), %rsi      # 0x562e
movq %rsp, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x23cc
jmp 0x4234
movq %rsi, %r15
movq %rsi, %rdi
movq %r14, %rsi
callq 0x4316
testb %al, %al
je 0x4247
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x433e
movq 0x20(%rsp), %rdx
leaq 0x1425(%rip), %rsi      # 0x5639
movq %rsp, %rdi
xorl %eax, %eax
callq 0x23cc
jmp 0x427f
leaq 0x140d(%rip), %rsi      # 0x5634
movq %rsp, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x23cc
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq %r14, %rdi
jmp 0x429a
movq %r15, %rdi
movq %r14, %rsi
callq 0x43cc
testb %al, %al
je 0x42ac
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x32a6
movq 0x20(%rsp), %rcx
leaq 0x13d1(%rip), %rsi      # 0x5643
movq %rsp, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x23cc
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq -0x41(%r14), %rax
cmpq $0x1e, %rax
ja 0x42cf
leaq 0x1394(%rip), %rsi      # 0x5651
movq %rsp, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x23cc
jmp 0x4234
leaq 0x1386(%rip), %rsi      # 0x565c
movq %rsp, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x23cc
jmp 0x4234
jmp 0x4303
jmp 0x4303
jmp 0x42f0
jmp 0x4303
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x4306
jmp 0x4303
jmp 0x4303
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::is_likely_iso(unsigned long long)
bool is_likely_iso (uint64 word) {
        for (uint i = 0; i < 48; i += 8) {
            uint val = (word >> i) & 0377;
            if (val < 040 || val >= 0177)
                return false;
        }
        return true;
    }

// Assembly:
xorl %eax, %eax
movq %rax, %rcx
cmpq $0x2f, %rax
ja 0x4336
movq %rsi, %rax
shrq %cl, %rax
movzbl %al, %edx
addl $-0x20, %edx
leaq 0x8(%rcx), %rax
cmpl $0x5f, %edx
jb 0x4318
cmpq $0x30, %rcx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::get_iso_word[abi:cxx11](unsigned long long)
std::string get_iso_word(uint64 word) {
        std::string ret;
        for (uint i = 40; i <= 40; i-=8) {
            ret += get_iso_char(word >> i);
        }
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r15
movb $0x0, 0x10(%rdi)
pushq $0x28
popq %rbp
movq %rsp, %r12
cmpl $0x28, %ebp
ja 0x439c
movq %r14, %rax
movl %ebp, %ecx
shrq %cl, %rax
movzbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4456
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22c0
movq %r12, %rdi
callq 0x20b0
addl $-0x8, %ebp
jmp 0x4369
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x20b0
jmp 0x43bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::is_likely_text(unsigned long long)
bool is_likely_text(uint64 word) {
        // Of all groups of 6 bits, they should be left-
        // or right-aligned, there must be no spaces in the middle,
        // and no unused codes or Cyrillics.
        int seen0 = 0, seen_char = 0;
        bool last0 = false;
        for (uint i = 42; i <= 42; i-=6) {
            uint val = (word >> i) & 077;
            switch (val) {
            case 001 ... 011:
            case 013 ... 016:
            case 032 ... 034:
            case 037:
            case 040:
            case 073 ... 077:
                return false;
            case 0:
                if (seen_char && seen0 && !last0) return false;
                ++seen0;
                last0 = true;
                break;
            default:
                if (seen_char && seen0 && last0) return false;
                ++seen_char;
                last0 = false;
            }
        }
        return seen_char > 1;
    }

// Assembly:
pushq $0x2a
popq %rcx
xorl %eax, %eax
movabsq $-0x7fffffe63ff8402, %rdi # imm = 0xF80000019C007BFE
xorl %edx, %edx
xorl %r8d, %r8d
cmpl $0x2a, %ecx
ja 0x4447
movq %rsi, %r9
shrq %cl, %r9
andl $0x3f, %r9d
cmpl $0x3f, %r9d
ja 0x4400
testq %r9, %r9
je 0x4422
btq %r9, %rdi
jb 0x4447
testl %edx, %edx
setne %r9b
testl %eax, %eax
setne %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x441b
testb $0x1, %r8b
jne 0x4447
incl %edx
xorl %r8d, %r8d
jmp 0x4442
testl %edx, %edx
setne %r9b
testl %eax, %eax
setne %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x443d
testb $0x1, %r8b
je 0x4447
incl %eax
movb $0x1, %r8b
addl $-0x6, %ecx
jmp 0x43e0
cmpl $0x2b, %ecx
setae %cl
cmpl $0x2, %edx
setge %al
andb %cl, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/dtran.cc
// Function: Dtran::get_bytes[abi:cxx11](unsigned long long)
std::string get_bytes(uint64 word) {
        std::string ret;
        for (uint i = 40; i <= 40; i-=8) {
            ret += strprintf("%03o ", int(word >> i) & 0377);
        }
        return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
pushq $0x28
popq %rbp
leaq 0x120f(%rip), %r15      # 0x571b
movq %rsp, %r12
cmpl $0x28, %ebp
ja 0x4544
movq %r14, %rax
movl %ebp, %ecx
shrq %cl, %rax
movzbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x23cc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22c0
movq %r12, %rdi
callq 0x20b0
addl $-0x8, %ebp
jmp 0x450f
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x20b0
jmp 0x4564
movq %rax, %r14
movq %rbx, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/y/board.h
// Function: Morat::Y::Board::update_hash(Morat::MoveValid const&, Morat::Side)
void update_hash(const MoveValid & pos, Side side) {
		int turn = side.to_i();
		if(num_moves_ > unique_depth){ //simple update, no rotations/symmetry
			hash.update(0, 3 * pos.xy + turn);
			return;
		}

		//mirror is simply flip x,y
		int x = pos.x,
		    y = pos.y,
		    z = sizem1_ - x - y;

		hash.update(0,  3*xy(x, y) + turn);
		hash.update(1,  3*xy(z, y) + turn);
		hash.update(2,  3*xy(z, x) + turn);
		hash.update(3,  3*xy(x, z) + turn);
		hash.update(4,  3*xy(y, z) + turn);
		hash.update(5,  3*xy(y, x) + turn);
	}

// Assembly:
cmpw $0x6, 0x4(%rdi)
movsbl %dl, %eax
jl 0xf117
movswl 0x2(%rsi), %esi
addq $0x28, %rdi
jmp 0xf1af
movsbl 0x1(%rsi), %r8d
movsbl (%rsi), %ecx
movsbl 0x1(%rdi), %edx
movsbl (%rdi), %r10d
subl %ecx, %edx
subl %r8d, %edx
movl %r10d, %esi
imull %ecx, %esi
leal (%rsi,%r8), %r9d
addl %edx, %esi
leal (%r9,%r9,2), %r9d
leal (%rsi,%rsi,2), %esi
addl %eax, %r9d
addl %eax, %esi
movslq %r9d, %r11
leaq 0x182a2(%rip), %r9      # 0x273f0
movslq %esi, %rsi
movq (%r9,%r11,8), %r11
xorq %r11, 0x28(%rdi)
movq (%r9,%rsi,8), %rsi
xorq %rsi, 0x30(%rdi)
movl %r10d, %esi
imull %r8d, %esi
leal (%rsi,%rdx), %r11d
imull %r10d, %edx
addl %ecx, %esi
leal (%r11,%r11,2), %r11d
addl %eax, %r11d
addl %edx, %r8d
addl %ecx, %edx
movslq %r11d, %r11
leal (%r8,%r8,2), %r8d
leal (%rdx,%rdx,2), %edx
movq (%r9,%r11,8), %r11
addl %eax, %r8d
addl %eax, %edx
movslq %r8d, %r8
movslq %edx, %rdx
xorq %r11, 0x38(%rdi)
movq (%r9,%r8,8), %r8
xorq %r8, 0x40(%rdi)
movq (%r9,%rdx,8), %rdx
xorq %rdx, 0x48(%rdi)
addq $0x50, %rdi
leaq 0x1823a(%rip), %rdx     # 0x273f0
leal (%rsi,%rsi,2), %ecx
addl %eax, %ecx
movslq %ecx, %rax
movq (%rdx,%rax,8), %rax
xorq %rax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/y/board.h
// Function: Morat::Y::Board::test_outcome(Morat::MoveValid const&, Morat::Side) const
Outcome test_outcome(const MoveValid & pos, Side turn) const {
		if(test_local(pos, turn)){
			Cell testcell = cells_[find_group(pos.xy)];
			int numgroups = 0;
			auto it = neighbors_small(pos);
			for (const MoveValid *i = it.begin(), *e = it.end(); i < e; i++) {
				if(i->on_board() && turn == get(i->xy)){
					const Cell * g = & cells_[find_group(i->xy)];
					testcell.edge   |= g->edge;
					testcell.size   += g->size;
					i++; //skip the next one
					numgroups++;
				}
			}

			if(testcell.numedges() == 3)
				return +turn;
		}

		return Outcome::UNKNOWN;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x13074
testb %al, %al
je 0x1293d
movswl 0x2(%r15), %esi
movq %r14, %rdi
callq 0xf280
movslq %eax, %rcx
movq 0x10(%r14), %rax
movswq 0x2(%r15), %rsi
movq 0x58(%r14), %rdx
xorl %r12d, %r12d
shlq $0x4, %rcx
movb 0x6(%rax,%rcx), %bpl
imulq $0x48, %rsi, %rcx
leaq 0x2(%rdx,%rcx), %r15
cmpq $0x18, %r12
jge 0x1292c
movswq (%r15,%r12), %rsi
cmpq $-0x1, %rsi
je 0x12926
movq %rsi, %rcx
shlq $0x4, %rcx
cmpb %bl, (%rax,%rcx)
jne 0x12926
movq %r14, %rdi
callq 0xf280
movslq %eax, %rcx
movq 0x10(%r14), %rax
addq $0x4, %r12
shlq $0x4, %rcx
orb 0x6(%rax,%rcx), %bpl
addq $0x4, %r12
jmp 0x128ed
movzbl %bpl, %eax
leaq 0x11e99(%rip), %rcx     # 0x247d0
cmpb $0x3, (%rax,%rcx)
je 0x12946
leaq 0x149de(%rip), %rax     # 0x27322
movb (%rax), %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/y/lbdist.h
// Function: Morat::Y::LBDists::init_player(bool, Morat::Side)
void init_player(bool crossvcs, Side player){
		int m = board->lines();
		int m1 = m-1;

		for(int x = 0; x < m; x++) { init(x,    0, 0,  player, 3); } flood(0,  player, crossvcs); //edge 0
		for(int y = 0; y < m; y++) { init(0,    y, 1,  player, 1); } flood(1,  player, crossvcs); //edge 1
		for(int y = 0; y < m; y++) { init(m1-y, y, 2,  player, 5); } flood(2,  player, crossvcs); //edge 2
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xafe0(%rdi), %rax
movzbl %dl, %r14d
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
xorl %r12d, %r12d
movsbl (%rax), %ebp
movl %ebp, %eax
sarl $0x1f, %eax
andnl %ebp, %eax, %r13d
pushq $0x3
popq %r15
cmpl %r12d, %r13d
je 0x1315a
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
callq 0x131f4
incl %r12d
jmp 0x1313b
movzbl 0x4(%rsp), %ecx
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %ecx, 0x4(%rsp)
callq 0x132a8
pushq $0x1
popq %r15
cmpl %r12d, %r13d
je 0x13197
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
callq 0x131f4
incl %r12d
jmp 0x13177
pushq $0x1
popq %rsi
movl 0x4(%rsp), %ecx
movq %rbx, %rdi
movl %r14d, %edx
callq 0x132a8
decl %ebp
xorl %r12d, %r12d
pushq $0x5
popq %r15
cmpl %r12d, %r13d
je 0x131d4
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
pushq $0x2
popq %rcx
movl %r14d, %r8d
movl %r15d, %r9d
callq 0x131f4
incl %r12d
decl %ebp
jmp 0x131b2
pushq $0x2
popq %rsi
movl 0x4(%rsp), %ecx
movq %rbx, %rdi
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x132a8
// File: /workspace/github_cpp_makefile_star2_O2/tewalds[P]morat/y/lbdist.h
// Function: Morat::Y::LBDists::_get(int, Morat::Side)
int _get(int pos, Side player){
		int sum = 0;
		for(int i = 0; i < 3; i++)
			sum += dist(i, player, pos);
		return sum;
	}

// Assembly:
movsbq %dl, %rax
movslq %esi, %rcx
movq $-0x9c4, %rdx           # imm = 0xF63C
imulq $0x9c4, %rax, %rax      # imm = 0x9C4
leaq (%rax,%rcx,4), %rcx
xorl %eax, %eax
addq %rdi, %rcx
cmpq $0x30d4, %rdx           # imm = 0x30D4
je 0x13cbb
addl (%rcx,%rdx), %eax
addq $0x1388, %rdx           # imm = 0x1388
jmp 0x13ca6
retq
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/TradeMatchingEngine.cpp
// Function: dumpOrder(Order*)
void dumpOrder(Order* order)
{
	std::cout << "\nOrder:"
		<< "\nTradeId = " << order->m_traderId
		<< "\nisBuy = " << order->m_isBuy
		<< "\nQuantity = " << order->m_quantity
		<< "\nPrice = " << order->m_price << std::endl;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x4b85(%rip), %rdi      # 0x6fd0
leaq 0x1bb2(%rip), %rsi      # 0x4004
callq 0x2170
leaq 0x1bae(%rip), %rsi      # 0x400c
movq %rax, %rdi
callq 0x2170
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2150
leaq 0x1ba0(%rip), %rsi      # 0x4018
movq %rax, %rdi
callq 0x2170
movzbl 0x20(%rbx), %esi
movq %rax, %rdi
callq 0x2240
leaq 0x1b8f(%rip), %rsi      # 0x4022
movq %rax, %rdi
callq 0x2170
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq 0x2110
leaq 0x1b81(%rip), %rsi      # 0x402f
movq %rax, %rdi
callq 0x2170
movq 0x30(%rbx), %rsi
movq %rax, %rdi
callq 0x2110
movq %rax, %rdi
popq %rbx
jmp 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/TradeMatchingEngine.cpp
// Function: TradeMatchingEngine::getOrder()
Order* TradeMatchingEngine::getOrder()
{
	Order *ord = new Order();

	std::cout << "\nInput request <Trader Identifier> <Side> <Quantity> <Price>: \n";
	std::cin >> *ord;
	
	return ord;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x38
popq %rdi
callq 0x2180
movq %rax, %rbx
movq %rax, %rdi
callq 0x25fc
movq 0x4a70(%rip), %rdi      # 0x6fd0
leaq 0x1af5(%rip), %rsi      # 0x405c
callq 0x2170
movq 0x4a6d(%rip), %rdi      # 0x6fe0
movq %rbx, %rsi
callq 0x3b4d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/TradeMatchingEngine.cpp
// Function: TradeMatchingEngine::processOrder(Order*)
void TradeMatchingEngine::processOrder(Order* o)
{
	m_orderBook->makeOrder(o);

	// for testing purposes only
	if (m_debug_enabled) {
		m_orderBook->dumpAsks();
		m_orderBook->dumpBids();
	}

	
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x267c
cmpb $0x1, 0x8(%rbx)
jne 0x25bd
movq (%rbx), %rdi
callq 0x292e
movq (%rbx), %rdi
popq %rbx
jmp 0x296c
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/OrdersBook.cpp
// Function: OrdersBook::makeOrder(Order*)
void OrdersBook::makeOrder(Order *order)
{
	// starts from empty logs for each order
	m_tradeLogs.clear();

	// store the original quantity of item
	int origQnty = order->m_quantity;

	if (order->m_isBuy) {
		handleRequest<OrdersAskTable>(m_asks, order, origQnty);
	}
	else {
		handleRequest<OrdersBidTable>(m_bids, order, origQnty);
	}

	// requested quantity isn't satisfied then store the request as a resting order
	if (origQnty != 0) {
		// update quantity with the remain count
		order->m_quantity = origQnty;
		addOrder(order);
	}
	else {
		// release memory
		delete order;
	}

	// dump trade logs
	dumpTradeLogs();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x60, %rdi
callq 0x2ff2
movl 0x28(%r14), %eax
movl %eax, 0x4(%rsp)
cmpb $0x1, 0x20(%r14)
jne 0x26b3
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x29ac
jmp 0x26c7
leaq 0x30(%rbx), %rsi
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2b2a
movslq 0x4(%rsp), %rax
testq %rax, %rax
je 0x26e2
movq %rax, 0x28(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2702
jmp 0x26f2
movq %r14, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2748
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/OrdersBook.cpp
// Function: OrdersBook::addTradeInfo(Order*, Order, int)
void OrdersBook::addTradeInfo(Order *origOrder, Order curOrder, int performedQnty)
{
	// store the first log
	curOrder.m_quantity = performedQnty;
	logOrder(curOrder);

	// update the quantity and price of original order and store it
	Order order = *origOrder;
	order.m_quantity = performedQnty;
	order.m_price = curOrder.m_price;
	logOrder(order);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq %ecx, %r13
movq %r13, 0x28(%rdx)
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0x2ca8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2880
leaq 0x78(%rsp), %rdi
callq 0x20b0
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2ca8
movq %r13, 0x28(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x30(%r12)
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2ca8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2880
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x40(%rsp), %rdi
callq 0x20b0
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20b0
jmp 0x2864
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x2873
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/OrdersBook.cpp
// Function: OrdersBook::logOrder(Order)
void OrdersBook::logOrder(Order order)
{
	std::pair<OrdersLog::iterator, OrdersLog::iterator> range = m_tradeLogs.equal_range(order.m_traderId);

	for (auto iter = range.first; iter != range.second; iter++)
		if (iter->second == order) {
			iter->second += order;
			return;
		}
			
	m_tradeLogs.insert(std::pair < std::string, Order>(order.m_traderId, order));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x60, %rbx
movq %rbx, %rdi
callq 0x378c
movq %rax, %r12
movq %rdx, %r15
cmpq %r15, %r12
je 0x28cb
leaq 0x40(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x3a7c
testb %al, %al
jne 0x2901
movq %r12, %rdi
callq 0x2120
movq %rax, %r12
jmp 0x28a5
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2d78
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38c2
leaq 0x8(%rsp), %rdi
callq 0x2dae
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rdi
movq %r14, %rsi
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3ada
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2dae
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/Order.cpp
// Function: Order::operator==(Order const&)
bool Order::operator == (const Order &o)
{
	if (this->m_traderId == o.m_traderId &&
		this->m_isBuy == o.m_isBuy &&
		this->m_price == o.m_price)
		return true;
	else
		return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3ba9
testb %al, %al
je 0x3aa4
movb 0x20(%r14), %al
cmpb 0x20(%rbx), %al
jne 0x3aa4
movq 0x30(%r14), %rcx
movb $0x1, %al
cmpq 0x30(%rbx), %rcx
je 0x3aa6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sirak92[P]TradeMatchingEngine/src/Order.cpp
// Function: operator>>(std::istream&, Order&)
std::istream& operator >> (std::istream &in, Order &order)
{
	char side;
	in >> order.m_traderId >> side >> order.m_quantity >> order.m_price;
	if (toupper(side) == 'B')
		order.m_isBuy = true;

	return in;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x21c0
leaq 0xf(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x21e0
leaq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x30(%r14), %rsi
movq %rax, %rdi
callq 0x20e0
movsbl (%r15), %edi
callq 0x2270
cmpl $0x42, %eax
jne 0x3b9c
movb $0x1, 0x20(%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/crp_test.cc
// Function: llh(cpyp::crp<int, std::hash<int>> const&, double const*)
double llh(const cpyp::crp<int>& crp, const double* pp0) {
  double l = crp.log_likelihood();
  for (int i = 0; i < 3; ++i)
    l += crp.num_tables(i) * log(pp0[i]);
  return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3f0a
xorl %eax, %eax
leaq 0xc(%rsp), %r15
movl %eax, 0xc(%rsp)
cmpl $0x3, %eax
jge 0x2426
movq %r14, %rdi
movq %r15, %rsi
movsd %xmm0, 0x10(%rsp)
callq 0x3f18
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0xc(%rsp), %rax
movsd (%rbx,%rax,8), %xmm0
callq 0x2130
mulsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movl 0xc(%rsp), %eax
incl %eax
jmp 0x23cc
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp.h
// Function: int cpyp::crp<int, std::hash<int>>::decrement<cpyp::MT19937>(int const&, cpyp::MT19937&, double*)
int decrement(const Dish& dish, Engine& eng, double* logq = nullptr) {
    crp_table_manager<1>& loc = dish_locs_[dish];
    assert(loc.num_customers());
    if (loc.num_customers() == 1) {
      update_llh_remove_customer_from_table_seating(1);
      dish_locs_.erase(dish);
      --num_tables_;
      --num_customers_;
      // q = 1 since this is the first customer
      return -1;
    } else {
      unsigned selected_table_postcount = 0;
      int delta = loc.remove_customer(eng, &selected_table_postcount).second;
      update_llh_remove_customer_from_table_seating(
          selected_table_postcount + 1);
      --num_customers_;
      if (delta) {
        --num_tables_;
      }

      if (logq) {
        double p_empty = (strength_ + num_tables_ * discount_);
        double p_share = (loc.num_customers() - loc.num_tables() * discount_);
        const double z = p_empty + p_share;
        p_empty /= z;
        p_share /= z;
        if (selected_table_postcount) {
          *logq += log(p_share * (selected_table_postcount - discount_) /
                     (loc.num_customers() - loc.num_tables() * discount_));
        } else {
          *logq += log(p_empty);
        }
      }
      return delta;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
leaq 0x8(%rdi), %rbp
movq %rbp, %rdi
callq 0x5dba
movq %rax, %r12
movl (%rax), %eax
cmpl $0x1, %eax
je 0x4161
testl %eax, %eax
je 0x41b2
leaq 0x4(%rsp), %r13
andl $0x0, (%r13)
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x5d1a
movq %rax, %r14
shrq $0x20, %r14
movl (%r13), %esi
incl %esi
movq %r15, %rdi
callq 0x5c7a
decl 0x4(%r15)
testq %r14, %r14
je 0x40f8
decl (%r15)
testq %rbx, %rbx
je 0x41a0
movl (%r15), %eax
cvtsi2sd %rax, %xmm0
movsd 0x40(%r15), %xmm1
mulsd %xmm1, %xmm0
addsd 0x48(%r15), %xmm0
movl (%r12), %eax
movl 0x4(%r12), %ecx
cvtsi2sd %rax, %xmm2
cvtsi2sd %rcx, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm2
movapd %xmm0, %xmm3
addsd %xmm2, %xmm3
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x418f
movapd %xmm2, %xmm4
movl %eax, %eax
cvtsi2sd %rax, %xmm0
divsd %xmm3, %xmm4
subsd %xmm1, %xmm0
mulsd %xmm4, %xmm0
divsd %xmm2, %xmm0
jmp 0x4193
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x5c7a
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6042
movq (%r15), %xmm0
pcmpeqd %xmm1, %xmm1
paddd %xmm0, %xmm1
movq %xmm1, (%r15)
pushq $-0x1
popq %r14
jmp 0x41a0
divsd %xmm3, %xmm0
callq 0x2130
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x55d0(%rip), %rdi      # 0x9789
leaq 0x53b4(%rip), %rsi      # 0x9574
leaq 0x55d6(%rip), %rcx      # 0x979d
movl $0xd5, %edx
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp.h
// Function: int cpyp::crp<int, std::hash<int>>::increment<double, cpyp::MT19937>(int const&, double const&, cpyp::MT19937&)
int increment(const Dish& dish, const F& p0, Engine& eng) {
    crp_table_manager<1>& loc = dish_locs_[dish];
    bool share_table = false;
    if (loc.num_customers()) {
      const F p_empty = F(strength_ + num_tables_ * discount_) * p0;
      const F p_share = F(loc.num_customers() - loc.num_tables() * discount_);
      share_table = sample_bernoulli(p_empty, p_share, eng);
    }

    if (share_table) {
      unsigned n = loc.share_table(discount_, eng);
      update_llh_add_customer_to_table_seating(n);
    } else {
      loc.create_table();
      update_llh_add_customer_to_table_seating(0);
      ++num_tables_;
    }
    ++num_customers_;
    return (share_table ? 0 : 1);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x5dba
movq %rax, %r15
movl (%rax), %eax
testl %eax, %eax
je 0x4252
movl (%rbx), %ecx
cvtsi2sd %rcx, %xmm0
movsd 0x40(%rbx), %xmm2
mulsd %xmm2, %xmm0
addsd 0x48(%rbx), %xmm0
mulsd (%r12), %xmm0
movl %eax, %eax
cvtsi2sd %rax, %xmm1
movl 0x4(%r15), %eax
cvtsi2sd %rax, %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm1
movq %r14, %rdi
callq 0x4445
testl %eax, %eax
je 0x4252
movsd 0x40(%rbx), %xmm0
movq %r15, %rdi
movq %r14, %rsi
callq 0x699c
movq %rbx, %rdi
movl %eax, %esi
callq 0x6a2c
xorl %eax, %eax
jmp 0x426b
movq %r15, %rdi
xorl %esi, %esi
callq 0x6aaa
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6a2c
incl (%rbx)
pushq $0x1
popq %rax
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp.h
// Function: int cpyp::crp<int, std::hash<int>>::increment_no_base<cpyp::MT19937>(int const&, cpyp::MT19937&, double*)
int increment_no_base(const Dish& dish, Engine& eng, double* logq) {
    crp_table_manager<1>& loc = dish_locs_[dish];
    bool share_table = false;
    if (loc.num_customers()) {
      const double p_empty = strength_ + num_tables_ * discount_;
      const double p_share = loc.num_customers() - loc.num_tables() * discount_;
      share_table = sample_bernoulli(p_empty, p_share, eng);

      // probability of sharing a table | dish
      *logq += log((share_table ? p_share : p_empty) / (p_empty + p_share));
    }

    if (share_table) {
      const unsigned selected_table_prevcount = loc.share_table(discount_, eng);
      // probability of picking this particlar table to share | dish
      *logq += log((selected_table_prevcount - discount_) /
                  (loc.num_customers() - 1 - loc.num_tables() * discount_));
      update_llh_add_customer_to_table_seating(selected_table_prevcount);
    } else {
      update_llh_add_customer_to_table_seating(0);
      loc.create_table();
      ++num_tables_;
    }
    ++num_customers_;
    return (share_table ? 0 : 1);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x5dba
movq %rax, %r15
movl (%rax), %eax
testl %eax, %eax
je 0x43eb
movl (%rbx), %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x40(%rbx), %xmm2
mulsd %xmm2, %xmm1
addsd 0x48(%rbx), %xmm1
movapd %xmm1, %xmm0
movsd %xmm1, 0x8(%rsp)
movl %eax, %eax
cvtsi2sd %rax, %xmm1
movl 0x4(%r15), %eax
cvtsi2sd %rax, %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm1
movsd %xmm1, (%rsp)
movq %r12, %rdi
callq 0x4445
movsd (%rsp), %xmm2
movsd 0x8(%rsp), %xmm1
movl %eax, %ebp
movapd %xmm1, %xmm0
testl %eax, %eax
je 0x4372
movapd %xmm2, %xmm0
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x2130
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
testl %ebp, %ebp
je 0x43eb
movsd 0x40(%rbx), %xmm0
movq %r15, %rdi
movq %r12, %rsi
callq 0x699c
movl %eax, %ebp
movl %eax, %eax
cvtsi2sd %rax, %xmm0
movsd 0x40(%rbx), %xmm1
movl (%r15), %eax
movl 0x4(%r15), %ecx
decl %eax
cvtsi2sd %rax, %xmm2
cvtsi2sd %rcx, %xmm3
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm2
divsd %xmm2, %xmm0
callq 0x2130
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6a2c
xorl %eax, %eax
jmp 0x4404
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6a2c
movq %r15, %rdi
xorl %esi, %esi
callq 0x6aaa
incl (%rbx)
pushq $0x1
popq %rax
incl 0x4(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::operator=(cpyp::SparseVector<unsigned int, 15u> const&)
const SparseVector<T>& operator=(const SparseVector<T>& other) {
    if (&other == this) return *this;
    clear();
    std::memcpy(this, &other, sizeof(SparseVector));
    if (is_remote_) {
      data_.rbmap = new std::unordered_map<unsigned, T>(*data_.rbmap);
    }
    return *this;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rdi, %rsi
je 0x4956
movq %rsi, %r14
movq %rbx, %rdi
callq 0x4be2
pushq $0x10
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpb $0x1, 0x79(%rbx)
jne 0x4956
pushq $0x38
popq %rdi
callq 0x2180
movq %rax, %r14
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x4974
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/random.h
// Function: cpyp::MT19937::GetTrulyRandomSeed()
static uint32_t GetTrulyRandomSeed() {
    uint32_t seed;
    std::ifstream r("/dev/urandom");
    if (r) {
      r.read((char*)&seed,sizeof(uint32_t));
    }
    if (r.fail() || !r) {
      std::cerr << "Warning: could not read from /dev/urandom. Seeding from clock" << std::endl;
      seed = std::time(NULL);
    }
    std::cerr << "Seeding random number sequence to " << seed << std::endl;
    return seed;
  }

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
leaq 0x487b(%rip), %rsi      # 0x94fc
leaq 0x8(%rsp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x2260
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x4cc1
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x21b0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x4ce7
movq 0x9328(%rip), %rdi      # 0xdff0
leaq 0x483a(%rip), %rsi      # 0x9509
callq 0x2170
movq %rax, %rdi
callq 0x2080
xorl %edi, %edi
callq 0x2150
movl %eax, 0x4(%rsp)
movq 0x9302(%rip), %rdi      # 0xdff0
leaq 0x4852(%rip), %rsi      # 0x9547
callq 0x2170
movl 0x4(%rsp), %esi
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x2080
movl 0x4(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x2040
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/m.h
// Function: cpyp::M<double>::log_beta_density(double const&, double const&, double const&)
static inline F log_beta_density(const F& x, const F& alpha, const F& beta) {
    assert(x > 0.0);  // should be >= but need to work out the density
    assert(x < 1.0);  // should be <= but need to work out the density
    assert(alpha > 0.0);
    assert(beta > 0.0);
    return (alpha - 1) * std::log(x) +
        (beta - 1) * std::log(1 - x) -
        log_beta_fn(alpha, beta);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5688
movsd 0x3a3f(%rip), %xmm1     # 0x9010
ucomisd %xmm0, %xmm1
jbe 0x56a1
movq %rsi, %r14
movsd (%rsi), %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x56ba
movq %rdx, %rbx
movsd (%rdx), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x56d3
movq %rdi, %r15
movsd 0x3a74(%rip), %xmm1     # 0x9080
movsd %xmm1, 0x8(%rsp)
addsd %xmm1, %xmm3
movsd %xmm3, 0x18(%rsp)
callq 0x2130
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x39d1(%rip), %xmm0     # 0x9010
subsd (%r15), %xmm0
callq 0x2130
mulsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5810
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3f9a(%rip), %rdi      # 0x9629
leaq 0x3f9b(%rip), %rsi      # 0x9631
leaq 0x3f9f(%rip), %rcx      # 0x963c
pushq $0x3b
jmp 0x56ea
leaq 0x3fed(%rip), %rdi      # 0x9695
leaq 0x3f82(%rip), %rsi      # 0x9631
leaq 0x3f86(%rip), %rcx      # 0x963c
pushq $0x3c
jmp 0x56ea
leaq 0x3fdc(%rip), %rdi      # 0x969d
leaq 0x3f69(%rip), %rsi      # 0x9631
leaq 0x3f6d(%rip), %rcx      # 0x963c
pushq $0x3d
jmp 0x56ea
leaq 0x3fcf(%rip), %rdi      # 0x96a9
leaq 0x3f50(%rip), %rsi      # 0x9631
leaq 0x3f54(%rip), %rcx      # 0x963c
pushq $0x3e
popq %rdx
callq 0x20d0
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/m.h
// Function: cpyp::M<double>::log_gamma_density(double const&, double const&, double const&)
static F log_gamma_density(const F& x, const F& shape, const F& rate) {
    assert(x >= 0.0);
    assert(shape > 0.0);
    assert(rate > 0.0);
    return (shape-1)*std::log(x) - shape*std::log(rate) -
        x/rate - lgamma(shape);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x57ac
movq %rsi, %rbx
movsd (%rsi), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x57c5
movq %rdx, %r14
movsd (%rdx), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x57de
movq %rdi, %r15
addsd 0x3944(%rip), %xmm3     # 0x9080
movsd %xmm3, 0x18(%rsp)
callq 0x2130
movsd %xmm0, 0x8(%rsp)
movsd (%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14), %xmm0
callq 0x2130
mulsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd (%r15), %xmm0
divsd (%r14), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd (%rbx), %xmm0
callq 0x2110
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3f01(%rip), %rdi      # 0x96b4
leaq 0x3e77(%rip), %rsi      # 0x9631
leaq 0x3efc(%rip), %rcx      # 0x96bd
pushq $0x31
jmp 0x57f5
leaq 0x3f4b(%rip), %rdi      # 0x9717
leaq 0x3e5e(%rip), %rsi      # 0x9631
leaq 0x3ee3(%rip), %rcx      # 0x96bd
pushq $0x32
jmp 0x57f5
leaq 0x3f3e(%rip), %rdi      # 0x9723
leaq 0x3e45(%rip), %rsi      # 0x9631
leaq 0x3eca(%rip), %rcx      # 0x96bd
pushq $0x33
popq %rdx
callq 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::const_iterator::const_iterator(cpyp::SparseVector<unsigned int, 15u> const&, bool)
const_iterator(const SparseVector<T>& v, const bool is_end) : local_(!v.is_remote_) {
      if (local_) {
        local_it_ = &v.data_.local[is_end ? v.local_size_ : 0];
      } else {
        if (is_end)
          remote_it_ = v.data_.rbmap->end();
        else
          remote_it_ = v.data_.rbmap->begin();
      }
    }

// Assembly:
movb 0x79(%rsi), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, (%rdi)
andq $0x0, 0x10(%rdi)
testb %al, %al
je 0x588b
testb %dl, %dl
je 0x589f
andq $0x0, 0x10(%rdi)
retq
movzbl 0x78(%rsi), %eax
xorl %ecx, %ecx
testb %dl, %dl
cmovnel %eax, %ecx
leaq (%rsi,%rcx,8), %rax
movq %rax, 0x8(%rdi)
retq
movq (%rsi), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::const_iterator::operator==(cpyp::SparseVector<unsigned int, 15u>::const_iterator const&) const
inline bool operator==(const const_iterator& o) const {
      if (o.local_ != local_) return false;
      if (local_) {
        return local_it_ == o.local_it_;
      } else {
        return remote_it_ == o.remote_it_;
      }
    }

// Assembly:
movb (%rsi), %al
cmpb (%rdi), %al
jne 0x58c0
testb %al, %al
je 0x58c3
movq 0x8(%rdi), %rax
cmpq 0x8(%rsi), %rax
jmp 0x58cb
xorl %eax, %eax
retq
movq 0x10(%rdi), %rax
cmpq 0x10(%rsi), %rax
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp.h
// Function: cpyp::crp<int, std::hash<int>>::update_llh_remove_customer_from_table_seating(unsigned int)
void update_llh_remove_customer_from_table_seating(unsigned n) {
    unsigned t = 0;
    if (n == 1) {
      t = 1;
    }
    llh_ += log(strength_ + num_customers_ - 1);
    if (t == 1) {
      llh_ -= log(discount_) + log(strength_ / discount_ + num_tables_ - 1);
    }
    if (n > 1) {
      llh_ -= log(n - discount_ - 1);
    }
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x4(%rdi), %eax
cvtsi2sd %rax, %xmm0
addsd 0x48(%rdi), %xmm0
addsd 0x33e9(%rip), %xmm0     # 0x9080
callq 0x2130
addsd 0x70(%rbx), %xmm0
movsd %xmm0, 0x70(%rbx)
testl %ebp, %ebp
je 0x5d12
cmpl $0x1, %ebp
jne 0x5ceb
movsd 0x40(%rbx), %xmm0
callq 0x2130
movsd 0x48(%rbx), %xmm2
divsd 0x40(%rbx), %xmm2
movl (%rbx), %eax
cvtsi2sd %rax, %xmm1
movsd %xmm0, (%rsp)
addsd %xmm2, %xmm1
addsd 0x33a5(%rip), %xmm1     # 0x9080
movapd %xmm1, %xmm0
callq 0x2130
addsd (%rsp), %xmm0
jmp 0x5d04
movl %ebp, %eax
cvtsi2sd %rax, %xmm0
subsd 0x40(%rbx), %xmm0
addsd 0x3381(%rip), %xmm0     # 0x9080
callq 0x2130
movsd 0x70(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp_table_manager.h
// Function: std::pair<unsigned int, int> cpyp::crp_table_manager<1u>::remove_customer<cpyp::MT19937>(cpyp::MT19937&, unsigned int*)
inline std::pair<unsigned,int> remove_customer(Engine& eng, unsigned* selected_table_postcount) {
    int r = sample_uniform01<double>(eng) * num_customers();
    const auto floor_count = [&]()->std::pair<unsigned,int> {
      for (unsigned floor = 0; floor < NumFloors; ++floor) {
        const auto end = h[floor].end();
        auto i = h[floor].begin();
        for (; i != end; ++i) {
          // sample randomly, i.e. *don't* discount
          const int thresh = i->first * i->second;
          if (thresh > r) return std::make_pair(floor, i->first);
          r -= thresh;
        }
      }
      std::cerr << "Serious error while decrementing: Floors=" << NumFloors
                << " r=" << r << std::endl;
      std::abort();
    }();
    --customers;
    const unsigned tc = floor_count.second;
    if (selected_table_postcount) *selected_table_postcount = tc - 1;
    if (tc == 1) { // remove customer from table containing a single customer
      h[floor_count.first].decrement(1);
      --tables;
      return std::make_pair(floor_count.first, -1);
    } else {
      h[floor_count.first].move(tc, tc - 1);
      return std::make_pair(0u, 0);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x427a
movl (%rbx), %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
movq %rcx, 0x8(%rdi)
callq 0x6144
movq %rax, %r14
movq %rax, %rsi
shrq $0x20, %rsi
decl (%rbx)
testq %r15, %r15
je 0x5d6f
leal -0x1(%rsi), %eax
movl %eax, (%r15)
movl %r14d, %eax
shlq $0x7, %rax
leaq (%rbx,%rax), %rdi
addq $0x8, %rdi
cmpl $0x1, %esi
jne 0x5d9f
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x6270
decl 0x4(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
orq %rax, %r14
jmp 0x5dad
leal -0x1(%rsi), %edx
pushq $0x1
popq %rcx
callq 0x6298
xorl %r14d, %r14d
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::erase(unsigned int)
void erase(unsigned k) {
    if (is_remote_) {
      data_.rbmap->erase(k);
    } else {
      for (unsigned i = 0; i < local_size_; ++i) {
        if (data_.local[i].first() == k) {
          for (unsigned j = i+1; j < local_size_; ++j) {
            data_.local[j-1].first() = data_.local[j].first();
            data_.local[j-1].second() = data_.local[j].second();
          }
        }
      }
      --local_size_;
    }
  }

// Assembly:
pushq %rax
movl %esi, 0x4(%rsp)
cmpb $0x0, 0x79(%rdi)
je 0x62d4
movq (%rdi), %rdi
leaq 0x4(%rsp), %rsi
callq 0x6890
jmp 0x630a
movzbl 0x78(%rdi), %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
cmpq %rax, %rdx
je 0x6305
cmpl %esi, (%rdi,%rdx,8)
jne 0x62fd
movq %rcx, %r8
cmpq %rax, %r8
jae 0x62fd
movq (%rdi,%r8,8), %r9
movq %r9, -0x8(%rdi,%r8,8)
incq %r8
jmp 0x62ea
incq %rdx
incq %rcx
jmp 0x62dd
decb %al
movb %al, 0x78(%rdi)
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::get_or_create_bin(unsigned int)
inline T& get_or_create_bin(unsigned k) {
    if (is_remote_) {
      return (*data_.rbmap)[k];
    } else {
      for (unsigned i = 0; i < local_size_; ++i)
        if (data_.local[i].first() == k) return data_.local[i].second();
    }
    assert(!is_remote_);
    // currently local!
    if (local_size_ < LOCAL_MAX) {
      PairIntT<T>& p = data_.local[local_size_];
      ++local_size_;
      p.first() = k;
      p.second() = T();
      return p.second();
    } else {
      swap_local_rbmap();
      return (*data_.rbmap)[k];  
    }
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
cmpb $0x0, 0x79(%rdi)
jne 0x6360
movzbl 0x78(%rbx), %ecx
leaq -0x4(%rbx), %rdi
movq %rcx, %rdx
subq $0x1, %rdx
jb 0x633d
leaq 0x8(%rdi), %rax
cmpl %esi, 0x4(%rdi)
movq %rax, %rdi
jne 0x6329
jmp 0x636d
cmpb $0xe, %cl
ja 0x6358
leal 0x1(%rcx), %eax
movb %al, 0x78(%rbx)
leaq (%rbx,%rcx,8), %rax
addq $0x4, %rax
movl %esi, -0x4(%rax)
andl $0x0, (%rax)
jmp 0x636d
movq %rbx, %rdi
callq 0x6374
movq (%rbx), %rdi
leaq 0xc(%rsp), %rsi
callq 0x645e
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/msparse_vector.h
// Function: cpyp::SparseVector<unsigned int, 15u>::swap_local_rbmap()
void swap_local_rbmap() {
    if (is_remote_) { // data is in rbmap, move to local
      assert(data_.rbmap->size() < LOCAL_MAX);
      const std::unordered_map<unsigned, T>* m = data_.rbmap;
      local_size_ = m->size();
      int i = 0;
      for (typename std::unordered_map<unsigned, T>::const_iterator it = m->begin();
           it != m->end(); ++it) {
        data_.local[i] = *it;
        ++i;
      }
      is_remote_ = false;
    } else { // data is local, move to rbmap
      std::unordered_map<unsigned, T>* m = new std::unordered_map<unsigned, T>(
         reinterpret_cast<std::pair<unsigned, T>*>(&data_.local[0]),
         reinterpret_cast<std::pair<unsigned, T>*>(&data_.local[local_size_]), local_size_ * 1.5 + 1);
      data_.rbmap = m;
      is_remote_ = true;
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x79(%rdi)
jne 0x63b4
movq (%rbx), %rax
movq 0x18(%rax), %rcx
cmpq $0xf, %rcx
jae 0x642c
movb %cl, 0x78(%rbx)
addq $0x10, %rax
movq %rbx, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x641f
movq 0x8(%rax), %rdx
movq %rdx, (%rcx)
addq $0x8, %rcx
jmp 0x639f
pushq $0x38
popq %rdi
callq 0x2180
movq %rax, %r14
movzbl 0x78(%rbx), %eax
leaq (%rbx,%rax,8), %rdx
cvtsi2sd %eax, %xmm0
mulsd 0x2cb5(%rip), %xmm0     # 0x9088
addsd 0x2c35(%rip), %xmm0     # 0x9010
cvttsd2si %xmm0, %rax
movq %rax, %rsi
sarq $0x3f, %rsi
subsd 0x2ca1(%rip), %xmm0     # 0x9090
cvttsd2si %xmm0, %rcx
andq %rsi, %rcx
orq %rax, %rcx
leaq 0x15(%rsp), %rax
movq %rax, (%rsp)
leaq 0x17(%rsp), %r8
leaq 0x16(%rsp), %r9
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6718
movq %r14, (%rbx)
movb $0x1, %al
jmp 0x6421
xorl %eax, %eax
movb %al, 0x79(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3430(%rip), %rdi      # 0x9863
leaq 0x3411(%rip), %rsi      # 0x984b
leaq 0x3442(%rip), %rcx      # 0x9883
movl $0x1b9, %edx            # imm = 0x1B9
callq 0x20d0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/redpony[P]cpyp/./cpyp/crp_table_manager.h
// Function: unsigned int cpyp::crp_table_manager<1u>::share_table<cpyp::MT19937>(double, cpyp::MT19937&)
unsigned share_table(const double discount, Engine& eng) {
    const double z = customers - discount * num_tables();
    double r = z * sample_uniform01<double>(eng);
    const auto floor_count = [&]()->std::pair<unsigned,int> {
      for (unsigned floor = 0; floor < NumFloors; ++floor) {
        const auto end = h[floor].end();
        auto i = h[floor].begin();
        for (; i != end; ++i) {
          const double thresh = (i->first - discount) * i->second;
          if (thresh > r) return std::make_pair(floor, i->first);
          r -= thresh;
        }
      }
      std::cerr << "Serious error while incrementing: Floors=" << NumFloors
                << " r=" << r << std::endl;
      std::abort();
    }();
    const unsigned cc = floor_count.second;
    h[floor_count.first].move(cc, cc + 1);
    ++customers;
    return cc;
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movsd %xmm0, (%r14)
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
cvtsi2sd %rax, %xmm2
cvtsi2sd %rcx, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
movq %rsi, %rdi
callq 0x427a
mulsd 0x8(%rsp), %xmm0
leaq 0x10(%rsp), %rax
movsd %xmm0, (%rax)
leaq 0x20(%rsp), %rdi
movq %rbx, (%rdi)
movq %r14, 0x8(%rdi)
movq %rax, 0x10(%rdi)
callq 0x6af0
movq %rax, %r14
movl %r14d, %ecx
shrq $0x20, %r14
shlq $0x7, %rcx
leaq (%rbx,%rcx), %rdi
addq $0x8, %rdi
leal 0x1(%r14), %edx
pushq $0x1
popq %rcx
movl %r14d, %esi
callq 0x6298
incl (%rbx)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop