// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/command_dist_wrapper.c
// Function: parse_dist
static error_t parse_dist(int key, char* arg, struct argp_state* state) {
  struct arg_dist* dist = state->input;
  assert( dist );
  assert( dist->global );
  switch(key)
  {
  case 'k':
   dist_opt_val.k = atoi(arg);
   break;
  case 'p':
  {
#ifdef _OPENMP
    dist_opt_val.p = atoi(arg) ;
#else
     warnx("This version of kssd was built without OpenMP and "
          "thus does not support multi threading. Ignoring -p %d",atoi(arg));
      break;
#endif
  }
   break;
  case 'm':
  {
   double sys_mm = get_sys_mmry();
   double rqst_mm = atoi(arg);
   if ( rqst_mm > sys_mm ){
    warnx("Memory request is larger than system available %f. Ignoring -m %f",sys_mm,rqst_mm);
    dist_opt_val.mmry = sys_mm;
   }
   else
    dist_opt_val.mmry = rqst_mm ;
  }
  break;
  case 'r':
  {
   if(strlen(arg) > PATHLEN) {
        err(errno,"the list path should not longer than %d", PATHLEN);
        exit(EXIT_FAILURE);
      };
   strcpy(dist_opt_val.refpath,arg);
   break;
  }
  case 'l':
  {
   if(strlen(arg) > PATHLEN) {
    err(errno,"the list path should not longer than %d", PATHLEN);
    exit(EXIT_FAILURE);
   };
   strcpy(dist_opt_val.fpath,arg);
   break;
  }
  case 'L':
  {
   struct stat path_stat;
   if( stat(arg,&path_stat) >=0 && S_ISREG(path_stat.st_mode)){
    if(strlen(arg) < PATHLEN )
     strcpy(dist_opt_val.dr_file,arg);
    else
      err(errno,"-L argument path should not longer than %d",PATHLEN);
   }
   else{
    if ( atoi(arg) >= dist_opt_val.k - 2 || atoi(arg) < 0 )
     err(errno,"-L: dimension reduction level should never larger than Kmer length - 2,"
        " which is %d here",dist_opt_val.k - 2 );
    dist_opt_val.dr_level = atoi(arg);
   }
   break;
  }
  case 'n':
  {
   if( atoi(arg) > 7 ) {
    dist_opt_val.kmerocrs = 7;
    warnx("-n argument is larger than Max, it has been set to 7, ignorned -n %d ",atoi(arg));
   }else if( atoi(arg) < 1 ){
    dist_opt_val.kmerocrs = 1;
     warnx("-n argument is smaller than Min, it has been set to 1, ignorned -n %d ",atoi(arg));
   }
   else dist_opt_val.kmerocrs = atoi(arg);
  }
   break;
  case 'Q':
  {
   dist_opt_val.kmerqlty = atoi(arg);
  }
   break;
    case 'o':
  {
      if(strlen(arg) > PATHLEN) {
        err(errno,"the outdir path should not longer than %d", PATHLEN);
        exit(EXIT_FAILURE);
      };
      strcpy(dist_opt_val.outdir,arg);
   break;
    }
  case 'N':
  {
   dist_opt_val.num_neigb = atoi(arg);
   break;
  }
  case 'D':
  {
   dist_opt_val.mut_dist_max = atof(arg);
   break;
  }
  case 'A':
  {
   dist_opt_val.abundance = true;
   break;
  }
  case 'u':
    {
      dist_opt_val.u = true;
      break;
    }
  case 555:
  {
   dist_opt_val.byread = true;
   break;
  }
  case 'P':
  {
   if(strlen(arg) > PATHLEN) {
        err(errno,"the piped command should not longer than %d", PATHLEN);
        exit(EXIT_FAILURE);
      };
      strcpy(dist_opt_val.pipecmd,arg);
      break;
  }
  case 'M':
  {
   dist_opt_val.metric = atoi(arg) ;
   break;
  }
  case 'O':
    {
      dist_opt_val.outfields = atoi(arg) ;
      break;
    }
  case 'f':
  {
   strcpy(dist_opt_val.shared_kmerpath,arg);
   break;
  }
  case 888:
  {
   dist_opt_val.keepco = true;
   break;
  }
  case 999:
  {
   dist_opt_val.stage2 = true;
      break;
  }
  case 333:
    {
      dist_opt_val.correction = atoi(arg) ;
      break;
    }
  case 777:
  {
   dist_opt_val.keep_shared_kmer = true;
   break;
  }
  case ARGP_KEY_ARGS:
    dist_opt_val.num_remaining_args = state->argc - state->next;
        dist_opt_val.remaining_args = state->argv + state->next;
   break;
    case ARGP_KEY_NO_ARGS:
    {
   if(state->argc < 2)
       {
    printf("\v");
    argp_state_help(state,stdout,ARGP_HELP_SHORT_USAGE);
    printf("\v");
       argp_state_help(state,stdout,ARGP_HELP_LONG);
       printf("\v");
    exit(0);
    };
       return EINVAL;
    }
   break;
   default:
  {
#ifdef _OPENMP
  if(dist_opt_val.p == 0)
     dist_opt_val.p = omp_get_num_procs();
#else
  if(dist_opt_val.p == 0)
     dist_opt_val.p = 1;
#endif
    return ARGP_ERR_UNKNOWN;
  }
 }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1049b
jmp 0x104ba
leaq 0xd0cd(%rip), %rdi      # 0x1d56f
leaq 0xd52d(%rip), %rsi      # 0x1d9d6
movl $0x68, %edx
leaq 0xd538(%rip), %rcx      # 0x1d9ed
callq 0x31e0
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x104c6
jmp 0x104e5
leaq 0xd555(%rip), %rdi      # 0x1da22
leaq 0xd502(%rip), %rsi      # 0x1d9d6
movl $0x69, %edx
leaq 0xd50d(%rip), %rcx      # 0x1d9ed
callq 0x31e0
movl -0x8(%rbp), %eax
movl %eax, -0xc4(%rbp)
subl $0x41, %eax
je 0x1095a
jmp 0x104f9
movl -0xc4(%rbp), %eax
subl $0x44, %eax
je 0x10944
jmp 0x1050a
movl -0xc4(%rbp), %eax
subl $0x4c, %eax
je 0x107a4
jmp 0x1051b
movl -0xc4(%rbp), %eax
subl $0x4d, %eax
je 0x109be
jmp 0x1052c
movl -0xc4(%rbp), %eax
subl $0x4e, %eax
je 0x10930
jmp 0x1053d
movl -0xc4(%rbp), %eax
subl $0x4f, %eax
je 0x109d2
jmp 0x1054e
movl -0xc4(%rbp), %eax
subl $0x50, %eax
je 0x1097e
jmp 0x1055f
movl -0xc4(%rbp), %eax
subl $0x51, %eax
je 0x108dc
jmp 0x10570
movl -0xc4(%rbp), %eax
subl $0x66, %eax
je 0x109e6
jmp 0x10581
movl -0xc4(%rbp), %eax
subl $0x6b, %eax
je 0x10691
jmp 0x10592
movl -0xc4(%rbp), %eax
subl $0x6c, %eax
je 0x10764
jmp 0x105a3
movl -0xc4(%rbp), %eax
subl $0x6d, %eax
je 0x106c3
jmp 0x105b4
movl -0xc4(%rbp), %eax
subl $0x6e, %eax
je 0x10860
jmp 0x105c5
movl -0xc4(%rbp), %eax
subl $0x6f, %eax
je 0x108f0
jmp 0x105d6
movl -0xc4(%rbp), %eax
subl $0x70, %eax
je 0x106a5
jmp 0x105e7
movl -0xc4(%rbp), %eax
subl $0x72, %eax
je 0x10724
jmp 0x105f8
movl -0xc4(%rbp), %eax
subl $0x75, %eax
je 0x10966
jmp 0x10609
movl -0xc4(%rbp), %eax
subl $0x14d, %eax            # imm = 0x14D
je 0x10a13
jmp 0x1061c
movl -0xc4(%rbp), %eax
subl $0x22b, %eax            # imm = 0x22B
je 0x10972
jmp 0x1062f
movl -0xc4(%rbp), %eax
subl $0x309, %eax            # imm = 0x309
je 0x10a2f
jmp 0x10642
movl -0xc4(%rbp), %eax
subl $0x378, %eax            # imm = 0x378
je 0x109fb
jmp 0x10655
movl -0xc4(%rbp), %eax
subl $0x3e7, %eax            # imm = 0x3E7
je 0x10a07
jmp 0x10668
movl -0xc4(%rbp), %eax
subl $0x1000002, %eax        # imm = 0x1000002
je 0x10a72
jmp 0x1067b
movl -0xc4(%rbp), %eax
subl $0x1000006, %eax        # imm = 0x1000006
je 0x10a3b
jmp 0x10ae6
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x12150(%rip)     # 0x227f0
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, %esi
leaq 0xd378(%rip), %rdi      # 0x1da2f
movb $0x0, %al
callq 0x3160
jmp 0x10b02
callq 0x165c0
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x33e0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x10712
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
leaq 0xd39b(%rip), %rdi      # 0x1da97
movb $0x2, %al
callq 0x3160
movsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x121f0(%rip)    # 0x22900
jmp 0x1071f
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x121e1(%rip)    # 0x22900
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x1074f
callq 0x3050
movl (%rax), %edi
leaq 0xd396(%rip), %rsi      # 0x1dad9
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rsi
leaq 0x121b8(%rip), %rdi     # 0x22912
callq 0x3070
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x1078f
callq 0x3050
movl (%rax), %edi
leaq 0xd356(%rip), %rsi      # 0x1dad9
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rsi
leaq 0x12278(%rip), %rdi     # 0x22a12
callq 0x3070
jmp 0x10b02
movq -0x10(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x32b0
cmpl $0x0, %eax
jl 0x1080a
movl -0xa8(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x1080a
movq -0x10(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jae 0x107ee
movq -0x10(%rbp), %rsi
leaq 0x12015(%rip), %rdi     # 0x227fc
callq 0x3070
jmp 0x10808
callq 0x3050
movl (%rax), %edi
leaq 0xd305(%rip), %rsi      # 0x1db01
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x3300
jmp 0x1085b
movq -0x10(%rbp), %rdi
callq 0x33e0
movl 0x11fd7(%rip), %ecx     # 0x227f0
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x1082e
movq -0x10(%rbp), %rdi
callq 0x33e0
cmpl $0x0, %eax
jge 0x1084c
callq 0x3050
movl (%rax), %edi
movl 0x11fb5(%rip), %edx     # 0x227f0
subl $0x2, %edx
leaq 0xd2e7(%rip), %rsi      # 0x1db2c
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x11f9d(%rip)     # 0x227f8
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
cmpl $0x7, %eax
jle 0x10893
movl $0x7, 0x1239c(%rip)     # 0x22c14
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, %esi
leaq 0xd2fb(%rip), %rdi      # 0x1db85
movb $0x0, %al
callq 0x3160
jmp 0x108d7
movq -0x10(%rbp), %rdi
callq 0x33e0
cmpl $0x1, %eax
jge 0x108c6
movl $0x1, 0x12369(%rip)     # 0x22c14
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, %esi
leaq 0xd30e(%rip), %rdi      # 0x1dbcb
movb $0x0, %al
callq 0x3160
jmp 0x108d5
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x1233f(%rip)     # 0x22c14
jmp 0x108d7
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x1232d(%rip)     # 0x22c18
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x1091b
callq 0x3050
movl (%rax), %edi
leaq 0xd303(%rip), %rsi      # 0x1dc12
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rsi
leaq 0x121ec(%rip), %rdi     # 0x22b12
callq 0x3070
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x122e1(%rip)     # 0x22c20
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x30b0
movsd %xmm0, 0x122d3(%rip)    # 0x22c28
jmp 0x10b02
movb $0x1, 0x122d8(%rip)     # 0x22c39
jmp 0x10b02
movb $0x1, 0x122cd(%rip)     # 0x22c3a
jmp 0x10b02
movb $0x1, 0x124c3(%rip)     # 0x22e3c
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x109a9
callq 0x3050
movl (%rax), %edi
leaq 0xd29f(%rip), %rsi      # 0x1dc3c
movl $0x100, %edx            # imm = 0x100
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rsi
leaq 0x12287(%rip), %rdi     # 0x22c3b
callq 0x3070
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x12263(%rip)     # 0x22c30
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
movl %eax, 0x12253(%rip)     # 0x22c34
jmp 0x10b02
movq -0x10(%rbp), %rsi
leaq 0x1234a(%rip), %rdi     # 0x22d3b
callq 0x3070
jmp 0x10b02
movb $0x1, 0x1221a(%rip)     # 0x22c1c
jmp 0x10b02
movb $0x1, 0x1220f(%rip)     # 0x22c1d
jmp 0x10b02
movq -0x10(%rbp), %rdi
callq 0x33e0
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x1220e(%rip)      # 0x22c38
jmp 0x10b02
movb $0x1, 0x12405(%rip)     # 0x22e3b
jmp 0x10b02
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0x18(%rcx), %eax
movl %eax, 0x123f1(%rip)     # 0x22e40
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0x18(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x123db(%rip)     # 0x22e48
jmp 0x10b02
movq -0x18(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jge 0x10add
leaq 0xb81f(%rip), %rdi      # 0x1c2a2
movb $0x0, %al
callq 0x3150
movq -0x18(%rbp), %rdi
movq 0x11543(%rip), %rax     # 0x21fd8
movq (%rax), %rsi
movl $0x2, %edx
callq 0x30c0
leaq 0xb7f9(%rip), %rdi      # 0x1c2a2
movb $0x0, %al
callq 0x3150
movq -0x18(%rbp), %rdi
movq 0x1151d(%rip), %rax     # 0x21fd8
movq (%rax), %rsi
movl $0x8, %edx
callq 0x30c0
leaq 0xb7d3(%rip), %rdi      # 0x1c2a2
movb $0x0, %al
callq 0x3150
xorl %edi, %edi
callq 0x3410
movl $0x16, -0x4(%rbp)
jmp 0x10b09
cmpl $0x0, 0x11d07(%rip)     # 0x227f4
jne 0x10af9
movl $0x1, 0x11cfb(%rip)     # 0x227f4
movl $0x7, -0x4(%rbp)
jmp 0x10b09
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop