LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_print_data
static int regf_print_data(const char *pref, const void *p, unsigned type,
			   unsigned len)
{
	switch (type) {
	case REGF_VK_T_DWORD:
		printf("%s%s\n", pref, regf_dword2str(p, len));
		break;
	case REGF_VK_T_QWORD:
		printf("%s%s\n", pref, regf_qword2str(p, len));
		break;
	case REGF_VK_T_SZ:
	case REGF_VK_T_EXPAND_SZ:
		printf("%s%ls\n", pref, regf_unicode2wchar(p, len));
		break;
	default:
		printf("%s%s\n", pref, regf_hexdump(p, len));
		break;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x3142
jmp 0x30d5
movl -0x1c(%rbp), %eax
subl $0x4, %eax
je 0x30ec
jmp 0x30df
movl -0x1c(%rbp), %eax
subl $0xb, %eax
je 0x3117
jmp 0x316d
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3350
movq -0x28(%rbp), %rsi
movq %rax, %rdx
leaq 0x279b(%rip), %rdi      # 0x58a9
movb $0x0, %al
callq 0x10a0
jmp 0x3196
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x33d0
movq -0x30(%rbp), %rsi
movq %rax, %rdx
leaq 0x2770(%rip), %rdi      # 0x58a9
movb $0x0, %al
callq 0x10a0
jmp 0x3196
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x2050
movq -0x38(%rbp), %rsi
movq %rax, %rdx
leaq 0x274b(%rip), %rdi      # 0x58af
movb $0x0, %al
callq 0x10a0
jmp 0x3196
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3450
movq -0x40(%rbp), %rsi
movq %rax, %rdx
leaq 0x271a(%rip), %rdi      # 0x58a9
movb $0x0, %al
callq 0x10a0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_db
static int regf_parse_db(const char *pref, unsigned off)
{
#define DB_PR_WARN(__fmt, ...)	PR_WARN(off, "db", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const struct regf_db *db = (void *)rc->data;
	char __pref[0x10];
	struct cell *cell;
	int res;

	if (regf_cell_check_sign_len(st.data, off, "db", sizeof(*db)))
		return -1;

	if (db->nsegm) {
		cell = cache_cell_find(db->segm_off);
		if (!cell) {
			printf("\n");
			DB_PR_WARN("could not find segments list cell 0x%08X\n",
				   db->segm_off);
			return -1;
		}
		cache_cell_updref(cell, CT_SLST);
		snprintf(__pref, sizeof(__pref), "%s  ", pref);
		res = regf_parse_slst(__pref, db->segm_off, db->nsegm);
		if (res) {
			DB_PR_WARN("could not parse segments list cell 0x%08X\n",
				   db->segm_off);
			return -1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq 0x4eda(%rip), %rax      # 0x8100
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq 0x4ebd(%rip), %rdi      # 0x8100
movl -0x14(%rbp), %esi
leaq 0x26a7(%rip), %rdx      # 0x58f4
movl $0x8, %ecx
callq 0x4b20
cmpl $0x0, %eax
je 0x3268
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x333f
movq -0x28(%rbp), %rax
cmpw $0x0, 0x2(%rax)
je 0x3338
movq -0x28(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x1c20
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x32c4
leaq 0x2002(%rip), %rdi      # 0x5297
movb $0x0, %al
callq 0x10a0
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x264a(%rip), %rdi      # 0x58f7
leaq 0x2640(%rip), %rdx      # 0x58f4
movb $0x0, %al
callq 0x4760
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x333f
movq -0x48(%rbp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x1c80
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x10, %esi
leaq 0x22de(%rip), %rdx      # 0x55c4
movb $0x0, %al
callq 0x10c0
leaq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x28(%rbp), %rax
movzwl 0x2(%rax), %edx
callq 0x3540
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x3336
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
leaq 0x2612(%rip), %rdi      # 0x5931
leaq 0x25ce(%rip), %rdx      # 0x58f4
movb $0x0, %al
callq 0x4760
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x333f
jmp 0x3338
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rsa9000[P]regfanalysistools/regftree.c
// Function: regf_parse_slst
static int regf_parse_slst(const char *pref, unsigned off, unsigned num)
{
#define SLST_PR_WARN(__fmt, ...)PR_WARN(off, "slst", __fmt, ##__VA_ARGS__)
	const struct regf_cell *rc = st.data + off;
	const uint32_t *segs = (void *)rc->data;
	struct cell *cell;
	int i, ret = 0;

	if (regf_cell_check_len(st.data, off, "slst", num * sizeof(segs[0])))
		return -1;

	for (i = 0; i < num; ++i) {
		cell = cache_cell_find(segs[i]);
		if (!cell) {
			SLST_PR_WARN("could not find data segment cell 0x%08X\n",
				     segs[i]);
			ret = -1;
			continue;
		}
		cache_cell_updref(cell, CT_DATAS);
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq 0x4ba7(%rip), %rax      # 0x8100
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movq 0x4b83(%rip), %rdi      # 0x8100
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %eax
shlq $0x2, %rax
movl %eax, %ecx
leaq 0x23dc(%rip), %rdx      # 0x596c
callq 0x4a30
cmpl $0x0, %eax
je 0x35a3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3618
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x3612
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x1c20
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x35f9
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0x238f(%rip), %rdi      # 0x5971
leaq 0x2383(%rip), %rdx      # 0x596c
movb $0x0, %al
callq 0x4760
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
jmp 0x3607
movq -0x30(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x1c80
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x35aa
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/./binheap.c
// Function: max_heapify
void max_heapify(int *A, size_t heapsize, size_t i) {
  while(true) {
    size_t l = left(i), r = right(i), largest = i;
    // Detect the index of the largest valid element in A between l, r, i
    if(l < heapsize && A[l] > A[i]) largest = l;
    if(r < heapsize && A[r] > A[largest]) largest = r;

    // If i is the largest already, the heap property has been restored; terminate
    if(largest == i) break; 
    
    // Else swap i down and continue
    swap(A, i, largest);
    i = largest;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1240
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1260
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x1330
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x1330
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x135a
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0x135a
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x1366
jmp 0x1384
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x1280
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x12e4
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/./binheap.c
// Function: min_heapify
void min_heapify(int *A, size_t heapsize, int i) {
  while(true) {
    size_t l = left(i), r = right(i), smallest = i;
    // Detect the index of the largest valid element in A between l, r, i
    if(l < heapsize && A[l] < A[i]) smallest = l;
    if(r < heapsize && A[r] < A[smallest]) smallest = r;

    // If i is the largest already, the heap property has been restored; terminate
    if(smallest == i) break; 
    
    // Else swap i down and continue
    swap(A, i, smallest);
    i = smallest;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movslq -0x14(%rbp), %rdi
callq 0x1240
movq %rax, -0x20(%rbp)
movslq -0x14(%rbp), %rdi
callq 0x1260
movq %rax, -0x28(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x13ef
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13ef
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x1419
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x1419
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1428
jmp 0x1445
movq -0x8(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x1280
movq -0x30(%rbp), %rax
movl %eax, -0x14(%rbp)
jmp 0x13a3
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: main
int main(int argc, char *argv[]) {
  if(argc != 2) error(1,0, "usage: ./sorts [nelems]");
  int nelems = atoi(argv[1]);
  if(nelems <= 0) error(1,0, "nelems must be a valid integer greater than or equal to 1");

  long long seed = time(NULL);
  srand(seed);
  printf("Random seed: %lld\n", seed);

  printf("Creating a template array of %d random elements...\n", nelems);
  int A[nelems];
  for(int i = 0; i < nelems; i++) A[i] = rand();
  printf("Done. Starting tests...\n\n");

  time_mergesort(A, nelems);
  time_heapsort(A, nelems);
  time_quicksort(A, nelems);
  time_gnu_qsort(A, nelems);
  time_radix_sort(A, nelems);
  time_softheap_sort(A, nelems);   

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x1521
movl $0x1, %edi
xorl %esi, %esi
leaq 0x1b36(%rip), %rdx      # 0x3050
movb $0x0, %al
callq 0x10e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x10f0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x154c
movl $0x1, %edi
xorl %esi, %esi
leaq 0x1b23(%rip), %rdx      # 0x3068
movb $0x0, %al
callq 0x10e0
xorl %eax, %eax
movl %eax, -0x48(%rbp)
movl %eax, %edi
callq 0x10c0
movq %rax, -0x20(%rbp)
movl -0x20(%rbp), %edi
callq 0x10a0
movl -0x48(%rbp), %eax
movq -0x20(%rbp), %rsi
leaq 0x1b30(%rip), %rdi      # 0x30a2
movb %al, -0x41(%rbp)
callq 0x1060
movb -0x41(%rbp), %al
movl -0x14(%rbp), %esi
leaq 0x1b2e(%rip), %rdi      # 0x30b5
callq 0x1060
movl -0x14(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x15df
callq 0x1110
movl %eax, %edx
movq -0x40(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x15ba
leaq 0x1b03(%rip), %rdi      # 0x30e9
movb $0x0, %al
callq 0x1060
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x1660
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x16a0
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x16e0
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x1720
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x1760
movq -0x40(%rbp), %rdi
movslq -0x14(%rbp), %rsi
callq 0x17a0
movl $0x0, -0x4(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: time_sort
static void time_sort(int *A, size_t length, sorter sort, char *sort_name) {
  printf("----------------- Timing %s ------------------\n", sort_name);
  printf("Making copy of original array...\n");
  int B[length];
  memcpy(B, A, length * sizeof(int));

  printf("Timing %s on array...\n", sort_name);

  clock_t tick = clock();
  sort(B, length);
  clock_t tock = clock();
  double elapsed_secs = (double)(tock - tick) / CLOCKS_PER_SEC;
  
  if(!sorted(B, length)) error(1,0, "%s failed", sort_name);
  printf("Success.\n");
  printf("%s\t %4.6f s \n\n", sort_name, elapsed_secs);  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq 0x190a(%rip), %rdi      # 0x310d
xorl %eax, %eax
movb %al, -0x51(%rbp)
callq 0x1060
movb -0x51(%rbp), %al
leaq 0x1926(%rip), %rdi      # 0x313d
callq 0x1060
movq -0x10(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x50(%rbp)
movq %rdi, %rsp
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x10b0
movq -0x20(%rbp), %rsi
leaq 0x18ff(%rip), %rdi      # 0x315f
movb $0x0, %al
callq 0x1060
callq 0x1050
movq -0x50(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rsi
callq *%rax
callq 0x1050
movq -0x50(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd 0x1768(%rip), %xmm1     # 0x3008
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x10(%rbp), %rsi
callq 0x1980
testb $0x1, %al
jne 0x18cf
movq -0x20(%rbp), %rcx
movl $0x1, %edi
xorl %esi, %esi
leaq 0x18ae(%rip), %rdx      # 0x3176
movb $0x0, %al
callq 0x10e0
leaq 0x18aa(%rip), %rdi      # 0x3180
movb $0x0, %al
callq 0x1060
movq -0x20(%rbp), %rsi
movsd -0x48(%rbp), %xmm0
leaq 0x189d(%rip), %rdi      # 0x318a
movb $0x1, %al
callq 0x1060
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: heapsort
static void heapsort(int *A, size_t length) {
  build_maxheap(A, length);
  for(size_t i = length - 1; i >= 1; i--) {
    swap(A, i, 0);
    max_heapify(A, i, 0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1450
movq -0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jb 0x1c20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x1280
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x12d0
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1be9
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: quicksort
static void quicksort(int *A, int l, int r) {
  if(l >= r) return;
  int rand_pivot = l + (rand() % (r - l + 1));
  swap(A, l, rand_pivot);

  int q = partition(A, l, r);
  quicksort(A, l, q-1);
  quicksort(A, q+1, r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jl 0x1c7c
jmp 0x1ce2
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
callq 0x1110
movl -0x10(%rbp), %ecx
subl -0xc(%rbp), %ecx
addl $0x1, %ecx
cltd
idivl %ecx
movl -0x1c(%rbp), %eax
addl %edx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x1280
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x1cf0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x18(%rbp), %edx
subl $0x1, %edx
callq 0x1c60
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
callq 0x1c60
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: partition
static int partition(int *A, int l, int r) {
  int i = l, j = r+1;
  int x = A[l];

  while(true) {
    do { j--; } while(A[j] > x);
    do { i++; } while(A[i] < x && i <= j);

    if(i < j) swap(A, i, j);
    else break;
  }

  // It can be shown that at this point, A[l] = x,
  // A[l+1..i-1] <= x, A[i..r] >= x. Swapping A[l] with A[i-1]
  // completes a partition with the pivot at i-1.
  swap(A, l, i-1); 
  return i-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
jmp 0x1d21
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jg 0x1d21
jmp 0x1d3c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x1d(%rbp)
jge 0x1d66
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
setle %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x1d3c
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1d88
movq -0x8(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movslq -0x18(%rbp), %rdx
callq 0x1280
jmp 0x1d8a
jmp 0x1d8c
jmp 0x1d1f
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x1280
movl -0x14(%rbp), %eax
subl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: radix_sort
static void radix_sort(int *A, size_t length) {
  int b = 10; // radix sort base
  int ndigits = ceil(log(RAND_MAX)/log(b));
  int B[length];
  memset(B, 0, sizeof(int) * length); // Valgrind gets pissed if I don't do this

  int divisor = 1; // (x / divisor) % (b) is the log_b(divisor)th least sigdig of x

  for(int i = 0; i < ndigits; i++) {
    // On even-numbered runs, current progress moves A->B; on even, B->A
    if(i % 2 == 0) radix_pass(A, B, length, b, divisor);
    else radix_pass(B, A, length, b, divisor);
    divisor *= b;
  }

  // After the final pass, the sorted array will be B if ndigits was odd.
  // If this is the case, copy B into A to complete the sort.
  if(ndigits % 2 == 1) memcpy(A, B, length * sizeof(int));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xa, -0x14(%rbp)
movsd 0x11f1(%rip), %xmm0     # 0x3010
callq 0x1090
movsd %xmm0, -0x40(%rbp)
cvtsi2sdl -0x14(%rbp), %xmm0
callq 0x1090
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
callq 0x1100
cvttsd2si %xmm0, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x20(%rbp)
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x38(%rbp)
movq %rdi, %rsp
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x1080
movl $0x1, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1eef
movl -0x30(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1ec2
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl -0x2c(%rbp), %r8d
callq 0x1f20
jmp 0x1eda
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl -0x2c(%rbp), %r8d
callq 0x1f20
movl -0x14(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x1e90
movl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x1, %edx
jne 0x1f14
movq -0x38(%rbp), %rsi
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x10b0
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: radix_pass
static void radix_pass(int *input, int *output, size_t length, int b, int divisor) {
  int counter[b];
  memset(counter, 0, sizeof(int) * b); // set digit counts to 0
   
  // Count the number of representatives there are of each digit across all values
  for(int i = 0; i < length; i++) {
    int dig_i = (input[i] / divisor) % b; 
    counter[dig_i]++;
  }

  // Change counter so that counter[i] counts how many elements have appropriate LSD
  // less than or equal to i. This is 1 plus the max index at which an element 
  // with that digit should appear in a zero-indexed array. 
  for(int i = 1; i < b; i++) {
    counter[i] += counter[i-1];
  }
  
  for(int i = length - 1; i >= 0; i--) {
    int elem = input[i];
    int dig_i = (elem / divisor) % b;
    output[counter[dig_i] - 1] = elem;
    counter[dig_i]--; // so that next elem with this digit can be placed before this one
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,4), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x50(%rbp)
movq %rdi, %rsp
movq %rax, -0x30(%rbp)
movslq -0x1c(%rbp), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x1080
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1fb4
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cltd
idivl -0x20(%rbp)
cltd
idivl -0x1c(%rbp)
movq -0x50(%rbp), %rax
movl %edx, -0x38(%rbp)
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1f78
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1fe8
movq -0x50(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movslq -0x3c(%rbp), %rcx
addl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1fbb
movq -0x18(%rbp), %rax
subq $0x1, %rax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jl 0x2048
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cltd
idivl -0x20(%rbp)
cltd
idivl -0x1c(%rbp)
movq -0x50(%rbp), %rax
movl %edx, -0x48(%rbp)
movl -0x44(%rbp), %esi
movq -0x10(%rbp), %rcx
movslq -0x48(%rbp), %rdx
movl (%rax,%rdx,4), %edx
subl $0x1, %edx
movslq %edx, %rdx
movl %esi, (%rcx,%rdx,4)
movslq -0x48(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1ff3
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/millimat[P]Soft-Heap/sorts.c
// Function: softheap_sort
static void softheap_sort(int *A, size_t length) {
  if(length == 1) return; // already sorted
  double epsilon = (double)1/length;
  if(epsilon <= 0) epsilon = DBL_MIN; // guarantee positive epsilon

  softheap *sh = makeheap_empty(epsilon);
  for(int i = 0; i < length; i++) insert(sh, A[i]);
  for(int i = 0; i < length; i++) A[i] = extract_min(sh);
  destroy_heap(sh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x1, -0x10(%rbp)
jne 0x207c
jmp 0x2144
movaps 0xfad(%rip), %xmm0      # 0x3030
movq -0x10(%rbp), %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0xfac(%rip), %xmm0      # 0x3040
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0xf6d(%rip), %xmm0      # 0x3018
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jb 0x20cb
movsd 0xf5a(%rip), %xmm0      # 0x3020
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x21a0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x2109
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x2410
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x20e0
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x213b
movq -0x20(%rbp), %rdi
callq 0x2830
movl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2110
movq -0x20(%rbp), %rdi
callq 0x2310
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: readNGT1
static int readNGT1(int handle)
{
  size_t        i;
  ssize_t       r;
  unsigned char c;
  unsigned char buf[500];
  bool          finish;

  do
  {
    r = read(handle, buf, sizeof(buf));
    logDebug("NGT read = %d\n", (int) r);

    if (r < 0 && errno == EAGAIN)
    {
      usleep(25000);
      continue;
    }
    if (r <= 0) /* No char read, abort message read */
    {
      if (!isFile)
      {
        logAbort("Unable to read from NGT1 device, errno=%d\n", errno);
      }
      exit(0);
    }

    if (isLogLevelEnabled(LOGLEVEL_DEBUG))
    {
      StringBuffer sb = sbNew;

      sbAppendEncodeHex(&sb, buf, r, ' ');
      logDebug("NGT data: %s\n", sbGet(&sb));
      sbClean(&sb);
    }

    for (i = 0; i < r; i++)
    {
      c      = buf[i];
      finish = readNGT1Byte(c);
    }
  } while (!finish);

  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq -0x210(%rbp), %rsi
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x2190
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %esi
leaq 0x57f2(%rip), %rdi      # 0x8855
movb $0x0, %al
callq 0x42e0
cmpq $0x0, -0x18(%rbp)
jge 0x308a
callq 0x2050
cmpl $0xb, (%rax)
jne 0x308a
movl $0x61a8, %edi           # imm = 0x61A8
callq 0x2340
jmp 0x31c3
cmpq $0x0, -0x18(%rbp)
jg 0x30b6
testb $0x1, 0x81b4(%rip)      # 0xb24c
jne 0x30af
callq 0x2050
movl (%rax), %esi
leaq 0x57bc(%rip), %rdi      # 0x8864
movb $0x0, %al
callq 0x4440
xorl %edi, %edi
callq 0x22c0
movl $0x3, %edi
callq 0x45f0
testb $0x1, %al
jne 0x30c9
jmp 0x3182
leaq 0x83e8(%rip), %rax      # 0xb4b8
movq (%rax), %rcx
movq %rcx, -0x230(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x228(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x220(%rbp)
leaq -0x210(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x230(%rbp), %rdi
movl $0x20, %ecx
callq 0x49e0
cmpq $0x0, -0x230(%rbp)
je 0x3126
movq -0x230(%rbp), %rax
movq %rax, -0x238(%rbp)
jmp 0x3136
leaq 0x54ad(%rip), %rax      # 0x85da
movq %rax, -0x238(%rbp)
jmp 0x3136
movq -0x238(%rbp), %rsi
leaq 0x574b(%rip), %rdi      # 0x888f
movb $0x0, %al
callq 0x42e0
cmpq $0x0, -0x230(%rbp)
je 0x316c
movq -0x230(%rbp), %rdi
callq 0x2030
movq $0x0, -0x230(%rbp)
movq $0x0, -0x220(%rbp)
movq $0x0, -0x228(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x31c1
movq -0x10(%rbp), %rax
movb -0x210(%rbp,%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %edi
callq 0x3750
andb $0x1, %al
movb %al, -0x211(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x318a
jmp 0x31c3
movb -0x211(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x303e
movq -0x18(%rbp), %rax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: readIn
static bool readIn(void)
{
  unsigned char buf[BUFFER_SIZE];
  ssize_t       r;

  r = read(STDIN_FILENO, buf, sizeof(buf));

  if (r <= 0)
  {
    if (!isFile)
    {
      logAbort("EOF on reading stdin\n");
    }
    else
    {
      exit(0);
    }
  }

  sbAppendData(&inBuffer, buf, r);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
leaq -0x390(%rbp), %rsi
xorl %edi, %edi
movl $0x384, %edx            # imm = 0x384
callq 0x2190
movq %rax, -0x398(%rbp)
cmpq $0x0, -0x398(%rbp)
jg 0x3231
testb $0x1, 0x8036(%rip)      # 0xb24c
jne 0x3228
leaq 0x560e(%rip), %rdi      # 0x882d
movb $0x0, %al
callq 0x4440
jmp 0x322f
xorl %edi, %edi
callq 0x22c0
jmp 0x3231
leaq -0x390(%rbp), %rsi
movq -0x398(%rbp), %rdx
leaq 0x800a(%rip), %rdi      # 0xb250
callq 0x4930
movb $0x1, %al
andb $0x1, %al
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: getInMsg
static bool getInMsg(char *msg, size_t msgLen)
{
  char  *p;
  size_t len;

  p = strchr(sbGet(&inBuffer), '\n');
  if (!p)
  {
    return false;
  }
  len = p - sbGet(&inBuffer) + 1;
  memcpy(msg, sbGet(&inBuffer), len);
  msg[len] = 0;
  sbDelete(&inBuffer, 0, len);

  logDebug("getInMsg => '%s'\n", msg);

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, 0x7fd8(%rip)      # 0xb250
je 0x3287
movq 0x7fcf(%rip), %rax      # 0xb250
movq %rax, -0x30(%rbp)
jmp 0x3294
leaq 0x534c(%rip), %rax      # 0x85da
movq %rax, -0x30(%rbp)
jmp 0x3294
movq -0x30(%rbp), %rdi
movl $0xa, %esi
callq 0x20e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x32b6
movb $0x0, -0x1(%rbp)
jmp 0x3368
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, 0x7f8a(%rip)      # 0xb250
je 0x32d5
movq 0x7f81(%rip), %rax      # 0xb250
movq %rax, -0x40(%rbp)
jmp 0x32e2
leaq 0x52fe(%rip), %rax      # 0x85da
movq %rax, -0x40(%rbp)
jmp 0x32e2
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x7f4b(%rip)      # 0xb250
je 0x3314
movq 0x7f42(%rip), %rax      # 0xb250
movq %rax, -0x50(%rbp)
jmp 0x3321
leaq 0x52bf(%rip), %rax      # 0x85da
movq %rax, -0x50(%rbp)
jmp 0x3321
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x21c0
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdx
leaq 0x7f07(%rip), %rdi      # 0xb250
xorl %eax, %eax
movl %eax, %esi
callq 0x47f0
movq -0x10(%rbp), %rsi
leaq 0x54e6(%rip), %rdi      # 0x8843
movb $0x0, %al
callq 0x42e0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: writeUint64
static size_t writeUint64(uint64_t v, unsigned char *buf)
{
  size_t out = 0;
  for (int byte = 0; byte < 8; byte++)
  {
    uint8_t c = (uint8_t) v;
    if (c == ESC)
    {
      *buf++ = c;
      out++;
    }
    *buf++ = c;
    out++;
    v = v >> 8;
  }
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0x3748
movq -0x8(%rbp), %rax
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
cmpl $0x1b, %eax
jne 0x3711
movb -0x1d(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movb -0x1d(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
shrq $0x8, %rax
movq %rax, -0x8(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x36db
movq -0x18(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: headerReceived
static void headerReceived(const unsigned char *msg, size_t msgLen)
{
  unsigned char command;
  unsigned char payloadLen;

  command    = msg[0];
  payloadLen = msgLen - 1;

  logDebug("header command = %02x len = %zu\n", command, payloadLen);

  if (command == EBL_TIMESTAMP)
  {
    if (payloadLen != 8)
    {
      logError("Invalid EBL timestamp length %zu\n", payloadLen);
      exit(3);
    }
    else
    {
      // Filetime to Unix epoch millis, see
      // https://devblogs.microsoft.com/oldnewthing/20220602-00/?p=106706
      uint64_t ft = *(uint64_t *) (msg + 1);

      ft = ft / 10000;
      ft -= 11644473600000;
      timestamp = ft;
      logDebug("EBL timestamp %" PRIu64 "\n", timestamp);
    }
  }
  else if (command == EBL_VERSION)
  {
    logDebug("EBL version\n");
  }
  else
  {
    logError("EBL unknown message type %02x\n", command);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
subq $0x1, %rax
movb %al, -0x12(%rbp)
movzbl -0x11(%rbp), %esi
movzbl -0x12(%rbp), %edx
leaq 0x4e73(%rip), %rdi      # 0x8906
movb $0x0, %al
callq 0x42e0
movzbl -0x11(%rbp), %eax
cmpl $0x3, %eax
jne 0x3b1d
movzbl -0x12(%rbp), %eax
cmpl $0x8, %eax
je 0x3ac8
movzbl -0x12(%rbp), %esi
leaq 0x4e70(%rip), %rdi      # 0x8927
movb $0x0, %al
callq 0x4390
movl $0x3, %edi
callq 0x22c0
movq -0x8(%rbp), %rax
movq 0x1(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x2710, %ecx           # imm = 0x2710
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movabsq $0xa9730b66800, %rcx    # imm = 0xA9730B66800
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, 0x7962(%rip)      # 0xb468
movq 0x795b(%rip), %rsi      # 0xb468
leaq 0x4e35(%rip), %rdi      # 0x8949
movb $0x0, %al
callq 0x42e0
jmp 0x3b4a
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
jne 0x3b36
leaq 0x4e2f(%rip), %rdi      # 0x895c
movb $0x0, %al
callq 0x42e0
jmp 0x3b48
movzbl -0x11(%rbp), %esi
leaq 0x4e28(%rip), %rdi      # 0x8969
movb $0x0, %al
callq 0x4390
jmp 0x3b4a
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: messageReceived
static void messageReceived(const unsigned char *msg, size_t msgLen)
{
  unsigned char command;
  unsigned char checksum = 0;
  unsigned char payloadLen;
  size_t        i;

  if (msgLen < 3)
  {
    logError("Ignore short command len = %zu\n", msgLen);
    return;
  }

  for (i = 0; i < msgLen; i++)
  {
    checksum += msg[i];
  }
  if (checksum)
  {
    logError("Ignoring message with invalid checksum\n");
    return;
  }

  command    = msg[0];
  payloadLen = msg[1];

  logDebug("message command = %02x len = %u\n", command, payloadLen);

  if (command == N2K_MSG_RECEIVED || (isFile && command == N2K_MSG_SEND))
  {
    n2kMessageReceived(msg + 2, payloadLen, command);
  }
  else if (command == NGT_MSG_RECEIVED)
  {
    ngtMessageReceived(msg + 2, payloadLen);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x12(%rbp)
cmpq $0x3, -0x10(%rbp)
jae 0x3b82
movq -0x10(%rbp), %rsi
leaq 0x4e12(%rip), %rdi      # 0x8988
movb $0x0, %al
callq 0x4390
jmp 0x3c51
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x3bb7
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movzbl -0x12(%rbp), %eax
addl %ecx, %eax
movb %al, -0x12(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3b8a
cmpb $0x0, -0x12(%rbp)
je 0x3bd0
leaq 0x4de4(%rip), %rdi      # 0x89a8
movb $0x0, %al
callq 0x4390
jmp 0x3c51
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x13(%rbp)
movzbl -0x11(%rbp), %esi
movzbl -0x13(%rbp), %edx
leaq 0x4dde(%rip), %rdi      # 0x89d0
movb $0x0, %al
callq 0x42e0
movzbl -0x11(%rbp), %eax
cmpl $0x93, %eax
je 0x3c18
testb $0x1, 0x7641(%rip)      # 0xb24c
je 0x3c31
movzbl -0x11(%rbp), %eax
cmpl $0x94, %eax
jne 0x3c31
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movzbl -0x13(%rbp), %eax
movl %eax, %esi
movzbl -0x11(%rbp), %edx
callq 0x3c60
jmp 0x3c51
movzbl -0x11(%rbp), %eax
cmpl $0xa0, %eax
jne 0x3c4f
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movzbl -0x13(%rbp), %eax
movl %eax, %esi
callq 0x3e90
jmp 0x3c51
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/canboat[P]canboat/actisense-serial/actisense-serial.c
// Function: ngtMessageReceived
static void ngtMessageReceived(const unsigned char *msg, size_t msgLen)
{
  size_t i;
  char   line[1000];
  char  *p;
  char   dateStr[DATE_LENGTH];

  if (msgLen < 12)
  {
    logError("Ignore short msg len = %zu\n", msgLen);
    return;
  }

  sprintf(line, "%s,%u,%u,%u,%u,%u", fmtTimestamp(dateStr, timestamp), 0, ACTISENSE_BEM + msg[0], 0, 0, (unsigned int) msgLen - 1);
  p = line + strlen(line);
  for (i = 1; i < msgLen && p < line + sizeof(line) - 5; i++)
  {
    sprintf(p, ",%02x", msg[i]);
    p += 3;
  }
  *p++ = 0;

  puts(line);
  fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0xc, -0x10(%rbp)
jae 0x3ec1
movq -0x10(%rbp), %rsi
leaq 0x4b9c(%rip), %rdi      # 0x8a51
movb $0x0, %al
callq 0x4390
jmp 0x4011
leaq -0x400(%rbp), %rax
movq %rax, -0x460(%rbp)
leaq -0x450(%rbp), %rdi
movq 0x758b(%rip), %rsi      # 0xb468
callq 0x40a0
movq -0x460(%rbp), %rdi
movq %rax, %rdx
movq -0x8(%rbp), %rax
movzbl (%rax), %r8d
addl $0x40000, %r8d          # imm = 0x40000
movq -0x10(%rbp), %rax
subl $0x1, %eax
leaq 0x4b30(%rip), %rsi      # 0x8a39
xorl %r9d, %r9d
movl %r9d, %ecx
movl $0x0, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x22b0
leaq -0x400(%rbp), %rax
movq %rax, -0x458(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x20c0
movq %rax, %rcx
movq -0x458(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x408(%rbp)
movq $0x1, -0x18(%rbp)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x461(%rbp)
jae 0x3f8e
movq -0x408(%rbp), %rax
leaq -0x400(%rbp), %rcx
addq $0x3e8, %rcx            # imm = 0x3E8
addq $-0x5, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x461(%rbp)
movb -0x461(%rbp), %al
testb $0x1, %al
jne 0x3f9a
jmp 0x3fde
movq -0x408(%rbp), %rdi
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x4a97(%rip), %rsi      # 0x8a4b
movb $0x0, %al
callq 0x22b0
movq -0x408(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x408(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3f57
movq -0x408(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x408(%rbp)
movb $0x0, (%rax)
leaq -0x400(%rbp), %rdi
callq 0x2090
movq 0x6fcf(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2200
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/DASrealign.c
// Function: init_finger
static inline void init_finger(Finger *f, int *map, int mb, int me, int blen)
{ if (blen == 0)
    { f->cidx = mb+3;
      f->lidx = me;
      f->last = map[mb];
    }
  else
    { f->cidx = me-4;
      f->lidx = mb-1;
      f->last = blen - map[me-1];
    }
  f->dist = 0;
  f->blen = blen;
  f->map  = map;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x4476
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x44a9
movl -0x18(%rbp), %ecx
subl $0x4, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
subl (%rax,%rdx,4), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/DASrealign.c
// Function: convert_trace
static void convert_trace(Path *path)
{ int ab, ae;
  int t;
  uint16 *trace = ((uint16 *) (path->trace));
  
  ae = lowTP(path->abpos);
  ab = path->abpos;
  for (t = 0; t < path->tlen; t += 2)
    { ae += TRACE_SPACING;
      if (ae > path->aepos)
        ae = path->aepos;
#ifdef TRACE
      printf("        %5d,%5d -> %5d,%5d\n",trace[t],trace[t+1],ae-ab,trace[t+1]);
      fflush(stdout);
#endif
      trace[t] = ae-ab;
      ab = ae;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x2400
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x494b
movl 0x27b0f(%rip), %eax     # 0x2c418
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jle 0x4925
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
movw %ax, %dx
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x48f7
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/processtab.c
// Function: getBaseFilename
static char *
getBaseFilename(char *path)
    {
    char *fileName = StringDup(path);
    char *slash = strrchr(fileName, '/');
    char *backSlash = strrchr(fileName, '\\');
    char *baseName = slash > backSlash ? slash : backSlash;
    char *ext;
    
    // if baseName points to a slash or backslash, increment the pointer
    if (baseName > 0) baseName++;
    else baseName = fileName;
    
    ext = strrchr(baseName, '.');
    
    if (ext > 0) ext[0] = '\0';
    
    baseName = StringDup(baseName);
    free(fileName);
    return baseName;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x65f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0x10a0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x5c, %esi
callq 0x10a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x1831
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x1839
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jbe 0x1856
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x185e
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x2e, %esi
callq 0x10a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jbe 0x187e
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rdi
callq 0x65f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1030
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/processtab.c
// Function: printHelp
static void
printHelp()
	{
	printf("Usage: %s [OPTION]... [FILE]\n", programCmdLine);
	printVersion();
    printf("\n");
    printf("FILE argument is mandatory, or must be omitted with option -i.\n");
    printf("  -h           print this help information\n");
    printf("  -i           input from stdin (output default name is 'song.c')\n");
    printf("  -m           output makefile to stdout (cannot be used with -o or -s)\n");
    printf("  -n NAME      set program name for the output\n");
    printf("  -o           output songlib program to stdout\n");
    printf("  -s           skip makefile output (cannot be used with -m)\n");
    printf("  -v           output version information and exit\n");
    printf("  -V VERSION   set program version for the output\n");
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8445(%rip), %rsi      # 0xb150
leaq 0x454d(%rip), %rdi      # 0x725f
movb $0x0, %al
callq 0x1080
callq 0x2cd0
leaq 0x44c9(%rip), %rdi      # 0x71ee
movb $0x0, %al
callq 0x1080
leaq 0x454a(%rip), %rdi      # 0x727d
movb $0x0, %al
callq 0x1080
leaq 0x457c(%rip), %rdi      # 0x72bd
movb $0x0, %al
callq 0x1080
leaq 0x459a(%rip), %rdi      # 0x72e9
movb $0x0, %al
callq 0x1080
leaq 0x45cf(%rip), %rdi      # 0x732c
movb $0x0, %al
callq 0x1080
leaq 0x460a(%rip), %rdi      # 0x7375
movb $0x0, %al
callq 0x1080
leaq 0x462c(%rip), %rdi      # 0x73a5
movb $0x0, %al
callq 0x1080
leaq 0x464f(%rip), %rdi      # 0x73d6
movb $0x0, %al
callq 0x1080
leaq 0x467f(%rip), %rdi      # 0x7414
movb $0x0, %al
callq 0x1080
leaq 0x46a5(%rip), %rdi      # 0x7448
movb $0x0, %al
callq 0x1080
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: newASTAttribute
ASTAttribute *
newASTAttribute()
    {    
    ASTAttribute *a = (ASTAttribute *) New(sizeof(ASTAttribute));

    a->name = 0;
    a->value = 0;

    return a;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x6630
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: newASTStave
ASTStave *
newASTStave()
    {    
    ASTStave *s = (ASTStave *) New(sizeof(ASTStave));

    s->courses = 0;
    s->courseCount = 0;
    s->timingCourse = 0;

    return s;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x6630
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/tabparser.c
// Function: newASTCourse
ASTCourse *
newASTCourse()
    {    
    ASTCourse *c = (ASTCourse *) New(sizeof(ASTCourse));

    c->measures = 0;
    c->measureCount = 0;

    return c;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x18, %edi
callq 0x6630
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)