// File: /workspace/github_cpp_makefile_star2_O2/alex-courtis[P]xlayoutdisplay/main.cpp
// Function: main
int main(int argc, char **argv) {
    try {
        Settings settings;
        try {
            // file options
            ifstream ifs(resolveEnvPath("XDG_CONFIG_HOME", ".xlayoutdisplay"));
            if (!ifs)
                ifs = ifstream(resolveEnvPath("HOME", ".xlayoutdisplay"));
            if (!ifs)
                ifs = ifstream("/etc/xlayoutdisplay");
            if (ifs) {
                parseCfgFile(ifs, settings);
            }

            // command line options override
            parseArgs(argc, argv, settings);

        } catch (invalid_argument &e) {
            cerr << argv[0] << ": " << e.what() << endl << endl;
            usage(cerr);
            return EXIT_FAILURE;
        }

        // execute
        return WEXITSTATUS(layout(settings));
    } catch (const exception &e) {
        cerr << argv[0] << ": " << e.what() << ", exiting\n";
        return EXIT_FAILURE;
    } catch (...) {
        cerr << argv[0] << ": unknown exception, exiting\n";
        return EXIT_FAILURE;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rax
movups %xmm0, -0x28(%rax)
andq $0x0, -0x18(%rax)
movaps %xmm0, -0x40(%rax)
andl $0x0, -0x31(%rax)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %rbx
movl %edi, %ebp
xorl %ecx, %ecx
movb %cl, (%rax)
movb %cl, 0x10(%rax)
andq $0x0, 0x18(%rax)
leaq 0xdb65(%rip), %rsi      # 0x18da5
leaq 0xdb6e(%rip), %rdx      # 0x18db5
leaq 0x88(%rsp), %rdi
callq 0xb684
leaq 0x290(%rsp), %rdi
leaq 0x88(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x6660
leaq 0x88(%rsp), %rdi
callq 0x61b0
movq 0x290(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x2b0(%rsp,%rax), %eax
testb $0x5, %al
je 0xb34a
leaq 0xdb15(%rip), %rsi      # 0x18db0
leaq 0xdb13(%rip), %rdx      # 0x18db5
movq %rsp, %rdi
callq 0xb684
leaq 0x88(%rsp), %rdi
movq %rsp, %rsi
pushq $0x8
popq %rdx
callq 0x6660
leaq 0x290(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6670
leaq 0x88(%rsp), %rdi
callq 0x60e0
movq %rsp, %rdi
callq 0x61b0
movq 0x290(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x2b0(%rsp,%rax), %eax
testb $0x5, %al
je 0xb34a
leaq 0xdac0(%rip), %rsi      # 0x18dc5
leaq 0x88(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x6750
leaq 0x290(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6670
leaq 0x88(%rsp), %rdi
callq 0x60e0
movq 0x290(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x2b0(%rsp,%rax), %eax
testb $0x5, %al
jne 0xb360
leaq 0x290(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xa7f4
leaq 0x20(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0xaf80
leaq 0x290(%rsp), %rdi
callq 0x60e0
leaq 0x20(%rsp), %rdi
callq 0x8fd4
movzbl %ah, %ebx
leaq 0x20(%rsp), %rdi
callq 0xb6e0
movl %ebx, %eax
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x60e0
jmp 0xb40f
jmp 0xb409
movq %rdx, %r14
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x60e0
jmp 0xb3d5
movq %rdx, %r14
movq %rax, %r15
movq %rsp, %rdi
callq 0x61b0
jmp 0xb40f
jmp 0xb409
movq %rdx, %r14
movq %rax, %r15
jmp 0xb49b
movq %rdx, %r14
movq %rax, %r15
leaq 0x88(%rsp), %rdi
callq 0x61b0
jmp 0xb41c
movq %rdx, %r14
movq %rax, %r15
jmp 0xb41c
movq %rdx, %r14
movq %rax, %r15
leaq 0x290(%rsp), %rdi
callq 0x60e0
cmpl $0x3, %r14d
jne 0xb49b
movq %r15, %rdi
callq 0x6160
movq %rax, %r14
movq (%rbx), %rsi
movq 0x1aba9(%rip), %rdi     # 0x25fe0
callq 0x6370
leaq 0xd3bb(%rip), %rsi      # 0x187fe
movq %rax, %rdi
callq 0x6370
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x6370
movq %rax, %rdi
callq 0x61d0
movq %rax, %rdi
callq 0x61d0
movq 0x1ab67(%rip), %rdi     # 0x25fe0
callq 0xa7e8
callq 0x6690
pushq $0x1
popq %rbx
jmp 0xb389
jmp 0xb3e1
movq %rdx, %r14
movq %rax, %r15
callq 0x6690
leaq 0x20(%rsp), %rdi
callq 0xb6e0
movq %r15, %rdi
callq 0x6160
movq (%rbx), %rsi
cmpl $0x2, %r14d
jne 0xb4fc
movq %rax, %r15
movq 0x1ab20(%rip), %rdi     # 0x25fe0
callq 0x6370
leaq 0xd332(%rip), %rsi      # 0x187fe
movq %rax, %rdi
callq 0x6370
movq %rax, %rbx
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6370
leaq 0xd8fa(%rip), %rsi      # 0x18dec
movq %rax, %rdi
callq 0x6370
jmp 0xb517
movq 0x1aadd(%rip), %rdi     # 0x25fe0
callq 0x6370
leaq 0xd8ca(%rip), %rsi      # 0x18dd9
movq %rax, %rdi
callq 0x6370
callq 0x6690
pushq $0x1
popq %rbx
jmp 0xb393
movq %rax, %rbx
callq 0x6690
jmp 0xb536
movq %rax, %rbx
callq 0x6690
movq %rbx, %rdi
callq 0x6710
movq %rax, %rdi
callq 0x82ce