LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_09/date_conversion_pointers.c
// Function: main
int main(void)
{
  int day = day_of_year(2021, 2, 12);
  printf("day of the year: %d\n", day);

  int month_invalid = day_of_year(2021, 13, 1);
  if (month_invalid == -1)
  {
    printf("Warning: invalid month detected.\n");
  }

  int day_invalid = day_of_year(2021, 12, 32);
  if (day_invalid == -2)
  {
    printf("Warning: invalid day detected.\n");
  }

  int month;
  int day_month;

  month_day(2021, 43, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  month_day(2021, 365, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  month_day(2021, 366, &month, &day_month);
  printf("month: %d, day: %d\n", month, day_month);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movsbl 0x2ee3(%rip), %edx      # 0x403a
cmpl $0xb, %edx
jg 0x1176
leaq 0xeca(%rip), %rdi       # 0x202d
movl $0x2, %esi
xorl %eax, %eax
callq 0x1040
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
jmp 0x1180
movsbl 0x2ebc(%rip), %esi      # 0x4039
addl $0xc, %esi
leaq 0xe7d(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1040
leaq 0xf24(%rip), %rdi       # 0x20b9
callq 0x1030
leaq 0xed8(%rip), %rdi       # 0x2079
callq 0x1030
movsbl 0x2e97(%rip), %edx      # 0x4044
cmpl $0x20, %edx
jge 0x11c7
leaq 0xe74(%rip), %rdi       # 0x202d
movl $0xc, %esi
xorl %eax, %eax
callq 0x1040
jmp 0x11ec
movl $0x20, %eax
movl $0x1, %ecx
leaq 0x2e60(%rip), %rdx      # 0x4038
movsbl (%rcx,%rdx), %esi
addl %esi, %eax
incq %rcx
cmpq $0xc, %rcx
jne 0x11d8
cmpl $-0x2, %eax
jne 0x11f8
leaq 0xea7(%rip), %rdi       # 0x209a
callq 0x1030
movsbl 0x2e39(%rip), %eax      # 0x4038
cmpl $0x2a, %eax
jg 0x1222
movl $0x2b, %edx
xorl %esi, %esi
leaq 0x2e26(%rip), %rcx      # 0x4038
subl %eax, %edx
movsbl 0x1(%rsi,%rcx), %eax
incq %rsi
cmpl %eax, %edx
jg 0x1212
jmp 0x1229
xorl %esi, %esi
movl $0x2b, %edx
leaq 0xde9(%rip), %rdi       # 0x2019
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1040
movsbl 0x2df8(%rip), %eax      # 0x4038
movl $0x16d, %edx            # imm = 0x16D
leaq 0x2dec(%rip), %rcx      # 0x4038
subl %eax, %edx
movsbl 0x1(%rbx,%rcx), %eax
incq %rbx
cmpl %eax, %edx
jg 0x124c
leaq 0xdb8(%rip), %r14       # 0x2019
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x1040
leaq 0xde8(%rip), %rdi       # 0x205c
movl $0x7e5, %esi            # imm = 0x7E5
movl $0x16d, %edx            # imm = 0x16D
xorl %eax, %eax
callq 0x1040
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_09/date_conversion_pointers.c
// Function: day_of_year
int day_of_year(int year, int month, int day)
{
  int leap = (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;

  // Additional checks for month.
  if (month > 12)
  {
    printf("Error: a year has 12 months, so please choose a number betweeen 1 and 12.\n");
    return -1;
  }

  // Additional checks for day.
  if (day > daytab[leap][month])
  {
    printf("Error: the %d month has a maximum of %d days.\n", month, daytab[leap][month]);
    return -2;
  }

  int i;
  for (i = 1; i < month; i++)
  {
    day += daytab[leap][i];
  }

  return day;
}

// Assembly:
movl %edx, %eax
testb $0x3, %dil
jne 0x12cc
movslq %edi, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %edx
movl %edi, %r8d
movl $0x1, %ecx
subl %edx, %r8d
jne 0x12e6
imull $0xc28f5c29, %edi, %edx # imm = 0xC28F5C29
addl $0x51eb850, %edx        # imm = 0x51EB850
rorl $0x4, %edx
xorl %ecx, %ecx
cmpl $0xa3d70b, %edx         # imm = 0xA3D70B
setb %cl
pushq %rax
cmpl $0xd, %esi
jl 0x12ff
leaq 0xdc6(%rip), %rdi       # 0x20b9
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1344
leaq 0x2aca(%rip), %rdx      # 0x3dd0
movq (%rdx,%rcx,8), %rcx
movslq %esi, %rdx
movsbl (%rcx,%rdx), %edx
cmpl %eax, %edx
jge 0x132a
leaq 0xd11(%rip), %rdi       # 0x202d
xorl %eax, %eax
callq 0x1040
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x1344
cmpl $0x2, %esi
jl 0x1344
movl %esi, %edx
movl $0x1, %esi
movsbl (%rcx,%rsi), %edi
addl %edi, %eax
incq %rsi
cmpq %rsi, %rdx
jne 0x1336
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_09/date_conversion_pointers.c
// Function: month_day
void month_day(int year, int yearday, int *pmonth, int *pda)
{
  int leap = (year % 4 == 0 && year % 100 != 0) || year % 400 == 0;

  // Additional check for yearday.
  if ((!leap && yearday > 365) || (leap && yearday > 366))
  {
    // Reset the provided month and day.
    *pmonth = 0;
    *pda = 0;
    printf("Error: year %d has %d days.\n", year, leap ? 366 : 365);

    return;
  }

  int i;
  for (i = 0; yearday > daytab[leap][i]; i++)
  {
    yearday -= daytab[leap][i];
  }

  *pmonth = i;
  *pda = yearday;
}

// Assembly:
movl %edi, %eax
testb $0x3, %al
jne 0x1373
movslq %eax, %rdi
imulq $0x51eb851f, %rdi, %rdi # imm = 0x51EB851F
movq %rdi, %r8
shrq $0x3f, %r8
sarq $0x25, %rdi
addl %r8d, %edi
imull $0x64, %edi, %r8d
movl %eax, %r9d
movb $0x1, %dil
subl %r8d, %r9d
jne 0x138c
imull $0xc28f5c29, %eax, %edi # imm = 0xC28F5C29
addl $0x51eb850, %edi        # imm = 0x51EB850
rorl $0x4, %edi
cmpl $0xa3d70b, %edi         # imm = 0xA3D70B
setb %dil
movzbl %dil, %edi
leal 0x16d(%rdi), %r8d
cmpl %esi, %r8d
jge 0x13b5
xorl %esi, %esi
movl %esi, (%rdx)
movl %esi, (%rcx)
leaq 0xcb3(%rip), %rdi       # 0x205c
movl %eax, %esi
movl %r8d, %edx
xorl %eax, %eax
jmp 0x1040
leaq 0x2a14(%rip), %rax      # 0x3dd0
movq (%rax,%rdi,8), %rdi
movsbl (%rdi), %r8d
xorl %eax, %eax
cmpl %esi, %r8d
jge 0x13de
xorl %eax, %eax
subl %r8d, %esi
movsbl 0x1(%rdi,%rax), %r8d
incq %rax
cmpl %r8d, %esi
jg 0x13cd
movl %eax, (%rdx)
movl %esi, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_activation.c
// Function: bench_sigmoid
void bench_sigmoid(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    morpheus_sigmoid(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %ebp
imull %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x10f0
movq %rax, %r12
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
testl %ebp, %ebp
jle 0x1430
movl %ebp, %r13d
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2598
decl %r13d
jne 0x141d
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x2b9d(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_activation.c
// Function: bench_sigmoid_gradient
void bench_sigmoid_gradient(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    morpheus_sigmoid_gradient(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %ebp
imull %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x10f0
movq %rax, %r12
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
testl %ebp, %ebp
jle 0x14d3
movl %ebp, %r13d
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x25ed
decl %r13d
jne 0x14c0
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x2afa(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_activation.c
// Function: bench_relu
void bench_relu(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    morpheus_relu(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %ebp
imull %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x10f0
movq %rax, %r12
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
testl %ebp, %ebp
jle 0x1576
movl %ebp, %r13d
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2652
decl %r13d
jne 0x1563
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x2a57(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_activation.c
// Function: bench_tanh_gradient
void bench_tanh_gradient(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    morpheus_tanh_gradient(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %ebp
imull %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x10f0
movq %rax, %r12
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
testl %ebp, %ebp
jle 0x175f
movl %ebp, %r13d
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x26de
decl %r13d
jne 0x174c
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x286e(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
nop
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_matrix_reduce.c
// Function: bench_column_pred
void bench_column_pred(int n, const char *message,
                       double (*pred)(double, double),
                       morpheus_layout_e layout,
                       int size, double *x) {
  double *y = calloc(size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_column_predicate(pred, layout, size, size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, 0x20(%rsp)
movl %edi, %ebp
movslq %r8d, %rdi
movl $0x8, %esi
callq 0x10f0
movq %rax, %rbx
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
jle 0x1831
xorpd %xmm0, %xmm0
movl 0xc(%rsp), %ebp
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, (%rbx)
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r15d, %ecx
movq %r14, %r8
movq %rbx, %r9
callq 0x272c
movsd 0x10(%rsp), %xmm0
addsd 0x27f3(%rip), %xmm0     # 0x4020
decl %ebp
jne 0x17fe
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x10a0
movsd 0x10(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x279a(%rip), %rdi      # 0x4004
movq 0x20(%rsp), %rsi
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_matrix_reduce.c
// Function: bench_row_pred
void bench_row_pred(int n, const char *message,
                    double (*pred)(double, double),
                    morpheus_layout_e layout,
                    int size, double *x) {
  double *y = calloc(size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_row_predicate(pred, layout, size, size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movl %r8d, %r15d
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, 0x20(%rsp)
movl %edi, %ebp
movslq %r8d, %rdi
movl $0x8, %esi
callq 0x10f0
movq %rax, %rbx
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
jle 0x1905
xorpd %xmm0, %xmm0
movl 0xc(%rsp), %ebp
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, (%rbx)
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r15d, %ecx
movq %r14, %r8
movq %rbx, %r9
callq 0x286e
movsd 0x10(%rsp), %xmm0
addsd 0x271f(%rip), %xmm0     # 0x4020
decl %ebp
jne 0x18d2
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x10a0
movsd 0x10(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x26c6(%rip), %rdi      # 0x4004
movq 0x20(%rsp), %rsi
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_matrix_reduce.c
// Function: bench_column_max_index
void bench_column_max_index(int n, const char *message,
                            morpheus_layout_e layout,
                            int size, double *x) {
  double *y = calloc(size, sizeof(double));
  int *is = calloc(size, sizeof(int));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_column_max_index(layout, size, size, x, y, is);
  }
  double finish = get_time();
  free(y);
  free(is);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, 0x20(%rsp)
movl %edi, %ebp
movslq %ecx, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x10f0
movq %rax, %r13
movl $0x4, %esi
movq %rbx, %rdi
callq 0x10f0
movq %rax, %rbx
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
jle 0x19eb
xorpd %xmm0, %xmm0
movl 0xc(%rsp), %ebp
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, (%r13)
movl %r12d, %edi
movl %r15d, %esi
movl %r15d, %edx
movq %r14, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0x29ab
movsd 0x10(%rsp), %xmm0
addsd 0x2639(%rip), %xmm0     # 0x4020
decl %ebp
jne 0x19b6
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0x10a0
movq %rbx, %rdi
callq 0x10a0
movsd 0x10(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x25d8(%rip), %rdi      # 0x4004
movq 0x20(%rsp), %rsi
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_matrix_reduce.c
// Function: bench_column_min_index
void bench_column_min_index(int n, const char *message,
                            morpheus_layout_e layout,
                            int size, double *x) {
  double *y = calloc(size, sizeof(double));
  int *is = calloc(size, sizeof(int));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_column_min_index(layout, size, size, x, y, is);
  }
  double finish = get_time();
  free(y);
  free(is);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, 0x20(%rsp)
movl %edi, %ebp
movslq %ecx, %rbx
movl $0x8, %esi
movq %rbx, %rdi
callq 0x10f0
movq %rax, %r13
movl $0x4, %esi
movq %rbx, %rdi
callq 0x10f0
movq %rax, %rbx
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
jle 0x1ad9
xorpd %xmm0, %xmm0
movl 0xc(%rsp), %ebp
movsd %xmm0, 0x10(%rsp)
movsd %xmm0, (%r13)
movl %r12d, %edi
movl %r15d, %esi
movl %r15d, %edx
movq %r14, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0x2aa6
movsd 0x10(%rsp), %xmm0
addsd 0x254b(%rip), %xmm0     # 0x4020
decl %ebp
jne 0x1aa4
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
movq %r13, %rdi
callq 0x10a0
movq %rbx, %rdi
callq 0x10a0
movsd 0x10(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x24ea(%rip), %rdi      # 0x4004
movq 0x20(%rsp), %rsi
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_matrix_reduce.c
// Function: bench_column_sum
void bench_column_sum(int n, const char *message,
                      morpheus_layout_e layout,
                      int size, double *x) {
  double *y = calloc(size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_column_sum(layout, size, size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, 0x10(%rsp)
movl %edi, %ebx
movslq %ecx, %rdi
movl $0x8, %esi
callq 0x10f0
movq %rax, %r13
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
testl %ebx, %ebx
jle 0x1d85
xorpd %xmm0, %xmm0
movl %ebx, %ebp
movsd %xmm0, (%rsp)
movsd %xmm0, (%r13)
movl %r12d, %edi
movl %r15d, %esi
movl %r15d, %edx
movq %r14, %rcx
movq %r13, %r8
callq 0x2db5
movsd (%rsp), %xmm0
addsd 0x229f(%rip), %xmm0     # 0x4020
decl %ebp
jne 0x1d55
xorl %eax, %eax
callq 0x222c
movsd %xmm0, (%rsp)
movq %r13, %rdi
callq 0x10a0
movsd (%rsp), %xmm1
subsd 0x8(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x224a(%rip), %rdi      # 0x4004
movq 0x10(%rsp), %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_simple_blas.c
// Function: bench_morpheus_identity
void bench_morpheus_identity(int n, const char *message, int size) {
  double *x = calloc(size*size, sizeof(double));

  double start = get_time();
  for (int i = 0; i < n; ++i) {
    x[0] = i;
    morpheus_identity(size, x);
  }
  double finish = get_time();
  free(x);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %ebp
movl %edx, %edi
imull %edi, %edi
movl $0x8, %esi
callq 0x10f0
movq %rax, %r15
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
testl %ebp, %ebp
jle 0x1efd
xorpd %xmm0, %xmm0
movl %ebp, %r12d
movsd %xmm0, (%rsp)
movsd %xmm0, (%r15)
movl %r14d, %edi
movq %r15, %rsi
callq 0x318b
movsd (%rsp), %xmm0
addsd 0x2128(%rip), %xmm0     # 0x4020
decl %r12d
jne 0x1ed6
xorl %eax, %eax
callq 0x222c
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x10a0
movsd (%rsp), %xmm1
subsd 0x8(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x20d2(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_simple_blas.c
// Function: manual_identity
void manual_identity(int n, double *x) {
  int m = n*n;
  for (int i = 0; i < n; ++i) {
    double *row = x + i*n;
    for (int j = 0; j < n; ++j) {
      row[j] = i != j ? 0 : 1;
    }
  }
}

// Assembly:
testl %edi, %edi
jle 0x2035
movl %edi, %eax
incl %edi
andl $-0x2, %edi
leaq -0x1(%rax), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
addq $0x8, %rsi
leaq (,%rax,8), %rcx
xorl %edx, %edx
movdqa 0x20b5(%rip), %xmm1     # 0x4030
movdqa 0x20bd(%rip), %xmm2     # 0x4040
pxor %xmm2, %xmm0
movq 0x2091(%rip), %xmm3     # 0x4020
pcmpeqd %xmm4, %xmm4
movdqa 0x20b5(%rip), %xmm5     # 0x4050
leaq -0x1(%rdx), %r8
xorl %r9d, %r9d
movdqa %xmm1, %xmm6
movdqa %xmm6, %xmm7
pxor %xmm2, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm0, %xmm8
pcmpeqd %xmm0, %xmm7
pshufd $0xf5, %xmm7, %xmm9     # xmm9 = xmm7[1,1,3,3]
pand %xmm8, %xmm9
pshufd $0xf5, %xmm8, %xmm7     # xmm7 = xmm8[1,1,3,3]
por %xmm9, %xmm7
movd %xmm7, %r10d
notl %r10d
testb $0x1, %r10b
je 0x1ff6
movdqa %xmm3, %xmm8
cmpq %r9, %rdx
je 0x1fef
pxor %xmm8, %xmm8
movq %xmm8, -0x8(%rsi,%r9,8)
pxor %xmm4, %xmm7
pextrw $0x4, %xmm7, %r10d
testb $0x1, %r10b
je 0x2019
movdqa %xmm3, %xmm7
cmpq %r9, %r8
je 0x2013
pxor %xmm7, %xmm7
movq %xmm7, (%rsi,%r9,8)
addq $0x2, %r9
paddq %xmm5, %xmm6
cmpq %r9, %rdi
jne 0x1fa6
incq %rdx
addq %rcx, %rsi
cmpq %rax, %rdx
jne 0x1f9b
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_simple_blas.c
// Function: bench_manual_identity
void bench_manual_identity(int n, const char *message, int size) {
  double *x = calloc(size*size, sizeof(double));

  double start = get_time();
  for (int i = 0; i < n; ++i) {
    x[0] = i;
    manual_identity(size, x);
  }
  double finish = get_time();
  free(x);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
xorl %eax, %eax
callq 0x222c
movsd %xmm0, (%rsp)
xorl %eax, %eax
callq 0x222c
subsd (%rsp), %xmm0
cvtsi2sd %ebp, %xmm1
divsd %xmm1, %xmm0
leaq 0x1f9f(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_simple_blas.c
// Function: bench_morpheus_dcopy
void bench_morpheus_dcopy(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    y[0] = i;
    morpheus_dcopy(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms\n", message, ms);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %ebp
imull %r15d, %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x10f0
movq %rax, %r12
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
testl %ebp, %ebp
jle 0x20e7
xorpd %xmm0, %xmm0
movl %ebp, %r13d
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, (%r12)
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2f88
movsd 0x8(%rsp), %xmm0
addsd 0x1f3e(%rip), %xmm0     # 0x4020
decl %r13d
jne 0x20ba
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd 0x10(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x1ee6(%rip), %rdi      # 0x4004
movq %rbx, %rsi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/benchmarks/bench_simple_blas.c
// Function: bench_manual_dcopy
void bench_manual_dcopy(int n, const char *message, int size, double *x) {
  double *y = calloc(size*size, sizeof(double));
  double k = 0;
  double start = get_time();
  for (int i = 0; i < n; ++i) {
    k += y[0];
    manual_dcopy(size*size, x, y);
  }
  double finish = get_time();
  free(y);
  double ms = (finish-start)/n;
  printf("Benchmark %s: %f ms (_hack: %5.2f)\n", message, ms, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, 0x20(%rsp)
movl %edi, %ebx
movl %edx, %r13d
imull %r13d, %r13d
movl $0x8, %esi
movq %r13, %rdi
callq 0x10f0
movq %rax, %r14
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x18(%rsp)
testl %ebx, %ebx
jle 0x21c8
shlq $0x3, %r13
xorpd %xmm0, %xmm0
movl %ebx, %ebp
addsd (%r14), %xmm0
testl %r12d, %r12d
je 0x21c2
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movsd %xmm0, 0x8(%rsp)
callq 0x1160
movsd 0x8(%rsp), %xmm0
decl %ebp
jne 0x219e
jmp 0x21cc
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %eax, %eax
callq 0x222c
movsd %xmm0, 0x10(%rsp)
movq %r14, %rdi
callq 0x10a0
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd 0x10(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
leaq 0x1e57(%rip), %rdi      # 0x4060
movq 0x20(%rsp), %rsi
movsd 0x8(%rsp), %xmm1
movb $0x2, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_column_predicate
void morpheus_column_predicate(double (*pred)(double, double),
                               morpheus_layout_e layout,
                               int nrows,
                               int ncols,
                               const double *x,
                               double *y) {
  if (layout == morpheus_row_major) {
    /* first row is initial values */
    morpheus_dcopy(ncols, x, y);
    for (int i = 1; i < nrows; ++i) {
      const double *row = x + i*ncols;
      for (int j = 0; j < ncols; ++j) {
        y[j] = pred(y[j], row[j]);
      }
    }
  } else if (layout == morpheus_col_major) {
    for (int j = 0; j < ncols; ++j) {
      const double *column = &x[j*nrows];
      y[j] = column[0];
      for (int i = 1; i < nrows; ++i) {
        y[j] = pred(y[j], column[i]);
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %r14
cmpl $0x15, %esi
movq %r8, 0x8(%rsp)
je 0x27e1
cmpl $0x16, %esi
jne 0x2869
testl %r15d, %r15d
jle 0x285a
movslq %r12d, %rax
movl %r15d, %ecx
movq %rcx, 0x10(%rsp)
movl %eax, %ebp
movq %rax, 0x18(%rsp)
leaq (,%rax,8), %rax
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
movq %r8, %r15
movq %r13, %rax
movq 0x18(%rsp), %rcx
imulq %rcx, %rax
movsd (%r8,%rax,8), %xmm0
movsd %xmm0, (%rbx,%r13,8)
cmpl $0x2, %ecx
jl 0x27cb
movl $0x1, %r12d
movsd (%rbx,%r13,8), %xmm0
movsd (%r15,%r12,8), %xmm1
callq *%r14
movsd %xmm0, (%rbx,%r13,8)
incq %r12
cmpq %r12, %rbp
jne 0x27ae
incq %r13
addq 0x20(%rsp), %r15
cmpq 0x10(%rsp), %r13
movq 0x8(%rsp), %r8
jne 0x278b
jmp 0x285a
movl %r15d, %edi
movq %r8, %rsi
movq %rbx, %rdx
callq 0x2f88
movq 0x8(%rsp), %rax
cmpl $0x2, %r12d
jl 0x285a
movslq %r15d, %rcx
movl %r12d, %edx
movq %rdx, 0x10(%rsp)
movl %r15d, %r13d
leaq (%rax,%rcx,8), %rbp
shlq $0x3, %rcx
movq %rcx, 0x8(%rsp)
movl $0x1, %r12d
movl %r15d, 0x18(%rsp)
testl %r15d, %r15d
jle 0x2846
xorl %r15d, %r15d
movsd (%rbx,%r15,8), %xmm0
movsd (%rbp,%r15,8), %xmm1
callq *%r14
movsd %xmm0, (%rbx,%r15,8)
incq %r15
cmpq %r15, %r13
jne 0x2828
incq %r12
addq 0x8(%rsp), %rbp
cmpq 0x10(%rsp), %r12
movl 0x18(%rsp), %r15d
jne 0x2820
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1190
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_row_predicate
void morpheus_row_predicate(double (*pred)(double, double),
                            morpheus_layout_e layout,
                            int nrows, int ncols,
                            const double *x,
                            double *y) {
  if (layout == morpheus_row_major) {
    for (int i = 0; i < nrows; ++i) {
      const double *row = x + i*ncols;
      y[i] = row[0];
      for (int j = 1; j < ncols; ++j) {
        y[i] = pred(y[i], row[j]);
      }
    }
  } else if (layout == morpheus_col_major) {
    /* first column is initial values */
    morpheus_dcopy(nrows, x, y);
    for (int j = 1; j < ncols; ++j) {
      const double *column = x + j*nrows;
      for (int i = 0; i < nrows; ++i) {
        y[i] = pred(y[i], column[i]);
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %rbp
movq %rdi, %r14
cmpl $0x16, %esi
je 0x2922
cmpl $0x15, %esi
jne 0x29a6
testl %edx, %edx
jle 0x2997
movslq %ecx, %rax
movl %edx, %edx
movq %rdx, 0x20(%rsp)
movl %ecx, %r15d
movq %rax, (%rsp)
leaq (,%rax,8), %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movq %rbp, %r13
movq %rbp, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
movq %r12, %rax
imulq (%rsp), %rax
movsd (%rbp,%rax,8), %xmm0
movsd %xmm0, (%rbx,%r12,8)
cmpl $0x2, %ecx
jl 0x2908
movl $0x1, %ebp
movsd (%rbx,%r12,8), %xmm0
movsd (%r13,%rbp,8), %xmm1
callq *%r14
movsd %xmm0, (%rbx,%r12,8)
incq %rbp
cmpq %rbp, %r15
jne 0x28ea
incq %r12
addq 0x18(%rsp), %r13
cmpq 0x20(%rsp), %r12
movq 0x10(%rsp), %rbp
movl 0x8(%rsp), %ecx
jne 0x28cc
jmp 0x2997
movl %edx, %edi
movq %rbp, %rsi
movl %edx, (%rsp)
movq %rbx, %rdx
movl %ecx, %r15d
callq 0x2f88
movl (%rsp), %ecx
cmpl $0x2, %r15d
jl 0x2997
movslq %ecx, %rdx
movl %r15d, %eax
movq %rax, 0x8(%rsp)
movq %rbp, %rax
movl %ecx, %ebp
leaq (%rax,%rdx,8), %r12
shlq $0x3, %rdx
movq %rdx, 0x10(%rsp)
movl $0x1, %r13d
testl %ecx, %ecx
jle 0x2985
xorl %r15d, %r15d
movsd (%rbx,%r15,8), %xmm0
movsd (%r12,%r15,8), %xmm1
callq *%r14
movsd %xmm0, (%rbx,%r15,8)
incq %r15
cmpq %r15, %rbp
jne 0x2968
incq %r13
addq 0x10(%rsp), %r12
cmpq 0x8(%rsp), %r13
movl (%rsp), %ecx
jne 0x2961
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11ba
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_column_max_index
void morpheus_column_max_index(morpheus_layout_e layout,
                               int nrows, int ncols,
                               const double *x,
                               double *y,
                               int *is) {
  if (layout == morpheus_row_major) {
    for (int j = 0; j < ncols; ++j) {
      is[j] = 0;
      y[j] = x[j];
    }
    for (int i = 1; i < nrows; ++i) {
      const double *row = x + i*ncols;
      for (int j = 0; j < ncols; ++j) {
        if (y[j] < row[j]) {
          y[j] = row[j];
          is[j] = i;
        }
      }
    }
  } else if (layout == morpheus_col_major) {
    for (int j = 0; j < ncols; ++j) {
      const double *column = &x[j*nrows];
      y[j] = column[0];
      is[j] = 0;
      for (int i = 1; i < nrows; ++i) {
        if (y[j] < column[i]) {
          y[j] = column[i];
          is[j] = i;
        }
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %rbx
cmpl $0x15, %edi
je 0x2a30
cmpl $0x16, %edi
jne 0x2aa1
testl %edx, %edx
jle 0x2a9f
movslq %esi, %rax
movl %edx, %edx
movl %eax, %esi
leaq (,%rax,8), %rdi
xorl %r10d, %r10d
movq %rcx, %r11
movq %r10, %rbx
imulq %rax, %rbx
movsd (%rcx,%rbx,8), %xmm0
movsd %xmm0, (%r8,%r10,8)
movl $0x0, (%r9,%r10,4)
cmpl $0x2, %eax
jl 0x2a23
movsd (%r8,%r10,8), %xmm0
movl $0x1, %ebx
movsd (%r11,%rbx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2a1b
movsd %xmm1, (%r8,%r10,8)
movl %ebx, (%r9,%r10,4)
movapd %xmm1, %xmm0
incq %rbx
cmpq %rbx, %rsi
jne 0x2a01
incq %r10
addq %rdi, %r11
cmpq %rdx, %r10
jne 0x29d7
jmp 0x2a9f
testl %edx, %edx
jle 0x2a53
movl %edx, %eax
xorl %edi, %edi
movl $0x0, (%r9,%rdi,4)
movsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%r8,%rdi,8)
incq %rdi
cmpq %rdi, %rax
jne 0x2a38
cmpl $0x2, %esi
jl 0x2a9f
movslq %edx, %rax
movl %esi, %esi
movl %edx, %edi
leaq (%rcx,%rax,8), %rcx
shlq $0x3, %rax
movl $0x1, %r10d
testl %edx, %edx
jle 0x2a94
xorl %r11d, %r11d
movsd (%rcx,%r11,8), %xmm0
ucomisd (%r8,%r11,8), %xmm0
jbe 0x2a8c
movsd %xmm0, (%r8,%r11,8)
movl %r10d, (%r9,%r11,4)
incq %r11
cmpq %r11, %rdi
jne 0x2a74
incq %r10
addq %rax, %rcx
cmpq %rsi, %r10
jne 0x2a6d
popq %rbx
retq
callq 0x11e4
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_row_max_index
void morpheus_row_max_index(morpheus_layout_e layout,
                            int nrows, int ncols,
                            const double *x,
                            double *y,
                            int *is) {
  if (layout == morpheus_row_major) {
    for (int i = 0; i < nrows; ++i) {
      const double *row = x + i*ncols;
      y[i] = row[0];
      is[i] = 0;
      for (int j = 1; j < ncols; ++j) {
        if (y[i] < row[j]) {
          y[i] = row[j];
          is[i] = j;
        }
      }
    }
  } else if (layout == morpheus_col_major) {
    for (int i = 0; i < nrows; ++i) {
      is[i] = 0;
      y[i] = x[i];
    }
    for (int j = 1; j < ncols; ++j) {
      const double *column = x + j*nrows;
      for (int i = 0; i < nrows; ++i) {
        if (y[i] < column[i]) {
          y[i] = column[i];
          is[i] = j;
        }
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x15, %edi
je 0x2c2a
cmpl $0x16, %edi
jne 0x2ca4
movl %esi, %eax
testl %esi, %esi
jle 0x2bda
xorl %edi, %edi
movl $0x0, (%r9,%rdi,4)
movsd (%rcx,%rdi,8), %xmm0
movsd %xmm0, (%r8,%rdi,8)
incq %rdi
cmpq %rdi, %rax
jne 0x2bbf
cmpl $0x2, %edx
jl 0x2c9c
movslq %esi, %rdi
movl %edx, %edx
leaq (%rcx,%rdi,8), %rcx
shlq $0x3, %rdi
movl $0x1, %r10d
testl %esi, %esi
jle 0x2c1d
xorl %r11d, %r11d
movsd (%rcx,%r11,8), %xmm0
ucomisd (%r8,%r11,8), %xmm0
jbe 0x2c15
movsd %xmm0, (%r8,%r11,8)
movl %r10d, (%r9,%r11,4)
incq %r11
cmpq %r11, %rax
jne 0x2bfd
incq %r10
addq %rdi, %rcx
cmpq %rdx, %r10
jne 0x2bf6
jmp 0x2c9c
testl %esi, %esi
jle 0x2c9c
movslq %edx, %rax
movl %esi, %esi
movl %edx, %edi
leaq (,%rax,8), %r10
xorl %r11d, %r11d
movq %rcx, %rbx
movq %r11, %r14
imulq %rax, %r14
movsd (%rcx,%r14,8), %xmm0
movsd %xmm0, (%r8,%r11,8)
movl $0x0, (%r9,%r11,4)
cmpl $0x2, %edx
jl 0x2c91
movsd (%r8,%r11,8), %xmm0
movl $0x1, %r14d
movsd (%rbx,%r14,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2c89
movsd %xmm1, (%r8,%r11,8)
movl %r14d, (%r9,%r11,4)
movapd %xmm1, %xmm0
incq %r14
cmpq %r14, %rdi
jne 0x2c6f
incq %r11
addq %r10, %rbx
cmpq %rsi, %r11
jne 0x2c43
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x123a
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_column_sum
void morpheus_column_sum(morpheus_layout_e layout,
                         int nrows, int ncols,
                         const double *x,
                         double *y) {
  if (layout == morpheus_row_major) {
    for (int j = 0; j < ncols; ++j) {
      y[j] = 0;
    }
    for (int i = 0; i < nrows; ++i) {
      const double *row = x + i*ncols;
      for (int j = 0; j < ncols; ++j) {
        y[j] += row[j];
      }
    }
  } else if (layout == morpheus_col_major) {
    for (int j = 0; j < ncols; ++j) {
      const double *column = &x[j*nrows];
      y[j] = 0;
      for (int i = 0; i < nrows; ++i) {
        y[j] += column[i];
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %ebp
cmpl $0x15, %edi
je 0x2e1f
cmpl $0x16, %edi
jne 0x2e7c
testl %r15d, %r15d
jle 0x2e71
movslq %ebp, %rax
movl %r15d, %ecx
movl %eax, %edx
shlq $0x3, %rax
xorl %esi, %esi
movq $0x0, (%rbx,%rsi,8)
testl %ebp, %ebp
jle 0x2e12
movsd (%rbx,%rsi,8), %xmm0
xorl %edi, %edi
addsd (%r14,%rdi,8), %xmm0
movsd %xmm0, (%rbx,%rsi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x2dff
incq %rsi
addq %rax, %r14
cmpq %rcx, %rsi
jne 0x2dec
jmp 0x2e71
testl %r15d, %r15d
jle 0x2e35
movl %r15d, %edx
shlq $0x3, %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1050
testl %ebp, %ebp
jle 0x2e71
movslq %r15d, %rax
movl %ebp, %ecx
movl %r15d, %edx
shlq $0x3, %rax
xorl %esi, %esi
testl %r15d, %r15d
jle 0x2e66
xorl %edi, %edi
movsd (%r14,%rdi,8), %xmm0
addsd (%rbx,%rdi,8), %xmm0
movsd %xmm0, (%rbx,%rdi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x2e4e
incq %rsi
addq %rax, %r14
cmpq %rcx, %rsi
jne 0x2e47
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1292
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/matrix_reduce.c
// Function: morpheus_row_sum
void morpheus_row_sum(morpheus_layout_e layout,
                      int nrows, int ncols,
                      const double *x,
                      double *y) {
  if (layout == morpheus_row_major) {
    for (int i = 0; i < nrows; ++i) {
      const double *row = x + i*ncols;
      y[i] = 0;
      for (int j = 0; j < ncols; ++j) {
        y[i] += row[j];
      }
    }
  } else if (layout == morpheus_col_major) {
    for (int i = 0; i < nrows; ++i) {
      y[i] = 0;
    }
    for (int j = 0; j < ncols; ++j) {
      const double *column = x + j*nrows;
      for (int i = 0; i < nrows; ++i) {
        y[i] += column[i];
      }
    }
  } else {
    perror("unkwnown matrix layout");
    assert(0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
cmpl $0x15, %edi
je 0x2ef7
cmpl $0x16, %edi
jne 0x2f44
movl %r15d, %r12d
testl %r15d, %r15d
jle 0x2ebc
leaq (,%r12,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1050
testl %ebp, %ebp
jle 0x2f3b
movslq %r15d, %rax
movl %ebp, %ecx
shlq $0x3, %rax
xorl %edx, %edx
testl %r15d, %r15d
jle 0x2eea
xorl %esi, %esi
movsd (%r14,%rsi,8), %xmm0
addsd (%rbx,%rsi,8), %xmm0
movsd %xmm0, (%rbx,%rsi,8)
incq %rsi
cmpq %rsi, %r12
jne 0x2ed2
incq %rdx
addq %rax, %r14
cmpq %rcx, %rdx
jne 0x2ecb
jmp 0x2f3b
testl %r15d, %r15d
jle 0x2f3b
movslq %ebp, %rax
movl %r15d, %ecx
movl %ebp, %edx
shlq $0x3, %rax
xorl %esi, %esi
movq $0x0, (%rbx,%rsi,8)
testl %ebp, %ebp
jle 0x2f30
movsd (%rbx,%rsi,8), %xmm0
xorl %edi, %edi
addsd (%r14,%rdi,8), %xmm0
movsd %xmm0, (%rbx,%rsi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x2f1d
incq %rsi
addq %rax, %r14
cmpq %rcx, %rsi
jne 0x2f0a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x12be
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/simple_blas.c
// Function: morpheus_dgemv
void morpheus_dgemv(const morpheus_layout_e layout,
                    const morpheus_transpose_e trans,
                    const int nrows, const int ncols,
                    const double alpha, const double *A, const double *x,
                    const double beta, double *y) {
  const int inc = 1;
  const int lda = layout == morpheus_row_major ? ncols : nrows;
  cblas_dgemv(to_cblas_layout(layout), to_cblas_transpose(trans), nrows, ncols,
              alpha, A, lda, x, inc, beta, y, inc);
}

// Assembly:
pushq %rax
movq %r9, %rax
xorl %r10d, %r10d
cmpl $0x16, %edi
movl $0x66, %r11d
cmovnel %r10d, %r11d
cmpl $0x15, %edi
movl %edx, %r9d
cmovel %ecx, %r9d
movl $0x65, %edi
cmovnel %r11d, %edi
cmpl $0xc, %esi
movl $0x70, %r11d
cmovnel %r10d, %r11d
cmpl $0xb, %esi
movl $0x6f, %esi
cmovnel %r11d, %esi
movl $0x1, %r10d
pushq %r10
pushq 0x18(%rsp)
pushq %r10
pushq %rax
callq 0x10c0
addq $0x20, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/simple_blas.c
// Function: morpheus_inverse
int morpheus_inverse(int n, double *x, int *pivot, double *workspace) {
  workspace = workspace+n;
  int lwork = n*n;

  int rc;
  dgetrf_(&n, &n, x, &n, pivot, &rc);
  if (rc != 0) {
    return rc;
  }
  dgetri_(&n, x, &n, pivot, workspace, &lwork, &rc);
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x1c(%rsp), %rcx
movl %edi, (%rcx)
movl %edi, %eax
imull %edi, %eax
movl %eax, 0x18(%rsp)
leaq 0x14(%rsp), %r12
movq %rcx, %rdi
movq %rcx, %rsi
movq %r14, %rdx
movq %rbx, %r8
movq %r12, %r9
callq 0x10d0
movl (%r12), %eax
testl %eax, %eax
jne 0x30ae
movslq %ebp, %rax
leaq (%r15,%rax,8), %r8
movq %r12, (%rsp)
leaq 0x1c(%rsp), %rdi
leaq 0x18(%rsp), %r9
movq %r14, %rsi
movq %rdi, %rdx
movq %rbx, %rcx
callq 0x1170
movl 0x14(%rsp), %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/simple_blas.c
// Function: morpheus_dger
void morpheus_dger(const morpheus_layout_e layout,
                   const int nrows,
                   const int ncols,
                   const double alpha,
                   const double *x,
                   const double *y,
                   double *a) {
  const int inc = 1;
  const int lda = layout == morpheus_row_major ? ncols : nrows;
  cblas_dger(to_cblas_layout(layout), nrows, ncols,
                             alpha, x, inc, y, inc, a, lda);
}

// Assembly:
pushq %rax
movq %r9, %rax
movq %r8, %r9
xorl %r8d, %r8d
cmpl $0x16, %edi
movl $0x66, %r10d
cmovnel %r8d, %r10d
cmpl $0x15, %edi
movl %esi, %r11d
cmovel %edx, %r11d
movl $0x65, %edi
cmovnel %r10d, %edi
subq $0x8, %rsp
movl $0x1, %r8d
pushq %r11
pushq %rax
pushq $0x1
callq 0x10b0
addq $0x20, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/simple_blas.c
// Function: morpheus_dgemm
void morpheus_dgemm(const morpheus_layout_e layout,
                    const morpheus_transpose_e trans_a,
                    const morpheus_transpose_e trans_b,
                    const int m,
                    const int n,
                    const int k,
                    const double alpha,
                    const double *a,
                    const double *b,
                    const double beta,
                    double *c) {
  int lda, ldb, ldc;
  if (layout == morpheus_row_major) {
    lda = trans_a == morpheus_no_trans ? k : m;
    ldb = trans_b == morpheus_no_trans ? n : k;
    ldc = n;
  } else {
    lda = trans_a == morpheus_no_trans ? m : k;
    ldb = trans_b == morpheus_no_trans ? k : n;
    ldc = m;
  }
  cblas_dgemm(to_cblas_layout(layout),
              to_cblas_transpose(trans_a), to_cblas_transpose(trans_b),
              m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %eax
movl %esi, %r10d
xorl %edx, %edx
cmpl $0x16, %edi
movl $0x66, %r11d
cmovnel %edx, %r11d
cmpl $0xc, %esi
movl $0x70, %ebx
movl $0x0, %esi
cmovel %ebx, %esi
cmpl $0xc, %eax
cmovel %ebx, %edx
cmpl $0xb, %eax
sete %al
movl $0x6f, %ebx
cmovel %ebx, %edx
cmpl $0xb, %r10d
sete %r10b
cmovel %ebx, %esi
cmpl $0x15, %edi
movl %ecx, %ebx
cmovel %r8d, %ebx
sete %bpl
movl $0x65, %edi
cmovnel %r11d, %edi
xorb %bpl, %r10b
movl %r9d, %r10d
cmovnel %ecx, %r10d
xorb %bpl, %al
movl %r8d, %eax
cmovnel %r9d, %eax
pushq %rbx
pushq 0x38(%rsp)
pushq %rax
pushq 0x40(%rsp)
pushq %r10
pushq 0x48(%rsp)
callq 0x1140
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aligusnet[P]morpheus/src/simple_blas.c
// Function: morpheus_identity
void morpheus_identity(const int n, double *a) {
  const int m = n*n;
  const double zero = 0;
  const double one = 1;
  cblas_dcopy(m, &zero, 0, a, 1);
  cblas_dcopy(n, &one, 0, a, n+1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %r14d
imull %edi, %edi
leaq 0x8(%rsp), %rsi
movq $0x0, (%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rsp, %r15
movq %rax, (%r15)
xorl %edx, %edx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0x10e0
leal 0x1(%r14), %r8d
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x10e0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/quectel-mbim-proxy.c
// Function: non_block_write
static int non_block_write(int fd, void *data, int len)
{
    int ret;
    struct pollfd pollfd = {fd, POLLOUT, 0};
    ret = poll(&pollfd, 1, 3000);

    if (ret <= 0) {
        mbim_debug("%s poll ret=%d, errno: %d(%s)\n", __func__, ret, errno, strerror(errno));
    }

    ret = write (fd, data, len);
    if (ret != len)
        mbim_debug("%s write ret=%d, errno: %d(%s)\n", __func__, ret, errno, strerror(errno));

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x10(%rsp), %rdi
movl %ebp, (%rdi)
movl $0x4, 0x4(%rdi)
movl $0x1, %esi
movl $0xbb8, %edx            # imm = 0xBB8
callq 0x1100
testl %eax, %eax
jg 0x1dbc
movl %eax, %r15d
movq 0x2255(%rip), %rax      # 0x3fd0
movq (%rax), %r12
callq 0x127c
callq 0x1040
movl (%rax), %r13d
movl %r13d, %edi
callq 0x1150
movq %rax, (%rsp)
leaq 0x3ab(%rip), %rsi       # 0x2149
leaq 0x233b(%rip), %rdx      # 0x40e0
leaq 0x3bf(%rip), %rcx       # 0x216b
movq %r12, %rdi
movl %r15d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x10e0
movl %ebx, %edx
movl %ebp, %edi
movq %r14, %rsi
callq 0x1070
movq %rax, %r14
cmpl %ebx, %r14d
je 0x1e16
movq 0x21f9(%rip), %rax      # 0x3fd0
movq (%rax), %r15
callq 0x127c
callq 0x1040
movl (%rax), %ebp
movl %ebp, %edi
callq 0x1150
movq %rax, (%rsp)
leaq 0x383(%rip), %rsi       # 0x217b
leaq 0x22e1(%rip), %rdx      # 0x40e0
leaq 0x365(%rip), %rcx       # 0x216b
movq %r15, %rdi
movl %r14d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x10e0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/quectel-mbim-proxy.c
// Function: handle_client_disconnect
static void handle_client_disconnect(int client_fd)
{
    int i;

    for (i = 0; i < CM_MAX_CLIENT; i++) {
        if (cm_clients[i].client_fd == client_fd) {
            mbim_debug("%s client_fd=%d, client_idx=%d\n", __func__, cm_clients[i].client_fd, cm_clients[i].client_idx);
            safe_close(cm_clients[i].client_fd);
            return;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %r14d, %r14d
leaq 0x233a(%rip), %r15      # 0x4170
cmpl %edi, (%r15,%r14,8)
je 0x1e47
incq %r14
cmpq $0x20, %r14
jne 0x1e36
jmp 0x1e97
movq 0x2182(%rip), %rax      # 0x3fd0
movq (%rax), %rbx
callq 0x127c
movl (%r15,%r14,8), %r8d
movl 0x4(%r15,%r14,8), %r9d
leaq 0x3eb(%rip), %rsi       # 0x2251
leaq 0x2273(%rip), %rdx      # 0x40e0
leaq 0x400(%rip), %rcx       # 0x2274
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10e0
movl (%r15,%r14,8), %edi
testl %edi, %edi
jle 0x1e97
shlq $0x3, %r14
callq 0x10c0
movl $0xffffffff, (%r14,%r15) # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/test-unssa.c
// Function: main
int main(int argc, char **argv)
{
	struct string_list * filelist = NULL;
	char *file;

	compile(sparse_initialize(argc, argv, &filelist));
	FOR_EACH_PTR(filelist, file) {
		compile(sparse(file));
	} END_FOR_EACH_PTR(file);

	report_stats();
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %rbx, %rdx
callq 0x14942
movq %rax, %rdi
callq 0xf671
movq (%rbx), %rbx
testq %rbx, %rbx
je 0xf660
movq %rbx, %r14
movzwl (%r14), %eax
testb %al, %al
jle 0xf657
xorl %r15d, %r15d
movq 0x18(%r14,%r15,8), %rdi
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0xf63b
testq %rdi, %rdi
je 0xf648
callq 0x14c82
movq %rax, %rdi
callq 0xf671
incq %r15
movl (%r14), %eax
movsbq %al, %rcx
cmpq %rcx, %r15
jl 0xf627
movq 0x10(%r14), %r14
cmpq %rbx, %r14
jne 0xf61c
callq 0x2e0ac
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq