LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/besm6[P]pascal-re/dtran.cc
// Function: Dtran::prsets()
void prsets() {
    for (uint cur = table_off - set_len; cur < table_off; ++cur) {
        uint64 word = memory[cur];
        uint len = word >> 36;
        uint from = (word >> 24) & 03777;
        uint cnt = (word >> 12) & 07777;
        uint to = word & 03777;
        std::string src = symtab[from];
        if (len == 1 && src[0] == '*') {
            char * end;
            uint off = strtol(src.c_str()+1, &end, 8);
            do {
                switch (*end) {
                case '\0': break;
                case '+':
                    if (isdigit(end[1]))
                        off += atoi(end+1);
                    else
                        off = ~0;
                    break;
                case 'B':
                    ++end;
                    continue;
                default:
                    off = ~0;
                    break;
                }
                break;
            } while (1);
        }
        printf(" %d,SET,%s\n", len, src.c_str());
        printf(" %d,   ,%s\n", cnt, symtab[to].c_str());
    }
}

// Assembly:
movl 0x24(%rdi), %ecx
movl %ecx, %eax
subl 0x10(%rdi), %eax
cmpl %ecx, %eax
jae 0x3404
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movl %eax, %r12d
movq 0x48(%rbx,%r12,8), %rbp
movq %rbp, %r13
shrq $0x24, %r13
movq %rbp, %rax
shrq $0x18, %rax
andl $0x7ff, %eax            # imm = 0x7FF
movq 0x40048(%rbx), %rcx
shll $0x5, %eax
movq %r14, 0x8(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x49cc
cmpq $0x1, %r13
jne 0x3387
movq 0x8(%rsp), %rdi
cmpb $0x2a, (%rdi)
jne 0x3387
incq %rdi
movq %rsp, %rsi
movl $0x8, %edx
callq 0x21c0
movq (%rsp), %rax
decq %rax
cmpb $0x42, 0x1(%rax)
leaq 0x1(%rax), %rax
je 0x337d
movl %ebp, %r15d
shrl $0xc, %r15d
andl $0xfff, %r15d           # imm = 0xFFF
andl $0x7ff, %ebp            # imm = 0x7FF
movq 0x8(%rsp), %rdx
leaq 0x2396(%rip), %rdi      # 0x573d
movl %r13d, %esi
xorl %eax, %eax
callq 0x2030
movq 0x40048(%rbx), %rax
shll $0x5, %ebp
movq (%rax,%rbp), %rdx
leaq 0x2383(%rip), %rdi      # 0x5749
movl %r15d, %esi
xorl %eax, %eax
callq 0x2030
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x33e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
incq %r12
movl 0x24(%rbx), %eax
cmpq %rax, %r12
jb 0x3319
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x2a, %r15d
leaq 0x19a7(%rip), %rbp      # 0x502c
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %r13
movq %r14, %rax
movl %r15d, %ecx
shrq %cl, %rax
andl $0x3f, %eax
movslq (%rbp,%rax,4), %rsi
addq %rbp, %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x373e
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2060
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x36dc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2140
addq $-0x6, %r15
cmpq $0x2b, %r15
jb 0x368f
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x371c
movq %rax, %r14
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x371c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2140
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x3736
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x1684(%rip), %rsi      # 0x5444
leaq 0x167e(%rip), %rdx      # 0x5445
callq 0x377c
movl %ebp, %eax
shrl $0x7, %eax
addb $0x41, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x20f0
movl %ebp, %eax
shrb $0x3, %al
andb $0xf, %al
addb $0x4b, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x20f0
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x20f0
andb $0x7, %bpl
orb $0x30, %bpl
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x20f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3e37
movq (%r15), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x28, %r12d
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r13
movq %r14, %rax
movl %r12d, %ecx
shrq %cl, %rax
movzbl %al, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x4900
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2060
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4802
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
addq $-0x8, %r12
cmpq $0x29, %r12
jb 0x47c2
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x483d
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x483d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x4855
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
xorl %edx, %edx
movl $0x2a, %ecx
movabsq $-0x7fffffe63ff8402, %rax # imm = 0xF80000019C007BFE
xorl %r9d, %r9d
xorl %edi, %edi
xorl %r8d, %r8d
movq %rsi, %r10
shrq %cl, %r10
andl $0x3f, %r10d
cmpl $0x3f, %r10d
ja 0x48d0
btq %r10, %rax
jae 0x48a4
xorl %r10d, %r10d
testb %r10b, %r10b
je 0x48f6
addq $-0x6, %rcx
cmpq $0x2b, %rcx
setae %dl
jb 0x4877
jmp 0x48f6
testq %r10, %r10
jne 0x48d0
testl %edi, %edi
setne %r10b
testl %r8d, %r8d
setne %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x48c5
testb $0x1, %r9b
je 0x488d
incl %r8d
movb $0x1, %r9b
movb $0x1, %r10b
jmp 0x4890
testl %edi, %edi
setne %r10b
testl %r8d, %r8d
setne %r11b
andb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x48ec
testb $0x1, %r9b
jne 0x488d
incl %edi
movb $0x1, %r10b
xorl %r9d, %r9d
jmp 0x4890
cmpl $0x2, %edi
setge %al
andb %dl, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x28, %r15d
leaq 0x18(%rsp), %rbp
leaq 0xc82(%rip), %r12       # 0x571b
leaq 0x8(%rsp), %r13
movq %r14, %rax
movl %r15d, %ecx
shrq %cl, %rax
movzbl %al, %edx
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x254c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2060
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4ae0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
addq $-0x8, %r15
cmpq $0x29, %r15
jb 0x4a9e
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4b1b
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4b1b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x4b33
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/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:
movsbl %dl, %eax
cmpw $0x6, 0x4(%rdi)
jl 0x139dd
addq $0x28, %rdi
movswl 0x2(%rsi), %esi
jmp 0x13a75
movsbl 0x1(%rsi), %r8d
movsbl (%rsi), %ecx
movsbl 0x1(%rdi), %edx
subl %ecx, %edx
subl %r8d, %edx
movsbl (%rdi), %r10d
movl %r10d, %esi
imull %ecx, %esi
leal (%rsi,%r8), %r9d
leal (%r9,%r9,2), %r9d
addl %eax, %r9d
movslq %r9d, %r11
leaq 0x22f83(%rip), %r9      # 0x36990
movq (%r9,%r11,8), %r11
xorq %r11, 0x28(%rdi)
addl %edx, %esi
leal (%rsi,%rsi,2), %esi
addl %eax, %esi
movslq %esi, %rsi
movq (%r9,%rsi,8), %rsi
xorq %rsi, 0x30(%rdi)
movl %r10d, %esi
imull %r8d, %esi
leal (%rsi,%rdx), %r11d
leal (%r11,%r11,2), %r11d
addl %eax, %r11d
movslq %r11d, %r11
movq (%r9,%r11,8), %r11
xorq %r11, 0x38(%rdi)
imull %r10d, %edx
addl %edx, %r8d
leal (%r8,%r8,2), %r8d
addl %eax, %r8d
movslq %r8d, %r8
movq (%r9,%r8,8), %r8
xorq %r8, 0x40(%rdi)
addl %ecx, %edx
leal (%rdx,%rdx,2), %edx
addl %eax, %edx
movslq %edx, %rdx
movq (%r9,%rdx,8), %rdx
xorq %rdx, 0x48(%rdi)
addl %ecx, %esi
addq $0x50, %rdi
leal (%rsi,%rsi,2), %ecx
addl %eax, %ecx
movslq %ecx, %rax
leaq 0x22f0c(%rip), %rcx     # 0x36990
movq (%rcx,%rax,8), %rax
xorq %rax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movswl 0x2(%rsi), %esi
callq 0x184f8
cmpl $0x3, %eax
jne 0x17d62
movswl 0x2(%r15), %esi
movslq %esi, %rdx
movq 0x10(%r14), %rax
shlq $0x4, %rsi
movzwl 0x4(%rax,%rsi), %ecx
cmpl %edx, %ecx
je 0x17cd3
leaq 0x4(%rax,%rsi), %rsi
movl %ecx, %ecx
shlq $0x4, %rcx
movzwl 0x4(%rax,%rcx), %edi
movzwl %di, %ecx
movl %ecx, %r8d
shll $0x4, %r8d
cmpw 0x4(%rax,%r8), %di
jne 0x17cb3
movw %di, (%rsi)
shll $0x4, %ecx
movb 0x6(%rax,%rcx), %cl
movq 0x58(%r14), %rsi
leaq (%rdx,%rdx,8), %rdx
leaq 0x2(%rsi,%rdx,8), %rdx
xorl %esi, %esi
movswq (%rdx,%rsi), %r8
cmpq $-0x1, %r8
je 0x17d45
movq %r8, %rdi
shlq $0x4, %rdi
cmpb %bl, (%rax,%rdi)
jne 0x17d45
movl %r8d, %r9d
shlq $0x4, %r9
movzwl 0x4(%rax,%r9), %edi
cmpl %r8d, %edi
je 0x17d3a
leaq 0x4(%rax,%r9), %r8
movl %edi, %edi
shlq $0x4, %rdi
movzwl 0x4(%rax,%rdi), %r9d
movzwl %r9w, %edi
movl %edi, %r10d
shll $0x4, %r10d
cmpw 0x4(%rax,%r10), %r9w
jne 0x17d17
movw %r9w, (%r8)
shll $0x4, %edi
orb 0x6(%rax,%rdi), %cl
addq $0x4, %rsi
leaq 0x4(%rsi), %rdi
cmpq $0x14, %rsi
movq %rdi, %rsi
jl 0x17ce9
movzbl %cl, %eax
leaq 0x1bb14(%rip), %rcx     # 0x33870
cmpb $0x3, (%rax,%rcx)
je 0x17d6b
leaq 0x1eafd(%rip), %rax     # 0x36866
movb (%rax), %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movl %esi, %r15d
movq %rdi, %rbx
movq 0xafe0(%rdi), %rax
movsbl (%rax), %r14d
movzbl %dl, %ebp
testl %r14d, %r14d
jle 0x185b2
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl $0x3, %r9d
callq 0x1864c
incl %r12d
cmpl %r12d, %r14d
jne 0x18592
movzbl %r15b, %r15d
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x18706
testb %r14b, %r14b
jle 0x185f0
movq %rbx, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
movl $0x1, %r9d
callq 0x1864c
incl %r12d
cmpl %r12d, %r14d
jne 0x185cd
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x18706
testb %r14b, %r14b
jle 0x18632
decl %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r14d, %esi
movl %r12d, %edx
movl $0x2, %ecx
movl %ebp, %r8d
movl $0x5, %r9d
callq 0x1864c
incl %r12d
addl $-0x1, %r14d
jb 0x1860d
movq %rbx, %rdi
movl $0x2, %esi
movl %ebp, %edx
movl %r15d, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x18706
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4bb2(%rip), %r14      # 0x6fd0
leaq 0x1bdf(%rip), %rsi      # 0x4004
movl $0x7, %edx
movq %r14, %rdi
callq 0x2180
leaq 0x1bd3(%rip), %rsi      # 0x400c
movl $0xb, %edx
movq %r14, %rdi
callq 0x2180
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2180
movq %rax, %r14
leaq 0x1bb9(%rip), %rsi      # 0x4018
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movzbl 0x20(%rbx), %esi
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
leaq 0x1ba0(%rip), %rsi      # 0x4022
movl $0xc, %edx
movq %rax, %rdi
callq 0x2180
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x20d0
movq %rax, %r14
leaq 0x1b8a(%rip), %rsi      # 0x402f
movl $0x9, %edx
movq %rax, %rdi
callq 0x2180
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x20d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sirak92[P]TradeMatchingEngine/src/TradeMatchingEngine.cpp
// Function: TradeMatchingEngine::start()
void TradeMatchingEngine::start()
{
	std::cout << "Trade Matching Engine started....\n";

	Order *order = getOrder();

	while (order) {
		processOrder(order);

		// get next order
		order = getOrder();
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x4a89(%rip), %rdi      # 0x6fd0
leaq 0x1aeb(%rip), %rsi      # 0x4039
movl $0x22, %edx
callq 0x2180
callq 0x2570
movq %rbx, %rdi
movq %rax, %rsi
callq 0x25c8
callq 0x2570
jmp 0x255d
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movl $0x38, %edi
callq 0x2150
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
xorl %eax, %eax
movb %al, 0x10(%rbx)
movb %al, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movq 0x4a2d(%rip), %rdi      # 0x6fd0
leaq 0x1ab2(%rip), %rsi      # 0x405c
movl $0x3f, %edx
callq 0x2180
movq 0x4a25(%rip), %rdi      # 0x6fe0
movq %rbx, %rsi
callq 0x3e35
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2674
cmpb $0x1, 0x8(%rbx)
jne 0x25eb
movq (%rbx), %rdi
callq 0x29fc
movq (%rbx), %rdi
popq %rbx
jmp 0x2a44
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3468
movl 0x28(%r14), %eax
movl %eax, 0x4(%rsp)
cmpb $0x1, 0x20(%r14)
jne 0x26ab
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2a8e
jmp 0x26bf
leaq 0x30(%rbx), %rsi
leaq 0x4(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2d04
movslq 0x4(%rsp), %rax
testq %rax, %rax
je 0x26da
movq %rax, 0x28(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2708
jmp 0x26f8
testq %r14, %r14
je 0x26f8
movq (%r14), %rdi
leaq 0x10(%r14), %rax
cmpq %rax, %rdi
je 0x26f0
callq 0x2130
movq %r14, %rdi
callq 0x2130
movq %rbx, %rdi
callq 0x2760
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sirak92[P]TradeMatchingEngine/src/OrdersBook.cpp
// Function: OrdersBook::addOrder(Order*)
void OrdersBook::addOrder(Order *o)
{
	if (o->m_isBuy)
		m_bids[o->m_price].push_back(o);
	else
		m_asks[o->m_price].push_back(o);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x1, 0x20(%rsi)
jne 0x272a
addq $0x30, %rdi
movl 0x30(%rbx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
callq 0x2f7a
jmp 0x2737
movl 0x30(%rbx), %eax
movq %rsp, %rsi
movl %eax, (%rsi)
callq 0x2fde
movq %rax, %r14
movl $0x18, %edi
callq 0x2150
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2050
incq 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movslq %ecx, %rbp
movq %rbp, 0x28(%rdx)
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %r12
movq %r12, %rdi
callq 0x33d8
movq 0x30(%r14), %rax
movq %rax, 0x30(%r12)
movups 0x20(%r14), %xmm0
movups %xmm0, 0x20(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x292e
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x284a
callq 0x2130
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x33d8
movups 0x20(%r15), %xmm0
movups %xmm0, 0x20(%r12)
movq 0x30(%r15), %rax
movq %rax, 0x30(%r12)
movq %rbp, 0x28(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x30(%r12)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x33d8
leaq 0x58(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rsp, %rsi
movq %rcx, 0x30(%rsi)
movups (%rax), %xmm0
movups %xmm0, 0x20(%rsi)
movq %rbx, %rdi
callq 0x292e
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x28d6
callq 0x2130
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x28e5
callq 0x2130
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x290d
callq 0x2130
jmp 0x290d
movq %rax, %rbx
movq 0x38(%rsp), %rdi
jmp 0x291c
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x2926
callq 0x2130
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a0a
cmpq %rdx, %rax
je 0x297c
movq %rax, %r12
movq %rdx, %r15
leaq 0x40(%r12), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x3d04
testb %al, %al
jne 0x29ce
movq %r12, %rdi
callq 0x20f0
movq %rax, %r12
cmpq %r15, %rax
jne 0x2958
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x3042
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b3c
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29ad
callq 0x2130
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29c0
callq 0x2130
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 0x3d9e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30b0
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x21a0
leaq 0xf(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x21b0
leaq 0x28(%r14), %rsi
movq %rax, %rdi
callq 0x20a0
leaq 0x30(%r14), %rsi
movq %rax, %rdi
callq 0x20a0
movsbl (%r15), %edi
callq 0x2240
cmpl $0x42, %eax
jne 0x3e84
movb $0x1, 0x20(%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x40(%rdi), %rsi
leaq 0x48(%rdi), %rdx
callq 0x5dda
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4be2
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0xc(%rsp), %rax
movsd (%rbx,%rax,8), %xmm0
callq 0x2150
mulsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movl 0xc(%rsp), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0xc(%rsp)
cmpl $0x2, %eax
jl 0x24d9
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x69ca
movq %rax, %r12
movl (%rax), %eax
cmpl $0x1, %eax
je 0x4e29
testl %eax, %eax
je 0x4e7e
leaq 0x4(%rsp), %r13
movl $0x0, (%r13)
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x686e
movq %rax, %r14
shrq $0x20, %r14
movl (%r13), %esi
incl %esi
movq %r15, %rdi
callq 0x67be
decl 0x4(%r15)
testq %r14, %r14
je 0x4dbd
decl (%r15)
testq %rbx, %rbx
je 0x4e6c
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 0x4e5b
movapd %xmm2, %xmm4
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd %xmm3, %xmm4
subsd %xmm1, %xmm0
mulsd %xmm4, %xmm0
divsd %xmm2, %xmm0
jmp 0x4e5f
movq %r15, %rdi
movl $0x1, %esi
callq 0x67be
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6c74
movq (%r15), %xmm0
pcmpeqd %xmm1, %xmm1
paddd %xmm0, %xmm1
movq %xmm1, (%r15)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x4e6c
divsd %xmm3, %xmm0
callq 0x2150
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 0x5933(%rip), %rdi      # 0xa7b8
leaq 0x5717(%rip), %rsi      # 0xa5a3
leaq 0x5939(%rip), %rcx      # 0xa7cc
movl $0xd5, %edx
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x69ca
movq %rax, %r15
movq %rax, %r14
movl (%rax), %eax
testl %eax, %eax
je 0x4f32
movl (%rbx), %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x40(%rbx), %xmm0
mulsd %xmm0, %xmm1
addsd 0x48(%rbx), %xmm1
mulsd (%r13), %xmm1
movapd %xmm1, %xmm2
movsd %xmm1, 0x8(%rsp)
movl %eax, %eax
cvtsi2sd %rax, %xmm3
movl 0x4(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x10(%rsp)
movq %r12, %rdi
callq 0x78bf
movsd 0x8(%rsp), %xmm1
divsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
seta %bpl
jmp 0x4f34
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x4f58
movq 0x40(%rbx), %xmm0
movq %r14, %rdi
movq %r12, %rsi
callq 0x7666
movq %rbx, %rdi
movl %eax, %esi
callq 0x7700
jmp 0x500c
addq $0x8, %r15
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x81(%r14)
je 0x4f7d
movq (%r15), %rdi
leaq 0x4(%rsp), %rsi
callq 0x7126
jmp 0x4fec
movzbl 0x80(%r14), %ecx
testq %rcx, %rcx
setne %dl
je 0x4fc5
cmpl $0x1, (%r15)
jne 0x4f99
movb $0x1, %dl
xorl %eax, %eax
jmp 0x4fb9
leaq -0x1(%rcx), %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x4fc3
leaq 0x1(%rsi), %rax
cmpl $0x1, 0x10(%r14,%rsi,8)
movq %rax, %rsi
jne 0x4f9f
cmpq %rcx, %rax
setb %dl
leaq (%r15,%rax,8), %rax
addq $0x4, %rax
jmp 0x4fc5
xorl %edx, %edx
testb %dl, %dl
jne 0x4fec
cmpb $0xe, %cl
ja 0x5026
movl %ecx, %eax
shll $0x3, %eax
incl %ecx
movb %cl, 0x80(%r14)
movq $0x1, 0x8(%r14,%rax)
addq %r15, %rax
addq $0x4, %rax
incl (%rax)
movq (%r14), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, (%r14)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7700
incl (%rbx)
incl 0x4(%rbx)
xorb $0x1, %bpl
movzbl %bpl, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x7036
jmp 0x4f6e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq %rdi, %rsi
je 0x57cd
movq %rsi, %r14
cmpb $0x1, 0x79(%rbx)
jne 0x576a
movq (%rbx), %r15
testq %r15, %r15
je 0x576a
movq %r15, %rdi
callq 0x59cc
movq %r15, %rdi
callq 0x2180
movw $0x0, 0x78(%rbx)
movl $0x10, %ecx
movq %rbx, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpb $0x1, 0x79(%rbx)
jne 0x57cd
movl $0x38, %edi
callq 0x21b0
movq %rax, %r14
movq (%rbx), %rsi
xorl %eax, %eax
movq %rax, (%r14)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x10(%r14)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%r14)
movups 0x20(%rsi), %xmm0
movups %xmm0, 0x20(%r14)
movq %rax, 0x30(%r14)
leaq 0x8(%rsp), %rdx
movq %r14, (%rdx)
movq %r14, %rdi
callq 0x5822
movq %r14, (%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4b32(%rip), %rsi      # 0xa52b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2290
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
jne 0x5a2d
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0x21e0
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x5a8e
movq 0x85ac(%rip), %rbx      # 0xdff0
leaq 0x4aed(%rip), %rsi      # 0xa538
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x21c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x857a(%rip), %rdi      # 0xdff0
callq 0x2030
movq %rax, %rdi
callq 0x2100
xorl %edi, %edi
callq 0x2170
movl %eax, 0x4(%rsp)
movq 0x855b(%rip), %rdi      # 0xdff0
leaq 0x4ada(%rip), %rsi      # 0xa576
movl $0x22, %edx
callq 0x21c0
movl 0x4(%rsp), %esi
movq 0x853f(%rip), %rdi      # 0xdff0
callq 0x20f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movl 0x4(%rsp), %ebx
leaq 0x8(%rsp), %rdi
callq 0x2050
movl %ebx, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6390
movsd 0x3d65(%rip), %xmm1     # 0xa010
ucomisd %xmm0, %xmm1
jbe 0x63af
movq %rsi, %r14
movsd (%rsi), %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jbe 0x63ce
movq %rdx, %rbx
movsd (%rdx), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x63ed
movq %rdi, %r15
movsd 0x3d9a(%rip), %xmm1     # 0xa080
movsd %xmm1, 0x10(%rsp)
addsd %xmm1, %xmm3
movsd %xmm3, 0x8(%rsp)
callq 0x2150
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x3cf7(%rip), %xmm0     # 0xa010
subsd (%r15), %xmm0
callq 0x2150
mulsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14), %xmm0
callq 0x2130
movsd %xmm0, 0x8(%rsp)
movsd (%rbx), %xmm0
callq 0x2130
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%r14), %xmm0
addsd (%rbx), %xmm0
callq 0x2130
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x42c1(%rip), %rdi      # 0xa658
leaq 0x42c2(%rip), %rsi      # 0xa660
leaq 0x42c6(%rip), %rcx      # 0xa66b
movl $0x3b, %edx
callq 0x20e0
leaq 0x430e(%rip), %rdi      # 0xa6c4
leaq 0x42a3(%rip), %rsi      # 0xa660
leaq 0x42a7(%rip), %rcx      # 0xa66b
movl $0x3c, %edx
callq 0x20e0
leaq 0x42f7(%rip), %rdi      # 0xa6cc
leaq 0x4284(%rip), %rsi      # 0xa660
leaq 0x4288(%rip), %rcx      # 0xa66b
movl $0x3d, %edx
callq 0x20e0
leaq 0x42e4(%rip), %rdi      # 0xa6d8
leaq 0x4265(%rip), %rsi      # 0xa660
leaq 0x4269(%rip), %rcx      # 0xa66b
movl $0x3e, %edx
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x64c8
movq %rsi, %rbx
movsd (%rsi), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x64e7
movq %rdx, %r14
movsd (%rdx), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jbe 0x6506
movq %rdi, %r15
addsd 0x3c28(%rip), %xmm3     # 0xa080
movsd %xmm3, 0x18(%rsp)
callq 0x2150
movsd %xmm0, 0x8(%rsp)
movsd (%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%r14), %xmm0
callq 0x2150
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 0x2130
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4214(%rip), %rdi      # 0xa6e3
leaq 0x418a(%rip), %rsi      # 0xa660
leaq 0x420f(%rip), %rcx      # 0xa6ec
movl $0x31, %edx
callq 0x20e0
leaq 0x4258(%rip), %rdi      # 0xa746
leaq 0x416b(%rip), %rsi      # 0xa660
leaq 0x41f0(%rip), %rcx      # 0xa6ec
movl $0x32, %edx
callq 0x20e0
leaq 0x4245(%rip), %rdi      # 0xa752
leaq 0x414c(%rip), %rsi      # 0xa660
leaq 0x41d1(%rip), %rcx      # 0xa6ec
movl $0x33, %edx
callq 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38a5(%rip), %xmm0     # 0xa080
callq 0x2150
addsd 0x70(%rbx), %xmm0
movsd %xmm0, 0x70(%rbx)
cmpl $0x1, %ebp
jne 0x6837
movsd 0x40(%rbx), %xmm0
callq 0x2150
movsd 0x48(%rbx), %xmm2
divsd 0x40(%rbx), %xmm2
movl (%rbx), %eax
cvtsi2sd %rax, %xmm1
movsd %xmm0, (%rsp)
addsd %xmm2, %xmm1
addsd 0x3865(%rip), %xmm1     # 0xa080
movapd %xmm1, %xmm0
callq 0x2150
addsd (%rsp), %xmm0
movsd 0x70(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rbx)
cmpl $0x2, %ebp
jb 0x6866
movl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
subsd 0x40(%rbx), %xmm0
addsd 0x382d(%rip), %xmm0     # 0xa080
callq 0x2150
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_O1/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 0x78bf
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movl (%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
leaq 0x1c(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %rdi
movq %rbx, (%rdi)
movq %rcx, 0x8(%rdi)
callq 0x6d60
movq %rax, %r14
movq %rax, %rsi
shrq $0x20, %rsi
decl (%rbx)
testq %r15, %r15
je 0x68ce
leal -0x1(%rsi), %eax
movl %eax, (%r15)
movl %r14d, %eax
shlq $0x7, %rax
leaq (%rbx,%rax), %r15
addq $0x8, %r15
cmpl $0x1, %esi
jne 0x6903
movl $0x1, 0x8(%rsp)
cmpb $0x0, 0x79(%r15)
je 0x691b
movq (%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7126
jmp 0x6986
leal -0x1(%rsi), %edx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x6e82
xorl %r14d, %r14d
jmp 0x69af
movzbl 0x78(%r15), %ecx
testq %rcx, %rcx
setne %dl
je 0x6966
cmpl $0x1, (%r15)
jne 0x6934
movb $0x1, %dl
xorl %eax, %eax
jmp 0x695a
leaq (%rax,%rbx), %rdx
addq $0x10, %rdx
leaq -0x1(%rcx), %rsi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x6964
leaq 0x1(%rdi), %rax
cmpl $0x1, (%rdx,%rdi,8)
movq %rax, %rdi
jne 0x6942
cmpq %rcx, %rax
setb %dl
leaq (%r15,%rax,8), %rax
addq $0x4, %rax
jmp 0x6966
xorl %edx, %edx
testb %dl, %dl
jne 0x6986
cmpb $0xe, %cl
ja 0x69bc
leal 0x1(%rcx), %eax
movb %al, 0x78(%r15)
leaq (%r15,%rcx,8), %rax
addq $0x4, %rax
movq $0x1, -0x4(%rax)
movl (%rax), %ecx
leal -0x1(%rcx), %edx
movl %edx, (%rax)
cmpl $0x1, %ecx
jne 0x699f
movq %r15, %rdi
movl $0x1, %esi
callq 0x6fc6
decl 0x4(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
orq %rax, %r14
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x7036
jmp 0x68f1
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6fe0
movq (%rdi), %rdi
leaq 0x4(%rsp), %rsi
callq 0x7584
jmp 0x7033
movzbl 0x78(%rdi), %eax
testq %rax, %rax
je 0x702e
leal -0x1(%rax), %ecx
leaq 0x8(%rdi), %rdx
xorl %r8d, %r8d
cmpl %esi, (%rdi,%r8,8)
sete %r9b
incq %r8
cmpq %rax, %r8
setb %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x7022
xorl %r9d, %r9d
movq (%rdx,%r9,8), %r10
movq %r10, -0x8(%rdx,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x7011
addq $0x8, %rdx
decq %rcx
cmpq %rax, %r8
jne 0x6ff3
decb %al
movb %al, 0x78(%rdi)
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x707d
movq (%rbx), %rax
movq 0x18(%rax), %rcx
cmpq $0xf, %rcx
jae 0x70f3
movb %cl, 0x78(%rbx)
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x7079
movq %rbx, %rcx
movq 0x8(%rax), %rdx
movq %rdx, (%rcx)
movq (%rax), %rax
addq $0x8, %rcx
testq %rax, %rax
jne 0x7066
xorl %eax, %eax
jmp 0x70e8
movl $0x38, %edi
callq 0x21b0
movq %rax, %r14
movzbl 0x78(%rbx), %eax
leaq (%rbx,%rax,8), %rdx
cvtsi2sd %eax, %xmm0
mulsd 0x2fea(%rip), %xmm0     # 0xa088
addsd 0x2f6a(%rip), %xmm0     # 0xa010
cvttsd2si %xmm0, %rax
movq %rax, %rsi
sarq $0x3f, %rsi
subsd 0x2fd6(%rip), %xmm0     # 0xa090
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 0x73de
movq %r14, (%rbx)
movb $0x1, %al
movb %al, 0x79(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3798(%rip), %rdi      # 0xa892
leaq 0x3779(%rip), %rsi      # 0xa87a
leaq 0x37aa(%rip), %rcx      # 0xa8b2
movl $0x1b9, %edx            # imm = 0x1B9
callq 0x20e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x78bf
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
leaq 0x10(%rsp), %rax
movsd %xmm1, (%rax)
leaq 0x20(%rsp), %rdi
movq %rbx, (%rdi)
movq %r14, 0x8(%rdi)
movq %rax, 0x10(%rdi)
callq 0x7784
movq %rax, %r14
movl %r14d, %ecx
shrq $0x20, %r14
shlq $0x7, %rcx
leaq (%rbx,%rcx), %rdi
addq $0x8, %rdi
leal 0x1(%r14), %edx
movl %r14d, %esi
movl $0x1, %ecx
callq 0x6e82
incl (%rbx)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop