// File: jianxinzhou[P]Smart/./src/MyCacheThread.cpp
// Function: MyCacheThread::scan_cache()
void MyCacheThread::scan_cache()
{
    std::vector<MyThread*>::iterator iter = vecWorkThreadPtr_.begin();
    for(; 
        iter != vecWorkThreadPtr_.end(); 
        ++iter)
    {
        ( (*iter) -> cache_ ).read_from_file( (threadPoolPtr_ -> conf_).getMapConf()["my_cache"].c_str()) ;
        
        std::ofstream outfile( (threadPoolPtr_ -> conf_).getMapConf()["my_cache"].c_str() ) ;
        if(!outfile)
        {
            throw std::runtime_error("scan cache : open cache failed");
        }		
        
        ( (*iter ) -> cache_ ).write_to_file(outfile) ;
        outfile.close();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
addq $0x60, %rdi
callq 0x12680
movq %rax, -0x10(%rbp)
movq -0x2a0(%rbp), %rdi
addq $0x60, %rdi
callq 0x126f0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x126b0
testb $0x1, %al
jne 0x12271
jmp 0x1257d
leaq -0x10(%rbp), %rdi
callq 0x12740
movq %rax, %rcx
movq -0x2a0(%rbp), %rax
movq (%rcx), %rcx
addq $0x60, %rcx
movq %rcx, -0x2b8(%rbp)
movq 0x58(%rax), %rax
movq (%rax), %rdi
callq 0xdbb0
movq %rax, -0x2b0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x3540
movq -0x2a8(%rbp), %rdx
leaq 0xf0e(%rip), %rsi       # 0x131d1
leaq -0x58(%rbp), %rdi
callq 0x3410
jmp 0x122ce
movq -0x2b0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4df0
movq %rax, -0x2c0(%rbp)
jmp 0x122e7
movq -0x2c0(%rbp), %rdi
callq 0x3150
movq %rax, -0x2d0(%rbp)
leaq -0x6d(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x3540
movq -0x2d0(%rbp), %rsi
movq -0x2c8(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x3410
jmp 0x12323
movq -0x2b8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xd8e0
jmp 0x12335
leaq -0x38(%rbp), %rdi
callq 0x31f0
leaq -0x6d(%rbp), %rdi
callq 0x3320
leaq -0x58(%rbp), %rdi
callq 0x31f0
leaq -0x59(%rbp), %rdi
callq 0x3320
movq -0x2a0(%rbp), %rax
movq 0x58(%rax), %rax
movq (%rax), %rdi
callq 0xdbb0
movq %rax, -0x2e0(%rbp)
leaq -0x291(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x3540
movq -0x2d8(%rbp), %rdx
leaq 0xe3d(%rip), %rsi       # 0x131d1
leaq -0x290(%rbp), %rdi
callq 0x3410
jmp 0x123a2
movq -0x2e0(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x4df0
movq %rax, -0x2e8(%rbp)
jmp 0x123be
movq -0x2e8(%rbp), %rdi
callq 0x3150
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
movl $0x10, %edx
callq 0x3330
jmp 0x123e0
leaq -0x290(%rbp), %rdi
callq 0x31f0
leaq -0x291(%rbp), %rdi
callq 0x3320
movq -0x270(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x270(%rbp,%rax), %rdi
callq 0x3180
movb %al, -0x2e9(%rbp)
jmp 0x12418
movb -0x2e9(%rbp), %al
testb $0x1, %al
jne 0x12427
jmp 0x12529
movl $0x10, %edi
callq 0x31a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x2f8(%rbp)
leaq 0xe62(%rip), %rsi       # 0x132a7
callq 0x3130
jmp 0x1244c
movq -0x2f8(%rbp), %rdi
movq 0xab96(%rip), %rsi      # 0x1cff0
movq 0xab67(%rip), %rdx      # 0x1cfc8
callq 0x3510
jmp 0x1258f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x124bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x124b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x124aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x31f0
leaq -0x6d(%rbp), %rdi
callq 0x3320
leaq -0x58(%rbp), %rdi
callq 0x31f0
leaq -0x59(%rbp), %rdi
callq 0x3320
jmp 0x12586
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x124f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x31f0
leaq -0x291(%rbp), %rdi
callq 0x3320
jmp 0x12586
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1256f
movq -0x2f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
callq 0x3230
jmp 0x1256f
leaq -0x10(%rbp), %rdi
callq 0x12740
movq (%rax), %rdi
addq $0x60, %rdi
leaq -0x270(%rbp), %rsi
callq 0x127a0
jmp 0x12547
leaq -0x270(%rbp), %rdi
callq 0x3430
jmp 0x12555
leaq -0x270(%rbp), %rdi
callq 0x3460
leaq -0x10(%rbp), %rdi
callq 0x12870
jmp 0x12247
leaq -0x270(%rbp), %rdi
callq 0x3460
jmp 0x12586
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3530
nop