// File: /workspace/github_cpp_makefile_star2_O3/CoinXu[P]reviser-compiler/src/command_line_interface.cpp
// Function: reviser::CommandLineInterface::ParseArgument(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
bool CommandLineInterface::ParseArgument(const char* arg, string* name, string* value) {
    bool parsed_value = false;

    if (arg[0] != '-') {
      name->clear();
      parsed_value = false;
      *value = arg;
      return false;
    } else if (arg[1] == '-') {
      const char* equals_post = strchr(arg, '=');
      if (equals_post != NULL) {
        *name = string(arg, equals_post - arg);
        *value = equals_post + 1;
        parsed_value = true;
      } else {
        *name = arg;
      }
    } else {
      if (arg[1] == '\0') {
        name->clear();
        *value = arg;
        parsed_value = true;
      } else {
        *name = string(arg, 2);
        *value = arg + 2;
        parsed_value = !value->empty();
      }
    }

    if (parsed_value) {
      return false;
    }

    // these are only flags that don't take a value
    if (*name == "-h" || *name == "--help" || *name == "--version") {
      return false;
    }

    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
cmpb $0x2d, (%rsi)
jne 0x28924
movzbl 0x1(%r15), %eax
testl %eax, %eax
je 0x28924
cmpl $0x2d, %eax
jne 0x28966
movq %r15, %rdi
movl $0x3d, %esi
callq 0x24130
testq %rax, %rax
je 0x289d0
movq %rax, %r13
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x29178
movq %r14, %rdi
movq %r12, %rsi
callq 0x24420
movq (%r12), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x28905
callq 0x24320
incq %r13
movq 0x8(%rbx), %r14
movq %r13, %rdi
callq 0x24180
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r13, %rcx
jmp 0x2894c
movq $0x0, 0x8(%r14)
movq (%r14), %rax
movb $0x0, (%rax)
movq 0x8(%rbx), %r14
movq %r15, %rdi
callq 0x24180
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x24530
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movzwl (%r15), %eax
addq $0x2, %r15
movw %ax, (%r13)
movq $0x2, -0x8(%r13)
movb $0x0, 0x2(%r13)
leaq -0x48(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x24420
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x289a5
callq 0x24320
movq 0x8(%rbx), %r13
movq %r15, %rdi
callq 0x24180
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x24530
cmpq $0x0, 0x8(%rbx)
jne 0x28954
jmp 0x289ef
movq 0x8(%r14), %rbx
movq %r15, %rdi
callq 0x24180
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x24530
leaq 0x26681(%rip), %rsi     # 0x4f077
movq %r14, %rdi
callq 0x240e0
testl %eax, %eax
je 0x28a2f
leaq 0x26671(%rip), %rsi     # 0x4f07a
movq %r14, %rdi
callq 0x240e0
testl %eax, %eax
je 0x28a2f
leaq 0x26665(%rip), %rsi     # 0x4f081
movq %r14, %rdi
callq 0x240e0
testl %eax, %eax
setne %r12b
jmp 0x28954
xorl %r12d, %r12d
jmp 0x28954
nop