// File: CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_predictor.h
// Function: ftrl_predictor::run_task(std::vector<std::vector<fm_sample, std::allocator<fm_sample>>, std::allocator<std::vector<fm_sample, std::allocator<fm_sample>>>>&)
void ftrl_predictor::run_task(vector<vector<fm_sample> >& dataBuffer)
{
    vector<string> outputVec;
    for(int i = 0; i < dataBuffer.size(); ++i)
    {
        for(int j = 0; j < dataBuffer[i].size(); ++j)
        {
            fm_sample& sample = dataBuffer[i][j];
            double score = pModel->getScore(sample.x, pModel->muMap);
            outputVec.push_back(to_string(sample.y) + " " + sample.qid + " " + to_string(score));
        }
    }
    outMtx.lock();
    for(int i = 0; i < outputVec.size(); ++i)
    {
        fPredict << outputVec[i] << endl;
    }
    outMtx.unlock();
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x59f0
movl $0x0, 0x12c(%rsp)
movslq 0x12c(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x148(%rsp), %rdi
callq 0x5d60
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x486f
movl $0x0, 0x128(%rsp)
movslq 0x128(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x148(%rsp), %rdi
movslq 0x12c(%rsp), %rsi
callq 0x5d80
movq %rax, %rdi
callq 0x5da0
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x4857
movq 0x148(%rsp), %rdi
movslq 0x12c(%rsp), %rsi
callq 0x5d80
movq %rax, %rdi
movslq 0x128(%rsp), %rsi
callq 0x5dc0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x120(%rsp)
movq 0x8(%rax), %rdx
movq 0x120(%rsp), %rsi
addq $0x28, %rsi
movq %rdx, %rdi
callq 0x3df0
movsd %xmm0, 0x20(%rsp)
jmp 0x4642
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x118(%rsp)
movq 0x120(%rsp), %rax
movl (%rax), %esi
leaq 0x68(%rsp), %rdi
callq 0x5fa0
jmp 0x4667
leaq 0xd9a6(%rip), %rdx      # 0x12014
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5f00
jmp 0x4682
movq 0x120(%rsp), %rdx
addq $0x8, %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x5f50
jmp 0x46a5
leaq 0xd968(%rip), %rdx      # 0x12014
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5f00
jmp 0x46c3
movsd 0x118(%rsp), %xmm0
leaq 0x48(%rsp), %rdi
callq 0x60e0
jmp 0x46d8
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x5e10
jmp 0x46f4
leaq 0x130(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x5de0
jmp 0x470b
leaq 0xe8(%rsp), %rdi
callq 0x3598
leaq 0x48(%rsp), %rdi
callq 0x3598
leaq 0xc8(%rsp), %rdi
callq 0x3598
leaq 0xa8(%rsp), %rdi
callq 0x3598
leaq 0x88(%rsp), %rdi
callq 0x3598
leaq 0x68(%rsp), %rdi
callq 0x3598
movl 0x128(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x128(%rsp)
jmp 0x45b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x4926
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x4848
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x483b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x482e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x4821
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
jmp 0x4817
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x3598
leaq 0x48(%rsp), %rdi
callq 0x3598
leaq 0xc8(%rsp), %rdi
callq 0x3598
leaq 0xa8(%rsp), %rdi
callq 0x3598
leaq 0x88(%rsp), %rdi
callq 0x3598
leaq 0x68(%rsp), %rdi
callq 0x3598
jmp 0x4926
jmp 0x4859
movl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x12c(%rsp)
jmp 0x457c
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x53f0
jmp 0x487f
movl $0x0, 0x44(%rsp)
movslq 0x44(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x5a20
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x4901
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movslq 0x44(%rsp), %rsi
leaq 0x130(%rsp), %rdi
callq 0x5a40
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x32b0
movq %rax, 0x10(%rsp)
jmp 0x48df
movq 0x10(%rsp), %rdi
movq 0x15695(%rip), %rsi     # 0x19f80
callq 0x3320
jmp 0x48f2
jmp 0x48f4
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x4887
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x5650
jmp 0x4911
leaq 0x130(%rsp), %rdi
callq 0x5ce0
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0x130(%rsp), %rdi
callq 0x5ce0
movq 0x110(%rsp), %rdi
callq 0x34f0