LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/sa.c
// Function: main_sa
int main_sa(int argc, char *argv[])
{
	int c, n_threads = 1, ssa_shift = 6;
	fmsa_t *sa;
	rld_t *e;
	char *fn = 0;

	while ((c = getopt(argc, argv, "t:s:o:")) >= 0) {
		if (c == 't') n_threads = atoi(optarg);
		else if (c == 's') ssa_shift = atoi(optarg);
		else if (c == 'o') fn = optarg;
	}
	if (argc == optind) {
		fprintf(stderr, "Usage: fermi2 sa [-t nThreads=%d] [-s stepShift=%d] <in.fmd>\n", n_threads, ssa_shift);
		return 1;
	}
	e = rld_restore(argv[optind]);
	if (e == 0) {
		fprintf(stderr, "[E::%s] failed to load the FM-index\n", __func__);
		return 1;
	}
	sa = fm_sa_gen(e, ssa_shift, n_threads);
	//{int64_t i;for (i = 0; i < sa->n_ssa; ++i) fprintf(stderr, "S(%lld)=%lld\n", (i<<sa->ss) + e->mcnt[1], sa->ssa[i]>>sa->ms);}

	fm_sa_dump(sa, fn);
	rld_destroy(e);
	fm_sa_destroy(sa);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %r12d
leaq 0x56c6(%rip), %rdx      # 0x1dc09
callq 0x22f0
testl %eax, %eax
js 0x185ae
movl $0x6, %ebx
movl $0x1, %ebp
movq $0x0, (%rsp)
movq 0xba73(%rip), %r15      # 0x23fd8
leaq 0x569d(%rip), %r13      # 0x1dc09
cmpl $0x6f, %eax
je 0x18593
cmpl $0x73, %eax
je 0x18587
cmpl $0x74, %eax
jne 0x1859a
movq (%r15), %rdi
callq 0x2300
movl %eax, %ebp
jmp 0x1859a
movq (%r15), %rdi
callq 0x2300
movl %eax, %ebx
jmp 0x1859a
movq (%r15), %rax
movq %rax, (%rsp)
movl %r12d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x22f0
testl %eax, %eax
jns 0x1856c
jmp 0x185c0
movl $0x1, %ebp
movl $0x6, %ebx
movq $0x0, (%rsp)
movq 0xba09(%rip), %rax      # 0x23fd0
movslq (%rax), %rax
cmpl %r12d, %eax
je 0x1861c
movq (%r14,%rax,8), %rdi
callq 0x436c
testq %rax, %rax
je 0x1863a
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x18054
movq %rax, %rbx
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x182ae
movq %r14, %rdi
callq 0x38cc
movq %rbx, %rdi
callq 0x18199
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb9d5(%rip), %rax      # 0x23ff8
movq (%rax), %rdi
leaq 0x55e3(%rip), %rsi      # 0x1dc10
movl %ebp, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x21c0
jmp 0x1863f
callq 0x3156
movl $0x1, %eax
jmp 0x1860d
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/sa.c
// Function: sa_gen1
static void sa_gen1(const rld_t *e, fmsa_t *sa, int64_t k, uint64_v *buf)
{
	int c, mask = (1<<sa->ss) - 1;
	uint64_t ok[e->asize1], k0 = k, l = 0;
	size_t i;
	buf->n = 0;
	do {
		++l;
		c = rld_rank1a(e, k + 1, ok);
		k = e->cnt[c] + ok[c] - 1;
		if (c) {
			if (((k - e->mcnt[1]) & mask) == 0) {
				int64_t x = (k - e->mcnt[1]) >> sa->ss;
				sa->ssa[x] = l;
				kv_push(uint64_t, *buf, x);
			}
		} else sa->r2i[k] = k0;
	} while (c);
	for (i = 0; i < buf->n; ++i)
		sa->ssa[buf->a[i]] = (l - 1 - sa->ssa[buf->a[i]]) << sa->ms | k0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r8
movq %rdx, %r12
movq %rsi, -0x30(%rbp)
movb 0x4(%rsi), %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
notl %eax
movq %rax, -0x50(%rbp)
movzbl 0x1(%rdi), %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x58(%rbp)
movq %rcx, %rsp
movq %r8, -0x38(%rbp)
movq $0x0, (%r8)
leaq 0x1(%rdx), %rsi
movq $-0x1, %rbx
movq %rdx, -0x48(%rbp)
movq %rdi, %r14
movq -0x58(%rbp), %r13
movq %r13, %rdx
callq 0x4a3f
movq %r14, %rdi
movl %eax, %r15d
movq 0x20(%r14), %rax
movslq %r15d, %rdx
movq (%rax,%rdx,8), %rax
movq (%r13,%rdx,8), %rcx
leaq (%rcx,%rax), %rsi
testl %edx, %edx
je 0x18763
leaq (%rcx,%rax), %r13
decq %r13
movq 0x28(%rdi), %rax
subq 0x8(%rax), %r13
testl %r13d, -0x50(%rbp)
jne 0x18770
leaq 0x2(%rbx), %rax
movq -0x30(%rbp), %rdx
movb 0x4(%rdx), %cl
shrq %cl, %r13
movq 0x20(%rdx), %rcx
movq %rax, (%rcx,%r13,8)
movq -0x38(%rbp), %r12
movq 0x8(%r12), %rax
cmpq %rax, (%r12)
jne 0x18748
movq %rsi, -0x40(%rbp)
leaq (%rax,%rax), %rsi
testq %rax, %rax
movl $0x2, %eax
cmoveq %rax, %rsi
movq %rsi, 0x8(%r12)
movq 0x10(%r12), %rdi
shlq $0x3, %rsi
callq 0x2260
movq -0x40(%rbp), %rsi
movq %r14, %rdi
movq %rax, 0x10(%r12)
movq (%r12), %rax
movq 0x10(%r12), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r12)
movq %r13, (%rcx,%rax,8)
movq -0x48(%rbp), %r12
jmp 0x18770
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %r12, -0x8(%rax,%rsi,8)
incq %rbx
testl %r15d, %r15d
jne 0x186a6
movq -0x38(%rbp), %r9
cmpq $0x0, (%r9)
je 0x187b3
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rax
movq 0x10(%r9), %rdx
movl (%rcx), %ecx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq %rbx, %r8
subq (%rax,%rdi,8), %r8
shlq %cl, %r8
orq %r12, %r8
movq %r8, (%rax,%rdi,8)
incq %rsi
cmpq (%r9), %rsi
jb 0x18796
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/match.c
// Function: fmd_smem
int fmd_smem(const rld_t *e, const uint8_t *q, fmdsmem_v *mem, int min_occ, rldintv_v *curr, rldintv_v *prev)
{
	int x = 0, len;
	mem->n = 0;
	len = strlen((char*)q);
	do {
		x = fmd_smem1_core(e, min_occ, len, q, x, mem, curr, prev);
	} while (x < len);
	return mem->n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $0x0, (%rdx)
movq %rsi, %rdi
callq 0x20e0
movq %rax, %rbx
xorl %eax, %eax
movq %r13, %rdi
movl %ebp, %esi
movl %ebx, %edx
movq %r12, %rcx
movl %eax, %r8d
movq %r15, %r9
pushq (%rsp)
pushq %r14
callq 0x188f5
addq $0x10, %rsp
cmpl %ebx, %eax
jl 0x18e81
movl (%r15), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/match.c
// Function: fm_exact
void fm_exact(const rld_t *e, const char *s, int64_t *_l, int64_t *_u)
{
	extern unsigned char seq_nt6_table[128];
	int64_t i, l = 0, u = e->mcnt[0];
	for (i = strlen(s) - 1; i >= 0; --i) {
		int c = (uint8_t)s[i];
		c = c < 6? c : c < 128? seq_nt6_table[c] : 5;
		l = e->cnt[c] + rld_rank11(e, l, c);
		u = e->cnt[c] + rld_rank11(e, u, c);
		if (l >= u) break;
	}
	*_l = l, *_u = u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rdi, 0x10(%rsp)
movq 0x28(%rdi), %rax
movq (%rax), %r15
movq %rsi, 0x18(%rsp)
movq %rsi, %rdi
callq 0x20e0
movq %rax, %rbx
decq %rbx
xorl %ebp, %ebp
movq 0x10(%rsp), %r13
testq %rbx, %rbx
js 0x18f6b
movq 0x18(%rsp), %rax
movzbl (%rax,%rbx), %eax
cmpq $0x6, %rax
jb 0x18f18
testb %al, %al
js 0x18f16
leaq 0xb2cf(%rip), %rcx      # 0x241e0
movb (%rcx,%rax), %al
jmp 0x18f18
movb $0x5, %al
movzbl %al, %r14d
movq 0x20(%r13), %rax
leal (,%r14,8), %r12d
movq (%rax,%r12), %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movl %r14d, %edx
callq 0x49fe
movq %rax, %rbp
addq 0x20(%rsp), %rbp
movq 0x20(%r13), %rax
movq (%rax,%r12), %r12
movq %r13, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x49fe
movq %rax, %r15
addq %r12, %r15
decq %rbx
cmpq %r15, %rbp
jl 0x18ef2
movq (%rsp), %rax
movq %rbp, (%rax)
movq 0x8(%rsp), %rax
movq %r15, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/profk.c
// Function: fm_extend_to
int fm_extend_to(const rld_t *e, const char *s, int x, int min_ext, int sat_occ, int *occ)
{
	extern unsigned char seq_nt6_table[128];
	int i, k;
	uint64_t l = 0, u = e->mcnt[0];
	*occ = 0;
	if (x + 1 - min_ext < 0) return 0;
	for (i = x, k = 0; i >= 0; --i) {
		int c = (uint8_t)s[i];
		uint64_t l0 = l, u0 = u;
		c = c < 6? c : c < 128? seq_nt6_table[c] : 5;
		l = e->cnt[c] + rld_rank11(e, l, c);
		u = e->cnt[c] + rld_rank11(e, u, c);
		if (l >= u) break; // can't be extended
		++k;
		if (sat_occ > 0) {
			if (k > min_ext && u - l < sat_occ) {
				--k, l = l0, u = u0;
				break;
			}
		} else if (k == min_ext) {
			break;
		}
	}
	if (l < u) *occ = u - l;
	return k;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0xc(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rdi), %rax
movq (%rax), %rax
movl $0x0, (%r9)
leal 0x1(%rdx), %esi
xorl %edi, %edi
movl %ecx, 0x8(%rsp)
cmpl %ecx, %esi
jl 0x1a5bb
movq %r9, 0x18(%rsp)
testl %edx, %edx
js 0x1a5a7
movl 0xc(%rsp), %ecx
movq %rcx, 0x20(%rsp)
movl %edx, %edx
xorl %esi, %esi
movq %rax, %r8
xorl %r12d, %r12d
movq 0x30(%rsp), %rax
movzbl (%rax,%rdx), %eax
cmpq $0x6, %rax
movq %rdx, 0x10(%rsp)
movq %r8, 0x40(%rsp)
jb 0x1a4eb
testb %al, %al
js 0x1a4e9
leaq 0x9cfc(%rip), %rcx      # 0x241e0
movb (%rcx,%rax), %al
jmp 0x1a4eb
movb $0x5, %al
movzbl %al, %r14d
movq 0x28(%rsp), %r15
movq 0x20(%r15), %rax
leal (,%r14,8), %ebx
movq (%rax,%rbx), %rbp
movq %r15, %rdi
movq %rsi, 0x38(%rsp)
movl %r14d, %edx
callq 0x49fe
movq %rax, %r13
addq %rbp, %r13
movq 0x20(%r15), %rax
movq (%rax,%rbx), %rbx
movq %r15, %rdi
movq 0x40(%rsp), %r15
movq %r15, %rsi
movl %r14d, %edx
callq 0x49fe
addq %rbx, %rax
movq %rax, %rdx
subq %r13, %rdx
jbe 0x1a56e
leal 0x1(%r12), %edi
cmpl $0x0, 0xc(%rsp)
jle 0x1a57a
cmpl 0x8(%rsp), %r12d
movq 0x10(%rsp), %rcx
jl 0x1a589
cmpq 0x20(%rsp), %rdx
jae 0x1a589
xorl %edx, %edx
movl %r12d, %edi
movq 0x38(%rsp), %r13
movq %r15, %rax
jmp 0x1a58b
xorl %edx, %edx
movl %r12d, %edi
movq 0x10(%rsp), %rcx
jmp 0x1a58b
cmpl 0x8(%rsp), %edi
movq 0x10(%rsp), %rcx
jne 0x1a589
xorl %edx, %edx
jmp 0x1a58b
movb $0x1, %dl
testb %dl, %dl
je 0x1a5ac
leaq -0x1(%rcx), %rdx
movq %rax, %r8
movq %r13, %rsi
movl %edi, %r12d
testq %rcx, %rcx
jg 0x1a4c0
jmp 0x1a5ac
xorl %edi, %edi
xorl %r13d, %r13d
cmpq %r13, %rax
jbe 0x1a5bb
subl %r13d, %eax
movq 0x18(%rsp), %rdx
movl %eax, (%rdx)
movl %edi, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/lh3[P]fermi2/profk.c
// Function: fm_kprof
fm_icnt_t *fm_kprof(const rld_t *e, const char *s, int min_ext, int sat_occ, int *n_)
{
	int i, x, len, k = 0;
	fm_icnt_t *a;
	len = strlen(s);
	MALLOC(a, len);
	for (x = len - 1; x >= min_ext - 1;) {
		int y, occ;
		y = fm_extend_to(e, s, x, min_ext, sat_occ, &occ);
		a[k].st = x + 1 - (y >= min_ext? y : min_ext);
		a[k].en = x + 1;
		a[k++].occ = occ;
		x -= (y >= min_ext? y - min_ext : 0) + 1;
	}
	*n_ = k;
	for (i = 0; i < k>>1; ++i) {
		fm_icnt_t t = a[i];
		a[i] = a[k - i - 1]; a[k - i - 1] = t;
	}
	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl %edx, %r15d
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rsi, %rdi
callq 0x20e0
movq %rax, %r14
movslq %r14d, %r12
leaq (,%r12,4), %rax
leaq (%rax,%rax,2), %rdi
callq 0x2220
movq %rax, %rbx
xorl %ebp, %ebp
cmpl %r15d, %r12d
jl 0x1a686
leal -0x1(%r15), %r13d
decl %r14d
leaq 0x8(%rbx), %r12
xorl %ebp, %ebp
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl %r14d, %edx
movl %r15d, %ecx
movl 0xc(%rsp), %r8d
movq %rsp, %r9
callq 0x1a464
movl %eax, %ecx
notl %ecx
addl %r15d, %ecx
cmpl %r15d, %eax
cmovlel %r15d, %eax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmovll %edx, %ecx
leal 0x1(%r14), %edx
negl %eax
addl %r14d, %eax
incl %eax
movl %eax, -0x8(%r12)
movl %edx, -0x4(%r12)
movl (%rsp), %eax
movl %eax, (%r12)
addl %r14d, %ecx
addq $0xc, %r12
incl %ebp
movl %ecx, %r14d
cmpl %r13d, %ecx
jge 0x1a626
movq 0x10(%rsp), %rax
movl %ebp, (%rax)
cmpl $0x2, %ebp
jb 0x1a6f1
movslq %ebp, %rax
shrl %ebp
leaq (%rax,%rax,2), %rax
leaq -0xc(,%rax,4), %rax
shlq $0x2, %rbp
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
xorl %edx, %edx
movl 0x8(%rbx,%rdx), %esi
movl %esi, 0x8(%rsp)
movq (%rbx,%rdx), %rsi
movq %rsi, (%rsp)
movl 0x8(%rbx,%rax), %esi
movl %esi, 0x8(%rbx,%rdx)
movq (%rbx,%rax), %rsi
movq %rsi, (%rbx,%rdx)
movl 0x8(%rsp), %esi
movl %esi, 0x8(%rbx,%rax)
movq (%rsp), %rsi
movq %rsi, (%rbx,%rax)
addq $0xc, %rdx
addq $-0xc, %rax
cmpq %rdx, %rcx
jne 0x1a6b4
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/algodesigner[P]z80/console.c
// Function: console_init
void _console_init(void) {
    tcgetattr(0, &_old_term);
    
    _new_term = _old_term;
    
    _new_term.c_lflag &= ~ICANON; /* Input available immediately (no EOL needed) */
    _new_term.c_lflag &= ~ECHO; /* Do not echo input characters */
    _new_term.c_lflag &= ~ISIG; /* ^C and ^Z do not generate signals */
    _new_term.c_iflag &= INLCR; /* Translate NL to CR on input */
    
    tcsetattr(0, TCSANOW, &_new_term); /* Apply changes immediately */
    
    setvbuf(stdout, (char *)NULL, _IONBF, 0); /* Disable stdout buffering */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xeeb1(%rip), %rsi      # 0x18078
xorl %edi, %edi
callq 0x9090
movups 0xeea3(%rip), %xmm0     # 0x18078
movups %xmm0, 0xeed8(%rip)     # 0x180b4
movups 0xeea5(%rip), %xmm0     # 0x18088
movups %xmm0, 0xeeda(%rip)     # 0x180c4
movups 0xeea7(%rip), %xmm0     # 0x18098
movups %xmm0, 0xeedc(%rip)     # 0x180d4
movups 0xeea5(%rip), %xmm0     # 0x180a4
movups %xmm0, 0xeeda(%rip)     # 0x180e0
andb $-0xc, 0xeeb3(%rip)     # 0x180c0
leaq 0xeea0(%rip), %rdx      # 0x180b4
andl $0x40, 0xee99(%rip)     # 0x180b4
xorl %edi, %edi
xorl %esi, %esi
callq 0x90a0
movq 0xedb5(%rip), %rax      # 0x17fe0
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
popq %rbp
jmp 0x9080
// File: /workspace/github_c_makefile_star2_O1/algodesigner[P]z80/z80.c
// Function: z80_new
z80 *z80_new() {
    _console_init();
    z80 *cpu = calloc(1, sizeof(z80));
    z80_reset(cpu);
    return cpu;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x91bc
movl $0x1, %edi
movl $0x10060, %esi          # imm = 0x10060
callq 0x9060
movl $0x0, 0x1c(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x34(%rax)
movq $-0x1, 0x44(%rax)
movl $0xffffffff, 0x4c(%rax) # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/algodesigner[P]z80/z80.c
// Function: watchprint
void watchprint(z80 *cpu, uint16_t pos) {
    uint8_t I, J;
    _puts("\r\n");
    _puts("  Watch : "); _puthex16(cpu->watch);
    _puts(" = "); _puthex8(_RamRead(cpu->watch)); _putcon(':'); _puthex8(_RamRead(cpu->watch + 1));
    _puts(" / ");
    for (J = 0, I = _RamRead(cpu->watch); J < 8; ++J, I <<= 1) _putcon(I & 0x80 ? '1' : '0');
    _putcon(':');
    for (J = 0, I = _RamRead(cpu->watch + 1); J < 8; ++J, I <<= 1) _putcon(I & 0x80 ? '1' : '0');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x84a0(%rip), %rdi      # 0x11840
callq 0x927a
leaq 0x8364(%rip), %rdi      # 0x11710
callq 0x927a
movzwl 0x4c(%rbx), %edi
callq 0x92f4
leaq 0x835a(%rip), %rdi      # 0x1171b
callq 0x927a
movslq 0x4c(%rbx), %rax
movzbl 0x60(%rbx,%rax), %edi
callq 0x92aa
movl $0x3a, %edi
callq 0x9267
movslq 0x4c(%rbx), %rax
movzbl 0x61(%rax,%rbx), %edi
callq 0x92aa
leaq 0x832c(%rip), %rdi      # 0x1171f
callq 0x927a
movslq 0x4c(%rbx), %rax
movb 0x60(%rbx,%rax), %r14b
movb $0x8, %r15b
xorl %edi, %edi
testb %r14b, %r14b
setns %dil
xorl $0x31, %edi
callq 0x9267
addb %r14b, %r14b
decb %r15b
jne 0x9404
movl $0x3a, %edi
callq 0x9267
movslq 0x4c(%rbx), %rax
movb 0x61(%rbx,%rax), %bl
movb $0x8, %r14b
xorl %edi, %edi
testb %bl, %bl
setns %dil
xorl $0x31, %edi
callq 0x9267
addb %bl, %bl
decb %r14b
jne 0x9432
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/algodesigner[P]z80/z80.c
// Function: memdump
void memdump(z80 *cpu, uint16_t pos) {
    uint16_t h = pos;
    uint16_t c = pos;
    uint8_t l, i;
    uint8_t ch = pos & 0xff;

    _puts("       ");
    for (i = 0; i < 16; ++i) {
        _puthex8(ch++ & 0x0f);
        _puts(" ");
    }
    _puts("\r\n");
    _puts("       ");
    for (i = 0; i < 16; ++i)
        _puts("---");
    _puts("\r\n");
    for (l = 0; l < 16; ++l) {
        _puthex16(h);
        _puts(" : ");
        for (i = 0; i < 16; ++i) {
            _puthex8(_RamRead(h++));
            _puts(" ");
        }
        for (i = 0; i < 16; ++i) {
            ch = _RamRead(c++);
            _putcon(ch > 31 && ch < 127 ? ch : '.');
        }
        _puts("\r\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x82b5(%rip), %rdi      # 0x11723
callq 0x927a
xorl %r12d, %r12d
leaq 0x82ac(%rip), %r15      # 0x11729
leal (%rbx,%r12), %eax
andb $0xf, %al
movzbl %al, %edi
callq 0x92aa
movq %r15, %rdi
callq 0x927a
incb %r12b
cmpb $0x10, %r12b
jne 0x947d
leaq 0x839d(%rip), %rdi      # 0x11840
callq 0x927a
leaq 0x8274(%rip), %rdi      # 0x11723
callq 0x927a
movb $0x10, %r12b
leaq 0x826d(%rip), %r15      # 0x1172b
movq %r15, %rdi
callq 0x927a
decb %r12b
jne 0x94be
leaq 0x836e(%rip), %rdi      # 0x11840
callq 0x927a
xorl %eax, %eax
leaq 0x8249(%rip), %r13      # 0x11729
movl %ebx, %r12d
movl %eax, -0x30(%rbp)
movl %r12d, -0x2c(%rbp)
movzwl %r12w, %r15d
movl %r15d, %edi
callq 0x92f4
leaq 0x8281(%rip), %rdi      # 0x1177e
callq 0x927a
xorl %r12d, %r12d
leal (%r15,%r12), %eax
movzwl %ax, %eax
movzbl 0x60(%r14,%rax), %edi
callq 0x92aa
movq %r13, %rdi
callq 0x927a
incl %r12d
cmpb $0x10, %r12b
jne 0x9505
movl -0x2c(%rbp), %eax
addl %r12d, %eax
movl %eax, %r12d
xorl %r15d, %r15d
leal (%rbx,%r15), %eax
movzwl %ax, %eax
movzbl 0x60(%r14,%rax), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
jb 0x954e
movl $0x2e, %eax
movzbl %al, %edi
callq 0x9267
incl %r15d
cmpb $0x10, %r15b
jne 0x9534
leaq 0x82da(%rip), %rdi      # 0x11840
callq 0x927a
movl -0x30(%rbp), %eax
incb %al
addl %r15d, %ebx
cmpb $0x10, %al
jne 0x94e3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/algodesigner[P]z80/main.c
// Function: main
int main(int argc, char *argv[])
{
    /*
     * Instantiate the CPU, activate the debug mode, set the intercept
     * function and run the virtual CPU until the termination criteria
     * set by the intercept function, if any, are met.
     */
    z80 *cpu = z80_new();
    cpu->debug = 1;
    z80_set_intercept(cpu, cpu, intercept);
    z80_run(cpu);
    z80_destroy(cpu);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %eax, %eax
callq 0x9324
movq %rax, %rbx
movl $0x1, 0x40(%rax)
leaq 0x24(%rip), %rdx        # 0xdb52
movq %rax, %rdi
movq %rax, %rsi
callq 0x937e
movq %rbx, %rdi
callq 0x9c34
movq %rbx, %rdi
callq 0xdb01
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pyk[P]simple-nn/deps/pcg/sample/pcg32x2-demo.c
// Function: pcg32x2_srandom_r
void pcg32x2_srandom_r(pcg32x2_random_t* rng, uint64_t seed1, uint64_t seed2,
                       uint64_t seq1,  uint64_t seq2)
{
    uint64_t mask = ~0ull >> 1;
    // The stream for each of the two generators *must* be distinct
    if ((seq1 & mask) == (seq2 & mask)) 
        seq2 = ~seq2;
    pcg32_srandom_r(rng->gen,   seed1, seq1);
    pcg32_srandom_r(rng->gen+1, seed2, seq2);
}

// Assembly:
movq %r8, %rax
xorq %rcx, %rax
btrq $0x3f, %rax
xorl %r9d, %r9d
cmpq $0x1, %rax
sbbq %r9, %r9
xorq %r8, %r9
leaq 0x1(,%rcx,2), %rax
movq %rax, 0x8(%rdi)
leaq (%rsi,%rcx,2), %rax
incq %rax
movabsq $0x5851f42d4c957f2d, %rsi # imm = 0x5851F42D4C957F2D
imulq %rsi, %rax
leaq (%rax,%rcx,2), %rax
incq %rax
movq %rax, (%rdi)
leaq 0x1(,%r9,2), %rax
movq %rax, 0x18(%rdi)
leaq (%rdx,%r9,2), %rax
incq %rax
imulq %rsi, %rax
leaq (%rax,%r9,2), %rax
incq %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/pyk[P]simple-nn/deps/pcg/sample/pcg32x2-demo.c
// Function: pcg32x2_boundedrand_r
uint64_t pcg32x2_boundedrand_r(pcg32x2_random_t* rng, uint64_t bound)
{
    uint64_t threshold = -bound % bound;
    for (;;) {
        uint64_t r = pcg32x2_random_r(rng);
        if (r >= threshold)
            return r % bound;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
negq %rax
xorl %edx, %edx
divq %rsi
movq %rdx, %r15
movq %r14, %rdi
callq 0x1212
movq %rax, %rcx
cmpq %r15, %rax
jb 0x12f0
movq %rcx, %rax
xorl %edx, %edx
divq %rbx
movq %rdx, %r12
cmpq %r15, %rcx
jb 0x12d5
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/darray.c
// Function: darray_add_uniq
int 
darray_add_uniq(darray_t* da, uintptr_t elem)
{
  if (darray_exists(da, elem))
    {
      return 0;
    }
  darray_add(da, elem);
  return 1;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
setne %cl
je 0x27f4
movq 0x10(%rdi), %rcx
cmpq %rsi, (%rcx)
je 0x27f8
pushq $0x1
popq %r8
movq %r8, %rdx
cmpq %r8, %rax
je 0x27ee
leaq 0x1(%rdx), %r8
cmpq %rsi, (%rcx,%rdx,8)
jne 0x27dc
cmpq %rdx, %rax
seta %cl
testb %cl, %cl
je 0x27fc
xorl %eax, %eax
jmp 0x2804
callq 0x67b9
pushq $0x1
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/darray.c
// Function: darray_exists
inline int			
darray_exists(darray_t* da, uintptr_t elem)
{
  for (int i = 0; i < da->n_elems; i++)
    {
      if (unlikely(elem == da->array[i]))
	{
	  return 1;
	}
    }
  return 0;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
setne %dl
je 0x2835
movq 0x10(%rdi), %rcx
cmpq %rsi, (%rcx)
je 0x2835
pushq $0x1
popq %rdi
movq %rdi, %rdx
cmpq %rdi, %rax
je 0x282f
leaq 0x1(%rdx), %rdi
cmpq %rsi, (%rcx,%rdx,8)
jne 0x281d
cmpq %rdx, %rax
seta %dl
movzbl %dl, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/darray.c
// Function: darray_pop
int
darray_pop(darray_t* da, uintptr_t* elem)
{
  if (unlikely(da->n_elems == 0))
    {
      return 0;
    }

  *elem = da->array[0];
  da->n_elems--;
  for (int i = 0; i < da->n_elems; i++)
    {
      da->array[i] = da->array[i + 1];
    }
  return 1;
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x2869
movq 0x10(%rdi), %rcx
movq (%rcx), %rax
movq %rax, (%rsi)
decq (%rdi)
pushq $0x1
popq %rax
je 0x2868
xorl %edx, %edx
movq 0x8(%rcx,%rdx,8), %rsi
movq %rsi, (%rcx,%rdx,8)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq %rsi, (%rdi)
ja 0x2853
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_control.c
// Function: mctop_id_get_hwc_gs
hwc_gs_t*
mctop_id_get_hwc_gs(mctop_t* topo, const uint id)
{
  uint lvl = mctop_id_get_lvl(id);
  if (lvl > topo->n_levels)
    {
      return NULL;
    }
  hwc_gs_t* gs = NULL;
  if (lvl == 0)
    {
      gs = (hwc_gs_t*) &topo->hwcs[id];
    }
  else if (lvl == topo->socket_level)
    {
      gs = (hwc_gs_t*) &topo->sockets[mctop_id_no_lvl(id)];
    }
  else
    {
      hwc_gs_t* _gs = mctop_get_first_gs_at_lvl(topo, lvl);
      while (_gs != NULL)
	{
	  if (unlikely(_gs->id == id))
	    {
	      gs = _gs;
	      break;
	    }
	  _gs = _gs->next;
	}
    }

  return gs;
}

// Assembly:
movl $0x2710, %ecx           # imm = 0x2710
movl %esi, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
xorl %eax, %eax
cmpl (%rdi), %ecx
jbe 0x28a3
retq
cmpl $0x270f, %esi           # imm = 0x270F
ja 0x28b6
movl %esi, %eax
imulq $0x30, %rax, %rax
addq 0x40(%rdi), %rax
retq
movq 0x20(%rdi), %rax
cmpl 0x14(%rdi), %ecx
jne 0x28cc
movl %edx, %ecx
imulq $0xa8, %rcx, %rcx
addq %rcx, %rax
retq
testq %rax, %rax
je 0x28e7
cmpl %ecx, 0x4(%rax)
je 0x28e7
movq 0x40(%rax), %rax
movq (%rax), %rax
jmp 0x28cc
cmpl %esi, (%rax)
je 0x28a2
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x28df
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_control.c
// Function: mctop_ids_get_latency
uint
mctop_ids_get_latency(mctop_t* topo, const uint id0, const uint id1)
{
  hwc_gs_t* gs0 = mctop_id_get_hwc_gs(topo, id0);
  hwc_gs_t* gs1 = mctop_id_get_hwc_gs(topo, id1);
  if (gs0 == NULL || gs1 == NULL)
    {
      return 0;
    }

  while (gs0->level < gs1->level)
    {
      gs0 = gs0->parent;
    }
  while (gs1->level < gs0->level)
    {
      gs1 = gs1->parent;
    }

  if (unlikely(gs0->id == gs1->id))
    {
      if (gs0->level == 0)
	{
	  return 0;
	}
      else
	{
	  return gs0->latency;
	}
    }

  while (gs0->type != SOCKET && gs1->type != SOCKET)
    {
      gs0 = gs0->parent;
      gs1 = gs1->parent;
      if (gs0->id == gs1->id)
	{
	  return gs0->latency;
	}
    }


  sibling_t* sibling = mctop_get_sibling_with_sockets(topo, gs0, gs1);
  return sibling->latency;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
callq 0x288f
movq %rax, %rbx
movq %r14, %rdi
movl %ebp, %esi
callq 0x288f
testq %rbx, %rbx
sete %dl
testq %rax, %rax
sete %sil
xorl %ecx, %ecx
orb %dl, %sil
jne 0x296d
movl 0x4(%rax), %esi
movl 0x4(%rbx), %edx
cmpl %esi, %edx
jae 0x2932
movq 0x18(%rbx), %rbx
jmp 0x2921
movq 0x18(%rax), %rax
cmpl %edx, 0x4(%rax)
jb 0x292e
movl (%rbx), %esi
cmpl (%rax), %esi
je 0x2974
cmpl $0x3, 0x8(%rbx)
je 0x295c
cmpl $0x3, 0x8(%rax)
je 0x295c
movq 0x18(%rbx), %rbx
movq 0x18(%rax), %rax
movl (%rbx), %ecx
cmpl (%rax), %ecx
jne 0x293d
movl 0xc(%rbx), %ecx
jmp 0x296d
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8c90
movl 0x8(%rax), %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
testl %edx, %edx
jne 0x2957
jmp 0x296d
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_control.c
// Function: mctop_set_cpu
int
mctop_set_cpu(mctop_t* topo, int cpu) 
{
  int ret = 1;
#if defined(__sparc__)
  if (processor_bind(P_LWPID, P_MYID, cpu, NULL) == -1)
    {
      /* printf("Problem with setting processor affinity: %s\n", */
      /* 	     strerror(errno)); */
      ret = 0;
    }
#elif defined(__tile__)
  if (tmc_cpus_set_my_cpu(tmc_cpus_find_nth_cpu(&cpus, cpu)) < 0)
    {
      tmc_task_die("Failure in 'tmc_cpus_set_my_cpu()'.");
    }

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

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

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

  return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %esi            # imm = 0x3FF
ja 0x29cd
pushq $0x1
popq %rax
movl %ebx, %ecx
shlq %cl, %rax
movl %ebx, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movq %rsp, %rdx
movl $0x80, %esi
xorl %edi, %edi
callq 0x2130
movl %eax, %ebp
testq %r14, %r14
je 0x29ed
movq %r14, %rdi
movl %ebx, %esi
callq 0x8dfa
xorl %eax, %eax
testl %ebp, %ebp
sete %al
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop.c
// Function: is_smt
void*
is_smt(void* param)
{
  tld_t* tld = (tld_t*) param;
  const int tid = tld->id;
  const int hwc = tld->hw_context;
  barrier2_t* barrier2 = tld->barrier2;
  pthread_barrier_t* barrier = tld->barrier;

  mctop_set_cpu(NULL, hwc);
  spin_time(test_num_smt_reps >> 8);
  barrier2_cross_explicit(barrier2, tid, 0);

  const int n_smt = 5;
  int is_smt_n = 0;
  for (int i = 0; i < 5; i++)
    {
      barrier2_cross_explicit(barrier2, tid, 2);
      ticks times[2];
      if (tid == 0)
	{
	  times[0] = spin_time(test_num_smt_reps);
	  pthread_barrier_wait(barrier);
	}
      else
	{
	  pthread_barrier_wait(barrier);
	}

      pthread_barrier_wait(barrier);
      barrier2_cross_explicit(barrier2, tid, 1);
      times[1] = spin_time(test_num_smt_reps);
      if (tid == 0)
	{
	  is_smt_n += (times[0] < (times[1] * test_smt_ratio));
	}
    }

  if (tid == 0)
    {
      int* smt = malloc_assert(sizeof(smt));
      *smt = (is_smt_n > (n_smt - is_smt_n));
      return smt;
    }
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %ebx
movl 0x8(%rdi), %esi
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %r15
xorl %r13d, %r13d
xorl %edi, %edi
callq 0x297a
movl $0x9896, %edi           # imm = 0x9896
callq 0x5dcb
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x5ff2
movl $0x5, %ebp
movl $0x2, %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5ff2
testl %ebx, %ebx
jne 0x367d
movl $0x989680, %edi         # imm = 0x989680
callq 0x5dcb
movq %rax, %r12
movq %r15, %rdi
callq 0x2090
movq %r15, %rdi
callq 0x2090
movl $0x1, %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5ff2
movl $0x989680, %edi         # imm = 0x989680
callq 0x5dcb
testl %ebx, %ebx
jne 0x3700
movq %r12, %xmm0
movq 0x7999(%rip), %xmm2     # 0xb050
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x799d(%rip), %xmm3     # 0xb060
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %rax, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
mulsd 0x7934(%rip), %xmm2     # 0xb028
xorl %eax, %eax
ucomisd %xmm1, %xmm2
seta %al
addl %eax, %r13d
decl %ebp
jne 0x365d
testl %ebx, %ebx
je 0x3710
xorl %eax, %eax
jmp 0x3731
movl $0x8, %edi
callq 0x21d0
testq %rax, %rax
je 0x3740
movl $0x5, %ecx
subl %r13d, %ecx
xorl %edx, %edx
cmpl %ecx, %r13d
setg %dl
movl %edx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9c01(%rip), %rdi      # 0xd348
leaq 0x83b1(%rip), %rsi      # 0xbaff
leaq 0x83c3(%rip), %rcx      # 0xbb18
movl $0x59, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop.c
// Function: mem_bw_estimate
double
mem_bw_estimate(volatile cache_line_t* mem, const uint do_read, const size_t n, const size_t reps)
{
  volatile uint64_t* m0 = (volatile uint64_t*) mem;
  size_t sum = 0;
  volatile size_t suma = 0;

  const size_t n_warmup = n >> 2;
  for (size_t i = 0; i < n_warmup; i++)
    {
      sum = m0[i];
    }

  struct timespec start, stop;
  clock_gettime(CLOCK_REALTIME, &start);
  if (do_read == BW_READ)
    {
      for (uint r = 0; r < reps; r++)
	{
	  for (size_t i = 0; i < n; i++)
	    {
	      sum = m0[i];
	    }
	}
    }
  else if (do_read == BW_WRITE)
    {
      for (uint r = 0; r < reps; r++)
	{
	  for (size_t i = 0; i < n; i++)
	    {
	      m0[i] = 0xAAAAFFFF;
	    }
	}
    }
  clock_gettime(CLOCK_REALTIME, &stop);

  for (size_t i = 0; i < n_warmup; i++)
    {
      sum = m0[i];
    }


  struct timespec dur = timespec_diff(start, stop);
  double dur_s = dur.tv_sec + (dur.tv_nsec / 1e9);
  if (dur_s == 9)
    {
      printf("%p%zu%zu", m0, sum, suma);
    }

  double bw = (reps * n * sizeof(uint64_t)) / (1e9 * dur_s);
  return bw;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq $0x0, 0x10(%rsp)
movq %rdx, %r13
shrq $0x2, %r13
cmpq $0x4, %rdx
jae 0x3793
xorl %r12d, %r12d
jmp 0x37a1
xorl %eax, %eax
movq (%r15,%rax,8), %r12
incq %rax
cmpq %rax, %r13
jne 0x3795
leaq 0x28(%rsp), %rsi
xorl %edi, %edi
callq 0x20b0
testl %ebp, %ebp
je 0x37de
cmpl $0x1, %ebp
jne 0x37ff
testq %r14, %r14
je 0x37ff
xorl %eax, %eax
movl $0xaaaaffff, %ecx       # imm = 0xAAAAFFFF
testq %rbx, %rbx
je 0x37d5
xorl %edx, %edx
movq %rcx, (%r15,%rdx,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x37c9
incl %eax
cmpq %r14, %rax
jb 0x37c2
jmp 0x37ff
testq %r14, %r14
je 0x37ff
xorl %eax, %eax
testq %rbx, %rbx
je 0x37f8
xorl %ecx, %ecx
movq (%r15,%rcx,8), %r12
incq %rcx
cmpq %rcx, %rbx
jne 0x37ec
incl %eax
cmpq %r14, %rax
jb 0x37e5
leaq 0x18(%rsp), %rsi
xorl %edi, %edi
callq 0x20b0
cmpq $0x4, %rbx
jb 0x381f
xorl %eax, %eax
movq (%r15,%rax,8), %r12
incq %rax
cmpq %rax, %r13
jne 0x3813
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x5c17
cvtsi2sd %rax, %xmm0
cvtsi2sd %rdx, %xmm2
divsd 0x77e6(%rip), %xmm2     # 0xb030
addsd %xmm0, %xmm2
ucomisd 0x77e2(%rip), %xmm2     # 0xb038
jne 0x387f
jp 0x387f
movq 0x10(%rsp), %rcx
leaq 0x7a80(%rip), %rdi      # 0xb2e6
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
movsd %xmm2, 0x8(%rsp)
callq 0x2100
movsd 0x8(%rsp), %xmm2
imulq %r14, %rbx
shlq $0x3, %rbx
movq %rbx, %xmm1
punpckldq 0x77bc(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x77c4(%rip), %xmm1     # 0xb060
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x7780(%rip), %xmm2     # 0xb030
divsd %xmm2, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop.c
// Function: lat_table_normalized_create
ticks**
lat_table_normalized_create(ticks* lat_table, const size_t n, cdf_cluster_t* cc)
{
  ticks** lat_table_norm = malloc_assert(n * sizeof(ticks*));
  for (int i = 0; i < n ; i++)
    {
      lat_table_norm[i] = malloc_assert(n * sizeof(ticks));
    }

  for (size_t x = 0; x < n; x++)
    {
      for (size_t y = 0; y < n; y++)
	{
	  ticks lat = lat_table_2d_get(lat_table, n, x, y);
	  lat_table_norm[x][y] = cdf_cluster_value_to_cluster_median(cc, lat);
	}
    }

  return lat_table_norm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x30(%rsp)
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq (,%rsi,8), %r13
movq %r13, %rdi
callq 0x21d0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4f6f
testq %r14, %r14
je 0x4f5b
xorl %ebx, %ebx
movq 0x8(%rsp), %r15
movq %r13, %rdi
callq 0x21d0
testq %rax, %rax
je 0x4f6f
movq %rax, (%r15,%rbx,8)
incq %rbx
cmpq %rbx, %r14
jne 0x4eca
movq %r14, %rax
shlq $0x20, %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movabsq $0x100000000, %r12      # imm = 0x100000000
xorl %r15d, %r15d
movq %r14, 0x10(%rsp)
movq 0x8(%rsp), %rbp
movq %r13, 0x28(%rsp)
xorl %ebx, %ebx
movq 0x20(%rsp), %r14
movq %r13, %rax
sarq $0x1d, %rax
movq (%r14,%rax), %rsi
movq 0x30(%rsp), %rdi
callq 0x666e
movq (%rbp,%r15,8), %rcx
movq %rax, (%rcx,%rbx,8)
incq %rbx
addq %r12, %r13
cmpq %rbx, 0x10(%rsp)
jne 0x4f19
incq %r15
movq 0x28(%rsp), %r13
addq 0x18(%rsp), %r13
movq 0x10(%rsp), %r14
cmpq %r14, %r15
jne 0x4f0d
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x83d2(%rip), %rdi      # 0xd348
leaq 0x6b82(%rip), %rsi      # 0xbaff
leaq 0x6b94(%rip), %rcx      # 0xbb18
movl $0x59, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop.c
// Function: lat_table_get_hwc_with_lat
int
lat_table_get_hwc_with_lat(ticks** lat_table, const size_t n, ticks target_lat, int* hwcs)
{
  for (int x = 0; x < n; x++)
    {
      for (int y = 0; y < n; y++)
	{
	  if (lat_table[x][y] == target_lat)
	    {
	      hwcs[0] = x;
	      hwcs[1] = y;
	      return 1;
	    }
	}
    }
  return 0;
}

// Assembly:
testq %rsi, %rsi
setne %al
je 0x4fe0
pushq %rbx
leaq -0x1(%rsi), %r9
xorl %r8d, %r8d
movq (%rdi,%r8,8), %r10
cmpq %rdx, (%r10)
je 0x4fd5
xorl %r11d, %r11d
cmpq %r11, %r9
je 0x4fc8
leaq 0x1(%r11), %rbx
cmpq %rdx, 0x8(%r10,%r11,8)
movq %rbx, %r11
jne 0x4faa
movl %r8d, (%rcx)
movl %ebx, 0x4(%rcx)
cmpq %rsi, %rbx
jb 0x4fdf
incq %r8
cmpq %rsi, %r8
setb %al
jne 0x4f9e
jmp 0x4fdf
movl %r8d, (%rcx)
movl $0x0, 0x4(%rcx)
popq %rbx
movzbl %al, %eax
andl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop.c
// Function: print_cache_info
void 
print_cache_info(mctop_cache_info_t* mci, test_format_t test_format, const char* hostname)
{
  if (test_format == MCT_FILE)
    {
      printf("## Cache info ############################################################\n");
      char out_file[50];
      sprintf(out_file, "./desc/%s.mct", hostname);
      printf("## MCTOP output in: %s\n", out_file);

      int ofp_open = 1;
      FILE* ofp = fopen(out_file, "a");
      if (ofp == NULL) 
	{
	  ofp_open = 0;
	  fprintf(stderr, "MCTOP Error: Cannot open output file %s! Using stderr instead.\n", out_file);
	  ofp = stderr;
	}

      fprintf(ofp, "#Cache_levels %d\n", mci->n_levels);
      for (int i = 0; i < mci->n_levels; i++)
	{
	  fprintf(ofp, "Cache_level %d   Latency %-5zu  SizeOS %-5zu SizeEst %-5zu\n",
		  i, mci->latencies[i], mci->sizes_OS[i], mci->sizes_estimated[i]);
	}
      if (ofp_open)
	{
	  fclose(ofp);
	}
      printf("##########################################################################\n");
    }
}

// Assembly:
cmpl $0x3, %esi
jne 0x55f1
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x7165(%rip), %rdi      # 0xc695
callq 0x2080
leaq 0x6230(%rip), %rsi      # 0xb76c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22b0
leaq 0x6227(%rip), %rdi      # 0xb77a
movq %r15, %rsi
xorl %eax, %eax
callq 0x2100
leaq 0x62a1(%rip), %rsi      # 0xb805
movq %r15, %rdi
callq 0x2240
movq %rax, %r14
movq %rax, %r15
testq %rax, %rax
je 0x55f2
movl (%rbx), %edx
leaq 0x6287(%rip), %rsi      # 0xb807
movq %r15, %rdi
xorl %eax, %eax
callq 0x2170
cmpl $0x0, (%rbx)
je 0x55cb
leaq 0x6283(%rip), %r12      # 0xb819
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
movq (%rax,%r13,8), %rcx
movq (%rdx,%r13,8), %r8
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %r9
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2170
incq %r13
movl (%rbx), %eax
cmpq %rax, %r13
jb 0x5599
testq %r14, %r14
je 0x55d8
movq %r15, %rdi
callq 0x20e0
leaq 0x714c(%rip), %rdi      # 0xc72b
callq 0x2080
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xb9f7(%rip), %r15      # 0x10ff0
movq (%r15), %rdi
leaq 0x6192(%rip), %rsi      # 0xb795
movq %rsp, %rdx
xorl %eax, %eax
callq 0x2170
movq (%r15), %r15
jmp 0x5577
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_profiler.c
// Function: mctop_prof_create
mctop_prof_t*
mctop_prof_create(size_t num_entries)
{
  mctop_prof_t* prof = malloc_assert(sizeof(mctop_prof_t) + (num_entries * sizeof(ticks)));

  prof->size = num_entries;
  prof->correction = 0;
  prof->correction = mctop_prof_correction_calc(prof, num_entries);
  return prof;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x40(,%rdi,8), %rdi
callq 0x21d0
testq %rax, %rax
je 0x5995
movq %rax, %r14
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
movsd 0x6eca(%rip), %xmm0     # 0xc7b0
movl $0xf4240, %edi          # imm = 0xF4240
xorl %esi, %esi
callq 0x5e1d
movl $0x8, %r12d
leaq 0x10(%rsp), %r15
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq %rbx, %rax
jae 0x5942
rdtsc
movl %edx, %ecx
movl %eax, %esi
negl %ecx
shlq $0x20, %rcx
rdtsc
movl %eax, %eax
shlq $0x20, %rdx
addq %rax, %rdx
addq 0x8(%r14), %rsi
subq %rsi, %rcx
addq %rdx, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x40(%r14,%rax,8)
incq 0x8(%rsp)
jmp 0x5906
movq %r14, %rdi
movq %r15, %rsi
callq 0x59b9
movsd 0x30(%rsp), %xmm0
movq %r12, %xmm1
incq %r12
punpckldq 0x56ed(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x56f5(%rip), %xmm1     # 0xb060
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
ja 0x58fd
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x79ac(%rip), %rdi      # 0xd348
leaq 0x615c(%rip), %rsi      # 0xbaff
leaq 0x616e(%rip), %rcx      # 0xbb18
movl $0x59, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_profiler.c
// Function: mctop_prof_stats_calc
void
mctop_prof_stats_calc(mctop_prof_t* prof, mctop_prof_stats_t* stats)
{
  qsort(prof->latencies, prof->size, sizeof(ticks), mctop_prof_comp_ticks);
  stats->num_vals = prof->size;
  
  stats->median = prof->latencies[prof->size >> 1];
  const size_t median2x = 2 * stats->median;
  size_t n_elems = 0;
  ticks sum = 0;
  for (size_t i = 0; i < stats->num_vals; i++)
    {
      if (likely(prof->latencies[i] < median2x))
	{
	  sum += prof->latencies[i];
	  n_elems++;
	}
    }

  const ticks avg = sum / n_elems;;
  stats->avg = avg;

  ticks sum_diff_sqr = 0;
  for (size_t i = 0; i < stats->num_vals; i++)
    {
      if (likely(prof->latencies[i] < median2x))
	{
	  ticks adiff = mctop_prof_abs_diff(prof->latencies[i], avg);
	  sum_diff_sqr += (adiff * adiff);
	}
    }
  stats->std_dev = sqrt(sum_diff_sqr / n_elems);
  stats->std_dev_perc = 100 * (1 - (avg - stats->std_dev) / avg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rdi), %r14
movq (%rdi), %rsi
leaq 0x126(%rip), %rcx       # 0x5af8
movl $0x8, %edx
movq %r14, %rdi
callq 0x20a0
movq (%r15), %rsi
movq %rsi, (%rbx)
movq %rsi, %rax
andq $-0x2, %rax
movq 0x40(%r15,%rax,4), %rdi
movq %rdi, 0x8(%rbx)
addq %rdi, %rdi
testq %rsi, %rsi
je 0x5a22
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
xorl %edx, %edx
movq (%r14,%rdx,8), %r9
cmpq %rdi, %r9
cmovaeq %rcx, %r9
adcq $0x0, %r8
addq %r9, %rax
incq %rdx
cmpq %rdx, %rsi
jne 0x5a06
jmp 0x5a27
xorl %eax, %eax
xorl %r8d, %r8d
xorl %ecx, %ecx
xorl %edx, %edx
divq %r8
movq %rax, %r15
movq %rax, 0x10(%rbx)
testq %rsi, %rsi
je 0x5a69
xorl %eax, %eax
xorl %ecx, %ecx
movq (%r14,%rax,8), %rdx
cmpq %rdi, %rdx
jae 0x5a61
movq %r15, %r9
subq %rdx, %r9
negq %r9
movq %r15, %r10
subq %rdx, %r10
cmovbq %r9, %r10
imulq %r10, %r10
addq %r10, %rcx
incq %rax
cmpq %rax, %rsi
jne 0x5a3e
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rax, %xmm1
punpckldq 0x55d2(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x55da(%rip), %xmm1     # 0xb060
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5aa2
sqrtsd %xmm0, %xmm0
jmp 0x5aa7
callq 0x2300
movq %r15, %xmm1
punpckldq 0x559c(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x55a4(%rip), %xmm1     # 0xb060
movsd %xmm0, 0x18(%rbx)
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
divsd %xmm2, %xmm1
movsd 0x6cd7(%rip), %xmm0     # 0xc7b8
subsd %xmm1, %xmm0
mulsd 0x551b(%rip), %xmm0     # 0xb008
movsd %xmm0, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/mctop_profiler.c
// Function: mctop_prof_stats_print
void
mctop_prof_stats_print(mctop_prof_stats_t* stats)
{
  printf("## mctop_prof stats #######\n");
  printf("# #Values       = %zu\n", stats->num_vals);
  printf("# Average       = %zu\n", stats->avg);
  printf("# Median        = %zu\n", stats->median);
  printf("# Std dev       = %.2f\n", stats->std_dev);
  printf("# Std dev%%      = %.2f%%\n", stats->std_dev_perc);
  printf("###########################\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x6d24(%rip), %rdi      # 0xc840
callq 0x2080
movq (%rbx), %rsi
leaq 0x6c9d(%rip), %rdi      # 0xc7c8
xorl %eax, %eax
callq 0x2100
movq 0x10(%rbx), %rsi
leaq 0x6ca2(%rip), %rdi      # 0xc7df
xorl %eax, %eax
callq 0x2100
movq 0x8(%rbx), %rsi
leaq 0x6ca7(%rip), %rdi      # 0xc7f6
xorl %eax, %eax
callq 0x2100
movsd 0x18(%rbx), %xmm0
leaq 0x6cab(%rip), %rdi      # 0xc80d
movb $0x1, %al
callq 0x2100
movsd 0x20(%rbx), %xmm0
leaq 0x6cb0(%rip), %rdi      # 0xc825
movb $0x1, %al
callq 0x2100
leaq 0x6ee0(%rip), %rdi      # 0xca63
popq %rbx
jmp 0x2080
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/helper.c
// Function: get_num_hw_ctx
int
get_num_hw_ctx()
{
#ifdef __x86_64__
  cpu_set_t mask;
  CPU_ZERO(&mask);
#endif

  int nc = 0;
  while (1)
    {
      if (!mctop_set_cpu(NULL, nc))
  	{
  	  break;
  	}
#ifdef __x86_64__
      CPU_SET(nc, &mask);
#endif
      nc++;
    }

#ifdef __x86_64__
  sched_setaffinity(0, sizeof(cpu_set_t), &mask);
#elif defined(__sparc)
  processor_bind(P_LWPID, P_MYID, PBIND_NONE, NULL);
#endif
  
  return nc;
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x297a
testl %eax, %eax
je 0x5bfd
xorl %ebx, %ebx
cmpq $0x3ff, %rbx            # imm = 0x3FF
ja 0x5bed
movl $0x1, %eax
movl %ebx, %ecx
shlq %cl, %rax
movq %rbx, %rcx
shrq $0x6, %rcx
orq %rax, (%rsp,%rcx,8)
incq %rbx
xorl %edi, %edi
movl %ebx, %esi
callq 0x297a
testl %eax, %eax
jne 0x5bcf
movq %rsp, %rdx
movl $0x80, %esi
xorl %edi, %edi
callq 0x2130
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/helper.c
// Function: ll_random_traverse
ticks
ll_random_traverse(volatile uint64_t* list, const size_t reps)
{
  volatile ticks __s = getticks();
  for (size_t r = 0; r < reps; r++)
    {
      list = (uint64_t*) *list;
    }
  volatile ticks __e = getticks();
  assert(list != NULL);
  return (__e - __s) / reps;
}

// Assembly:
subq $0x18, %rsp
rdtsc
movl %eax, %eax
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, 0x10(%rsp)
testq %rsi, %rsi
je 0x5c64
movq %rsi, %rax
movq (%rdi), %rdi
decq %rax
jne 0x5c5c
rdtsc
movl %eax, %eax
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, 0x8(%rsp)
testq %rdi, %rdi
je 0x5c8d
movq 0x8(%rsp), %rax
subq 0x10(%rsp), %rax
xorl %edx, %edx
divq %rsi
addq $0x18, %rsp
retq
leaq 0x6bd4(%rip), %rdi      # 0xc868
leaq 0x6bda(%rip), %rsi      # 0xc875
leaq 0x6be0(%rip), %rcx      # 0xc882
movl $0x41, %edx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O1/LPD-EPFL[P]mctop/src/helper.c
// Function: ll_random_create
void
ll_random_create(volatile uint64_t* mem, const size_t size)
{
  const size_t size_cl = size / CACHE_LINE_SIZE;
  const size_t per_cl = CACHE_LINE_SIZE / sizeof(uint64_t);
  uint8_t* used = calloc_assert(size_cl, sizeof(uint8_t));
  unsigned long* seeds = seeds_create();
  seeds[0] = 0x0123456789ABCDLL;
  seeds[1] = 0xA023457689BAC0LL;
  seeds[2] = 0xB0245736F9BAC1LL;

  size_t idx = 0;
  size_t used_num = 0;
  while (used_num < size_cl - 1)
    {
      used[idx] = 1;
      used_num++;

      size_t nxt;
      do
	{
	  nxt = (marsaglia_rand(seeds) % size_cl);
	}
      while (used[nxt]);

      size_t nxt_8 = (nxt * per_cl);
      size_t idx_8 = (idx * per_cl);
      mem[idx_8] = (uint64_t) (mem + nxt_8);
      idx = nxt;
    }

  mem[idx * per_cl] = (volatile uint64_t) mem;
  /* mem[idx * per_cl] = 0; */

  free(seeds);
  free(used);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
shrq $0x6, %r15
movl $0x1, %esi
movq %r15, %rdi
callq 0x2150
testq %rax, %rax
je 0x5dac
movq %rax, %r14
movl $0x40, %edi
callq 0x21d0
movq %rax, %rdi
movabsq $0x123456789abcd, %rax  # imm = 0x123456789ABCD
movq %rax, (%rdi)
movabsq $0xa023457689bac0, %rax # imm = 0xA023457689BAC0
movq %rax, 0x8(%rdi)
movabsq $0xb0245736f9bac1, %rax # imm = 0xB0245736F9BAC1
movq %rax, 0x10(%rdi)
movq %r15, %rsi
decq %rsi
je 0x5d8e
movq (%rdi), %r9
movq 0x8(%rdi), %r8
movq 0x10(%rdi), %rcx
xorl %r10d, %r10d
xorl %r11d, %r11d
movb $0x1, (%r14,%r10)
movq %r9, %rax
shlq $0x10, %rax
xorq %r9, %rax
movq %r8, %r9
movq %rcx, %r8
movq %rax, %rcx
shrq $0x5, %rcx
xorq %rax, %rcx
movq %r9, %rax
xorq %rcx, %rax
addq %rcx, %rcx
xorq %rax, %rcx
xorq %r8, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r15
cmpb $0x0, (%r14,%rdx)
jne 0x5d2b
movq %rdx, %rax
incq %r11
shlq $0x6, %rdx
leaq (%rbx,%rdx), %r12
shlq $0x6, %r10
movq %r12, (%rbx,%r10)
movq %rax, %r10
cmpq %rsi, %r11
jne 0x5d26
movq %r9, (%rdi)
movq %r8, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
jmp 0x5d90
xorl %edx, %edx
movq %rbx, (%rbx,%rdx)
callq 0x2030
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2030
leaq 0x7595(%rip), %rdi      # 0xd348
leaq 0x5d45(%rip), %rsi      # 0xbaff
leaq 0x5d73(%rip), %rcx      # 0xbb34
movl $0x69, %edx
callq 0x2110