// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x60(%rsp), %r12
movq %rdi, %r14
movq %rsi, %rbx
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 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x2440
leaq 0x50(%rsp), %r15
leaq 0x1a0d(%rip), %rsi      # 0x6591
movl $0x1, %ecx
xorl %edx, %edx
movq %r15, %rdi
callq 0x23f0
movq 0x8(%r15), %rcx
leaq 0x1(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x2270
movq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2370
movl %eax, (%rbx)
movl %eax, %edi
callq 0x2030
leaq 0x20(%rsp), %r13
movq %rax, %rbx
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 0x10(%rsp), %r14
leaq 0x198a(%rip), %rsi      # 0x6591
movl $0x1, %ecx
xorl %edx, %edx
movq %r14, %rdi
callq 0x23f0
movq 0x8(%r14), %rcx
leaq 0x1(%rax), %rdx
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x2270
leaq 0x90(%rsp), %rdi
leaq 0x70(%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 0x4c99
movb 0xc(%rsp), %al
movb %al, (%rbp)
movq %r14, %rdi
callq 0x20f0
cmpl $0x2c, %eax
je 0x4c8c
movq %r14, %rdi
callq 0x20f0
cmpl $0x20, %eax
jne 0x4c94
movq %r14, %rdi
callq 0x2430
incq %rbp
jmp 0x4c52
movq 0x4310(%rip), %rsi      # 0x8fb0
leaq 0x90(%rsp), %rdi
callq 0x21a0
leaq 0x110(%rsp), %rdi
callq 0x20e0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4cd0
callq 0x2210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4cdf
callq 0x2210
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4cf2
callq 0x2210
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d01
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 0x4d52
jmp 0x4d24
movq %rax, %rbx
jmp 0x4d7c
jmp 0x4d29
movq %rax, %rbx
jmp 0x4d68
movq %rax, %rbx
jmp 0x4d8e
movq 0x427b(%rip), %rsi      # 0x8fb0
leaq 0x90(%rsp), %rdi
movq %rax, %rbx
callq 0x21a0
leaq 0x110(%rsp), %rdi
callq 0x20e0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d68
callq 0x2210
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4d77
callq 0x2210
movq 0x30(%rsp), %r15
leaq 0x40(%rsp), %rax
cmpq %rax, %r15
je 0x4d8e
movq %r15, %rdi
callq 0x2210
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x4d9d
callq 0x2210
movq %rbx, %rdi
callq 0x2400