LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/st.c
// Function: tdumpline
void
tdumpline(int n)
{
	char buf[UTF_SIZ];
	Glyph *bp, *end;

	bp = &term.line[n][0];
	end = &bp[MIN(tlinelen(n), term.col) - 1];
	if (bp != end || bp->u != ' ') {
		for ( ; bp <= end; ++bp)
			tprinter(buf, utf8encode(bp->u, buf));
	}
	tprinter("\n", 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x16bd4(%rip), %rax     # 0x1f3f8
movslq %edi, %rdi
movq (%rax,%rdi,8), %r14
callq 0x71c2
movl 0x16bbe(%rip), %ecx     # 0x1f3f4
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %rax
shlq $0x4, %rax
leaq (%r14,%rax), %r15
addq $-0x10, %r15
cmpq %r15, %r14
jne 0x886d
cmpl $0x20, (%r14)
jne 0x886d
leaq 0x6dc8(%rip), %rdi      # 0xf624
pushq $0x1
popq %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x87aa
leaq 0xc(%rsp), %rbx
cmpq %r15, %r14
ja 0x8855
movl (%r14), %edi
movq %rbx, %rsi
callq 0x6c52
movq %rbx, %rdi
movq %rax, %rsi
callq 0x87aa
addq $0x10, %r14
jmp 0x8872
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/x.c
// Function: setsel
void
setsel(char *str, Time t)
{
	if (!str)
		return;

	free(xsel.primary);
	xsel.primary = str;

	XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
	if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
		selclear();
	clipcopy(NULL);
}

// Assembly:
testq %rdi, %rdi
je 0xa857
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x17253(%rip), %rdi     # 0x21a58
callq 0x6360
movq %r14, 0x17247(%rip)     # 0x21a58
movq 0x170c0(%rip), %rdi     # 0x218d8
movq 0x170c9(%rip), %rdx     # 0x218e8
pushq $0x1
popq %r14
movq %r14, %rsi
movq %rbx, %rcx
callq 0x6680
movq 0x170a3(%rip), %rdi     # 0x218d8
movq %r14, %rsi
callq 0x69b0
cmpq 0x170a4(%rip), %rax     # 0x218e8
je 0xa84b
callq 0x6da6
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa78e
retq
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/x.c
// Function: xsetcursor
int
xsetcursor(int cursor)
{
	if (!BETWEEN(cursor, 0, 8)) /* 7-8: st extensions */
		return 1;
	win.cursor = cursor;
	cursorblinks = win.cursor == 0 || win.cursor == 1 ||
	               win.cursor == 3 || win.cursor == 5 ||
	               win.cursor == 7;
	return 0;
}

// Assembly:
cmpl $0x8, %edi
ja 0xbac3
movl %edi, 0x15f4b(%rip)     # 0x219fc
cmpl $0x6, %edi
jae 0xbac7
pushq $0x2b
popq %rax
btl %edi, %eax
jae 0xbac7
pushq $0x1
popq %rax
jmp 0xbacf
pushq $0x1
popq %rax
retq
xorl %eax, %eax
cmpl $0x7, %edi
sete %al
movl %eax, 0x15f33(%rip)     # 0x21a08
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/hb.c
// Function: hbunloadfonts
void
hbunloadfonts()
{
	for (int i = 0; i < hbfontslen; i++) {
		hb_font_destroy(hbfontcache[i].font);
		XftUnlockFace(hbfontcache[i].match);
	}

	if (hbfontcache != NULL) {
		free(hbfontcache);
		hbfontcache = NULL;
	}
	hbfontslen = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %r14d, %r14d
movslq 0x13abc(%rip), %rax     # 0x21ac0
movq 0x13abd(%rip), %rdi     # 0x21ac8
cmpq %rax, %r14
jge 0xe033
movq 0x8(%rdi,%rbx), %rdi
callq 0x6870
movq 0x13aa7(%rip), %rax     # 0x21ac8
movq (%rax,%rbx), %rdi
callq 0x6940
incq %r14
addq $0x10, %rbx
jmp 0xdffd
testq %rdi, %rdi
je 0xe045
callq 0x6360
andq $0x0, 0x13a83(%rip)     # 0x21ac8
andl $0x0, 0x13a74(%rip)     # 0x21ac0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/hb.c
// Function: hbfindfont
hb_font_t *
hbfindfont(XftFont *match)
{
	for (int i = 0; i < hbfontslen; i++) {
		if (hbfontcache[i].match == match)
			return hbfontcache[i].font;
	}

	/* Font not found in cache, caching it now. */
	hbfontcache = realloc(hbfontcache, sizeof(HbFontMatch) * (hbfontslen + 1));
	FT_Face face = XftLockFace(match);
	hb_font_t *font = hb_ft_font_create(face, NULL);
	if (font == NULL)
		die("Failed to load Harfbuzz font.");

	hbfontcache[hbfontslen].match = match;
	hbfontcache[hbfontslen].font = font;
	hbfontslen += 1;

	return font;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x13a5e(%rip), %rsi     # 0x21ac0
movq 0x13a5f(%rip), %rdi     # 0x21ac8
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %ecx
cmovgl %esi, %ecx
shlq $0x4, %rcx
addq $0x10, %rcx
leaq 0x10(%rax), %rdx
cmpq %rdx, %rcx
je 0xe096
cmpq %rbx, (%rdi,%rax)
movq %rdx, %rax
jne 0xe07d
movq -0x8(%rdi,%rdx), %r14
jmp 0xe0f6
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x68f0
movq %rax, 0x13a1e(%rip)     # 0x21ac8
movq %rbx, %rdi
callq 0x63a0
movq %rax, %rdi
xorl %esi, %esi
callq 0x66e0
movq %rax, %r14
testq %rax, %rax
jne 0xe0d2
leaq 0x241d(%rip), %rdi      # 0x104e8
xorl %eax, %eax
callq 0x6b66
movq 0x139ef(%rip), %rax     # 0x21ac8
movslq 0x139e0(%rip), %rcx     # 0x21ac0
leal 0x1(%rcx), %edx
shlq $0x4, %rcx
movq %rbx, (%rax,%rcx)
movq %r14, 0x8(%rax,%rcx)
movl %edx, 0x139ca(%rip)     # 0x21ac0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/spacifici[P]st/src/hb.c
// Function: hbtransformsegment
void
hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length)
{
	hb_font_t *font = hbfindfont(xfont);
	if (font == NULL)
		return;

	Rune rune;
	ushort mode = USHRT_MAX;
	hb_buffer_t *buffer = hb_buffer_create();
	hb_buffer_set_direction(buffer, HB_DIRECTION_LTR);

	/* Fill buffer with codepoints. */
	for (int i = start; i < (start+length); i++) {
		rune = string[i].u;
		mode = string[i].mode;
		if (mode & ATTR_WDUMMY)
			rune = 0x0020;
		hb_buffer_add_codepoints(buffer, &rune, 1, 0, 1);
	}

	/* Shape the segment. */
	hb_shape(font, buffer, NULL, 0);

	/* Get new glyph info. */
	hb_glyph_info_t *info = hb_buffer_get_glyph_infos(buffer, NULL);

	/* Write new codepoints. */
	for (int i = 0; i < length; i++) {
		hb_codepoint_t gid = info[i].codepoint;
		codepoints[start+i] = gid;
	}

	/* Cleanup. */
	hb_buffer_destroy(buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r14d
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r13
callq 0xe054
testq %rax, %rax
je 0xe3cb
movq %rax, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
callq 0x6780
movq %rax, %rbx
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x66c0
movq %r14, 0x18(%rsp)
leal (%r14,%rbp), %eax
movslq %ebp, %r12
movslq %eax, %r15
movq %r12, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %r14
addq $0x4, %r14
leaq 0x4(%rsp), %r13
pushq $0x1
popq %rbp
movq %r12, 0x8(%rsp)
cmpq %r15, %r12
jge 0xe374
btl $0xa, (%r14)
pushq $0x20
popq %rax
jb 0xe355
movl -0x4(%r14), %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x6280
incq %r12
addq $0x10, %r14
jmp 0xe342
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x61c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6420
movq 0x18(%rsp), %rdx
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
movq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rsi
leaq (%rdx,%rsi,4), %rdx
cmpq %r15, %rcx
je 0xe3c3
movl (%rax), %esi
movl %esi, (%rdx,%r15,4)
incq %r15
addq $0x14, %rax
jmp 0xe3af
movq %rbx, %rdi
callq 0x6530
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/pwrite2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char buf[BUFLEN];
	int fd = open(tmpfile, O_RDWR);

	assert(fd >= 0);

	while (1) {
		assert(pwrite(fd, buf, BUFLEN, 0) == BUFLEN);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
leaq 0x2506(%rip), %rdi      # 0x5180
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x2230
testl %eax, %eax
js 0x2cc4
movl %eax, %ebp
movq %rsp, %r14
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2200
cmpq $0x1000, %rax           # imm = 0x1000
jne 0x2cab
incq (%rbx)
jmp 0x2c8d
leaq 0x661(%rip), %rdi       # 0x3313
leaq 0x5c7(%rip), %rsi       # 0x3280
leaq 0x620(%rip), %rcx       # 0x32e0
pushq $0x21
jmp 0x2cdb
leaq 0x5ad(%rip), %rdi       # 0x3278
leaq 0x5ae(%rip), %rsi       # 0x3280
leaq 0x607(%rip), %rcx       # 0x32e0
pushq $0x1e
popq %rdx
callq 0x2130
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perftests/kvldsperf/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct sock_addr ** sas;
	int s;
	struct wire_requestqueue * Q;

	WARNP_INIT;

	/* Check number of arguments. */
	if (argc != 2) {
		fprintf(stderr, "usage: test_kvlds %s\n", "<socketname>");
		exit(1);
	}

	/* Resolve the socket address and connect. */
	if ((sas = sock_resolve(argv[1])) == NULL) {
		warnp("Error resolving socket address: %s", argv[1]);
		exit(1);
	}
	if (sas[0] == NULL) {
		warn0("No addresses found for %s", argv[1]);
		exit(1);
	}
	if ((s = sock_connect(sas)) == -1)
		exit(1);

	/* Create a request queue. */
	if ((Q = wire_requestqueue_init(s)) == NULL) {
		warnp("Cannot create packet write queue");
		exit(1);
	}

	/* Test creating 10000000 key-value pairs. */
	if (createmany(Q, 10000000))
		exit(1);

	/* Free the request queue. */
	wire_requestqueue_destroy(Q);
	wire_requestqueue_free(Q);

	/* Free socket addresses. */
	sock_addr_freelist(sas);

	/* Success! */
	exit(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2417
callq 0x483c
cmpl $0x2, %ebx
jne 0x244b
movq 0x8(%r14), %rdi
callq 0x39c4
testq %rax, %rax
jne 0x246f
callq 0x2090
cmpl $0x0, (%rax)
movq 0x8(%r14), %rsi
jne 0x2497
leaq 0x6be8(%rip), %rdi      # 0x9027
xorl %eax, %eax
callq 0x4a48
jmp 0x2559
movq 0xcba6(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x6ba8(%rip), %rsi      # 0x9004
leaq 0x6bb7(%rip), %rdx      # 0x901a
xorl %eax, %eax
callq 0x21a0
jmp 0x2559
movq %rax, %rbx
cmpq $0x0, (%rax)
jne 0x24b0
movq 0x8(%r14), %rsi
leaq 0x6bc7(%rip), %rdi      # 0x904a
xorl %eax, %eax
callq 0x4a48
callq 0x2090
andl $0x0, (%rax)
jmp 0x2559
movq %rax, %rbx
leaq 0x6b86(%rip), %rdi      # 0x9027
xorl %eax, %eax
callq 0x48b9
andl $0x0, (%rbx)
jmp 0x2559
movq %rbx, %rdi
callq 0x419d
cmpl $-0x1, %eax
je 0x2559
movl %eax, %edi
callq 0x5ea8
testq %rax, %rax
jne 0x24eb
callq 0x2090
cmpl $0x0, (%rax)
jne 0x2561
leaq 0x6b82(%rip), %rdi      # 0x9064
xorl %eax, %eax
callq 0x4a48
jmp 0x2559
movq %rax, %r14
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movq $0x989680, 0x18(%rsp)   # imm = 0x989680
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
leaq 0x38(%rsp), %rdi
andq $0x0, (%rdi)
pushq $0x8
popq %rsi
callq 0x4bcc
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x2559
leaq 0x8(%rsp), %rdi
callq 0x25ac
testl %eax, %eax
jne 0x2559
leaq 0x2c(%rsp), %r15
movq %r15, %rdi
callq 0x28eb
orl -0x4(%r15), %eax
je 0x2577
callq 0x2090
cmpl $0x0, (%rax)
jne 0x25a0
leaq 0x6b2e(%rip), %rdi      # 0x9085
jmp 0x24e2
pushq $0x1
popq %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x6af9(%rip), %rdi      # 0x9064
xorl %eax, %eax
callq 0x48b9
jmp 0x24a8
movq 0x30(%rsp), %rdi
callq 0x2040
movq %r14, %rdi
callq 0x638b
movq %r14, %rdi
callq 0x639f
movq %rbx, %rdi
callq 0x3fc3
xorl %edi, %edi
callq 0x2280
movq %rax, %rbx
leaq 0x6adb(%rip), %rdi      # 0x9085
jmp 0x256b
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perftests/kvldsperf/main.c
// Function: sendbatch
static int
sendbatch(struct createmany_state * C)
{

	while ((C->Nsent < C->Nmax) && (C->Nip < 4096)) {
		/* Construct the key/value. */
		be64enc(C->key->buf, C->Nsent);

		/* Send the request. */
		if (proto_kvlds_request_set(C->Q, C->key, C->key,
		    callback_done, C))
			goto err0;
		C->Nsent += 1;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
leaq 0x51(%rip), %r14        # 0x260f
pushq $-0x1
popq %rbp
xorl %eax, %eax
cmpq 0x10(%rbx), %rcx
jae 0x260a
cmpq $0xfff, 0x18(%rbx)      # imm = 0xFFF
ja 0x260a
bswapq %rcx
movq 0x28(%rbx), %rax
movq %rcx, 0x1(%rax)
movq (%rbx), %rdi
movq 0x28(%rbx), %rdx
movq %rdx, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x4dce
testl %eax, %eax
jne 0x2608
movq 0x8(%rbx), %rcx
incq %rcx
movq %rcx, 0x8(%rbx)
incq 0x18(%rbx)
jmp 0x25c1
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/randhhh1D.c
// Function: init
void init(double SSepsilon, double prob) {
	int i;
	SSepsval = SSepsilon;
	srand(SEED);
#ifdef PROB
	ignoreProb = 1 - prob;
	logIgnoreProb = log(ignoreProb);
	minusQuantity = log(RAND_MAX) / logIgnoreProb;
	nrIgnore = log((float)rand()) / logIgnoreProb - minusQuantity;
#endif
	for (i = 0; i < NUM_COUNTERS; i++)
		counters[i] = LCU_Init(max(SSepsilon, twototheminus(leveleps[i])));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movapd %xmm0, (%rsp)
movsd %xmm0, 0x3e1b(%rip)     # 0x5160
movl $0xd5d, %edi            # imm = 0xD5D
callq 0x1100
leaq 0x3dda(%rip), %rbx      # 0x5130
xorl %r14d, %r14d
leaq 0x3e10(%rip), %r15      # 0x5170
cmpq $0x28, %r14
je 0x13a2
movl (%rbx), %edi
callq 0x1312
movapd %xmm0, %xmm1
movapd (%rsp), %xmm3
cmplesd %xmm3, %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm0
callq 0x1bf0
movq %rax, (%r14,%r15)
addq $0x8, %r14
addq $0x4, %rbx
jmp 0x1360
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/randhhh1D.c
// Function: update
void update(LCLitem_t item, int count) {
#ifdef  PROB
	if (nrIgnore--) return;
	short i = rand() % NUM_COUNTERS;
	LCU_Update(counters[i], item & masks[i]);
	nrIgnore = log((float)rand()) / logIgnoreProb - minusQuantity;
#else
	short i = rand() % NUM_COUNTERS;
	LCU_Update(counters[i], item & masks[i]);
#endif
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x11e0
pushq $0x5
popq %rcx
cltd
idivl %ecx
movswq %dx, %rax
leaq 0x3d81(%rip), %rcx      # 0x5170
movq (%rcx,%rax,8), %rdi
leaq 0x3d16(%rip), %rcx      # 0x5110
andl (%rcx,%rax,4), %ebx
movl %ebx, %esi
popq %rbx
jmp 0x1ebb
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/randhhh1D.c
// Function: cmpHH
int cmpHH(const void * lhs, const void * rhs) {
	if (((const HeavyHitter*) lhs)->item > ((const HeavyHitter*) rhs)->item) return 1;
	if (((const HeavyHitter*) lhs)->item < ((const HeavyHitter*) rhs)->item) return -1;
	if (((const HeavyHitter*) lhs)->mask > ((const HeavyHitter*) rhs)->mask) return 1;
	if (((const HeavyHitter*) lhs)->mask < ((const HeavyHitter*) rhs)->mask) return -1;
	if (((const HeavyHitter*) lhs)->upper != ((const HeavyHitter*) rhs)->upper) return ((const HeavyHitter*) lhs)->upper - ((const HeavyHitter*) rhs)->upper;
	return ((const HeavyHitter*) lhs)->lower - ((const HeavyHitter*) rhs)->lower;
}

// Assembly:
movl (%rsi), %ecx
pushq $0x1
popq %rax
cmpl %ecx, (%rdi)
jbe 0x140f
retq
pushq $-0x1
popq %rcx
jae 0x1417
movl %ecx, %eax
retq
movl 0x4(%rsi), %edx
cmpl %edx, 0x4(%rdi)
jg 0x140e
movl %ecx, %eax
jl 0x140e
movl 0x8(%rdi), %eax
subl 0x8(%rsi), %eax
jne 0x140e
movl 0xc(%rdi), %eax
subl 0xc(%rsi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_Init
LCU_type * LCU_Init(float fPhi)
{
	int i;
	int k = 1 + (int) 1.0/fPhi;

	LCU_type* result = (LCU_type*) calloc(1,sizeof(LCU_type));

	result->a= (long long) 698124007;
	result->b= (long long) 5125833;
	if (k<1) k=1;
	result->k=k;
	result->n=0;  

	result->tblsz=LCU_HASHMULT*k;  
	result->hashtable=(LCUITEM**) calloc(result->tblsz,sizeof(LCUITEM *));
	result->groups=(LCUGROUP *)calloc(k,sizeof(LCUGROUP));
	result->items=(LCUITEM *) calloc(k,sizeof(LCUITEM));
	result->freegroups=(LCUGROUP **) calloc(k,sizeof(LCUGROUP*));

	for (i=0; i<result->tblsz;i++) 
		result->hashtable[i]=NULL;

	result->root=result->groups;
	result->groups->count=0;
	result->groups->nextg=NULL;
	result->groups->previousg=NULL;

	result->groups->items=result->items;
	for (i=0; i<k;i++)
		result->freegroups[i]=&result->groups[i];
	result->gpt=1; // initialize list of free groups

	for (i=0;i<k;i++) 
	{
		result->items[i].item=LCL_NULLITEM;
		result->items[i].delta=0;
		result->items[i].hash=-1;
		result->items[i].nexti=NULL;
		result->items[i].previousi=NULL;  // initialize values

		result->items[i].parentg=result->groups;
		result->items[i].nexting=&(result->items[i+1]);
		result->items[i].previousing=&(result->items[i-1]); 
		// create doubly linked list
	}
	result->items[0].previousing=&(result->items[k-1]);
	result->items[k-1].nexting=&(result->items[0]);
	// fix start and end of linked list

	return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss 0x1579(%rip), %xmm1     # 0x317c
movaps %xmm1, %xmm2
divss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %ebp
pushq $0x1
popq %rdi
pushq $0x48
popq %rsi
callq 0x1110
movq %rax, %rbx
movq $0x299c86e7, 0x10(%rax) # imm = 0x299C86E7
cmpl $0x2, %ebp
pushq $0x1
popq %r14
cmovgel %ebp, %r14d
movq $0x4e36c9, 0x18(%rax)   # imm = 0x4E36C9
movl %r14d, 0x8(%rax)
leal (%r14,%r14,2), %edi
movl %edi, 0xc(%rax)
pushq $0x8
popq %rbp
movq %rbp, %rsi
callq 0x1110
movq %rax, %r13
movq %rax, 0x40(%rbx)
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x1110
movq %rax, %r12
movq %rax, 0x30(%rbx)
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x1110
movq %rax, %r15
movq %rax, 0x28(%rbx)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1110
movq %rax, 0x38(%rbx)
imulq $0x18, %r14, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x1ca2
andq $0x0, (%r13,%rdx)
addq $0x8, %rdx
jmp 0x1c91
movq %r12, 0x20(%rbx)
movq %r15, 0x8(%r12)
xorl %ecx, %ecx
movq %r12, %rdx
cmpq %rcx, %r14
je 0x1cc2
movq %rdx, (%rax,%rcx,8)
incq %rcx
addq $0x20, %rdx
jmp 0x1cb0
movl $0x1, 0x4(%rbx)
leaq 0x38(%r15), %rax
movabsq $-0x80000001, %rcx      # imm = 0xFFFFFFFF7FFFFFFF
movq %r14, %rdx
subq $0x1, %rdx
jb 0x1cfe
movq %rcx, -0x38(%rax)
andl $0x0, -0x30(%rax)
movq %r12, -0x28(%rax)
movq %rax, -0x10(%rax)
leaq -0x70(%rax), %rsi
movq %rsi, -0x8(%rax)
addq $0x38, %rax
jmp 0x1cda
decl %r14d
imulq $0x38, %r14, %rax
movq %r15, %rcx
addq %rax, %rcx
movq %rcx, 0x30(%r15)
movq %r15, 0x28(%r15,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_InsertIntoHashtable
void LCU_InsertIntoHashtable(LCU_type *lcu, LCUITEM *newi, int i, LCLitem_t newitem){
	newi->nexti=lcu->hashtable[i];
	newi->item=newitem; // overwrite the old item
	newi->hash=i;
	newi->previousi=NULL;
	// insert item into the hashtable
	if (lcu->hashtable[i])
		lcu->hashtable[i]->previousi=newi;
	lcu->hashtable[i]=newi;
}

// Assembly:
movq 0x40(%rdi), %rax
movslq %edx, %rdx
movq (%rax,%rdx,8), %rdi
movq %rdi, 0x20(%rsi)
movl %ecx, (%rsi)
movl %edx, 0x4(%rsi)
andq $0x0, 0x18(%rsi)
movq (%rax,%rdx,8), %rcx
testq %rcx, %rcx
je 0x1d4c
movq %rsi, 0x18(%rcx)
movq %rsi, (%rax,%rdx,8)
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_PutInNewGroup
void LCU_PutInNewGroup(LCU_type * lcu, LCUITEM *newi, LCUGROUP * tmpg){ 
	LCUGROUP * oldgroup;

	oldgroup=newi->parentg;  
	// put item in the tmpg group
	newi->parentg=tmpg;

	if (newi->nexting!=newi) // if the group does not have size 1
	{ // remove the item from its current group
		newi->nexting->previousing=newi->previousing;
		newi->previousing->nexting=newi->nexting;
		oldgroup->items=oldgroup->items->nexting;
	}
	else { // group will be empty
		if (oldgroup->nextg!=NULL) // there is another group
			oldgroup->nextg->previousg=oldgroup->previousg;
		if (lcu->root==oldgroup) // this is the first group
			lcu->root=oldgroup->nextg;
		else
			oldgroup->previousg->nextg=oldgroup->nextg;
		lcu->freegroups[--lcu->gpt]=oldgroup;
		// if we have created an empty group, remove it 
	}	
	newi->nexting=tmpg->items;
	newi->previousing=tmpg->items->previousing;
	newi->previousing->nexting=newi;
	newi->nexting->previousing=newi;
}

// Assembly:
movq 0x10(%rsi), %rax
movq 0x28(%rsi), %rcx
movq %rdx, 0x10(%rsi)
cmpq %rsi, %rcx
je 0x1dd9
movq 0x30(%rsi), %rdi
movq %rdi, 0x30(%rcx)
movq %rcx, 0x28(%rdi)
movq 0x8(%rax), %rcx
movq 0x28(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x1e16
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x1dea
movq 0x10(%rax), %r8
movq %r8, 0x10(%rcx)
cmpq %rax, 0x20(%rdi)
je 0x1dfa
movq 0x10(%rax), %r8
addq $0x18, %r8
jmp 0x1dfe
leaq 0x20(%rdi), %r8
movq %rcx, (%r8)
movq 0x38(%rdi), %rcx
movslq 0x4(%rdi), %r8
leaq -0x1(%r8), %r9
movl %r9d, 0x4(%rdi)
movq %rax, -0x8(%rcx,%r8,8)
movq 0x8(%rdx), %rax
movq %rax, 0x28(%rsi)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsi)
movq %rsi, 0x28(%rax)
movq 0x28(%rsi), %rax
movq %rsi, 0x30(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_AddNewGroupAfter
void LCU_AddNewGroupAfter(LCU_type * lcu, LCUITEM *newi, LCUGROUP *oldgroup) {
	LCUGROUP *newgroup;

	// remove item from old group...
	newi->nexting->previousing=newi->previousing;
	newi->previousing->nexting=newi->nexting;
	oldgroup->items=newi->nexting;
	//get new group
	newgroup=lcu->freegroups[lcu->gpt++];
	newgroup->count=oldgroup->count+1; // set count to be one more the prev group
	newgroup->items=newi;
	newgroup->previousg=oldgroup;
	newgroup->nextg=oldgroup->nextg;
	oldgroup->nextg=newgroup;
	if (newgroup->nextg!=NULL) // if there is another group
		newgroup->nextg->previousg=newgroup;
	newi->parentg=newgroup;
	newi->nexting=newi;
	newi->previousing=newi;
}

// Assembly:
movq 0x28(%rsi), %rax
movq 0x30(%rsi), %rcx
movq %rcx, 0x30(%rax)
movq %rax, 0x28(%rcx)
movq %rax, 0x8(%rdx)
movq 0x38(%rdi), %rax
movslq 0x4(%rdi), %rcx
leal 0x1(%rcx), %r8d
movl %r8d, 0x4(%rdi)
movq (%rax,%rcx,8), %rax
movl (%rdx), %ecx
incl %ecx
movl %ecx, (%rax)
movq %rsi, 0x8(%rax)
movq %rdx, 0x10(%rax)
movq 0x18(%rdx), %rcx
movq %rcx, 0x18(%rax)
movq %rax, 0x18(%rdx)
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x1e82
movq %rax, 0x10(%rcx)
movq %rax, 0x10(%rsi)
movq %rsi, 0x28(%rsi)
movq %rsi, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_IncrementCounter
void LCU_IncrementCounter(LCU_type * lcu, LCUITEM *newi)
{
	LCUGROUP *oldgroup;

	oldgroup=newi->parentg;
	if ((oldgroup->nextg!=NULL) && 
		(oldgroup->nextg->count - oldgroup->count==1))
		LCU_PutInNewGroup(lcu, newi,oldgroup->nextg);
	// if the next group exists
	else { // need to create a new group with a differential of one
		if (newi->nexting==newi) // if there is only one item in the group...
			newi->parentg->count++;
		else      
			LCU_AddNewGroupAfter(lcu,newi,oldgroup);
	}
}

// Assembly:
movq 0x10(%rsi), %rdx
movq 0x18(%rdx), %rax
testq %rax, %rax
je 0x1ead
movl (%rax), %ecx
subl (%rdx), %ecx
cmpl $0x1, %ecx
jne 0x1ead
movq %rax, %rdx
jmp 0x1dae
cmpq %rsi, 0x28(%rsi)
je 0x1eb8
jmp 0x1e33
incl (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_Update
void LCU_Update(LCU_type * lcu, LCLitem_t newitem) {
	int h;
	LCUITEM *il;

	lcu->n++;
	h=hash31(lcu->a,lcu->b,newitem) % lcu->tblsz;
	il=lcu->hashtable[h];
	while (il) {
		if (il->item == newitem) 
			break;
		il=il->nexti;
	}
	if (il==NULL) // item is not monitored (not in hashtable) 
	{
		il=LCU_GetNewCounter(lcu);
		/// and put it into the hashtable for the new item 
		il->delta=lcu->root->count;
		// initialize delta with count of first group
		LCU_InsertIntoHashtable(lcu,il,h,newitem);
		// put the new counter into the first group
		// counter is already in first group by defn of how we got it
		LCU_IncrementCounter(lcu, il);
	}
	else 
		LCU_IncrementCounter(lcu, il);
	// if we have an item, we need to increment its counter 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl (%rdi)
movl %esi, %ebp
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rsi
movl %ebp, %edx
callq 0x235b
movslq 0xc(%rbx), %rcx
cqto
idivq %rcx
movq %rdx, %r14
movq %rdx, %rsi
shlq $0x3, %rsi
addq 0x40(%rbx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x1f01
cmpl %ebp, (%rsi)
je 0x1f2e
addq $0x20, %rsi
jmp 0x1eef
movq %rbx, %rdi
callq 0x1d69
movq %rax, %r15
movq 0x20(%rbx), %rax
movl (%rax), %eax
movl %eax, 0x8(%r15)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1d26
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x1f31
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1e8f
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_PointEstUpp
int LCU_PointEstUpp(LCU_type * lcu, LCLitem_t newitem) {
	int h;
	LCUITEM *il;

	lcu->n++;
	h=hash31(lcu->a,lcu->b,newitem) % lcu->tblsz;
	il=lcu->hashtable[h];
	while (il) {
		if (il->item == newitem) 
			return il->parentg->count;
		il=il->nexti;
	}
	return (lcu->root != NULL ? lcu->root->count : 0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
incl (%rdi)
movl %esi, %ebp
movq 0x10(%rdi), %rdi
movq 0x18(%rbx), %rsi
movl %ebp, %edx
callq 0x235b
movslq 0xc(%rbx), %rcx
cqto
idivq %rcx
shlq $0x3, %rdx
addq 0x40(%rbx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x1fbb
cmpl %ebp, (%rdx)
je 0x1fc8
addq $0x20, %rdx
jmp 0x1fa9
movq 0x20(%rbx), %rax
testq %rax, %rax
jne 0x1fcc
xorl %eax, %eax
jmp 0x1fce
movq 0x10(%rdx), %rax
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/ulossycount.c
// Function: LCU_PointEstLow
int LCU_PointEstLow(LCU_type * lcu, LCLitem_t newitem) {
	int h;
	LCUITEM *il;

	lcu->n++;
	h=hash31(lcu->a,lcu->b,newitem) % lcu->tblsz;
	il=lcu->hashtable[h];
	while (il) {
		if (il->item == newitem) 
			return thismax(il->parentg->count - il->delta, 0);
		il=il->nexti;
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
incl (%rdi)
movl %esi, %ebx
movq 0x10(%rdi), %rdi
movq 0x18(%r14), %rsi
movl %ebx, %edx
callq 0x235b
movslq 0xc(%r14), %rcx
cqto
idivq %rcx
shlq $0x3, %rdx
addq 0x40(%r14), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x201a
cmpl %ebx, (%rdx)
je 0x201e
addq $0x20, %rdx
jmp 0x2008
xorl %eax, %eax
jmp 0x202e
movq 0x10(%rdx), %rax
movl (%rax), %ecx
subl 0x8(%rdx), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/hashtable.c
// Function: HT_Clear
void HT_Clear(LL ** hashtable, int size) { //destroy
	int i;
	LL * ptr, * tmp;
	for (i = 0; i < size; i++) {
		ptr = hashtable[i];
		hashtable[i] = NULL;
		while (ptr) {
			tmp = ptr->next;
			free(ptr);
			ptr = tmp;
		}
	}
	free(hashtable);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %r14d
cmpq %r14, %r15
je 0x2080
movq (%rbx,%r15,8), %rdi
andq $0x0, (%rbx,%r15,8)
testq %rdi, %rdi
je 0x207b
movq 0x10(%rdi), %r12
callq 0x1050
movq %r12, %rdi
jmp 0x2068
incq %r15
jmp 0x205a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/hashtable.c
// Function: HT_Insert
LL * HT_Insert(LL ** hashtable, int64__t item, int val, int size) { //if item already exists just return the pointer, otherwise insert and set val
	int hash = (int) hash31(HASHA_VAL, HASHB_VAL, item) % size;

	//ptr is the start of the list
	LL * ptr = hashtable[hash];

	//search thru the list
	while (ptr) {
		if (ptr->item == item) return ptr; //if we have found it, we are done
		ptr = ptr->next; //keep looking
	}
	
	//if we get here then ptr = NULL and we aren't in the list yet so we may prepend it to the list
	ptr = (LL*) calloc(1, sizeof(LL));
	ptr->item = item;
	ptr->val = val;
	ptr->next = hashtable[hash];
	ptr->prev = NULL;
	if (hashtable[hash] != NULL) hashtable[hash]->prev = ptr;
	hashtable[hash] = ptr;
	return ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl $0x9041077, %edi        # imm = 0x9041077
movl $0x66939d, %esi         # imm = 0x66939D
movq %r14, %rdx
callq 0x235b
cltd
idivl %ebp
movslq %edx, %rax
leaq (%r15,%rax,8), %r15
movq %r15, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x20d6
cmpq %r14, (%rax)
je 0x20fa
addq $0x10, %rax
jmp 0x20c3
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x1110
movq %r14, (%rax)
movl %ebx, 0x8(%rax)
movq (%r15), %rcx
movq %rcx, 0x10(%rax)
testq %rcx, %rcx
je 0x20f7
movq %rax, 0x18(%rcx)
movq %rax, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/hashtable.c
// Function: HT_Find
LL * HT_Find(LL ** hashtable, int64__t item, int size) { //find the LL corresponding to the item. All updates happen via this, as do removes
	int hash = (int) hash31(HASHA_VAL, HASHB_VAL, item) % size;

	//ptr is the start of the list
	LL * ptr = hashtable[hash];

	//search thru the list
	while (ptr) {
		if (ptr->item == item) return ptr; //if we have found it, we are done
		ptr = ptr->next; //keep looking
	}
	//can't find
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x9041077, %edi        # imm = 0x9041077
movl $0x66939d, %esi         # imm = 0x66939D
movq %rbx, %rdx
callq 0x235b
cltd
idivl %ebp
movslq %edx, %rax
leaq (%r14,%rax,8), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x2140
cmpq %rbx, (%rax)
je 0x2140
addq $0x10, %rax
jmp 0x212d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: LLMedSelect
int64__t LLMedSelect(int k, int n, int64__t arr[]) {
  int64__t a, temp;

  int i, ir, j, mid, l;

  l=1;
  ir=n;
  for (;;) {
    if (ir <= l+1) {
      if (ir == l+1 && arr[ir] < arr[l]) {
	SWAP(arr[l],arr[ir])
	  }
      return arr[k];
    }
    else
      {
	mid=(l+ir) >> 1;
	SWAP(arr[mid],arr[l+1])
	  if (arr[l] > arr[ir]) {
	    SWAP(arr[l],arr[ir])
	      }
	if (arr[l+1] > arr[ir]) {
	  SWAP(arr[l+1],arr[ir])
	    }
	if (arr[l] > arr[l+1]) {
	  SWAP(arr[l],arr[l+1])
	    }
	i=l+1;
	j=ir;
	a=arr[l+1];
	for (;;) {
	  do i++; while (arr[i] < a);
	  do j--; while (arr[j] > a);
	  if (j < i) break;
	  SWAP(arr[i],arr[j])
	    }
	arr[l+1]=arr[j];
	arr[j]=a;
	if (j >= k) ir=j-1;
	if (j <= k) l=i;
      }
  }

    }

// Assembly:
pushq %r14
pushq %rbx
movl $0x1, %eax
leal 0x1(%rax), %ecx
movslq %eax, %r10
movslq %esi, %r9
cmpl %ecx, %esi
jle 0x224a
leal (%r9,%r10), %r8d
sarl %r8d
movslq %r8d, %rbx
movq (%rdx,%rbx,8), %r11
movslq %ecx, %r8
movq (%rdx,%r8,8), %r14
movq %r14, (%rdx,%rbx,8)
movq %r11, (%rdx,%r8,8)
movq (%rdx,%r10,8), %rbx
movq (%rdx,%r9,8), %r14
cmpq %r14, %rbx
jle 0x21c5
movq %r14, (%rdx,%r10,8)
movq %rbx, (%rdx,%r9,8)
movq (%rdx,%r8,8), %r11
jmp 0x21c8
movq %r14, %rbx
cmpq %rbx, %r11
jle 0x21d9
movq %rbx, (%rdx,%r8,8)
movq %r11, (%rdx,%r9,8)
movq (%rdx,%r8,8), %r11
movq (%rdx,%r10,8), %r9
cmpq %r11, %r9
jle 0x21ec
movq %r11, (%rdx,%r10,8)
movq %r9, (%rdx,%r8,8)
jmp 0x21ef
movq %r11, %r9
movl %esi, %r10d
movslq %ecx, %rcx
movq 0x8(%rdx,%rcx,8), %rbx
incq %rcx
cmpq %r9, %rbx
jl 0x21f5
movslq %r10d, %r11
incq %r11
movq -0x10(%rdx,%r11,8), %r14
decl %r10d
decq %r11
cmpq %r9, %r14
jg 0x2208
cmpq %rcx, %r11
jle 0x2228
movq %r14, (%rdx,%rcx,8)
movq %rbx, -0x8(%rdx,%r11,8)
jmp 0x21f2
leal 0x1(%r10), %ebx
movq %r14, (%rdx,%r8,8)
leal -0x1(%r10), %r8d
cmpl %edi, %ebx
cmovgl %r8d, %esi
movq %r9, -0x8(%rdx,%r11,8)
cmpl %edi, %r10d
cmovlel %ecx, %eax
jmp 0x217c
jne 0x2261
movq (%rdx,%r9,8), %rax
movq (%rdx,%r10,8), %rcx
cmpq %rcx, %rax
jge 0x2261
movq %rax, (%rdx,%r10,8)
movq %rcx, (%rdx,%r9,8)
movslq %edi, %rax
movq (%rdx,%rax,8), %rax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: MedSelect
int MedSelect(int k, int n, int arr[]) {
  int a, temp;

  int i, ir, j, mid, l;

  l=1;
  ir=n;
  for (;;) {
    if (ir <= l+1) {
      if (ir == l+1 && arr[ir] < arr[l]) {
	SWAP(arr[l],arr[ir])
	  }
      return arr[k];
    }
    else
      {
	mid=(l+ir) >> 1;
	SWAP(arr[mid],arr[l+1])
	  if (arr[l] > arr[ir]) {
	    SWAP(arr[l],arr[ir])
	      }
	if (arr[l+1] > arr[ir]) {
	  SWAP(arr[l+1],arr[ir])
	    }
	if (arr[l] > arr[l+1]) {
	  SWAP(arr[l],arr[l+1])
	    }
	i=l+1;
	j=ir;
	a=arr[l+1];
	for (;;) {
	  do i++; while (arr[i] < a);
	  do j--; while (arr[j] > a);
	  if (j < i) break;
	  SWAP(arr[i],arr[j])
	    }
	arr[l+1]=arr[j];
	arr[j]=a;
	if (j >= k) ir=j-1;
	if (j <= k) l=i;
      }
  }
}

// Assembly:
pushq %rbp
pushq %rbx
movl $0x1, %eax
leal 0x1(%rax), %ecx
movslq %eax, %r10
movslq %esi, %r9
cmpl %ecx, %esi
jle 0x233c
leal (%r9,%r10), %r8d
sarl %r8d
movslq %r8d, %rbx
movl (%rdx,%rbx,4), %r11d
movslq %ecx, %r8
movl (%rdx,%r8,4), %ebp
movl %ebp, (%rdx,%rbx,4)
movl %r11d, (%rdx,%r8,4)
movl (%rdx,%r10,4), %ebx
movl (%rdx,%r9,4), %ebp
cmpl %ebp, %ebx
jle 0x22ba
movl %ebp, (%rdx,%r10,4)
movl %ebx, (%rdx,%r9,4)
movl (%rdx,%r8,4), %r11d
jmp 0x22bc
movl %ebp, %ebx
cmpl %ebx, %r11d
jle 0x22cd
movl %ebx, (%rdx,%r8,4)
movl %r11d, (%rdx,%r9,4)
movl (%rdx,%r8,4), %r11d
movl (%rdx,%r10,4), %r9d
cmpl %r11d, %r9d
jle 0x22e0
movl %r11d, (%rdx,%r10,4)
movl %r9d, (%rdx,%r8,4)
jmp 0x22e3
movl %r11d, %r9d
movl %esi, %r10d
movslq %ecx, %rcx
movl 0x4(%rdx,%rcx,4), %ebx
incq %rcx
cmpl %r9d, %ebx
jl 0x22e9
movslq %r10d, %r11
incq %r11
movl -0x8(%rdx,%r11,4), %ebp
decl %r10d
decq %r11
cmpl %r9d, %ebp
jg 0x22fb
cmpq %rcx, %r11
jle 0x231a
movl %ebp, (%rdx,%rcx,4)
movl %ebx, -0x4(%rdx,%r11,4)
jmp 0x22e6
leal 0x1(%r10), %ebx
movl %ebp, (%rdx,%r8,4)
leal -0x1(%r10), %r8d
cmpl %edi, %ebx
cmovgl %r8d, %esi
movl %r9d, -0x4(%rdx,%r11,4)
cmpl %edi, %r10d
cmovlel %ecx, %eax
jmp 0x2273
jne 0x2352
movl (%rdx,%r9,4), %eax
movl (%rdx,%r10,4), %ecx
cmpl %ecx, %eax
jge 0x2352
movl %eax, (%rdx,%r10,4)
movl %ecx, (%rdx,%r9,4)
movslq %edi, %rax
movl (%rdx,%rax,4), %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: ran1
float ran1(prng_type * prng) {

  // A Random Number Generator that picks a uniform [0,1] random number
  // From Numerical Recipes, page 280
  // Should be called with a NEGATIVE value of idum to initialize
  // subsequent calls should not alter idum

  int j;
  long k;
  float temp;

  if (prng->floatidum <= 0 || !prng->iy) {
    if (-(prng->floatidum) < 1) prng->floatidum=1;
    else prng->floatidum = -(prng->floatidum);
    for (j=NTAB+7;j>=0;j--) {
      k=(prng->floatidum)/IQ;
      prng->floatidum=IA*(prng->floatidum-k*IQ)-IR*k;
      if (prng->floatidum < 0) prng->floatidum+=IM;
      if (j<NTAB) prng->iv[j]=prng->floatidum;
    }
    prng->iy=prng->iv[0];
  }
  k = (prng->floatidum)/IQ;
  prng->floatidum=IA*(prng->floatidum-k*IQ)-IR*k;
  if (prng->floatidum<0) prng->floatidum += IM;
  j = prng->iy/NDIV;
  prng->iy=prng->iv[j];
  prng->iv[j]=prng->floatidum;
  if ((temp=AM*prng->iy) > RNMX) return RNMX;
  else return temp;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x23c1
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
jne 0x2428
movq %rcx, %rax
negq %rax
testq %rcx, %rcx
pushq $0x1
popq %rcx
cmovsq %rax, %rcx
pushq $0x27
popq %rsi
movl $0x1f31d, %r8d          # imm = 0x1F31D
testl %esi, %esi
js 0x2420
movq %rcx, %rax
cqto
idivq %r8
imulq $-0x1f31d, %rax, %rdx   # imm = 0xFFFE0CE3
addq %rcx, %rdx
imulq $0x41a7, %rdx, %rdx     # imm = 0x41A7
imulq $-0xb14, %rax, %rax     # imm = 0xF4EC
leaq (%rdx,%rax), %rcx
addq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
addq %rax, %rdx
cmovnsq %rdx, %rcx
cmpl $0x1f, %esi
ja 0x241c
movl %esi, %eax
movq %rcx, 0x20(%rdi,%rax,8)
decl %esi
jmp 0x23da
movq 0x20(%rdi), %rsi
movq %rsi, 0x18(%rdi)
movl $0x1f31d, %r8d          # imm = 0x1F31D
movq %rcx, %rax
cqto
idivq %r8
imulq $-0x1f31d, %rax, %rdx   # imm = 0xFFFE0CE3
addq %rcx, %rdx
imulq $0x41a7, %rdx, %rcx     # imm = 0x41A7
imulq $-0xb14, %rax, %rax     # imm = 0xF4EC
leaq (%rcx,%rax), %r8
addq $0x7fffffff, %r8        # imm = 0x7FFFFFFF
addq %rax, %rcx
cmovnsq %rcx, %r8
movq %r8, 0x8(%rdi)
movl $0x4000000, %ecx        # imm = 0x4000000
movq %rsi, %rax
cqto
idivq %rcx
cltq
movq 0x20(%rdi,%rax,8), %rcx
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi,%rax,8)
cvtsi2sdq 0x18(%rdi), %xmm0
mulsd 0xcf1(%rip), %xmm0      # 0x3180
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm1
ucomisd 0xce9(%rip), %xmm1      # 0x3188
jbe 0x24a9
movss 0xd17(%rip), %xmm0      # 0x31c0
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: ran2
long ran2(prng_type * prng) {

  // A Random Number Generator that picks a uniform random number
  // from the range of long integers.
  // From Numerical Recipes, page 280
  // Should be called with a NEGATIVE value of idum to initialize
  // subsequent calls should not alter idum
  // This is a hacked version of the above procedure, so proceed with
  // caution.

  int j;
  long k;

  if (prng->intidum <= 0 || !prng->iy) {
    if (-(prng->intidum) < 1) prng->intidum=1;
    else prng->intidum = -(prng->intidum);
    for (j=NTAB+7;j>=0;j--) {
      k=(prng->intidum)/IQ;
      prng->intidum=IA*(prng->intidum-k*IQ)-IR*k;
      if (prng->intidum < 0) prng->intidum+=IM;
      if (j<NTAB) prng->iv[j]=prng->intidum;
    }
    prng->iy=prng->iv[0];
  }
  k = (prng->intidum)/IQ;
  prng->intidum=IA*(prng->intidum-k*IQ)-IR*k;
  if (prng->intidum<0) prng->intidum += IM;
  j = prng->iy/NDIV;
  prng->iy=prng->iv[j];
  prng->iv[j]=prng->intidum;
  return prng->iy;
}

// Assembly:
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
jle 0x24bc
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
jne 0x2523
movq %rcx, %rax
negq %rax
testq %rcx, %rcx
pushq $0x1
popq %rcx
cmovsq %rax, %rcx
pushq $0x27
popq %rsi
movl $0x1f31d, %r8d          # imm = 0x1F31D
testl %esi, %esi
js 0x251b
movq %rcx, %rax
cqto
idivq %r8
imulq $-0x1f31d, %rax, %rdx   # imm = 0xFFFE0CE3
addq %rcx, %rdx
imulq $0x41a7, %rdx, %rdx     # imm = 0x41A7
imulq $-0xb14, %rax, %rax     # imm = 0xF4EC
leaq (%rdx,%rax), %rcx
addq $0x7fffffff, %rcx       # imm = 0x7FFFFFFF
addq %rax, %rdx
cmovnsq %rdx, %rcx
cmpl $0x1f, %esi
ja 0x2517
movl %esi, %eax
movq %rcx, 0x20(%rdi,%rax,8)
decl %esi
jmp 0x24d5
movq 0x20(%rdi), %rsi
movq %rsi, 0x18(%rdi)
movl $0x1f31d, %r8d          # imm = 0x1F31D
movq %rcx, %rax
cqto
idivq %r8
imulq $-0x1f31d, %rax, %rdx   # imm = 0xFFFE0CE3
addq %rcx, %rdx
imulq $0x41a7, %rdx, %rcx     # imm = 0x41A7
imulq $-0xb14, %rax, %rax     # imm = 0xF4EC
leaq (%rcx,%rax), %r8
addq $0x7fffffff, %r8        # imm = 0x7FFFFFFF
addq %rax, %rcx
cmovnsq %rcx, %r8
movq %r8, 0x10(%rdi)
movl $0x4000000, %ecx        # imm = 0x4000000
movq %rsi, %rax
cqto
idivq %rcx
cltq
movq 0x20(%rdi,%rax,8), %rcx
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi,%rax,8)
movq 0x18(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: ran3
unsigned long ran3(prng_type * prng) {

  unsigned long x;

  /* generate next random number */

  x = prng->randbuffer[prng->r_p1] = rotl(prng->randbuffer[prng->r_p2], R1)
    +  rotl(prng->randbuffer[prng->r_p1], R2);
  /* rotate list pointers */
  if (--prng->r_p1 < 0) prng->r_p1 = KK - 1;
  if (--prng->r_p2 < 0) prng->r_p2 = KK - 1;
  /* conversion to float */
  return x;
}

// Assembly:
movq 0x1a8(%rdi), %rax
movq %rax, %xmm0
movq %rax, %rcx
sarq $0x20, %rcx
movq 0x120(%rdi,%rcx,8), %rcx
rolq $0x5, %rcx
movslq %eax, %rdx
movq 0x120(%rdi,%rdx,8), %rax
rolq $0x3, %rax
addq %rcx, %rax
pcmpeqd %xmm1, %xmm1
paddd %xmm0, %xmm1
pxor %xmm2, %xmm2
pcmpgtd %xmm2, %xmm0
pand %xmm0, %xmm1
pandn 0xbf8(%rip), %xmm0      # 0x31d0
movq %rax, 0x120(%rdi,%rdx,8)
por %xmm1, %xmm0
movq %xmm0, 0x1a8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: RanrotAInit
void RanrotAInit (prng_type * prng, unsigned long seed) {

  int i;

  /* put semi-random numbers into the buffer */
  for (i=0; i<KK; i++) {
    prng->randbuffer[i] = seed;
    seed = rotl(seed,5) + 97;}

  /* initialize pointers to circular buffer */
  prng->r_p1 = 0;  prng->r_p2 = JJ;

  /* randomize */
  for (i = 0;  i < 300;  i++) ran3(prng);
  prng->scale = ldexp(1.0f, -8.0f * sizeof(unsigned long));
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x24
popq %rax
cmpq $0x35, %rax
je 0x2642
movq %rsi, (%rbx,%rax,8)
rolq $0x5, %rsi
addq $0x61, %rsi
incq %rax
jmp 0x262b
movabsq $0xa00000000, %rax      # imm = 0xA00000000
movq %rax, 0x1a8(%rbx)
movl $0x12c, %ebp            # imm = 0x12C
subl $0x1, %ebp
jb 0x2667
movq %rbx, %rdi
callq 0x258b
jmp 0x2658
movsd 0x999(%rip), %xmm0      # 0x3008
pushq $-0x40
popq %rdi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_float
float prng_float(prng_type * prng) {

  // returns a pseudo-random float in the range [0.0,1.0].
  // Initialise the generator before use!
  float result=0;

  switch (prng->usenric)
    {
    case 1 : result=(ran1(prng)); break;
    case 2 : result=(ran4(prng)); break;
    case 3 : result=(drand48()); break;
    }
  return result;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
cmpl $0x3, %eax
je 0x26c9
cmpl $0x2, %eax
je 0x26c2
xorps %xmm0, %xmm0
cmpl $0x1, %eax
jne 0x26d2
popq %rax
jmp 0x23af
callq 0x25ed
jmp 0x26ce
callq 0x11f0
cvtsd2ss %xmm0, %xmm0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_Init
prng_type * prng_Init(long seed, int nric) {

  // Initialise the random number generators.  nric determines
  // which algorithm to use, 1 for Numerical Recipes in C,
  // 0 for the other one.
  prng_type * result;

  result=(prng_type *) calloc(1,sizeof(prng_type));

  result->iy=0;
  result->usenric=nric;
  result->floatidum=-1;
  result->intidum=-1;
  result->iset=0;
  // set a global variable to record which algorithm to use
  switch (nric)
    {
    case 2 :
      RanrotAInit(result,seed);
      break;
    case 1 :
      if (seed>0) {
	// to initialise the NRiC PRNGs, call it with a negative value
	// so make sure it gets a negative value!
	result->floatidum = -(seed);  result->intidum = -(seed);
      } else {
	result->floatidum=seed; result->intidum=seed;
      }
      break;
    case 3 :
      srand48(seed);
      break;
    }

  prng_float(result);
  prng_int(result);
  // call the routines to actually initialise them
  return(result);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x1
popq %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x1110
movq %rax, %rbx
movl %ebp, (%rax)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rax)
cmpl $0x1, %ebp
je 0x271e
cmpl $0x3, %ebp
je 0x2714
cmpl $0x2, %ebp
jne 0x272e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2622
jmp 0x272e
movq %r14, %rdi
callq 0x1170
jmp 0x272e
testq %r14, %r14
jle 0x2726
negq %r14
movq %r14, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq %rbx, %rdi
callq 0x26a7
movq %rbx, %rdi
callq 0x2687
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_normal
double prng_normal(prng_type * prng) {

  // Pick random values distributed N(0,1) using the Box-Muller transform
  // Taken from numerical recipes in C p289
  // picks two at a time, returns one per call (buffers the other)

  double fac,rsq,v1,v2;
  if (prng->iset == 0) {
    do {
      v1 = 2.0*prng_float(prng)-1.0;
      v2 = 2.0*prng_float(prng)-1.0;
      rsq=v1*v1+v2*v2;
    } while (rsq >= 1.0 || rsq == 0.0);

    fac = sqrt((double) -2.0*log((double)rsq)/rsq);
    prng->gset=v1*fac;
    prng->iset=1;
    return v2*fac;
  }
  else {
    prng->iset = 0;
    return prng->gset;
  }
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x1b0(%rdi)
je 0x279f
andl $0x0, 0x1b0(%rbx)
movsd 0x1b8(%rbx), %xmm1
jmp 0x285f
movq %rbx, %rdi
callq 0x26a7
cvtss2sd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd 0x899(%rip), %xmm0      # 0x3050
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
callq 0x26a7
cvtss2sd %xmm0, %xmm1
addsd %xmm1, %xmm1
addsd 0x877(%rip), %xmm1      # 0x3050
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
ucomisd 0x811(%rip), %xmm0      # 0x3008
jae 0x279f
ucomisd 0x81f(%rip), %xmm0      # 0x3020
jne 0x2805
jnp 0x279f
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x10d0
mulsd 0x972(%rip), %xmm0      # 0x3190
divsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2834
sqrtsd %xmm0, %xmm0
jmp 0x2839
callq 0x11c0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x1b8(%rbx)
movl $0x1, 0x1b0(%rbx)
movsd 0x18(%rsp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_stabledbn
double prng_stabledbn(prng_type * prng, double alpha) {

  // From 'stable distributions', John Nolan, manuscript, p24
  // we set beta = 0 by analogy with the normal and cauchy case
  // identical to the above routine, but returns a double instead
  // of a long double (you'll see this a lot...)

  double theta, W, holder, left, right;

  theta=PI*(prng_float(prng) - 0.5);
  W = -log(prng_float(prng)); // takes natural log

  //  printf("theta %Lf, W = %Lf \n", theta, W);

  // some notes on Nolan's notes:
  // if beta == 0 then c(alpha,beta)=1; theta_0 = 0
  // expression reduces to sin alpha.theta / (cos theta) ^1/alpha
  //  * (cos (theta - alpha theta)/W) ^(1-alpha)/alpha
  left = (sin(alpha*theta)/pow(cos(theta), 1.0/alpha));
  right= pow(cos(theta*(1.0 - alpha))/W, ((1.0-alpha)/alpha));
  holder=left*right;
  return(holder);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0x26a7
cvtss2sd %xmm0, %xmm0
addsd 0x911(%rip), %xmm0      # 0x3198
mulsd 0x911(%rip), %xmm0      # 0x31a0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x26a7
cvtss2sd %xmm0, %xmm0
callq 0x10d0
xorps 0x933(%rip), %xmm0      # 0x31e0
movaps %xmm0, 0x20(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd (%rsp), %xmm0
callq 0x1190
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x10e0
movsd 0x72d(%rip), %xmm1      # 0x3008
divsd (%rsp), %xmm1
callq 0x1090
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x70b(%rip), %xmm1      # 0x3008
subsd (%rsp), %xmm1
movsd %xmm1, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
callq 0x10e0
divsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
divsd (%rsp), %xmm1
callq 0x1090
mulsd 0x8(%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_altstab
double prng_altstab(prng_type * prng, double p)
{
  double u,v,result;

  u=prng_float(prng);
  v=prng_float(prng);
  result=pow(u,p);
  // result=exp(p*log(u));
  if (v<0.5) result=-result;
  return(result);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
callq 0x26a7
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x26a7
movss %xmm0, 0xc(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x1090
movss 0x81e(%rip), %xmm1      # 0x31c4
ucomiss 0xc(%rsp), %xmm1
jbe 0x29b4
xorps 0x82c(%rip), %xmm0      # 0x31e0
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ranbenbasat[P]RHHH/prng.c
// Function: prng_stable
double prng_stable(prng_type * prng, double alpha) {

  // wrapper for the stable distributions above:
  // call the appropriate routine based on the value of alpha given
  // initialising it with the seed in idum

  // randinit must be called before entering this procedure for
  // the first time since it uses the random generators


  if (alpha==2.0)
    return(prng_normal(prng));
  else if (alpha==1.0)
    return(prng_cauchy(prng));
  else if (alpha<0.01)
    return(prng_altstab(prng,-50.0));
  else return (prng_stabledbn(prng,alpha));
}

// Assembly:
ucomisd 0x7e6(%rip), %xmm0      # 0x31a8
jne 0x29cb
jp 0x29cb
jmp 0x277a
ucomisd 0x635(%rip), %xmm0      # 0x3008
jne 0x29e7
jp 0x29e7
pushq %rax
callq 0x2939
fstpl (%rsp)
movsd (%rsp), %xmm0
popq %rax
retq
movsd 0x7c1(%rip), %xmm1      # 0x31b0
ucomisd %xmm0, %xmm1
jbe 0x2a02
movsd 0x7bb(%rip), %xmm0      # 0x31b8
jmp 0x2962
jmp 0x2869