LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_stock_raw_seek
int swf_reader_stock_raw_seek(void *io,uint64_t pos) {
	swf_reader *swf = (swf_reader*)io;

	if (swf == NULL) return -1;
	if (swf->file_fd < 0) return -1;
	if (lseek(swf->file_fd,(off_t)pos,SEEK_SET) != (off_t)pos) return -1;
	swf->raw_current_pos = pos;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2ca8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2cee
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x2cbb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2cee
movq -0x20(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x1070
cmpq -0x18(%rbp), %rax
je 0x2cdc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2cee
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_seek
int swf_reader_seek(swf_reader *r,uint64_t pos) {
	if (r == NULL) return -1;
	if (r->seek == NULL) return -1;
	r->eof = 0;
	return r->seek(r,pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3181
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3164
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3181
movq -0x10(%rbp), %rax
movb $0x0, 0x71(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read
int swf_reader_read(swf_reader *r,void *buf,int len) {
	int rd;

	if (r == NULL) return -1;
	if (r->read == NULL) return -1;
	if (r->read_stop != (uint64_t)0ULL) {
		if (r->current_pos >= r->read_stop) return 0;
		if ((r->current_pos+(uint64_t)len) > r->read_stop)
			len = (int)(r->read_stop - r->current_pos);
	}

	rd = r->read(r,buf,len);
	if (rd < len) r->eof = 1;
	return rd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x31b6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x324f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x31cd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x324f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x3221
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jb 0x31f3
movl $0x0, -0x4(%rbp)
jmp 0x324f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x60(%rcx), %rax
jbe 0x321f
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movl %eax, -0x1c(%rbp)
jmp 0x3221
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq *%rax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3249
movq -0x10(%rbp), %rax
movb $0x1, 0x71(%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_UI8
swf_UI8 swf_reader_read_UI8(swf_reader *swf) {
	unsigned char c = 0x00;
	swf_reader_read_bytealign(swf);
	swf_reader_read(swf,&c,1);
	return (swf_UI8)c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
callq 0x3190
movb -0x9(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_RGBA
void swf_reader_read_RGBA(swf_reader *swf,swf_RGBA *rgb) {
	rgb->Red = swf_reader_read_UI8(swf);
	rgb->Green = swf_reader_read_UI8(swf);
	rgb->Blue = swf_reader_read_UI8(swf);
	rgb->Alpha = swf_reader_read_UI8(swf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_RGB_as_RGBA
void swf_reader_read_RGB_as_RGBA(swf_reader *swf,swf_RGBA *rgb) {
	rgb->Red = swf_reader_read_UI8(swf);
	rgb->Green = swf_reader_read_UI8(swf);
	rgb->Blue = swf_reader_read_UI8(swf);
	rgb->Alpha = 0xFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x3(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_UB
swf_UI32 swf_reader_read_UB(swf_reader *swf,int bits) {
	swf_UI32 r = 0;
	int avail;

	if (bits <= 0 || bits > 32) return 0;

	while (bits > 0) {
		if (swf->bit_buffer_bits == 0) {
			swf->bit_buffer = swf_reader_read_UI8(swf);
			swf->bit_buffer_bits = 8;
		}

		avail = swf->bit_buffer_bits;
		if (avail > bits) avail = bits;
		swf->bit_buffer_bits -= avail;
		r <<= (swf_UI32)avail;
		r |= (((swf_UI32)swf->bit_buffer >> (swf_UI32)swf->bit_buffer_bits)) &
			(((swf_UI32)1 << (swf_UI32)avail) - 1);
		bits -= avail;
	}

	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x33f2
cmpl $0x20, -0x14(%rbp)
jle 0x33fe
movl $0x0, -0x4(%rbp)
jmp 0x34a4
jmp 0x3400
cmpl $0x0, -0x14(%rbp)
jle 0x349e
movq -0x10(%rbp), %rax
movzbl 0x59(%rax), %eax
cmpl $0x0, %eax
jne 0x3431
movq -0x10(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x58(%rax)
movq -0x10(%rbp), %rax
movb $0x8, 0x59(%rax)
movq -0x10(%rbp), %rax
movzbl 0x59(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x344a
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movzbl 0x59(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x59(%rax)
movl -0x1c(%rbp), %ecx
movl -0x18(%rbp), %eax
shll %cl, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x58(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl 0x59(%rcx), %ecx
shrl %cl, %eax
movl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x3400
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_SB
swf_SI32 swf_reader_read_SB(swf_reader *swf,int bits) {
	swf_UI32 r = 0;

	/* FIXME: Do we sign-extend if the field is only 1 bit long and bit is set? */
	if (bits <= 0 || bits > 32) return 0;
	r = swf_reader_read_UB(swf,bits);
	if (r & ((swf_UI32)1 << ((swf_UI32)(bits-1))))
		r |= (swf_UI32)0xFFFFFFFF << bits;

	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x34d2
cmpl $0x20, -0x14(%rbp)
jle 0x34db
movl $0x0, -0x4(%rbp)
jmp 0x3519
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x33d0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x3513
movl -0x14(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_RECT
void swf_reader_read_RECT(swf_reader *swf,swf_RECT *rect) {
	swf_reader_read_bytealign(swf);				/* "The RECT record must be byte aligned" */
	rect->Nbits = swf_reader_read_UB(swf,5);		/* UB[5] */
	rect->Xmin = swf_reader_read_SB(swf,rect->Nbits);	/* SB[Nbits] */
	rect->Xmax = swf_reader_read_SB(swf,rect->Nbits);	/* SB[Nbits] */
	rect->Ymin = swf_reader_read_SB(swf,rect->Nbits);	/* SB[Nbits] */
	rect->Ymax = swf_reader_read_SB(swf,rect->Nbits);	/* SB[Nbits] */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x33d0
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x34b0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_UI16
swf_UI16 swf_reader_read_UI16(swf_reader *swf) {
	unsigned char buf[2] = {0};
	swf_reader_read_bytealign(swf);
	swf_reader_read(swf,buf,2);
	return (swf_UI16)__le_u16(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq -0xa(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
leaq -0xa(%rbp), %rsi
movl $0x2, %edx
callq 0x3190
leaq -0xa(%rbp), %rdi
callq 0x3620
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_UI32
swf_UI32 swf_reader_read_UI32(swf_reader *swf) {
	unsigned char buf[4] = {0};
	swf_reader_read_bytealign(swf);
	swf_reader_read(swf,buf,4);
	return (swf_UI32)__le_u32(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x3190
leaq -0xc(%rbp), %rdi
callq 0x3690
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_SI32
swf_SI32 swf_reader_read_SI32(swf_reader *swf) {
	unsigned char buf[4] = {0};
	swf_reader_read_bytealign(swf);
	swf_reader_read(swf,buf,4);
	return (swf_SI32)__le_s32(buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq -0xc(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
movl $0x4, %edx
callq 0x3190
leaq -0xc(%rbp), %rdi
callq 0x37a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_uncompressed_seek
int swf_reader_uncompressed_seek(void *io,uint64_t pos) {
	swf_reader *r = (swf_reader*)io;
	int rd;

	rd = swf_reader_raw_seek((swf_reader*)io,pos);
	r->current_pos = r->raw_current_pos;
	return rd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x30d0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_uncompressed_read
int swf_reader_uncompressed_read(void *io,void *buf,int len) {
	swf_reader *r = (swf_reader*)io;
	int rd;

	rd = swf_reader_raw_read((swf_reader*)io,buf,len);
	r->current_pos = r->raw_current_pos;
	return rd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x37b0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_stock_raw_read
int swf_reader_stock_raw_read(void *io,void *buf,int len) {
	swf_reader *swf = (swf_reader*)io;
	int rd;

	if (swf == NULL) return -1;
	if (swf->file_fd < 0) return -1;
	if (len <= 0) return 0;
	rd = read(swf->file_fd,buf,len);
	if (rd < 0) return -1;
	swf->raw_current_pos += (uint64_t)rd;
	return rd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x38cb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3927
movq -0x28(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x38de
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3927
cmpl $0x0, -0x1c(%rbp)
jg 0x38ed
movl $0x0, -0x4(%rbp)
jmp 0x3927
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x10b0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jge 0x3913
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3927
movslq -0x2c(%rbp), %rcx
movq -0x28(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_close_file
void swf_reader_close_file(swf_reader *r) {
	if (r->zlib.next_in != NULL) {
		inflateEnd(&r->zlib);
		memset(&r->zlib,0,sizeof(r->zlib));
	}
	if (r->lzma.next_in != NULL) {
		lzma_end(&r->lzma);
		memset(&r->lzma,0,sizeof(r->lzma));
	}
	r->decom_buf = sliding_window_v4_destroy(r->decom_buf);
	r->out_buf = sliding_window_v4_destroy(r->out_buf);
	if (r->file_fd >= 0) {
		if (r->file_fd_owner) close(r->file_fd);
		r->file_fd = -1;
	}
	r->file_fd_owner = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x39a1
movq -0x8(%rbp), %rdi
addq $0x88, %rdi
callq 0x10e0
movq -0x8(%rbp), %rdi
addq $0x88, %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x1090
movq -0x8(%rbp), %rax
cmpq $0x0, 0xf8(%rax)
je 0x39d6
movq -0x8(%rbp), %rdi
addq $0xf8, %rdi
callq 0x1100
movq -0x8(%rbp), %rdi
addq $0xf8, %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x1090
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x6de0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x6de0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x3a37
movq -0x8(%rbp), %rax
cmpb $0x0, 0x14(%rax)
je 0x3a2c
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x10a0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movb $0x0, 0x14(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_create
swf_reader *swf_reader_create() {
	swf_reader *r = (swf_reader*)malloc(sizeof(swf_reader));
	if (r == NULL) return NULL;
	if (swf_reader_init(r)) {
		free(r);
		return NULL;
	}
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x180, %edi            # imm = 0x180
callq 0x1110
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3a97
movq $0x0, -0x8(%rbp)
jmp 0x3ac0
movq -0x10(%rbp), %rdi
callq 0x3930
cmpl $0x0, %eax
je 0x3ab8
movq -0x10(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
jmp 0x3ac0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_destroy
swf_reader *swf_reader_destroy(swf_reader *r) {
	if (r != NULL) {
		swf_reader_free(r);
		free(r);
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3af5
movq -0x8(%rbp), %rdi
callq 0x3a50
movq -0x8(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_record
int swf_reader_read_record(swf_reader *r,swf_tag *tag) {
	swf_UI16 tmp;

	if (r->current_pos > r->next_tag) {
		if (swf_reader_seek(r,r->next_tag)) {
			fprintf(stderr,"SWF I/O error: file pointer past next tag and cannot seek to it\n");
			return 0;
		}
	}

	if (!r->eof && r->current_pos < r->next_tag) {
		if (swf_reader_seek(r,r->next_tag)) {
			r->eof = 1;
			return 0;
		}
	}
	if (r->eof) return 0;

	tag->absolute_tag_offset = r->current_pos;
	tmp = swf_reader_read_UI16(r);
	tag->record.TagCode = tmp >> 6;
	tag->record.Length = tmp & 0x3F;
	if (tag->record.Length == 0x3F) tag->record.Length = swf_reader_read_UI32(r);
	tag->absolute_offset = r->current_pos;
	r->next_tag = tag->absolute_offset + tag->record.Length;
	if (r->eof) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x68(%rcx), %rax
jbe 0x3b7e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x3130
cmpl $0x0, %eax
je 0x3b7c
movq 0x8499(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x59f8(%rip), %rsi      # 0x9561
movb $0x0, %al
callq 0x10c0
movl $0x0, -0x4(%rbp)
jmp 0x3c78
jmp 0x3b7e
movq -0x10(%rbp), %rax
cmpb $0x0, 0x71(%rax)
jne 0x3bc6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x68(%rcx), %rax
jae 0x3bc6
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x3130
cmpl $0x0, %eax
je 0x3bc4
movq -0x10(%rbp), %rax
movb $0x1, 0x71(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3c78
jmp 0x3bc6
movq -0x10(%rbp), %rax
cmpb $0x0, 0x71(%rax)
je 0x3bdc
movl $0x0, -0x4(%rbp)
jmp 0x3c78
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, -0x1a(%rbp)
movzwl -0x1a(%rbp), %eax
sarl $0x6, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movzwl -0x1a(%rbp), %ecx
andl $0x3f, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
cmpl $0x3f, 0x4(%rax)
jne 0x3c34
movq -0x10(%rbp), %rdi
callq 0x3640
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x71(%rax)
je 0x3c71
movl $0x0, -0x4(%rbp)
jmp 0x3c78
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_assign_fd
int swf_reader_assign_fd(swf_reader *r,int fd) {
	if (fd != r->file_fd) {
		swf_reader_close_file(r);
		r->file_fd = fd;
		r->file_fd_owner = 0;
	}

	r->raw_seek = swf_reader_stock_raw_seek;
	r->raw_read = swf_reader_stock_raw_read;
	r->seek = NULL;
	r->read = NULL;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x3cc6
movq -0x8(%rbp), %rdi
callq 0x3960
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
leaq -0x1051(%rip), %rcx     # 0x2c80
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
leaq -0x440(%rip), %rcx      # 0x38a0
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_DefineSound
int swf_reader_read_DefineSound(swf_reader *swf,swf_DefineSound *h) {
	h->SoundId = swf_reader_read_UI16(swf);
	h->SoundFormat = swf_reader_read_UB(swf,4);
	h->SoundFormat_str = swf_SoundCompressionUB4[h->SoundFormat];
	h->SoundRate = swf_reader_read_UB(swf,2);
	h->SoundRate_value = swf_SoundRatesUB2[h->SoundRate];
	h->SoundSize = swf_reader_read_UB(swf,1);
	h->SoundSize_value = h->SoundSize ? 16 : 8;
	h->SoundType = swf_reader_read_UB(swf,1);
	h->SoundType_value = h->SoundSize ? 2 : 1;
	h->SoundSampleCount = swf_reader_read_UI32(swf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x10(%rax), %cl
andb $0xf, %dl
andb $-0x10, %cl
orb %dl, %cl
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rax
movb 0x10(%rax), %al
andb $0xf, %al
movzbl %al, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x8002(%rip), %rax      # 0xc0d0
movq (%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x10(%rax), %cl
andb $0x3, %dl
shlb $0x4, %dl
andb $-0x31, %cl
orb %dl, %cl
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rax
movb 0x10(%rax), %al
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x50a1(%rip), %rax      # 0x91bc
movw (%rax,%rcx,2), %cx
movq -0x10(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x10(%rax), %cl
andb $0x1, %dl
shlb $0x6, %dl
andb $-0x41, %cl
orb %dl, %cl
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rax
movb 0x10(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %edx
movl $0x8, %eax
movl $0x10, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x14(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x10(%rax), %cl
andb $0x1, %dl
shlb $0x7, %dl
andb $0x7f, %cl
orb %dl, %cl
movb %cl, 0x10(%rax)
movq -0x10(%rbp), %rax
movb 0x10(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x15(%rax)
movq -0x8(%rbp), %rdi
callq 0x3640
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_FileAttributes
int swf_reader_read_FileAttributes(swf_reader *swf,swf_FileAttributes *a) {
	unsigned int __attribute__((unused)) Reserved;

	Reserved = swf_reader_read_UB(swf,1);
	a->UseDirectBlit = swf_reader_read_UB(swf,1);
	a->UseGPU = swf_reader_read_UB(swf,1);
	a->HasMetadata = swf_reader_read_UB(swf,1);
	a->ActionScript3 = swf_reader_read_UB(swf,1);
	Reserved = swf_reader_read_UB(swf,2);
	a->UseNetwork = swf_reader_read_UB(swf,1);
	Reserved = swf_reader_read_UB(swf,24);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb $0x2, %dl
andb $-0x5, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb $0x3, %dl
andb $-0x9, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
shlb $0x4, %dl
andb $-0x11, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x18, %esi
callq 0x33d0
movl %eax, -0x14(%rbp)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_DefineFont_step1
int swf_reader_read_DefineFont_step1(swf_reader *swf,swf_DefineFont *n) {
	n->FontID = swf_reader_read_UI16(swf);
	n->absoluteOffsetTable = swf->current_pos;
	n->_OffsetTableEntry0 = swf_reader_read_UI16(swf);

	/* "Because the GlyphShapeTable immediately follows the OffsetTable, the number of
	 * entries in each table (the number of glyphs in the font) can be inferred by
	 * dividing the first entry in the OffsetTable by two". Ooookay then.. */
	n->nGlyphs = n->_OffsetTableEntry0 >> 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movzwl 0x4(%rax), %eax
sarl %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_DefineFont_alloc_OffsetTable
int swf_reader_read_DefineFont_alloc_OffsetTable(swf_DefineFont *nfo) {
	if (nfo->OffsetTable != NULL || nfo->nGlyphs == 0) return 0;
	nfo->OffsetTable = (swf_UI16*)malloc(sizeof(swf_UI16) * nfo->nGlyphs);
	if (nfo->OffsetTable == NULL) return -1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4714
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x471d
movl $0x0, -0x4(%rbp)
jmp 0x4755
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, %edi
shlq %rdi
callq 0x1110
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x474e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4755
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_DefineFont_read_OffsetTable
int swf_reader_read_DefineFont_read_OffsetTable(swf_reader *swf,swf_DefineFont *nfo) {
	unsigned int i;

	if (nfo->OffsetTable == NULL) return (nfo->nGlyphs == 0 ? 0 : -1);
	nfo->OffsetTable[0] = nfo->_OffsetTableEntry0; /* NTS: Remember? We had to read the first one to infer nGlyphs */
	for (i=1;i < nfo->nGlyphs;i++) nfo->OffsetTable[i] = swf_reader_read_UI16(swf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4795
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x47eb
movq -0x18(%rbp), %rax
movw 0x4(%rax), %cx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movw %cx, (%rax)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jae 0x47e4
movq -0x10(%rbp), %rdi
callq 0x35d0
movw %ax, %dx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x47af
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_PlaceObject
int swf_reader_read_PlaceObject(swf_reader *swf,swf_PlaceObject *r) {
	r->CharacterId = swf_reader_read_UI16(swf);
	r->Depth = swf_reader_read_UI16(swf);
	swf_reader_read_MATRIX(swf,&r->Matrix);
	/* TODO: If there is room yet in the tag, read a CXFORM into &r->ColorTransform */
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
callq 0x4850
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_DefineShape4_header
int swf_reader_read_DefineShape4_header(swf_reader *swf,swf_DefineShape *r) {
	r->ShapeId = swf_reader_read_UI16(swf);
	swf_reader_read_RECT(swf,&r->ShapeBounds);
	swf_reader_read_RECT(swf,&r->EdgeBounds);
	/* Reserved */swf_reader_read_UB(swf,5);
	r->UsesFillWindingRule = swf_reader_read_UB(swf,1);
	r->UsesNonScalingStrokes = swf_reader_read_UB(swf,1);
	r->UsesScalingStrokes = swf_reader_read_UB(swf,1);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x4, %rsi
callq 0x3530
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x3530
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x33d0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x2c(%rax), %cl
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x2c(%rax), %cl
andb $0x1, %dl
shlb %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb 0x2c(%rax), %cl
andb $0x1, %dl
shlb $0x2, %dl
andb $-0x5, %cl
orb %dl, %cl
movb %cl, 0x2c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_SHAPE_beginning
int swf_reader_read_SHAPE_beginning(swf_reader *swf,swf_SHAPE_reading *r) {
	swf_reader_read_bytealign(swf);
	r->NumFillBits = swf_reader_read_UB(swf,4);
	r->NumLineBits = swf_reader_read_UB(swf,4);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
andw $-0x10, %cx
orw %dx, %cx
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0x4, %dx
andw $0xff0f, %cx            # imm = 0xFF0F
orw %dx, %cx
movw %cx, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x3, %dl
shlb $0x2, %dl
andb $-0xd, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0xf, %dl
shlb $0x4, %dl
andb $0xf, %cl
orb %dl, %cl
movb %cl, (%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movb (%rcx), %cl
shrb $0x4, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jae 0x52b7
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
addq $0x1, %rax
movl -0x18(%rbp), %edx
imulq $0x5, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
cmpl $0x0, -0x14(%rbp)
je 0x5288
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x18(%rbp), %eax
imulq $0x5, %rax, %rax
addq %rax, %rsi
addq $0x1, %rsi
callq 0x3310
jmp 0x52a7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x18(%rbp), %eax
imulq $0x5, %rax, %rax
addq %rax, %rsi
addq $0x1, %rsi
callq 0x3370
jmp 0x52a9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x522f
movq -0x8(%rbp), %rdi
callq 0x36e0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x52(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3260
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x3, %dl
shlb $0x2, %dl
andb $-0xd, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x33d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0xf, %dl
shlb $0x4, %dl
andb $0xf, %cl
orb %dl, %cl
movb %cl, (%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movb (%rcx), %cl
shrb $0x4, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jae 0x53f7
movq -0x8(%rbp), %rdi
callq 0x3280
movb %al, %cl
movq -0x10(%rbp), %rax
addq $0x1, %rax
movl -0x18(%rbp), %edx
imulq $0x5, %rdx, %rdx
addq %rdx, %rax
movb %cl, (%rax)
cmpl $0x0, -0x14(%rbp)
je 0x53c8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x18(%rbp), %eax
imulq $0x5, %rax, %rax
addq %rax, %rsi
addq $0x1, %rsi
callq 0x3310
jmp 0x53e7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0x18(%rbp), %eax
imulq $0x5, %rax, %rax
addq %rax, %rsi
addq $0x1, %rsi
callq 0x3370
jmp 0x53e9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x536f
movq -0x10(%rbp), %rax
movw $0x0, 0x52(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/joncampbell123[P]swfhax/swf.c
// Function: swf_reader_read_FILLSTYLEARRAY_header
int swf_reader_read_FILLSTYLEARRAY_header(swf_reader *swf,swf_FILLSTYLEARRAY_read *nfo,unsigned int tag_code) {
	nfo->color_rgba = (tag_code == swftag_DefineShape3 || tag_code == swftag_DefineShape4);
	nfo->FillStyleCount = swf_reader_read_UI8(swf);
	if (nfo->FillStyleCount == 0xFF) nfo->FillStyleCount = swf_reader_read_UI16(swf);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb $0x1, %al
cmpl $0x20, -0x14(%rbp)
movb %al, -0x15(%rbp)
je 0x5438
cmpl $0x53, -0x14(%rbp)
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movb %cl, %dl
movb (%rax), %cl
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
callq 0x3280
movzbl %al, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0xff, %eax
jne 0x548c
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x35d0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x54e7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x6, %rsi
callq 0x3310
jmp 0x54f8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x6, %rsi
callq 0x3370
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xf8, %rdi
callq 0x1100
movq -0x10(%rbp), %rdi
addq $0xf8, %rdi
xorl %esi, %esi
movl $0x88, %edx
callq 0x1090
movq -0x10(%rbp), %rdi
addq $0xf8, %rdi
movq $-0x1, %rsi
callq 0x10f0
cmpl $0x0, %eax
je 0x5ab0
movq 0x6562(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x3cbc(%rip), %rsi      # 0x975c
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5b1f
movq -0x10(%rbp), %rax
movb $0x0, 0x71(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x70(%rax)
movq -0x10(%rbp), %rax
leaq 0x65(%rip), %rcx        # 0x5b30
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
leaq 0x176(%rip), %rcx       # 0x5c50
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x30d0
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x6290
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x6290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x5bc4
cmpq $0x8, -0x18(%rbp)
jbe 0x5b84
movq 0x6491(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x3c00(%rip), %rsi      # 0x9771
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c39
movq -0x20(%rbp), %rdi
callq 0x5a40
cmpl $0x0, %eax
je 0x5bb6
movq 0x645f(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x3c0f(%rip), %rsi      # 0x97b2
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c39
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x5bc4
jmp 0x5bc6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x5c32
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x230(%rbp)
cmpq $0x200, -0x230(%rbp) # imm = 0x200
jbe 0x5bff
movq $0x200, -0x230(%rbp) # imm = 0x200
movq -0x20(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movq -0x230(%rbp), %rax
movl %eax, %edx
callq 0x5c50
movl %eax, -0x224(%rbp)
cmpl $0x0, -0x224(%rbp)
jg 0x5c30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5c39
jmp 0x5bc6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x230, %rsp            # imm = 0x230
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x65d4
cmpq $0x8, -0x18(%rbp)
jbe 0x6594
movq 0x5a81(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x33d5(%rip), %rsi      # 0x9956
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6649
movq -0x20(%rbp), %rdi
callq 0x6300
cmpl $0x0, %eax
je 0x65c6
movq 0x5a4f(%rip), %rax      # 0xbff8
movq (%rax), %rdi
leaq 0x33e4(%rip), %rsi      # 0x9997
movb $0x0, %al
callq 0x10c0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6649
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x65d4
jmp 0x65d6
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0x6642
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x230(%rbp)
cmpq $0x200, -0x230(%rbp) # imm = 0x200
jbe 0x660f
movq $0x200, -0x230(%rbp) # imm = 0x200
movq -0x20(%rbp), %rdi
leaq -0x220(%rbp), %rsi
movq -0x230(%rbp), %rax
movl %eax, %edx
callq 0x6660
movl %eax, -0x224(%rbp)
cmpl $0x0, -0x224(%rbp)
jg 0x6640
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6649
jmp 0x65d6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6b50
jmp 0x6b6f
leaq 0x2e9b(%rip), %rdi      # 0x99f2
leaq 0x2ea7(%rip), %rsi      # 0x9a05
movl $0x35, %edx
leaq 0x2eac(%rip), %rcx      # 0x9a16
callq 0x1080
movq -0x8(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
je 0x6b93
movq -0x8(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x1, %eax
jne 0x6b95
movq -0x8(%rbp), %rax
cmpb $0x0, 0x30(%rax)
jne 0x6b95
jmp 0x6bb4
leaq 0x2ee5(%rip), %rdi      # 0x9a81
leaq 0x2e62(%rip), %rsi      # 0x9a05
movl $0x38, %edx
leaq 0x2e67(%rip), %rcx      # 0x9a16
callq 0x1080
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x1090
cmpq $0x2, -0x10(%rbp)
jae 0x6bd3
movq $0x2, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)