// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x74a2(%rip), %rsi      # 0xe1d9
callq 0x2190
movq -0x48(%rbp), %rdi
addq $0x18, %rdi
callq 0x82e0
movw %ax, -0x12(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6f2f
movl -0x18(%rbp), %eax
movzwl -0x12(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x6d87
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x7468(%rip), %rsi      # 0xe1e8
callq 0x2190
jmp 0x6db3
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x7460(%rip), %rsi      # 0xe1f6
callq 0x2190
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x22f0
movq %rax, %rdi
movl $0xa, %esi
callq 0x2210
movq -0x48(%rbp), %rdi
addq $0x18, %rdi
movslq -0x18(%rbp), %rsi
callq 0x8280
movq %rax, %rdi
callq 0x8220
movw %ax, -0x1a(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movzwl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6f0f
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x7536(%rip), %rsi      # 0xe32b
callq 0x2190
movq %rax, %rdi
movl -0x20(%rbp), %esi
addl $0x1, %esi
callq 0x22f0
movq %rax, %rdi
leaq 0x73f2(%rip), %rsi      # 0xe204
callq 0x2190
movq -0x48(%rbp), %rdi
addq $0x18, %rdi
movslq -0x18(%rbp), %rsi
callq 0x8280
movq %rax, %rdi
addq $0x18, %rdi
movslq -0x20(%rbp), %rsi
callq 0x8240
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2a10
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2a40
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2a70
testb $0x1, %al
jne 0x6e6d
jmp 0x6eab
leaq -0x30(%rbp), %rdi
callq 0x2ab0
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movsd -0x40(%rbp), %xmm0
callq 0x2350
movq %rax, %rdi
leaq 0x7385(%rip), %rsi      # 0xe220
callq 0x2190
leaq -0x30(%rbp), %rdi
callq 0x2ad0
jmp 0x6e5a
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x7357(%rip), %rsi      # 0xe211
callq 0x2190
movq -0x48(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x18, %rdi
movslq -0x18(%rbp), %rsi
callq 0x8280
movq %rax, %rdi
addq $0x18, %rdi
movslq -0x20(%rbp), %rsi
callq 0x8240
movq -0x50(%rbp), %rdi
movsd 0x18(%rax), %xmm0
callq 0x2350
movq %rax, %rdi
leaq 0x7326(%rip), %rsi      # 0xe222
callq 0x2190
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6dd7
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movl $0xa, %esi
callq 0x2210
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6d54
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)