// File: /workspace/github_cpp_makefile_star2_O1/CastellanZhang[P]lambdaFM/./src/FTRL/ftrl_trainer.h
// Function: ftrl_trainer::trainGroup(std::vector<fm_sample, std::allocator<fm_sample>>&)
void ftrl_trainer::trainGroup(vector<fm_sample>& sampleGrp)
{
    int size = sampleGrp.size();
    variable_NDCG v_NDCG;
    if("ndcg" == rank)
    {
        v_NDCG.init(size);
        calcVariables4NDCG(sampleGrp, v_NDCG);
    }
    for(int i = 0; i < size - 1; ++i)
    {
        for(int j = i + 1; j < size; ++j)
        {
            if(sampleGrp[i].y == sampleGrp[j].y)
            {
                continue;
            }
            double deltaNDCG = 1.0;
            if("ndcg" == rank)
            {
                deltaNDCG = calcDeltaNDCG(i, j, v_NDCG);
            }
            if(sampleGrp[i].y > sampleGrp[j].y)
            {
                trainPair(sampleGrp[i], sampleGrp[j], deltaNDCG);
            }
            else if(sampleGrp[i].y < sampleGrp[j].y)
            {
                trainPair(sampleGrp[j], sampleGrp[i], deltaNDCG);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
movq $0x0, 0xa0(%rsp)
movq %rdi, 0x8(%rsp)
addq $0x58, %rdi
leaq 0x7835(%rip), %rsi      # 0xc092
movq %rdi, 0x48(%rsp)
callq 0x30c0
testl %eax, %eax
jne 0x488a
leaq 0x60(%rsp), %rdi
movl %r15d, %esi
callq 0x6a1e
leaq 0x60(%rsp), %rdx
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4aa0
cmpl $0x2, %r15d
jl 0x4a47
leal -0x1(%r15), %eax
movq %rax, 0x10(%rsp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl $0x1, %r14d
movl $0x60, %r12d
xorl %ebp, %ebp
leaq 0x1(%rbp), %rax
movq %rax, 0x18(%rsp)
leal 0x2(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x30(%rsp)
leaq (,%rbp,2), %r13
addq %rbp, %r13
shlq $0x5, %r13
movq %r12, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq (%rbx), %rax
movl (%rax,%r13), %ecx
cmpl (%rax,%r12), %ecx
je 0x4a16
movq 0x48(%rsp), %rdi
leaq 0x7790(%rip), %rsi      # 0xc092
callq 0x30c0
movsd 0x7701(%rip), %xmm0     # 0xc010
testl %eax, %eax
jne 0x49ea
movq 0x60(%rsp), %rax
movsd (%rax,%r14,8), %xmm0
cmpq $0x1387, %rbp           # imm = 0x1387
movapd %xmm0, 0x50(%rsp)
ja 0x4944
movq 0x8(%rsp), %rax
movq 0x80(%rax), %rax
movsd (%rax,%rbp,8), %xmm2
jmp 0x495b
movsd 0x30(%rsp), %xmm0
callq 0x3480
movsd 0x76b9(%rip), %xmm2     # 0xc010
divsd %xmm0, %xmm2
movq 0x60(%rsp), %rax
movsd (%rax,%rbp,8), %xmm3
cmpq $0x1387, %r14           # imm = 0x1387
ja 0x4982
movq 0x8(%rsp), %rax
movq 0x80(%rax), %rax
movsd (%rax,%r14,8), %xmm1
jmp 0x49b7
leal 0x2(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm2, 0x40(%rsp)
movsd %xmm3, 0x38(%rsp)
callq 0x3480
movsd 0x38(%rsp), %xmm3
movsd 0x40(%rsp), %xmm2
movsd 0x765d(%rip), %xmm1     # 0xc010
divsd %xmm0, %xmm1
movapd 0x50(%rsp), %xmm0
mulsd %xmm1, %xmm3
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
movq 0x78(%rsp), %rax
subsd (%rax,%rbp,8), %xmm0
subsd (%rax,%r14,8), %xmm0
divsd 0xb0(%rsp), %xmm0
andpd 0x7646(%rip), %xmm0     # 0xc030
movq (%rbx), %rcx
leaq (%rcx,%r13), %rdx
leaq (%rcx,%r12), %rax
movl (%rcx,%r12), %esi
cmpl %esi, (%rcx,%r13)
jle 0x4a07
movq %rdx, %rsi
movq %rax, %rdx
jmp 0x4a0c
movq %rax, %rsi
jge 0x4a16
movq 0x8(%rsp), %rdi
callq 0x4c4c
incq %r14
addq $0x60, %r12
cmpq %r14, %r15
jne 0x48e5
movq 0x28(%rsp), %r14
incq %r14
movq 0x20(%rsp), %r12
addq $0x60, %r12
movq 0x18(%rsp), %rbp
cmpq 0x10(%rsp), %rbp
jne 0x48b2
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4a59
callq 0x32a0
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x4a68
callq 0x32a0
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x4a77
callq 0x32a0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a8b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6a52
movq %rbx, %rdi
callq 0x3470