// File: /workspace/github_cpp_makefile_star2_O3/gkosae[P]ArduinoNeuralNet/neuralnet.cpp
// Function: NeuralNet::getNeuronInfo(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&)
void NeuralNet::getNeuronInfo(stringstream &ss) {
  ss << "DETAILED INFO\n";

  // print detailed info of all layers starting from the first hidden layer
  unsigned short count  = layers.size();

  for(auto i = 1; i < count; i++) {

    if(i == count - 1) ss << "Output Layer\n";
    else
        ss << "Hidden Layer " << i << '\n';

    unsigned short current_layer_size = layers.at(i).size();
    for(auto j = 0; j < current_layer_size; j++) {
      ss << "Neuron " << j+1 << ": weights ( ";

      for(auto weight : layers.at(i).neurons.at(j).weights) {
        ss << weight << " ";
      }

      ss << ") , threshold ( " << layers.at(i).neurons.at(j).threshold << " )\n";
    }

    ss << '\n';
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r15
addq $0x10, %rbx
leaq 0x2f40(%rip), %rsi      # 0x7229
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2190
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movzwl %ax, %ecx
movq %rcx, 0x10(%rsp)
cmpl $0x2, %ecx
jb 0x4561
movq 0x10(%rsp), %rcx
decl %ecx
movq %rcx, 0x10(%rsp)
movzwl %ax, %eax
movq %rax, 0x18(%rsp)
movl $0x1, %r12d
movq %r15, 0x20(%rsp)
cmpq 0x10(%rsp), %r12
jne 0x4358
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x2ee2(%rip), %rsi      # 0x7238
jmp 0x4389
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x2edf(%rip), %rsi      # 0x7246
callq 0x2190
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2250
movb $0xa, 0xe(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0xe(%rsp), %rsi
callq 0x2190
movq 0x18(%r15), %rax
movq 0x20(%r15), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x4570
leaq (%r12,%r12,2), %r14
shlq $0x4, %r14
movl 0x20(%rax,%r14), %ecx
subl 0x18(%rax,%r14), %ecx
shrl $0x6, %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
je 0x453c
movl %ecx, %eax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
movq %r12, 0x38(%rsp)
movq %r14, 0x30(%rsp)
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x2f84(%rip), %rsi      # 0x737b
callq 0x2190
leaq 0x1(%rbp), %r13
movq %rbx, %rdi
movl %r13d, %esi
callq 0x2250
movl $0xc, %edx
movq %rax, %rdi
leaq 0x2e3a(%rip), %rsi      # 0x7254
callq 0x2190
movq 0x18(%r15), %rax
movq 0x20(%r15), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x4570
movq 0x18(%rax,%r14), %rcx
movq 0x20(%rax,%r14), %rdx
subq %rcx, %rdx
sarq $0x6, %rdx
cmpq %rbp, %rdx
jbe 0x457c
movq %r13, 0x40(%rsp)
movq %rbp, %r13
shlq $0x6, %r13
movq 0x20(%rcx,%r13), %r15
movq 0x28(%rcx,%r13), %r12
cmpq %r12, %r15
leaq 0x2df1(%rip), %r14      # 0x7270
je 0x44a7
movsd (%r15), %xmm0
movq %rbx, %rdi
callq 0x2200
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2190
addq $0x8, %r15
cmpq %r12, %r15
jne 0x4481
movl $0x10, %edx
movq %rbx, %rdi
leaq 0x2dab(%rip), %rsi      # 0x7261
callq 0x2190
movq 0x20(%rsp), %r15
movq 0x18(%r15), %rax
movq 0x20(%r15), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq 0x38(%rsp), %r12
cmpq %r12, %rdx
jbe 0x4570
movq 0x30(%rsp), %r14
movq 0x18(%rax,%r14), %rcx
movq 0x20(%rax,%r14), %rdx
subq %rcx, %rdx
sarq $0x6, %rdx
cmpq %rbp, %rdx
jbe 0x457c
movsd 0x18(%rcx,%r13), %xmm0
movq %rbx, %rdi
callq 0x2200
movl $0x3, %edx
movq %rax, %rdi
leaq 0x2d4e(%rip), %rsi      # 0x7272
callq 0x2190
movq 0x40(%rsp), %rax
movq %rax, %rbp
cmpq 0x28(%rsp), %rax
jne 0x43e8
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xf(%rsp), %rsi
callq 0x2190
incq %r12
cmpq 0x18(%rsp), %r12
jne 0x4340
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b6c(%rip), %rdi      # 0x70e3
movq %r12, %rsi
jmp 0x4586
leaq 0x2b60(%rip), %rdi      # 0x70e3
movq %rbp, %rsi
xorl %eax, %eax
callq 0x21d0
nop