// File: /workspace/github_cpp_makefile_star2_O1/jBlinden[P]private-codis/protocol.cpp
// Function: ReadInConfigFile(std::basic_ifstream<char, std::char_traits<char>>&, unsigned int&)
uint8_t* ReadInConfigFile(ifstream& in, uint32_t &C){
  string line1;
  getline(in, line1);
  string strC = line1.substr(line1.find("=") + 1, line1.length());
  C = atoi(strC.c_str());
  
  uint8_t *out_bits_per_component = new uint8_t[C];

  string line2;
  getline(in, line2);
  string strBits = line2.substr(line2.find("=") + 1, line2.length());
  stringstream ss(strBits);

  int index = 0;
  for (int i; ss >> i;) {
    out_bits_per_component[index] = i;
    index++;
    if (ss.peek() == ',' || ss.peek() == ' ')
      ss.ignore();
    }

  return out_bits_per_component;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%rdi), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2230
movsbl %al, %edx
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2440
leaq 0x18da(%rip), %rsi      # 0x6321
leaq 0x30(%rsp), %r15
movl $0x1, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x23f0
leaq 0x1(%rax), %rdx
movq 0x8(%r15), %rcx
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2270
movq 0x70(%rsp), %rdi
callq 0x2370
movl %eax, (%rbx)
movl %eax, %edi
callq 0x2030
movq %rax, %rbx
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2230
movsbl %al, %edx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2440
leaq 0x185a(%rip), %rsi      # 0x6321
leaq 0x10(%rsp), %r14
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x23f0
leaq 0x1(%rax), %rdx
movq 0x8(%r14), %rcx
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x2270
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl $0x18, %edx
callq 0x2390
leaq 0x90(%rsp), %r14
leaq 0xc(%rsp), %r15
movq %rbx, %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4b5e
movb 0xc(%rsp), %al
movb %al, (%rbp)
movq %r14, %rdi
callq 0x20f0
cmpl $0x2c, %eax
je 0x4b51
movq %r14, %rdi
callq 0x20f0
cmpl $0x20, %eax
jne 0x4b59
movq %r14, %rdi
callq 0x2430
incq %rbp
jmp 0x4b17
movq 0x444b(%rip), %rsi      # 0x8fb0
leaq 0x90(%rsp), %rdi
callq 0x21a0
leaq 0x110(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b92
callq 0x2210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ba1
callq 0x2210
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bb7
callq 0x2210
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x4bc6
callq 0x2210
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4c17
jmp 0x4be9
movq %rax, %rbx
jmp 0x4c39
jmp 0x4bee
movq %rax, %rbx
jmp 0x4c2a
movq %rax, %rbx
jmp 0x4c4f
movq %rax, %rbx
movq 0x43b3(%rip), %rsi      # 0x8fb0
leaq 0x90(%rsp), %rdi
callq 0x21a0
leaq 0x110(%rsp), %rdi
callq 0x20e0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c2a
callq 0x2210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c39
callq 0x2210
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c4f
callq 0x2210
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c5e
callq 0x2210
movq %rbx, %rdi
callq 0x2400