// File: /workspace/github_cpp_makefile_star2_O2/ian-howell[P]configparser/src/config_parser.cpp
// Function: Config::read_configuration(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Config::read_configuration(const std::string& line, const std::string& header)
{
    if (header == "")
    {
        std::string error = "No section provided for: `" + line + "`";
        throw std::runtime_error(error);
    }

    if (line.find('=') == std::string::npos)
    {
        std::string error = "Invalid configuration: `" + line + "`";
        throw std::runtime_error(error);
    }

    std::istringstream iss(line);
    std::string key;
    std::string val;
    std::getline(iss, key, '=');

    if (key.size()== 0)
    {
        std::string error = "No key found in configuration: `" + line + "`";
        throw std::runtime_error(error);
    }

    std::getline(iss, val);

    sections[header][trim_copy(key)] = trim_copy(val);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1880(%rip), %rsi      # 0x4030
movq %rdx, %rdi
callq 0x3057
testb %al, %al
jne 0x2912
pushq $0x3d
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x2210
cmpq $-0x1, %rax
je 0x2980
leaq 0xc8(%rsp), %r12
pushq $0x8
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x22c0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
leaq 0x8(%rsp), %rsi
pushq $0x3d
popq %rdx
movq %r12, %rdi
callq 0x2300
cmpq $0x0, 0x10(%rsp)
je 0x29eb
leaq 0xc8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2070
leaq 0xa8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2220
leaq 0x48(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
movq %rbx, %rsi
callq 0x2c76
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3064
movq %rax, %r14
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2220
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rdx
movq %rbx, %rsi
callq 0x2c76
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x30ca
leaq 0x48(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21f0
leaq 0x28(%rsp), %rdi
callq 0x2100
leaq 0x88(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2100
leaq 0xa8(%rsp), %rdi
callq 0x2100
leaq 0x68(%rsp), %rdi
callq 0x2100
leaq 0x8(%rsp), %rdi
callq 0x2100
leaq 0xc8(%rsp), %rdi
callq 0x2110
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1739(%rip), %rsi      # 0x4052
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x2f82
leaq 0x1754(%rip), %rdx      # 0x4084
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f63
leaq 0x8(%rsp), %rdi
callq 0x2100
pushq $0x10
popq %rdi
callq 0x2120
movq %rax, %r14
leaq 0xc8(%rsp), %rsi
movq %rax, %rdi
callq 0x22a0
movq 0x4684(%rip), %rsi      # 0x6ff0
movq 0x4645(%rip), %rdx      # 0x6fb8
movq %r14, %rdi
callq 0x22d0
jmp 0x2a4d
leaq 0x16e6(%rip), %rsi      # 0x406d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x2f82
leaq 0x16e6(%rip), %rdx      # 0x4084
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2f63
leaq 0x8(%rsp), %rdi
callq 0x2100
pushq $0x10
popq %rdi
callq 0x2120
movq %rax, %r14
leaq 0xc8(%rsp), %rsi
movq %rax, %rdi
callq 0x22a0
movq 0x4616(%rip), %rsi      # 0x6ff0
movq 0x45d7(%rip), %rdx      # 0x6fb8
movq %r14, %rdi
callq 0x22d0
jmp 0x2a4d
leaq 0x1694(%rip), %rsi      # 0x4086
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x2f82
leaq 0x167e(%rip), %rdx      # 0x4084
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2f63
leaq 0x28(%rsp), %rdi
callq 0x2100
pushq $0x10
popq %rdi
callq 0x2120
movq %rax, %r14
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x22a0
movq 0x45b2(%rip), %rsi      # 0x6ff0
movq 0x4573(%rip), %rdx      # 0x6fb8
movq %r14, %rdi
callq 0x22d0
movq %rax, %rbx
jmp 0x2a5d
movq %rax, %rbx
movq %r14, %rdi
callq 0x2150
leaq 0x48(%rsp), %rdi
jmp 0x2adc
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x2adc
jmp 0x2a72
jmp 0x2a77
movq %rax, %rbx
jmp 0x2a82
movq %rax, %rbx
movq %r14, %rdi
callq 0x2150
leaq 0xc8(%rsp), %rdi
jmp 0x2a98
jmp 0x2ae5
jmp 0x2a90
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2100
jmp 0x2b09
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2100
jmp 0x2ab1
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2100
jmp 0x2ac5
jmp 0x2ac2
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2100
jmp 0x2ad4
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2100
jmp 0x2ae8
jmp 0x2ae5
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2100
leaq 0x8(%rsp), %rdi
callq 0x2100
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x22e0
nop