// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_compreads_compress.c
// Function: gt_compreads_compress_arguments_check
static int gt_compreads_compress_arguments_check(GT_UNUSED int rest_argc,
                                       void *tool_arguments,
                                       GtError *err)
{
  int had_err = 0;
  GtCsrHcrEncodeArguments *arguments = tool_arguments;
  GtSplitter *splitter = NULL;
  GtStr *buffer;
  gt_error_check(err);
  gt_assert(arguments);

  if (gt_str_array_size(arguments->files) == 0) {
    gt_error_set(err, "option \"-files\" is mandatory and requires"
                      " at least one filename as argument!");
    had_err = -1;
  }

  if (!had_err) {
    if (gt_str_length(arguments->name) == 0) {
      if (gt_str_array_size(arguments->files) > 1UL) {
        gt_error_set(err, "option \"-name\" needs to be specified"
                          " if more than one file is given");
        had_err = -1;
      }
      else {
        GtUword i;
        char *basename;
        splitter = gt_splitter_new();
        basename = gt_basename(gt_str_array_get(arguments->files, 0));
        buffer = gt_str_new_cstr(basename);
        gt_splitter_split(splitter, gt_str_get(buffer), gt_str_length(buffer),
                          '.');
        for (i = 0; i < gt_splitter_size(splitter) - 1; i++) {
          gt_str_append_cstr(arguments->name,
                             gt_splitter_get_token(splitter, i));
          if (i < gt_splitter_size(splitter) - 2)
            gt_str_append_char(arguments->name, '.');
        }
        gt_free(basename);
        gt_splitter_delete(splitter);
        gt_str_delete(buffer);
      }
    }
  }

  if (!had_err) {
    char *sampling_type = gt_str_get(arguments->method);
    static const char *methods[] = { "page", "regular", "none" };

    if (!strcmp(methods[0], sampling_type)) {
      arguments->pagewise = true;
      if (arguments->srate == GT_UNDEF_UWORD)
        arguments->srate = GT_SAMPLING_DEFAULT_PAGE_RATE;
      else if (arguments->srate == 0) {
        gt_error_set(err, "page sampling was chosen, but sampling"
                          " rate was set to "GT_WU"! this seems wrong.",
                     arguments->srate);
        had_err = -1;
      }
    }
    else if (!strcmp(methods[1], sampling_type)) {
      arguments->regular = true;
      if (arguments->srate == GT_UNDEF_UWORD)
        arguments->srate = GT_SAMPLING_DEFAULT_REGULAR_RATE;
      else if (arguments->srate == 0) {
        gt_error_set(err, "regular sampling was chosen, but sampling rate "
                          " was set to "GT_WU"! this seems wrong.",
                     arguments->srate);
        had_err = -1;
      }
    }
    else if (!strcmp(methods[2], sampling_type)) {
      if (arguments->srate == GT_UNDEF_UWORD)
        arguments->srate = 0;
      else if (arguments->srate != 0) {
        gt_error_set(err, "no sampling was chosen, but sampling rate was"
                          " set to "GT_WU"! this seems wrong.",
                          arguments->srate);
        had_err = -1;
      }
    }
    else {
      gt_error_set(err, "somethings wrong with the stype option");
      had_err = -1;
    }
  }

  if (!had_err) {
    if (arguments->arg_range.start != GT_UNDEF_UWORD) {
      if (arguments->arg_range.start <= (GtUword) UINT_MAX) {
        gt_safe_assign(arguments->qrng.start, arguments->arg_range.start);
        if (arguments->arg_range.end <= (GtUword) UINT_MAX)
          gt_safe_assign(arguments->qrng.end, arguments->arg_range.end);
        else
          had_err = -1;
      }
      else
        had_err = -1;
    }
    if (had_err)
      gt_error_set(err, "Range for qualities: value to large! larger than %u",
                   UINT_MAX);
  }
  return had_err;
}

// Assembly:
subq $0xa8, %rsp
movl %edi, 0xa4(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x1fcc8
movq 0x90(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1fc90
jmp 0x1fcc8
movq 0x61c309(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f6372(%rip), %rsi    # 0x516013
leaq 0x4f6517(%rip), %rdx    # 0x5161bf
leaq 0x4f81ac(%rip), %rcx    # 0x517e5b
leaq 0x4f7eee(%rip), %r8     # 0x517ba4
movl $0x8c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1fcca
jmp 0x1fccc
cmpq $0x0, 0x80(%rsp)
jne 0x1fd0f
movq 0x61c2c2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f632b(%rip), %rsi    # 0x516013
leaq 0x55ae70(%rip), %rdx    # 0x57ab5f
leaq 0x4f8165(%rip), %rcx    # 0x517e5b
leaq 0x4f7ea7(%rip), %r8     # 0x517ba4
movl $0x8d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1fd11
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jne 0x1fd49
movq 0x90(%rsp), %rdi
leaq 0x4f814a(%rip), %rsi    # 0x517e81
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x8c(%rsp)
jne 0x1fefd
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x1fefb
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11fcc0
cmpq $0x1, %rax
jbe 0x1fdaf
movq 0x90(%rsp), %rdi
leaq 0x4f8136(%rip), %rsi    # 0x517ece
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x1fef9
callq 0x11afb0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq %rax, %rdi
callq 0x83ee0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x11d510
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rdi
callq 0x11dee0
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
callq 0x11dfa0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
movl $0x2e, %ecx
callq 0x11afd0
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11b5b0
movq %rax, %rcx
movq 0x20(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1fecf
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x11b4c0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rdi
callq 0x11b5b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
subq $0x2, %rcx
cmpq %rcx, %rax
jae 0x1feba
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rdi
movl $0x2e, %esi
callq 0x11da70
jmp 0x1febc
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x1fe2d
movq 0x60(%rsp), %rdi
leaq 0x4f7cc9(%rip), %rsi    # 0x517ba4
movl $0xaa, %edx
callq 0xe88c0
movq 0x78(%rsp), %rdi
callq 0x11b600
movq 0x70(%rsp), %rdi
callq 0x11f560
jmp 0x1fefb
jmp 0x1fefd
cmpl $0x0, 0x8c(%rsp)
jne 0x200cb
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11dee0
movq %rax, 0x58(%rsp)
movq 0x61c878(%rip), %rdi    # 0x63c7a0
movq 0x58(%rsp), %rsi
callq 0x19980
cmpl $0x0, %eax
jne 0x1ffa7
movq 0x80(%rsp), %rax
movb $0x1, 0x1(%rax)
movq 0x80(%rsp), %rax
cmpq $-0x1, 0x28(%rax)
jne 0x1ff64
movq 0x80(%rsp), %rax
movq $0x64, 0x28(%rax)
jmp 0x1ffa2
movq 0x80(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1ffa0
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0x4f7f84(%rip), %rsi    # 0x517f12
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x1ffa2
jmp 0x200c9
movq 0x61c7fa(%rip), %rdi    # 0x63c7a8
movq 0x58(%rsp), %rsi
callq 0x19980
cmpl $0x0, %eax
jne 0x2002d
movq 0x80(%rsp), %rax
movb $0x1, 0x2(%rax)
movq 0x80(%rsp), %rax
cmpq $-0x1, 0x28(%rax)
jne 0x1ffea
movq 0x80(%rsp), %rax
movq $0x2710, 0x28(%rax)     # imm = 0x2710
jmp 0x20028
movq 0x80(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x20026
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0x4f7f4c(%rip), %rsi    # 0x517f60
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x20028
jmp 0x200c7
movq 0x61c77c(%rip), %rdi    # 0x63c7b0
movq 0x58(%rsp), %rsi
callq 0x19980
cmpl $0x0, %eax
jne 0x200a4
movq 0x80(%rsp), %rax
cmpq $-0x1, 0x28(%rax)
jne 0x20064
movq 0x80(%rsp), %rax
movq $0x0, 0x28(%rax)
jmp 0x200a2
movq 0x80(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x200a0
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0x4f7f24(%rip), %rsi    # 0x517fb2
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x200a2
jmp 0x200c5
movq 0x90(%rsp), %rdi
leaq 0x4f7f4b(%rip), %rsi    # 0x517ffe
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x200c7
jmp 0x200c9
jmp 0x200cb
cmpl $0x0, 0x8c(%rsp)
jne 0x202b3
movq 0x80(%rsp), %rax
cmpq $-0x1, 0x38(%rax)
je 0x2028c
movq 0x80(%rsp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x38(%rax)
ja 0x2027f
jmp 0x20105
movq 0x80(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movl %eax, 0x4c(%rsp)
movq 0x50(%rsp), %rax
movl 0x4c(%rsp), %ecx
cmpq %rcx, %rax
jne 0x20164
cmpq $0x1, 0x50(%rsp)
setb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, 0x4c(%rsp)
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x20164
movl 0x4c(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x30(%rax)
xorl %eax, %eax
movl %eax, 0xc(%rsp)
jmp 0x2016f
movl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2016f
movl 0xc(%rsp), %eax
movl %eax, 0x48(%rsp)
cmpl $0x0, 0x48(%rsp)
je 0x201ac
movq 0x61be1b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f7e96(%rip), %rsi    # 0x518025
leaq 0x4f7a0e(%rip), %rdx    # 0x517ba4
movl $0xde, %ecx
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x201ae
movq 0x80(%rsp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x40(%rax)
ja 0x20272
jmp 0x201c7
movq 0x80(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movl 0x3c(%rsp), %ecx
cmpq %rcx, %rax
jne 0x20226
cmpq $0x1, 0x40(%rsp)
setb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, 0x3c(%rsp)
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x20226
movl 0x3c(%rsp), %ecx
movq 0x80(%rsp), %rax
movl %ecx, 0x34(%rax)
xorl %eax, %eax
movl %eax, 0x8(%rsp)
jmp 0x20231
movl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x20231
movl 0x8(%rsp), %eax
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
je 0x2026e
movq 0x61bd59(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f7dd4(%rip), %rsi    # 0x518025
leaq 0x4f794c(%rip), %rdx    # 0x517ba4
movl $0xe0, %ecx
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x20270
jmp 0x2027d
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x2028a
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x2028c
cmpl $0x0, 0x8c(%rsp)
je 0x202b1
movq 0x90(%rsp), %rdi
leaq 0x4f7da2(%rip), %rsi    # 0x518047
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0xd88c0
jmp 0x202b3
movl 0x8c(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)