// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_chain2dim.c
// Function: gt_chain2dim_arguments_check
static int gt_chain2dim_arguments_check (GT_UNUSED int rest_argc,
                                         void *tool_arguments,
                                         GtError * err)
{
  GtChain2dimoptions *arguments = tool_arguments;
  const char *globalargs = NULL, *localargs = NULL;

  if (gt_option_is_set (arguments->refoptionmaxgap))
  {
    if (arguments->maxgap == 0)
    {
      gt_error_set(err,"argument of option -maxgap must be positive integer");
      return -1;
    }
  }
  if (gt_option_is_set (arguments->refoptionweightfactor))
  {
    if (arguments->weightfactor <= 0.0)
    {
      gt_error_set(err,"argument of option -wf must be positive real value");
      return -1;
    }
  }
  gt_assert(arguments->refoptionglobal != NULL);
  gt_assert(arguments->refoptionlocal != NULL);
  if (gt_option_is_set(arguments->refoptionglobal))
  {
    GtUword globalargsnum = gt_str_array_size(arguments->globalargs);
    if (globalargsnum > 1UL)
    {
      gt_error_set(err,"option -global can only have one optional argument");
      return -1;
    }
    if (globalargsnum == 1UL)
    {
      globalargs = gt_str_array_get(arguments->globalargs,0);
    }
  }
  if (gt_option_is_set(arguments->refoptionlocal))
  {
    GtUword localargsnum = gt_str_array_size(arguments->localargs);
    if (localargsnum > 1UL)
    {
      gt_error_set(err,"option -local can only have one optional argument");
      return -1;
    }
    if (localargsnum == 1UL)
    {
      localargs = gt_str_array_get(arguments->localargs,0);
    }
  }
  if (gt_option_is_set(arguments->refoptionweightfactor) &&
      !gt_option_is_set(arguments->refoptionlocal) &&
      globalargs == NULL)
  {
    gt_error_set(err,
                 "option wf requires either option -local or option -global "
                 "with argument %s or %s or %s",
                 GT_CHAIN2DIM_GAPCOSTSWITCH,
                 GT_CHAIN2DIM_OVERLAPSWITCH,
                 GT_CHAIN2DIM_ALLSWITCH);
    return -1;
  }
  arguments->gtchainmode
    = gt_chain_chainmode_new(arguments->maxgap,
                             gt_option_is_set(arguments->refoptionglobal),
                             globalargs,
                             gt_option_is_set(arguments->refoptionlocal),
                             localargs,
                             err);
  return (arguments->gtchainmode == NULL) ? -1 : 0;
}

// Assembly:
subq $0x58, %rsp
movl %edi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1e9b2
jmp 0x1e9e0
movq 0x38(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1e9de
movq 0x40(%rsp), %rdi
leaq 0x4f8d75(%rip), %rsi    # 0x51773f
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ec80
jmp 0x1e9e0
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1e9f4
jmp 0x1ea25
movq 0x38(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0x8(%rax), %xmm0
jb 0x1ea23
movq 0x40(%rsp), %rdi
leaq 0x4f8d64(%rip), %rsi    # 0x517773
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ec80
jmp 0x1ea25
jmp 0x1ea27
movq 0x38(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x1ea6b
movq 0x61d566(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f75cf(%rip), %rsi    # 0x516013
leaq 0x4f8d5b(%rip), %rdx    # 0x5177a6
leaq 0x4f8d77(%rip), %rcx    # 0x5177c9
leaq 0x4f8812(%rip), %r8     # 0x51726b
movl $0x90, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ea6d
jmp 0x1ea6f
movq 0x38(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x1eab3
movq 0x61d51e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f7587(%rip), %rsi    # 0x516013
leaq 0x4f8d53(%rip), %rdx    # 0x5177e6
leaq 0x4f8d2f(%rip), %rcx    # 0x5177c9
leaq 0x4f87ca(%rip), %r8     # 0x51726b
movl $0x91, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1eab5
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1eac9
jmp 0x1eb25
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11fcc0
movq %rax, 0x20(%rsp)
cmpq $0x1, 0x20(%rsp)
jbe 0x1eb04
movq 0x40(%rsp), %rdi
leaq 0x4f8d18(%rip), %rsi    # 0x517808
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ec80
cmpq $0x1, 0x20(%rsp)
jne 0x1eb23
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq %rax, 0x30(%rsp)
jmp 0x1eb25
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1eb39
jmp 0x1eb95
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11fcc0
movq %rax, 0x18(%rsp)
cmpq $0x1, 0x18(%rsp)
jbe 0x1eb74
movq 0x40(%rsp), %rdi
leaq 0x4f8cdb(%rip), %rsi    # 0x51783b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ec80
cmpq $0x1, 0x18(%rsp)
jne 0x1eb93
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq %rax, 0x28(%rsp)
jmp 0x1eb95
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1eba9
jmp 0x1ebf8
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x1ebf8
cmpq $0x0, 0x30(%rsp)
jne 0x1ebf8
movq 0x40(%rsp), %rdi
leaq 0x4f8c9e(%rip), %rsi    # 0x51786d
leaq 0x57921f(%rip), %rdx    # 0x597df5
leaq 0x4f8af0(%rip), %rcx    # 0x5176cd
leaq 0x52d959(%rip), %r8     # 0x54c53d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ec80
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0xf74a0
movb %al, 0x7(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0xf74a0
movb 0x7(%rsp), %cl
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x28(%rsp), %r8
movq 0x40(%rsp), %r9
movzbl %cl, %esi
andl $0x1, %esi
movzbl %al, %ecx
andl $0x1, %ecx
callq 0x208de0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovel %ecx, %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)