// File: /workspace/github_cpp_makefile_star2_O2/thunlp[P]KB2E/CTransR/Train_CTransR.cpp
// Function: Train::same_rel(double)
void same_rel(double rel)
    {
        double sum=0;
        for (int ii=0; ii<n; ii++)
            if (L1_flag)
                sum+=fabs(fb_relation_vec[cluster2fb[rel]][ii]-relation_vec[rel][ii]);
            else
                sum+=sqr(fb_relation_vec[cluster2fb[rel]][ii]-relation_vec[rel][ii]);
        if (sum>0)
        {
            double lambda = 0.001;
            res+=lambda*(sum);
            for (int ii=0; ii<n; ii++)
            {
                double x = 2*(fb_relation_vec[cluster2fb[rel]][ii]-relation_vec[rel][ii]);
                if (L1_flag)
                    if (x>0)
                        x=1;
                    else
                        x=-1;
                fb_relation_tmp[cluster2fb[rel]][ii]-=lambda*rate*x;
                relation_tmp[rel][ii]+=lambda*rate*x;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cvttsd2si %xmm0, %ebp
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x28d9(%rip), %xmm0     # 0x8048
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
leaq 0x377c8(%rip), %r14     # 0x3cf50
leaq 0x4(%rsp), %r15
imulq $0x18, %rdx, %r12
movslq 0x68(%rbx), %rax
cmpq %rax, %r13
jge 0x583d
movsd %xmm1, 0x8(%rsp)
cmpb $0x1, 0x69fd(%rip)      # 0xc1a8
jne 0x57ef
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6636
movslq (%rax), %rax
movq 0xd8(%rbx), %rcx
movq 0x108(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd (%rax,%r13,8), %xmm0
movq (%rcx,%r12), %rax
subsd (%rax,%r13,8), %xmm0
andpd 0x2893(%rip), %xmm0     # 0x8080
jmp 0x582b
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6636
movslq (%rax), %rax
movq 0xd8(%rbx), %rcx
movq 0x108(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd (%rax,%r13,8), %xmm0
movq (%rcx,%r12), %rax
subsd (%rax,%r13,8), %xmm0
mulsd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
incq %r13
jmp 0x5791
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x5966
mulsd 0x27d5(%rip), %xmm1     # 0x8028
addsd 0x78(%rbx), %xmm1
movsd %xmm1, 0x78(%rbx)
xorl %r13d, %r13d
leaq 0x376e9(%rip), %r14     # 0x3cf50
leaq 0x4(%rsp), %r15
cltq
cmpq %rax, %r13
jge 0x5966
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6636
movslq (%rax), %rax
movq 0xd8(%rbx), %rcx
movq 0x108(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd (%rax,%r13,8), %xmm0
movq (%rcx,%r12), %rax
subsd (%rax,%r13,8), %xmm0
addsd %xmm0, %xmm0
xorl %eax, %eax
ucomisd 0x279b(%rip), %xmm0     # 0x8058
seta %cl
cmpb $0x0, 0x68e1(%rip)      # 0xc1a8
je 0x58d7
movb %cl, %al
leaq 0x279e(%rip), %rcx      # 0x8070
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x80(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x6636
movslq (%rax), %rax
movq 0x150(%rbx), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rax
movsd 0x10(%rsp), %xmm0
mulsd 0x2736(%rip), %xmm0     # 0x8050
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
addsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rax,%r13,8)
movsd 0x80(%rbx), %xmm0
mulsd 0x26e8(%rip), %xmm0     # 0x8028
movq 0x120(%rbx), %rax
movq (%rax,%r12), %rax
mulsd %xmm1, %xmm0
addsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r13
movl 0x68(%rbx), %eax
jmp 0x586c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop