// File: cybozu[P]yrmcds/src/main.cpp
// Function: (anonymous namespace)::load_config(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
bool load_config(const std::vector<std::string>& args) {
    auto it = std::find(args.begin(), args.end(), "-f");
    using yrmcds::g_config;
    if( it != args.end() ) {
        ++it;
        if( it == args.end() ) {
            std::cerr << "missing filename after -f" << std::endl;
            return false;
        }
        g_config.load(*it);
    } else {
        std::string config_path = EXPAND_AND_QUOTE(DEFAULT_CONFIG);
        struct stat st;
        if( cybozu::get_stat(config_path, st) )
            g_config.load( config_path );
    }
    if( g_config.secure_erase() &&
        (g_config.max_data_size() > g_config.heap_data_limit()) ) {
        std::cerr << "WARNING: " << std::endl
                  << "   \"secure_erase\" is enabled but your data may be written out to disk."
                  << std::endl
                  << "   Consider setting \"max_data_size\" equal to \"heap_data_limit\"."
                  << std::endl;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xae60
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xae90
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
leaq 0x702bf(%rip), %rdx     # 0x7a137
callq 0xae10
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xae90
movq %rax, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xaec0
testb $0x1, %al
jne 0x9ea1
jmp 0x9f12
leaq -0x18(%rbp), %rdi
callq 0xaf00
movq -0x10(%rbp), %rdi
callq 0xae90
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xaf20
testb $0x1, %al
jne 0x9eca
jmp 0x9ef5
movq 0xa5117(%rip), %rdi     # 0xaefe8
leaq 0x70248(%rip), %rsi     # 0x7a120
callq 0x8630
movq %rax, %rdi
movq 0xa5071(%rip), %rsi     # 0xaef58
callq 0x8680
movb $0x0, -0x1(%rbp)
jmp 0xa05e
leaq -0x18(%rbp), %rdi
callq 0xaf60
movq %rax, %rsi
leaq 0xa5df8(%rip), %rdi     # 0xafd00
callq 0x18010
jmp 0x9fb9
leaq -0x59(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x8bd0
movq -0x108(%rbp), %rdx
leaq 0x7020a(%rip), %rsi     # 0x7a13a
leaq -0x58(%rbp), %rdi
callq 0xa160
jmp 0x9f3b
leaq -0x59(%rbp), %rdi
callq 0x86a0
leaq -0x58(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xdd30
movb %al, -0x109(%rbp)
jmp 0x9f5c
movb -0x109(%rbp), %al
testb $0x1, %al
jne 0x9f68
jmp 0x9fb0
leaq 0xa5d91(%rip), %rdi     # 0xafd00
leaq -0x58(%rbp), %rsi
callq 0x18010
jmp 0x9f7a
jmp 0x9fb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x86a0
jmp 0xa06c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x83f0
jmp 0xa06c
leaq -0x58(%rbp), %rdi
callq 0x83f0
leaq 0xa5d40(%rip), %rdi     # 0xafd00
callq 0xaf80
testb $0x1, %al
jne 0x9fce
jmp 0xa05a
leaq 0xa5d2b(%rip), %rdi     # 0xafd00
callq 0xafa0
movq %rax, -0x118(%rbp)
leaq 0xa5d18(%rip), %rdi     # 0xafd00
callq 0xafc0
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
jbe 0xa05a
movq 0xa4fe5(%rip), %rdi     # 0xaefe8
leaq 0x7014b(%rip), %rsi     # 0x7a155
callq 0x8630
movq %rax, %rdi
movq 0xa4f3f(%rip), %rsi     # 0xaef58
callq 0x8680
movq %rax, %rdi
leaq 0x70137(%rip), %rsi     # 0x7a15f
callq 0x8630
movq %rax, %rdi
movq 0xa4f21(%rip), %rsi     # 0xaef58
callq 0x8680
movq %rax, %rdi
leaq 0x70160(%rip), %rsi     # 0x7a1a6
callq 0x8630
movq %rax, %rdi
movq 0xa4f03(%rip), %rsi     # 0xaef58
callq 0x8680
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x8bc0
nopw %cs:(%rax,%rax)