LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/src/drc_controller.cc
// Function: DRC_MEMORY_CONTROLLER::drc_check_hit(PACKET_QUEUE*, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
uint32_t DRC_MEMORY_CONTROLLER::drc_check_hit(PACKET_QUEUE *queue, uint64_t address, uint32_t cpu, uint32_t channel, uint32_t rank, uint32_t bank, uint32_t row)
{
    // determine DRC set index for this row
    // TODO: check if this modulo works okay or not
    uint32_t set = address % DRC_SETS_PER_ROW; 

    if (drc_array[channel][rank][bank][row].block == NULL) { // never accessed this row, dynamically allocate DRC blocks
        drc_array[channel][rank][bank][row].block = new BLOCK* [DRC_SETS_PER_ROW];
        for (uint32_t i=0; i<DRC_SETS_PER_ROW; i++) {
            drc_array[channel][rank][bank][row].block[i] = new BLOCK[DRC_WAY];
            drc_blocks += DRC_WAY;
        }

        return DRC_WAY; // never accessed this row, this is a miss
    }

    for (uint32_t i=0; i<DRC_WAY; i++) {
        if (drc_array[channel][rank][bank][row].block[set][i].tag == address) {
            DP ( if (warmup_complete[cpu]) {
            cout << "[" << queue->NAME << "] " << __func__ << " found matching address: " << hex << address << dec << " set: " << set << " way: " << i << endl; });

            return i;
        }
    }

    return DRC_WAY; // cannot find any matching tag, this is a miss
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rcx
movl 0x38(%rsp), %eax
movl 0x30(%rsp), %edx
movl %r8d, %esi
shlq $0x14, %rsi
addq %rdi, %rsi
movl %r9d, %edi
shlq $0x13, %rdi
addq %rsi, %rdi
shlq $0xf, %rdx
addq %rdi, %rdx
movq 0x7370(%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0x12f6a
movq %rcx, %rax
shrq $0x2, %rax
movabsq $0x4924924924924925, %rdx # imm = 0x4924924924924925
mulq %rdx
shrl %edx
leal (%rdx,%rdx,8), %eax
leal (%rax,%rax,2), %eax
addl %edx, %eax
movl %ecx, %edx
subl %eax, %edx
movq (%rsi,%rdx,8), %rdx
xorl %eax, %eax
cmpq %rcx, 0x28(%rdx)
setne %al
jmp 0x12fd6
leaq (%rdx,%rax,8), %rbx
addq $0x7370, %rbx           # imm = 0x7370
movl $0xe0, %edi
callq 0x3030
movq %rax, (%rbx)
movq 0x89eaf(%rip), %r14     # 0x9ce38
incq %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movl $0x50, %edi
callq 0x3030
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl %r15d, 0x10(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movl %r15d, 0x48(%rax)
movq (%rbx), %rcx
movq %rax, (%rcx,%r12,8)
leaq (%r14,%r12), %rax
movq %rax, 0x89e70(%rip)     # 0x9ce38
incq %r12
cmpq $0x1c, %r12
jne 0x12f92
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/src/drc_controller.cc
// Function: DRC_MEMORY_CONTROLLER::add_wq(PACKET*)
int DRC_MEMORY_CONTROLLER::add_wq(PACKET *packet)
{
    // check for duplicates in the write queue
    int index = check_drc_queue(&WQ, packet);
    if (index != -1)
        return index; // merged index

    // search for the empty index
    for (index=0; index<DRC_WQ_SIZE; index++) {
        if (WQ.entry[index].address == 0) {
            
            memcpy(&WQ.entry[index], packet, sizeof(PACKET));
            WQ.occupancy++;

#ifdef DEBUG_PRINT
            uint32_t channel = drc_get_channel(packet->address),
                     rank = drc_get_rank(packet->address),
                     bank = drc_get_bank(packet->address),
                     row = drc_get_row(packet->address),
                     column = drc_get_column(packet->address); 
#endif

            DP ( if(warmup_complete[packet->cpu]) {
            cout << "[" << NAME << "_WQ] " <<  __func__ << " instr_id: " << packet->instr_id << " address: " << hex << packet->address;
            cout << " full_addr: " << packet->full_addr << dec << " ch: " << channel;
            cout << " rank: " << rank << " bank: " << bank << " row: " << row << " col: " << column;
            cout << " occupancy: " << WQ.occupancy << " current: " << current_core_cycle[packet->cpu] << " event: " << packet->event_cycle << endl; });

            break;
        }
    }

    update_schedule_cycle(&WQ);

    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x40a890(%rdi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x13292
movq 0x340(%rsi), %rdx
movl $0x340, %edi            # imm = 0x340
addq 0x40a908(%rbx), %rdi
xorl %r8d, %r8d
cmpq %rdx, (%rdi)
je 0x1328f
incq %r8
addq $0x380, %rdi            # imm = 0x380
cmpq %r8, %rcx
jne 0x13279
jmp 0x13292
movl %r8d, %eax
cmpl $-0x1, %eax
jne 0x132e2
leaq 0x40a870(%rbx), %r14
movq 0x40a908(%rbx), %rdi
xorl %eax, %eax
cmpq $0x0, 0x340(%rdi,%rax)
je 0x132c2
addq $0x380, %rax            # imm = 0x380
cmpq $0xa800, %rax           # imm = 0xA800
jne 0x132a7
jmp 0x132d5
addq %rax, %rdi
movl $0x380, %edx            # imm = 0x380
callq 0x31c0
incl 0x40a8a4(%rbx)
movq %r14, %rsi
callq 0x11bc8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/src/drc_controller.cc
// Function: DRC_MEMORY_CONTROLLER::get_occupancy(unsigned char)
uint32_t DRC_MEMORY_CONTROLLER::get_occupancy(uint8_t queue_type)
{
    if (queue_type == 0)
        return MSHR.occupancy;
    else if (queue_type == 1)
        return RQ.occupancy;
    else if (queue_type == 2)
        return WQ.occupancy;

    return 0;
}

// Assembly:
cmpl $0x2, %esi
je 0x13568
cmpl $0x1, %esi
je 0x13561
xorl %eax, %eax
testl %esi, %esi
jne 0x1356e
movl 0x4073a4(%rdi), %eax
retq
movl 0x40c544(%rdi), %eax
retq
movl 0x40a8a4(%rdi), %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/src/drc_controller.cc
// Function: DRC_MEMORY_CONTROLLER::get_size(unsigned char)
uint32_t DRC_MEMORY_CONTROLLER::get_size(uint8_t queue_type)
{
    if (queue_type == 0)
        return MSHR.SIZE;
    else if (queue_type == 1)
        return RQ.SIZE;
    else if (queue_type == 2)
        return WQ.SIZE;

    return 0;
}

// Assembly:
cmpl $0x2, %esi
je 0x1358e
cmpl $0x1, %esi
je 0x13587
xorl %eax, %eax
testl %esi, %esi
jne 0x13594
movl 0x407390(%rdi), %eax
retq
movl 0x40c530(%rdi), %eax
retq
movl 0x40a890(%rdi), %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/branch/branch_predictor.cc
// Function: O3_CPU::last_branch_result(unsigned long, unsigned char)
void O3_CPU::last_branch_result(uint64_t ip, uint8_t taken)
{
    int hash = ip % BIMODAL_PRIME;

    if (taken && (bimodal_table[cpu][hash] < MAX_COUNTER))
        bimodal_table[cpu][hash]++;
    else if ((taken == 0) && (bimodal_table[cpu][hash] > 0))
        bimodal_table[cpu][hash]--;
}

// Assembly:
movl %edx, %ecx
movabsq $0x4003002401b01441, %rdx # imm = 0x4003002401B01441
movq %rsi, %rax
mulq %rdx
shrq $0xc, %rdx
imull $0x3ffd, %edx, %eax     # imm = 0x3FFD
subl %eax, %esi
movl (%rdi), %edx
shlq $0x10, %rdx
leaq 0x897e3(%rip), %rax     # 0x9ce70
addq %rdx, %rax
movl (%rax,%rsi,4), %edx
testl %ecx, %ecx
je 0x136aa
movl $0x1, %ecx
cmpl $0x3, %edx
jge 0x136a9
leaq (%rax,%rsi,4), %rax
addl %ecx, %edx
movl %edx, (%rax)
retq
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %edx, %edx
jg 0x136a1
jmp 0x136a9
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/replacement/base_replacement.cc
// Function: CACHE::lru_victim(unsigned int, unsigned long, unsigned int, BLOCK const*, unsigned long, unsigned long, unsigned int)
uint32_t CACHE::lru_victim(uint32_t cpu, uint64_t instr_id, uint32_t set, const BLOCK *current_set, uint64_t ip, uint64_t full_addr, uint32_t type)
{
    uint32_t way = 0;

    // fill invalid line first
    for (way=0; way<NUM_WAY; way++) {
        if (block[set][way].valid == false) {

            DP ( if (warmup_complete[cpu]) {
            cout << "[" << NAME << "] " << __func__ << " instr_id: " << instr_id << " invalid set: " << set << " way: " << way;
            cout << hex << " address: " << (full_addr>>LOG2_BLOCK_SIZE) << " victim address: " << block[set][way].address << " data: " << block[set][way].data;
            cout << dec << " lru: " << block[set][way].lru << endl; });

            break;
        }
    }

    // LRU victim
    if (way == NUM_WAY) {
        for (way=0; way<NUM_WAY; way++) {
            if (block[set][way].lru == NUM_WAY-1) {

                DP ( if (warmup_complete[cpu]) {
                cout << "[" << NAME << "] " << __func__ << " instr_id: " << instr_id << " replace set: " << set << " way: " << way;
                cout << hex << " address: " << (full_addr>>LOG2_BLOCK_SIZE) << " victim address: " << block[set][way].address << " data: " << block[set][way].data;
                cout << dec << " lru: " << block[set][way].lru << endl; });

                break;
            }
        }
    }

    if (way == NUM_WAY) {
        cerr << "[" << NAME << "] " << __func__ << " no victim! set: " << set << endl;
        assert(0);
    }

    return way;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdi, %r14
movl 0x7374(%rdi), %ecx
testl %ecx, %ecx
je 0x136fb
movq 0x7390(%r14), %rax
movl %ebx, %edx
movq (%rax,%rdx,8), %rdx
xorl %eax, %eax
cmpb $0x0, (%rdx)
je 0x136fd
incl %eax
addq $0x50, %rdx
cmpl %eax, %ecx
jne 0x136e8
movl %ecx, %eax
jmp 0x136fd
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x1372f
testl %ecx, %ecx
je 0x1372d
movq 0x7390(%r14), %rax
movl %ebx, %edx
movq (%rax,%rdx,8), %rdx
leal -0x1(%rcx), %esi
addq $0x48, %rdx
xorl %eax, %eax
cmpl %esi, (%rdx)
je 0x1372f
incl %eax
addq $0x50, %rdx
cmpl %eax, %ecx
jne 0x1371b
movl %ecx, %eax
jmp 0x1372f
xorl %eax, %eax
cmpl %ecx, %eax
je 0x1373b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x68ae(%rip), %rdi      # 0x19ff0
leaq 0x947(%rip), %rsi       # 0x14090
callq 0x3250
addq $0x7350, %r14           # imm = 0x7350
movq %rax, %rdi
movq %r14, %rsi
callq 0x31e0
leaq 0x177d(%rip), %rsi      # 0x14ee4
movq %rax, %rdi
callq 0x3250
leaq 0x1a64(%rip), %rsi      # 0x151da
movq %rax, %rdi
callq 0x3250
leaq 0x1a60(%rip), %rsi      # 0x151e5
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
movl %ebx, %esi
callq 0x32d0
movq %rax, %rdi
callq 0x3110
leaq 0x8c1(%rip), %rdi       # 0x14067
leaq 0x1a4a(%rip), %rsi      # 0x151f7
leaq 0x1a63(%rip), %rcx      # 0x15217
movl $0x37, %edx
callq 0x3160
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/replacement/base_replacement.cc
// Function: CACHE::lru_update(unsigned int, unsigned int)
void CACHE::lru_update(uint32_t set, uint32_t way)
{
    // update lru replacement state
    for (uint32_t i=0; i<NUM_WAY; i++) {
        if (block[set][i].lru < block[set][way].lru) {
            block[set][i].lru++;
        }
    }
    block[set][way].lru = 0; // promote to the MRU position
}

// Assembly:
movl 0x7374(%rdi), %r8d
movl %esi, %ecx
movl %edx, %eax
testq %r8, %r8
je 0x1382e
movq 0x7390(%rdi), %rdx
movq (%rdx,%rcx,8), %rdx
leaq (%rax,%rax,4), %rsi
shlq $0x4, %rsi
addq %rdx, %rsi
addq $0x48, %rsi
shlq $0x4, %r8
leaq (%r8,%r8,4), %r8
xorl %r9d, %r9d
movl 0x48(%rdx,%r9), %r10d
cmpl (%rsi), %r10d
jae 0x13825
incl %r10d
movl %r10d, 0x48(%rdx,%r9)
addq $0x50, %r9
cmpq %r9, %r8
jne 0x13813
movq 0x7390(%rdi), %rdx
movq (%rdx,%rcx,8), %rcx
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movl $0x0, 0x48(%rcx,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/NishadSaraf[P]Championship-Simulator/replacement/llc_replacement.cc
// Function: CACHE::llc_update_replacement_state(unsigned int, unsigned int, unsigned int, unsigned long, unsigned long, unsigned long, unsigned int, unsigned char)
void CACHE::llc_update_replacement_state(uint32_t cpu, uint32_t set, uint32_t way, uint64_t full_addr, uint64_t ip, uint64_t victim_addr, uint32_t type, uint8_t hit)
{
    string TYPE_NAME;
    if (type == LOAD)
        TYPE_NAME = "LOAD";
    else if (type == RFO)
        TYPE_NAME = "RFO";
    else if (type == PREFETCH)
        TYPE_NAME = "PF";
    else if (type == WRITEBACK)
        TYPE_NAME = "WB";
    else
        assert(0);

    if (hit)
        TYPE_NAME += "_HIT";
    else
        TYPE_NAME += "_MISS";

    if ((type == WRITEBACK) && ip)
        assert(0);

    // uncomment this line to see the LLC accesses
    // cout << "CPU: " << cpu << "  LLC " << setw(9) << TYPE_NAME << " set: " << setw(5) << set << " way: " << setw(2) << way;
    // cout << hex << " paddr: " << setw(12) << paddr << " ip: " << setw(8) << ip << " victim_addr: " << victim_addr << dec << endl;

    // baseline LRU
    if (hit && (type == WRITEBACK)) // writeback hit does not update LRU state
        return;

    return lru_update(set, way);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0x4(%rsp)
movl 0x68(%rsp), %r13d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
cmpl $0x4, %r13d
jae 0x13936
movq %r9, %r15
movl %edx, %ebp
movq %rdi, %r14
movl %r13d, %eax
leaq 0x1a89(%rip), %rdx      # 0x15330
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0x1a8b(%rip), %rdx      # 0x15340
movq (%rdx,%rax,8), %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3350
movb 0x70(%rsp), %bl
testb %bl, %bl
leaq 0x1a4f(%rip), %rax      # 0x15323
leaq 0x1a4d(%rip), %rsi      # 0x15328
cmovneq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x33f0
cmpl $0x3, %r13d
setne %al
testq %r15, %r15
sete %cl
orb %al, %cl
je 0x13955
cmpl $0x3, %r13d
sete %al
testb %bl, %bl
setne %cl
testb %cl, %al
jne 0x13918
movq %r14, %rdi
movl %ebp, %esi
movl 0x4(%rsp), %edx
callq 0x137de
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x13927
callq 0x3220
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x72a(%rip), %rdi       # 0x14067
leaq 0x1948(%rip), %rsi      # 0x1528c
leaq 0x1960(%rip), %rcx      # 0x152ab
movl $0x1d, %edx
callq 0x3160
leaq 0x70b(%rip), %rdi       # 0x14067
leaq 0x1929(%rip), %rsi      # 0x1528c
leaq 0x1941(%rip), %rcx      # 0x152ab
movl $0x25, %edx
callq 0x3160
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x13986
callq 0x3220
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: Board::move(int, Edge)
bool Board::move(int player, Edge move)
{
    assert(is_move_valid(move));

    int oldscore = score[player];

    edges[edge_index(move)] = true;

    for_each_adjacent_node(move, [&] (Node node)
            { if (this->degree(node) == 4) ++score[player]; });

    return oldscore != score[player];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl %edx, %esi
callq 0x285c
testb %al, %al
je 0x283d
movslq %r14d, %r14
movswl %bp, %r12d
testb $0x1, %bpl
jne 0x2713
movl %r12d, %ecx
sarl $0x8, %ecx
imull (%rbx), %ecx
movsbl %r12b, %eax
sarl %eax
addl %ecx, %eax
jmp 0x2732
movl (%rbx), %ecx
movl 0x4(%rbx), %edx
incl %edx
imull %ecx, %edx
movl %r12d, %eax
sarl $0x8, %eax
incl %ecx
imull %eax, %ecx
movsbl %r12b, %eax
sarl %eax
addl %ecx, %eax
addl %edx, %eax
movl 0x8(%rbx,%r14,4), %r15d
movslq %eax, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x10(%rbx), %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rdi,8)
testb $0x1, %bpl
jne 0x27d0
movl %r12d, %eax
shrl $0x8, %eax
sarl $0x8, %r12d
testw %ax, %ax
jle 0x27b9
movsbl %bpl, %eax
shrl %eax
movl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl %ebp, %edx
andl %ecx, %edx
movzbl %al, %esi
orl %edx, %esi
addl %ecx, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x4, %eax
jne 0x27b9
leal 0x1(%r15), %eax
movl %eax, 0x8(%rbx,%r14,4)
cmpl %r12d, 0x4(%rbx)
jle 0x282c
movsbl %bpl, %eax
shrl %eax
andl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movzbl %al, %esi
jmp 0x2818
movsbl %bpl, %r12d
movl %r12d, %eax
shrl %eax
sarl %r12d
testw %ax, %ax
jle 0x2809
leal -0x1(%r12), %eax
movl %ebp, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movzbl %al, %esi
orl %ecx, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x4, %eax
jne 0x2809
leal 0x1(%r15), %eax
movl %eax, 0x8(%rbx,%r14,4)
cmpl %r12d, (%rbx)
jle 0x282c
andl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movzbl %r12b, %esi
orl %ebp, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x4, %eax
jne 0x282c
incl 0x8(%rbx,%r14,4)
cmpl 0x8(%rbx,%r14,4), %r15d
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27e7(%rip), %rdi      # 0x502b
leaq 0x27b9(%rip), %rsi      # 0x5004
leaq 0x27bc(%rip), %rcx      # 0x500e
movl $0x11, %edx
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: Board::is_move_valid(Edge) const
bool Board::is_move_valid(Edge move) const
{
    if (move.dir == HORIZ) {
        if (move.x < 0 || move.x >= width || move.y < 0 || move.y > height)
            return false;
    } else {
        if (move.x < 0 || move.x > width || move.y < 0 || move.y >= height)
            return false;
    }

    return !edges[edge_index(move)];
}

// Assembly:
movsbl %sil, %ecx
movl %ecx, %eax
shrl %eax
testb $0x1, %cl
jne 0x288a
testw %ax, %ax
js 0x28c2
movzwl %ax, %eax
cmpl %eax, (%rdi)
jle 0x28c2
movswl %si, %eax
shrl $0x8, %eax
testw %ax, %ax
js 0x28c2
movzwl %ax, %eax
cmpl %eax, 0x4(%rdi)
jge 0x28a9
jmp 0x28c2
testw %ax, %ax
js 0x28c2
movzwl %ax, %eax
cmpl %eax, (%rdi)
jl 0x28c2
movswl %si, %eax
shrl $0x8, %eax
testw %ax, %ax
js 0x28c2
movzwl %ax, %eax
cmpl %eax, 0x4(%rdi)
jle 0x28c2
testb $0x1, %sil
jne 0x28c5
movswl %si, %ecx
sarl $0x8, %ecx
imull (%rdi), %ecx
movsbl %sil, %eax
sarl %eax
addl %ecx, %eax
jmp 0x28e4
xorl %eax, %eax
retq
movl (%rdi), %ecx
movl 0x4(%rdi), %edx
incl %edx
imull %ecx, %edx
movswl %si, %eax
sarl $0x8, %eax
incl %ecx
imull %eax, %ecx
movsbl %sil, %eax
sarl %eax
addl %ecx, %eax
addl %edx, %eax
cltq
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x10(%rdi), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rax, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movq -0x8(%rcx,%rdi,8), %rcx
btq %rax, %rcx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: Board::unmove(int, Edge)
void Board::unmove(int player, Edge move)
{
    assert(!is_move_valid(move));

    edges[edge_index(move)] = false;

    for_each_adjacent_node(move, [&] (Node node)
            { if (this->degree(node) == 3) --score[player]; });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movl %edx, %esi
callq 0x285c
testb %al, %al
jne 0x2a82
movswl %r14w, %r15d
testb $0x1, %r14b
jne 0x295f
movl %r15d, %ecx
sarl $0x8, %ecx
imull (%rbx), %ecx
movsbl %r15b, %eax
sarl %eax
addl %ecx, %eax
jmp 0x297e
movl (%rbx), %ecx
movl 0x4(%rbx), %edx
incl %edx
imull %ecx, %edx
movl %r15d, %eax
sarl $0x8, %eax
incl %ecx
imull %eax, %ecx
movsbl %r15b, %eax
sarl %eax
addl %ecx, %eax
addl %edx, %eax
movslq %eax, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x10(%rbx), %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
leaq 0x3f(%rdx), %rsi
andq %rcx, %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
setbe %dil
movq $-0x2, %rdx
rolq %cl, %rdx
andq %rdx, -0x8(%rax,%rdi,8)
testb $0x1, %r14b
jne 0x2a19
movl %r15d, %eax
shrl $0x8, %eax
sarl $0x8, %r15d
testw %ax, %ax
jle 0x2a01
movsbl %r14b, %eax
shrl %eax
movl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl %r14d, %edx
andl %ecx, %edx
movzbl %al, %esi
orl %edx, %esi
addl %ecx, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x3, %eax
jne 0x2a01
movslq %ebp, %rax
decl 0x8(%rbx,%rax,4)
cmpl %r15d, 0x4(%rbx)
jle 0x2a77
movsbl %r14b, %eax
shrl %eax
andl $0xffffff00, %r14d      # imm = 0xFFFFFF00
movzbl %al, %esi
jmp 0x2a60
movsbl %r14b, %r15d
movl %r15d, %eax
shrl %eax
sarl %r15d
testw %ax, %ax
jle 0x2a50
leal -0x1(%r15), %eax
movl %r14d, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movzbl %al, %esi
orl %ecx, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x3, %eax
jne 0x2a50
movslq %ebp, %rax
decl 0x8(%rbx,%rax,4)
cmpl %r15d, (%rbx)
jle 0x2a77
andl $0xffffff00, %r14d      # imm = 0xFFFFFF00
movzbl %r15b, %esi
orl %r14d, %esi
movq %rbx, %rdi
callq 0x2b08
cmpl $0x3, %eax
jne 0x2a77
movslq %ebp, %rax
decl 0x8(%rbx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25a1(%rip), %rdi      # 0x502a
leaq 0x2574(%rip), %rsi      # 0x5004
leaq 0x25a8(%rip), %rcx      # 0x503f
movl $0x1f, %edx
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: Board::degree(Node) const
int Board::degree(Node node) const
{
    int sum = 0;
    for_each_adjacent_edge(node, [&] (Edge edge)
            { sum += (int) edges[this->edge_index(edge)]; });
    return sum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movswl %si, %eax
sarl $0x8, %eax
movl (%rdi), %ecx
movl 0x4(%rdi), %r11d
movl %ecx, %edx
imull %eax, %edx
movl %esi, %r10d
shll $0x19, %r10d
sarl $0x19, %r10d
addl %r10d, %edx
movslq %edx, %rbx
movq 0x10(%rdi), %rdx
leaq 0x3f(%rbx), %r9
testq %rbx, %rbx
cmovnsq %rbx, %r9
sarq $0x6, %r9
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %r8
movq %rbx, %r14
andq %r8, %r14
xorl %r15d, %r15d
cmpq %rdi, %r14
setbe %r15b
leaq (%rdx,%r9,8), %r9
movq -0x8(%r9,%r15,8), %r14
xorl %r9d, %r9d
btq %rbx, %r14
setb %r9b
leal 0x100(%rsi), %ebx
movswl %bx, %ebx
sarl $0x8, %ebx
imull %ecx, %ebx
addl %r10d, %ebx
movslq %ebx, %rbx
shll $0x9, %esi
leaq 0x3f(%rbx), %r14
testq %rbx, %rbx
cmovnsq %rbx, %r14
sarq $0x6, %r14
leaq (%rdx,%r14,8), %r14
movq %rbx, %r15
andq %r8, %r15
xorl %r12d, %r12d
cmpq %rdi, %r15
setbe %r12b
movq -0x8(%r14,%r12,8), %r14
btq %rbx, %r14
adcl $0x0, %r9d
incl %r11d
imull %ecx, %r11d
incl %ecx
imull %eax, %ecx
addl %r11d, %ecx
addl %ecx, %r10d
movslq %r10d, %r10
leaq 0x3f(%r10), %rax
testq %r10, %r10
cmovnsq %r10, %rax
sarq $0x6, %rax
leaq (%rdx,%rax,8), %rax
movq %r10, %r11
andq %r8, %r11
xorl %ebx, %ebx
cmpq %rdi, %r11
setbe %bl
movq -0x8(%rax,%rbx,8), %r11
xorl %eax, %eax
btq %r10, %r11
setb %al
addl $0x300, %esi            # imm = 0x300
movswl %si, %esi
sarl $0x9, %esi
addl %ecx, %esi
movslq %esi, %rcx
leaq 0x3f(%rcx), %rsi
testq %rcx, %rcx
cmovnsq %rcx, %rsi
sarq $0x6, %rsi
leaq (%rdx,%rsi,8), %rdx
andq %rcx, %r8
xorl %esi, %esi
cmpq %rdi, %r8
setbe %sil
movq -0x8(%rdx,%rsi,8), %rdx
btq %rcx, %rdx
adcl %r9d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: basename_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string basename_str(const std::string &str)
{
    char *cpy = strdup(str.c_str());
    char *base = basename(cpy);
    std::string ret(base);
    free(cpy);
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x2380
movq %rax, %r14
movq %rax, %rdi
callq 0x22a0
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2dee
movq %r14, %rdi
callq 0x2230
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/Board.cpp
// Function: Board::set_move_decider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Board::set_move_decider(const std::string &solver)
{
    std::string base = basename_str(solver);
    if (base == "random") {
        decider = &Board::decide_move_random;
    } else if (base == "first") {
        decider = &Board::decide_move_first;
    } else if (base == "invalid") {
        decider = &Board::decide_move_invalid;
    } else if (base == "timeout") {
        decider = &Board::decide_move_timeout;
    } else if (base == "crash") {
        exit(1);
    } else if (base == "nocheap") {
        decider = &Board::decide_move_nocheap;
    } else {
        fprintf(stderr, "dots solver run with command: %s, cannot decide which move decider to use\n", base.c_str());
        exit(1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2c46
leaq 0x267c(%rip), %rsi      # 0x531e
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
je 0x2d20
leaq 0x23a8(%rip), %rsi      # 0x505d
leaq 0x8(%rsp), %rdi
callq 0x2070
testl %eax, %eax
je 0x2d29
leaq 0x2399(%rip), %rsi      # 0x5063
leaq 0x8(%rsp), %rdi
callq 0x2070
testl %eax, %eax
je 0x2d32
leaq 0x238c(%rip), %rsi      # 0x506b
leaq 0x8(%rsp), %rdi
callq 0x2070
testl %eax, %eax
je 0x2d3b
leaq 0x237f(%rip), %rsi      # 0x5073
leaq 0x8(%rsp), %rdi
callq 0x2070
testl %eax, %eax
je 0x2d71
leaq 0x2370(%rip), %rsi      # 0x5079
leaq 0x8(%rsp), %rdi
callq 0x2070
testl %eax, %eax
jne 0x2d7b
leaq 0x1308(%rip), %rax      # 0x4026
jmp 0x2d42
leaq 0x1151(%rip), %rax      # 0x3e78
jmp 0x2d42
leaq 0x1276(%rip), %rax      # 0x3fa6
jmp 0x2d42
leaq 0x12cb(%rip), %rax      # 0x4004
jmp 0x2d42
leaq 0x12c8(%rip), %rax      # 0x400a
movq %rax, 0x38(%rbx)
movq $0x0, 0x40(%rbx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2d69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movl $0x1, %edi
callq 0x2240
leaq 0x8(%rsp), %rdi
callq 0x23d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: read_edge(_IO_FILE*)
Edge read_edge(FILE *fp)
{
    int fd = fileno(fp);

    pollfd pev;
    pev.fd = fd;
    pev.events = POLLIN;
    pev.revents = 0;

    int pollret = poll(&pev, 1, 1000);
    if (pollret == 0) {
        throw std::runtime_error("took too long to move");
    } else if (pollret == -1) {
        printf("error poll'ing fd\n");
        exit(1);
    }

    fcntl(fd, F_SETFL, O_NONBLOCK);
    char buf[80] = {};
    ssize_t nbytes = read(fd, buf, sizeof(buf) - 1);
    fcntl(fd, F_SETFL, 0);

    if (nbytes == 0)
        throw std::runtime_error("exited early");

    char tmp;
    Edge move;
    int x, y;
    sscanf(buf, "(edge %c %d %d)\n", &tmp, &x, &y);

    move.x = x;
    move.y = y;

    if (tmp == 'h')
        move.dir = HORIZ;
    else
        move.dir = VERT;

    return move;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
callq 0x21e0
movl %eax, %ebx
leaq 0x18(%rsp), %rdi
movl %eax, (%rdi)
movl $0x1, 0x4(%rdi)
movl $0x1, %esi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x22b0
cmpl $-0x1, %eax
je 0x30b6
testl %eax, %eax
je 0x30cc
movl %ebx, %edi
movl $0x4, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x2110
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movl $0x4f, %edx
movl %ebx, %edi
callq 0x2290
movq %rax, %r14
movl %ebx, %edi
movl $0x4, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2110
testq %r14, %r14
je 0x30ea
leaq 0x208a(%rip), %rsi      # 0x50f6
leaq 0x20(%rsp), %rdi
leaq 0xf(%rsp), %rbx
leaq 0x14(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x21b0
movl (%r14), %eax
andl $0x7f, %eax
movl (%r15), %ecx
shll $0x8, %ecx
xorl %edx, %edx
cmpb $0x68, (%rbx)
setne %dl
movzwl %cx, %ecx
leal (%rcx,%rax,2), %eax
orl %edx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2249(%rip), %rdi      # 0x5306
callq 0x22c0
movl $0x1, %edi
callq 0x2240
movl $0x10, %edi
callq 0x20e0
movq %rax, %rbx
leaq 0x2027(%rip), %rsi      # 0x5107
movq %rax, %rdi
callq 0x20b0
jmp 0x3106
movl $0x10, %edi
callq 0x20e0
movq %rax, %rbx
leaq 0x201f(%rip), %rsi      # 0x511d
movq %rax, %rdi
callq 0x20b0
movq 0x4eeb(%rip), %rsi      # 0x7ff8
movq 0x4ebc(%rip), %rdx      # 0x7fd0
movq %rbx, %rdi
callq 0x2340
jmp 0x311e
movq %rax, %r14
movq %rbx, %rdi
callq 0x2150
movq %r14, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: Board::print_horiz_edges(int, _IO_FILE*) const
void Board::print_horiz_edges(int y, FILE *fp) const
{
    fprintf(fp, "+");
    for (int x = 0; x < width; ++x) {
        if (edges[edge_index(Edge(HORIZ, x, y))])
            fprintf(fp, "-+");
        else
            fprintf(fp, " +");
    }
    fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x2b, %edi
movq %rdx, %rsi
callq 0x2250
movl (%r14), %eax
testl %eax, %eax
jle 0x3216
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movsbl %bpl, %ebp
xorl %r12d, %r12d
leaq 0x3f(%rcx), %r13
xorl %r15d, %r15d
imull %ebp, %eax
movl %r12d, %ecx
sarl $0x19, %ecx
addl %eax, %ecx
movslq %ecx, %rax
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x10(%r14), %rcx
movq %rax, %rdx
andq %r13, %rdx
xorl %esi, %esi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rax, %rcx
leaq 0x1f52(%rip), %rdi      # 0x513b
jae 0x31f2
leaq 0x1f46(%rip), %rdi      # 0x5138
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x23a0
incl %r15d
movl (%r14), %eax
addl $0x2000000, %r12d       # imm = 0x2000000
cmpl %eax, %r15d
jl 0x319b
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: Board::print_vert_edges(int, _IO_FILE*) const
void Board::print_vert_edges(int y, FILE *fp) const
{
    for (int x = 0; x < width; ++x) {
        if (edges[edge_index(Edge(VERT, x, y))])
            fprintf(fp, "|");
        else
            fprintf(fp, " ");

        if (degree(Node(x, y)) == 4)
            fprintf(fp, "#");
        else
            fprintf(fp, " ");
    }

    if (edges[edge_index(Edge(VERT, width, y))])
        fprintf(fp, "|\n");
    else
        fprintf(fp, " \n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movl (%r14), %eax
testl %eax, %eax
movl %esi, 0x8(%rsp)
jle 0x331d
movsbl %sil, %ecx
movl %ecx, 0xc(%rsp)
movl %esi, %r13d
shll $0x8, %r13d
xorl %ebp, %ebp
leaq 0x3f(%rdi), %rcx
movq %rcx, 0x10(%rsp)
xorl %r12d, %r12d
movl 0x4(%r14), %ecx
incl %ecx
imull %eax, %ecx
incl %eax
imull 0xc(%rsp), %eax
movl %ebp, %edx
sarl $0x19, %edx
addl %eax, %edx
addl %ecx, %edx
movslq %edx, %rax
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x10(%r14), %rcx
movq %rax, %rdx
andq 0x10(%rsp), %rdx
xorl %esi, %esi
movq %rdi, %r15
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rax, %rcx
movl $0x20, %edi
jae 0x32d8
movl $0x7c, %edi
movq %rbx, %rsi
callq 0x2250
movzbl %r12b, %esi
orl %r13d, %esi
movq %r14, %rdi
callq 0x2b08
xorl %ecx, %ecx
cmpl $0x4, %eax
sete %cl
leal (%rcx,%rcx,2), %edi
addl $0x20, %edi
movq %rbx, %rsi
callq 0x2250
incl %r12d
movl (%r14), %eax
addl $0x2000000, %ebp        # imm = 0x2000000
cmpl %eax, %r12d
movq %r15, %rdi
jl 0x327c
movl 0x4(%r14), %ecx
incl %ecx
imull %eax, %ecx
movsbl 0x8(%rsp), %edx
leal 0x1(%rax), %esi
imull %edx, %esi
shll $0x19, %eax
sarl $0x19, %eax
addl %esi, %eax
addl %ecx, %eax
cltq
leaq 0x3f(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x10(%r14), %rcx
leaq 0x3f(%rdi), %rdx
andq %rax, %rdx
xorl %esi, %esi
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rax, %rcx
leaq 0x1dcd(%rip), %rax      # 0x5141
leaq 0x1dc3(%rip), %rdi      # 0x513e
cmovaeq %rax, %rdi
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: Board::print(_IO_FILE*, int) const
void Board::print(FILE *fp, int player) const
{
    fprintf(fp, "%d %d %d %d\n", width, height, score[player], score[!player]);
    for (int y = 0; y < height; ++y) {
        print_horiz_edges(y, fp);
        print_vert_edges(y, fp);
    }
    print_horiz_edges(height, fp);
    fflush(fp);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movl 0x4(%rdi), %ecx
movslq %edx, %rdx
movl 0x8(%rdi,%rdx,4), %r8d
xorl %esi, %esi
testl %edx, %edx
sete %sil
movl 0x8(%rdi,%rsi,4), %r9d
leaq 0x1d79(%rip), %rsi      # 0x5144
xorl %ebp, %ebp
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2280
movl 0x4(%r14), %esi
testl %esi, %esi
jle 0x3405
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3158
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x3232
incl %ebp
movl 0x4(%r14), %esi
cmpl %esi, %ebp
jl 0x33e1
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3158
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2210
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: Board::read_horiz_edges(int, _IO_FILE*)
void Board::read_horiz_edges(int y, FILE *fp)
{
    int c, x = 0;

    while ((c = fgetc(fp)) != EOF) {
        switch (c) {
            case '\r':
                break;
            case '\n':
                if (x != width) {
                    fprintf(stderr, "x (%d) != width (%d) at newline while reading board\n",
                            x, width);
                    exit(1);
                }
                return;
            case '+':
                break;
            case '-':
                if (x >= width) {
                    fprintf(stderr, "x (%d) >= width (%d) at dash while reading board\n",
                            x, width);
                    exit(1);
                }
                edges[edge_index(Edge(HORIZ, x, y))] = true;
                ++x;
                break;
            case ' ':
                if (x >= width) {
                    fprintf(stderr, "x (%d) >= width (%d) at space while reading board\n",
                            x, width);
                    exit(1);
                }
                edges[edge_index(Edge(HORIZ, x, y))] = false;
                ++x;
                break;
            default:
                fprintf(stderr, "unexpected character %d while reading board\n", c);
                exit(1);
        }
    }

    if (c == EOF)
        exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %r14
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movsbl %sil, %ebp
xorl %ebx, %ebx
leaq 0x3f(%r12), %r13
movq %r15, %rdi
callq 0x2300
cmpl $0x1f, %eax
jle 0x34b2
cmpl $0x2b, %eax
je 0x3442
cmpl $0x20, %eax
je 0x34b9
cmpl $0x2d, %eax
jne 0x3537
movl (%r14), %esi
cmpl %esi, %ebx
jge 0x3545
imull %ebp, %esi
movl %ebx, %eax
shll $0x19, %eax
sarl $0x19, %eax
addl %esi, %eax
movslq %eax, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x10(%r14), %rax
movq %rcx, %rdx
andq %r13, %rdx
xorl %esi, %esi
cmpq %r12, %rdx
setbe %sil
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, -0x8(%rax,%rsi,8)
jmp 0x3509
cmpl $0xd, %eax
je 0x3442
jmp 0x3510
movl (%r14), %esi
cmpl %esi, %ebx
jge 0x354c
imull %ebp, %esi
movl %ebx, %eax
shll $0x19, %eax
sarl $0x19, %eax
addl %esi, %eax
movslq %eax, %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x10(%r14), %rax
movq %rcx, %rdx
andq %r13, %rdx
xorl %esi, %esi
cmpq %r12, %rdx
setbe %sil
movq $-0x2, %rdx
rolq %cl, %rdx
andq %rdx, -0x8(%rax,%rsi,8)
incl %ebx
jmp 0x3442
cmpl $0xa, %eax
jne 0x352b
movl (%r14), %esi
cmpl %esi, %ebx
jne 0x353e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, %eax
jne 0x3537
xorl %edi, %edi
callq 0x2240
movl %eax, %edi
callq 0x2477
movl %ebx, %edi
callq 0x2452
movl %ebx, %edi
callq 0x242d
movl %ebx, %edi
callq 0x2408
nop
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/InputOutput.cpp
// Function: read_board(_IO_FILE*)
Board read_board(FILE *fp)
{
    Board board;

    fscanf(fp, "%d %d %d %d\n", &board.height, &board.width,
            &board.score[0], &board.score[1]);
    if (feof(fp))
        exit(0);

    board.edges.assign(board.width * (board.height + 1) + board.height * (board.width + 1), false);

    for (int y = 0; y < board.height; ++y) {
        board.read_horiz_edges(y, fp);
        board.read_vert_edges(y, fp);
    }
    board.read_horiz_edges(board.height, fp);

    if (feof(fp))
        exit(0);

    return board;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movl %eax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
leaq 0x4(%rdi), %r12
leaq 0x8(%rdi), %r8
leaq 0xc(%rdi), %r9
leaq 0x19f5(%rip), %rsi      # 0x5144
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2390
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x37da
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
leal 0x1(%rcx), %edx
imull %eax, %edx
incl %eax
imull %ecx, %eax
addl %edx, %eax
movslq %eax, %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x37fe
movl (%r12), %esi
testl %esi, %esi
jle 0x37b7
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x341c
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x3554
incl %ebp
movl 0x4(%rbx), %esi
cmpl %esi, %ebp
jl 0x3794
movq %rbx, %rdi
movq %r14, %rdx
callq 0x341c
movq %r14, %rdi
callq 0x22e0
testl %eax, %eax
jne 0x37da
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
callq 0x2240
jmp 0x37e3
movq %rax, %rbx
movq %r15, %rdi
callq 0x2ed6
movq %rbx, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2e2b
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/./Board.h
// Function: EdgeIterator::operator++()
EdgeIterator &operator++()
        {
            if (edge.dir == HORIZ) {
                if (edge.x < width) {
                    if (edge.y <= height) {
                        ++edge.y;
                    } else {
                        ++edge.x;
                        edge.y = 0;
                    }
                } else {
                    edge.dir = VERT;
                    edge.x = 0;
                    edge.y = 0;
                }
            } else {
                if (edge.x <= width) {
                    if (edge.y < height) {
                        ++edge.y;
                    } else {
                        ++edge.x;
                        edge.y = 0;
                    }
                } else {
                    edge.dir = HORIZ;
                    edge.x = -1;
                    edge.y = -1;
                }
            }
            return *this;
        }

// Assembly:
movq %rdi, %rax
movl (%rdi), %ecx
movl 0x4(%rdi), %edi
movsbl %cl, %edx
movl %edx, %esi
sarl %esi
testb $0x1, %dl
jne 0x4382
movw $0x1, %dx
cmpl %esi, %edi
jle 0x43b4
movswl %cx, %edx
sarl $0x8, %edx
cmpl %edx, 0x8(%rax)
jge 0x439d
leal 0x2(%rcx), %edx
andl $0xfe, %edx
jmp 0x43b4
movw $0xfffe, %dx            # imm = 0xFFFE
cmpl %esi, %edi
jl 0x43b4
movswl %cx, %edx
sarl $0x8, %edx
cmpl %edx, 0x8(%rax)
jle 0x43aa
leal 0x100(%rcx), %edx
jmp 0x43b4
andl $-0x2, %ecx
addl $0x100, %ecx            # imm = 0x100
movl %ecx, %edx
jmp 0x43b4
leal 0x3(,%rsi,2), %ecx
movzbl %cl, %edx
movw %dx, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/grogers0[P]dots_and_boxes/DotsDriver.cpp
// Function: print_win_info(Board const&, int)
void print_win_info(const Board &board, int winning_player = -1)
{
    int score[2] = {board.get_score(0), board.get_score(1)};

    board.print(stdout);

    if (winning_player == -1) {
        if (score[0] > score[1]) {
            winning_player = 0;
        } else if (score[0] < score[1]) {
            winning_player = 1;
        } else {
            printf("tie game! final score => player 1: %d, player 2: %d\n",
                    score[0], score[1]);
            return;
        }
    }

    printf("player %d wins! final score => player 1: %d, player 2: %d\n",
            winning_player + 1, score[0], score[1]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl 0x8(%rdi), %ebp
movl 0xc(%rdi), %ebx
movq 0x37d1(%rip), %rax      # 0x7fb8
movq (%rax), %rsi
xorl %edx, %edx
callq 0x33a0
cmpl $-0x1, %r14d
jne 0x4809
movl $0x0, %r14d
cmpl %ebx, %ebp
jg 0x4809
movl $0x1, %r14d
jge 0x4825
incl %r14d
leaq 0xd2d(%rip), %rdi       # 0x5540
movl %r14d, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2040
leaq 0xcdf(%rip), %rdi       # 0x550b
movl %ebp, %esi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O1/nikhilYadala[P]Python_to_cpp/Source/src/convert_to_cpp.cpp
// Function: eval_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
std::string eval_expr(std::string& s)
{
	std::string evaled = "";
	if(*s.begin()=='"') {
		std::string subject = "";
		std::string::iterator itr = s.begin()+1;
		for(;*itr!='"';++itr)
			subject.push_back(*itr);

		evaled.append("artificial_string(\""+subject+"\")");

		itr++;
		for(;itr!=s.end();++itr)
			evaled.push_back(*itr);
	}
	if(evaled == "")
		evaled  = s;

	return evaled;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0x8abd(%rip), %rdx      # 0xb21e
movq %rdx, %rsi
callq 0x4e92
movq (%r14), %rax
cmpb $0x22, (%rax)
jne 0x287f
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x8a9a(%rip), %rdx      # 0xb21e
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x4e92
movq (%r14), %r13
addq $0x2, %r13
leaq -0x68(%rbp), %r15
movb -0x1(%r13), %al
cmpb $0x22, %al
je 0x27b3
incq %r13
movsbl %al, %esi
movq %r15, %rdi
callq 0x21a0
jmp 0x279b
leaq 0x884a(%rip), %rsi      # 0xb004
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %rdx
callq 0x4ba5
leaq 0x8847(%rip), %rsi      # 0xb018
leaq -0x88(%rbp), %rdi
callq 0x23c0
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2801
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x2808
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2090
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x283d
callq 0x21c0
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2861
callq 0x21c0
jmp 0x2861
movsbl (%r13), %esi
movq %rbx, %rdi
callq 0x21a0
incq %r13
movq (%r14), %rax
addq 0x8(%r14), %rax
cmpq %rax, %r13
jne 0x2851
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x287f
callq 0x21c0
leaq 0x8998(%rip), %rsi      # 0xb21e
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x289d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2110
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28dd
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x28c7
callq 0x21c0
jmp 0x28c7
movq %rax, %r14
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28e7
callq 0x21c0
jmp 0x28e7
jmp 0x28e4
movq %rax, %r14
jmp 0x28f9
jmp 0x28e4
movq %rax, %r14
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x28f9
callq 0x21c0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2906
callq 0x21c0
movq %r14, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/nikhilYadala[P]Python_to_cpp/Source/src/convert_to_cpp.cpp
// Function: is_symbol(char)
bool is_symbol(char c){
	char symbols[]=" =:;(){}[]|,.&+-<>*/'\n#";

	for(int i=0;symbols[i]!='#';++i)
		if(symbols[i]==c)
			return 1;
	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpb $0x20, %dil
je 0x293c
movl $0x1, %edx
leaq 0x889a(%rip), %rcx      # 0xb1c0
cmpq $0x16, %rdx
setne %al
je 0x293c
leaq 0x1(%rdx), %rsi
cmpb %dil, (%rdx,%rcx)
movq %rsi, %rdx
jne 0x2926
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nikhilYadala[P]Python_to_cpp/Source/src/convert_to_cpp.cpp
// Function: map_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
std::string map_type(std::string s, int l)
{
	if(s=="int")
		return "long int";
	if(s=="float")
		return "float";
	if(s=="s")
		return "artificial_string";
	else {
		std::cout<<"[ WARNING ] Bad type name "<<s<<"!! on line "<<l<<std::endl;
		return s;
	}


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x82e0(%rip), %rsi      # 0xb03e
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x2e31
leaq 0x82cd(%rip), %rsi      # 0xb042
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x2e48
leaq 0x85de(%rip), %rsi      # 0xb36a
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x2e5f
movq 0xc235(%rip), %r12      # 0xefd8
leaq 0x829e(%rip), %rsi      # 0xb048
movl $0x1a, %edx
movq %r12, %rdi
callq 0x2250
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x2250
movq %rax, %r12
leaq 0x8293(%rip), %rsi      # 0xb063
movl $0xb, %edx
movq %rax, %rdi
callq 0x2250
movq %r12, %rdi
movl %r15d, %esi
callq 0x2360
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x2e7e
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x2e84
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x81fa(%rip), %rsi      # 0xb039
leaq 0x81fb(%rip), %rdx      # 0xb041
jmp 0x2e74
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x81ec(%rip), %rsi      # 0xb042
leaq 0x81ea(%rip), %rdx      # 0xb047
jmp 0x2e74
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x81b3(%rip), %rsi      # 0xb020
leaq 0x81bd(%rip), %rdx      # 0xb031
movq %rbx, %rdi
callq 0x4e92
jmp 0x2e9c
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq