// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_linspace_align.c
// Function: gt_arguments2scorehandler
static GtScoreHandler *gt_arguments2scorehandler(
                             const GtLinspaceArguments *arguments,
                             GtError *err)
{
  GtWord matchscore, mismatchscore, gap_open, gap_extension;
  GtScoreHandler *scorehandler = NULL;
  GtScoreMatrix *scorematrix = NULL;
  int had_err = 0;

  gt_error_check(err);
  if (gt_str_array_size(arguments->linearcosts) > 0)
  {
    GtUword wordindex = 0;

    if (arguments->protein)
    {
      scorematrix
        = gt_score_matrix_new_read_protein(
                          gt_str_array_get(arguments->linearcosts,wordindex++),
                          err);
      if (scorematrix == NULL)
      {
        had_err = -1;
      }
      matchscore = 0;
      mismatchscore = 0;
    } else
    {
      had_err = gt_parse_score_value(__LINE__,&matchscore,
                                     gt_str_array_get(arguments->linearcosts,
                                                      wordindex++),
                                     arguments->global,err);
      if (!had_err)
      {
        had_err = gt_parse_score_value(__LINE__,&mismatchscore,
                                       gt_str_array_get(arguments->linearcosts,
                                                        wordindex++),
                                       arguments->global,err);
      }
    }
    if (!had_err)
    {
      gap_open = 0;
      had_err = gt_parse_score_value(__LINE__,&gap_extension,
                                     gt_str_array_get(arguments->linearcosts,
                                                      wordindex++),
                                     false,err);
    }
  } else /*if (gt_str_array_size(arguments->affinecosts) > 0)*/
  {
    GtUword wordindex = 0;

    if (arguments->protein)
    {
      scorematrix = gt_score_matrix_new_read_protein(
                               gt_str_array_get(arguments->affinecosts,
                                                wordindex++), err);
      if (scorematrix == NULL)
      {
        had_err = -1;
      }
      matchscore = mismatchscore = 0;
    } else
    {
      had_err = gt_parse_score_value(__LINE__,&matchscore,
                                     gt_str_array_get(arguments->affinecosts,
                                                      wordindex++),
                                     arguments->global,err);
      if (!had_err)
      {
        had_err = gt_parse_score_value(__LINE__,&mismatchscore,
                                       gt_str_array_get(arguments->affinecosts,
                                                        wordindex++),
                                       arguments->global,err);
      }
    }
    if (!had_err)
    {
      had_err = gt_parse_score_value(__LINE__,&gap_open,
                                     gt_str_array_get(arguments->affinecosts,
                                                      wordindex++),
                                     false,err);
    }
    if (!had_err)
    {
      had_err = gt_parse_score_value(__LINE__,&gap_extension,
                                     gt_str_array_get(arguments->affinecosts,
                                                      wordindex),
                                     false,err);
    }
  }
  if (!had_err)
  {
    scorehandler = gt_scorehandler_new(matchscore, mismatchscore,
                                       gap_open, gap_extension);
    if (scorematrix != NULL)
    {
      gt_scorehandler_add_scorematrix(scorehandler,scorematrix);
    }
  }
  return scorehandler;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x41ec8
movq 0x48(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x41e90
jmp 0x41ec8
movq 0x5fa109(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d4172(%rip), %rsi    # 0x516013
leaq 0x4d4317(%rip), %rdx    # 0x5161bf
leaq 0x4df456(%rip), %rcx    # 0x521305
leaq 0x4dec0a(%rip), %r8     # 0x520ac0
movl $0x272, %r9d            # imm = 0x272
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x41eca
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x42036
movq $0x0, 0x8(%rsp)
movq 0x50(%rsp), %rax
testb $0x1, 0x3c(%rax)
je 0x41f4e
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x11f8c0
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x10f170
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x41f37
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
jmp 0x41fe5
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x50(%rsp), %rax
movb 0x38(%rax), %al
movq 0x48(%rsp), %r8
movl $0x285, %edi            # imm = 0x285
leaq 0x40(%rsp), %rsi
andb $0x1, %al
movzbl %al, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x41fe3
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x50(%rsp), %rax
movb 0x38(%rax), %al
movq 0x48(%rsp), %r8
movl $0x28b, %edi            # imm = 0x28B
leaq 0x38(%rsp), %rsi
andb $0x1, %al
movzbl %al, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
jmp 0x41fe5
cmpl $0x0, 0x14(%rsp)
jne 0x42031
movq $0x0, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x48(%rsp), %r8
movl $0x294, %edi            # imm = 0x294
leaq 0x28(%rsp), %rsi
xorl %ecx, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
jmp 0x421ab
movq $0x0, (%rsp)
movq 0x50(%rsp), %rax
testb $0x1, 0x3c(%rax)
je 0x4209f
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, (%rsp)
callq 0x11f8c0
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x10f170
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x42088
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
jmp 0x42132
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, (%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x50(%rsp), %rax
movb 0x38(%rax), %al
movq 0x48(%rsp), %r8
movl $0x2a9, %edi            # imm = 0x2A9
leaq 0x40(%rsp), %rsi
andb $0x1, %al
movzbl %al, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x42130
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, (%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x50(%rsp), %rax
movb 0x38(%rax), %al
movq 0x48(%rsp), %r8
movl $0x2af, %edi            # imm = 0x2AF
leaq 0x38(%rsp), %rsi
andb $0x1, %al
movzbl %al, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
jmp 0x42132
cmpl $0x0, 0x14(%rsp)
jne 0x42173
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, (%rsp)
callq 0x11f8c0
movq %rax, %rdx
movq 0x48(%rsp), %r8
movl $0x2b7, %edi            # imm = 0x2B7
leaq 0x30(%rsp), %rsi
xorl %ecx, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x421a9
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rsp), %rsi
callq 0x11f8c0
movq %rax, %rdx
movq 0x48(%rsp), %r8
movl $0x2be, %edi            # imm = 0x2BE
leaq 0x28(%rsp), %rsi
xorl %ecx, %ecx
callq 0x42200
movl %eax, 0x14(%rsp)
jmp 0x421ab
cmpl $0x0, 0x14(%rsp)
jne 0x421e9
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x1d0fb0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x421e7
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1d1040
jmp 0x421e9
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)