LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_inverse
void test_inverse() {
  double x[] = {1.0, 0.0, 2.0,
                -1.0, 5.0, 0.0,
                0.0, 3.0, -9.0};

  const int n = 3;
  double inversed_x[] =
    {0.88235294117647067, -0.11764705882352944, 0.19607843137254904,
     0.17647058823529416, 0.17647058823529413, 0.03921568627450981,
     0.058823529411764663, 0.058823529411764719, -0.098039215686274522};

  int pivot[n];
  double workspace[n*n];

  int rc = morpheus_inverse(n, x, pivot, workspace);

  TEST_ASSERT_EQUAL_INT(0, rc);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(inversed_x, x, n*n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsp, %r15
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x30(%rbx)
movq $0x0, 0x40(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rbx)
movaps 0x4ef3(%rip), %xmm0     # 0x7740
movaps %xmm0, 0x10(%rbx)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x20(%rbx)
movaps 0x4eea(%rip), %xmm0     # 0x7750
movups %xmm0, 0x38(%rbx)
leaq 0x507f(%rip), %rsi      # 0x78f0
leaq 0x60(%rsp), %r14
movl $0x9, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rsp, %rdx
leaq 0x10(%rsp), %rcx
movl $0x3, %edi
movq %rbx, %rsi
callq 0x4bbb
movslq %eax, %rsi
movl $0x14, %ecx
xorl %edi, %edi
xorl %edx, %edx
movl $0x14, %r8d
callq 0x5a32
movl $0x15, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
movq %r15, %rsp
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_ger_rm
void test_ger_rm() {
  double x[] = {1, 2, 3};
  double y[] = {4, 5, 6};
  double a[] = {29, 23, 19,
                17, 13, 11,
                7, 3, 1};
  double alpha = -1;
  double n = 3;

  double expected_a[] = {25, 18, 13,
                         9, 3, -1,
                         -5, -12, -17};
  morpheus_dger(morpheus_row_major, n, n, alpha, x, y, a);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_a, a, n*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movaps 0x50a4(%rip), %xmm0     # 0x7990
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movabsq $0x4008000000000000, %rcx # imm = 0x4008000000000000
movq %rcx, 0x10(%rax)
movaps 0x50a7(%rip), %xmm0     # 0x79b0
movq %rsp, %r8
movaps %xmm0, (%r8)
movabsq $0x4018000000000000, %rcx # imm = 0x4018000000000000
movq %rcx, 0x10(%r8)
leaq 0x50ab(%rip), %rsi      # 0x79d0
leaq 0x90(%rsp), %rbx
movl $0x9, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x5001(%rip), %rsi      # 0x7940
leaq 0x40(%rsp), %r14
movl $0x9, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movsd 0x4f39(%rip), %xmm0     # 0x7890
movl $0x15, %edi
movl $0x3, %esi
movl $0x3, %edx
movq %rax, %rcx
movq %rbx, %r9
callq 0x4c37
movl $0x26, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_ger_cm
void test_ger_cm() {
  double x[] = {1, 2, 3};
  double y[] = {4, 5, 6};
  double a[] = {29, 23, 19,
                17, 13, 11,
                7, 3, 1};
  double alpha = -1;
  double n = 3;

  double expected_a[] = {25, 15, 7,
                         12, 3, -4,
                         1, -9, -17};
  morpheus_dger(morpheus_col_major, n, n, alpha, x, y, a);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_a, a, n*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movaps 0x4fe5(%rip), %xmm0     # 0x7990
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movabsq $0x4008000000000000, %rcx # imm = 0x4008000000000000
movq %rcx, 0x10(%rax)
movaps 0x4fe8(%rip), %xmm0     # 0x79b0
movq %rsp, %r8
movaps %xmm0, (%r8)
movabsq $0x4018000000000000, %rcx # imm = 0x4018000000000000
movq %rcx, 0x10(%r8)
leaq 0x4fec(%rip), %rsi      # 0x79d0
leaq 0x90(%rsp), %rbx
movl $0x9, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x5022(%rip), %rsi      # 0x7a20
leaq 0x40(%rsp), %r14
movl $0x9, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movsd 0x4e7a(%rip), %xmm0     # 0x7890
movl $0x16, %edi
movl $0x3, %esi
movl $0x3, %edx
movq %rax, %rcx
movq %rbx, %r9
callq 0x4c37
movl $0x36, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_ger_rm_nonsquare
void test_ger_rm_nonsquare() {
  double x[] = {1, 2, 3, 4};
  double y[] = {5, 6, 7};
  double a[] = {41, 37, 31,
                29, 23, 19,
                17, 13, 11,
                7, 3, 1};
  double alpha = -2;
  double m = 4;
  double n = 3;

  double expected_a[] = {31, 25, 17,
                         9, -1, -9,
                         -13, -23, -31,
                         -33, -45, -55};
  morpheus_dger(morpheus_row_major, m, n, alpha, x, y, a);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_a, a, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movaps 0x57b6(%rip), %xmm0     # 0x8220
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0x5796(%rip), %xmm0     # 0x8210
movaps %xmm0, (%rax)
movaps 0x504c(%rip), %xmm0     # 0x7ad0
movq %rsp, %r8
movaps %xmm0, (%r8)
movabsq $0x401c000000000000, %rcx # imm = 0x401C000000000000
movq %rcx, 0x10(%r8)
leaq 0x5050(%rip), %rsi      # 0x7af0
leaq 0xa0(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x4fb6(%rip), %rsi      # 0x7a70
leaq 0x40(%rsp), %r14
movl $0xc, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movsd 0x4dc6(%rip), %xmm0     # 0x7898
movl $0x15, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %rax, %rcx
movq %rbx, %r9
callq 0x4c37
movl $0x49, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0xc, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_ger_cm_nonsquare
void test_ger_cm_nonsquare() {
  double x[] = {1, 2, 3, 4};
  double y[] = {5, 6, 7};
  double a[] = {41, 37, 31, 29,
                23, 19, 17, 13,
                11, 7, 3, 1};
  double alpha = -2;
  double m = 4;
  double n = 3;

  double expected_a[] = {31, 17, 1, -11,
                         11, -5, -19, -35,
                         -3,-21, -39, -55};
  morpheus_dger(morpheus_col_major, m, n, alpha, x, y, a);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_a, a, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movaps 0x56fa(%rip), %xmm0     # 0x8220
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps 0x56da(%rip), %xmm0     # 0x8210
movaps %xmm0, (%rax)
movaps 0x4f90(%rip), %xmm0     # 0x7ad0
movq %rsp, %r8
movaps %xmm0, (%r8)
movabsq $0x401c000000000000, %rcx # imm = 0x401C000000000000
movq %rcx, 0x10(%r8)
leaq 0x4f94(%rip), %rsi      # 0x7af0
leaq 0xa0(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x4fda(%rip), %rsi      # 0x7b50
leaq 0x40(%rsp), %r14
movl $0xc, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movsd 0x4d0a(%rip), %xmm0     # 0x7898
movl $0x16, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %rax, %rcx
movq %rbx, %r9
callq 0x4c37
movl $0x5a, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0xc, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemm_rm_notransp
void test_gemm_rm_notransp() {
  double a[] = {1, 2, 3,
                4, 5, 6};
  double b[] = {7, 10, 13, 16,
                8, 11, 14, 17,
                9, 12, 15, 18};
  double c[] = {10, 20, 30, 40,
                50, 60, 70, 80};
  int m = 2;
  int n = 4;
  int k = 3;
  double alpha = 1;
  double beta = -1;

  double expected_c[] = {40, 48, 56, 64,
                         72, 107, 142, 177};
  morpheus_dgemm(morpheus_row_major, morpheus_no_trans, morpheus_no_trans,
                 m, n, k, alpha, a, b, beta, c);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_c, c, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movaps 0x4b7e(%rip), %xmm0     # 0x7760
movq %rsp, %r10
movaps %xmm0, (%r10)
movaps 0x4b80(%rip), %xmm0     # 0x7770
movaps %xmm0, 0x10(%r10)
movaps 0x4b84(%rip), %xmm0     # 0x7780
movaps %xmm0, 0x20(%r10)
leaq 0x4fa8(%rip), %rsi      # 0x7bb0
leaq 0xb0(%rsp), %rax
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x505e(%rip), %xmm0     # 0x7c80
leaq 0x70(%rsp), %rbx
movaps %xmm0, 0x30(%rbx)
movaps 0x503e(%rip), %xmm0     # 0x7c70
movaps %xmm0, 0x20(%rbx)
movaps 0x5023(%rip), %xmm0     # 0x7c60
movaps %xmm0, 0x10(%rbx)
movaps 0x5008(%rip), %xmm0     # 0x7c50
movaps %xmm0, (%rbx)
movaps 0x506e(%rip), %xmm0     # 0x7cc0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x30(%r14)
movaps 0x504d(%rip), %xmm0     # 0x7cb0
movaps %xmm0, 0x20(%r14)
movaps 0x5031(%rip), %xmm0     # 0x7ca0
movaps %xmm0, 0x10(%r14)
movaps 0x5015(%rip), %xmm0     # 0x7c90
movaps %xmm0, (%r14)
subq $0x8, %rsp
movsd 0x4c15(%rip), %xmm0     # 0x78a0
movsd 0x4bfd(%rip), %xmm1     # 0x7890
movl $0x15, %edi
movl $0xb, %esi
movl $0xb, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq 0x4c7b
addq $0x20, %rsp
movl $0x6f, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemm_cm_notransp
void test_gemm_cm_notransp() {
  double a[] = {-2, -8,
                -4, -10,
                -6, -12};
  double b[] = {7, 8, 9,
                10, 11, 12,
                13, 14, 15,
                16, 17, 18};
  double c[] = {10, 50,
                20, 60,
                30, 70,
                40, 80};
  int m = 2;
  int n = 4;
  int k = 3;
  double alpha = -0.5;
  double beta = -1;

  double expected_c[] = {40, 72,
                         48, 107,
                         56, 142,
                         64, 177};
  morpheus_dgemm(morpheus_col_major, morpheus_no_trans, morpheus_no_trans,
                 m, n, k, alpha, a, b, beta, c);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_c, c, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movaps 0x4a96(%rip), %xmm0     # 0x7790
movq %rsp, %r10
movaps %xmm0, (%r10)
movaps 0x4a98(%rip), %xmm0     # 0x77a0
movaps %xmm0, 0x10(%r10)
movaps 0x4a9c(%rip), %xmm0     # 0x77b0
movaps %xmm0, 0x20(%r10)
leaq 0x4fb0(%rip), %rsi      # 0x7cd0
leaq 0xb0(%rsp), %rax
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x4f06(%rip), %xmm0     # 0x7c40
leaq 0x70(%rsp), %rbx
movaps %xmm0, 0x30(%rbx)
movaps 0x4ee6(%rip), %xmm0     # 0x7c30
movaps %xmm0, 0x20(%rbx)
movaps 0x4ecb(%rip), %xmm0     # 0x7c20
movaps %xmm0, 0x10(%rbx)
movaps 0x4eb0(%rip), %xmm0     # 0x7c10
movaps %xmm0, (%rbx)
movaps 0x5036(%rip), %xmm0     # 0x7da0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x30(%r14)
movaps 0x5015(%rip), %xmm0     # 0x7d90
movaps %xmm0, 0x20(%r14)
movaps 0x4ff9(%rip), %xmm0     # 0x7d80
movaps %xmm0, 0x10(%r14)
movaps 0x4fdd(%rip), %xmm0     # 0x7d70
movaps %xmm0, (%r14)
subq $0x8, %rsp
movsd 0x4b05(%rip), %xmm0     # 0x78a8
movsd 0x4ae5(%rip), %xmm1     # 0x7890
movl $0x16, %edi
movl $0xb, %esi
movl $0xb, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq 0x4c7b
addq $0x20, %rsp
movl $0x8a, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemm_rm_transp
void test_gemm_rm_transp() {
  double a[] = {1, 4,
                2, 5,
                3, 6};
  double b[] = {7, 8, 9,
                10, 11, 12,
                13, 14, 15,
                16, 17, 18};
  double c[] = {10, 20, 30, 40,
                50, 60, 70, 80};
  int m = 2;
  int n = 4;
  int k = 3;
  double alpha = 1;
  double beta = -1;

  double expected_c[] = {40, 48, 56, 64,
                         72, 107, 142, 177};
  morpheus_dgemm(morpheus_row_major, morpheus_trans, morpheus_trans,
                 m, n, k, alpha, a, b, beta, c);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_c, c, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movaps 0x49ae(%rip), %xmm0     # 0x77c0
movq %rsp, %r10
movaps %xmm0, (%r10)
movaps 0x49b0(%rip), %xmm0     # 0x77d0
movaps %xmm0, 0x10(%r10)
movaps 0x49b4(%rip), %xmm0     # 0x77e0
movaps %xmm0, 0x20(%r10)
leaq 0x4e98(%rip), %rsi      # 0x7cd0
leaq 0xb0(%rsp), %rax
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x4e2e(%rip), %xmm0     # 0x7c80
leaq 0x70(%rsp), %rbx
movaps %xmm0, 0x30(%rbx)
movaps 0x4e0e(%rip), %xmm0     # 0x7c70
movaps %xmm0, 0x20(%rbx)
movaps 0x4df3(%rip), %xmm0     # 0x7c60
movaps %xmm0, 0x10(%rbx)
movaps 0x4dd8(%rip), %xmm0     # 0x7c50
movaps %xmm0, (%rbx)
movaps 0x4e3e(%rip), %xmm0     # 0x7cc0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x30(%r14)
movaps 0x4e1d(%rip), %xmm0     # 0x7cb0
movaps %xmm0, 0x20(%r14)
movaps 0x4e01(%rip), %xmm0     # 0x7ca0
movaps %xmm0, 0x10(%r14)
movaps 0x4de5(%rip), %xmm0     # 0x7c90
movaps %xmm0, (%r14)
subq $0x8, %rsp
movsd 0x49e5(%rip), %xmm0     # 0x78a0
movsd 0x49cd(%rip), %xmm1     # 0x7890
movl $0x15, %edi
movl $0xc, %esi
movl $0xc, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq 0x4c7b
addq $0x20, %rsp
movl $0xa1, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemm_cm_transp
void test_gemm_cm_transp() {
  double a[] = {1, 2, 3,
                4, 5, 6};
  double b[] = {7, 8, 9,
                10, 11, 12,
                13, 14, 15,
                16, 17, 18};
  double c[] = {1, 5,
                2, 6,
                3, 7,
                4, 8};
  int m = 2;
  int n = 4;
  int k = 3;
  double alpha = 1;
  double beta = -10;

  double expected_c[] = {40, 72,
                         48, 107,
                         56, 142,
                         64, 177};
  morpheus_dgemm(morpheus_col_major, morpheus_trans, morpheus_no_trans,
                 m, n, k, alpha, a, b, beta, c);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_c, c, m*n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movaps 0x4836(%rip), %xmm0     # 0x7760
movq %rsp, %r10
movaps %xmm0, (%r10)
movaps 0x4838(%rip), %xmm0     # 0x7770
movaps %xmm0, 0x10(%r10)
movaps 0x483c(%rip), %xmm0     # 0x7780
movaps %xmm0, 0x20(%r10)
leaq 0x4d80(%rip), %rsi      # 0x7cd0
leaq 0xb0(%rsp), %rax
movl $0xc, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x4df6(%rip), %xmm0     # 0x7d60
leaq 0x70(%rsp), %rbx
movaps %xmm0, 0x30(%rbx)
movaps 0x4dd6(%rip), %xmm0     # 0x7d50
movaps %xmm0, 0x20(%rbx)
movaps 0x4dbb(%rip), %xmm0     # 0x7d40
movaps %xmm0, 0x10(%rbx)
movaps 0x4da0(%rip), %xmm0     # 0x7d30
movaps %xmm0, (%rbx)
movaps 0x4e06(%rip), %xmm0     # 0x7da0
leaq 0x30(%rsp), %r14
movaps %xmm0, 0x30(%r14)
movaps 0x4de5(%rip), %xmm0     # 0x7d90
movaps %xmm0, 0x20(%r14)
movaps 0x4dc9(%rip), %xmm0     # 0x7d80
movaps %xmm0, 0x10(%r14)
movaps 0x4dad(%rip), %xmm0     # 0x7d70
movaps %xmm0, (%r14)
subq $0x8, %rsp
movsd 0x48cd(%rip), %xmm0     # 0x78a0
movsd 0x48d5(%rip), %xmm1     # 0x78b0
movl $0x16, %edi
movl $0xc, %esi
movl $0xb, %edx
movl $0x2, %ecx
movl $0x4, %r8d
movl $0x3, %r9d
pushq %rbx
pushq %rax
pushq %r10
callq 0x4c7b
addq $0x20, %rsp
movl $0xbb, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemv_rm_notransp
void test_gemv_rm_notransp() {
  double a[] = {1, 2, 3,
                4, 5, 6};
  double x[] = {-14, -16, -18};
  double y[] = {2, 4};
  int nrows = 2;
  int ncols = 3;
  double alpha = -0.5;
  double beta = -5;

  double expected_y[] = {40, 102};
  morpheus_dgemv(morpheus_row_major, morpheus_no_trans, nrows, ncols,
                 alpha, a, x, beta, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y, y, nrows);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movaps 0x471e(%rip), %xmm0     # 0x7760
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movaps 0x471e(%rip), %xmm0     # 0x7770
movaps %xmm0, 0x10(%r8)
movaps 0x4722(%rip), %xmm0     # 0x7780
movaps %xmm0, 0x20(%r8)
movaps 0x4d46(%rip), %xmm0     # 0x7db0
leaq 0x30(%rsp), %r9
movaps %xmm0, (%r9)
movabsq $-0x3fce000000000000, %rax # imm = 0xC032000000000000
movq %rax, 0x10(%r9)
movaps 0x47e8(%rip), %xmm0     # 0x7870
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x47e9(%rip), %xmm0     # 0x7880
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq %rbx, (%rsp)
movsd 0x47fc(%rip), %xmm0     # 0x78a8
movsd 0x4804(%rip), %xmm1     # 0x78b8
movl $0x15, %edi
movl $0xb, %esi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x4b31
movl $0xcb, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemv_cm_notransp
void test_gemv_cm_notransp() {
  double a[] = {1, 4,
                2, 5,
                3, 6};
  double x[] = {-14, -16, -18};
  double y[] = {2, 4};
  int nrows = 2;
  int ncols = 3;
  double alpha = -0.5;
  double beta = -5;

  double expected_y[] = {40, 102};
  morpheus_dgemv(morpheus_col_major, morpheus_no_trans, nrows, ncols,
                 alpha, a, x, beta, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y, y, nrows);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movaps 0x46b9(%rip), %xmm0     # 0x77c0
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movaps 0x46b9(%rip), %xmm0     # 0x77d0
movaps %xmm0, 0x10(%r8)
movaps 0x46bd(%rip), %xmm0     # 0x77e0
movaps %xmm0, 0x20(%r8)
movaps 0x4c81(%rip), %xmm0     # 0x7db0
leaq 0x30(%rsp), %r9
movaps %xmm0, (%r9)
movabsq $-0x3fce000000000000, %rax # imm = 0xC032000000000000
movq %rax, 0x10(%r9)
movaps 0x4723(%rip), %xmm0     # 0x7870
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x4724(%rip), %xmm0     # 0x7880
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq %rbx, (%rsp)
movsd 0x4737(%rip), %xmm0     # 0x78a8
movsd 0x473f(%rip), %xmm1     # 0x78b8
movl $0x16, %edi
movl $0xb, %esi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x4b31
movl $0xdc, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemv_rm_transp
void test_gemv_rm_transp() {
  double a[] = {1, 4,
                2, 5,
                3, 6};
  double x[] = {-14, -16, -18};
  double y[] = {2, 4};
  int nrows = 3;
  int ncols = 2;
  double alpha = -0.5;
  double beta = -5;

  double expected_y[] = {40, 102};
  morpheus_dgemv(morpheus_row_major, morpheus_trans, nrows, ncols,
                 alpha, a, x, beta, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y, y, ncols);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movaps 0x45f4(%rip), %xmm0     # 0x77c0
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movaps 0x45f4(%rip), %xmm0     # 0x77d0
movaps %xmm0, 0x10(%r8)
movaps 0x45f8(%rip), %xmm0     # 0x77e0
movaps %xmm0, 0x20(%r8)
movaps 0x4bbc(%rip), %xmm0     # 0x7db0
leaq 0x30(%rsp), %r9
movaps %xmm0, (%r9)
movabsq $-0x3fce000000000000, %rax # imm = 0xC032000000000000
movq %rax, 0x10(%r9)
movaps 0x465e(%rip), %xmm0     # 0x7870
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x465f(%rip), %xmm0     # 0x7880
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq %rbx, (%rsp)
movsd 0x4672(%rip), %xmm0     # 0x78a8
movsd 0x467a(%rip), %xmm1     # 0x78b8
movl $0x15, %edi
movl $0xc, %esi
movl $0x3, %edx
movl $0x2, %ecx
callq 0x4b31
movl $0xed, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_gemv_cm_transp
void test_gemv_cm_transp() {
  double a[] = {1, 2, 3,
                4, 5, 6};
  double x[] = {-14, -16, -18};
  double y[] = {2, 4};
  int nrows = 3;
  int ncols = 2;
  double alpha = -0.5;
  double beta = -5;

  double expected_y[] = {40, 102};
  morpheus_dgemv(morpheus_col_major, morpheus_trans, nrows, ncols,
                 alpha, a, x, beta, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y, y, ncols);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movaps 0x44cf(%rip), %xmm0     # 0x7760
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movaps 0x44cf(%rip), %xmm0     # 0x7770
movaps %xmm0, 0x10(%r8)
movaps 0x44d3(%rip), %xmm0     # 0x7780
movaps %xmm0, 0x20(%r8)
movaps 0x4af7(%rip), %xmm0     # 0x7db0
leaq 0x30(%rsp), %r9
movaps %xmm0, (%r9)
movabsq $-0x3fce000000000000, %rax # imm = 0xC032000000000000
movq %rax, 0x10(%r9)
movaps 0x4599(%rip), %xmm0     # 0x7870
leaq 0x20(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x459a(%rip), %xmm0     # 0x7880
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq %rbx, (%rsp)
movsd 0x45ad(%rip), %xmm0     # 0x78a8
movsd 0x45b5(%rip), %xmm1     # 0x78b8
movl $0x16, %edi
movl $0xc, %esi
movl $0x3, %edx
movl $0x2, %ecx
callq 0x4b31
movl $0xfd, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_dcopy
void test_dcopy() {
  double x[] = {11, -2, 13, -4, 15, -6};
  double y[6];
  int n = 6;
  morpheus_dcopy(n, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(x, y, n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movaps 0x449d(%rip), %xmm0     # 0x77f0
leaq 0x30(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x449e(%rip), %xmm0     # 0x7800
movaps %xmm0, 0x10(%rbx)
movaps 0x44a3(%rip), %xmm0     # 0x7810
movaps %xmm0, 0x20(%rbx)
movq %rsp, %r14
movl $0x6, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4b04
movl $0x105, %r8d            # imm = 0x105
movq %rbx, %rdi
movq %r14, %rsi
movl $0x6, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_ddot
void test_ddot() {
  double x[] = {7, 13, 11, 19, 17};
  double y[] = {3, 17, 21, 29, 33};
  int n = sizeof(x)/sizeof(x[0]);

  double expected = 7*3 + 13*17 + 11*21 + 19*29 + 17*33;
  TEST_ASSERT_EQUAL_DOUBLE(expected, morpheus_ddot(n, x, y));
}

// Assembly:
subq $0x58, %rsp
movaps 0x4420(%rip), %xmm0     # 0x7820
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps 0x4421(%rip), %xmm0     # 0x7830
movaps %xmm0, 0x10(%rsi)
movabsq $0x4031000000000000, %rax # imm = 0x4031000000000000
movq %rax, 0x20(%rsi)
movaps 0x4418(%rip), %xmm0     # 0x7840
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps 0x441b(%rip), %xmm0     # 0x7850
movaps %xmm0, 0x10(%rdx)
movabsq $0x4040800000000000, %rax # imm = 0x4040800000000000
movq %rax, 0x20(%rdx)
movl $0x5, %edi
callq 0x4ba8
movaps %xmm0, %xmm2
movsd 0x446c(%rip), %xmm0     # 0x78c8
movsd 0x446c(%rip), %xmm1     # 0x78d0
movl $0x117, %esi            # imm = 0x117
xorl %edi, %edi
callq 0x61fc
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_dscal
void test_dscal() {
  double x[] = {1, 2, 3, 4, 5};
  double alpha = 3;
  double expected_x[] = {3, 6, 9, 12, 15};
  int n = sizeof(x)/sizeof(x[0]);

  morpheus_dscal(n, alpha, x);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_x, x, n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movaps 0x4293(%rip), %xmm0     # 0x7760
leaq 0x30(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps 0x4294(%rip), %xmm0     # 0x7770
movaps %xmm0, 0x10(%rbx)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x20(%rbx)
movaps 0x42eb(%rip), %xmm0     # 0x77e0
movq %rsp, %r14
movaps %xmm0, (%r14)
movaps 0x435d(%rip), %xmm0     # 0x7860
movaps %xmm0, 0x10(%r14)
movabsq $0x402e000000000000, %rax # imm = 0x402E000000000000
movq %rax, 0x20(%r14)
movsd 0x43ca(%rip), %xmm0     # 0x78e8
movl $0x5, %edi
movq %rbx, %rsi
callq 0x4afa
movl $0x129, %r8d            # imm = 0x129
movq %r14, %rdi
movq %rbx, %rsi
movl $0x5, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_daxpy
void test_daxpy() {
  double x[] = {1, 2, 3, 4, 5, 6, 7};
  double y[] = {-1, 1, -1, 1, -1, 1, -1};
  double alpha = -1;
  int n = sizeof(x)/sizeof(x[0]);

  double expected_y[] = {-2, -1, -4, -3, -6, -5, -8};
  morpheus_daxpy(n, alpha, x, y);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_y, y, n);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movaps 0x48ee(%rip), %xmm0     # 0x7e50
leaq 0x80(%rsp), %rsi
movaps %xmm0, 0x20(%rsi)
movaps 0x48cb(%rip), %xmm0     # 0x7e40
movaps %xmm0, 0x10(%rsi)
movaps 0x48b0(%rip), %xmm0     # 0x7e30
movaps %xmm0, (%rsi)
movabsq $0x401c000000000000, %rax # imm = 0x401C000000000000
movq %rax, 0x30(%rsi)
movaps 0x48f8(%rip), %xmm0     # 0x7e90
leaq 0x40(%rsp), %rbx
movaps %xmm0, 0x20(%rbx)
movaps 0x48d8(%rip), %xmm0     # 0x7e80
movaps %xmm0, 0x10(%rbx)
movaps 0x48bd(%rip), %xmm0     # 0x7e70
movaps %xmm0, (%rbx)
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x30(%rbx)
movabsq $-0x3fe0000000000000, %rax # imm = 0xC020000000000000
movq %rsp, %r14
movq %rax, 0x30(%r14)
movaps 0x48f4(%rip), %xmm0     # 0x7ed0
movaps %xmm0, 0x20(%r14)
movaps 0x48d8(%rip), %xmm0     # 0x7ec0
movaps %xmm0, 0x10(%r14)
movaps 0x48bc(%rip), %xmm0     # 0x7eb0
movaps %xmm0, (%r14)
movsd 0x4290(%rip), %xmm0     # 0x7890
movl $0x7, %edi
movq %rbx, %rdx
callq 0x4b8b
movl $0x134, %r8d            # imm = 0x134
movq %r14, %rdi
movq %rbx, %rsi
movl $0x7, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/simple_blas_test.c
// Function: test_identity
void test_identity() {
  int n = 7;
  double identity[100];
  double expected[100] = {1, 0, 0, 0, 0, 0, 0,
                       0, 1, 0, 0, 0, 0, 0,
                       0, 0, 1, 0, 0, 0, 0,
                       0, 0, 0, 1, 0, 0, 0,
                       0, 0, 0, 0, 1, 0, 0,
                       0, 0, 0, 0, 0, 1, 0,
                       0, 0, 0, 0, 0, 0, 1};
  for (int i = 49; i < 100; ++i) {
    identity[i] = expected[i] = 100+i; // guard values
  }

  morpheus_identity(n, identity);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, identity, 100);
}

// Assembly:
pushq %rbx
subq $0x640, %rsp            # imm = 0x640
leaq 0x48ab(%rip), %rsi      # 0x7ef0
movq %rsp, %rdi
movl $0x320, %edx            # imm = 0x320
callq 0x1150
movl $0x31, %eax
leal 0x64(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, (%rsp,%rax,8)
movsd %xmm0, 0x320(%rsp,%rax,8)
incq %rax
cmpq $0x64, %rax
jne 0x3657
leaq 0x320(%rsp), %rbx
movl $0x7, %edi
movq %rbx, %rsi
callq 0x4d07
movq %rsp, %rdi
movl $0x146, %r8d            # imm = 0x146
movq %rbx, %rsi
movl $0x64, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x640, %rsp            # imm = 0x640
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_mean
void test_mean() {
  double x[] = {35,32,213,54,81,92,63,70};
  int n = sizeof(x)/sizeof(x[0]);

  double m = morpheus_mean(n, x);
  TEST_ASSERT_EQUAL_DOUBLE(80, m);
}

// Assembly:
subq $0x48, %rsp
movaps 0x4bc1(%rip), %xmm0     # 0x8280
movq %rsp, %rsi
movaps %xmm0, 0x30(%rsi)
movaps 0x4ba3(%rip), %xmm0     # 0x8270
movaps %xmm0, 0x20(%rsi)
movaps 0x4b88(%rip), %xmm0     # 0x8260
movaps %xmm0, 0x10(%rsi)
movaps 0x4b6d(%rip), %xmm0     # 0x8250
movaps %xmm0, (%rsi)
movl $0x8, %edi
callq 0x4d64
movaps %xmm0, %xmm2
movsd 0x4b35(%rip), %xmm0     # 0x8230
movsd 0x4b35(%rip), %xmm1     # 0x8238
movl $0x9, %esi
xorl %edi, %edi
callq 0x61fc
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_stddev_m
void test_stddev_m() {
  double x[] = {35,32,213,54,81,92,63,70};
  int n = sizeof(x)/sizeof(x[0]);
  double m = 80;

  double s = morpheus_stddev_m(m, n, x);
  TEST_ASSERT_EQUAL_DOUBLE(57.60456, s);
}

// Assembly:
subq $0x48, %rsp
movaps 0x4b61(%rip), %xmm0     # 0x8280
movq %rsp, %rsi
movaps %xmm0, 0x30(%rsi)
movaps 0x4b43(%rip), %xmm0     # 0x8270
movaps %xmm0, 0x20(%rsi)
movaps 0x4b28(%rip), %xmm0     # 0x8260
movaps %xmm0, 0x10(%rsi)
movaps 0x4b0d(%rip), %xmm0     # 0x8250
movaps %xmm0, (%rsi)
movsd 0x4aea(%rip), %xmm0     # 0x8238
movl $0x8, %edi
callq 0x4d8c
movaps %xmm0, %xmm2
movsd 0x4add(%rip), %xmm0     # 0x8240
movsd 0x4add(%rip), %xmm1     # 0x8248
movl $0x12, %esi
xorl %edi, %edi
callq 0x61fc
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_stddev
void test_stddev() {
  double x[] = {35,32,213,54,81,92,63,70};
  int n = sizeof(x)/sizeof(x[0]);

  double s = morpheus_stddev(n, x);
  TEST_ASSERT_EQUAL_DOUBLE(57.60456, s);
}

// Assembly:
subq $0x48, %rsp
movaps 0x4af9(%rip), %xmm0     # 0x8280
movq %rsp, %rsi
movaps %xmm0, 0x30(%rsi)
movaps 0x4adb(%rip), %xmm0     # 0x8270
movaps %xmm0, 0x20(%rsi)
movaps 0x4ac0(%rip), %xmm0     # 0x8260
movaps %xmm0, 0x10(%rsi)
movaps 0x4aa5(%rip), %xmm0     # 0x8250
movaps %xmm0, (%rsi)
movl $0x8, %edi
callq 0x4dd6
movaps %xmm0, %xmm2
movsd 0x4a7d(%rip), %xmm0     # 0x8240
movsd 0x4a7d(%rip), %xmm1     # 0x8248
movl $0x1a, %esi
xorl %edi, %edi
callq 0x61fc
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_column_mean
void test_column_mean() {
  double a[] = {35,32,213,54,
                81,92,63,70,
                77,14,91,20};
  int m = 3;
  int n = 4;

  double expected_means_rm[] = {64.33333, 46, 122.33333, 48};
  double expected_stddev_rm[] = {25.48202, 40.84116, 79.75797, 25.53429};

  double expected_means_cm[] = {83.5, 76.5, 50.5};
  double expected_stddev_cm[] = {86.88114, 12.71482, 39.17908};

  double means[4];

  morpheus_column_mean(morpheus_row_major, m, n, a, means);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_means_rm, means, n);

  morpheus_column_mean(morpheus_col_major, n, m, a, means);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_means_cm, means, m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x4a9f(%rip), %rsi      # 0x8290
leaq 0x60(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x4b38(%rip), %xmm0     # 0x8340
leaq 0x40(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps 0x4b16(%rip), %xmm0     # 0x8330
movaps %xmm0, (%r12)
movaps 0x4aca(%rip), %xmm0     # 0x82f0
movq %rsp, %r14
movaps %xmm0, (%r14)
movabsq $0x4049400000000000, %rax # imm = 0x4049400000000000
movq %rax, 0x10(%r14)
leaq 0x20(%rsp), %r15
movl $0x15, %edi
movl $0x3, %esi
movl $0x4, %edx
movq %rbx, %rcx
movq %r15, %r8
callq 0x4e3e
movl $0x2d, %r8d
movq %r12, %rdi
movq %r15, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
movl $0x16, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %rbx, %rcx
movq %r15, %r8
callq 0x4e3e
movl $0x30, %r8d
movq %r14, %rdi
movq %r15, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_row_mean
void test_row_mean() {
  double a[] = {35,32,213,54,
                81,92,63,70,
                77,14,91,20};
  int m = 3;
  int n = 4;

  double expected_means_rm[] = {83.5, 76.5, 50.5};
  double expected_means_cm[] = {64.33333, 46, 122.33333, 48};

  double means[4];

  morpheus_row_mean(morpheus_row_major, m, n, a, means);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_means_rm, means, m);

  morpheus_row_mean(morpheus_col_major, n, m, a, means);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_means_cm, means, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x49bc(%rip), %rsi      # 0x8290
leaq 0x60(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x4a05(%rip), %xmm0     # 0x82f0
movq %rsp, %r12
movaps %xmm0, (%r12)
movabsq $0x4049400000000000, %rax # imm = 0x4049400000000000
movq %rax, 0x10(%r12)
movaps 0x4a37(%rip), %xmm0     # 0x8340
leaq 0x40(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x4a16(%rip), %xmm0     # 0x8330
movaps %xmm0, (%r14)
leaq 0x20(%rsp), %r15
movl $0x15, %edi
movl $0x3, %esi
movl $0x4, %edx
movq %rbx, %rcx
movq %r15, %r8
callq 0x4e77
movl $0x40, %r8d
movq %r12, %rdi
movq %r15, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
movl $0x16, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %rbx, %rcx
movq %r15, %r8
callq 0x4e77
movl $0x43, %r8d
movq %r14, %rdi
movq %r15, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_column_stddev_m
void test_column_stddev_m() {
  double a[] = {35,32,213,54,
                81,92,63,70,
                77,14,91,20};
  int m = 3;
  int n = 4;

  double means_rm[] = {64.33333, 46, 122.33333, 48};
  double expected_stddev_rm[] = {25.48202, 40.84116, 79.75797, 25.53429};

  double means_cm[] = {83.5, 76.5, 50.5};
  double expected_stddev_cm[] = {86.88114, 12.71482, 39.17908};

  double stddevs[4];

  morpheus_column_stddev_m(morpheus_row_major, m, n, means_rm, a, stddevs);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_stddev_rm, stddevs, n);

  morpheus_column_stddev_m(morpheus_col_major, n, m, means_cm, a, stddevs);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_stddev_cm, stddevs, m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq 0x48d7(%rip), %rsi      # 0x8290
leaq 0xa0(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x496d(%rip), %xmm0     # 0x8340
leaq 0x80(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps 0x494a(%rip), %xmm0     # 0x8330
movaps %xmm0, (%rcx)
movaps 0x4970(%rip), %xmm0     # 0x8360
leaq 0x60(%rsp), %r13
movaps %xmm0, 0x10(%r13)
movaps 0x494f(%rip), %xmm0     # 0x8350
movaps %xmm0, (%r13)
movaps 0x48e3(%rip), %xmm0     # 0x82f0
leaq 0x20(%rsp), %r12
movaps %xmm0, (%r12)
movabsq $0x4049400000000000, %rax # imm = 0x4049400000000000
movq %rax, 0x10(%r12)
movaps 0x48e3(%rip), %xmm0     # 0x8310
movq %rsp, %r14
movaps %xmm0, (%r14)
movabsq $0x404396ec17ebaf10, %rax # imm = 0x404396EC17EBAF10
movq %rax, 0x10(%r14)
leaq 0x40(%rsp), %r15
movl $0x15, %edi
movl $0x3, %esi
movl $0x4, %edx
movq %rbx, %r8
movq %r15, %r9
callq 0x4eb0
movl $0x56, %r8d
movq %r13, %rdi
movq %r15, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
movl $0x16, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %r12, %rcx
movq %rbx, %r8
movq %r15, %r9
callq 0x4eb0
movl $0x59, %r8d
movq %r14, %rdi
movq %r15, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/statistics_test.c
// Function: test_row_stddev_m
void test_row_stddev_m() {
  double a[] = {35,32,213,54,
                81,92,63,70,
                77,14,91,20};
  int m = 3;
  int n = 4;

  double means_rm[] = {83.5, 76.5, 50.5};
  double expected_stddev_rm[] = {86.88114, 12.71482, 39.17908};

  double means_cm[] = {64.33333, 46, 122.33333, 48};
  double expected_stddev_cm[] = {25.48202, 40.84116, 79.75797, 25.53429};

  double stddevs[4];

  morpheus_row_stddev_m(morpheus_row_major, m, n, means_rm, a, stddevs);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_stddev_rm, stddevs, m);

  morpheus_row_stddev_m(morpheus_col_major, n, m, means_cm, a, stddevs);
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_stddev_cm, stddevs, n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq 0x47ae(%rip), %rsi      # 0x8290
leaq 0xa0(%rsp), %rbx
movl $0xc, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
movaps 0x47f4(%rip), %xmm0     # 0x82f0
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movabsq $0x4049400000000000, %rax # imm = 0x4049400000000000
movq %rax, 0x10(%rcx)
movaps 0x47f7(%rip), %xmm0     # 0x8310
movq %rsp, %r13
movaps %xmm0, (%r13)
movabsq $0x404396ec17ebaf10, %rax # imm = 0x404396EC17EBAF10
movq %rax, 0x10(%r13)
movaps 0x480a(%rip), %xmm0     # 0x8340
leaq 0x80(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps 0x47e5(%rip), %xmm0     # 0x8330
movaps %xmm0, (%r12)
movaps 0x4809(%rip), %xmm0     # 0x8360
leaq 0x60(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps 0x47e8(%rip), %xmm0     # 0x8350
movaps %xmm0, (%r14)
leaq 0x40(%rsp), %r15
movl $0x15, %edi
movl $0x3, %esi
movl $0x4, %edx
movq %rbx, %r8
movq %r15, %r9
callq 0x4fe6
movl $0x6c, %r8d
movq %r13, %rdi
movq %r15, %rsi
movl $0x3, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
movl $0x16, %edi
movl $0x4, %esi
movl $0x3, %edx
movq %r12, %rcx
movq %rbx, %r8
movq %r15, %r9
callq 0x4fe6
movl $0x6f, %r8d
movq %r14, %rdi
movq %r15, %rsi
movl $0x4, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/tests/wolfe_test.c
// Function: test_wolfe
void test_wolfe() {
  double memory_buffer[2];
  morheus_wolfe_params_t params;
  params.f = func;
  params.df = dfunc;
  params.num_variables = 2;
  params.max_iters = 10;
  params.c1 = 0.15;
  params.c2 = 0.3;
  params.memory_buffer = memory_buffer;

  double x[] = {0.6, 0.5};
  double direction[] = {-0.3, -0.4};
  double result[2];
  morpheus_wolfe(&params, x, direction, 0, result);

  double expected_result[] = {0.225, 0};
  TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected_result, result, 2);
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
leaq -0x91(%rip), %rax       # 0x3bf8
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
leaq -0x6e(%rip), %rax       # 0x3c2a
movq %rax, 0x8(%rdi)
movabsq $0xa00000002, %rax      # imm = 0xA00000002
movq %rax, 0x10(%rdi)
movaps 0x46df(%rip), %xmm0     # 0x8390
movups %xmm0, 0x18(%rdi)
leaq 0x40(%rsp), %rax
movq %rax, 0x28(%rdi)
movaps 0x46db(%rip), %xmm0     # 0x83a0
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps 0x46dc(%rip), %xmm0     # 0x83b0
leaq 0x20(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rbx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x5118
movaps 0x46ce(%rip), %xmm0     # 0x83c0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movl $0x21, %r8d
movq %rbx, %rsi
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x6030
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/gradient.c
// Function: morpheus_numeric_gradient
void morpheus_numeric_gradient(const morpheus_numeric_gradient_params_t *params,
                               const double *x,
                               void *data,
                               double *grad) {
  double *bumped_x = params->memory_buffer;
  int n = params->num_variables;
  morpheus_dcopy(n, x, bumped_x);
  for (int i = 0; i < n; i++) {
    double diff = x[i]*params->eps+params->eps;
    bumped_x[i] += diff;
    grad[i] = params->f(bumped_x, data);
    diff *= 2;
    bumped_x[i] -= diff;
    grad[i] -= params->f(bumped_x, data);
    grad[i] /= diff;
    bumped_x[i] = x[i];
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %r13
movslq 0x8(%rdi), %rbp
movl %ebp, %edi
movq %r13, %rdx
callq 0x4b04
testq %rbp, %rbp
jle 0x3f8f
movq %rbp, %rax
xorl %ebp, %ebp
movq %r14, 0x8(%rsp)
movq 0x10(%rsp), %r12
movsd 0x10(%r15), %xmm0
movsd (%r14,%rbp,8), %xmm1
mulsd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%r13,%rbp,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r13,%rbp,8)
movq %rax, %r14
movq %r13, %rdi
movq %r12, %rsi
callq *(%r15)
movsd %xmm0, (%rbx,%rbp,8)
movsd (%rsp), %xmm1
addsd %xmm1, %xmm1
movsd %xmm1, (%rsp)
movsd (%r13,%rbp,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%r13,%rbp,8)
movq %r13, %rdi
movq %r12, %rsi
callq *(%r15)
movq %r14, %rax
movq 0x8(%rsp), %r14
movsd (%rbx,%rbp,8), %xmm1
subsd %xmm0, %xmm1
divsd (%rsp), %xmm1
movsd %xmm1, (%rbx,%rbp,8)
movsd (%r14,%rbp,8), %xmm0
movsd %xmm0, (%r13,%rbp,8)
incq %rbp
cmpq %rbp, %rax
jne 0x3ef6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/gradient_descent.c
// Function: morpheus_gradient_descent
void morpheus_gradient_descent(const morpheus_gradient_descent_params_t *params,
                               double *theta,
                               void *data) {

  double *grad = params->memory_buffer;

  int i;
  for (i = 0; i < params->max_iters; ++i) {
    params->df(theta, data, grad);
    morpheus_daxpy(params->num_variables, -params->alpha, grad, theta);

    double change = fabs(params->alpha)*morpheus_dnrm2(params->num_variables, grad);
    if (change < params->epsilon) {
      return;
    }
  }
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
jle 0x4032
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x30(%rdi), %r12
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq *0x8(%r15)
movl 0x28(%r15), %edi
movsd 0x20(%r15), %xmm0
xorps 0x43ed(%rip), %xmm0     # 0x83d0
movq %r12, %rsi
movq %r14, %rdx
callq 0x4b8b
movsd 0x20(%r15), %xmm0
andpd 0x43e4(%rip), %xmm0     # 0x83e0
movapd %xmm0, (%rsp)
movl 0x28(%r15), %edi
movq %r12, %rsi
callq 0x4b9e
mulsd (%rsp), %xmm0
movsd 0x18(%r15), %xmm1
ucomisd %xmm0, %xmm1
ja 0x4026
incl %ebp
cmpl 0x10(%r15), %ebp
jl 0x3fc5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/least_squares.c
// Function: morpheus_ls_hypothesis
void morpheus_ls_hypothesis(const morpheus_data_t *data,
                            const double *theta,
                            double *y) {
  const double alpha = 1;
  const double beta = 0;
  morpheus_dgemv(data->layout, morpheus_no_trans, data->num_examples,
                 data->num_features, alpha, data->x, theta, beta, y);
}

// Assembly:
pushq %rax
movq %rsi, %r9
movl 0x18(%rdi), %eax
movl 0x14(%rdi), %r10d
movl 0x10(%rdi), %ecx
movq (%rdi), %r8
movq %rdx, (%rsp)
movsd 0x384f(%rip), %xmm0     # 0x78a0
xorps %xmm1, %xmm1
movl %eax, %edi
movl $0xb, %esi
movl %r10d, %edx
callq 0x4b31
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/least_squares.c
// Function: morpheus_ls_cost_old
double morpheus_ls_cost_old(const morpheus_reg_t *reg,
                        const morpheus_data_t *data,
                        const double *theta,
                        double *m) {
  const double alpha = 1;
  const double beta = -1;

  morpheus_dcopy(data->num_examples, data->y, m);
  morpheus_dgemv(data->layout, morpheus_no_trans, data->num_examples,
                 data->num_features, alpha, data->x, theta, beta, m);
  double v = morpheus_ddot(data->num_examples, m, m);
  double reg_term = morpheus_cost_reg(reg, data->num_features, theta);
  v = (v*0.5 + reg_term) / data->num_examples;

  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl 0x14(%rsi), %edi
movq 0x8(%rsi), %rsi
movq %rcx, %rdx
callq 0x4b04
movl 0x18(%rbx), %edi
movl 0x14(%rbx), %edx
movl 0x10(%rbx), %ecx
movq (%rbx), %r8
movq %r12, (%rsp)
movsd 0x37fd(%rip), %xmm0     # 0x78a0
movsd 0x37e5(%rip), %xmm1     # 0x7890
movl $0xb, %esi
movq %r14, %r9
callq 0x4b31
movl 0x14(%rbx), %edi
movq %r12, %rsi
movq %r12, %rdx
callq 0x4ba8
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%rbx), %xmm0
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a30
movsd 0x10(%rsp), %xmm1
mulsd 0x4303(%rip), %xmm1     # 0x83f0
addsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x14(%rbx), %xmm1
divsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/least_squares.c
// Function: morpheus_ls_gradient_old
void morpheus_ls_gradient_old(const morpheus_reg_t *reg,
                          const morpheus_data_t *data,
                          const double *theta,
                          double *grad,
                          double *m) {
  morpheus_dcopy(data->num_examples, data->y, m);
  morpheus_dgemv(data->layout, morpheus_no_trans, data->num_examples,
                 data->num_features, 1, data->x, theta, -1, m);
  morpheus_dgemv(data->layout, morpheus_trans, data->num_examples,
                 data->num_features, 1, data->x, m, 0, grad);

  double *reg_term = m;
  morpheus_gradient_reg(reg, data->num_features, theta, reg_term);
  morpheus_daxpy(data->num_features, 1, reg_term, grad);

  morpheus_dscal(data->num_features, 1.0/data->num_examples, grad);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movl 0x14(%rsi), %edi
movq 0x8(%rsi), %rsi
movq %r8, %rdx
callq 0x4b04
movl 0x18(%r14), %edi
movl 0x14(%r14), %edx
movl 0x10(%r14), %ecx
movq (%r14), %r8
movq %r15, (%rsp)
movsd 0x3751(%rip), %xmm0     # 0x78a0
movsd 0x3739(%rip), %xmm1     # 0x7890
movl $0xb, %esi
movq %r12, %r9
callq 0x4b31
movl 0x18(%r14), %edi
movl 0x14(%r14), %edx
movl 0x10(%r14), %ecx
movq (%r14), %r8
movq %rbx, (%rsp)
xorps %xmm1, %xmm1
movl $0xc, %esi
movsd 0x3719(%rip), %xmm0     # 0x78a0
movq %r15, %r9
callq 0x4b31
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%r14), %xmm0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x4a68
movl 0x10(%r14), %edi
movsd 0x36ee(%rip), %xmm0     # 0x78a0
movq %r15, %rsi
movq %rbx, %rdx
callq 0x4b8b
movl 0x10(%r14), %edi
xorps %xmm1, %xmm1
cvtsi2sdl 0x14(%r14), %xmm1
movsd 0x36ce(%rip), %xmm0     # 0x78a0
divsd %xmm1, %xmm0
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4afa
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/regularization.c
// Function: morpheus_cost_reg
double morpheus_cost_reg(const morpheus_reg_t *params,
                         const double num_features,
                         const double *theta) {
  if (params->type == morpheus_reg_l2) {
    theta = theta + 1;  /* skip the first element */
    return morpheus_ddot(num_features-1, theta, theta) * params->lambda * 0.5;
  }
  return 0;
}

// Assembly:
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
cmpl $0x1, (%rdi)
jne 0x4a67
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rsi
addsd 0x2e43(%rip), %xmm1     # 0x7890
cvttsd2si %xmm1, %edi
movq %rsi, %rdx
callq 0x4ba8
mulsd 0x8(%rbx), %xmm0
mulsd 0x398a(%rip), %xmm0     # 0x83f0
popq %rbx
retq