// File: xbai0624[P]dnn/src/ConstructLayer.cpp
// Function: ConstructLayer::__UpdateActiveFlagFC_Obsolete()
void ConstructLayer::__UpdateActiveFlagFC_Obsolete() // this function has been made obsolete
{
    // for drop out
    // randomly mask out a few neurons
    assert(__activeFlag.size() == 1);
    auto dim = __activeFlag[0].Dimension();
    assert(dim.second == 1);
    // number of neurons to make inactive
    int n_dead = (int)dim.first * __dropOut;

    // generate a filter vector
    std::vector<bool> tmp(dim.first, true);
    for(int i=0;i<n_dead;i++)
        tmp[i] = false;
    TOOLS::Shuffle(tmp);

    // mask out filters
    for(size_t i=0;i<dim.first;i++)
    {
        __activeFlag[0][i][0] = tmp[i];
    }
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
movq %rdi, 0x48(%rsp)
addq $0x108, %rdi            # imm = 0x108
callq 0x1ffd0
cmpq $0x1, %rax
jne 0x140f0
jmp 0x1410f
leaq 0x3ecf7(%rip), %rdi     # 0x52dee
leaq 0x3e0d4(%rip), %rsi     # 0x521d2
movl $0xaab, %edx            # imm = 0xAAB
leaq 0x3ef1e(%rip), %rcx     # 0x53028
callq 0x4170
movq 0x48(%rsp), %rdi
addq $0x108, %rdi            # imm = 0x108
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff80
movq %rax, %rdi
callq 0x200b0
movq %rax, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
cmpq $0x1, 0xd8(%rsp)
jne 0x14149
jmp 0x14168
leaq 0x3e9f2(%rip), %rdi     # 0x52b42
leaq 0x3e07b(%rip), %rsi     # 0x521d2
movl $0xaad, %edx            # imm = 0xAAD
leaq 0x3eec5(%rip), %rcx     # 0x53028
callq 0x4170
movq 0x48(%rsp), %rax
cvtsi2sdl 0xd0(%rsp), %xmm0
movsd 0x3d8(%rax), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xcc(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x38(%rsp)
movb $0x1, 0x9f(%rsp)
leaq 0x9e(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x20f50
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
leaq 0x9f(%rsp), %rdx
callq 0x20f60
jmp 0x141d5
leaq 0x9e(%rsp), %rdi
callq 0x20fe0
movl $0x0, 0x88(%rsp)
movl 0x88(%rsp), %eax
cmpl 0xcc(%rsp), %eax
jge 0x142a4
movslq 0x88(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x20020
movq %rdx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x14222
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x20ff0
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x141ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x9e(%rsp), %rdi
callq 0x20fe0
jmp 0x1438d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x21130
jmp 0x1438d
leaq 0xa0(%rsp), %rdi
callq 0x21040
jmp 0x142b3
movq $0x0, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0xd0(%rsp), %rax
jae 0x14378
movq 0x70(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x20020
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x142ed
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x68(%rsp)
addq $0x108, %rdi            # imm = 0x108
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff80
movq %rax, %rdi
movq 0x70(%rsp), %rsi
callq 0x1fff0
movq %rax, 0x10(%rsp)
jmp 0x1432a
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x20020
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0x14343
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x210f0
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x142bc
leaq 0xa0(%rsp), %rdi
callq 0x21130
addq $0xe8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x43f0
nopw (%rax,%rax)