LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_control.c
// Function: mctop_run_on_socket_ref
int
mctop_run_on_socket_ref(socket_t* socket, const uint fix_mem)
{
  int ret = 0;
  if (socket == NULL)
    {
      return -EINVAL;
    }

#ifdef __x86_64__
  struct bitmask* bmask = numa_bitmask_alloc(socket->topo->n_hwcs);
  for (int i = 0; i < socket->n_hwcs; i++) 
    {
      bmask = numa_bitmask_setbit(bmask, socket->hwcs[i]->id);
    }

  ret = numa_sched_setaffinity(0, bmask);
  if (fix_mem && !ret && socket->topo->has_mem)
    {
      numa_set_preferred(socket->local_node);
    }
  numa_bitmask_free(bmask);
#else
  ret = mctop_run_on_node(socket->topo, socket->local_node);
#endif
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x83a4
movl %esi, %ebp
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movl 0x10(%rax), %edi
callq 0x2200
movq %rax, %r14
xorl %r15d, %r15d
movl 0x28(%rbx), %eax
cmpq %rax, %r15
jae 0x8372
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x21a0
movq %rax, %r14
incq %r15
jmp 0x8350
xorl %edi, %edi
movq %r14, %rsi
callq 0x2180
movl %eax, %r15d
testl %ebp, %ebp
je 0x839a
testl %r15d, %r15d
jne 0x839a
movq 0x48(%rbx), %rax
cmpl $0x0, 0x30(%rax)
je 0x839a
movl 0x6c(%rbx), %edi
callq 0x22a0
movq %r14, %rdi
callq 0x2320
jmp 0x83a8
pushq $-0x16
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_control.c
// Function: mctop_set_cpu
int
mctop_set_cpu(mctop_t* topo, int cpu) 
{
  int ret = 1;
#if defined(__sparc__)
  if (processor_bind(P_LWPID, P_MYID, cpu, NULL) == -1)
    {
      /* printf("Problem with setting processor affinity: %s\n", */
      /* 	     strerror(errno)); */
      ret = 0;
    }
#elif defined(__tile__)
  if (tmc_cpus_set_my_cpu(tmc_cpus_find_nth_cpu(&cpus, cpu)) < 0)
    {
      tmc_task_die("Failure in 'tmc_cpus_set_my_cpu()'.");
    }

  if (cpu != tmc_cpus_get_my_cpu())
    {
      PRINT("******* i am not CPU %d", tmc_cpus_get_my_cpu());
    }

#else
  cpu_set_t mask;
  CPU_ZERO(&mask);
  CPU_SET(cpu, &mask);
  if (sched_setaffinity(0, sizeof(cpu_set_t), &mask) != 0)
    {
      /* printf("Problem with setting processor affinity: %s\n", */
      /* 	     strerror(errno)); */
      ret = 0;
    }

  if (likely(topo != NULL))
    {
      mctop_hwcid_fix_numa_node(topo, cpu);
    }
#endif

  return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %esi            # imm = 0x3FF
ja 0x8470
pushq $0x1
popq %rax
movl %ebx, %ecx
shlq %cl, %rax
movl %ebx, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movq %rsp, %rdx
movl $0x80, %esi
xorl %edi, %edi
callq 0x2130
movl %eax, %ebp
testq %r14, %r14
je 0x8490
movq %r14, %rdi
movl %ebx, %esi
callq 0x80e7
xorl %eax, %eax
testl %ebp, %ebp
sete %al
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_aux.c
// Function: table_malloc
void**
table_malloc(const size_t rows, const size_t cols, const size_t elem_size)
{
  void** m = malloc_assert(rows * sizeof(uint64_t*));
  for (int s = 0; s < rows; s++)
    {
      m[s] = malloc_assert(cols * elem_size);
    }

  return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rdi,8), %rdi
callq 0x84f1
movq %rax, %r15
imulq %r12, %rbx
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x84e2
movq %rbx, %rdi
callq 0x84f1
movq %rax, (%r15,%r12,8)
incq %r12
jmp 0x84cc
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_aux.c
// Function: table_calloc
void**
table_calloc(const size_t rows, const size_t cols, const size_t elem_size)
{
  void** m = malloc_assert(rows * sizeof(uint64_t*));
  for (int s = 0; s < rows; s++)
    {
      m[s] = calloc_assert(cols, elem_size);
    }

  return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq (,%rdi,8), %rdi
callq 0x84f1
movq %rax, %r12
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x855e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2150
testq %rax, %rax
je 0x856b
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x8540
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3dd6(%rip), %rdi      # 0xc348
leaq 0x2586(%rip), %rsi      # 0xaaff
leaq 0x25b4(%rip), %rcx      # 0xab34
pushq $0x69
popq %rdx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_aux.c
// Function: table_free
void
table_free(void** m, const size_t cols)
{
  for (int s = 0; s < cols; s++)
    {
      free(m[s]);
    }
  free(m);
  m = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x85a9
movq (%rbx,%r15,8), %rdi
callq 0x2030
incq %r15
jmp 0x8596
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2030
nop
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_load.c
// Function: mctop_load_mem_bw
static uint
mctop_load_mem_bw(FILE* ifile, const uint n_sockets, double** bw_table)
{
  for (uint x = 0; x < (n_sockets * n_sockets); x++)
    {
      uint xc, yc;
      double bw;
      if (fscanf(ifile, "%u %u %lf", &xc, &yc, &bw) != 3)
	{
	  return 0;
	}
      bw_table[xc][yc] = bw;
    }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
imull %esi, %ebx
leaq 0x8(%rsp), %rbp
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
cmpl %r13d, %ebx
je 0x8e0c
movq %r15, %rdi
leaq 0x33e0(%rip), %rsi      # 0xc1b9
leaq 0xc(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x2070
cmpl $0x3, %eax
jne 0x8e0c
movsd 0x10(%rsp), %xmm0
movl 0xc(%rsp), %eax
movq (%r14,%rax,8), %rax
movl 0x8(%rsp), %ecx
movsd %xmm0, (%rax,%rcx,8)
incl %r13d
jmp 0x8dca
xorl %eax, %eax
cmpl %ebx, %r13d
setae %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/LPD-EPFL[P]mctop/src/mctop_cache.c
// Function: array_get_min
ticks
array_get_min(ticks* a, const int len)
{
  ticks min = a[0];
  for (size_t i = 1; i < len; i++)
    {
      if (a[i] < min)
	{
	  min = a[i];
	}
    }

  return min;
}

// Assembly:
movq (%rdi), %rax
movslq %esi, %rcx
pushq $0x1
popq %rdx
cmpq %rcx, %rdx
jae 0x9262
movq (%rdi,%rdx,8), %rsi
cmpq %rax, %rsi
cmovbq %rsi, %rax
incq %rdx
jmp 0x924d
retq
nop
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: load_index
faidx_t * load_index(const char *fn, const char *fnfai, const char *fngzi,
                     int flags, enum fai_format_options format) {
    faidx_t *fai = fai_load3_format(fn, fnfai, fngzi, flags, format);
    if (!fai) {
        fprintf(stderr, "Failed: fai_load3(%s, %s, %s, %d, %d)\n",
                fn, fnfai ? fnfai : "NULL", fngzi ? fngzi : "NULL", flags,
                (int) format);
        return NULL;
    }
    return fai;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x7bbd
movq %rax, %r13
testq %rax, %rax
je 0x5c98
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x93339(%rip), %rax     # 0x98fd8
testq %r15, %r15
leaq 0x6e7e9(%rip), %rcx     # 0x74492
cmoveq %rcx, %r15
movq (%rax), %rdi
testq %r14, %r14
cmoveq %rcx, %r14
movl %ebp, (%rsp)
leaq 0x6c3c1(%rip), %rsi     # 0x72082
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x4710
jmp 0x5c86
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: test_fai_line_length
int test_fai_line_length(const char *fn, const char *fnfai, const char *fngzi,
                         enum fai_format_options format, const char *expected,
                         const char *reg) {
    hts_pos_t found_len;
    faidx_t *fai = NULL;

    fai = load_index(fn, fnfai, fngzi, 0, format);
    if (!fai)
        return -1;

    found_len = fai_line_length(fai, reg);
    fai_destroy(fai);
    if (expected) {
        long long exp_len = strtoll(expected, NULL, 10);
        if (found_len != exp_len) {
            fprintf(stderr, "Unexpected result %"PRIhts_pos" from "
                    "fai_line_length, expected %s\n", found_len, expected);
            return -1;
        }
    } else {
        printf("%"PRIhts_pos"\n", found_len);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r8d
xorl %ecx, %ecx
callq 0x5c60
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x63c6
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x7bd1
movq %rax, %r14
movq %r15, %rdi
callq 0x6a50
testq %rbx, %rbx
je 0x63cb
xorl %r15d, %r15d
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40b0
cmpq %rax, %r14
je 0x63df
movq 0x92c29(%rip), %rax     # 0x98fd8
movq (%rax), %rdi
leaq 0x6be96(%rip), %rsi     # 0x7224f
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4710
movl %ebp, %r15d
jmp 0x63df
leaq 0x6be1b(%rip), %rdi     # 0x721ed
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x4060
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: test_faidx_has_seq
int test_faidx_has_seq(const char *fn, const char *fnfai, const char *fngzi,
                       enum fai_format_options format, const char *expected,
                       const char *seq) {
    int res;
    faidx_t *fai = NULL;

    fai = load_index(fn, fnfai, fngzi, 0, format);
    if (!fai)
        return -1;

    res = faidx_has_seq(fai, seq);
    fai_destroy(fai);
    if (expected) {
        long exp_res = strtol(expected, NULL, 10);
        if (res != exp_res) {
            fprintf(stderr, "Unexpected result %d from faidx_has_seq(%s) "
                    "expected %s\n", res, seq, expected);
            return -1;
        }
    } else {
        printf("%d\n", res);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r8d
xorl %ecx, %ecx
callq 0x5c60
pushq $-0x1
popq %r12
testq %rax, %rax
je 0x6463
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x83f5
movl %eax, %ebp
movq %r15, %rdi
callq 0x6a50
testq %rbx, %rbx
je 0x6468
xorl %r15d, %r15d
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x46e0
movslq %ebp, %rcx
cmpq %rcx, %rax
je 0x647b
movq 0x92b8e(%rip), %rax     # 0x98fd8
movq (%rax), %rdi
leaq 0x6be34(%rip), %rsi     # 0x72288
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4710
movl %r12d, %r15d
jmp 0x647b
leaq 0x71747(%rip), %rdi     # 0x77bb6
xorl %r15d, %r15d
movl %ebp, %esi
xorl %eax, %eax
callq 0x4060
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: test_faidx_iseq
int test_faidx_iseq(const char *fn, const char *fnfai, const char *fngzi,
                    enum fai_format_options format, const char *expected,
                    const char *index) {
    const char *found_name = NULL;
    int idx = atoi(index);
    faidx_t *fai = NULL;

    fai = load_index(fn, fnfai, fngzi, 0, format);
    if (!fai)
        return -1;

    found_name = faidx_iseq(fai, idx);

    if (expected) {
        if (!found_name || strcmp(found_name, expected) != 0) {
            fprintf(stderr, "Unexpected result %s from faidx_iseq(fai, %d), "
                    "expected %s\n", found_name ? found_name : "(null)",
                    idx, expected);
            fai_destroy(fai);
            return -1;
        }
    } else {
        printf("%s\n", found_name ? found_name : "(null)");
    }

    fai_destroy(fai);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %r9, %rdi
callq 0x4800
movl %eax, %ebp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movl %ebx, %r8d
callq 0x5c60
testq %rax, %rax
je 0x64f0
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x8006
movq %rax, %r15
testq %r14, %r14
je 0x64f6
testq %r15, %r15
je 0x6526
movq %r15, %rdi
movq %r14, %rsi
callq 0x46d0
xorl %r12d, %r12d
testl %eax, %eax
je 0x650c
jmp 0x652d
pushq $-0x1
popq %r12
jmp 0x6514
testq %r15, %r15
leaq 0x6bdfd(%rip), %rdi     # 0x722fd
cmovneq %r15, %rdi
callq 0x47e0
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x6a50
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bdd0(%rip), %r15     # 0x722fd
movq 0x92aa4(%rip), %rax     # 0x98fd8
movq (%rax), %rdi
leaq 0x6bd83(%rip), %rsi     # 0x722c1
movq %r15, %rdx
movl %ebp, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x4710
pushq $-0x1
popq %r12
jmp 0x650c
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: test_faidx_seq_len
int test_faidx_seq_len(const char *fn, const char *fnfai, const char *fngzi,
                       enum fai_format_options format, const char *expected,
                       const char *seq) {
    int found_len;
    faidx_t *fai = NULL;

    fai = load_index(fn, fnfai, fngzi, 0, format);
    if (!fai)
        return -1;

    found_len = faidx_seq_len(fai, seq);
    fai_destroy(fai);

    if (expected) {
        int exp_len = atoi(expected);
        if (found_len != exp_len) {
            fprintf(stderr, "Unexpected result %d from faidx_seq_len(fai, %s) "
                    "expected %s\n", found_len, seq, expected);
            return -1;
        }
    } else {
        printf("%d\n", found_len);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r8d
xorl %ecx, %ecx
callq 0x5c60
pushq $-0x1
popq %r12
testq %rax, %rax
je 0x65c0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x80fa
movl %eax, %ebp
movq %r15, %rdi
callq 0x6a50
testq %rbx, %rbx
je 0x65c5
movq %rbx, %rdi
callq 0x4800
xorl %r15d, %r15d
cmpl %eax, %ebp
je 0x65d8
movq 0x92a31(%rip), %rax     # 0x98fd8
movq (%rax), %rdi
leaq 0x6bd53(%rip), %rsi     # 0x72304
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4710
movl %r12d, %r15d
jmp 0x65d8
leaq 0x715ea(%rip), %rdi     # 0x77bb6
xorl %r15d, %r15d
movl %ebp, %esi
xorl %eax, %eax
callq 0x4060
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/test/test_faidx.c
// Function: test_faidx_seq_len64
int test_faidx_seq_len64(const char *fn, const char *fnfai, const char *fngzi,
                         enum fai_format_options format, const char *expected,
                         const char *seq) {
    hts_pos_t found_len;
    faidx_t *fai = NULL;

    fai = load_index(fn, fnfai, fngzi, 0, format);
    if (!fai)
        return -1;

    found_len = faidx_seq_len(fai, seq);
    fai_destroy(fai);

    if (expected) {
        long long exp_len = strtoll(expected, NULL, 10);
        if (found_len != exp_len) {
            fprintf(stderr, "Unexpected result %"PRIhts_pos
                    " from fai_seq_len64(fai, %s) expected %s\n",
                    found_len, seq, expected);
            return -1;
        }
    } else {
        printf("%"PRIhts_pos"\n", found_len);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %r8d
xorl %ecx, %ecx
callq 0x5c60
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x6658
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x80fa
movslq %eax, %r15
movq %r12, %rdi
callq 0x6a50
testq %rbx, %rbx
je 0x665d
xorl %r12d, %r12d
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40b0
cmpq %r15, %rax
je 0x6671
movq 0x9299a(%rip), %rax     # 0x98fd8
movq (%rax), %rdi
leaq 0x6bcfa(%rip), %rsi     # 0x72342
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x4710
movl %ebp, %r12d
jmp 0x6671
leaq 0x6bb89(%rip), %rdi     # 0x721ed
xorl %r12d, %r12d
movq %r15, %rsi
xorl %eax, %eax
callq 0x4060
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_CondMove
void OP_CondMove(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 6) & 7;
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    if (reg[c] != 0) {
        reg[a] = reg[b];
    }
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
movl 0x4(%rsi,%rdi,4), %eax
movl %eax, %edx
andl $0x7, %edx
leaq 0x2e74(%rip), %rcx      # 0x40e0
cmpl $0x0, (%rcx,%rdx,4)
je 0x1285
movl %eax, %edx
shrl %edx
andl $0x1c, %edx
movl (%rdx,%rcx), %edx
shrl $0x4, %eax
andl $0x1c, %eax
movl %edx, (%rax,%rcx)
movq 0x2e8c(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_ArrayIndex
void OP_ArrayIndex(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 6) & 7;
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    uint32_t i = reg[b];
    assert(i < arrsize);
    struct array *ai = arr[i];
    assert(ai != NULL);
    assert(reg[c] < ai->length);
    reg[a] = ai->data[reg[c]];
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %rax
movl 0x4(%rsi,%rdi,4), %eax
movl %eax, %edx
shrl %edx
andl $0x1c, %edx
leaq 0x2e37(%rip), %rcx      # 0x40e0
movl (%rdx,%rcx), %edx
cmpq %rdx, 0x2e0d(%rip)      # 0x40c0
jbe 0x12f5
movq 0x2e64(%rip), %r8       # 0x4120
movq (%r8,%rdx,8), %rdx
testq %rdx, %rdx
je 0x130e
movl %eax, %r8d
andl $0x7, %r8d
movl (%rcx,%r8,4), %r8d
cmpl (%rdx), %r8d
jae 0x1327
movl 0x4(%rdx,%r8,4), %edx
shrl $0x4, %eax
andl $0x1c, %eax
movl %edx, (%rax,%rcx)
movq 0x2e2e(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
popq %rcx
jmpq *%rax
leaq 0xd08(%rip), %rdi       # 0x2004
leaq 0xd0d(%rip), %rsi       # 0x2010
leaq 0xd24(%rip), %rcx       # 0x202e
pushq $0x3b
jmp 0x133e
leaq 0xd44(%rip), %rdi       # 0x2059
leaq 0xcf4(%rip), %rsi       # 0x2010
leaq 0xd0b(%rip), %rcx       # 0x202e
pushq $0x3d
jmp 0x133e
leaq 0xd36(%rip), %rdi       # 0x2064
leaq 0xcdb(%rip), %rsi       # 0x2010
leaq 0xcf2(%rip), %rcx       # 0x202e
pushq $0x3e
popq %rdx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_ArrayAmendment
void OP_ArrayAmendment(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 6) & 7;
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    uint32_t i = reg[a];
    assert(i < arrsize);
    struct array *ai = arr[i];
    assert(ai != NULL);
    assert(reg[b] < ai->length);
    ai->data[reg[b]] = reg[c];
    if (i == 0) {
        program[reg[b]] = operations[reg[c] >> 28];
    }
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %rax
movl 0x4(%rsi,%rdi,4), %ecx
movl %ecx, %edx
shrl $0x4, %edx
andl $0x1c, %edx
leaq 0x2d88(%rip), %rax      # 0x40e0
movl (%rdx,%rax), %edx
cmpq %rdx, 0x2d5e(%rip)      # 0x40c0
jbe 0x13c7
movq 0x2db5(%rip), %r8       # 0x4120
movq (%r8,%rdx,8), %r9
testq %r9, %r9
je 0x13e0
movl %ecx, %r8d
shrl $0x3, %r8d
andl $0x7, %r8d
movl (%rax,%r8,4), %r10d
cmpl (%r9), %r10d
jae 0x13f9
andl $0x7, %ecx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x4(%r9,%r10,4)
testq %rdx, %rdx
jne 0x13b5
shrl $0x1c, %ecx
leaq 0x29be(%rip), %rdx      # 0x3d60
movq (%rdx,%rcx,8), %rcx
movq 0x2d6b(%rip), %rdx      # 0x4118
movl (%rax,%r8,4), %eax
movq %rcx, (%rdx,%rax,8)
movq 0x2d5c(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
popq %rcx
jmpq *%rax
leaq 0xc36(%rip), %rdi       # 0x2004
leaq 0xc3b(%rip), %rsi       # 0x2010
leaq 0xc9c(%rip), %rcx       # 0x2078
pushq $0x4a
jmp 0x1410
leaq 0xc72(%rip), %rdi       # 0x2059
leaq 0xc22(%rip), %rsi       # 0x2010
leaq 0xc83(%rip), %rcx       # 0x2078
pushq $0x4c
jmp 0x1410
leaq 0xca7(%rip), %rdi       # 0x20a7
leaq 0xc09(%rip), %rsi       # 0x2010
leaq 0xc6a(%rip), %rcx       # 0x2078
pushq $0x4d
popq %rdx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Add
void OP_Add(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 6) & 7;
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    reg[a] = reg[b] + reg[c];
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
movl 0x4(%rsi,%rdi,4), %eax
movl %eax, %ecx
andl $0x7, %ecx
movl %eax, %edx
shrl %edx
andl $0x1c, %edx
leaq 0x2cb3(%rip), %r8       # 0x40e0
movl (%r8,%rcx,4), %ecx
addl (%rdx,%r8), %ecx
shrl $0x4, %eax
andl $0x1c, %eax
movl %ecx, (%rax,%r8)
movq 0x2cd2(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Div
void OP_Div(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 6) & 7;
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    assert(reg[c] != 0);
    reg[a] = reg[b] / reg[c];
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
movl 0x4(%rsi,%rdi,4), %ecx
movl %ecx, %eax
andl $0x7, %eax
leaq 0x2c45(%rip), %r8       # 0x40e0
movl (%r8,%rax,4), %r9d
testl %r9d, %r9d
je 0x14cf
movl %ecx, %eax
shrl %eax
andl $0x1c, %eax
movl (%rax,%r8), %eax
xorl %edx, %edx
divl %r9d
shrl $0x4, %ecx
andl $0x1c, %ecx
movl %eax, (%rcx,%r8)
movq 0x2c53(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
jmpq *%rax
pushq %rax
leaq 0xbe4(%rip), %rdi       # 0x20bb
leaq 0xb32(%rip), %rsi       # 0x2010
leaq 0xbe2(%rip), %rcx       # 0x20c7
pushq $0x6f
popq %rdx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Alloc
void OP_Alloc(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    uint32_t capacity = reg[c];
    uint32_t i = 0;
    if (freelist_end == freelist) {
        i = arrsize;
        ++arrsize;
        arr = realloc(arr, sizeof(struct array *) * arrsize);
        assert(arr != NULL);
    } else {
        i = *(--freelist_end);
        *freelist_end = 0;
    }
    struct array *newarr = calloc(1 + capacity, sizeof(uint32_t));
    assert(newarr != NULL);
    newarr->length = capacity;
    arr[i] = newarr;
    reg[b] = i;
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi,%rdi,4), %r15d
movl %r15d, %eax
andl $0x7, %eax
leaq 0x2b61(%rip), %r12      # 0x40e0
movl (%r12,%rax,4), %ebp
movq 0x2b7e(%rip), %rax      # 0x4108
cmpq 0x2b6f(%rip), %rax      # 0x4100
je 0x15a8
leaq -0x4(%rax), %rcx
movq %rcx, 0x2b6a(%rip)      # 0x4108
movl -0x4(%rax), %r13d
andl $0x0, -0x4(%rax)
jmp 0x15da
movq 0x2b11(%rip), %r13      # 0x40c0
leaq 0x1(%r13), %rax
movq %rax, 0x2b06(%rip)      # 0x40c0
movq 0x2b5f(%rip), %rdi      # 0x4120
leaq 0x8(,%r13,8), %rsi
callq 0x1120
movq %rax, 0x2b4b(%rip)      # 0x4120
testq %rax, %rax
je 0x1649
leal 0x1(%rbp), %edi
pushq $0x4
popq %rsi
callq 0x10a0
testq %rax, %rax
je 0x162a
movl %ebp, (%rax)
movq 0x2b2d(%rip), %rcx      # 0x4120
movl %r13d, %edx
movq %rax, (%rcx,%rdx,8)
shrl %r15d
andl $0x1c, %r15d
movl %r13d, (%r15,%r12)
movq 0x2b0c(%rip), %rax      # 0x4118
movq 0x8(%rax,%r14,8), %rax
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0xae6(%rip), %rdi       # 0x2117
leaq 0x9d8(%rip), %rsi       # 0x2010
leaq 0xab2(%rip), %rcx       # 0x20f1
movl $0x97, %edx
callq 0x1080
leaq 0xaca(%rip), %rdi       # 0x211a
leaq 0x9b9(%rip), %rsi       # 0x2010
leaq 0xa93(%rip), %rcx       # 0x20f1
movl $0x91, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Abandon
void OP_Abandon(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t c = op & 7;
    uint32_t i = reg[c];
    assert(i < arrsize);
    assert(i != 0);
    assert(arr[i] != NULL);
    free(arr[i]);
    arr[i] = NULL;
    if (freelist_end - freelist == freelist_capacity) {
        uint32_t freelist_new_capacity = freelist_capacity == 0 ? 32 : freelist_capacity * 2;
        freelist = realloc(freelist, freelist_new_capacity * sizeof(uint32_t));
        memset(freelist + freelist_capacity, 0, (freelist_new_capacity - freelist_capacity) * sizeof(uint32_t));
        freelist_end = freelist + freelist_capacity;
        freelist_capacity = freelist_new_capacity;
    }
    *freelist_end++ = i;
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x4(%rsi,%rdi,4), %eax
andl $0x7, %eax
leaq 0x2a61(%rip), %rcx      # 0x40e0
movl (%rcx,%rax,4), %r12d
cmpq %r12, 0x2a36(%rip)      # 0x40c0
jbe 0x175a
testl %r12d, %r12d
je 0x1779
movq %rdi, %r14
movq 0x2a7d(%rip), %rax      # 0x4120
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x1798
movq %rsi, %rbx
callq 0x1030
movq 0x2a61(%rip), %rax      # 0x4120
andq $0x0, (%rax,%r12,8)
movq 0x2a3d(%rip), %r15      # 0x4108
movq 0x2a2e(%rip), %rdi      # 0x4100
movq %r15, %rcx
subq %rdi, %rcx
sarq $0x2, %rcx
movl 0x2a2e(%rip), %eax      # 0x4110
cmpq %rax, %rcx
jne 0x172c
leal (%rax,%rax), %ecx
testl %eax, %eax
pushq $0x20
popq %r13
cmovnel %ecx, %r13d
leaq (,%r13,4), %rsi
callq 0x1120
movq %rax, 0x29f8(%rip)      # 0x4100
movl 0x2a02(%rip), %ecx      # 0x4110
leaq (%rax,%rcx,4), %r15
movl %r13d, %edx
subl %ecx, %edx
shlq $0x2, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x1090
movl %r13d, 0x29e4(%rip)     # 0x4110
leaq 0x4(%r15), %rax
movq %rax, 0x29d1(%rip)      # 0x4108
movl %r12d, (%r15)
movq 0x29d7(%rip), %rax      # 0x4118
movq 0x8(%rax,%r14,8), %rax
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rax
leaq 0x8a3(%rip), %rdi       # 0x2004
leaq 0x8a8(%rip), %rsi       # 0x2010
leaq 0x9b7(%rip), %rcx       # 0x2126
movl $0xa3, %edx
callq 0x1080
leaq 0x9ce(%rip), %rdi       # 0x214e
leaq 0x889(%rip), %rsi       # 0x2010
leaq 0x998(%rip), %rcx       # 0x2126
movl $0xa4, %edx
callq 0x1080
leaq 0x9b6(%rip), %rdi       # 0x2155
leaq 0x86a(%rip), %rsi       # 0x2010
leaq 0x979(%rip), %rcx       # 0x2126
movl $0xa5, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Output
void OP_Output(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t c = op & 7;
    assert(reg[c] <= 255);
    putchar(reg[c]);
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x4(%rsi,%rdi,4), %eax
andl $0x7, %eax
leaq 0x2914(%rip), %rcx      # 0x40e0
movl (%rcx,%rax,4), %edi
cmpl $0x100, %edi            # imm = 0x100
jae 0x17fd
movq %rsi, %rbx
callq 0x1040
movq 0x2932(%rip), %rax      # 0x4118
movq 0x8(%rax,%r14,8), %rax
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x960(%rip), %rdi       # 0x2164
leaq 0x805(%rip), %rsi       # 0x2010
leaq 0x960(%rip), %rcx       # 0x2172
movl $0xb7, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Input
void OP_Input(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t c = op & 7;
    fflush(stdout);
    int ch = getchar();
    if (ch == EOF) {
        reg[c] = (uint32_t)(-1);
    } else {
        assert(0 <= ch && ch <= 255);
        reg[c] = (uint32_t)ch;
    }
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi,%rdi,4), %r15d
movq 0x279d(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
callq 0x1100
callq 0x10b0
cmpl $-0x1, %eax
je 0x186b
cmpl $0x100, %eax            # imm = 0x100
jb 0x186e
leaq 0x946(%rip), %rdi       # 0x2199
leaq 0x7b6(%rip), %rsi       # 0x2010
leaq 0x94d(%rip), %rcx       # 0x21ae
movl $0xc5, %edx
callq 0x1080
pushq $-0x1
popq %rax
andl $0x7, %r15d
leaq 0x2867(%rip), %rcx      # 0x40e0
movl %eax, (%rcx,%r15,4)
movq 0x2894(%rip), %rax      # 0x4118
movq 0x8(%rax,%r14,8), %rax
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_LoadProgram
void OP_LoadProgram(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t b = (op >> 3) & 7;
    uint32_t c = op & 7;
    uint32_t i = reg[b];
    if (UNLIKELY(i != 0)) {
        assert(i < arrsize);
        assert(arr[i] != NULL);
        uint32_t length = arr[i]->length;
        struct array *newprogram = malloc((length + 1) * sizeof(uint32_t));
        assert(newprogram != NULL);
        memcpy(newprogram, arr[i], (length + 1) * sizeof(uint32_t));
        free(arr[0]);
        arr[0] = newprogram;
        arr0 = newprogram;
        recalc();
    }
    pc = reg[c];
    assert(pc < arr[0]->length);
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x4(%rsi,%rdi,4), %r12d
movl %r12d, %eax
shrl %eax
andl $0x1c, %eax
leaq 0x2825(%rip), %r13      # 0x40e0
movl (%rax,%r13), %eax
testq %rax, %rax
jne 0x18fd
andl $0x7, %r12d
movl (%r13,%r12,4), %edi
movq 0x284c(%rip), %rax      # 0x4120
movq (%rax), %rax
cmpl (%rax), %edi
jae 0x1964
movq 0x2832(%rip), %rax      # 0x4118
movq (%rax,%rdi,8), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
cmpq %rax, 0x27bc(%rip)      # 0x40c0
jbe 0x1983
movq 0x2813(%rip), %rbp      # 0x4120
movq (%rbp,%rax,8), %r14
testq %r14, %r14
je 0x19a2
movl (%r14), %r15d
incl %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x10f0
testq %rax, %rax
je 0x19c1
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10e0
movq (%rbp), %rdi
callq 0x1030
movq 0x27c9(%rip), %rax      # 0x4120
movq %rbx, (%rax)
callq 0x19e0
jmp 0x18c4
leaq 0x8a8(%rip), %rdi       # 0x2213
leaq 0x69e(%rip), %rsi       # 0x2010
leaq 0x85b(%rip), %rcx       # 0x21d4
movl $0xde, %edx
callq 0x1080
leaq 0x67a(%rip), %rdi       # 0x2004
leaq 0x67f(%rip), %rsi       # 0x2010
leaq 0x83c(%rip), %rcx       # 0x21d4
movl $0xd2, %edx
callq 0x1080
leaq 0x7ac(%rip), %rdi       # 0x2155
leaq 0x660(%rip), %rsi       # 0x2010
leaq 0x81d(%rip), %rcx       # 0x21d4
movl $0xd3, %edx
callq 0x1080
leaq 0x838(%rip), %rdi       # 0x2200
leaq 0x641(%rip), %rsi       # 0x2010
leaq 0x7fe(%rip), %rcx       # 0x21d4
movl $0xd6, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: recalc
void recalc(void)
{
    struct array *a0 = arr[0];
    uint32_t length = a0->length;
    if (program) {
        free(program);
    }
    program = malloc(sizeof(OP) * length);
    assert(program != NULL);
    for (uint32_t i = 0; i < length; ++i) {
        uint32_t op = a0->data[i];
        program[i] = operations[op >> 28];
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2735(%rip), %rax      # 0x4120
movq (%rax), %rbx
movl (%rbx), %r14d
movq 0x2720(%rip), %rdi      # 0x4118
callq 0x1030
leaq (,%r14,8), %rdi
callq 0x10f0
movq %rax, 0x2707(%rip)      # 0x4118
testq %rax, %rax
je 0x1a47
xorl %eax, %eax
leaq 0x2341(%rip), %rcx      # 0x3d60
cmpq %rax, %r14
je 0x1a3f
movl 0x4(%rbx,%rax,4), %edx
shrl $0x1c, %edx
movq (%rcx,%rdx,8), %rdx
movq 0x26e2(%rip), %rsi      # 0x4118
movq %rdx, (%rsi,%rax,8)
incq %rax
jmp 0x1a1f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x85a(%rip), %rdi       # 0x22a8
leaq 0x5bb(%rip), %rsi       # 0x2010
leaq 0x7e6(%rip), %rcx       # 0x2242
movl $0x10b, %edx            # imm = 0x10B
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/minoki[P]icfpc2006/run_directthreaded_tailcall.c
// Function: OP_Orthography
void OP_Orthography(PARAMS)
{
    uint32_t op = arr0->data[pc];
    uint32_t a = (op >> 25) & 7;
    uint32_t value = op & ((UINT32_C(1) << 25) - 1);
    reg[a] = value;
    ++pc;
    MUSTTAIL return program[pc](ARGS);
}

// Assembly:
movl 0x4(%rsi,%rdi,4), %eax
movl %eax, %ecx
andl $0x1ffffff, %ecx        # imm = 0x1FFFFFF
shrl $0x17, %eax
andl $0x1c, %eax
leaq 0x2661(%rip), %rdx      # 0x40e0
movl %ecx, (%rax,%rdx)
movq 0x268f(%rip), %rax      # 0x4118
movq 0x8(%rax,%rdi,8), %rax
incq %rdi
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_sigmoid
void test_sigmoid() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {1, 0.5, 0};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_sigmoid(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5e45(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5d88(%rip), %xmm0     # 0x7010
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x3900
pushq $0xb
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_sigmoid_gradient
void test_sigmoid_gradient() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {0, 0.25, 0};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_sigmoid_gradient(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5ddc(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5d3f(%rip), %xmm0     # 0x7030
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x3959
pushq $0x14
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_relu
void test_relu() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {10e10, 0, 0};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_relu(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5d73(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5cf6(%rip), %xmm0     # 0x7050
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x39c2
pushq $0x1d
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_relu_gradient
void test_relu_gradient() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {1, 0, 0};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_relu_gradient(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5d0a(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5cad(%rip), %xmm0     # 0x7070
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x39e6
pushq $0x26
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_tanh
void test_tanh() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {1, 0, -1};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_tanh(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5ca1(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5c64(%rip), %xmm0     # 0x7090
movq %rsp, %rbx
movaps %xmm0, (%rbx)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x3a13
pushq $0x2f
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/activation_test.c
// Function: test_tanh_gradient
void test_tanh_gradient() {
  double x[] = {10e10, 0, -10e10};
  double y[3];
  double expected[] = {0, 1, 0};
  int n = sizeof(x)/sizeof(x[0]);
  morpheus_tanh_gradient(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, y, n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movaps 0x5c2f(%rip), %xmm0     # 0x70b0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
movabsq $-0x3dc8b78918000000, %rax # imm = 0xC2374876E8000000
movq %rax, 0x10(%rsi)
movaps 0x5c32(%rip), %xmm0     # 0x70d0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x3
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %edi
movq %r14, %rdx
callq 0x3a54
pushq $0x38
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x5b0f
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/gradient_descent_test.c
// Function: test_gradient_descent
void test_gradient_descent() {
  double X[] = {
    1, 3,
    1, 5,
    1, 10,
    1, 0,
    1, 4
  };
  double y[] = {9, 13, 23, 3, 11};

  double theta[] = {1, 1};
  double tmp_buffer[2*5];

  morpheus_params_t data;
  data.data.x = X;
  data.data.y = y;
  data.data.num_features = 2;
  data.data.num_examples = 5;
  data.data.layout = morpheus_row_major;
  data.memory_buffer = tmp_buffer;
  data.reg.type = morpheus_reg_none;

  double tmp_buffer2[2*5];
  morpheus_gradient_descent_params_t params;
  params.f = (morpheus_f)morpheus_ls_cost;
  params.df = (morpheus_df)morpheus_ls_gradient;
  params.max_iters = 4000;
  params.epsilon = 1e-10;
  params.alpha = 1e-2;
  params.memory_buffer = tmp_buffer2;
  params.num_variables = data.data.num_features;

  double theta_expected[] = {3, 2};
  morpheus_gradient_descent(&params, theta, &data);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(theta_expected, theta, data.data.num_features);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
leaq 0x5c51(%rip), %rsi      # 0x7140
pushq $0xa
popq %rcx
leaq 0x160(%rsp), %rax
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x5be9(%rip), %xmm0     # 0x70f0
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps 0x5bea(%rip), %xmm0     # 0x7100
movaps %xmm0, 0x10(%rcx)
movabsq $0x4026000000000000, %rdx # imm = 0x4026000000000000
movq %rdx, 0x20(%rcx)
movaps 0x5bf1(%rip), %xmm0     # 0x7120
leaq 0x88(%rsp), %rbx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movabsq $0x500000002, %rax      # imm = 0x500000002
movq %rax, 0x10(%rbx)
movl $0x15, 0x18(%rbx)
leaq 0x110(%rsp), %rax
movq %rax, 0x30(%rbx)
andl $0x0, 0x20(%rbx)
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
leaq 0x2850(%rip), %rax      # 0x3dc3
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x2851(%rip), %rax      # 0x3dd3
movq %rax, 0x8(%rdi)
movl $0xfa0, 0x10(%rdi)      # imm = 0xFA0
movaps 0x5b7c(%rip), %xmm0     # 0x7110
movups %xmm0, 0x18(%rdi)
leaq 0xc0(%rsp), %rax
movq %rax, 0x30(%rdi)
movl $0x2, 0x28(%rdi)
movaps 0x5b7e(%rip), %xmm0     # 0x7130
movq %rsp, %r15
movaps %xmm0, (%r15)
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3b94
movl 0x10(%rbx), %edx
pushq $0x28
popq %r8
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x5b0f
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/matrix_reduce_test.c
// Function: test_column_pred
void test_column_pred() {
  double x[] = {
    71, 11, 3,  9, 7,
    21, 7,  2,  23, 11,
    11, 32, 53, 49, 37,
    1,  24, 78, 90, 17
  };

  double y[5];

  double expected_row_major[] = {1, 7, 2, 9, 7};
  morpheus_column_predicate(fmin, morpheus_row_major, 4, 5, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_row_major, y, 5);

  double expected_col_major[] = {3, 2, 11, 1};
  morpheus_column_predicate(fmin, morpheus_col_major, 5, 4, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_col_major, y, 4);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
leaq 0x5a64(%rip), %rsi      # 0x75d0
leaq 0x80(%rsp), %r13
movl $0xa0, %edx
movq %r13, %rdi
callq 0x1140
movaps 0x5988(%rip), %xmm0     # 0x7510
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x5989(%rip), %xmm0     # 0x7520
movaps %xmm0, 0x10(%rbx)
movabsq $0x401c000000000000, %rax # imm = 0x401C000000000000
movq %rax, 0x20(%rbx)
movq 0xb418(%rip), %r15      # 0xcfc8
pushq $0x15
popq %rsi
pushq $0x4
popq %rbp
pushq $0x5
popq %r12
leaq 0x50(%rsp), %r14
movq %r15, %rdi
movl %ebp, %edx
movl %r12d, %ecx
movq %r13, %r8
movq %r14, %r9
callq 0x3de8
pushq $0x13
popq %r8
pushq $0x1
popq %r13
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
movl %r13d, %r9d
callq 0x5b0f
movaps 0x5aac(%rip), %xmm0     # 0x76a0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps 0x5a8e(%rip), %xmm0     # 0x7690
movaps %xmm0, (%rbx)
pushq $0x16
popq %rsi
movq %r15, %rdi
movl %r12d, %edx
movl %ebp, %ecx
leaq 0x80(%rsp), %r8
movq %r14, %r9
callq 0x3de8
pushq $0x17
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl %r13d, %r9d
callq 0x5b0f
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/matrix_reduce_test.c
// Function: test_row_pred
void test_row_pred() {
  double x[] = {
    71, 11, 3,  9, 7,
    21, 7,  2,  23, 11,
    11, 32, 53, 49, 37,
    1,  24, 78, 90, 17
  };

  double y[5];

  double expected_row_major[] = {71, 23, 53, 90};
  morpheus_row_predicate(fmax, morpheus_row_major, 4, 5, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_row_major, y, 4);

  double expected_col_major[] = {71, 32, 78, 90, 37};
  morpheus_row_predicate(fmax, morpheus_col_major, 5, 4, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_col_major, y, 5);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
leaq 0x5970(%rip), %rsi      # 0x75d0
leaq 0x80(%rsp), %rbx
movl $0xa0, %edx
movq %rbx, %rdi
callq 0x1140
movaps 0x5a04(%rip), %xmm0     # 0x7680
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps 0x59e4(%rip), %xmm0     # 0x7670
movaps %xmm0, (%r12)
movq 0xb350(%rip), %rdi      # 0xcfe8
pushq $0x15
popq %rsi
pushq $0x4
popq %r15
pushq $0x5
popq %rbp
leaq 0x50(%rsp), %r14
movl %r15d, %edx
movl %ebp, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x3f20
pushq $0x26
popq %r8
pushq $0x1
popq %r13
movq %r12, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
movl %r13d, %r9d
callq 0x5b0f
movaps 0x5857(%rip), %xmm0     # 0x7530
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movaps 0x5856(%rip), %xmm0     # 0x7540
movaps %xmm0, 0x10(%r12)
movabsq $0x4042800000000000, %rax # imm = 0x4042800000000000
movq %rax, 0x20(%r12)
pushq $0x16
popq %rsi
movq 0xb2df(%rip), %rdi      # 0xcfe8
movl %ebp, %edx
movl %r15d, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x3f20
pushq $0x2a
popq %r8
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl %r13d, %r9d
callq 0x5b0f
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/aligusnet[P]morpheus/tests/matrix_reduce_test.c
// Function: test_column_max_index
void test_column_max_index() {
  double x[] = {
    71, 11, 3,  9, 7,
    21, 7,  2,  23, 11,
    11, 32, 53, 49, 37,
    1,  24, 78, 90, 17
  };

  double y[5];
  int is[5];

  double expected_y_row_major[] = {71, 32, 78, 90, 37};
  int expected_is_row_major[] = {0, 2, 3, 3, 2};
  morpheus_column_max_index(morpheus_row_major, 4, 5, x, y, is);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y_row_major, y, 5);
  TEST_ASSERT_EQUAL_INT_ARRAY(expected_is_row_major, is, 5);

  double expected_y_col_major[] = {71, 23, 53, 90};
  int expected_is_col_major[] = {0, 3, 2, 3};
  morpheus_column_max_index(morpheus_col_major, 5, 4, x, y, is);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y_col_major, y, 4);
  TEST_ASSERT_EQUAL_INT_ARRAY(expected_is_col_major, is, 4);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
leaq 0x5877(%rip), %rsi      # 0x75d0
leaq 0xe0(%rsp), %r12
movl $0xa0, %edx
movq %r12, %rdi
callq 0x1140
movaps 0x57bb(%rip), %xmm0     # 0x7530
leaq 0x80(%rsp), %rbp
movaps %xmm0, (%rbp)
movaps 0x57b8(%rip), %xmm0     # 0x7540
movaps %xmm0, 0x10(%rbp)
movabsq $0x4042800000000000, %rax # imm = 0x4042800000000000
movq %rax, 0x20(%rbp)
movaps 0x57ef(%rip), %xmm0     # 0x7590
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movl $0x2, 0x10(%rbx)
pushq $0x15
popq %rdi
pushq $0x4
popq %rsi
pushq $0x5
popq %r13
leaq 0xb0(%rsp), %r15
leaq 0x40(%rsp), %r14
movl %r13d, %edx
movq %r12, %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x405a
pushq $0x3b
popq %r8
pushq $0x1
popq %r12
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movl %r12d, %r9d
callq 0x5b0f
movl %r12d, (%rsp)
pushq $0x3c
popq %r8
pushq $0x14
popq %r9
movq %rbx, %rdi
movq %r14, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x55b6
movaps 0x586a(%rip), %xmm0     # 0x7680
leaq 0x60(%rsp), %rbx
movaps %xmm0, 0x10(%rbx)
movaps 0x584a(%rip), %xmm0     # 0x7670
movaps %xmm0, (%rbx)
movaps 0x5740(%rip), %xmm0     # 0x7570
leaq 0x10(%rsp), %rbp
movaps %xmm0, (%rbp)
pushq $0x16
popq %rdi
movl %r13d, %esi
pushq $0x4
popq %r13
movl %r13d, %edx
leaq 0xe0(%rsp), %rcx
movq %r15, %r8
movq %r14, %r9
callq 0x405a
pushq $0x41
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movl %r12d, %r9d
callq 0x5b0f
movl %r12d, (%rsp)
pushq $0x42
popq %r8
movq %rbp, %rdi
movq %r14, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
pushq $0x14
popq %r9
callq 0x55b6
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq