// File: /workspace/github_cpp_makefile_star2_O3/mertyildiran[P]Plexus/plexus/plexus.cpp
// Function: Neuron::partially_subscribe()
void Neuron::partially_subscribe()
{
    if (this->subscriptions.size() == 0) {
        unsigned seed = std::chrono::system_clock::now()
            .time_since_epoch().count();
        std::default_random_engine generator (seed);
        std::normal_distribution<double> distribution(
            this->network->connectivity,
            this->network->connectivity_sqrt
        );
        unsigned int sample_length = distribution(generator);
        if (sample_length > this->network->nonmotor_neurons.size())
            sample_length = this->network->nonmotor_neurons.size();
        if (sample_length <= 0)
            sample_length = 0;
        std::vector<Neuron*> elected = random_sample(
            this->network->nonmotor_neurons,
            sample_length
        );
        for (auto const& target_neuron: elected) {
            if (target_neuron != this) {
                this->subscriptions.insert(
                    std::pair<Neuron*, double>(
                        target_neuron,
                        Random::get(-1.0, 1.0)
                    )
                );
                target_neuron->publications.insert(
                    std::pair<Neuron*, double>(this, 0.0)
                );
            }
        }
        this->network->increase_initiated_neurons();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %fs:0x28, %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x48(%rdi)
jne 0x68e9
movq %rdi, %rbx
leaq 0x28(%rsp), %r13
callq 0x6030
movl %eax, %ecx
leaq (%rcx,%rcx,2), %rcx
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x1e, %edx
movl %edx, %ecx
shll $0x1f, %ecx
orl %edx, %ecx
leal (%rax,%rcx), %edx
cmpl $0x1, %edx
adcl %eax, %ecx
leaq 0x48(%rsp), %rsi
movq %rcx, (%rsi)
movq 0x28(%rbx), %rax
cvtdq2pd 0x4(%rax), %xmm0
leaq 0x50(%rsp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
movq %rdi, %rdx
callq 0x95ec
cvttsd2si %xmm0, %rax
movl %eax, %ecx
movq 0x28(%rbx), %rdx
leaq 0x160(%rdx), %rsi
movq 0x168(%rdx), %r14
subq 0x160(%rdx), %r14
sarq $0x3, %r14
cmpq %rcx, %r14
cmovael %eax, %r14d
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x80d2
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x7fb1
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x684b
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x6280
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rbp
cmpq %rbp, %r14
je 0x68ca
leaq 0x30(%rbx), %r15
leaq 0x40(%rsp), %r13
leaq 0x8(%rsp), %r12
cmpq %rbx, (%r14)
je 0x68bc
callq 0x8968
movq %rax, %rdi
callq 0x8ab5
addsd %xmm0, %xmm0
addsd 0x577a(%rip), %xmm0     # 0xc000
movq (%r14), %rax
movq %rax, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x9b18
movq (%r14), %rdi
addq $0x68, %rdi
movq %rbx, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %r12, %rsi
callq 0x9b18
addq $0x8, %r14
cmpq %rbp, %r14
jne 0x6868
movq 0x30(%rsp), %r14
movq 0x28(%rbx), %rax
incl 0x98(%rax)
testq %r14, %r14
je 0x68e9
movq 0x40(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x70(%rsp), %rax
jne 0x6945
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
jmp 0x691c
jmp 0x6914
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x692d
movq (%r13), %rsi
subq %rdi, %rsi
callq 0x6280
movq %fs:0x28, %rax
cmpq 0x70(%rsp), %rax
jne 0x6945
movq %rbx, %rdi
callq 0x6440
callq 0x62a0