// File: /workspace/github_cpp_makefile_star2_O3/NishadSaraf[P]Championship-Simulator/src/cache.cc
// Function: CACHE::handle_writeback()
void CACHE::handle_writeback()
{
    // handle write
    uint32_t writeback_cpu = WQ.entry[WQ.head].cpu;
    if (writeback_cpu == NUM_CPUS)
        return;

    // handle the oldest entry
    if ((WQ.entry[WQ.head].event_cycle <= current_core_cycle[writeback_cpu]) && (WQ.occupancy > 0)) {
        int index = WQ.head;

        // access cache
        uint32_t set = get_set(WQ.entry[index].address);
        int way = check_hit(&WQ.entry[index]);
        
        if (way >= 0) { // writeback hit (or RFO hit for L1D)

            if (cache_type == IS_LLC) {
                llc_update_replacement_state(writeback_cpu, set, way, block[set][way].full_addr, WQ.entry[index].ip, 0, WQ.entry[index].type, 1);

            }
            else
                update_replacement_state(writeback_cpu, set, way, block[set][way].full_addr, WQ.entry[index].ip, 0, WQ.entry[index].type, 1);

            // COLLECT STATS
            sim_hit[writeback_cpu][WQ.entry[index].type]++;
            sim_access[writeback_cpu][WQ.entry[index].type]++;

            // mark dirty
            block[set][way].dirty = 1;

            if (cache_type == IS_ITLB)
                WQ.entry[index].instruction_pa = block[set][way].data;
            else if (cache_type == IS_DTLB)
                WQ.entry[index].data_pa = block[set][way].data;
            else if (cache_type == IS_STLB)
                WQ.entry[index].data = block[set][way].data;

            // check fill level
            if (WQ.entry[index].fill_level < fill_level) {

                if (WQ.entry[index].instruction) 
                    upper_level_icache[writeback_cpu]->return_data(&WQ.entry[index]);
                else // data
                    upper_level_dcache[writeback_cpu]->return_data(&WQ.entry[index]);
            }

            HIT[WQ.entry[index].type]++;
            ACCESS[WQ.entry[index].type]++;

            // remove this entry from WQ
            WQ.remove_queue(&WQ.entry[index]);
        }
        else { // writeback miss (or RFO miss for L1D)
            
            DP ( if (warmup_complete[writeback_cpu]) {
            cout << "[" << NAME << "] " << __func__ << " type: " << +WQ.entry[index].type << " miss";
            cout << " instr_id: " << WQ.entry[index].instr_id << " address: " << hex << WQ.entry[index].address;
            cout << " full_addr: " << WQ.entry[index].full_addr << dec;
            cout << " cycle: " << WQ.entry[index].event_cycle << endl; });

            if (cache_type == IS_L1D) { // RFO miss

                // check mshr
                uint8_t miss_handled = 1;
                int mshr_index = check_mshr(&WQ.entry[index]);

                if ((mshr_index == -1) && (MSHR.occupancy < MSHR_SIZE)) { // this is a new miss

                    // add it to mshr (RFO miss)
                    add_mshr(&WQ.entry[index]);

                    // add it to the next level's read queue
                    //if (lower_level) // L1D always has a lower level cache
                        lower_level->add_rq(&WQ.entry[index]);
                }
                else {
                    if ((mshr_index == -1) && (MSHR.occupancy == MSHR_SIZE)) { // not enough MSHR resource
                        
                        // cannot handle miss request until one of MSHRs is available
                        miss_handled = 0;
                        STALL[WQ.entry[index].type]++;
                    }
                    else if (mshr_index != -1) { // already in-flight miss

                        // update fill_level
                        if (WQ.entry[index].fill_level < MSHR.entry[mshr_index].fill_level)
                            MSHR.entry[mshr_index].fill_level = WQ.entry[index].fill_level;

                        // update request
                        if (MSHR.entry[mshr_index].type == PREFETCH) {
                            uint8_t  prior_returned = MSHR.entry[mshr_index].returned;
                            uint64_t prior_event_cycle = MSHR.entry[mshr_index].event_cycle;
                            memcpy(&MSHR.entry[mshr_index], &WQ.entry[index], sizeof(PACKET));

                            // in case request is already returned, we should keep event_cycle and retunred variables
                            MSHR.entry[mshr_index].returned = prior_returned;
                            MSHR.entry[mshr_index].event_cycle = prior_event_cycle;
                        }

                        MSHR_MERGED[WQ.entry[index].type]++;

                        DP ( if (warmup_complete[writeback_cpu]) {
                        cout << "[" << NAME << "] " << __func__ << " mshr merged";
                        cout << " instr_id: " << WQ.entry[index].instr_id << " prior_id: " << MSHR.entry[mshr_index].instr_id; 
                        cout << " address: " << hex << WQ.entry[index].address;
                        cout << " full_addr: " << WQ.entry[index].full_addr << dec;
                        cout << " cycle: " << WQ.entry[index].event_cycle << endl; });
                    }
                    else { // WE SHOULD NOT REACH HERE
                        cerr << "[" << NAME << "] MSHR errors" << endl;
                        assert(0);
                    }
                }

                if (miss_handled) {

                    MISS[WQ.entry[index].type]++;
                    ACCESS[WQ.entry[index].type]++;

                    // remove this entry from WQ
                    WQ.remove_queue(&WQ.entry[index]);
                }

            }
            else {
                // find victim
                uint32_t set = get_set(WQ.entry[index].address), way;
                if (cache_type == IS_LLC) {
                    way = llc_find_victim(writeback_cpu, WQ.entry[index].instr_id, set, block[set], WQ.entry[index].ip, WQ.entry[index].full_addr, WQ.entry[index].type);
                }
                else
                    way = find_victim(writeback_cpu, WQ.entry[index].instr_id, set, block[set], WQ.entry[index].ip, WQ.entry[index].full_addr, WQ.entry[index].type);

#ifdef LLC_BYPASS
                if ((cache_type == IS_LLC) && (way == LLC_WAY)) {
                    cerr << "LLC bypassing for writebacks is not allowed!" << endl;
                    assert(0);
                }
#endif

                uint8_t  do_fill = 1;

                // is this dirty?
                if (block[set][way].dirty) {

                    // check if the lower level WQ has enough room to keep this writeback request
                    if (lower_level) { 
                        if (lower_level->get_occupancy(2) == lower_level->get_size(2)) {

                            // lower level WQ is full, cannot replace this victim
                            do_fill = 0;
                            lower_level->increment_WQ_FULL();
                            STALL[WQ.entry[index].type]++;

                            DP ( if (warmup_complete[writeback_cpu]) {
                            cout << "[" << NAME << "] " << __func__ << "do_fill: " << +do_fill;
                            cout << " lower level wq is full!" << " fill_addr: " << hex << WQ.entry[index].address;
                            cout << " victim_addr: " << block[set][way].tag << dec << endl; });
                        }
                        else { 
                            PACKET writeback_packet;

                            writeback_packet.fill_level = fill_level << 1;
                            writeback_packet.cpu = writeback_cpu;
                            writeback_packet.address = block[set][way].address;
                            writeback_packet.full_addr = block[set][way].full_addr;
                            writeback_packet.data = block[set][way].data;
                            writeback_packet.instr_id = WQ.entry[index].instr_id;
                            writeback_packet.ip = 0;
                            writeback_packet.type = WRITEBACK;
                            writeback_packet.event_cycle = current_core_cycle[writeback_cpu];

                            lower_level->add_wq(&writeback_packet);
                        }
                    }
#ifdef SANITY_CHECK
                    else {
                        // sanity check
                        if (cache_type != IS_STLB)
                            assert(0);
                    }
#endif
                }

                if (do_fill) {
                    // update prefetcher
                    if (cache_type == IS_L1D)
                        l1d_prefetcher_cache_fill(WQ.entry[index].full_addr, set, way, 0, block[set][way].full_addr);
                    else if (cache_type == IS_L2C)
                        l2c_prefetcher_cache_fill(WQ.entry[index].full_addr, set, way, 0, block[set][way].full_addr);

                    // update replacement policy
                    if (cache_type == IS_LLC) {
                        llc_update_replacement_state(writeback_cpu, set, way, WQ.entry[index].full_addr, WQ.entry[index].ip, block[set][way].full_addr, WQ.entry[index].type, 0);

                    }
                    else
                        update_replacement_state(writeback_cpu, set, way, WQ.entry[index].full_addr, WQ.entry[index].ip, block[set][way].full_addr, WQ.entry[index].type, 0);

                    // COLLECT STATS
                    sim_miss[writeback_cpu][WQ.entry[index].type]++;
                    sim_access[writeback_cpu][WQ.entry[index].type]++;

                    fill_cache(set, way, &WQ.entry[index]);

                    // mark dirty
                    block[set][way].dirty = 1; 

                    // check fill level
                    if (WQ.entry[index].fill_level < fill_level) {

                        if (WQ.entry[index].instruction) 
                            upper_level_icache[writeback_cpu]->return_data(&WQ.entry[index]);
                        else // data
                            upper_level_dcache[writeback_cpu]->return_data(&WQ.entry[index]);
                    }

                    MISS[WQ.entry[index].type]++;
                    ACCESS[WQ.entry[index].type]++;

                    // remove this entry from WQ
                    WQ.remove_queue(&WQ.entry[index]);
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq 0x7440(%rdi), %rax
movl 0x73d4(%rdi), %ecx
imulq $0x380, %rcx, %rdx      # imm = 0x380
movl 0x330(%rax,%rdx), %r15d
cmpq $0x1, %r15
jne 0x419b
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rax, %rdx
movq 0x378(%rdx), %rdx
leaq 0x7cd14(%rip), %r13     # 0x80ec0
cmpq (%r13,%r15,8), %rdx
ja 0x4189
movq %rdi, %rbx
cmpl $0x0, 0x73dc(%rdi)
je 0x4189
leaq 0x73a8(%rbx), %rdx
movq %rdx, 0x10(%rsp)
movslq %ecx, %rcx
imulq $0x380, %rcx, %r14      # imm = 0x380
movl 0x340(%rax,%r14), %r12d
movl 0x7370(%rbx), %edi
callq 0x9203
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebp
movq 0x7440(%rbx), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x497a
movb 0x73a4(%rbx), %cl
testl %eax, %eax
js 0x426b
notl %ebp
andl %r12d, %ebp
movl %eax, %edx
leaq (%rdx,%rdx,4), %r12
shlq $0x4, %r12
movl %ebp, %r13d
movq 0x7390(%rbx), %rdx
movq 0x7440(%rbx), %rsi
movq (%rdx,%r13,8), %rdx
movq 0x20(%rdx,%r12), %r8
movq 0x370(%rsi,%r14), %r9
movzbl 0x32f(%rsi,%r14), %r10d
subq $0x8, %rsp
cmpb $0x6, %cl
jne 0x42d4
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %eax, %ecx
pushq $0x1
pushq %r10
pushq $0x0
callq 0x136d4
jmp 0x42e9
movq 0x7440(%rbx), %rsi
cmpb $0x4, %cl
jne 0x435b
leaq (%rsi,%r14), %rax
movl 0x7388(%rbx), %ecx
testq %rcx, %rcx
je 0x4510
movq 0xca20(%rbx), %rdi
movq 0x340(%rax), %r9
imulq $0x380, %rcx, %r10      # imm = 0x380
xorl %r8d, %r8d
movabsq $0x100000000, %r11      # imm = 0x100000000
xorl %edx, %edx
cmpq %r9, 0x340(%rdi,%r8)
je 0x44fd
addq %r11, %rdx
addq $0x380, %r8             # imm = 0x380
cmpq %r8, %r10
jne 0x42b2
jmp 0x4510
movq %rbx, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %eax, %ecx
pushq $0x1
pushq %r10
pushq $0x0
callq 0x135ee
addq $0x20, %rsp
movq 0x7440(%rbx), %rsi
movzbl 0x32f(%rsi,%r14), %eax
movq %r15, %rcx
shlq $0x5, %rcx
addq %rbx, %rcx
incq 0x10308(%rcx,%rax,8)
incq 0x102e8(%rcx,%rax,8)
movq 0x7390(%rbx), %rax
movq (%rax,%r13,8), %rax
movb $0x1, 0x2(%rax,%r12)
movzbl 0x73a4(%rbx), %ecx
cmpl $0x2, %ecx
je 0x43e4
cmpl $0x1, %ecx
je 0x43d5
testl %ecx, %ecx
jne 0x43f1
movq 0x30(%rax,%r12), %rax
movq %rax, 0x350(%rsi,%r14)
jmp 0x43f1
movl 0x340(%rsi,%r14), %ebp
movl 0x7370(%rbx), %edi
callq 0x9203
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r12d
notl %r12d
andl %ebp, %r12d
cmpb $0x6, 0x73a4(%rbx)
movq 0x7440(%rbx), %rcx
movq 0x348(%rcx,%r14), %rax
movq 0x368(%rcx,%r14), %rdx
movq 0x7390(%rbx), %rsi
movq (%rsi,%r12,8), %r8
movq 0x370(%rcx,%r14), %r9
movzbl 0x32f(%rcx,%r14), %r10d
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %ecx
jne 0x4457
pushq %r10
pushq %rax
callq 0x136ce
jmp 0x445f
movq 0x30(%rax,%r12), %rax
movq %rax, 0x358(%rsi,%r14)
jmp 0x43f1
movq 0x30(%rax,%r12), %rax
movq %rax, 0x360(%rsi,%r14)
movl 0x8(%rsi,%r14), %eax
cmpl 0x7398(%rbx), %eax
jge 0x4418
addq %r14, %rsi
xorl %eax, %eax
cmpb $0x0, (%rsi)
sete %al
leaq (%rbx,%rax,8), %rax
movq 0x8(%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x7440(%rbx), %rax
movzbl 0x32f(%rax,%r14), %ecx
incq 0x72c8(%rbx,%rcx,8)
incq 0x72a8(%rbx,%rcx,8)
leaq (%rax,%r14), %rsi
movq 0x10(%rsp), %rdi
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc41a
pushq %r10
pushq %rax
callq 0x134d4
addq $0x10, %rsp
movl %eax, %ebp
movb 0x73a4(%rbx), %al
cmpb $0x6, %al
setne %cl
cmpl $0x10, %ebp
setne %dl
orb %cl, %dl
je 0x48e5
movq 0x7390(%rbx), %rcx
movl %r12d, %edx
movq %rdx, 0x8(%rsp)
movq (%rcx,%rdx,8), %rcx
movl %ebp, %edx
leaq (%rdx,%rdx,4), %r11
shlq $0x4, %r11
cmpb $0x0, 0x2(%rcx,%r11)
je 0x4679
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x456b
movq %r11, 0x20(%rsp)
movl %ebp, 0x1c(%rsp)
movq (%rdi), %rax
movl $0x2, %esi
callq *0x30(%rax)
movl %eax, %ebp
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x38(%rax)
cmpl %eax, %ebp
jne 0x4597
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x7440(%rbx), %rax
movzbl 0x32f(%rax,%r14), %eax
jmp 0x455e
movabsq $0x37ffffffc80, %r9     # imm = 0x37FFFFFFC80
cmpq %r9, %r8
jne 0x4854
movl 0xc9bc(%rbx), %edx
cmpl %ecx, %edx
jae 0x454d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4b60
movq 0x18(%rbx), %rdi
movq 0x7440(%rbx), %rsi
addq %r14, %rsi
movq (%rdi), %rax
callq *(%rax)
movq 0x7440(%rbx), %rsi
movzbl 0x32f(%rsi,%r14), %eax
jmp 0x48cd
cmpl %ecx, %edx
jne 0x491f
movzbl 0x32f(%rsi,%r14), %eax
incq 0x7328(%rbx,%rax,8)
jmp 0x4189
cmpb $0x2, %al
movq 0x8(%rsp), %rdx
je 0x4754
leaq 0xfae8(%rip), %rdi      # 0x14067
leaq 0xfae3(%rip), %rsi      # 0x14069
leaq 0xfb13(%rip), %rcx      # 0x140a0
movl $0x15f, %edx            # imm = 0x15F
callq 0x3160
leaq 0x40(%rsp), %rbp
movw $0xff00, 0x314(%rbp)    # imm = 0xFF00
xorl %eax, %eax
movl %eax, -0x18(%rbp)
movl %eax, -0x15(%rbp)
movb $-0x1, 0x316(%rbp)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, -0x10(%rbp)
movl $0x314, %edx            # imm = 0x314
movq %rbp, %rdi
xorl %esi, %esi
callq 0x3130
pxor %xmm0, %xmm0
movdqu %xmm0, 0x31c(%rbp)
movdqu %xmm0, 0x32c(%rbp)
xorl %eax, %eax
movl %eax, 0x33c(%rbp)
movl 0x7398(%rbx), %eax
addl %eax, %eax
movl %eax, -0x10(%rbp)
movl %r15d, 0x318(%rbp)
movq 0x7390(%rbx), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rsp), %rcx
movups 0x18(%rax,%rcx), %xmm0
movups %xmm0, 0x328(%rbp)
movq 0x30(%rax,%rcx), %rax
movq %rax, 0x348(%rbp)
movq 0x7440(%rbx), %rax
movq 0x368(%rax,%r14), %rax
movq %rax, 0x350(%rbp)
movq $0x0, 0x358(%rbp)
movb $0x3, 0x317(%rbp)
movq (%r13,%r15,8), %rax
movq %rax, 0x360(%rbp)
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
leaq 0x28(%rsp), %rsi
callq *0x8(%rax)
movq 0x20(%rsp), %r11
movb 0x73a4(%rbx), %al
movl 0x1c(%rsp), %ebp
cmpb $0x5, %al
je 0x46be
movzbl %al, %ecx
cmpl $0x4, %ecx
movq 0x8(%rsp), %rdx
jne 0x4703
movq 0x7390(%rbx), %rax
movq 0x7440(%rbx), %rcx
movq 0x348(%rcx,%r14), %rsi
movq (%rax,%rdx,8), %rax
movq %r11, %r13
movq 0x20(%rax,%r11), %r9
movq %rbx, %rdi
movl %r12d, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x13814
jmp 0x46f5
movq 0x7390(%rbx), %rax
movq 0x7440(%rbx), %rcx
movq 0x348(%rcx,%r14), %rsi
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %r11, %r13
movq 0x20(%rax,%r11), %r9
movq %rbx, %rdi
movl %r12d, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x1380c
movb 0x73a4(%rbx), %al
movq %r13, %r11
movq 0x8(%rsp), %rdx
cmpb $0x6, %al
jne 0x4754
movq 0x7390(%rbx), %rax
movq 0x7440(%rbx), %rcx
movq 0x348(%rcx,%r14), %r8
movq 0x370(%rcx,%r14), %r9
movq (%rax,%rdx,8), %rax
movzbl 0x32f(%rcx,%r14), %r10d
subq $0x8, %rsp
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %ebp, %ecx
pushq $0x0
pushq %r10
pushq 0x20(%rax,%r11)
movq %r11, %r13
callq 0x136d4
jmp 0x479f
movq 0x7390(%rbx), %rax
movq 0x7440(%rbx), %rcx
movq 0x348(%rcx,%r14), %r8
movq 0x370(%rcx,%r14), %r9
movq (%rax,%rdx,8), %rax
movzbl 0x32f(%rcx,%r14), %r10d
subq $0x8, %rsp
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %ebp, %ecx
pushq $0x0
pushq %r10
pushq 0x20(%rax,%r11)
movq %r11, %r13
callq 0x135ee
addq $0x20, %rsp
movq 0x7440(%rbx), %rcx
movzbl 0x32f(%rcx,%r14), %eax
movq %r15, %rdx
shlq $0x5, %rdx
addq %rbx, %rdx
incq 0x10328(%rdx,%rax,8)
addq %r14, %rcx
incq 0x102e8(%rdx,%rax,8)
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x402a
movq 0x7390(%rbx), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movb $0x1, 0x2(%rax,%r13)
movq 0x7440(%rbx), %rsi
movl 0x8(%rsi,%r14), %eax
cmpl 0x7398(%rbx), %eax
jge 0x4821
addq %r14, %rsi
xorl %eax, %eax
cmpb $0x0, (%rsi)
sete %al
leaq (%rbx,%rax,8), %rax
movq 0x8(%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x7440(%rbx), %rax
movzbl 0x32f(%rax,%r14), %ecx
incq 0x72e8(%rbx,%rcx,8)
leaq (%rax,%r14), %rsi
incq 0x72a8(%rbx,%rcx,8)
movq 0x10(%rsp), %rdi
callq 0xc41a
jmp 0x4189
movl 0x8(%rsi,%r14), %ecx
sarq $0x20, %rdx
imulq $0x380, %rdx, %r15      # imm = 0x380
cmpl 0x8(%rdi,%r15), %ecx
jge 0x4875
leaq (%rdi,%r15), %rdx
addq $0x8, %rdx
movl %ecx, (%rdx)
cmpb $0x2, 0x32f(%rdi,%r15)
jne 0x48bc
addq %r15, %rdi
movb 0x32c(%rdi), %bpl
movq 0x378(%rdi), %r12
movl $0x380, %edx            # imm = 0x380
movq %rax, %rsi
callq 0x31c0
movq 0xca20(%rbx), %rax
movb %bpl, 0x32c(%rax,%r15)
movq %r12, 0x378(%rax,%r15)
movq 0x7440(%rbx), %rsi
movzbl 0x32f(%rsi,%r14), %eax
incq 0x7308(%rbx,%rax,8)
incq 0x72e8(%rbx,%rax,8)
incq 0x72a8(%rbx,%rax,8)
addq %r14, %rsi
jmp 0x443c
movq 0x15704(%rip), %rdi     # 0x19ff0
leaq 0xf7cc(%rip), %rsi      # 0x140bf
callq 0x3250
movq %rax, %rdi
callq 0x3110
leaq 0xf760(%rip), %rdi      # 0x14067
leaq 0xf75b(%rip), %rsi      # 0x14069
leaq 0xf78b(%rip), %rcx      # 0x140a0
movl $0x134, %edx            # imm = 0x134
callq 0x3160
movq 0x156ca(%rip), %rdi     # 0x19ff0
leaq 0xf763(%rip), %rsi      # 0x14090
callq 0x3250
addq $0x7350, %rbx           # imm = 0x7350
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31e0
leaq 0xf747(%rip), %rsi      # 0x14092
movq %rax, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3110
leaq 0xf705(%rip), %rdi      # 0x14067
leaq 0xf700(%rip), %rsi      # 0x14069
leaq 0xf730(%rip), %rcx      # 0x140a0
movl $0x11a, %edx            # imm = 0x11A
callq 0x3160