// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/spec_results.c
// Function: gt_spec_results_make_aspect_model
static int gt_spec_results_make_aspect_model(GT_UNUSED void *key, void *value,
                                             void *data, GT_UNUSED GtError *err)
{
  GtSpecResultsReportInfo *info = (GtSpecResultsReportInfo*) data;
  GtSpecAspect* sa =  (GtSpecAspect*) value;
  GtSpecAspectCountInfo count_info;
  GT_UNUSED int rval;
  GtUword successes = sa->nof_nodes,
          failures = 0,
          runtime_errors = 0;
  gt_assert(sa && info);

  /* update global number of checked node/aspect pairs */
  info->sr->checked_nodes += sa->nof_nodes;

  /* calculate number of failures/errors */
  count_info.fail = &failures;
  count_info.err = &runtime_errors;
  rval = gt_hashmap_foreach(sa->aspect_node_results, gt_spec_aspect_count_stats,
                            &count_info, NULL);
  gt_assert(!rval); /* gt_spec_aspect_count_stats() is sane */

  /* calculate number of successes */
  gt_assert(failures <= sa->nof_nodes && runtime_errors <= sa->nof_nodes);
  successes = sa->nof_nodes - failures - runtime_errors;
  gt_assert(failures + runtime_errors + successes == sa->nof_nodes);

  /* export results as data model */
  info->node_i = 1;
  lua_pushstring(info->L, gt_str_get(sa->name));
  lua_newtable(info->L);
  lua_pushstring(info->L, "successes");
  lua_pushnumber(info->L, successes);
  lua_rawset(info->L, -3);
  lua_pushstring(info->L, "failures");
  lua_pushnumber(info->L, failures);
  lua_rawset(info->L, -3);
  lua_pushstring(info->L, "runtime_errors");
  lua_pushnumber(info->L, runtime_errors);
  lua_rawset(info->L, -3);
  lua_pushstring(info->L, "nodes");
  lua_newtable(info->L);
  rval = gt_hashmap_foreach(sa->aspect_node_results,
                              gt_spec_aspect_make_node_model, info, NULL);
  gt_assert(rval == 0);
  lua_rawset(info->L, -3);
  lua_rawset(info->L, -3);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
testq %rsi, %rsi
je 0x17ef59
movq %rdx, %rbx
testq %rdx, %rdx
je 0x17ef59
movq %rsi, %r14
movq 0x18(%rsi), %rax
movq 0x20(%rbx), %rcx
addq %rax, 0x48(%rcx)
leaq 0x10(%rsp), %rax
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rax
movq %rax, 0x8(%rdx)
movq (%rsi), %rdi
leaq 0x301(%rip), %rsi       # 0x17f0bc
xorl %ecx, %ecx
callq 0x105afd
testl %eax, %eax
jne 0x17ef5e
movq 0x10(%rsp), %rax
movq 0x18(%r14), %r12
cmpq %r12, %rax
ja 0x17ef54
movq 0x8(%rsp), %rcx
cmpq %r12, %rcx
ja 0x17ef54
addq %rcx, %rax
subq %rax, %r12
movq $0x1, 0x10(%rbx)
movq 0x18(%rbx), %r15
movq 0x8(%r14), %rdi
callq 0x120d23
movq %r15, %rdi
movq %rax, %rsi
callq 0x22e0c4
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e8fc
movq 0x18(%rbx), %rdi
leaq 0x21de35(%rip), %rsi    # 0x39cc5d
callq 0x22e0c4
movq 0x18(%rbx), %rdi
movq %r12, %xmm1
punpckldq 0x1d1aa2(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d1aaa(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x22debe
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x18(%rbx), %rdi
leaq 0x21dc69(%rip), %rsi    # 0x39cad9
callq 0x22e0c4
movq 0x18(%rbx), %rdi
movsd 0x10(%rsp), %xmm1
unpcklps 0x1d1a5a(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d1a62(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x22debe
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x18(%rbx), %rdi
leaq 0x21dbfe(%rip), %rsi    # 0x39cab6
callq 0x22e0c4
movq 0x18(%rbx), %rdi
movsd 0x8(%rsp), %xmm1
unpcklps 0x1d1a12(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d1a1a(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x22debe
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x18(%rbx), %rdi
leaq 0x2014e2(%rip), %rsi    # 0x3803e2
callq 0x22e0c4
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e8fc
movq (%r14), %rdi
leaq 0x1db(%rip), %rsi       # 0x17f0f7
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x105afd
testl %eax, %eax
jne 0x17ef63
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x562cc
callq 0x56221
callq 0x5625a
callq 0x56293