LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_FOCALGRADIENT
int swf_reader_read_FOCALGRADIENT(swf_reader *swf,swf_GRADIENT *g,unsigned int rgba) {
	unsigned int i;

	swf_reader_read_bytealign(swf); /* NTS: Adobe documentation does not mention byte alignment requirement */
	g->SpreadMode = swf_reader_read_UB(swf,2);
	g->InterpolationMode = swf_reader_read_UB(swf,2);
	g->NumGradients = swf_reader_read_UB(swf,4);
	for (i=0;i < g->NumGradients;i++) {
		g->GradientRecords[i].Ratio = swf_reader_read_UI8(swf);
		if (rgba)	swf_reader_read_RGBA(swf,&g->GradientRecords[i].Color);
		else		swf_reader_read_RGB_as_RGBA(swf,&g->GradientRecords[i].Color);
	}
	g->FocalPoint = (swf_FIXED8)swf_reader_read_SI16(swf);;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x59(%rdi)
movl $0x2, %esi
callq 0x2c63
movb (%rbx), %cl
andb $0x3, %al
andb $-0x4, %cl
orb %al, %cl
movb %cl, (%rbx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x2c63
movb (%rbx), %cl
shlb $0x2, %al
andb $0xc, %al
andb $-0xd, %cl
orb %al, %cl
movb %cl, (%rbx)
movq %r14, %rdi
movl $0x4, %esi
callq 0x2c63
movb (%rbx), %cl
movl %eax, %edx
shlb $0x4, %dl
andb $0xf, %cl
orb %dl, %cl
movb %cl, (%rbx)
testb $0xf, %al
je 0x402b
leaq 0x2(%rbx), %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movb %r13b, -0x29(%rbp)
movb %r13b, 0x59(%r14)
movq %r14, %rdi
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x2a27
movb -0x29(%rbp), %al
movb %al, -0x1(%r12)
cmpl $0x0, -0x30(%rbp)
je 0x400e
movq %r14, %rdi
movq %r12, %rsi
callq 0x2b36
jmp 0x4019
movq %r14, %rdi
movq %r12, %rsi
callq 0x2bdb
incq %r15
movzbl (%rbx), %eax
shrl $0x4, %eax
addq $0x5, %r12
cmpq %rax, %r15
jb 0x3fda
leaq -0x32(%rbp), %r15
movw $0x0, (%r15)
movb $0x0, 0x59(%r14)
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl (%r15), %eax
movw %ax, 0x52(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_GRADIENT
int swf_reader_read_GRADIENT(swf_reader *swf,swf_GRADIENT *g,unsigned int rgba) {
	unsigned int i;

	swf_reader_read_bytealign(swf); /* NTS: Adobe documentation does not mention byte alignment requirement */
	g->SpreadMode = swf_reader_read_UB(swf,2);
	g->InterpolationMode = swf_reader_read_UB(swf,2);
	g->NumGradients = swf_reader_read_UB(swf,4);
	for (i=0;i < g->NumGradients;i++) {
		g->GradientRecords[i].Ratio = swf_reader_read_UI8(swf);
		if (rgba)	swf_reader_read_RGBA(swf,&g->GradientRecords[i].Color);
		else		swf_reader_read_RGB_as_RGBA(swf,&g->GradientRecords[i].Color);
	}
	g->FocalPoint = 0;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movb $0x0, 0x59(%rdi)
movl $0x2, %esi
callq 0x2c63
movb (%rbx), %cl
andb $0x3, %al
andb $-0x4, %cl
orb %al, %cl
movb %cl, (%rbx)
movq %r15, %rdi
movl $0x2, %esi
callq 0x2c63
movb (%rbx), %cl
shlb $0x2, %al
andb $0xc, %al
andb $-0xd, %cl
orb %al, %cl
movb %cl, (%rbx)
movq %r15, %rdi
movl $0x4, %esi
callq 0x2c63
movb (%rbx), %cl
movl %eax, %edx
shlb $0x4, %dl
andb $0xf, %cl
orb %dl, %cl
movb %cl, (%rbx)
testb $0xf, %al
je 0x4128
leaq 0x2(%rbx), %r12
xorl %r13d, %r13d
xorl %r14d, %r14d
movb %r13b, -0x29(%rbp)
movb %r13b, 0x59(%r15)
movq %r15, %rdi
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x2a27
movb -0x29(%rbp), %al
movb %al, -0x1(%r12)
cmpl $0x0, -0x30(%rbp)
je 0x410b
movq %r15, %rdi
movq %r12, %rsi
callq 0x2b36
jmp 0x4116
movq %r15, %rdi
movq %r12, %rsi
callq 0x2bdb
incq %r14
movzbl (%rbx), %eax
shrl $0x4, %eax
addq $0x5, %r12
cmpq %rax, %r14
jb 0x40d7
movw $0x0, 0x52(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_LINESTYLE
int swf_reader_read_LINESTYLE(swf_reader *swf,swf_LINESTYLEARRAY_read *nfo) {
	nfo->Width = swf_reader_read_UI16(swf);
	if (nfo->color_rgba) swf_reader_read_RGBA(swf,&nfo->Color);
	else swf_reader_read_RGB_as_RGBA(swf,&nfo->Color);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1a(%rbp), %r15
movw $0x0, (%r15)
movb $0x0, 0x59(%rdi)
movq %r15, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl (%r15), %eax
movw %ax, 0x4(%r14)
leaq 0x6(%r14), %rsi
testb $0x1, (%r14)
jne 0x420c
movq %rbx, %rdi
callq 0x2bdb
jmp 0x4214
movq %rbx, %rdi
callq 0x2b36
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_LINESTYLE2
int swf_reader_read_LINESTYLE2(swf_reader *swf,swf_LINESTYLEARRAY_read *nfo) {
	nfo->Width = swf_reader_read_UI16(swf);
	nfo->StartCapStyle = swf_reader_read_UB(swf,2);
	nfo->JoinStyle = swf_reader_read_UB(swf,2);
	nfo->HasFillFlag = swf_reader_read_UB(swf,1);
	nfo->NoHScaleFlag = swf_reader_read_UB(swf,1);
	nfo->NoVScaleFlag = swf_reader_read_UB(swf,1);
	nfo->PixelHintingFlag = swf_reader_read_UB(swf,1);
	/* Reserved */swf_reader_read_UB(swf,5);
	nfo->NoClose = swf_reader_read_UB(swf,1);
	nfo->EndCapStyle = swf_reader_read_UB(swf,2);
	if (nfo->JoinStyle == 2) nfo->MiterLimitFactor = swf_reader_read_UI16(swf);
	else nfo->MiterLimitFactor = 0;
	if (nfo->HasFillFlag)
		return swf_reader_read_FILLSTYLE(swf,&nfo->FillType);
	else
		swf_reader_read_RGBA(swf,&nfo->Color);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1a(%rbp), %r15
movw $0x0, (%r15)
movb $0x0, 0x59(%rdi)
movq %r15, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl (%r15), %eax
movw %ax, 0x4(%rbx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
andl $0x3, %eax
andl $-0x4, %ecx
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
andl $0x3, %eax
andl $-0xd, %ecx
leal (%rcx,%rax,4), %eax
movw %ax, 0xa(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
shll $0x4, %eax
andl $0x10, %eax
andl $-0x11, %ecx
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
shll $0x5, %eax
andl $0x20, %eax
andl $-0x21, %ecx
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
shll $0x6, %eax
andl $0x40, %eax
andl $-0x41, %ecx
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
shll $0x7, %eax
movzbl %al, %eax
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x5, %esi
callq 0x2c63
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movzwl 0xa(%rbx), %ecx
andl $0x1, %eax
shll $0x8, %eax
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
orl %eax, %ecx
movw %cx, 0xa(%rbx)
movq %r14, %rdi
movl $0x2, %esi
callq 0x2c63
movzwl 0xa(%rbx), %edx
andl $0x3, %eax
shll $0x9, %eax
movl %edx, %ecx
andl $0xf9ff, %ecx           # imm = 0xF9FF
orl %eax, %ecx
movw %cx, 0xa(%rbx)
andl $0xc, %edx
cmpw $0x8, %dx
jne 0x4399
leaq -0x1c(%rbp), %r15
movw $0x0, (%r15)
movb $0x0, 0x59(%r14)
movq %r14, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl (%r15), %eax
movzwl 0xa(%rbx), %ecx
jmp 0x439b
xorl %eax, %eax
movw %ax, 0xc(%rbx)
testb $0x10, %cl
jne 0x43b7
addq $0x6, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2b36
xorl %eax, %eax
jmp 0x43c6
addq $0x10, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43d1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf_lzma_reader.c
// Function: swf_reader_init_lzma
int swf_reader_init_lzma(swf_reader *swf) {
	lzma_end(&swf->lzma);
	memset(&swf->lzma,0,sizeof(swf->lzma));
	if (lzma_alone_decoder(&swf->lzma,UINT64_MAX) != LZMA_OK) {
		fprintf(stderr,"LZMA failed to init\n");
		return -1;
	}

	swf->eof = 0;
	swf->zlib_eof = 0;
	swf->seek = swf_reader_lzma_seek;
	swf->read = swf_reader_lzma_read;
	swf->current_pos = swf->raw_current_pos;
	swf_reader_raw_seek(swf,8); /* put raw pointer back to just after the header */
	sliding_window_v4_empty(swf->decom_buf); /* reset buffer */
	sliding_window_v4_empty(swf->out_buf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xf8(%rdi), %r15
movq %r15, %rdi
callq 0x1130
xorl %ebx, %ebx
movl $0x88, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0
movq %r15, %rdi
movq $-0x1, %rsi
callq 0x1120
testl %eax, %eax
jne 0x468b
movw $0x0, 0x70(%r14)
leaq 0x5d(%rip), %rax        # 0x4697
movq %rax, 0x28(%r14)
leaq 0xd9(%rip), %rax        # 0x471e
movq %rax, 0x30(%r14)
movq (%r14), %rax
movq %rax, 0x8(%r14)
movl $0x8, %esi
movq %r14, %rdi
callq 0x29eb
movq 0x78(%r14), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq 0x80(%r14), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x140d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x467e
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf_lzma_reader.c
// Function: swf_reader_lzma_seek
int swf_reader_lzma_seek(void *io,uint64_t pos) {
	swf_reader *r = (swf_reader*)io;
	unsigned char temp[512];
	int rd;

	/* if seeking backward we only allow going back to the header */
	if (pos < r->current_pos) {
		if (pos > 8) {
			fprintf(stderr,"LZMA: Seeking backwards beyond the initial header not supported\n");
			return -1;
		}
		else {
			/* reset LZMA decoder */
			if (swf_reader_init_lzma(r)) {
				fprintf(stderr,"Failed to reset LZMA decoder\n");
				return -1;
			}

			r->current_pos = pos;
		}
	}

	/* read until the position */
	while (r->current_pos < pos) {
		uint64_t go = pos - r->current_pos;

		if (go > (uint64_t)sizeof(temp)) go = (uint64_t)sizeof(temp);
		rd = swf_reader_lzma_read(r,temp,(size_t)go);
		if (rd <= 0) return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x8(%rdi)
jbe 0x46cb
cmpq $0x9, %rbx
jae 0x4710
movq %r14, %rdi
callq 0x45ec
testl %eax, %eax
jne 0x4717
movq %rbx, 0x8(%r14)
movl $0x200, %r12d           # imm = 0x200
leaq -0x220(%rbp), %r15
movq %rbx, %rdx
subq 0x8(%r14), %rdx
jbe 0x46fe
cmpq %r12, %rdx
cmovaeq %r12, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x471e
testl %eax, %eax
jg 0x46d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4700
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x146b
jmp 0x46f7
callq 0x143c
jmp 0x46f7
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf_zlib_reader.c
// Function: swf_reader_init_zlib
int swf_reader_init_zlib(swf_reader *swf) {
	int rd;

	inflateEnd(&swf->zlib);
	memset(&swf->zlib,0,sizeof(swf->zlib));
	swf_reader_raw_seek(swf,8); /* put raw pointer back to just after the header */
	assert(swf->decom_buf->data == swf->decom_buf->end);
	rd = swf_reader_raw_read(swf,swf->decom_buf->data,sliding_window_v4_can_write(swf->decom_buf));
	swf->decom_buf->end += rd;
	if (rd <= 0) {
		fprintf(stderr,"Unable to read just past header\n");
		return -1;
	}

	memset(&swf->zlib,0,sizeof(swf->zlib));
	swf->zlib.next_in = swf->decom_buf->data;
	swf->zlib.avail_in = sliding_window_v4_data_available(swf->decom_buf);
	if (inflateInit(&swf->zlib) != Z_OK) {
		fprintf(stderr,"ZLIB failed to init\n");
		return -1;
	}

	swf->eof = 0;
	swf->zlib_eof = 0;
	swf->seek = swf_reader_zlib_seek;
	swf->read = swf_reader_zlib_read;
	swf->current_pos = swf->raw_current_pos;
	swf_reader_raw_seek(swf,8); /* put raw pointer back to just after the header */
	sliding_window_v4_empty(swf->decom_buf); /* reset buffer */
	sliding_window_v4_empty(swf->out_buf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x88(%rdi), %r14
movq %r14, %rdi
callq 0x1110
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x29eb
movq 0x78(%rbx), %rax
movq 0x10(%rax), %rsi
cmpq 0x18(%rax), %rsi
jne 0x4c41
movl 0x8(%rax), %edx
subl %esi, %edx
movq %rbx, %rdi
callq 0x2e61
movq 0x78(%rbx), %rcx
cltq
addq %rax, 0x18(%rcx)
testl %eax, %eax
jle 0x4c2e
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq 0x10(%rcx), %rax
movq %rax, 0x88(%rbx)
movl 0x18(%rcx), %ecx
subl %eax, %ecx
movl %ecx, 0x90(%rbx)
leaq 0x2a3a(%rip), %rsi      # 0x75ff
movq %r14, %rdi
movl $0x70, %edx
callq 0x1160
testl %eax, %eax
jne 0x4c35
movw $0x0, 0x70(%rbx)
leaq 0x7d(%rip), %rax        # 0x4c60
movq %rax, 0x28(%rbx)
leaq 0xf9(%rip), %rax        # 0x4ce7
movq %rax, 0x30(%rbx)
movq (%rbx), %rax
movq %rax, 0x8(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0x29eb
movq 0x78(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq 0x80(%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x18(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x14f8
jmp 0x4c3a
callq 0x14c9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4c29
leaq 0x2931(%rip), %rdi      # 0x7579
leaq 0x2956(%rip), %rsi      # 0x75a5
leaq 0x2961(%rip), %rcx      # 0x75b7
movl $0x16, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/swf_zlib_reader.c
// Function: swf_reader_zlib_seek
int swf_reader_zlib_seek(void *io,uint64_t pos) {
	swf_reader *r = (swf_reader*)io;
	unsigned char temp[512];
	int rd;

	/* if seeking backward we only allow going back to the header */
	if (pos < r->current_pos) {
		if (pos > 8) {
			fprintf(stderr,"ZLIB: Seeking backwards beyond the initial header not supported\n");
			return -1;
		}
		else {
			/* reset ZLIB decoder */
			if (swf_reader_init_zlib(r)) {
				fprintf(stderr,"Failed to reset ZLIB decoder\n");
				return -1;
			}

			r->current_pos = pos;
		}
	}

	/* read until the position */
	while (r->current_pos < pos) {
		uint64_t go = pos - r->current_pos;

		if (go > (uint64_t)sizeof(temp)) go = (uint64_t)sizeof(temp);
		rd = swf_reader_zlib_read(r,temp,(size_t)go);
		if (rd <= 0) return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x8(%rdi)
jbe 0x4c94
cmpq $0x9, %rbx
jae 0x4cd9
movq %r14, %rdi
callq 0x4af8
testl %eax, %eax
jne 0x4ce0
movq %rbx, 0x8(%r14)
movl $0x200, %r12d           # imm = 0x200
leaq -0x220(%rbp), %r15
movq %rbx, %rdx
subq 0x8(%r14), %rdx
jbe 0x4cc7
cmpq %r12, %rdx
cmovaeq %r12, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4ce7
testl %eax, %eax
jg 0x4ca1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x4cc9
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1556
jmp 0x4cc0
callq 0x1527
jmp 0x4cc0
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_set_custom_buffer
sliding_window_v4 *sliding_window_v4_set_custom_buffer(sliding_window_v4 *sw,size_t size,const unsigned char *data) {
	/* sanity check: the buffer pointer is NULL */
	assert(sw->buffer == NULL);
	/* sanity check: caller isn't trying to alloc a buffer on top of a buffer or mmap() window, it must be a null window.
	 * if it is a buffer, then it must be a buffer we don't own (meaning: previously called with set_custom_buffer) */
	assert(sw->type == SLIDING_WINDOW_V4_TYPE_NULL || (sw->type == SLIDING_WINDOW_V4_TYPE_BUFFER && !sw->u.buffer.lib_owner));
	/* OK, zero the struct and prepare it for buffer management */
	memset(sw,0,sizeof(*sw));
	if (size < 2) size = 2;
	sw->buffer = (unsigned char*)data;
	sw->type = SLIDING_WINDOW_V4_TYPE_BUFFER;
	sw->u.buffer.lib_owner = 0; /* this library does not own the buffer */
	sw->fence = sw->buffer + size;
	sw->data = sw->end = sw->buffer;
	return sw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, (%rdi)
jne 0x504c
movzbl 0x20(%rdi), %eax
testl %eax, %eax
je 0x5019
cmpl $0x1, %eax
jne 0x506b
cmpb $0x0, 0x30(%rdi)
jne 0x506b
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
cmpq $0x3, %rsi
movl $0x2, %eax
cmovaeq %rsi, %rax
movups %xmm0, 0x30(%rdi)
movq %rdx, (%rdi)
movb $0x1, 0x20(%rdi)
addq %rdx, %rax
movq %rax, 0x8(%rdi)
movq %rdx, 0x18(%rdi)
movq %rdx, 0x10(%rdi)
movq %rdi, %rax
popq %rbp
retq
leaq 0x2664(%rip), %rdi      # 0x76b7
leaq 0x2670(%rip), %rsi      # 0x76ca
leaq 0x267a(%rip), %rcx      # 0x76db
movl $0x35, %edx
callq 0x10a0
leaq 0x26d4(%rip), %rdi      # 0x7746
leaq 0x2651(%rip), %rsi      # 0x76ca
leaq 0x265b(%rip), %rcx      # 0x76db
movl $0x38, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_alloc_buffer
sliding_window_v4 *sliding_window_v4_alloc_buffer(sliding_window_v4 *sw,size_t size) {
	/* sanity check: the buffer pointer is NULL */
	assert(sw->buffer == NULL);
	/* sanity check: caller isn't trying to alloc a buffer on top of a buffer or mmap() window, it must be a null window */
	assert(sw->type == SLIDING_WINDOW_V4_TYPE_NULL);
	/* OK, zero the struct and prepare it for buffer management */
	memset(sw,0,sizeof(*sw));
	if (size < 2) size = 2;
	sw->buffer = (unsigned char*)malloc(size);
	if (!sw->buffer) return NULL;
	sw->type = SLIDING_WINDOW_V4_TYPE_BUFFER;
	sw->u.buffer.lib_owner = 1; /* this library owns the buffer */
	sw->fence = sw->buffer + size;
	sw->data = sw->end = sw->buffer;
	return sw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, (%rdi)
jne 0x50f8
movq %rdi, %rbx
cmpb $0x0, 0x20(%rdi)
jne 0x5117
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x38(%rbx)
cmpq $0x3, %rsi
movl $0x2, %r14d
cmovaeq %rsi, %r14
movq %r14, %rdi
callq 0x1140
movq %rax, (%rbx)
testq %rax, %rax
je 0x50ee
movb $0x1, %cl
movb %cl, 0x20(%rbx)
movb %cl, 0x30(%rbx)
addq %rax, %r14
movq %r14, 0x8(%rbx)
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x50f0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x25b8(%rip), %rdi      # 0x76b7
leaq 0x25c4(%rip), %rsi      # 0x76ca
leaq 0x26ab(%rip), %rcx      # 0x77b8
movl $0x46, %edx
callq 0x10a0
leaq 0x26e9(%rip), %rdi      # 0x7807
leaq 0x25a5(%rip), %rsi      # 0x76ca
leaq 0x268c(%rip), %rcx      # 0x77b8
movl $0x48, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_create_buffer
sliding_window_v4* sliding_window_v4_create_buffer(size_t size) {
	sliding_window_v4 *sw = sliding_window_v4_create_null();
	if (!sw) return NULL;
	if (sliding_window_v4_alloc_buffer(sw,size) == NULL) {
		free(sw);
		return NULL;
	}
	return sw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x40, %esi
callq 0x10e0
testq %rax, %rax
je 0x5183
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x508a
testq %rax, %rax
jne 0x5185
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_destroy
sliding_window_v4* sliding_window_v4_destroy(sliding_window_v4 *sw) {
	if (sw) {
		sliding_window_v4_free(sw);
		memset(sw,0,sizeof(*sw));
		free(sw);
	}
	return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x51b7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x20(%rdi)
jne 0x51a9
movq %rbx, %rdi
callq 0x53b9
movq %rbx, %rdi
callq 0x1030
addq $0x8, %rsp
popq %rbx
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x527b
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 0x526d
xorl %r15d, %r15d
movq %rdi, %rcx
addq %r14, %rcx
jb 0x526d
cmpq %rax, 0x10(%rbx)
ja 0x526d
cmpq %rax, 0x18(%rbx)
ja 0x526d
movq %r14, %rsi
callq 0x1150
testq %rax, %rax
je 0x526d
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 0x25ad(%rip), %rdi      # 0x782f
leaq 0x2441(%rip), %rsi      # 0x76ca
leaq 0x25c9(%rip), %rcx      # 0x7859
movl $0x8c, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/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 0x52af
cmpb $0x1, 0x20(%rdi)
jne 0x52af
popq %rbp
jmp 0x51e2
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x52df
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 0x52e1
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x530f
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 0x5311
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x4e50(%rip)      # 0xa178
jne 0x533b
movl $0x1e, %edi
callq 0x1190
movq %rax, 0x4e3d(%rip)      # 0xa178
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rsi, %r14
subq %rdi, %r14
je 0x5371
cmpb $0x1, 0x20(%rbx)
jne 0x5371
movq 0x18(%rbx), %r15
subq %rsi, %r15
je 0x5364
movq %r15, %rdx
callq 0x1170
movq (%rbx), %rdi
movq %rdi, 0x10(%rbx)
addq %rdi, %r15
movq %r15, 0x18(%rbx)
jmp 0x5374
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x53af
subq %rcx, %rdx
shrq $0x2, %rax
cmpq %rax, %rdx
jae 0x53b3
xorl %eax, %eax
popq %rbp
retq
popq %rbp
jmp 0x5313
// File: /workspace/github_c_makefile_star2_O3/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 0x53ec
cmpb $0x0, 0x30(%rbx)
je 0x53d7
callq 0x1030
jmp 0x53e5
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x53ec
movq %rbx, %rdi
callq *%rax
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5457
movq (%rdi), %rax
testq %rax, %rax
je 0x5443
movq 0x10(%rdi), %rdx
testq %rdx, %rdx
je 0x5457
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x5457
movq 0x18(%rdi), %rsi
testq %rsi, %rsi
je 0x5457
cmpq %rdx, %rax
setbe %dil
cmpq %rsi, %rdx
setbe %dl
andb %dil, %dl
cmpq %rcx, %rsi
setbe %sil
cmpq %rcx, %rax
setne %al
andb %sil, %al
andb %dl, %al
jmp 0x5459
cmpb $0x1, 0x20(%rdi)
je 0x5457
cmpq $0x0, 0x10(%rdi)
jne 0x5457
cmpq $0x0, 0x8(%rdi)
je 0x545e
xorl %eax, %eax
movzbl %al, %eax
popq %rbp
retq
cmpq $0x0, 0x18(%rdi)
sete %al
jmp 0x5459
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/sliding_window.c
// Function: sliding_window_v4_safe_strtoui
int sliding_window_v4_safe_strtoui(sliding_window_v4 *w,unsigned int *ret,int base) {
	unsigned char *scan,digit;

	if (sliding_window_v4_data_available(w) == 0) return 0;

	*ret = 0;
	scan = w->data;
	if (base == 0) {
		/* assume decimal */
		base = 10;

		/* starts with 0, then it's octal */
		if (*(w->data) == '0') {
			base = 8;
			scan++;
		}
		else {
			if (sliding_window_v4_data_available(w) < 2) return 0;
			if (!memcmp(w->data,"0x",2)) {
				scan += 2;
				base = 16;
			}
		}
	}

	do {
		if (scan >= w->end) return 0;

		if (*scan >= '0' && *scan <= '9')
			digit = *scan - '0';
		else if (*scan >= 'a' && *scan <= 'f')
			digit = *scan + 10 - 'a';
		else if (*scan >= 'A' && *scan <= 'F')
			digit = *scan + 10 - 'A';
		else
			break;

		if (digit >= (unsigned char)base)
			break;

		/* TODO: Overflow detect */
		*ret = (*ret * (unsigned int)base) + (unsigned int)digit;
		scan++;
	} while (1);

	w->data = scan;
	return 1;
}

// Assembly:
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %r8
xorl %eax, %eax
movq %r8, %r9
subq %rcx, %r9
je 0x5532
pushq %rbp
movq %rsp, %rbp
movl $0x0, (%rsi)
testl %edx, %edx
jne 0x54cd
cmpb $0x30, (%rcx)
jne 0x549b
incq %rcx
movl $0x8, %edx
jmp 0x54cd
cmpq $0x2, %r9
jb 0x5531
movzwl (%rcx), %edx
xorl %r9d, %r9d
cmpl $0x7830, %edx           # imm = 0x7830
sete %r9b
cmpw $0x7830, %dx            # imm = 0x7830
movl $0x10, %r10d
movl $0xa, %edx
cmovel %r10d, %edx
leaq (%rcx,%r9,2), %rcx
cmpq %r8, %rcx
jae 0x5531
movzbl %dl, %eax
subq %rcx, %r8
xorl %r9d, %r9d
movb (%rcx), %r10b
leal -0x30(%r10), %r11d
cmpb $0xa, %r11b
jb 0x5509
leal -0x61(%r10), %r11d
cmpb $0x5, %r11b
ja 0x54f8
addb $-0x57, %r10b
jmp 0x5506
leal -0x41(%r10), %r11d
cmpb $0x5, %r11b
ja 0x5528
addb $-0x37, %r10b
movl %r10d, %r11d
movzbl %r11b, %r10d
cmpl %r10d, %eax
jbe 0x5528
imull %edx, %r9d
addl %r10d, %r9d
movl %r9d, (%rsi)
incq %rcx
decq %r8
jne 0x54db
xorl %eax, %eax
jmp 0x5531
movq %rcx, 0x10(%rdi)
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1080
testq %rax, %rax
je 0x1e51
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 0x1080
testq %rax, %rax
je 0x1e3a
cmpq $0x6, %r12
movq %r15, %r12
jb 0x1e0d
movq %r14, (%rbx,%r15,8)
leaq -0x1(%r15), %rax
cmpq $0x5, %rax
ja 0x1efe
incq %r15
jmp 0x1e5a
movq %r14, (%rbx)
movl $0x1, %r15d
movl $0x9, %eax
subq %r15, %rax
andq $-0x2, %rax
movl $0x7, %ecx
subq %r15, %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%rbx,%r15,8), %rcx
addq $0x8, %rcx
xorl %edx, %edx
movdqa 0x1186(%rip), %xmm1     # 0x3010
movdqa 0x169e(%rip), %xmm2     # 0x3530
pxor %xmm2, %xmm0
leaq 0x15e9(%rip), %rsi      # 0x3486
pcmpeqd %xmm3, %xmm3
movq %rdx, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
por %xmm1, %xmm4
pxor %xmm2, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm0, %xmm5
pcmpeqd %xmm0, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %edi
notl %edi
testb $0x1, %dil
je 0x1ee2
movq %rsi, -0x8(%rcx,%rdx,8)
pxor %xmm3, %xmm4
pextrw $0x4, %xmm4, %edi
testb $0x1, %dil
je 0x1ef5
movq %rsi, (%rcx,%rdx,8)
addq $0x2, %rdx
cmpq %rdx, %rax
jne 0x1ea1
movl $0x8, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1110
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, (%r15)
je 0x1f56
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x0, (%r14)
je 0x1f4c
movq 0x8(%rsp), %rdx
cmpb $0x0, (%rdx)
jne 0x1f4c
xorl %eax, %eax
testq %rbx, %rbx
je 0x1f4c
movq %rcx, (%rbx)
jmp 0x1f4c
// File: /workspace/github_c_makefile_star2_O3/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 0x15dc(%rip), %r12      # 0x3566
leaq 0x15cf(%rip), %r13      # 0x3560
leaq 0x15c3(%rip), %rbp      # 0x355b
leaq 0x15b7(%rip), %r15      # 0x3556
movzbl (%r14), %eax
cmpl $0x26, %eax
jle 0x1fbc
cmpl $0x27, %eax
je 0x1fcb
cmpl $0x3e, %eax
je 0x1fd0
cmpl $0x3c, %eax
jne 0x1fed
movq %r15, %rdi
jmp 0x1fdc
cmpl $0x22, %eax
je 0x1fd5
cmpl $0x26, %eax
jne 0x1fe9
movq %r12, %rdi
jmp 0x1fdc
movq %r13, %rdi
jmp 0x1fdc
movq %rbp, %rdi
jmp 0x1fdc
leaq 0x1590(%rip), %rdi      # 0x356c
movq %rbx, %rsi
callq 0x10b0
incq %r14
jmp 0x1f9f
testl %eax, %eax
je 0x1ffa
movsbl %al, %edi
movq %rbx, %rsi
callq 0x10d0
jmp 0x1fe4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2130
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 0x1070
testq %rax, %rax
je 0x20e0
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 0x1130
testl %eax, %eax
jle 0x20e5
movl %eax, %r12d
movl 0x1c(%rsp), %edi
callq 0x1160
cmpl $-0x1, %eax
je 0x20c2
movslq %eax, %r15
addq 0x8(%rsp), %r15
cmpq %r14, %r15
ja 0x20ec
movl %r12d, %r12d
jne 0x20a6
cmpb $0x0, (%rbp,%r12)
jne 0x20ec
movl $0x1, %esi
movq %rbp, %rdi
movq %r12, %rdx
movq 0x10(%rsp), %rcx
callq 0x11b0
movq %r15, 0x8(%rsp)
jmp 0x20ca
movl %r12d, %r12d
movq 0x8(%rsp), %r15
addq %r12, %rbx
movq %r13, %rax
cmpq %r13, %rbx
movq 0x20(%rsp), %r12
jb 0x2050
jmp 0x2105
xorl %r15d, %r15d
jmp 0x2105
movq 0x8(%rsp), %r15
jmp 0x2105
leaq 0x1480(%rip), %rdi      # 0x3573
movq 0x10(%rsp), %rsi
callq 0x10b0
movq 0x8(%rsp), %r15
incq %r15
subq %r15, %r14
movl 0x18(%rsp), %ebx
movq 0x10(%rsp), %r15
jbe 0x2122
movl %ebx, %edi
movq %r15, %rsi
callq 0x1100
decq %r14
jne 0x2113
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x2157
leaq (%rdi,%rdx), %rax
movq %rdx, %r8
movq %rdi, %rcx
cmpb $0x0, (%rcx)
je 0x2157
incq %rcx
decq %r8
jne 0x2147
movq %rax, %rcx
movq %rcx, %rbx
subq %rdi, %rbx
cmpq %rdx, %rbx
jne 0x216c
movq %rsi, %rdi
callq 0x1070
jmp 0x21a9
movb (%rsi), %r8b
testb %r8b, %r8b
je 0x21a0
movq %rbx, %rdi
notq %rdi
addq %rdx, %rdi
movq %rsi, %rax
testq %rdi, %rdi
je 0x2190
movb %r8b, (%rcx)
incq %rcx
decq %rdi
jmp 0x2192
xorl %edi, %edi
movb 0x1(%rax), %r8b
incq %rax
testb %r8b, %r8b
jne 0x2180
jmp 0x21a3
movq %rsi, %rax
movb $0x0, (%rcx)
subq %rsi, %rax
addq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %rcx
testq %rdx, %rdx
je 0x21e4
decq %rdx
xorl %ecx, %ecx
cmpq %rcx, %rdx
je 0x21dd
movb (%rax,%rcx), %sil
movb %sil, (%rdi,%rcx)
incq %rcx
testb %sil, %sil
jne 0x21c0
addq %rax, %rcx
movq %rcx, %rdx
jmp 0x21f0
movb $0x0, (%rdi,%rcx)
addq %rax, %rcx
leaq 0x1(%rcx), %rdx
cmpb $0x0, (%rcx)
movq %rdx, %rcx
jne 0x21e4
notq %rax
addq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2022
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 0x1378(%rip), %rdi      # 0x3390
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xdcd(%rip), %rsi       # 0x3290
movl $0x12, %ecx
movq %rbx, %rdi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x48(%rbx), %rdi
leaq 0xe08(%rip), %rsi       # 0x32e0
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 0x24e4
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq $-0x2, %r15
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x1ae0
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 0x254a
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 0x1ae0
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 0x258d
incq %r12
addq $0x400, %r15            # imm = 0x400
cmpq $0x4, %r12
jne 0x2586
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rax
subq %rsi, %rax
movslq 0x8(%rdi), %r8
cmpq %r8, %rax
jge 0x4b53
movq (%rdi), %r10
movq %rsi, %rax
subq %r10, %rax
jl 0x4b6a
movq %rdx, %r9
movslq 0xc(%rdi), %rsi
cqto
idivq %r8
leaq (%rdx,%rsi), %rax
cqto
idivq %r8
movq %rdx, %rcx
subq %r10, %r9
movq %r9, %rax
cqto
idivq %r8
addq %rdx, %rsi
movq %rsi, %rax
cqto
idivq %r8
cmpq %rdx, %rcx
jle 0x4b32
cmpl %ecx, %r8d
jle 0x4b30
movq 0x10(%rdi), %rax
incl (%rax,%rcx,4)
incq %rcx
movslq 0x8(%rdi), %rsi
cmpq %rsi, %rcx
jl 0x4b21
xorl %ecx, %ecx
cmpl %edx, %ecx
jg 0x4b51
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 0x4b47
popq %rax
retq
incq %rax
leaq 0x15727(%rip), %rdi     # 0x1a284
movq %rax, %rsi
movl %r8d, %edx
xorl %eax, %eax
callq 0x4926
leaq 0x15763(%rip), %rdi     # 0x1a2d4
movq %r10, %rdx
xorl %eax, %eax
callq 0x4926
// File: /workspace/github_c_makefile_star2_O3/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 0x4bc5
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 0x4bc4
cmpl %r8d, %r10d
cmovgl %r10d, %r8d
cmovgl %r9d, %eax
incl %r9d
decl %edx
cmpl $0x21, %edx
jne 0x4b90
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5376
leal (%rsi,%rdx), %eax
cmpl 0x190(%rdi), %eax
jg 0x5376
testl %edx, %edx
jle 0x5371
movl %esi, %edx
addq 0x180(%rdi), %rdx
xorl %ecx, %ecx
leaq 0x14d09(%rip), %r8      # 0x1a03c
xorl %edi, %edi
movzbl (%rdx), %r9d
decl %r9d
cmpl $0x7, %r9d
ja 0x5350
movslq (%r8,%r9,4), %r9
addq %r8, %r9
jmpq *%r9
incl %ecx
incl %edi
incq %rdx
incl %esi
cmpl %esi, %eax
jg 0x5335
testl %edi, %edi
je 0x5371
movl %ecx, %eax
cvtsi2ss %rax, %xmm0
movl %edi, %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
jmp 0x5374
xorps %xmm0, %xmm0
popq %rax
retq
leaq 0x1510b(%rip), %rdi     # 0x1a488
leaq 0x15122(%rip), %rsi     # 0x1a4a6
leaq 0x15126(%rip), %rcx     # 0x1a4b1
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x3230
// File: /workspace/github_c_makefile_star2_O3/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 0x53de
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