// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0x18(%rsi), %rdi
movq 0x20(%rsi), %rdx
subq %rdi, %rdx
movl %edx, %ecx
shrl $0x6, %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
je 0x3474
movq (%rsi), %r8
movq 0x8(%rsi), %rax
subq %r8, %rax
sarq $0x3, %rax
movl %ecx, %r9d
sarq $0x6, %rdx
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x35e2
cmpq %rcx, %rdx
jbe 0x35f1
movsd (%r8,%rcx,8), %xmm0
movsd %xmm0, (%rdi)
incq %rcx
addq $0x40, %rdi
cmpq %rcx, %r9
jne 0x344c
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 0x361a
leaq 0x30(%rsi), %r14
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2d80
movq %r14, %rdi
movq %r15, %rsi
callq 0x5380
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x34cf
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 0x35d3
decl %ebx
leaq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movzwl %ax, %r14d
movl $0x1, %r12d
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 %r12, %rdx
jbe 0x35fd
leaq (%rax,%r13), %rdi
addq $-0x30, %rdi
callq 0x2d00
leaq 0x1(%r12), %r15
cmpq %r12, %rbx
je 0x35c3
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 %r15, %rdx
jbe 0x3609
movq %r14, %rbp
leaq (%r12,%r13), %rsi
addq $-0x30, %rsi
addq %r13, %r12
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x2d80
movq %r12, %rdi
movq %r14, %rsi
callq 0x5380
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
movq %rbp, %r14
je 0x35c3
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2180
addq $0x30, %r13
movq %r15, %r12
cmpq %r15, %r14
jne 0x3516
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3afa(%rip), %rdi      # 0x70e3
movq %rax, %rsi
movq %rax, %rdx
jmp 0x3613
leaq 0x3aeb(%rip), %rdi      # 0x70e3
movq %rcx, %rsi
jmp 0x3613
leaq 0x3adf(%rip), %rdi      # 0x70e3
movq %r12, %rsi
jmp 0x3613
leaq 0x3ad3(%rip), %rdi      # 0x70e3
movq %r15, %rsi
xorl %eax, %eax
callq 0x21d0
leaq 0x3ac2(%rip), %rdi      # 0x70e3
movl $0x1, %esi
jmp 0x3613
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x365e
leaq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x364e
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x365e
movq 0x10(%rsp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2260