LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_resize_buffer
int sliding_window_v4_resize_buffer(sliding_window_v4 *sw,size_t new_size) {
	unsigned char *np;

	assert(sw->type == SLIDING_WINDOW_V4_TYPE_BUFFER);

	if (new_size < 2) new_size = 2;

	/* don't resize if we're resizing to the same size buffer */
	if (sw->buffer+new_size == sw->fence) return 1;

	/* check for pointer location overflow */
	if (size_t_overflow(sw->buffer,new_size)) return 0;

	/* don't allow resizing if doing so would leave the data & end pointers outside the buffer (violating window sanity) */
	if (sw->data > (sw->buffer+new_size)) return 0;
	if (sw->end > (sw->buffer+new_size)) return 0;

	/* carry out the resize. manage pointers so that if realloc() fails we can gracefully return the struct unmodified */
	if ((np = (unsigned char*)realloc(sw->buffer,new_size)) == NULL) return 0;

	/* throw away the old pointer and update the structure */
	{
		size_t old_do = (size_t)(sw->data - sw->buffer);
		size_t old_eo = (size_t)(sw->end - sw->buffer);
		sw->buffer = np;
		sw->fence = np + new_size;
		sw->data = np + old_do;
		sw->end = np + old_eo;
	}

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x20(%rdi)
jne 0x5300
movq %rdi, %rbx
cmpq $0x3, %rsi
movl $0x2, %r14d
cmovaeq %rsi, %r14
movq (%rdi), %rdi
leaq (%rdi,%r14), %rax
movl $0x1, %r15d
cmpq 0x8(%rbx), %rax
je 0x52f2
xorl %r15d, %r15d
movq %rdi, %rcx
addq %r14, %rcx
jb 0x52f2
cmpq %rax, 0x10(%rbx)
ja 0x52f2
cmpq %rax, 0x18(%rbx)
ja 0x52f2
movq %r14, %rsi
callq 0x1140
testq %rax, %rax
je 0x52f2
movq (%rbx), %rcx
movq 0x10(%rbx), %rdx
subq %rcx, %rdx
movq 0x18(%rbx), %rsi
subq %rcx, %rsi
movq %rax, (%rbx)
addq %rax, %r14
movq %r14, 0x8(%rbx)
addq %rax, %rdx
movq %rdx, 0x10(%rbx)
addq %rax, %rsi
movq %rsi, 0x18(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2528(%rip), %rdi      # 0x782f
leaq 0x23bc(%rip), %rsi      # 0x76ca
leaq 0x2544(%rip), %rcx      # 0x7859
movl $0x8c, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_resize
int sliding_window_v4_resize(sliding_window_v4 *sw,size_t new_size) {
	if (sw == NULL)
		return 0;
	else if (sw->type == SLIDING_WINDOW_V4_TYPE_BUFFER)
		return sliding_window_v4_resize_buffer(sw,new_size);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x5334
cmpb $0x1, 0x20(%rdi)
jne 0x5334
popq %rbp
jmp 0x5267
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_data_advance
size_t sliding_window_v4_data_advance(sliding_window_v4 *sw,size_t bytes) {
	if (sw->buffer == NULL)
		return 0;

	/* don't let the caller advance too far and violate the pointer rule specified in the header file */
	if ((sw->data+bytes) > sw->end)
		bytes = (size_t)(sw->end - sw->data);

	sw->data += bytes;
	return bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, (%rdi)
je 0x5364
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
leaq (%rcx,%rsi), %r8
movq %rdx, %rax
subq %rcx, %rax
cmpq %rdx, %r8
cmovbeq %rsi, %rax
addq %rax, %rcx
movq %rcx, 0x10(%rdi)
jmp 0x5366
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_wrote
size_t sliding_window_v4_wrote(sliding_window_v4 *sw,size_t bytes) {
	if (sw->buffer == NULL)
		return 0;

	/* to clarify: the caller loads data into memory at sw->end and uses this function to
	 * tell us HOW much data it wrote so the sliding window can follow along */
	if ((sw->end+bytes) > sw->fence)
		bytes = (size_t)(sw->fence - sw->end);

	sw->end += bytes;
	return bytes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, (%rdi)
je 0x5394
movq 0x8(%rdi), %rcx
movq 0x18(%rdi), %rdx
leaq (%rdx,%rsi), %r8
movq %rcx, %rax
subq %rdx, %rax
cmpq %rcx, %r8
cmovbeq %rsi, %rax
addq %rax, %rdx
movq %rdx, 0x18(%rdi)
jmp 0x5396
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_flush
size_t sliding_window_v4_flush(sliding_window_v4 *sw) {
	size_t valid_data,ret=0;

    SYSTEM_PAGE_SIZE_init();

	/* copy the valid data left back to the front of the buffer, reset data/end pointers. */
	/* NOTICE: used properly this allows fast reading and parsing of streams. over-used, and
	 * performance will suffer horribly. call this function only when you need to. */

	/* if already there, do nothing */
	if (sw->data == sw->buffer) return 0;

	if (sw->type == SLIDING_WINDOW_V4_TYPE_BUFFER) {
		ret = (size_t)(sw->data - sw->buffer);
		valid_data = sliding_window_v4_data_available(sw);
		if (valid_data > 0) memmove(sw->buffer,sw->data,valid_data);
		sw->data = sw->buffer;
		sw->end = sw->data + valid_data;
	}

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x4dbb(%rip)      # 0xa168
jne 0x53c0
movl $0x1e, %edi
callq 0x1180
movq %rax, 0x4da8(%rip)      # 0xa168
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rsi, %r14
subq %rdi, %r14
je 0x53f6
cmpb $0x1, 0x20(%rbx)
jne 0x53f6
movq 0x18(%rbx), %r15
subq %rsi, %r15
je 0x53e6
movq %r15, %rdx
callq 0x1160
movq (%rbx), %rax
movq %rax, 0x10(%rbx)
addq %rax, %r15
movq %r15, 0x18(%rbx)
jmp 0x53f9
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_lazy_flush
size_t sliding_window_v4_lazy_flush(sliding_window_v4 *sw) {
	/* lazy flush: call sliding_window_flush() only if more than half the entire buffer has
	 * been consumed. a caller that wants a generally-optimal streaming buffer policy would
	 * call this instead of duplicating code to check and call all over the place. */
	size_t threshhold = ((size_t)(sw->fence - sw->buffer)) >> 1;
	if ((sw->data+threshhold) >= sw->end && sliding_window_v4_data_offset(sw) >= (threshhold/2))
		return sliding_window_v4_flush(sw);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
movq %rax, %rsi
shrq %rsi
movq 0x10(%rdi), %rdx
addq %rdx, %rsi
cmpq 0x18(%rdi), %rsi
jb 0x5434
subq %rcx, %rdx
shrq $0x2, %rax
cmpq %rax, %rdx
jae 0x5438
xorl %eax, %eax
popq %rbp
retq
popq %rbp
jmp 0x5398
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_free_buffer
void sliding_window_v4_free_buffer(sliding_window_v4 *sw) {
	if (sw->buffer != NULL) {
		if (sw->u.buffer.lib_owner) {
			free(sw->buffer); /* we own the buffer, we free it */
			sw->buffer = NULL;
		}
		else if (sw->u.buffer.owner_free_buffer != NULL) {
			/* the buffer is owned by someone else, and that someone else
			 * gave us a callback to free it by. */
			sw->u.buffer.owner_free_buffer(sw);
			sw->buffer = NULL;
		}
		else {
			/* no way to free the buffer. hope the owner intended it that
			 * way, or else a memory leak may happen */
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x5471
cmpb $0x0, 0x30(%rbx)
je 0x545c
callq 0x1030
jmp 0x546a
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x5471
movq %rbx, %rdi
callq *%rax
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_is_sane
int sliding_window_v4_is_sane(sliding_window_v4 *sw) {
	if (sw == NULL) return 0;

	/* if any of the pointers are NULL, */
	if (sw->buffer == NULL || sw->data == NULL || sw->fence == NULL || sw->end == NULL) {
		/* if it's a memory buffer: NO, the pointers must not be null */
		if (sw->type == SLIDING_WINDOW_V4_TYPE_BUFFER)
			return 0;

		/* if it's not, then for the window to be valid all four pointers must be NULL.
		 * We enforce consistency here: either they are all non-NULL or they are all NULL. */
		if (sw->buffer != NULL || sw->data != NULL || sw->fence != NULL || sw->end != NULL)
			return 0;

		/* it's valid, then */
		return 1;
	}

	return	(sw->buffer <= sw->data) &&
		(sw->data <= sw->end) &&
		(sw->end <= sw->fence) &&
		(sw->buffer != sw->fence);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x54e3
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x54c8
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x54c8
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x54c8
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
je 0x54c8
cmpq %rdx, %rcx
setbe %dil
cmpq %rsi, %rdx
setbe %dl
andb %dil, %dl
cmpq %rax, %rsi
setbe %sil
cmpq %rax, %rcx
setne %al
andb %sil, %al
andb %dl, %al
jmp 0x54e5
xorl %eax, %eax
testq %rcx, %rcx
jne 0x54e5
cmpb $0x1, 0x20(%rdi)
je 0x54e5
cmpq $0x0, 0x10(%rdi)
jne 0x54e3
cmpq $0x0, 0x8(%rdi)
je 0x54ea
xorl %eax, %eax
movzbl %al, %eax
popq %rbp
retq
cmpq $0x0, 0x18(%rdi)
sete %al
jmp 0x54e5
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/util.c
// Function: parseline
size_t
parseline(char *line, char *fields[FieldLast])
{
	char *prev, *s;
	size_t i;

	for (prev = line, i = 0;
	    (s = strchr(prev, '\t')) && i < FieldLast - 1;
	    i++) {
		*s = '\0';
		fields[i] = prev;
		prev = s + 1;
	}
	fields[i++] = prev;
	/* make non-parsed fields empty. */
	for (; i < FieldLast; i++)
		fields[i] = "";

	return i;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x9, %esi
callq 0x1090
testq %rax, %rax
je 0x1e56
xorl %r12d, %r12d
movb $0x0, (%rax)
movq %r14, (%rbx,%r12,8)
movq %rax, %r14
incq %r14
leaq 0x1(%r12), %r15
movq %r14, %rdi
movl $0x9, %esi
callq 0x1090
testq %rax, %rax
je 0x1e59
cmpq $0x6, %r12
movq %r15, %r12
jb 0x1e27
jmp 0x1e59
xorl %r15d, %r15d
movq %r14, (%rbx,%r15,8)
leaq 0x1(%r15), %rax
cmpq $0x6, %r15
ja 0x1e80
leaq 0x15fc(%rip), %rcx      # 0x346a
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x1e6e
movl $0x8, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/util.c
// Function: strtotime
int
strtotime(const char *s, time_t *t)
{
	long long l;
	char *e;

	errno = 0;
	l = strtoll(s, &e, 10);
	if (errno || *s == '\0' || *e)
		return -1;
	/* NOTE: assumes time_t is 64-bit on 64-bit platforms:
	         long long (atleast 32-bit) to time_t. */
	if (t)
		*t = (time_t)l;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1040
movq %rax, %r15
movl $0x0, (%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl $0xa, %edx
callq 0x1120
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
je 0x1ed3
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, (%r14)
je 0x1ec9
movq 0x8(%rsp), %rdx
cmpb $0x0, (%rdx)
jne 0x1ec9
xorl %eax, %eax
testq %rbx, %rbx
je 0x1ec9
movq %rcx, (%rbx)
jmp 0x1ec9
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/util.c
// Function: xmlencode
void
xmlencode(const char *s, FILE *fp)
{
	for (; *s; ++s) {
		switch (*s) {
		case '<':  fputs("&lt;",   fp); break;
		case '>':  fputs("&gt;",   fp); break;
		case '\'': fputs("&#39;",  fp); break;
		case '&':  fputs("&amp;",  fp); break;
		case '"':  fputs("&quot;", fp); break;
		default:   fputc(*s, fp);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1632(%rip), %r12      # 0x3539
leaq 0x1625(%rip), %r13      # 0x3533
leaq 0x1619(%rip), %rbp      # 0x352e
leaq 0x160d(%rip), %r15      # 0x3529
movzbl (%r14), %eax
cmpl $0x26, %eax
jle 0x1f39
cmpl $0x27, %eax
je 0x1f48
cmpl $0x3e, %eax
je 0x1f4d
cmpl $0x3c, %eax
jne 0x1f6a
movq %r15, %rdi
jmp 0x1f59
cmpl $0x22, %eax
je 0x1f52
cmpl $0x26, %eax
jne 0x1f66
movq %r12, %rdi
jmp 0x1f59
movq %r13, %rdi
jmp 0x1f59
movq %rbp, %rdi
jmp 0x1f59
leaq 0x15e6(%rip), %rdi      # 0x353f
movq %rbx, %rsi
callq 0x10c0
incq %r14
jmp 0x1f1c
testl %eax, %eax
je 0x1f77
movsbl %al, %edi
movq %rbx, %rsi
callq 0x10e0
jmp 0x1f61
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/util.c
// Function: printutf8pad
void
printutf8pad(FILE *fp, const char *s, size_t len, int pad)
{
	wchar_t wc;
	size_t col = 0, i, slen;
	int rl, w;

	if (!len)
		return;

	slen = strlen(s);
	for (i = 0; i < slen; i += rl) {
		if ((rl = mbtowc(&wc, s + i, slen - i < 4 ? slen - i : 4)) <= 0)
			break;
		if ((w = wcwidth(wc)) == -1)
			continue;
		if (col + w > len || (col + w == len && s[i + rl])) {
			fputs("\xe2\x80\xa6", fp);
			col++;
			break;
		}
		fwrite(&s[i], 1, rl, fp);
		col += w;
	}
	for (; col < len; ++col)
		putc(pad, fp);
}

// Assembly:
testq %rdx, %rdx
je 0x20aa
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movl %ecx, 0x18(%rsp)
movq %rsi, %rdi
callq 0x1080
testq %rax, %rax
je 0x205a
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, 0x20(%rsp)
leaq (%r12,%rbx), %rbp
movq %rax, %r13
movq %rax, %rdx
subq %rbx, %rdx
cmpq $0x4, %rdx
movl $0x4, %eax
cmovaeq %rax, %rdx
leaq 0x1c(%rsp), %rdi
movq %rbp, %rsi
callq 0x1140
testl %eax, %eax
jle 0x205f
movl %eax, %r12d
movl 0x1c(%rsp), %edi
callq 0x1170
movl %r12d, %r12d
cmpl $-0x1, %eax
je 0x203f
movslq %eax, %r15
addq 0x8(%rsp), %r15
cmpq %r14, %r15
ja 0x2066
jne 0x2023
cmpb $0x0, (%rbp,%r12)
jne 0x2066
movl $0x1, %esi
movq %rbp, %rdi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
callq 0x11c0
movq %r15, 0x8(%rsp)
jmp 0x2044
movq 0x8(%rsp), %r15
addq %r12, %rbx
movq %r13, %rax
cmpq %r13, %rbx
movq 0x20(%rsp), %r12
jb 0x1fcd
jmp 0x207f
xorl %r15d, %r15d
jmp 0x207f
movq 0x8(%rsp), %r15
jmp 0x207f
leaq 0x14d9(%rip), %rdi      # 0x3546
movq 0x10(%rsp), %rsi
callq 0x10c0
movq 0x8(%rsp), %r15
incq %r15
subq %r15, %r14
movl 0x18(%rsp), %ebx
movq 0x10(%rsp), %r15
jbe 0x209c
movl %ebx, %edi
movq %r15, %rsi
callq 0x1110
decq %r14
jne 0x208d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/strlcat.c
// Function: strlcat
size_t
strlcat(char *dst, const char *src, size_t dsize)
{
	const char *odst = dst;
	const char *osrc = src;
	size_t n = dsize;
	size_t dlen;

	/* Find the end of dst and adjust bytes left but don't go past end. */
	while (n-- != 0 && *dst != '\0')
		dst++;
	dlen = dst - odst;
	n = dsize - dlen;

	if (n-- == 0)
		return(dlen + strlen(src));
	while (*src != '\0') {
		if (n != 0) {
			*dst++ = *src;
			n--;
		}
		src++;
	}
	*dst = '\0';

	return(dlen + (src - osrc));	/* count does not include NUL */
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
testq %rdx, %rdx
je 0x20cf
leaq (%rdi,%rdx), %rax
movq %rdx, %r8
movq %rdi, %rcx
cmpb $0x0, (%rcx)
je 0x20cf
incq %rcx
decq %r8
jne 0x20bf
movq %rax, %rcx
movq %rcx, %rbx
subq %rdi, %rbx
cmpq %rdx, %rbx
jne 0x20e4
movq %rsi, %rdi
callq 0x1080
jmp 0x2121
movb (%rsi), %r8b
testb %r8b, %r8b
je 0x2118
movq %rbx, %rdi
notq %rdi
addq %rdx, %rdi
movq %rsi, %rax
testq %rdi, %rdi
je 0x2108
movb %r8b, (%rcx)
incq %rcx
decq %rdi
jmp 0x210a
xorl %edi, %edi
movb 0x1(%rax), %r8b
incq %rax
testb %r8b, %r8b
jne 0x20f8
jmp 0x211b
movq %rsi, %rax
movb $0x0, (%rcx)
subq %rsi, %rax
addq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/strlcpy.c
// Function: strlcpy
size_t
strlcpy(char *dst, const char *src, size_t dsize)
{
	const char *osrc = src;
	size_t nleft = dsize;

	/* Copy as many bytes as will fit. */
	if (nleft != 0) {
		while (--nleft != 0) {
			if ((*dst++ = *src++) == '\0')
				break;
		}
	}

	/* Not enough room in dst, add NUL and traverse rest of src. */
	if (nleft == 0) {
		if (dsize != 0)
			*dst = '\0';		/* NUL-terminate dst */
		while (*src++)
			;
	}

	return(src - osrc - 1);	/* count does not include NUL */
}

// Assembly:
movq %rsi, %rax
testq %rdx, %rdx
je 0x2154
leaq -0x1(%rdx), %r8
movq %rax, %rcx
subq $0x1, %r8
setb %sil
jb 0x215a
movb (%rcx), %r9b
incq %rcx
movb %r9b, (%rdi)
incq %rdi
testb %r9b, %r9b
jne 0x2137
jmp 0x215a
movb $0x1, %sil
movq %rax, %rcx
testb %sil, %sil
je 0x2175
testq %rdx, %rdx
je 0x2167
movb $0x0, (%rdi)
leaq 0x1(%rcx), %rdx
cmpb $0x0, (%rcx)
movq %rdx, %rcx
jne 0x2167
jmp 0x2178
movq %rcx, %rdx
notq %rax
addq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/curve25519/donna_c64/../test.c
// Function: main
int
main() {
  uint8_t out[32], a[32], b[32];

  memset(a, 42, sizeof(a));
  memset(b, 64, sizeof(b));
  curve25519(out, a, b);
  return 0 != memcmp(out, "\x0eY\xe5-\xdc|%AV\x9eR\xe0\xba!\xf1T]>\xff\xca\xcaSS\x9c\xc4_\xec`O*\xd6\x03", 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x68, %rsp
movaps 0x1ed4(%rip), %xmm0     # 0x3010
leaq -0x50(%rbp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movaps 0x1ed2(%rip), %xmm0     # 0x3020
leaq -0x30(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
leaq -0x70(%rbp), %rbx
movq %rbx, %rdi
callq 0x1198
movdqa (%rbx), %xmm0
movdqa 0x10(%rbx), %xmm1
pcmpeqb 0x1eba(%rip), %xmm1     # 0x3030
pcmpeqb 0x1ec2(%rip), %xmm0     # 0x3040
pand %xmm1, %xmm0
pmovmskb %xmm0, %ecx
xorl %eax, %eax
cmpl $0xffff, %ecx           # imm = 0xFFFF
setne %al
addq $0x68, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/agl[P]obstcp/curve25519/donna_c64/smult.c
// Function: fdifference_backwards
static void fdifference_backwards(felem *ioutput, const felem *iin) {
  static const int64_t twotothe51 = (1l << 51);
  const int64_t *in = (const int64_t *) iin;
  int64_t *out = (int64_t *) ioutput;

  out[0] = in[0] - out[0];
  out[1] = in[1] - out[1];
  out[2] = in[2] - out[2];
  out[3] = in[3] - out[3];
  out[4] = in[4] - out[4];

  // An arithmetic shift right of 63 places turns a positive number to 0 and a
  // negative number to all 1's. This gives us a bitmask that lets us avoid
  // side-channel prone branches.
  int64_t t;

#define NEGCHAIN(a,b) \
  t = out[a] >> 63; \
  out[a] += twotothe51 & t; \
  out[b] -= 1 & t;

#define NEGCHAIN19(a,b) \
  t = out[a] >> 63; \
  out[a] += twotothe51 & t; \
  out[b] -= 19 & t;

  NEGCHAIN(0, 1);
  NEGCHAIN(1, 2);
  NEGCHAIN(2, 3);
  NEGCHAIN(3, 4);
  NEGCHAIN19(4, 0);
  NEGCHAIN(0, 1);
  NEGCHAIN(1, 2);
  NEGCHAIN(2, 3);
  NEGCHAIN(3, 4);
}

// Assembly:
movq (%rsi), %rdx
subq (%rdi), %rdx
movq %rdx, (%rdi)
movq 0x8(%rsi), %r8
subq 0x8(%rdi), %r8
movq %r8, 0x8(%rdi)
movq 0x10(%rsi), %r11
subq 0x10(%rdi), %r11
movq %r11, 0x10(%rdi)
movq 0x18(%rsi), %r9
subq 0x18(%rdi), %r9
movq %r9, 0x18(%rdi)
movq 0x20(%rsi), %r10
subq 0x20(%rdi), %r10
movq %rdx, %rax
shrq $0xc, %rax
movabsq $0x8000000000000, %rcx  # imm = 0x8000000000000
andq %rcx, %rax
addq %rdx, %rax
sarq $0x3f, %rdx
addq %r8, %rdx
movq %rdx, %r8
shrq $0xc, %r8
andq %rcx, %r8
addq %rdx, %r8
sarq $0x3f, %rdx
addq %r11, %rdx
movq %rdx, %rsi
shrq $0xc, %rsi
andq %rcx, %rsi
addq %rdx, %rsi
sarq $0x3f, %rdx
addq %r9, %rdx
movq %rdx, %r9
shrq $0xc, %r9
andq %rcx, %r9
addq %rdx, %r9
sarq $0x3f, %rdx
addq %r10, %rdx
movq %rdx, %r10
sarq $0x3f, %r10
andq %r10, %rcx
addq %rdx, %rcx
andl $0x13, %r10d
subq %r10, %rax
movq %rax, %xmm0
sarq $0x3f, %rax
addq %r8, %rax
movq %rax, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, %xmm1
psrlq $0xc, %xmm1
movdqa 0x1138(%rip), %xmm2     # 0x3080
pand %xmm2, %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, (%rdi)
sarq $0x3f, %rax
addq %rsi, %rax
movq %rax, %xmm0
sarq $0x3f, %rax
addq %r9, %rax
movq %rax, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, %xmm1
psrlq $0xc, %xmm1
pand %xmm2, %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0x10(%rdi)
sarq $0x3f, %rax
addq %rcx, %rax
movq %rax, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/zhoudian64[P]OS2-exp/mount_example.c
// Function: main
int main()
{
   const char* src  = "none";
   const char* trgt = "./tmp_example";
   const char* type = "tmpfs";
   const unsigned long mntflags = 0;
   const char* opts = "mode=0777,uid=65534";   /* 65534 is the uid of nobody */

   int result = mount(src, trgt, type, mntflags, opts);

   if (result == 0)
   {
      printf("Mount created at %s...\n", trgt);
      printf("Press <return> to unmount the volume: ");
      getchar();

      umount(trgt);
   }
   else
   {
     printf("Error : Failed to mount %s\n"
             "Reason: %s [%d]\n",
             src, strerror(errno), errno);
      return -1;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xe6a(%rip), %rdi       # 0x2004
leaq 0xe68(%rip), %rsi       # 0x2009
leaq 0xe6f(%rip), %rdx       # 0x2017
leaq 0xe6e(%rip), %r8        # 0x201d
xorl %ebx, %ebx
xorl %ecx, %ecx
callq 0x1050
testl %eax, %eax
je 0x11ec
callq 0x1030
movq %rax, %rbx
movl (%rax), %edi
callq 0x1080
movl (%rbx), %ecx
leaq 0xe9c(%rip), %rdi       # 0x2070
leaq 0xe29(%rip), %rsi       # 0x2004
movq %rax, %rdx
xorl %eax, %eax
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x121f
leaq 0xe3e(%rip), %rdi       # 0x2031
leaq 0xe0f(%rip), %r14       # 0x2009
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0xe3e(%rip), %rdi       # 0x2049
xorl %eax, %eax
callq 0x1060
callq 0x1070
movq %r14, %rdi
callq 0x1040
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/soso7885[P]OPCUA_example/demo_src/client.c
// Function: nodeIter
static UA_StatusCode
nodeIter(UA_NodeId childId, UA_Boolean isInverse, UA_NodeId referenceTypeId, void *handle) {  
  UA_NodeId *parent = (UA_NodeId *) handle;
  
  if(!isInverse) {
    printf("%d, %d --- %d ---> NodeId %d, %d\n",
           parent->namespaceIndex, parent->identifier.numeric,
           referenceTypeId.identifier.numeric, childId.namespaceIndex,
           childId.identifier.numeric);
  }
  return UA_STATUSCODE_GOOD;
}

// Assembly:
testl %edi, %edi
jne 0x2003
pushq %rbp
movq %rsp, %rbp
leaq 0x28(%rbp), %rcx
leaq 0x10(%rbp), %rdi
movzwl (%rsi), %eax
movl 0x8(%rsi), %edx
movl 0x8(%rcx), %ecx
movzwl (%rdi), %r8d
movl 0x8(%rdi), %r9d
leaq 0x1397(%rip), %rdi      # 0x3390
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/fritzw[P]cube-utils/cube-encoder.c
// Function: fsize
long int fsize(FILE *f) {
    long int original, size;
    original = ftell(f);
    fseek(f, 0, SEEK_END);
    size = ftell(f);
    fseek(f, original, SEEK_SET);
    return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x10a0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x10d0
movq %rbx, %rdi
callq 0x10a0
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x10d0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/fritzw[P]cube-utils/cube-encoder.c
// Function: ends_with
int ends_with(char *subject, char *ending) {
	int subjectlength = strlen(subject);
	int endlength = strlen(ending);
	if (endlength > subjectlength) {
		return 0;
	}
	return 0 == strncmp(subject + subjectlength - endlength, ending, endlength);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1080
movq %rax, %r15
movq %rbx, %rdi
callq 0x1080
xorl %ecx, %ecx
cmpl %r15d, %eax
jg 0x129c
movslq %r15d, %rcx
addq %rcx, %r14
movslq %eax, %rdx
subq %rdx, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1040
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/fritzw[P]cube-utils/blowfish.c
// Function: blowfish_key_setup
void blowfish_key_setup(const BYTE user_key[], BLOWFISH_KEY *keystruct, size_t len)
{
    BYTE block[8];
    int idx,idx2;

    // Copy over the constant init array vals (so the originals aren't destroyed).
    memcpy(keystruct->p,p_perm,sizeof(WORD) * 18);
    memcpy(keystruct->s,s_perm,sizeof(WORD) * 1024);

    // Combine the key with the P box. Assume key is standard 448 bits (56 bytes) or less.
    for (idx = 0, idx2 = 0; idx < 18; ++idx, idx2 += 4)
        keystruct->p[idx] ^= (user_key[idx2 % len] << 24) | (user_key[(idx2+1) % len] << 16)
            | (user_key[(idx2+2) % len] << 8) | (user_key[(idx2+3) % len]);
    // Re-calculate the P box.
    memset(block, 0, 8);
    for (idx = 0; idx < 18; idx += 2) {
        blowfish_encrypt(block,block,keystruct, 0);
        keystruct->p[idx] = (block[0] << 24) | (block[1] << 16) | (block[2] << 8) | block[3];
        keystruct->p[idx+1]=(block[4] << 24) | (block[5] << 16) | (block[6] << 8) | block[7];
    }
    // Recalculate the S-boxes.
    for (idx = 0; idx < 4; ++idx) {
        for (idx2 = 0; idx2 < 256; idx2 += 2) {
            blowfish_encrypt(block,block,keystruct, 0);
            keystruct->s[idx][idx2] = (block[0] << 24) | (block[1] << 16) |
                (block[2] << 8) | block[3];
            keystruct->s[idx][idx2+1] = (block[4] << 24) | (block[5] << 16) |
                (block[6] << 8) | block[7];
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1123(%rip), %rsi      # 0x3200
movl $0x12, %ecx
movq %rbx, %rdi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x48(%rbx), %rdi
leaq 0x115e(%rip), %rsi      # 0x3250
movl $0x1000, %edx           # imm = 0x1000
callq 0x10b0
xorl %ecx, %ecx
movq %rcx, %rax
xorl %edx, %edx
divq %r14
movzbl (%r15,%rdx), %esi
shll $0x18, %esi
leaq 0x1(%rcx), %rax
xorl %edx, %edx
divq %r14
movzbl (%r15,%rdx), %edi
shll $0x10, %edi
orl %esi, %edi
leaq 0x2(%rcx), %rax
xorl %edx, %edx
divq %r14
movzbl (%r15,%rdx), %esi
shll $0x8, %esi
orl %edi, %esi
leaq 0x3(%rcx), %rax
xorl %edx, %edx
divq %r14
movzbl (%r15,%rdx), %eax
orl %esi, %eax
xorl %eax, (%rbx,%rcx)
addq $0x4, %rcx
cmpq $0x48, %rcx
jne 0x20fe
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq $-0x2, %r15
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x15bc
movl 0x8(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rbx,%r15,4)
movl 0xc(%rsp), %eax
bswapl %eax
movl %eax, 0xc(%rbx,%r15,4)
addq $0x2, %r15
cmpq $0x10, %r15
jb 0x2164
leaq 0x4c(%rbx), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq $-0x2, %r13
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x15bc
movl 0x8(%rsp), %eax
bswapl %eax
movl %eax, 0x4(%r15,%r13,4)
movl 0xc(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%r15,%r13,4)
addq $0x2, %r13
cmpq $0xfe, %r13
jb 0x21a7
incq %r12
addq $0x400, %r15            # imm = 0x400
cmpq $0x4, %r12
jne 0x21a0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test
static int _test(String * s)
{
	size_t len;
	size_t i;

	/* string_get_length */
	printf("%s: Testing %s\n", PROGNAME, "string_get_length()");
	if((len = string_get_length(s)) == 0)
		return 2;
	printf("\"%s\" => %zu\n", s, len);
	/* string_clear */
	printf("%s: Testing %s\n", PROGNAME, "string_clear()");
	string_clear(s);
	for(i = 0; i <= len; i++)
		if(s[i] != '\0')
			return 4;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x87a(%rip), %rdi       # 0x206a
leaq 0x883(%rip), %rsi       # 0x207a
leaq 0x883(%rip), %rdx       # 0x2081
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x10c0
testq %rax, %rax
je 0x1863
movq %rax, %r14
leaq 0x879(%rip), %rdi       # 0x2095
xorl %r15d, %r15d
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1090
leaq 0x837(%rip), %rdi       # 0x206a
leaq 0x840(%rip), %rsi       # 0x207a
leaq 0x861(%rip), %rdx       # 0x20a2
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
callq 0x1110
cmpb $0x0, (%rbx,%r15)
jne 0x186a
incq %r15
cmpq %r14, %r15
jbe 0x1850
xorl %eax, %eax
jmp 0x186f
movl $0x2, %eax
jmp 0x186f
movl $0x4, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test2
static int _test2(String const * string, String const * rtrim, int rcount)
{
	int ret = 0;
	String * s;
	int res;

	if((s = string_new(string)) == NULL)
		return -1;
	/* string_rtrim */
	printf("%s: Testing %s\n", PROGNAME, "string_rtrim()");
	if((res = string_rtrim(s, rtrim)) != rcount)
	{
		printf("%s: %s, %s, %d: Test failed (expected: %d)\n", PROGNAME,
				string, rtrim, res, rcount);
		ret = 8;
	}
	string_delete(s);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
testq %rax, %rax
je 0x18f1
movq %rax, %rbx
leaq 0x7d1(%rip), %rdi       # 0x206a
leaq 0x7da(%rip), %rsi       # 0x207a
leaq 0x80a(%rip), %rdx       # 0x20b1
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1060
cmpl %ebp, %eax
je 0x18e7
leaq 0x7f9(%rip), %rdi       # 0x20c0
leaq 0x7ac(%rip), %rsi       # 0x207a
movq %r15, %rdx
movq %r14, %rcx
movl %eax, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1090
movl $0x8, %r12d
movq %rbx, %rdi
callq 0x1080
jmp 0x18f7
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test3
static int _test3(String const * string, String const * ltrim, int lcount)
{
	int ret = 0;
	String * s;
	int res;

	if((s = string_new(string)) == NULL)
		return -1;
	/* string_rtrim */
	printf("%s: Testing %s\n", PROGNAME, "string_ltrim()");
	if((res = string_ltrim(s, ltrim)) != lcount)
	{
		printf("%s: %s, %s, %d: Test failed (expected: %d)\n", PROGNAME,
				string, ltrim, res, lcount);
		ret = 16;
	}
	string_delete(s);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
testq %rax, %rax
je 0x197f
movq %rax, %rbx
leaq 0x743(%rip), %rdi       # 0x206a
leaq 0x74c(%rip), %rsi       # 0x207a
leaq 0x7b7(%rip), %rdx       # 0x20ec
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10b0
cmpl %ebp, %eax
je 0x1975
leaq 0x76b(%rip), %rdi       # 0x20c0
leaq 0x71e(%rip), %rsi       # 0x207a
movq %r15, %rdx
movq %r14, %rcx
movl %eax, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1090
movl $0x10, %r12d
movq %rbx, %rdi
callq 0x1080
jmp 0x1985
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test4
static int _test4(String const * string, String const * trim, int count)
{
	int ret = 0;
	String * s;
	int res;

	if((s = string_new(string)) == NULL)
		return -1;
	/* string_trim */
	printf("%s: Testing %s\n", PROGNAME, "string_trim()");
	if((res = string_trim(s, trim)) != count)
	{
		printf("%s: %s, %s, %d: Test failed (expected: %d)\n", PROGNAME,
				string, trim, res, count);
		ret = 32;
	}
	string_delete(s);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
testq %rax, %rax
je 0x1a0d
movq %rax, %rbx
leaq 0x6b5(%rip), %rdi       # 0x206a
leaq 0x6be(%rip), %rsi       # 0x207a
leaq 0x738(%rip), %rdx       # 0x20fb
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10f0
cmpl %ebp, %eax
je 0x1a03
leaq 0x6dd(%rip), %rdi       # 0x20c0
leaq 0x690(%rip), %rsi       # 0x207a
movq %r15, %rdx
movq %r14, %rcx
movl %eax, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1090
movl $0x20, %r12d
movq %rbx, %rdi
callq 0x1080
jmp 0x1a13
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test7
static int _test7(String const * string, size_t length,
		String const * expected)
{
	int ret = 0;
	String * s;

	printf("%s: Testing %s\n", PROGNAME, "string_new_length()");
	if((s = string_new_length(string, length)) == NULL)
		return 2;
	if(string_compare(s, expected) != 0)
	{
		printf("%s: %s, %zu, \"%s\": Test failed (expected: \"%s\")\n",
				PROGNAME, string, length, s, expected);
		ret = 2;
	}
	string_delete(s);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x551(%rip), %rdi       # 0x206a
leaq 0x55a(%rip), %rsi       # 0x207a
leaq 0x62f(%rip), %rdx       # 0x2156
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movq %r15, %rdi
movq %r14, %rsi
callq 0x1040
testq %rax, %rax
je 0x1b82
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1070
testl %eax, %eax
je 0x1b78
leaq 0x611(%rip), %rdi       # 0x216a
leaq 0x51a(%rip), %rsi       # 0x207a
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x1090
movl $0x2, %ebp
movq %r12, %rdi
callq 0x1080
jmp 0x1b87
movl $0x2, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test8
static int _test8(String const * string, String const * expected)
{
	int ret = 0;
	String * s;

	printf("%s: Testing %s\n", PROGNAME, "string_tolower()");
	if((s = string_new(string)) == NULL)
		return 2;
	string_tolower(s);
	if(string_compare(s, expected) != 0)
	{
		printf("%s: %s, \"%s\": Test failed (expected: \"%s\")\n",
				PROGNAME, string, s, expected);
		ret = 2;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4c4(%rip), %rdi       # 0x206a
leaq 0x4cd(%rip), %rsi       # 0x207a
leaq 0x5e7(%rip), %rdx       # 0x219b
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movq %r14, %rdi
callq 0x1050
testq %rax, %rax
je 0x1c02
movq %rax, %r15
movq %rax, %rdi
callq 0x10e0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1070
testl %eax, %eax
je 0x1c07
leaq 0x5c1(%rip), %rdi       # 0x21ac
leaq 0x488(%rip), %rsi       # 0x207a
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1090
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DeforaOS[P]libSystem/tests/string.c
// Function: test9
static int _test9(String const * string, String const * expected)
{
	int ret = 0;
	String * s;

	printf("%s: Testing %s\n", PROGNAME, "string_toupper()");
	if((s = string_new(string)) == NULL)
		return 2;
	string_toupper(s);
	if(string_compare(s, expected) != 0)
	{
		printf("%s: %s, \"%s\": Test failed (expected: \"%s\")\n",
				PROGNAME, string, s, expected);
		ret = 2;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x442(%rip), %rdi       # 0x206a
leaq 0x44b(%rip), %rsi       # 0x207a
leaq 0x5a2(%rip), %rdx       # 0x21d8
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movq %r14, %rdi
callq 0x1050
testq %rax, %rax
je 0x1c84
movq %rax, %r15
movq %rax, %rdi
callq 0x10d0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1070
testl %eax, %eax
je 0x1c89
leaq 0x53f(%rip), %rdi       # 0x21ac
leaq 0x406(%rip), %rsi       # 0x207a
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x1090
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: round_buffer_insert_read
void round_buffer_insert_read(round_buffer_t *rbuf, int64_t from, int64_t to)
{
    if ( to-from >= rbuf->size )
        error("The read length too big (%d), please increase the buffer length (currently %d)\n", to-from+1,rbuf->size);
    if ( from < rbuf->pos )
        error("The reads are not sorted (%ld comes after %ld).\n", from,rbuf->pos);

    int ifrom,ito,ibuf;
    ifrom = round_buffer_lidx2ridx(rbuf->start,rbuf->size,rbuf->pos,from);
    ito   = round_buffer_lidx2ridx(rbuf->start,rbuf->size,rbuf->pos,to);
    if ( ifrom>ito )
    {
        for (ibuf=ifrom; ibuf<rbuf->size; ibuf++)
            rbuf->buffer[ibuf]++;
        ifrom = 0;
    }
    for (ibuf=ifrom; ibuf<=ito; ibuf++)
        rbuf->buffer[ibuf]++;
}

// Assembly:
pushq %rax
movq %rdx, %r8
movq %rdx, %rax
subq %rsi, %rax
movslq 0x8(%rdi), %rdx
cmpq %rdx, %rax
jge 0x4898
movq (%rdi), %rdx
cmpq %rsi, %rdx
jg 0x48ac
movslq 0xc(%rdi), %r9
movslq 0x8(%rdi), %r10
movq (%rdi), %r11
subq %r11, %rsi
movq %rsi, %rax
cqto
idivq %r10
leaq (%rdx,%r9), %rax
cqto
idivq %r10
movq %rdx, %rcx
subq %r11, %r8
movq %r8, %rax
cqto
idivq %r10
addq %rdx, %r9
movq %r9, %rax
cqto
idivq %r10
cmpq %rdx, %rcx
jle 0x4877
cmpl %ecx, 0x8(%rdi)
jle 0x4875
movq 0x10(%rdi), %rax
movslq %ecx, %rcx
incl (%rax,%rcx,4)
incq %rcx
movslq 0x8(%rdi), %rsi
cmpq %rsi, %rcx
jl 0x4866
xorl %ecx, %ecx
cmpl %edx, %ecx
jg 0x4896
movslq %ecx, %rax
shlq $0x2, %rax
addq 0x10(%rdi), %rax
subl %ecx, %edx
incl %edx
xorl %ecx, %ecx
incl (%rax,%rcx,4)
incq %rcx
cmpl %ecx, %edx
jne 0x488c
popq %rax
retq
incq %rax
leaq 0x14932(%rip), %rdi     # 0x191d4
movq %rax, %rsi
xorl %eax, %eax
callq 0x465a
leaq 0x14971(%rip), %rdi     # 0x19224
xorl %eax, %eax
callq 0x465a
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: bwa_trim_read
int bwa_trim_read(int trim_qual, uint8_t *quals, int len, int reverse) 
{
    if ( len<BWA_MIN_RDLEN ) return 0;

    // Although the name implies that the read cannot be trimmed to more than BWA_MIN_RDLEN,
    //  the calculation can in fact trim it to (BWA_MIN_RDLEN-1). (bwa_trim_read in bwa/bwaseqio.c).
    int max_trimmed = len - BWA_MIN_RDLEN + 1;
    int l, sum=0, max_sum=0, max_l=0;

    for (l=0; l<max_trimmed; l++)
    {
        sum += trim_qual - quals[ reverse ? l : len-1-l ];
        if ( sum<0 ) break;
        if ( sum>max_sum )
        {
            max_sum = sum;
            // This is the correct way, but bwa clips from some reason one base less
            // max_l   = l+1;
            max_l   = l;
        }
    }
    return max_l;
}

// Assembly:
xorl %eax, %eax
cmpl $0x23, %edx
jl 0x4904
pushq %rbx
decl %edx
xorl %eax, %eax
xorl %r8d, %r8d
xorl %r10d, %r10d
xorl %r9d, %r9d
movl %r10d, %r11d
testl %ecx, %ecx
movl %r9d, %r10d
cmovel %edx, %r10d
movslq %r10d, %r10
movzbl (%rsi,%r10), %ebx
movl %edi, %r10d
subl %ebx, %r10d
addl %r11d, %r10d
js 0x4903
cmpl %r8d, %r10d
cmovgl %r10d, %r8d
cmovgl %r9d, %eax
incl %r9d
decl %edx
cmpl $0x21, %edx
jne 0x48cf
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: fai_gc_content
float fai_gc_content(stats_t *stats, int pos, int len)
{
    uint32_t gc,count,c;
    int i = pos - stats->rseq_pos, ito = i + len;
    assert( i>=0 && ito<=stats->nrseq_buf );

    // Count GC content
    gc = count = 0;
    for (; i<ito; i++)
    {
        c = stats->rseq_buf[i];
        if ( c==2 || c==4 )
        {
            gc++;
            count++;
        }
        else if ( c==1 || c==8 )
            count++;
    }
    return count ? (float)gc/count : 0;
}

// Assembly:
pushq %rax
subl 0x18c(%rdi), %esi
js 0x50e7
leal (%rsi,%rdx), %eax
cmpl 0x190(%rdi), %eax
jg 0x50e7
xorps %xmm0, %xmm0
testl %edx, %edx
jle 0x50cb
movl %esi, %edx
addq 0x180(%rdi), %rdx
xorl %edi, %edi
leaq 0x13fa0(%rip), %r8      # 0x1903c
xorl %ecx, %ecx
movzbl (%rdx), %r9d
decl %r9d
cmpl $0x7, %r9d
ja 0x50b9
movslq (%r8,%r9,4), %r9
addq %r8, %r9
jmpq *%r9
incl %edi
incl %ecx
incq %rdx
incl %esi
cmpl %esi, %eax
jg 0x509e
movl %edi, %eax
cvtsi2ss %rax, %xmm1
jmp 0x50d0
xorl %ecx, %ecx
xorps %xmm1, %xmm1
testl %ecx, %ecx
je 0x50e5
movl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
popq %rax
retq
leaq 0x142ea(%rip), %rdi     # 0x193d8
leaq 0x14301(%rip), %rsi     # 0x193f6
leaq 0x14305(%rip), %rcx     # 0x19401
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x3230
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: realloc_rseq_buffer
void realloc_rseq_buffer(stats_t *stats)
{
    int n = stats->nbases*10;
    if ( stats->gcd_bin_size > n ) n = stats->gcd_bin_size;
    if ( stats->mrseq_buf<n )
    {
        stats->rseq_buf = realloc(stats->rseq_buf,sizeof(uint8_t)*n);
        stats->mrseq_buf = n;
    }
}

// Assembly:
movl 0x8(%rdi), %eax
movl 0x138(%rdi), %ecx
addl %eax, %eax
leal (%rax,%rax,4), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
cmpl %eax, 0x188(%rdi)
jge 0x514f
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x180(%rdi), %rdi
movslq %eax, %r14
movq %r14, %rsi
callq 0x3430
movq %rax, 0x180(%rbx)
movl %r14d, 0x188(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: realloc_gcd_buffer
void realloc_gcd_buffer(stats_t *stats, int seq_len)
{
    if ( seq_len >= stats->gcd_bin_size )
        error("The --GC-depth bin size (%d) is set too low for the read length %d\n", stats->gcd_bin_size, seq_len);

    int n = 1 + stats->gcd_ref_size / (stats->gcd_bin_size - seq_len);
    if ( n <= stats->igcd )
        error("The --GC-depth bin size is too small or reference genome too big; please decrease the bin size or increase the reference length\n");
        
    if ( n > stats->ngcd )
    {
        stats->gcd = realloc(stats->gcd, n*sizeof(gc_depth_t));
        if ( !stats->gcd )
            error("Could not realloc GCD buffer, too many chromosomes or the genome too long?? [%u %u]\n", stats->ngcd,n);
        memset(&(stats->gcd[stats->ngcd]),0,(n-stats->ngcd)*sizeof(gc_depth_t));
        stats->ngcd = n;
    }

    realloc_rseq_buffer(stats);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %edx
movl 0x138(%rdi), %esi
cmpl %edx, %esi
jle 0x51db
movq %rdi, %rbx
movl 0x138(%rdi), %ecx
movl 0x13c(%rdi), %eax
subl %edx, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
incl %ebp
cmpl 0x12c(%rdi), %ebp
jbe 0x51e4
cmpl 0x128(%rbx), %ebp
jbe 0x51cd
movq 0x130(%rbx), %rdi
movslq %ebp, %rsi
shlq $0x3, %rsi
callq 0x3430
movq %rax, 0x130(%rbx)
testq %rax, %rax
je 0x51f2
movl 0x128(%rbx), %edi
movl %ebp, %edx
subl %edi, %edx
shlq $0x3, %rdi
addq 0x130(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x3260
movl %ebp, 0x128(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5106
leaq 0x14249(%rip), %rdi     # 0x1942b
jmp 0x5201
leaq 0x14284(%rip), %rdi     # 0x1946f
xorl %eax, %eax
callq 0x465a
movl 0x128(%rbx), %esi
leaq 0x142f1(%rip), %rdi     # 0x194f0
movl %ebp, %edx
xorl %eax, %eax
callq 0x465a
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: is_in_regions
int is_in_regions(bam1_t *bam_line, stats_t *stats)
{
    if ( !stats->regions ) return 1;

    if ( bam_line->core.tid >= stats->nregions || bam_line->core.tid<0 ) return 0;
    if ( !stats->is_sorted ) error("The BAM must be sorted in order for -t to work.\n");

    regions_t *reg = &stats->regions[bam_line->core.tid];
    if ( reg->cpos==reg->npos ) return 0;       // done for this chr

    // Find a matching interval or skip this read. No splicing of reads is done, no indels or soft clips considered, 
    //  even small overlap is enough to include the read in the stats.
    int i = reg->cpos;
    while ( i<reg->npos && reg->pos[i].to<=bam_line->core.pos ) i++;
    if ( i>=reg->npos ) { reg->cpos = reg->npos; return 0; }
    if ( bam_line->core.pos + bam_line->core.l_qseq + 1 < reg->pos[i].from ) return 0;
    reg->cpos = i;
    stats->reg_from = reg->pos[i].from;
    stats->reg_to   = reg->pos[i].to;

    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %eax
cmpq $0x0, 0x1b0(%rsi)
je 0x5f93
movl (%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x5f93
cmpl 0x1a4(%rsi), %ecx
jge 0x5f93
cmpl $0x0, 0x9c(%rsi)
je 0x5f9b
movq 0x1b0(%rsi), %rcx
movslq (%rdi), %rdx
leaq (%rdx,%rdx,2), %r8
movslq 0x8(%rcx,%r8,8), %r9
movl (%rcx,%r8,8), %edx
cmpl %edx, %r9d
je 0x5f93
leaq (%rcx,%r8,8), %rcx
cmpl %edx, %r9d
setl %bl
jge 0x5f90
movq 0x10(%rcx), %r10
movl 0x4(%rdi), %r11d
cmpl %r11d, 0x4(%r10,%r9,8)
jbe 0x5f33
movq %r9, %r8
jmp 0x5f53
movslq %edx, %rbx
leaq -0x1(%rbx), %r14
cmpq %r9, %r14
je 0x5f90
leaq 0x1(%r9), %r8
cmpl %r11d, 0xc(%r10,%r9,8)
movq %r8, %r9
jbe 0x5f3a
cmpq %rbx, %r8
setl %bl
testb %bl, %bl
je 0x5f90
movl 0x4(%rdi), %edx
movl 0x10(%rdi), %edi
leal (%rdx,%rdi), %r10d
incl %r10d
movq 0x10(%rcx), %rdx
movslq %r8d, %rdi
movl (%rdx,%rdi,8), %r9d
cmpl %r9d, %r10d
jb 0x5f93
movl %r8d, 0x8(%rcx)
movl %r9d, 0x1a8(%rsi)
movl 0x4(%rdx,%rdi,8), %eax
movl %eax, 0x1ac(%rsi)
movl $0x1, %eax
jmp 0x5f93
movl %edx, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x13d12(%rip), %rdi     # 0x19cb4
xorl %eax, %eax
callq 0x465a
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: gcd_percentile
float gcd_percentile(gc_depth_t *gcd, int N, int p)
{
    float n,d;
    int k;

    n = p*(N+1)/100;
    k = n;
    if ( k<=0 ) 
        return gcd[0].depth;
    if ( k>=N ) 
        return gcd[N-1].depth;

    d = n - k;
    return gcd[k-1].depth + d*(gcd[k].depth - gcd[k-1].depth);
}

// Assembly:
leal 0x1(%rsi), %eax
imull %edx, %eax
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
cvttss2si %xmm1, %eax
testl %eax, %eax
jle 0x5ffc
cmpl %esi, %eax
jge 0x6001
cvtsi2ss %eax, %xmm2
movl %eax, %eax
movl -0x4(%rdi,%rax,8), %ecx
movl 0x4(%rdi,%rax,8), %eax
cvtsi2ss %rcx, %xmm3
subl %ecx, %eax
cvtsi2ss %rax, %xmm0
subss %xmm2, %xmm1
mulss %xmm1, %xmm0
addss %xmm3, %xmm0
retq
movl 0x4(%rdi), %eax
jmp 0x6008
movslq %esi, %rax
movl -0x4(%rdi,%rax,8), %eax
cvtsi2ss %rax, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: gcd_cmp
static int gcd_cmp(const void *a, const void *b)
{
    if ( GCD_t(a)->gc < GCD_t(b)->gc ) return -1;
    if ( GCD_t(a)->gc > GCD_t(b)->gc ) return 1;
    if ( GCD_t(a)->depth < GCD_t(b)->depth ) return -1;
    if ( GCD_t(a)->depth > GCD_t(b)->depth ) return 1;
    return 0;
}

// Assembly:
movss (%rdi), %xmm0
movss (%rsi), %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
ucomiss %xmm0, %xmm1
ja 0x7085
movl $0x1, %eax
ucomiss %xmm1, %xmm0
ja 0x7085
movl 0x4(%rsi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0x4(%rdi)
jb 0x7085
seta %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/misc/bamcheck.c
// Function: mygetline
size_t mygetline(char **line, size_t *n, FILE *fp)
{
    if (line == NULL || n == NULL || fp == NULL)
    {
        errno = EINVAL;
        return -1;
    }
    if (*n==0 || !*line)
    {
        *line = NULL;
        *n = 0;
    }

    size_t nread=0;
    int c;
    while ((c=getc(fp))!= EOF && c!='\n')
    {
        if ( ++nread>=*n )
        {
            *n += 255;
            *line = realloc(*line, sizeof(char)*(*n));
        }
        (*line)[nread-1] = c;
    }
    if ( nread>=*n )
    {
        *n += 255;
        *line = realloc(*line, sizeof(char)*(*n));
    }
    (*line)[nread] = 0;
    return nread>0 ? nread : -1;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
andb %al, %cl
testq %rdx, %rdx
setne %al
testb %al, %cl
jne 0x70c0
callq 0x3090
movl $0x16, (%rax)
movq $-0x1, %rax
jmp 0x7153
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, (%rsi)
je 0x70d5
cmpq $0x0, (%rbx)
jne 0x70dd
xorl %eax, %eax
movq %rax, (%rbx)
movq %rax, (%r14)
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x35c0
cmpl $-0x1, %eax
je 0x7122
movl %eax, %ebp
cmpl $0xa, %eax
je 0x7122
leaq 0x1(%r12), %r13
movq (%r14), %rsi
cmpq %rsi, %r13
jb 0x7116
addq $0xff, %rsi
movq %rsi, (%r14)
movq (%rbx), %rdi
callq 0x3430
movq %rax, (%rbx)
movq (%rbx), %rax
movb %bpl, (%rax,%r12)
movq %r13, %r12
jmp 0x70e0
movq (%r14), %rsi
cmpq %rsi, %r12
jb 0x713f
addq $0xff, %rsi
movq %rsi, (%r14)
movq (%rbx), %rdi
callq 0x3430
movq %rax, (%rbx)
movq (%rbx), %rax
movb $0x0, (%rax,%r12)
xorl %eax, %eax
cmpq $0x1, %r12
sbbq %rax, %rax
orq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq