LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/phase[P]o/libregexp/rregexec.c
// Function: rregexec9
extern int
rregexec(Reprog *progp,	/* program to run */
	Rune *bol,	/* string to run machine on */
	Resub *mp,	/* subexpression elements */
	int ms)		/* number of elements at mp */
{
	Reljunk j;
	Relist relist0[LISTSIZE], relist1[LISTSIZE];
	int rv;

	/*
 	 *  use user-specified starting/ending location if specified
	 */
	j.rstarts = bol;
	j.reol = 0;
	if(mp && ms>0){
		if(mp->s.sp)
			j.rstarts = mp->s.rsp;
		if(mp->e.ep)
			j.reol = mp->e.rep;
	}
	j.starttype = 0;
	j.startchar = 0;
	if(progp->startinst->type == RUNE && progp->startinst->r.r < Runeself) {
		j.starttype = RUNE;
		j.startchar = progp->startinst->r.r;
	}
	if(progp->startinst->type == BOL)
		j.starttype = BOL;

	/* mark space */
	j.relist[0] = relist0;
	j.relist[1] = relist1;
	j.reliste[0] = relist0 + nelem(relist0) - 2;
	j.reliste[1] = relist1 + nelem(relist1) - 2;

	rv = rregexec1(progp, bol, mp, ms, &j);
	if(rv >= 0)
		return rv;
	rv = rregexec2(progp, bol, mp, ms, &j);
	if(rv >= 0)
		return rv;
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf410, %rsp           # imm = 0xF410
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
testq %rdx, %rdx
sete %al
testl %ecx, %ecx
setle %cl
orb %al, %cl
jne 0x8725
movq (%r14), %rax
testq %rax, %rax
je 0x8718
movq %rax, -0x30(%rbp)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x8725
movq %rax, -0x28(%rbp)
movq $0x0, -0x48(%rbp)
movq (%r12), %rax
movl (%rax), %ecx
cmpl $0xc3, %ecx
je 0x8754
cmpl $0x7f, %ecx
jne 0x875b
movl 0x8(%rax), %eax
cmpl $0x7f, %eax
ja 0x875b
movl $0x7f, -0x48(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x875b
movl $0xc3, -0x48(%rbp)
leaq -0x2910(%rbp), %rax
leaq -0x68(%rbp), %r8
movq %rax, (%r8)
leaq -0x14c0(%rbp), %rcx
movq %rcx, 0x8(%r8)
movl $0x1040, %edx           # imm = 0x1040
addq %rdx, %rax
movq %rax, 0x10(%r8)
addq %rdx, %rcx
movq %rcx, 0x18(%r8)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x87e7
testl %eax, %eax
jns 0x87d7
leaq -0xf430(%rbp), %rax
leaq -0x68(%rbp), %r8
movq %rax, (%r8)
leaq -0x8ea0(%rbp), %rcx
movq %rcx, 0x8(%r8)
movl $0x6180, %edx           # imm = 0x6180
addq %rdx, %rax
movq %rax, 0x10(%r8)
addq %rdx, %rcx
movq %rcx, 0x18(%r8)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
callq 0x87e7
addq $0xf410, %rsp           # imm = 0xF410
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/phase[P]o/libregexp/rregsub.c
// Function: rregsub9
extern	void
rregsub(Rune *sp,	/* source string */
	Rune *dp,	/* destination string */
	int dlen,
	Resub *mp,	/* subexpression elements */
	int ms)		/* number of elements pointed to by mp */
{
	Rune *ssp, *ep;
	int i;

	ep = dp+(dlen/sizeof(Rune))-1;
	while(*sp != '\0'){
		if(*sp == '\\'){
			switch(*++sp){
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
				i = *sp-'0';
				if(mp!=0 && mp[i].s.rsp != 0 && ms>i)
					for(ssp = mp[i].s.rsp;
					     ssp < mp[i].e.rep;
					     ssp++)
						if(dp < ep)
							*dp++ = *ssp;
				break;
			case '\\':
				if(dp < ep)
					*dp++ = '\\';
				break;
			case '\0':
				sp--;
				break;
			default:
				if(dp < ep)
					*dp++ = *sp;
				break;
			}
		}else if(*sp == '&'){
			if(mp!=0 && mp[0].s.rsp != 0 && ms>0)
				for(ssp = mp[0].s.rsp;
				     ssp < mp[0].e.rep; ssp++)
					if(dp < ep)
						*dp++ = *ssp;
		}else{
			if(dp < ep)
				*dp++ = *sp;
		}
		sp++;
	}
	*dp = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edx, %rax
andq $-0x4, %rax
addq %rsi, %rax
addq $-0x4, %rax
movl (%rdi), %r9d
cmpl $0x26, %r9d
je 0x8b7c
cmpl $0x5c, %r9d
je 0x8b1a
testl %r9d, %r9d
je 0x8bdf
movq %rdi, %rdx
cmpq %rax, %rsi
jae 0x8bd6
movl %r9d, (%rsi)
addq $0x4, %rsi
jmp 0x8bd3
leaq 0x4(%rdi), %rdx
movl 0x4(%rdi), %r9d
leal -0x30(%r9), %r10d
cmpl $0xa, %r10d
jae 0x8bb9
testq %rcx, %rcx
je 0x8bd3
movq %r10, %rdi
shlq $0x4, %rdi
movq (%rcx,%rdi), %r9
testq %r9, %r9
sete %r11b
cmpl %r8d, %r10d
setge %r10b
orb %r11b, %r10b
jne 0x8bd3
addq %rcx, %rdi
movq 0x8(%rdi), %r10
cmpq %r10, %r9
jae 0x8bd3
cmpq %rax, %rsi
jae 0x8b76
movl (%r9), %r10d
movl %r10d, (%rsi)
addq $0x4, %rsi
movq 0x8(%rdi), %r10
addq $0x4, %r9
jmp 0x8b5e
testq %rcx, %rcx
je 0x8bd6
testl %r8d, %r8d
setle %r9b
movq (%rcx), %rdx
testq %rdx, %rdx
sete %r10b
orb %r9b, %r10b
jne 0x8bd6
movq 0x8(%rcx), %r9
cmpq %r9, %rdx
jae 0x8bd6
cmpq %rax, %rsi
jae 0x8bb3
movl (%rdx), %r9d
movl %r9d, (%rsi)
addq $0x4, %rsi
movq 0x8(%rcx), %r9
addq $0x4, %rdx
jmp 0x8b9b
testl %r9d, %r9d
je 0x8bd6
cmpl $0x5c, %r9d
jne 0x8bca
movl $0x5c, %r9d
cmpq %rax, %rsi
jb 0x8b0e
movq %rdx, %rdi
addq $0x4, %rdi
jmp 0x8ae6
movl $0x0, (%rsi)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/phase[P]o/libregexp/utf.c
// Function: runestrchr
Rune*
runestrchr(Rune *s, Rune c)
{
	Rune c0 = c;
	Rune c1;

	if(c == 0) {
		while(*s++)
			;
		return s-1;
	}

	while((c1 = *s++))
		if(c1 == c0)
			return s-1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
addq $-0x4, %rax
testl %esi, %esi
je 0x8cca
movl 0x4(%rax), %ecx
testl %ecx, %ecx
je 0x8cdc
addq $0x4, %rax
cmpl %esi, %ecx
jne 0x8cb9
jmp 0x8cde
movq %rax, %rcx
leaq 0x4(%rcx), %rax
cmpl $0x0, 0x4(%rcx)
movq %rax, %rcx
jne 0x8ccd
jmp 0x8cde
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/phase[P]o/libregexp/utf.c
// Function: utfrune
char*
utfrune(char *s, Rune c)
{
	Rune c1;
	Rune r;
	int n;

	if(c < Runesync)		/* not part of utf sequence */
		return strchr(s, c);

	for(;;) {
		c1 = *(unsigned char*)s;
		if(c1 < Runeself) {	/* one byte rune */
			if(c1 == 0)
				return 0;
			if(c1 == c)
				return s;
			s++;
			continue;
		}
		n = chartorune(&r, s);
		if(r == c)
			return s;
		s += n;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x80, %esi
jae 0x8d0d
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
leaq -0x1c(%rbp), %r15
movzbl (%rbx), %ecx
testb %cl, %cl
js 0x8d28
testl %ecx, %ecx
je 0x8d40
movl $0x1, %eax
cmpl %r14d, %ecx
jne 0x8d3b
jmp 0x8d42
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8be8
cmpl %r14d, -0x1c(%rbp)
je 0x8d42
movl %eax, %eax
addq %rax, %rbx
jmp 0x8d11
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/tests/kvlds-blocking/main.c
// Function: main
int
main(int argc, char * argv[])
{
	struct wire_requestqueue * Q;
	struct kivaloo_cookie * K;

	WARNP_INIT;

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

	/* Open a connection to KVLDS. */
	if ((K = kivaloo_open(argv[1], &Q)) == NULL) {
		warnp("Could not connect o KVLDS daemon.");
		exit(1);
	}

	/* Test the blocking API. */
	if (set_get_blocking(Q))
		exit(1);

	/* Free the request queue and network connection. */
	kivaloo_close(K);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x254a
callq 0x2668
cmpl $0x2, %ebp
jne 0x257e
movq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0x2a68
testq %rax, %rax
jne 0x25a7
callq 0x2090
cmpl $0x0, (%rax)
jne 0x264a
leaq 0x8ab2(%rip), %rdi      # 0xb027
xorl %eax, %eax
callq 0x2807
jmp 0x259d
movq 0xea73(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8a75(%rip), %rsi      # 0xb004
leaq 0x8a84(%rip), %rdx      # 0xb01a
xorl %eax, %eax
callq 0x21b0
movl $0x1, %edi
callq 0x2290
movq %rax, %rbx
movq (%rsp), %r12
leaq 0x9733(%rip), %rdi      # 0xbce8
movl $0x3, %esi
callq 0x292c
movq %rax, %r14
leaq 0x8a80(%rip), %rdi      # 0xb049
movl $0x3, %esi
callq 0x292c
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2e52
testl %eax, %eax
jne 0x259d
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x2ef3
testl %eax, %eax
jne 0x259d
movzbl (%r15), %edx
movq 0x8(%rsp), %r12
cmpb (%r12), %dl
jne 0x259d
leaq 0x1(%r12), %rdi
movq %r15, %rsi
incq %rsi
callq 0x2220
testl %eax, %eax
jne 0x259d
movq %r14, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
movq %r12, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2bb1
xorl %edi, %edi
callq 0x2290
movq %rax, %rbx
leaq 0x89d3(%rip), %rdi      # 0xb027
xorl %eax, %eax
callq 0x26e8
movl $0x0, (%rbx)
jmp 0x259d
nop
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/testrender.c
// Function: main
int main(int argc, char* argv[])
{
	struct aatrace_text txt;
	struct aatrace_font font;
	struct aatrace_pic out;

	if (argc < 4)
		return 1;

	if (util_load_text(&txt, argv[1]) < 0)
		return 2;

	if (util_load_font(&font, argv[2]) < 0)
		return 3;

	aatrace_render_pic(&out, &txt, &font);

	if (util_store_pic(argv[3], &out) < 0)
		return 4;

	return 0;
}

// Assembly:
movl $0x1, %eax
cmpl $0x4, %edi
jl 0x13be
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
movq %rsp, %rdi
callq 0x17c4
testl %eax, %eax
js 0x13ab
movq 0x10(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x1a74
testl %eax, %eax
js 0x13b2
leaq 0x40(%rsp), %r14
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x1ae8
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x19eb
shrl $0x1d, %eax
andl $-0x4, %eax
jmp 0x13b7
movl $0x2, %eax
jmp 0x13b7
movl $0x3, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/pnm.c
// Function: pnm_filename_open
pnm_file pnm_filename_open(const char* fname, pnm_type_t* ptype, int* pwidth, int* pheight)
{
	FILE* f;
	pnm_file pnm;

	f = fopen(fname, "rb");
	if (!f)
		return 0;

	pnm = pnm_file_open(f, ptype, pwidth, pheight);
	if (!pnm) {
		fclose(f);
		return 0;
	}

	return pnm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0xc2c(%rip), %rsi       # 0x2004
callq 0x10f0
testq %rax, %rax
je 0x1403
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1411
testq %rax, %rax
jne 0x1405
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/pnm.c
// Function: pnm_file_open
pnm_file pnm_file_open(FILE* f, pnm_type_t* ptype, int* pwidth, int* pheight)
{
	char magic, typec;
	int depth;
	int i;
	pnm_file s;

	if (fscanf(f, "%c%c\n", &magic, &typec) != 2)
		return 0;

	if (magic != 'P' || (typec != '5' && typec != '6'))
		return 0;

	*ptype = (pnm_type_t)(typec - '0');

	/* comments */
	for (i = 0; i < 16; i++)
		if (!fscanf(f, "#%*[^\n]\n"))
			break;

	if (fscanf(f, "%d %d\n", pwidth, pheight) != 2)
		return 0;

	/* scanf("%d\n") matches ANY AMOUNT of whitespace after the number. */
	if (fscanf(f, "%d", &depth) != 1)
		return 0;
	if (fgetc(f) != '\n')
		return 0;

	if (depth != 255)
		return 0;

	s = (pnm_file)malloc(sizeof(*s));
	s->file = f;
	s->type = *ptype;
	s->width = *pwidth;
	s->height = *pheight;
	s->stride = ((s->type == 6) ? 3 : 1) * s->width;

	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0xbd8(%rip), %rsi       # 0x2007
xorl %r13d, %r13d
leaq 0x3(%rsp), %rdx
leaq 0x2(%rsp), %rcx
xorl %eax, %eax
callq 0x1050
cmpl $0x2, %eax
jne 0x152a
cmpb $0x50, 0x3(%rsp)
jne 0x152a
movzbl 0x2(%rsp), %eax
leal -0x37(%rax), %ecx
cmpb $-0x2, %cl
jae 0x146c
xorl %r13d, %r13d
jmp 0x152a
addl $-0x30, %eax
movl %eax, (%r15)
movl $0xf, %ebp
leaq 0xb8f(%rip), %r13       # 0x200d
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1050
subl $0x1, %ebp
setb %cl
testl %eax, %eax
je 0x1499
testb %cl, %cl
je 0x147e
leaq 0xb76(%rip), %rsi       # 0x2016
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1050
cmpl $0x2, %eax
jne 0x152a
leaq 0xb5e(%rip), %rsi       # 0x201d
xorl %r13d, %r13d
leaq 0x4(%rsp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x1050
cmpl $0x1, %eax
jne 0x152a
movq %r12, %rdi
callq 0x1090
xorl %r13d, %r13d
cmpl $0xa, %eax
jne 0x152a
cmpl $0xff, 0x4(%rsp)
jne 0x152a
movl $0x18, %edi
callq 0x10d0
movq %rax, %r13
movq %r12, (%rax)
movl (%r15), %eax
movl %eax, 0x8(%r13)
movl (%r14), %ecx
movl %ecx, 0xc(%r13)
movl (%rbx), %edx
movl %edx, 0x10(%r13)
xorl %edx, %edx
cmpl $0x6, %eax
sete %dl
leal 0x1(,%rdx,2), %eax
imull %ecx, %eax
movl %eax, 0x14(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/pnm.c
// Function: pnm_file_read_pic
int pnm_file_read_pic(pnm_file s, pnm_pix_t* picbuf)
{
	int l;

	for (l = 0; l < s->height; l++)
		if (pnm_file_read_line(s, picbuf + l*s->stride) < 0)
			return -1;

	return 0;
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
jle 0x15bd
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x14(%rdi), %ecx
xorl %ebp, %ebp
movslq %ecx, %rsi
imull %ebp, %ecx
movslq %ecx, %rdi
addq %rbx, %rdi
movq (%r14), %rcx
movl $0x1, %edx
callq 0x1060
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x1, %rcx
jne 0x15b8
movl 0x14(%r14), %ecx
testl %ecx, %ecx
js 0x15b8
incl %ebp
cmpl 0x10(%r14), %ebp
jl 0x157f
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/pnm.c
// Function: pnm_filename_create
pnm_file pnm_filename_create(const char* fname, pnm_type_t type, int width, int height)
{
	FILE* f;
	pnm_file pnm;

	f = fopen(fname, "wb");
	if (!f)
		return 0;

	pnm = pnm_file_create(f, type, width, height);
	if (!pnm) {
		fclose(f);
		return 0;
	}

	return pnm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
leaq 0xa4a(%rip), %rsi       # 0x2020
callq 0x10f0
testq %rax, %rax
je 0x1600
movq %rax, %rbx
movq %rax, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x160d
testq %rax, %rax
jne 0x1602
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/pnm.c
// Function: pnm_file_write_pic
int pnm_file_write_pic(pnm_file s, const pnm_pix_t* picbuf)
{
	int l;

	for (l = 0; l < s->height; l++)
		if (pnm_file_write_line(s, picbuf + l*s->stride) < 0)
			return -1;

	return 0;
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
jle 0x16f7
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x14(%rdi), %ecx
xorl %ebp, %ebp
movslq %ecx, %rsi
imull %ebp, %ecx
movslq %ecx, %rdi
addq %rbx, %rdi
movq (%r14), %rcx
movl $0x1, %edx
callq 0x1100
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x1, %rcx
jne 0x16f2
movl 0x14(%r14), %ecx
testl %ecx, %ecx
js 0x16f2
incl %ebp
cmpl 0x10(%r14), %ebp
jl 0x16b9
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_read_text
int util_read_text(struct aatrace_text* txt, FILE* f)
{
	size_t sz = 0x1000;
	txt->buf = (char*)malloc(sz);
	unsigned int l;

	if (!fgets(txt->buf, sz, f))
		return -1;

	txt->ll = txt->w = strlen(txt->buf) - 1;

	for (l = 1; ; l++) {
		if ((l + 1)*txt->ll + 1 > sz) {
			sz *= 2;
			txt->buf = (char*)realloc(txt->buf, sz);
		}

		if (!fgets(&txt->buf[l*txt->ll], sz - l*txt->ll, f))
			break;
	}

	txt->h = l;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1000, %r15d          # imm = 0x1000
movl $0x1000, %edi           # imm = 0x1000
callq 0x10d0
movq %rax, (%rbx)
movq %rax, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x10a0
testq %rax, %rax
je 0x17b3
movq (%rbx), %rdi
callq 0x1080
decl %eax
movl %eax, 0xc(%rbx)
movl %eax, 0x8(%rbx)
xorl %r12d, %r12d
leal 0x2(%r12), %edx
movl 0x8(%rbx), %ecx
imull %ecx, %edx
incl %edx
movq (%rbx), %rax
cmpq %rdx, %r15
jae 0x178e
addq %r15, %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x10e0
movq %rax, (%rbx)
movl 0x8(%rbx), %ecx
incl %r12d
imull %r12d, %ecx
leaq (%rcx,%rax), %rdi
movl %r15d, %esi
subl %ecx, %esi
movq %r14, %rdx
callq 0x10a0
testq %rax, %rax
jne 0x1765
movl %r12d, 0x10(%rbx)
xorl %eax, %eax
jmp 0x17b8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_load_text
int util_load_text(struct aatrace_text* txt, const char* fname)
{
	FILE* f = stdin;

	if (strcmp(fname, "-")) {
		f = fopen(fname, "rb");
		if (!f) {
			fprintf(stderr, "Error opening TXT file '%s': %s\n",
				fname, strerror(errno));

			return -1;
		}
	}

	if (util_read_text(txt, f) < 0) {
		fprintf(stderr, "Error reading TXT file '%s': %s\n",
			fname, strerror(errno));

		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x2d, (%rsi)
jne 0x17d9
cmpb $0x0, 0x1(%rbx)
je 0x1808
leaq 0x824(%rip), %rsi       # 0x2004
movq %rbx, %rdi
callq 0x10f0
movq %rax, %rsi
testq %rax, %rax
je 0x181d
movq %r14, %rdi
callq 0x171c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x1814
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x27c9(%rip), %rax      # 0x3fd8
movq (%rax), %rsi
jmp 0x17f0
leaq 0x838(%rip), %rdi       # 0x2053
jmp 0x1824
leaq 0x80e(%rip), %rdi       # 0x2032
movq %rbx, %rsi
callq 0x1130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1800
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_write_text
int util_write_text(FILE* f, const struct aatrace_text* txt)
{
	int l;

	for (l = 0; l < txt->h; l++) {
		if (fwrite(&txt->buf[l*txt->ll], txt->w, 1, f) != 1)
			return -1;

		putc('\n', f);
	}

	return (txt->w + 1)*txt->h;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl 0x10(%rsi), %ecx
testl %ecx, %ecx
jle 0x187c
movq %rdi, %r14
xorl %ebp, %ebp
movl 0x8(%rbx), %edi
imull %ebp, %edi
addq (%rbx), %rdi
movslq 0xc(%rbx), %rsi
movl $0x1, %edx
movq %r14, %rcx
callq 0x1100
cmpq $0x1, %rax
jne 0x1886
movl $0xa, %edi
movq %r14, %rsi
callq 0x10b0
incl %ebp
movl 0x10(%rbx), %ecx
cmpl %ecx, %ebp
jl 0x1846
movl 0xc(%rbx), %eax
incl %eax
imull %ecx, %eax
jmp 0x188b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_store_text
int util_store_text(const char* fname, const struct aatrace_text* txt)
{
	FILE* f = stdout;

	if (strcmp(fname, "-")) {
		f = fopen(fname, "wb");
		if (!f) {
			fprintf(stderr, "Error creating TXT file '%s': %s\n",
				fname, strerror(errno));

			return -1;
		}
	}

	if (util_write_text(f, txt) < 0) {
		fprintf(stderr, "Error writing TXT file '%s': %s\n",
			fname, strerror(errno));
		return -1;
	}

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x2d, (%rdi)
jne 0x18a5
cmpb $0x0, 0x1(%rbx)
je 0x18d4
leaq 0x774(%rip), %rsi       # 0x2020
movq %rbx, %rdi
callq 0x10f0
movq %rax, %rdi
testq %rax, %rax
je 0x18e9
movq %r14, %rsi
callq 0x1833
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x18e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x26f5(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
jmp 0x18bc
leaq 0x7af(%rip), %rdi       # 0x2096
jmp 0x18f0
leaq 0x784(%rip), %rdi       # 0x2074
movq %rbx, %rsi
callq 0x1169
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x18cc
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_load_pic
int util_load_pic(struct aatrace_pic* pic, const char* fname)
{
	pnm_file pnm;
	pnm_type_t type;

	if (strcmp(fname, "-")) {
		pnm = pnm_filename_open(fname, &type, &pic->w, &pic->h);
	} else {
		pnm = pnm_file_open(stdin, &type, &pic->w, &pic->h);
	}

	if (!pnm || type != PNM_TYPE_PGM) {
		if (errno) {
			fprintf(stderr, "Error opening PGM file '%s': %s\n",
				fname, strerror(errno));
		} else {
			fprintf(stderr, "Bad PGM file '%s'\n", fname);
		}
		return -1;
	}

	pic->ll = pic->w;
	pic->buf = (unsigned char*)malloc(pic->ll*pic->h);

	if (pnm_file_read_pic(pnm, pic->buf) < 0) {
		fprintf(stderr, "Error reading PGM file '%s': %s\n",
			fname, strerror(errno));
		return -1;
	}

	pnm_file_close(pnm);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x2d, (%rsi)
jne 0x1919
cmpb $0x0, 0x1(%rbx)
je 0x1975
leaq 0xc(%r14), %rdx
leaq 0x10(%r14), %rcx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x13c0
movq %rax, %r15
testq %rax, %rax
je 0x1993
cmpl $0x5, 0xc(%rsp)
jne 0x1993
movl 0xc(%r14), %edi
movl %edi, 0x8(%r14)
imull 0x10(%r14), %edi
callq 0x10d0
movq %rax, (%r14)
movq %r15, %rdi
movq %rax, %rsi
callq 0x156a
testl %eax, %eax
js 0x19be
movq %r15, %rdi
callq 0x1704
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x265c(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
leaq 0xc(%r14), %rdx
leaq 0x10(%r14), %rcx
leaq 0xc(%rsp), %rsi
callq 0x1411
jmp 0x192e
callq 0x1040
movl (%rax), %edi
movq 0x2657(%rip), %rax      # 0x3ff8
movq (%rax), %r14
testl %edi, %edi
jne 0x19c8
leaq 0x729(%rip), %rsi       # 0x20d8
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x19e4
movq %rbx, %rdi
callq 0x11a2
jmp 0x19e4
callq 0x1110
leaq 0x6e3(%rip), %rsi       # 0x20b7
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x10c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x196b
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_store_pic
int util_store_pic(const char* fname, const struct aatrace_pic* pic)
{
	pnm_file pnm;

	if (strcmp(fname, "-")) {
		pnm = pnm_filename_create(fname, PNM_TYPE_PGM, pic->w, pic->h);
	} else {
		pnm = pnm_file_create(stdout, PNM_TYPE_PGM, pic->w, pic->h);
	}

	if (!pnm) {
		fprintf(stderr, "Error creating PGM file '%s': %s\n",
			fname, strerror(errno));
		return -1;
	}

	if (pnm_file_write_pic(pnm, pic->buf) < 0) {
		fprintf(stderr, "Error writing PGM file '%s': %s\n",
			fname, strerror(errno));

		return -1;
	}

	pnm_file_close(pnm);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x2d, (%rdi)
jne 0x1a01
cmpb $0x0, 0x1(%rbx)
je 0x1a3d
movl 0xc(%r14), %edx
movl 0x10(%r14), %ecx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x15c0
movq %rax, %r15
testq %rax, %rax
je 0x1a5b
movq (%r14), %rsi
movq %r15, %rdi
callq 0x16a4
testl %eax, %eax
js 0x1a65
movq %r15, %rdi
callq 0x1704
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x258c(%rip), %rax      # 0x3fd0
movq (%rax), %rdi
movl 0xc(%r14), %edx
movl 0x10(%r14), %ecx
movl $0x5, %esi
callq 0x160d
jmp 0x1a16
movq %rbx, %rdi
callq 0x1219
jmp 0x1a6d
movq %rbx, %rdi
callq 0x11de
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1a37
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/util.c
// Function: util_load_font
int util_load_font(struct aatrace_font* font, const char* fname)
{
	if (util_load_pic(&font->pic, fname) < 0)
		return -1;

	if (font->pic.w != AATRACE_FONT_WIDTH) {
		fprintf(stderr, "Font '%s' has unsupported width %d\n",
			fname, font->pic.w);
		return -1;
	}

	font->w = AATRACE_FONT_WIDTH;
	font->h = AATRACE_FONT_HEIGHT;
	font->nchars = font->pic.h/AATRACE_FONT_HEIGHT;
	font->ascii_offset = AATRACE_FONT_ASCII_OFFSET;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x18ff
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x1ac1
movl 0xc(%r14), %ecx
cmpl $0x8, %ecx
jne 0x1ac9
movabsq $0x1000000008, %rax     # imm = 0x1000000008
movq %rax, 0x18(%r14)
movl 0x10(%r14), %eax
leal 0xf(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x4, %ecx
movl %ecx, 0x20(%r14)
movl $0x20, 0x24(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x2528(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0x675(%rip), %rsi       # 0x214f
movq %r15, %rdx
xorl %eax, %eax
callq 0x10c0
jmp 0x1ac1
nop
// File: /workspace/github_c_makefile_star2_O3/ravenexp[P]aatrace/render.c
// Function: aatrace_render_pic
void aatrace_render_pic(struct aatrace_pic* out,
			const struct aatrace_text* txt,
			const struct aatrace_font* font)
{
	int tl, tc;

	out->ll = out->w = txt->w*font->w;
	out->h = txt->h*font->h;
	out->buf = (unsigned char*)malloc(out->ll*out->h);

	for (tl = 0; tl < txt->h; tl++)
		for (tc = 0; tc < txt->w; tc++) {
			int tile = txt->buf[tl*txt->ll + tc] - font->ascii_offset;

			aatrace_bitblt(out->buf, font->pic.buf,
				       out->ll, font->pic.ll,
				       tc*font->w, tl*font->h,
				       0, tile*font->h,
				       font->w, font->h);
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0xc(%rsi), %ebp
movl 0x18(%rdx), %eax
imull %ebp, %eax
movl %eax, 0xc(%rdi)
movl %eax, 0x8(%rdi)
movl 0x10(%rsi), %r12d
movl 0x1c(%rdx), %edi
imull %r12d, %edi
movl %edi, 0x10(%r15)
imull %eax, %edi
callq 0x10d0
movq %r15, 0x20(%rsp)
movq %rax, (%r15)
testl %r12d, %r12d
jle 0x1c10
movl $0x0, 0xc(%rsp)
movq %rbx, 0x18(%rsp)
movq %r14, 0x10(%rsp)
testl %ebp, %ebp
jle 0x1bfd
xorl %ecx, %ecx
movl 0x1c(%rbx), %edx
testl %edx, %edx
jle 0x1bef
movq (%r14), %rax
movl 0x8(%r14), %esi
movl 0xc(%rsp), %r11d
imull %r11d, %esi
addl %ecx, %esi
movsbl (%rax,%rsi), %r10d
subl 0x24(%rbx), %r10d
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq (%rbx), %rdi
movl 0x8(%rax), %r8d
movl 0x8(%rbx), %r9d
movl 0x18(%rbx), %eax
imull %edx, %r11d
imull %r8d, %r11d
movl %eax, %r15d
imull %ecx, %r15d
addl %r11d, %r15d
movl %edx, %ebp
imull %r9d, %ebp
imull %r10d, %ebp
xorl %r12d, %r12d
testl %eax, %eax
jle 0x1bd3
movl %ebp, %r13d
movl %r15d, %r11d
movq %rax, %r10
movl %r13d, %r14d
movb (%rdi,%r14), %r14b
movl %r11d, %ebx
movb %r14b, (%rsi,%rbx)
incl %r11d
incl %r13d
decq %r10
jne 0x1bba
incl %r12d
addl %r8d, %r15d
addl %r9d, %ebp
cmpl %edx, %r12d
jne 0x1bad
movq 0x10(%rsp), %r14
movl 0xc(%r14), %ebp
movq 0x18(%rsp), %rbx
incl %ecx
cmpl %ebp, %ecx
jl 0x1b52
movl 0x10(%r14), %r12d
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %r12d, %eax
jl 0x1b48
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/vincenthsu[P]nweb/nweb23.c
// Function: logger
void logger(int type, char *s1, char *s2, int socket_fd)
{
	int fd ;
	char logbuffer[BUFSIZE*2];

	switch (type) {
	case ERROR: (void)sprintf(logbuffer,"ERROR: %s:%s Errno=%d exiting pid=%d",s1, s2, errno,getpid()); 
		break;
	case FORBIDDEN: 
		(void)write(socket_fd, "HTTP/1.1 403 Forbidden\nContent-Length: 185\nConnection: close\nContent-Type: text/html\n\n<html><head>\n<title>403 Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\nThe requested URL, file type or operation is not allowed on this simple static file webserver.\n</body></html>\n",271);
		(void)sprintf(logbuffer,"FORBIDDEN: %s:%s",s1, s2); 
		break;
	case NOTFOUND: 
		(void)write(socket_fd, "HTTP/1.1 404 Not Found\nContent-Length: 136\nConnection: close\nContent-Type: text/html\n\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\nThe requested URL was not found on this server.\n</body></html>\n",224);
		(void)sprintf(logbuffer,"NOT FOUND: %s:%s",s1, s2); 
		break;
	case LOG: (void)sprintf(logbuffer," INFO: %s:%s:%d",s1, s2,socket_fd); break;
	}	
	/* No checks here, nothing can be done with a failure anyway */
	if((fd = open("nweb.log", O_CREAT| O_WRONLY | O_APPEND,0644)) >= 0) {
		(void)write(fd,logbuffer,strlen(logbuffer)); 
		(void)write(fd,"\n",1);      
		(void)close(fd);
	}
	if(type == ERROR || type == NOTFOUND || type == FORBIDDEN) exit(3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x3f48, %rsp           # imm = 0x3F48
movl %ecx, %r8d
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebx
cmpl $0x192, %edi            # imm = 0x192
jg 0x12e6
cmpl $0x2a, %ebx
je 0x1313
cmpl $0x2c, %ebx
jne 0x1369
leaq 0xfc9(%rip), %rsi       # 0x229a
movq %rsp, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1140
jmp 0x1369
cmpl $0x193, %ebx            # imm = 0x193
je 0x133e
cmpl $0x194, %ebx            # imm = 0x194
jne 0x1369
leaq 0xeab(%rip), %rsi       # 0x21a8
movl $0xe0, %edx
movl %r8d, %edi
callq 0x1060
leaq 0xf78(%rip), %rsi       # 0x2289
jmp 0x1359
callq 0x1030
movl (%rax), %ebp
callq 0x1070
leaq 0xd3c(%rip), %rsi       # 0x2062
movq %rsp, %rdi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x1140
jmp 0x1369
leaq 0xd42(%rip), %rsi       # 0x2087
movl $0x10f, %edx            # imm = 0x10F
movl %r8d, %edi
callq 0x1060
leaq 0xe3e(%rip), %rsi       # 0x2197
movq %rsp, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1140
leaq 0xf3a(%rip), %rdi       # 0x22aa
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1110
testl %eax, %eax
js 0x13b9
movl %eax, %ebp
movq %rsp, %r14
movq %r14, %rdi
callq 0x1080
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1060
leaq 0x1023(%rip), %rsi      # 0x23c9
movl $0x1, %edx
movl %ebp, %edi
callq 0x1060
movl %ebp, %edi
callq 0x10c0
leal -0x193(%rbx), %eax
cmpl $0x2, %eax
jb 0x13d7
cmpl $0x2a, %ebx
je 0x13d7
addq $0x3f48, %rsp           # imm = 0x3F48
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %edi
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/saulvargas[P]re-C-sys/test_ub.c
// Function: main
int main(int argc, char** argv) {
    FILE* user_data;
    FILE* item_data;
    int N_users;
    int N_items;
    int N_prefs;
    int binary;
    recdata_t* recdata;
    int uid;
    int i;
    similarity_t* similarity;
    recommender_t* recommender;
    idpairs_t* pairs;

    if (!read_args(argc, argv, &user_data, &item_data, &N_users, &N_items, &N_prefs, &binary)) {
        return EXIT_FAILURE;
    }

    recdata = recdata_simple_create(user_data, item_data, N_users, N_items, N_prefs, binary);
    
    fclose(user_data);
    fclose(item_data);

    if (!binary) {
        similarity = similarity_veccosine_create(recdata);
    } else {
        similarity = similarity_setcosine_create(recdata);
    }

    recommender = recommender_ub_create(recdata, similarity, 100, binary);

    for (uid = 0; uid < recdata->N_users; uid++) {
        pairs = recommender_recommend(recommender, uid, 100);

        for (i = 0; i < idpairs_size(pairs); i++) {
            printf("%d\t%d\t%.4f\n", uid, idpairs_keys(pairs)[i], idpairs_values(pairs)[i]);
        }
        
        idpairs_close_deep(pairs);
    }
 
    recommender_close(recommender);
 
    similarity_close(similarity);
    
    recdata_close(recdata);
    
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x8(%rsp), %rax
leaq 0xc(%rsp), %r10
leaq 0x28(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
pushq %rax
pushq %r10
callq 0x26c4
addq $0x10, %rsp
testl %eax, %eax
je 0x1291
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %r8d
movl 0x8(%rsp), %r9d
callq 0x16cd
movq %rax, %r15
movq 0x28(%rsp), %rdi
callq 0x1060
movq 0x20(%rsp), %rdi
callq 0x1060
cmpl $0x0, 0x8(%rsp)
je 0x129b
movq %r15, %rdi
callq 0x198b
jmp 0x12a3
movl $0x1, %eax
jmp 0x135d
movq %r15, %rdi
callq 0x1c56
movl 0x8(%rsp), %ecx
movq %r15, %rdi
movq %rax, 0x30(%rsp)
movq %rax, %rsi
movl $0x64, %edx
callq 0x231f
movq %rax, 0x18(%rsp)
cmpl $0x0, (%r15)
jle 0x133f
xorl %r12d, %r12d
leaq 0x1d33(%rip), %r13      # 0x3004
movq 0x18(%rsp), %rdi
movl %r12d, %esi
movl $0x64, %edx
callq 0x2104
movq %rax, %rbp
movq %rax, %rdi
callq 0x25e1
testl %eax, %eax
jle 0x132f
xorl %ebx, %ebx
movq %rbp, %rdi
callq 0x25e4
movl (%rax,%rbx,4), %r14d
movq %rbp, %rdi
callq 0x25e9
movsd (%rax,%rbx,8), %xmm0
movq %r13, %rdi
movl %r12d, %esi
movl %r14d, %edx
movb $0x1, %al
callq 0x1080
incq %rbx
movq %rbp, %rdi
callq 0x25e1
cltq
cmpq %rax, %rbx
jl 0x12f4
movq %rbp, %rdi
callq 0x25bd
incl %r12d
cmpl (%r15), %r12d
jl 0x12d1
movq 0x18(%rsp), %rdi
callq 0x21e9
movq 0x30(%rsp), %rdi
callq 0x1814
movq %r15, %rdi
callq 0x13a4
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yy_create_buffer
YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file , yyscanner);

	return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq 0x34f0
testq %rax, %rax
je 0x538f
movq %rax, %r15
movl %ebp, 0x18(%rax)
addl $0x2, %ebp
movslq %ebp, %rdi
callq 0x34f0
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x538f
movl $0x1, 0x20(%r15)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56ca
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x421c(%rip), %rdi      # 0x95b2
callq 0x5543
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: yy_get_previous_state
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 158 )
				yy_c = yy_meta[yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
		}

	return yy_current_state;
}

// Assembly:
movl 0x4c(%rdi), %eax
movq 0x80(%rdi), %rcx
movq 0x40(%rdi), %rdx
cmpq %rdx, %rcx
jae 0x5631
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x2e5f(%rip), %rsi      # 0x83f0
leaq 0x35a8(%rip), %r8       # 0x8b40
leaq 0x2f91(%rip), %r9       # 0x8530
leaq 0x38ba(%rip), %r10      # 0x8e60
leaq 0x3703(%rip), %r11      # 0x8cb0
leaq 0x386c(%rip), %rbx      # 0x8e20
movzbl (%rcx), %r15d
testq %r15, %r15
je 0x55ca
leaq 0x2d2c(%rip), %r14      # 0x82f0
movb (%r15,%r14), %bpl
jmp 0x55cd
movb $0x1, %bpl
movslq %eax, %r15
cmpw $0x0, (%rsi,%r15,2)
je 0x55df
movl %eax, 0x68(%rdi)
movq %rcx, 0x70(%rdi)
movswq (%r8,%r15,2), %r13
movzbl %bpl, %r12d
addq %r12, %r13
movswl (%r9,%r13,2), %r14d
cmpl %r14d, %eax
je 0x561a
movswq (%r11,%r15,2), %r15
cmpq $0x9e, %r15
jl 0x5607
movb (%r12,%rbx), %bpl
movswq (%r8,%r15,2), %r13
movzbl %bpl, %r12d
addq %r12, %r13
cmpw (%r9,%r13,2), %r15w
jne 0x55f5
movswl (%r10,%r13,2), %eax
incq %rcx
cmpq %rdx, %rcx
jne 0x55b4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yyrestart
void yyrestart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
	}

	yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
	yy_load_buffer_state( yyscanner );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x5650
movq 0x18(%rbx), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x567e
movq %rbx, %rdi
callq 0x52a3
movq 0x8(%rbx), %rdi
movl $0x4000, %esi           # imm = 0x4000
movq %rbx, %rdx
callq 0x34d0
movq 0x18(%rbx), %rcx
movq 0x28(%rbx), %rdx
movq %rax, (%rdx,%rcx,8)
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x5684
movq (%rax,%rcx,8), %rdi
jmp 0x5686
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x56ca
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movl 0x1c(%rdx), %esi
movl %esi, 0x34(%rbx)
movq 0x10(%rdx), %rdx
movq %rdx, 0x40(%rbx)
movq %rdx, 0x80(%rbx)
movq (%rcx,%rax,8), %rax
movq (%rax), %rax
movq %rax, 0x8(%rbx)
movb (%rdx), %al
movb %al, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yy_switch_to_buffer
void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	/* TODO. We should be able to replace this entire function body
	 * with
	 *		yypop_buffer_state();
	 *		yypush_buffer_state(new_buffer);
     */
	yyensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	yy_load_buffer_state( yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (yywrap()) processing, but the only time this flag
	 * is looked at is after yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x52a3
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x57d8
movq 0x18(%rbx), %rax
movq (%rcx,%rax,8), %rdx
cmpq %r14, %rdx
je 0x57d8
testq %rdx, %rdx
je 0x57a0
movb 0x30(%rbx), %al
movq 0x40(%rbx), %rcx
movb %al, (%rcx)
movq 0x40(%rbx), %rdx
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rdx, 0x10(%rsi)
movl 0x34(%rbx), %edx
movq (%rcx,%rax,8), %rsi
movl %edx, 0x1c(%rsi)
movq %r14, (%rcx,%rax,8)
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movl 0x1c(%rdx), %esi
movl %esi, 0x34(%rbx)
movq 0x10(%rdx), %rdx
movq %rdx, 0x40(%rbx)
movq %rdx, 0x80(%rbx)
movq (%rcx,%rax,8), %rax
movq (%rax), %rax
movq %rax, 0x8(%rbx)
movb (%rdx), %al
movb %al, 0x30(%rbx)
movl $0x1, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yy_delete_buffer
void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yyfree( (void *) b->yy_ch_buf , yyscanner );

	yyfree( (void *) b , yyscanner );
}

// Assembly:
testq %rdi, %rdi
je 0x5801
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x5802
movq 0x18(%rsi), %rcx
movq (%rax,%rcx,8), %rcx
jmp 0x5804
retq
xorl %ecx, %ecx
cmpq %rbx, %rcx
jne 0x5815
movq 0x18(%rsi), %rcx
movq $0x0, (%rax,%rcx,8)
cmpl $0x0, 0x20(%rbx)
je 0x5824
movq 0x8(%rbx), %rdi
callq 0x3050
movq %rbx, %rdi
popq %rbx
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yy_flush_buffer
void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		yy_load_buffer_state( yyscanner );
}

// Assembly:
testq %rdi, %rdi
je 0x5871
xorl %ecx, %ecx
movl %ecx, 0x1c(%rdi)
movq 0x8(%rdi), %rax
movb %cl, (%rax)
movq 0x8(%rdi), %rax
movb %cl, 0x1(%rax)
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rdi)
movl $0x1, 0x28(%rdi)
movl %ecx, 0x38(%rdi)
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x586c
movq 0x18(%rsi), %rcx
movq (%rax,%rcx,8), %rcx
cmpq %rdi, %rcx
je 0x5872
retq
movq 0x18(%rsi), %rcx
movq (%rax,%rcx,8), %rdx
movl 0x1c(%rdx), %edi
movl %edi, 0x34(%rsi)
movq 0x10(%rdx), %rdx
movq %rdx, 0x40(%rsi)
movq %rdx, 0x80(%rsi)
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsi)
movb (%rdx), %al
movb %al, 0x30(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yypush_buffer_state
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (new_buffer == NULL)
		return;

	yyensure_buffer_stack(yyscanner);

	/* This block is copied from yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state( yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

// Assembly:
testq %rdi, %rdi
je 0x5937
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x52a3
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
cmpq $0x0, (%rcx,%rax,8)
je 0x58f8
movb 0x30(%rbx), %al
movq 0x40(%rbx), %rcx
movb %al, (%rcx)
movq 0x40(%rbx), %rdx
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rdx, 0x10(%rsi)
movl 0x34(%rbx), %edx
movq (%rcx,%rax,8), %rsi
movl %edx, 0x1c(%rsi)
incq %rax
movq %rax, 0x18(%rbx)
movq %r14, (%rcx,%rax,8)
movq 0x28(%rbx), %rcx
movq (%rcx,%rax,8), %rdx
movl 0x1c(%rdx), %esi
movl %esi, 0x34(%rbx)
movq 0x10(%rdx), %rdx
movq %rdx, 0x40(%rbx)
movq %rdx, 0x80(%rbx)
movq (%rcx,%rax,8), %rax
movq (%rax), %rax
movq %rax, 0x8(%rbx)
movb (%rdx), %al
movb %al, 0x30(%rbx)
movl $0x1, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yypop_buffer_state
void yypop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (!YY_CURRENT_BUFFER)
		return;

	yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {
		yy_load_buffer_state( yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x59b9
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x59b8
movq %rbx, %rsi
callq 0x3280
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
testq %rax, %rax
je 0x5978
decq %rax
movq %rax, 0x18(%rbx)
jmp 0x597a
xorl %eax, %eax
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x59b8
movq (%rcx,%rax,8), %rdx
testq %rdx, %rdx
je 0x59b8
movl 0x1c(%rdx), %esi
movl %esi, 0x34(%rbx)
movq 0x10(%rdx), %rdx
movq %rdx, 0x40(%rbx)
movq %rdx, 0x80(%rbx)
movq (%rcx,%rax,8), %rax
movq (%rax), %rax
movq %rax, 0x8(%rbx)
movb (%rdx), %al
movb %al, 0x30(%rbx)
movl $0x1, 0x50(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yylex_init_extra
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
    struct yyguts_t dummy_yyguts;

    yyset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){
        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );

    if (*ptr_yy_globals == NULL){
        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    yyset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals ( *ptr_yy_globals );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x5c15
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %edi
movl $0x90, %esi
callq 0x33b0
movq %rax, (%r14)
testq %rax, %rax
je 0x5c22
movq %rbx, (%rax)
xorl %eax, %eax
jmp 0x5c32
callq 0x3080
movl $0x16, (%rax)
jmp 0x5c2d
callq 0x3080
movl $0xc, (%rax)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/parser.c
// Function: vt100_parser_yylex_destroy
int yylex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		yypop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	yyfree(yyg->yy_buffer_stack , yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        yyfree( yyg->yy_start_stack , yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    yyfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x5c7d
movq 0x18(%rbx), %rax
movq (%rdi,%rax,8), %rax
testq %rax, %rax
je 0x5c7f
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3280
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
movq %rbx, %rdi
callq 0x3370
movq 0x28(%rbx), %rdi
jmp 0x5c42
xorl %edi, %edi
callq 0x3050
movq $0x0, 0x28(%rbx)
movq 0x60(%rbx), %rdi
callq 0x3050
movq %rbx, %rdi
callq 0x3050
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/doy[P]libvt100/src/screen.c
// Function: vt100_screen_ensure_capacity
static void vt100_screen_ensure_capacity(VT100Screen *vt, int size)
{
    int old_capacity = vt->grid->row_capacity;

    if (vt->grid->row_capacity >= size) {
        return;
    }

    if (vt->grid->row_capacity == 0) {
        vt->grid->row_capacity = vt->grid->max.row;
    }

    while (vt->grid->row_capacity < size) {
        vt->grid->row_capacity *= 1.5;
    }

    vt->grid->rows = realloc(
        vt->grid->rows, vt->grid->row_capacity * sizeof(struct vt100_row));
    memset(
        &vt->grid->rows[old_capacity], 0,
        (vt->grid->row_capacity - old_capacity) * sizeof(struct vt100_row));
}

// Assembly:
movq (%rdi), %rax
movl 0x24(%rax), %edx
cmpl %esi, %edx
jge 0x5f8b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, %ecx
testl %edx, %edx
jne 0x5f2c
movl 0x8(%rax), %ecx
movl %ecx, 0x24(%rax)
movslq %edx, %r14
cmpl %esi, %ecx
jge 0x5f51
movsd 0x39a5(%rip), %xmm0     # 0x98e0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
cmpl %esi, %ecx
jl 0x5f3b
movl %ecx, 0x24(%rax)
movq 0x30(%rax), %rdi
movslq %ecx, %rsi
shlq $0x4, %rsi
callq 0x3570
movq (%rbx), %rcx
movq %rax, 0x30(%rcx)
movq %r14, %rdi
shlq $0x4, %rdi
addq %rax, %rdi
movslq 0x24(%rcx), %rdx
subq %r14, %rdx
shlq $0x4, %rdx
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32c0
retq