// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x62, %r8d
jle 0xf29e
addl $-0x63, %r8d
cmpl $0x11, %r8d
ja 0xf6db
leaq 0x7878(%rip), %rax      # 0x16af0
movslq (%rax,%r8,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x14d18(%rip), %rax     # 0x23fa0
movq (%rax), %r15
movq 0xa0(%r14), %r12
addq $0x98, %r14
jmp 0xf487
cmpl $0x3f, %r8d
je 0xf53d
cmpl $0x4d, %r8d
je 0xf599
cmpl $0x53, %r8d
jne 0xf6db
callq 0x4060
movq %rax, %r15
movl $0x0, (%rax)
movq 0x14ccf(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4580
movq %rax, 0x48(%r14)
cmpq $-0x1, %rax
je 0xf601
movq $-0x10001, %rcx         # imm = 0xFFFEFFFF
addq %rcx, %rax
cmpq %rcx, %rax
jbe 0xf633
jmp 0xf6db
callq 0x4060
movq %rax, %r15
movl $0x0, (%rax)
movq 0x14c85(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4580
movq %rax, 0x40(%r14)
cmpq $-0x1, %rax
jne 0xf6db
cmpl $0x22, (%r15)
jne 0xf6db
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x786f(%rip), %rsi      # 0x16bc1
leaq 0x7882(%rip), %rdx      # 0x16bdb
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
movq 0x14c28(%rip), %rax     # 0x23fa0
movq (%rax), %r15
movq 0x80(%r14), %r12
addq $0x78, %r14
jmp 0xf487
movq 0x14c26(%rip), %rdi     # 0x23fb8
leaq 0x7a3e(%rip), %rsi      # 0x16dd7
movl $0xc22, %edx            # imm = 0xC22
callq 0x4500
jmp 0xf6db
callq 0x4060
movq %rax, %r15
movl $0x0, (%rax)
movq 0x14be3(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4580
movq %rax, 0x38(%r14)
cmpq $-0x1, %rax
jne 0xf6db
cmpl $0x22, (%r15)
jne 0xf6db
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x77b0(%rip), %rsi      # 0x16ba4
leaq 0x77c5(%rip), %rdx      # 0x16bc0
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
movq 0x14b86(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
cmpb $0x6f, (%rdi)
jne 0xf432
cmpb $0x73, 0x1(%rdi)
jne 0xf432
cmpb $0x0, 0x2(%rdi)
je 0xf6d3
leaq 0x9c03(%rip), %rsi      # 0x1903c
callq 0x4590
testl %eax, %eax
je 0xf6c9
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x77d5(%rip), %rsi      # 0x16c2b
leaq 0x77f3(%rip), %rdx      # 0x16c50
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
movq 0x14b24(%rip), %rax     # 0x23fa0
movq (%rax), %r15
movq 0x60(%r14), %r12
addq $0x58, %r14
movq %r15, %rdi
callq 0x4200
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x4640
jmp 0xf6db
movb $0x1, 0xb8(%r14)
jmp 0xf6db
callq 0x4060
movq %rax, %r15
movl $0x0, (%rax)
movq 0x14ad7(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x45a0
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 0xf6db
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x767f(%rip), %rsi      # 0x16b94
leaq 0x7687(%rip), %rdx      # 0x16ba3
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
incl 0x28(%r14)
jmp 0xf6db
movq 0x14a7c(%rip), %rax     # 0x23fc0
movslq (%rax), %rax
movq -0x8(%rcx,%rax,8), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x27(%rsp), %rdx
callq 0xfd7e
leaq 0x76ef(%rip), %rsi      # 0x16c51
leaq 0x28(%rsp), %rdi
callq 0x4760
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf66d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf674
callq 0x4060
movq %rax, %r15
movl $0x0, (%rax)
movq 0x149f2(%rip), %rax     # 0x23fa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4580
movq %rax, 0x50(%r14)
cmpq $-0x1, %rax
jne 0xf6db
cmpl $0x22, (%r15)
jne 0xf6db
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x762a(%rip), %rsi      # 0x16c0f
leaq 0x763e(%rip), %rdx      # 0x16c2a
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
cmpl $0x22, (%r15)
jne 0xf633
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x75c5(%rip), %rsi      # 0x16bdc
leaq 0x75ce(%rip), %rdx      # 0x16bec
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
jmp 0xf65d
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x75aa(%rip), %rsi      # 0x16bed
leaq 0x75c4(%rip), %rdx      # 0x16c0e
movq %rsp, %rdi
callq 0x7618
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xddfa
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xf6e3
movq 0x10(%rsp), %rsi
jmp 0xf6bf
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0xddfa
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xf6ac
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x44b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf6e3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x44b0
jmp 0xf6e3
movl $0x0, 0x4(%r14)
jmp 0xf6db
movl $0x1, 0x4(%r14)
movq %rbx, %rdi
callq 0xdce4
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xf70a
jmp 0xf70a
jmp 0xf75a
jmp 0xf75a
jmp 0xf70a
jmp 0xf70a
jmp 0xf75a
jmp 0xf75a
jmp 0xf70a
jmp 0xf75a
jmp 0xf70a
jmp 0xf75a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xf75d
movq 0x10(%rsp), %rsi
jmp 0xf750
jmp 0xf75a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xf73d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x44b0
jmp 0xf73d
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf75d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x44b0
jmp 0xf75d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x46f0
nop