// File: /workspace/github_cpp_makefile_star2_O1/gkosae[P]ArduinoNeuralNet/neuralnet.cpp
// Function: NeuralNet::forward()
void NeuralNet::forward() {
    // set inputs as output of the input layer
    unsigned short input_layer_size = layers.front().size();

    for(auto i = 0; i < input_layer_size; ++i) {
      layers.front().neurons.at(i).output = layers.front().inputs.at(i);
    }

     layers.at(1).feed(layers.front().getOutputs());

     unsigned short number_of_layers = layers.size();

     for(auto i = 1; i < number_of_layers; ++i) {
        layers.at(i).forward();

        if(i != (number_of_layers - 1)){
            layers.at(i+1).feed(layers.at(i).getOutputs());
        }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq 0x18(%rdi), %rsi
movl 0x20(%rsi), %eax
movq 0x18(%rsi), %rdi
subl %edi, %eax
shrl $0x6, %eax
andl $0xffff, %eax           # imm = 0xFFFF
je 0x340a
movq (%rsi), %r8
movq 0x8(%rsi), %rdx
subq %r8, %rdx
sarq $0x3, %rdx
movl %eax, %r9d
xorl %eax, %eax
movq %rdi, %r10
cmpq %rax, %rdx
je 0x3575
movq 0x20(%rsi), %rcx
subq %rdi, %rcx
sarq $0x6, %rcx
cmpq %rax, %rcx
jbe 0x3581
movsd (%r8,%rax,8), %xmm0
movsd %xmm0, (%r10)
incq %rax
addq $0x40, %r10
cmpq %rax, %r9
jne 0x33d6
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq $0x1, %rdx
jbe 0x35aa
leaq 0x40(%rsp), %r12
leaq 0x30(%rsi), %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2d28
movq %r14, %rdi
movq %r15, %rsi
callq 0x52b6
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x346a
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rax
subq 0x18(%rcx), %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movzwl %ax, %ebx
cmpl $0x2, %ebx
jb 0x3566
leaq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rsp)
decl %ebx
movzwl %ax, %ebp
movl $0x1, %r14d
movl $0x60, %r13d
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r14, %rdx
jbe 0x3590
leaq (%rax,%r13), %rdi
addq $-0x30, %rdi
callq 0x2ca8
cmpq %r14, %rbx
je 0x3556
leaq 0x1(%r14), %rsi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r12
movq 0x20(%rax), %rdx
subq %r12, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %rsi, %rdx
jbe 0x359c
leaq (%r12,%r13), %rsi
addq $-0x30, %rsi
addq %r13, %r12
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x2d28
movq %r12, %rdi
movq %r15, %rsi
callq 0x52b6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3556
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
incq %r14
addq $0x30, %r13
cmpq %r14, %rbp
jne 0x34b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b37(%rip), %rdi      # 0x70b3
movq %rdx, %rsi
jmp 0x35a3
leaq 0x3b2b(%rip), %rdi      # 0x70b3
movq %rax, %rsi
movq %rcx, %rdx
jmp 0x35a3
leaq 0x3b1c(%rip), %rdi      # 0x70b3
movq %r14, %rsi
jmp 0x35a3
leaq 0x3b10(%rip), %rdi      # 0x70b3
xorl %eax, %eax
callq 0x21d0
leaq 0x3b02(%rip), %rdi      # 0x70b3
movl $0x1, %esi
jmp 0x35a3
movq %r12, 0x10(%rsp)
movq %rax, %rbx
movq 0x30(%rsp), %rdi
jmp 0x35cf
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x35e4
movq 0x10(%rsp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2260