// File: demon386[P]git-store/./libs/program_options/src/options_description.cpp
// Function: boost::program_options::option_description::match(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, bool) const
option_description::match_result
    option_description::match(const std::string& option, 
                              bool approx, 
                              bool long_ignore_case,
                              bool short_ignore_case) const
    {
        match_result result = no_match;        
        
        std::string local_long_name((long_ignore_case ? tolower_(m_long_name) : m_long_name));
        
        if (!local_long_name.empty()) {
        
            std::string local_option = (long_ignore_case ? tolower_(option) : option);

            if (*local_long_name.rbegin() == '*')
            {
                // The name ends with '*'. Any specified name with the given
                // prefix is OK.
                if (local_option.find(local_long_name.substr(0, local_long_name.length()-1))
                    == 0)
                    result = approximate_match;
            }

            if (local_long_name == local_option)
            {
                result = full_match;
            }
            else if (approx)
            {
                if (local_long_name.find(local_option) == 0)
                {
                    result = approximate_match;
                }
            }
        }
         
        if (result != full_match)
        {
            std::string local_option(short_ignore_case ? tolower_(option) : option);
            std::string local_short_name(short_ignore_case ? tolower_(m_short_name) : m_short_name);

            if (local_short_name == local_option)
            {
                result = full_match;
            }
        }

        return result;        
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %dl
movb %dl, -0x11(%rbp)
andb $0x1, %cl
movb %cl, -0x12(%rbp)
andb $0x1, %al
movb %al, -0x13(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x0, -0x18(%rbp)
testb $0x1, -0x12(%rbp)
je 0x242b5
movq -0xd8(%rbp), %rsi
addq $0x28, %rsi
leaq -0x38(%rbp), %rdi
callq 0x24520
jmp 0x242c9
movq -0xd8(%rbp), %rsi
addq $0x28, %rsi
leaq -0x38(%rbp), %rdi
callq 0xd230
leaq -0x38(%rbp), %rdi
callq 0xdab0
testb $0x1, %al
jne 0x24424
testb $0x1, -0x12(%rbp)
je 0x242f1
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x24520
jmp 0x242ef
jmp 0x24302
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0xd230
jmp 0x24300
jmp 0x24302
leaq -0x70(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
leaq -0x38(%rbp), %rsi
callq 0xdb10
movq -0xe8(%rbp), %rdi
callq 0x1e870
movq %rax, -0xe0(%rbp)
jmp 0x2432b
movq -0xe0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x243d7
leaq -0x38(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0xd9b0
movq -0xf0(%rbp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x90(%rbp), %rdi
callq 0xd650
jmp 0x2436d
leaq -0x58(%rbp), %rdi
leaq -0x90(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xdc70
movq %rax, -0xf8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xdca8
movq -0xf8(%rbp), %rax
cmpq $0x0, %rax
jne 0x243d5
movl $0x2, -0x18(%rbp)
jmp 0x243d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2450d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xdca8
jmp 0x2450d
jmp 0x243d7
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x26720
testb $0x1, %al
jne 0x243ea
jmp 0x243f3
movl $0x1, -0x18(%rbp)
jmp 0x2441b
testb $0x1, -0x11(%rbp)
je 0x24419
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xdc70
cmpq $0x0, %rax
jne 0x24417
movl $0x2, -0x18(%rbp)
jmp 0x24419
jmp 0x2441b
leaq -0x58(%rbp), %rdi
callq 0xdca8
cmpl $0x1, -0x18(%rbp)
je 0x244ec
testb $0x1, -0x13(%rbp)
je 0x24448
movq -0x10(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x24520
jmp 0x24446
jmp 0x2445c
movq -0x10(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0xd230
jmp 0x2445a
jmp 0x2445c
testb $0x1, -0x13(%rbp)
je 0x2447d
movq -0xd8(%rbp), %rsi
addq $0x8, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x24520
jmp 0x2447b
jmp 0x24498
movq -0xd8(%rbp), %rsi
addq $0x8, %rsi
leaq -0xd0(%rbp), %rdi
callq 0xd230
jmp 0x24496
jmp 0x24498
leaq -0xd0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x26720
testb $0x1, %al
jne 0x244b1
jmp 0x244d4
movl $0x1, -0x18(%rbp)
jmp 0x244d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xdca8
jmp 0x2450d
leaq -0xd0(%rbp), %rdi
callq 0xdca8
leaq -0xb0(%rbp), %rdi
callq 0xdca8
movl -0x18(%rbp), %eax
movl %eax, -0xfc(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xdca8
movl -0xfc(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0xdca8
movq -0x60(%rbp), %rdi
callq 0xdb30
nop