// File: /workspace/github_c_makefile_star2_O3/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 0x176ac7
movq %rdx, %rbx
testq %rdx, %rdx
je 0x176ac7
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       # 0x176c2a
xorl %ecx, %ecx
callq 0x100bc9
testl %eax, %eax
jne 0x176acc
movq 0x10(%rsp), %rax
movq 0x18(%r14), %r12
cmpq %r12, %rax
ja 0x176ac2
movq 0x8(%rsp), %rcx
cmpq %r12, %rcx
ja 0x176ac2
addq %rcx, %rax
subq %rax, %r12
movq $0x1, 0x10(%rbx)
movq 0x18(%rbx), %r15
movq 0x8(%r14), %rdi
callq 0x11b0a1
movq %r15, %rdi
movq %rax, %rsi
callq 0x2243ba
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x224be0
movq 0x18(%rbx), %rdi
leaq 0x21ce4b(%rip), %rsi    # 0x3937e1
callq 0x2243ba
movq 0x18(%rbx), %rdi
movq %r12, %xmm1
punpckldq 0x1d0f34(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d0f3c(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2241c8
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224fd4
movq 0x18(%rbx), %rdi
leaq 0x21cc7f(%rip), %rsi    # 0x39365d
callq 0x2243ba
movq 0x18(%rbx), %rdi
movsd 0x10(%rsp), %xmm1
unpcklps 0x1d0eec(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d0ef4(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2241c8
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224fd4
movq 0x18(%rbx), %rdi
leaq 0x21cc14(%rip), %rsi    # 0x39363a
callq 0x2243ba
movq 0x18(%rbx), %rdi
movsd 0x8(%rsp), %xmm1
unpcklps 0x1d0ea4(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1d0eac(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2241c8
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224fd4
movq 0x18(%rbx), %rdi
leaq 0x2006e2(%rip), %rsi    # 0x377150
callq 0x2243ba
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x224be0
movq (%r14), %rdi
leaq 0x1db(%rip), %rsi       # 0x176c65
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x100bc9
testl %eax, %eax
jne 0x176ad1
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224fd4
movq 0x18(%rbx), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224fd4
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x5516e
callq 0x550c3
callq 0x550fc
callq 0x55135