// File: mertyildiran[P]Plexus/plexus/plexus.cpp
// Function: Network::load(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
void Network::load(
    std::vector<double> input_arr,
    std::vector<double> output_arr
)
{
    if (this->sensory_neurons.size() != input_arr.size()) {
        std::cout << "Size of the input array: " << input_arr.size() << '\n';
        std::cout << "Number of the sensory neurons: "
            << this->sensory_neurons.size() << '\n';
        std::cout << "Size of the input array and number of the sensory "
            "neurons are not matching! Please try again" << '\n';
    } else {
        int step = 0;
        for (auto& neuron: this->sensory_neurons) {
            neuron->potential = input_arr[step];
            step++;
        }
    }
    if (output_arr.empty()) {
        this->freezer = true;
        for (auto& neuron: this->nonsensory_neurons) {
            neuron->desired_potential = std::nan("None");
        }
        this->freezer = false;
    } else {
        if (this->motor_neurons.size() != output_arr.size()) {
            std::cout << "Size of the output/target array: "
                << output_arr.size() << '\n';
            std::cout << "Number of the motor neurons: "
                << this->motor_neurons.size() << '\n';
            std::cout << "Size of the output/target array and number "
                "of the motor neurons are not matching! "
                "Please try again" << '\n';
        } else {
            int step = 0;
            for (auto& neuron: this->motor_neurons) {
                neuron->desired_potential = output_arr[step];
                step++;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, -0xa0(%rbp)
movq %rdx, -0xb0(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x40(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
addq $0x10, %rdi
callq 0x18dd0
movq -0xa0(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x1a070
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
je 0x18879
movq 0x187c5(%rip), %rdi     # 0x30f98
leaq 0xeadb(%rip), %rsi      # 0x272b5
callq 0x162b0
movq -0xa0(%rbp), %rdi
movq %rax, -0xc0(%rbp)
callq 0x1a070
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x16070
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
movq 0x18783(%rip), %rdi     # 0x30f98
leaq 0xeab3(%rip), %rsi      # 0x272cf
callq 0x162b0
movq -0xa8(%rbp), %rdi
movq %rax, -0xb8(%rbp)
addq $0x10, %rdi
callq 0x18dd0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x16070
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
movq 0x1873d(%rip), %rdi     # 0x30f98
leaq 0xea8d(%rip), %rsi      # 0x272ef
callq 0x162b0
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
jmp 0x18902
movq -0xa8(%rbp), %rax
movl $0x0, -0x54(%rbp)
addq $0x10, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x19160
movq %rax, -0x10(%rbp)
movq -0x60(%rbp), %rdi
callq 0x191b0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x19210
testb $0x1, %al
jne 0x188bc
jmp 0x18900
leaq -0x10(%rbp), %rdi
callq 0x19250
movq -0xa0(%rbp), %rdi
movq %rax, -0x68(%rbp)
movslq -0x54(%rbp), %rsi
callq 0x1a090
movsd (%rax), %xmm0
movq -0x68(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, 0xa0(%rax)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x19350
jmp 0x188a9
jmp 0x18902
movq -0xb0(%rbp), %rdi
callq 0x1a0b0
testb $0x1, %al
jne 0x18917
jmp 0x1899c
movq -0xa8(%rbp), %rax
movb $0x1, 0x128(%rax)
addq $0x50, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x19160
movq %rax, -0x20(%rbp)
movq -0x70(%rbp), %rdi
callq 0x191b0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x19210
testb $0x1, %al
jne 0x1895a
jmp 0x18989
leaq -0x20(%rbp), %rdi
callq 0x19250
movq %rax, -0x78(%rbp)
leaq 0xe6de(%rip), %rdi      # 0x2704c
callq 0x16050
movq -0x78(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
leaq -0x20(%rbp), %rdi
callq 0x19350
jmp 0x18947
movq -0xa8(%rbp), %rax
movb $0x0, 0x128(%rax)
jmp 0x18b15
movq -0xa8(%rbp), %rdi
addq $0x30, %rdi
callq 0x18dd0
movq -0xb0(%rbp), %rdi
movq %rax, -0xc8(%rbp)
callq 0x1a070
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
je 0x18a7f
movq 0x185bf(%rip), %rdi     # 0x30f98
leaq 0xe96c(%rip), %rsi      # 0x2734c
callq 0x162b0
movq -0xb0(%rbp), %rdi
movq %rax, -0xd8(%rbp)
callq 0x1a070
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x16070
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
movq 0x1857d(%rip), %rdi     # 0x30f98
leaq 0xe94c(%rip), %rsi      # 0x2736e
callq 0x162b0
movq -0xa8(%rbp), %rdi
movq %rax, -0xd0(%rbp)
addq $0x30, %rdi
callq 0x18dd0
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x16070
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
movq 0x18537(%rip), %rdi     # 0x30f98
leaq 0xe924(%rip), %rsi      # 0x2738c
callq 0x162b0
movq %rax, %rdi
movl $0xa, %esi
callq 0x16380
jmp 0x18b13
movq -0xa8(%rbp), %rax
movl $0x0, -0x7c(%rbp)
addq $0x30, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x19160
movq %rax, -0x30(%rbp)
movq -0x88(%rbp), %rdi
callq 0x191b0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x19210
testb $0x1, %al
jne 0x18acb
jmp 0x18b11
leaq -0x30(%rbp), %rdi
callq 0x19250
movq -0xb0(%rbp), %rdi
movq %rax, -0x90(%rbp)
movslq -0x7c(%rbp), %rsi
callq 0x1a090
movsd (%rax), %xmm0
movq -0x90(%rbp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x19350
jmp 0x18ab8
jmp 0x18b13
jmp 0x18b15
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x18b30
addq $0xe0, %rsp
popq %rbp
retq
callq 0x16340
nopw %cs:(%rax,%rax)
nop