// File: /workspace/github_cpp_makefile_star2_O2/trapexit[P]bbf/src/options.cpp
// Function: Options::process_arg(int, char const* const*, int)
AppError
Options::process_arg(const int          argc,
                     const char * const argv[],
                     const int          opt)
{
  switch(opt)
    {
    case 'f':
      force = true;
      break;
    case 'q':
      quiet++;
      break;
    case 'r':
      errno = 0;
      retries = ::strtol(optarg,NULL,BASE10);
      if(((errno == ERANGE) && (retries == LONG_MAX)) || (retries < 1))
        return AppError::argument_invalid("retries invalid");
      break;
    case 's':
      errno = 0;
      start_block = ::strtoull(optarg,NULL,BASE10);
      if((start_block == ULLONG_MAX) && (errno == ERANGE))
        return AppError::argument_invalid("start block value is invalid");
      break;
    case 'e':
      errno = 0;
      end_block = ::strtoull(optarg,NULL,BASE10);
      if((end_block == ULLONG_MAX) && (errno == ERANGE))
        return AppError::argument_invalid("end block value is invalid");
      break;
    case 'S':
      errno = 0;
      stepping = ::strtoull(optarg,NULL,BASE10);
      if((stepping == ULLONG_MAX) && (errno == ERANGE))
        return AppError::argument_invalid("invalid stepping");
      if((stepping > 65536) || (stepping < 1))
        return AppError::argument_invalid("stepping must be >= 1 && <= 65536");
      break;
    case 'M':
      errno = 0;
      max_errors = ::strtoull(optarg,NULL,BASE10);
      if((max_errors == ULLONG_MAX) && (errno == ERANGE))
        return AppError::argument_invalid("max errors value is invalid");
      break;
    case 'o':
      output_file = optarg;
      break;
    case 'i':
      input_file = optarg;
      break;
    case 'c':
      captcha = optarg;
      break;
    case 't':
      if(!strcmp(optarg,"os"))
        rwtype = OS;
      else if(!strcmp(optarg,"ata"))
        rwtype = ATA;
      else
        return AppError::argument_invalid("valid rwtype values are 'os' or 'ata'");
      break;
    case 'h':
      usage(std::cout);
      return AppError::success();
    case '?':
      return AppError::argument_invalid(std::string(argv[optind-1]) + " is unknown");
    }

  return AppError::success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leal -0x63(%r8), %eax
cmpl $0x11, %eax
ja 0xc69e
leaq 0x6491(%rip), %rcx      # 0x12b10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x14919(%rip), %rax     # 0x20fa8
movq (%rax), %rsi
addq $0x98, %r14
jmp 0xc798
cmpl $0x3f, %r8d
je 0xc93b
cmpl $0x4d, %r8d
je 0xc8dc
cmpl $0x53, %r8d
jne 0xc9f6
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
movq 0x148da(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x45a0
movq %rax, 0x48(%r14)
cmpq $-0x1, %rax
je 0xc994
movq $-0x10001, %rcx         # imm = 0xFFFEFFFF
addq %rcx, %rax
cmpq %rcx, %rax
ja 0xc9f6
jmp 0xc9bf
movq 0x148a0(%rip), %rax     # 0x20fa8
movq (%rax), %rsi
addq $0x78, %r14
jmp 0xc798
callq 0xca58
jmp 0xc9f6
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
movq 0x14878(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x45a0
movq %rax, 0x38(%r14)
cmpq $-0x1, %rax
jne 0xc9f6
cmpl $0x22, (%r15)
jne 0xc9f6
leaq 0x6468(%rip), %rsi      # 0x12bc4
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
movb $0x1, 0xb8(%r14)
jmp 0xc9f6
movq 0x14817(%rip), %rax     # 0x20fa8
movq (%rax), %rsi
addq $0x58, %r14
movq %r14, %rdi
callq 0x4790
jmp 0xc9f6
incl 0x28(%r14)
jmp 0xc9f6
movq 0x147f3(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
cmpb $0x6f, (%rdi)
jne 0xc7cd
cmpb $0x73, 0x1(%rdi)
jne 0xc7cd
cmpb $0x0, 0x2(%rdi)
je 0xc9ee
leaq 0x8888(%rip), %rsi      # 0x1505c
callq 0x45c0
testl %eax, %eax
je 0xc98d
leaq 0x6463(%rip), %rsi      # 0x12c4b
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
movq 0x1478d(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x45d0
movq %rax, 0x30(%r14)
cmpl $0x22, (%r15)
sete %cl
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rdx, %rax
sete %dl
andb %cl, %dl
testq %rax, %rax
setle %al
orb %dl, %al
cmpb $0x1, %al
jne 0xc9f6
leaq 0x6358(%rip), %rsi      # 0x12bb4
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
movq 0x14719(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x45a0
movq %rax, 0x40(%r14)
cmpq $-0x1, %rax
jne 0xc9f6
cmpl $0x22, (%r15)
jne 0xc9f6
leaq 0x6326(%rip), %rsi      # 0x12be1
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
movq 0x146ba(%rip), %rax     # 0x20fa8
movq (%rax), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x45a0
movq %rax, 0x50(%r14)
cmpq $-0x1, %rax
jne 0xc9f6
cmpl $0x22, (%r15)
jne 0xc9f6
leaq 0x6315(%rip), %rsi      # 0x12c2f
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
movq 0x1467e(%rip), %rax     # 0x20fc0
movslq (%rax), %rax
movq -0x8(%rcx,%rax,8), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x2f(%rsp), %rdx
callq 0x5cd4
leaq 0x6311(%rip), %rdx      # 0x12c71
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xb1a2
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
leaq 0x8(%rsp), %rdi
callq 0x4200
leaq 0x30(%rsp), %rdi
jmp 0xc9e7
andl $0x0, 0x4(%r14)
jmp 0xc9f6
cmpl $0x22, (%r15)
jne 0xc9bf
leaq 0x625b(%rip), %rsi      # 0x12bfc
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
jmp 0xc9e2
leaq 0x6247(%rip), %rsi      # 0x12c0d
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x5cd4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb778
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0xc9fe
movl $0x1, 0x4(%r14)
movq %rbx, %rdi
callq 0xb6d0
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0xca23
jmp 0xca23
jmp 0xca4d
jmp 0xca4d
jmp 0xca23
jmp 0xca23
jmp 0xca4d
jmp 0xca4d
jmp 0xca23
jmp 0xca4d
jmp 0xca23
jmp 0xca4d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0xca46
jmp 0xca4d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0xca41
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4200
jmp 0xca50
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4730