LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/class_info.cpp
// Function: class_info::get_trait_by_name(multiname_info*)
traits_info *class_info::get_trait_by_name(multiname_info *key) {
	auto search = ordered_trait.find(key);
	if(search != ordered_trait.end()) {
		return search->second;
	} else {
		std::cout << "name = " << key->str << std::endl;
		fatal("Could not find trait by name");
	}
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x3b50
addq $0x10, %rdi
movq %rdi, %rax
xorl %edx, %edx
cmpq %rbx, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x3b28
cmpq %rdi, %rax
je 0x3b50
cmpq %rbx, 0x20(%rax)
ja 0x3b50
movq 0x28(%rax), %rax
popq %rbx
retq
movq 0x5479(%rip), %rdi      # 0x8fd0
leaq 0x25e4(%rip), %rsi      # 0x6142
callq 0x21c0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20f0
movl $0x18, %edi
callq 0x2100
movl $0x99, (%rax)
leaq 0x25a1(%rip), %rcx      # 0x612f
movq %rcx, 0x8(%rax)
leaq 0x25b1(%rip), %rcx      # 0x614a
movq %rcx, 0x10(%rax)
leaq 0x51ec(%rip), %rsi      # 0x8d90
movq %rax, %rdi
xorl %edx, %edx
callq 0x22d0
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/exception_info.cpp
// Function: exception_info::load(abc_stream&)
void exception_info::load(abc_stream &stream) {
	stream >> from;
	stream >> to;
	stream >> target;
	uint32_t str_index;
	stream >> str_index;
	exc_type = abc_file::get_str(str_index);
	stream >> str_index;
	var_name = abc_file::get_str(str_index);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x30a0
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
callq 0x2e72
movq %rax, 0x10(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
callq 0x2e72
movq %rax, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/int_stack.cpp
// Function: int_stack::int_stack(int)
int_stack::int_stack(int n) {
	if (n != 0) {
		arr = new int32_t[n];
	} else {
		arr = nullptr;
	}
	ptr = arr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x41d2
movl %esi, %eax
shlq $0x2, %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
jmp 0x41d4
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/method_info.cpp
// Function: method_info::load_header(abc_stream&)
void method_info::load_header(abc_stream &stream) {
	uint32_t param_count;
	stream >> param_count;
	uint32_t index;	
	stream >> index;
	return_type = abc_file::get_multiname(index);
	param_type = Array<multiname_info *>(param_count);
	for (unsigned i = 0; i < param_count; ++i) {
		stream >> index;
		param_type[i] = abc_file::get_multiname(index);
	}
	stream >> index;
	str = abc_file::get_str(index);
	stream >> flags;
	if (flags & HAS_OPTIONAL) {
		uint32_t count;
		stream >> count;
		uint32_t dummy1;
		uint8_t dummy2;
		for (unsigned i = 0; i < count; ++i) {
			stream >> dummy1;
			stream >> dummy2;
		}
	}
	if (flags & HAS_PARAM_NAMES) {
		uint32_t dummy1;
		for (unsigned i = 0; i < param_count; ++i) {
			stream >> dummy1;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x30a0
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x30a0
movl (%r12), %edi
callq 0x2ebe
movq %rax, 0x10(%r14)
movl (%r15), %r15d
testq %r15, %r15
je 0x4289
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x2030
movl %r15d, (%r14)
movq %rax, 0x8(%r14)
xorl %r12d, %r12d
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30a0
movl 0xc(%rsp), %edi
callq 0x2ebe
movq 0x8(%r14), %rcx
movslq %r12d, %r12
movq %rax, (%rcx,%r12,8)
incl %r12d
cmpl 0x10(%rsp), %r12d
jb 0x425e
jmp 0x4294
movl %r15d, (%r14)
movq $0x0, 0x8(%r14)
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
callq 0x2e72
movq %rax, 0x18(%r14)
leaq 0x20(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x307a
movb 0x20(%r14), %al
testb $0x8, %al
je 0x430a
leaq 0x18(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30a0
cmpl $0x0, (%r14)
je 0x4307
xorl %ebp, %ebp
leaq 0x1c(%rsp), %r14
leaq 0x17(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30a0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x307a
incl %ebp
cmpl 0x18(%rsp), %ebp
jb 0x42e9
movb (%r15), %al
testb %al, %al
jns 0x432f
cmpl $0x0, 0x10(%rsp)
je 0x432f
xorl %ebp, %ebp
leaq 0x18(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30a0
incl %ebp
cmpl 0x10(%rsp), %ebp
jb 0x431c
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/method_info.cpp
// Function: method_info::load_body(abc_stream&)
void method_info::load_body(abc_stream &stream) {
	stream >> max_stack;
	stream >> local_count;
	stream >> init_scope_depth;
	stream >> max_scope_depth;
	uint32_t count;
	stream >> count;
	code = Array<uint8_t>(count);
	for (unsigned i = 0; i < count; ++i) {
		stream >> code[i];
	}
	stream >> count;
	exceptions = Array<exception_info>(count);
	for (unsigned i = 0; i < count; ++i) {
		exceptions[i].load(stream);
	}
	stream >> count;
	traits = Array<traits_info>(count);
	for (unsigned i = 0; i < count; ++i) {
		traits[i].load(stream);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x24(%rdi), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0x2c(%rbx), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x30a0
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %r15d
testq %r15, %r15
je 0x43c4
movq %r15, %rdi
callq 0x2030
movl %r15d, 0x38(%rbx)
movq %rax, 0x40(%rbx)
xorl %r15d, %r15d
movslq %r15d, %r15
movq 0x40(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x307a
incl %r15d
cmpl 0xc(%rsp), %r15d
jb 0x43a6
jmp 0x43d0
movl %r15d, 0x38(%rbx)
movq $0x0, 0x40(%rbx)
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %r15d
testq %r15, %r15
je 0x4421
movq %r15, %rdi
shlq $0x5, %rdi
callq 0x2030
movl %r15d, 0x48(%rbx)
movq %rax, 0x50(%rbx)
xorl %r15d, %r15d
movslq %r15d, %r15
movq %r15, %rdi
shlq $0x5, %rdi
addq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x4140
incl %r15d
cmpl 0xc(%rsp), %r15d
jb 0x43ff
jmp 0x442d
movl %r15d, 0x48(%rbx)
movq $0x0, 0x50(%rbx)
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %r15d
testq %r15, %r15
je 0x4483
movq %r15, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x2030
movl %r15d, 0x58(%rbx)
movq %rax, 0x60(%rbx)
xorl %r15d, %r15d
movslq %r15d, %r15
leaq (%r15,%r15,2), %rdi
shlq $0x3, %rdi
addq 0x60(%rbx), %rdi
movq %r14, %rsi
callq 0x4d34
incl %r15d
cmpl 0xc(%rsp), %r15d
jb 0x4460
jmp 0x448f
movl %r15d, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/script_info.cpp
// Function: script_info::load(abc_stream&)
void script_info::load(abc_stream &stream) {
	uint32_t index;
	stream >> index;
	init = abc_file::get_method(index);
	uint32_t count;
	stream >> count;
	traits = Array<traits_info>(count);
	for (unsigned i = 0; i < count; ++i) {
		traits[i].load(stream);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
callq 0x2f02
movq %rax, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %r15d
testq %r15, %r15
je 0x46e0
movq %r15, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x2030
movl %r15d, 0x8(%rbx)
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
movslq %r15d, %r15
leaq (%r15,%r15,2), %rdi
shlq $0x3, %rdi
addq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4d34
incl %r15d
cmpl 0x8(%rsp), %r15d
jb 0x46bd
jmp 0x46ec
movl %r15d, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/swf_tag.cpp
// Function: swf_tag::swf_tag(unsigned char**)
swf_tag::swf_tag(uint8_t **raw) {
	handle = *raw;
	uint16_t header = conv_copy<uint16_t>(handle);
	kind = header >> 6;
	length = header & 63;
	if (length == 0x3f) {
		length = conv_copy<uint32_t>(handle);
	}
	*raw += (handle - *raw) + length;
}

// Assembly:
movq (%rsi), %rcx
movzwl (%rcx), %eax
leaq 0x2(%rcx), %rdx
movq %rdx, (%rdi)
movl %eax, %r8d
shrl $0x6, %r8d
movw %r8w, 0x8(%rdi)
andl $0x3f, %eax
movl %eax, 0xc(%rdi)
cmpl $0x3f, %eax
jne 0x4d2a
movl 0x2(%rcx), %eax
addq $0x6, %rcx
movq %rcx, (%rdi)
movl %eax, 0xc(%rdi)
movq %rcx, %rdx
movl %eax, %eax
addq %rdx, %rax
movq %rax, (%rsi)
retq
nop
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/traits_info.cpp
// Function: traits_info::load(abc_stream&)
void traits_info::load(abc_stream &stream){
	has_loaded_value = false;
	uint32_t name_index;
	stream >> name_index;
	if (name_index == 0)
		fatal("Multiname index cannot be zero");
	name = abc_file::get_multiname(name_index);
	stream >> kind;
	uint8_t kind_high = kind >> 4;
	kind = kind & 0x0f;
	if (kind_high & ATTR_Metadata)
		fatal("Trait attribute metadata unsupported");
	uint32_t slot_id;
	switch (kind) {
	case Trait_Slot:
	case Trait_Const: {
		stream >> slot_id;
		stream >> vindex;
		stream >> vindex;
		if (vindex) {
			uint8_t dummy;
			stream >> dummy;
		}
		break;
	}
	case Trait_Class:
	case Trait_Method:
	case Trait_Getter:
	case Trait_Setter:
	case Trait_Function:
		stream >> slot_id;
		stream >> vindex;
		break;
	default:
		std::cout << "traits_info, kind = " << +kind << std::endl;
		fatal("Low bits of trait kind unknown");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
testl %edi, %edi
je 0x4e08
callq 0x2ebe
movq %rax, (%r14)
leaq 0x8(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x307a
movzbl 0x8(%r14), %ecx
movl %ecx, %eax
andl $0xf, %eax
movb %al, 0x8(%r14)
testb $0x40, %cl
jne 0x4e2c
leal -0x1(%rax), %ecx
cmpl $0x5, %ecx
jae 0x4db6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x30a0
addq $0xc, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30a0
jmp 0x4dfe
cmpl $0x6, %eax
je 0x4dc3
testl %eax, %eax
jne 0x4e63
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x30a0
leaq 0xc(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30a0
cmpl $0x0, 0xc(%r14)
je 0x4dfe
leaq 0x7(%rsp), %rsi
movq %rbx, %rdi
callq 0x307a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x18, %edi
callq 0x2100
movl $0xd, (%rax)
leaq 0x14ab(%rip), %rcx      # 0x62ca
movq %rcx, 0x8(%rax)
leaq 0x1481(%rip), %rcx      # 0x62ab
jmp 0x4e4e
movl $0x18, %edi
callq 0x2100
movl $0x13, (%rax)
leaq 0x1487(%rip), %rcx      # 0x62ca
movq %rcx, 0x8(%rax)
leaq 0x1490(%rip), %rcx      # 0x62de
movq %rcx, 0x10(%rax)
leaq 0x3f37(%rip), %rsi      # 0x8d90
movq %rax, %rdi
xorl %edx, %edx
callq 0x22d0
movq 0x4166(%rip), %rdi      # 0x8fd0
leaq 0x1492(%rip), %rsi      # 0x6303
callq 0x21c0
movzbl (%r15), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
callq 0x20f0
movl $0x18, %edi
callq 0x2100
movl $0x2b, (%rax)
leaq 0x1429(%rip), %rcx      # 0x62ca
movq %rcx, 0x8(%rax)
leaq 0x146c(%rip), %rcx      # 0x6318
jmp 0x4e4e
nop
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/main_dumper.cpp
// Function: executer::call_prop(class_info*)
char executer::call_prop(class_info *c) {
	uint8_t op;
	*this >> op;
	if (op != OP_callproperty) {
		undo();
		return '\0';
	}
	uint32_t index, arg_count;
	*this >> index;
	*this >> arg_count;
	traits_info *trait = c->get_trait_by_name(abc_file::get_multiname(index));
	method_info *prop = abc_file::get_method(trait->vindex);
	executer e(prop->code.begin());
	assert(e.step() == OP_getlocal_0);
	assert(e.step() == OP_pushscope);
	assert(e.step() == OP_getlex);
	return COP[e.get_push()];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7(%rsp), %r15
movq %r15, %rsi
callq 0x307a
cmpb $0x46, (%r15)
jne 0x4f5f
leaq 0x1c(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x30a0
movl (%r15), %edi
callq 0x2ebe
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3b14
movl 0xc(%rax), %edi
callq 0x2f02
movq 0x40(%rax), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x303c
movq %rbx, %rdi
callq 0x27f8
cmpb $-0x30, %al
jne 0x4f73
leaq 0x8(%rsp), %rdi
callq 0x27f8
cmpb $0x30, %al
jne 0x4f85
leaq 0x8(%rsp), %rdi
callq 0x27f8
cmpb $0x60, %al
jne 0x4f97
movq 0x4aaa(%rip), %rbx      # 0x99f8
leaq 0x8(%rsp), %rdi
callq 0x29ac
cltq
movb (%rbx,%rax), %al
jmp 0x4f69
movq %r14, %rdi
callq 0x3044
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x18, %edi
callq 0x2100
movl $0x20, (%rax)
jmp 0x4fa7
movl $0x18, %edi
callq 0x2100
movl $0x21, (%rax)
jmp 0x4fa7
movl $0x18, %edi
callq 0x2100
movl $0x22, (%rax)
leaq 0x1397(%rip), %rcx      # 0x6345
movq %rcx, 0x8(%rax)
leaq 0x137e(%rip), %rcx      # 0x6337
movq %rcx, 0x10(%rax)
leaq 0x3dcc(%rip), %rsi      # 0x8d90
movq %rax, %rdi
xorl %edx, %edx
callq 0x22d0
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/main_dumper.cpp
// Function: executer::pattern_1()
void executer::pattern_1() {
	for ( ; ; ) {
		if (step() == OP_getlocal_1
			&& step() == OP_getlocal_0
			&& step() == OP_getlocal_0) {
			break;
		}
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x27f8
cmpb $-0x2f, %al
jne 0x4fd2
movq %rbx, %rdi
callq 0x27f8
cmpb $-0x30, %al
jne 0x4fd2
movq %rbx, %rdi
callq 0x27f8
cmpb $-0x30, %al
jne 0x4fd2
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/FirestonnneTFM[P]tfm_key_parser/src/main_dumper.cpp
// Function: go(char**)
void go(char **bufs) {
	method_info *info = abc_file::get_class(0)->static_ctor;
	executer exec(info->code.begin());
	exec.step_until(OP_findproperty);
	uint32_t op;
	exec >> op;
	assert(op == OP_pushstring);
	uint32_t index;
	exec >> index;
	COP = abc_file::get_str(index);

	info = abc_file::get_class(0)->ctor;
	exec = executer(info->code.begin());
	for (int i = 0; i < 12; ++i) {
		exec.pattern_1();
		char buf[50];
		int j = 0;
		buf[j] = exec.call_prop(abc_file::get_class(0));
		++j;
		do {
			// usually is OP_getlocal_0
			exec.step();
			buf[j] = exec.call_prop(abc_file::get_class(0));
			++j;
		} while (exec.step() == OP_add);
		bufs[i] = make_global(buf);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x2f18
movq 0x78(%rax), %rax
movq 0x40(%rax), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x303c
movq %r14, %rdi
movl $0x5e, %esi
callq 0x2980
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
cmpl $0x2c, (%r15)
jne 0x512b
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x30a0
movl (%r15), %edi
callq 0x2e72
movq %rax, 0x4988(%rip)      # 0x99f8
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x2f18
movq 0x60(%rax), %rax
movq 0x40(%rax), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x303c
movups (%r15), %xmm0
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x4fce
xorl %edi, %edi
callq 0x2f18
movq %r14, %rdi
movq %rax, %rsi
callq 0x4eb0
movb %al, 0x20(%rsp)
leaq 0x21(%rsp), %r12
movq %r14, %rdi
callq 0x27f8
xorl %edi, %edi
callq 0x2f18
movq %r14, %rdi
movq %rax, %rsi
callq 0x4eb0
movb %al, (%r12)
movq %r14, %rdi
callq 0x27f8
incq %r12
cmpb $-0x60, %al
je 0x50b9
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %r12
movq %r12, %rdi
callq 0x2030
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2180
movq %r13, (%rbx,%rbp,8)
incq %rbp
cmpq $0xc, %rbp
jne 0x5096
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x18, %edi
callq 0x2100
movl $0x3e, (%rax)
leaq 0x1203(%rip), %rcx      # 0x6345
movq %rcx, 0x8(%rax)
leaq 0x11ea(%rip), %rcx      # 0x6337
movq %rcx, 0x10(%rax)
leaq 0x3c38(%rip), %rsi      # 0x8d90
movq %rax, %rdi
xorl %edx, %edx
callq 0x22d0
// File: /workspace/github_c_makefile_star2_O3/diaxen[P]fft-garden/sr_input_lut.c
// Function: sr_lut_dr
static void
sr_lut_dr(unsigned log2_N, unsigned out,
	   unsigned l, unsigned i)
{
  unsigned is = 1 << (log2_N - l);
  unsigned os = 1 << (l - 2);

  switch (l)
    {
    case 1:
      sr_input_lut[out / 2] = i;
      break;

    case 2:
      sr_lut_dr(log2_N, out, 1, i);
      sr_input_lut[1 + out / 2] = i + is;
      break;

    default:
      sr_lut_dr(log2_N, out, l - 1, i);
      sr_lut_dr(log2_N, out + os * 2, l - 2, i + is);
      sr_lut_dr(log2_N, out + 3 * os, l - 2, i + 3 * is);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r15d
movl %esi, %r14d
movl %edi, %ebp
movl %edi, %r12d
subl %edx, %r12d
movl $0x1, %r13d
movl %r12d, %ecx
shll %cl, %r13d
cmpl $0x2, %r15d
je 0x18d0
cmpl $0x1, %r15d
je 0x18c4
leal -0x1(%r15), %edx
movl %ebp, %edi
movl %r14d, %esi
movl %ebx, %ecx
callq 0x1841
addl $-0x2, %r15d
movl $0x2, %esi
movl %r15d, %ecx
shll %cl, %esi
addl %r14d, %esi
addl %ebx, %r13d
movl %ebp, %edi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x1841
movl $0x3, %eax
movl %r15d, %ecx
shll %cl, %eax
movl $0x3, %edx
movl %r12d, %ecx
shll %cl, %edx
addl %eax, %r14d
addl %edx, %ebx
addl $0x2, %r12d
jmp 0x185c
movq 0x37cd(%rip), %rax      # 0x5098
shrl %r14d
jmp 0x18e4
movq 0x37c1(%rip), %rax      # 0x5098
shrl %r14d
movl %ebx, (%rax,%r14,4)
addl %r13d, %ebx
incl %r14d
movl %r14d, %ecx
movl %ebx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/diaxen[P]fft-garden/sr_sched_lut.c
// Function: sr_sched_lut_init
void sr_sched_lut_init(unsigned N)
{
  unsigned log2_N = 31 - clz32(N);
  unsigned i, j;

  static const unsigned jacobsthal[32] = {
    0,1,1,3,5,11,21,43,85,171,341,683,1365,2731,5461,10923,21845,
    43691,87381,174763,349525,699051,1398101,2796203,5592405,
    11184811,22369621,44739243,89478485,178956971,357913941
  };

  sr_sched_cnt = malloc(log2_N * sizeof(*sr_sched_cnt));
  assert(sr_sched_cnt);

  for (i = 0; i < log2_N; i++)
    sr_sched_cnt[i] = jacobsthal[log2_N - i];

  sr_sched_off = malloc((sr_sched_cnt[0] + 1) * sizeof(*sr_sched_off));
  assert(sr_sched_off);

  for (j = i = 0; j < sr_sched_cnt[0]; i++)
    if (__builtin_clz(i ^ (i + 1)) & 1)
      sr_sched_off[j++] = i;

  sr_sched_off[j] = N;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
bsrl %edi, %r15d
leal (,%r15,4), %edi
callq 0x1090
movq %rax, 0x3779(%rip)      # 0x50a0
testq %rax, %rax
je 0x19b2
movl %r15d, %ecx
xorl $0x1f, %ecx
cmpl $0x1f, %ecx
je 0x1965
cmpl $0x1, %r15d
movl %r15d, %ecx
adcl $0x0, %ecx
xorl %edx, %edx
leaq 0x1832(%rip), %rsi      # 0x3180
movl %r15d, %edi
movl (%rsi,%rdi,4), %edi
movl %edi, (%rax,%rdx,4)
incq %rdx
decl %r15d
cmpq %rdx, %rcx
jne 0x194e
movl (%rax), %r14d
leal 0x1(%r14), %edi
shlq $0x2, %rdi
callq 0x1090
movq %rax, 0x372f(%rip)      # 0x50a8
testq %rax, %rax
je 0x19d1
xorl %ecx, %ecx
testl %r14d, %r14d
je 0x19a9
xorl %edx, %edx
leal 0x1(%rdx), %esi
movl %esi, %edi
xorl %edx, %edi
bsrl %edi, %edi
notl %edi
testb $0x1, %dil
je 0x19a0
movl %ecx, %edi
incl %ecx
movl %edx, (%rax,%rdi,4)
movl %esi, %edx
cmpl %r14d, %ecx
jb 0x1987
movl %ecx, %ecx
movl %ebx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1847(%rip), %rdi      # 0x3200
leaq 0x184d(%rip), %rsi      # 0x320d
leaq 0x1855(%rip), %rcx      # 0x321c
movl $0x25, %edx
callq 0x1080
leaq 0x1869(%rip), %rdi      # 0x3241
leaq 0x182e(%rip), %rsi      # 0x320d
leaq 0x1836(%rip), %rcx      # 0x321c
movl $0x2b, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/c4_swfdump.c
// Function: dump_tag_raw_remainder
static void dump_tag_raw_remainder(swf_reader *swf) {
	unsigned char temp[16];
	int i,rd;

	rd = swf_reader_read(swf,temp,sizeof(temp));
	if (rd > 0) {
		printf("    REMAINDER: ");
		for (i=0;i < rd;i++) printf("%02x ",temp[i]);
		for (;i < 16;i++) printf("   ");
		for (i=0;i < rd;i++) {
			if (temp[i] >= 0x20 && temp[i] < 0x7F)
				printf("%c",temp[i]);
			else
				printf(".");
		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq -0x40(%rbp), %rsi
movl $0x10, %edx
callq 0x2a27
testl %eax, %eax
jle 0x20be
movl %eax, %ebx
leaq 0x46f9(%rip), %rdi      # 0x6717
xorl %eax, %eax
callq 0x1080
cmpl $0x10, %ebx
movl $0xf, %r15d
cmovael %ebx, %r15d
movl %ebx, %r14d
addl %ebx, %ebx
subl %ebx, %r15d
incl %r15d
movq %r14, %r12
negq %r12
movq $-0x1, %r13
leaq 0x46d6(%rip), %rbx      # 0x6727
movzbl -0x3f(%rbp,%r13), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1080
incl %r15d
leaq (%r12,%r13), %rax
incq %rax
incq %r13
cmpq $-0x1, %rax
jne 0x2051
cmpq $0xe, %r13
ja 0x2090
leaq 0x4232(%rip), %rbx      # 0x62b3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1080
decl %r15d
jne 0x2081
xorl %ebx, %ebx
movzbl -0x40(%rbp,%rbx), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
jb 0x20a4
movl $0x2e, %eax
movzbl %al, %edi
callq 0x1040
incq %rbx
cmpq %rbx, %r14
jne 0x2092
movl $0xa, %edi
callq 0x1040
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/c4_swfdump.c
// Function: dump_FILLSTYLEARRAY
static int dump_FILLSTYLEARRAY(swf_reader *swf,unsigned int tag_code) {
	swf_FILLSTYLEARRAY_read nfo;
	unsigned int i;

	if (swf_reader_read_FILLSTYLEARRAY_header(swf,&nfo,tag_code)) {
		printf("    FILLSTYLEARRAY (unable to read)\n");
		return -1;
	}
	printf("    FILLSTYLEARRAY FillStyleCount=%u\n",nfo.FillStyleCount);
	for (i=0;i < nfo.FillStyleCount;i++) {
		if (dump_FILLSTYLE(swf,&nfo,i+1)) return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %esi, %edx
movq %rdi, %rbx
leaq -0xa0(%rbp), %rsi
callq 0x413f
testl %eax, %eax
je 0x2119
leaq 0x4b9e(%rip), %rdi      # 0x6c99
callq 0x1070
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0xa0(%rbp), %r14
movzwl 0x2(%r14), %esi
leaq 0x4601(%rip), %rdi      # 0x672d
xorl %eax, %eax
callq 0x1080
movl $0x1, %r15d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leal -0x1(%r15), %eax
movzwl -0x9e(%rbp), %ecx
cmpl %ecx, %eax
jae 0x2171
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43d1
testl %eax, %eax
jne 0x2106
movq %r14, %rdi
movl %r15d, %esi
callq 0x27c7
incl %r15d
testl %eax, %eax
je 0x213f
jmp 0x2106
xorl %r12d, %r12d
jmp 0x2106
// File: /workspace/github_c_makefile_star2_O3/joncampbell123[P]swfhax/c4_swfdump.c
// Function: dump_MATRIX
static void dump_MATRIX(swf_MATRIX *m) {
	printf("HasScale=%u [%u-bit] HasRotate=%u [%u-bit] Translation=(%.3f,%.3f) [%u-bit]",
		m->HasScale,
		m->NScaleBits,
		m->HasRotate,
		m->NRotateBits,
		(double)m->TranslateX / SWF_TWIPS_PER_PIXEL,
		(double)m->TranslateY / SWF_TWIPS_PER_PIXEL,
		m->NTranslateBits);
	if (m->HasScale)
		printf(" Scale=(%.6f,%.6f)",
			(double)m->ScaleX / 0x10000,
			(double)m->ScaleY / 0x10000);
	if (m->HasRotate)
		printf(" Rotate=(skew %.6f,%.6f)",
			(double)m->RotateSkew0 / 0x10000,
			(double)m->RotateSkew1 / 0x10000);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %ecx
movl %ecx, %esi
andl $0x1, %esi
movzbl 0x1(%rdi), %edx
shrl %ecx
andl $0x1, %ecx
movzbl 0x2(%rdi), %r8d
cvtsi2sdl 0x14(%rdi), %xmm0
movsd 0x38d6(%rip), %xmm2     # 0x6008
divsd %xmm2, %xmm0
cvtsi2sdl 0x18(%rdi), %xmm1
divsd %xmm2, %xmm1
movzbl 0x3(%rdi), %r9d
leaq 0x44af(%rip), %rdi      # 0x6bfa
movb $0x2, %al
callq 0x1080
movb (%rbx), %al
testb $0x1, %al
je 0x2788
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rbx), %xmm0
movsd 0x38b0(%rip), %xmm2     # 0x6018
mulsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x8(%rbx), %xmm1
mulsd %xmm2, %xmm1
leaq 0x44c7(%rip), %rdi      # 0x6c46
movb $0x2, %al
callq 0x1080
movb (%rbx), %al
testb $0x2, %al
jne 0x2793
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rbx), %xmm0
movsd 0x3875(%rip), %xmm2     # 0x6018
mulsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x10(%rbx), %xmm1
mulsd %xmm2, %xmm1
leaq 0x449f(%rip), %rdi      # 0x6c59
movb $0x2, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x29ba
movq %rdi, %r15
movl 0x10(%rdi), %edi
testl %edi, %edi
js 0x29ba
movq %rsi, %r14
xorl %edx, %edx
callq 0x1090
cmpq %r14, %rax
jne 0x29ba
movq %r14, (%r15)
xorl %ebx, %ebx
movl %ebx, %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_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
testq %rdi, %rdi
je 0x2a20
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2a20
movb $0x0, 0x71(%rdi)
popq %rbp
jmpq *%rax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2a80
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rcx
testq %rcx, %rcx
je 0x2a7c
movl %edx, %r14d
movq 0x60(%rbx), %rdx
testq %rdx, %rdx
je 0x2a6b
movq 0x8(%rbx), %rdi
xorl %eax, %eax
cmpq %rdi, %rdx
jbe 0x2a7c
movslq %r14d, %rax
addq %rdi, %rax
cmpq %rdx, %rax
jbe 0x2a6b
subl %edi, %edx
movl %edx, %r14d
movq %rbx, %rdi
movl %r14d, %edx
callq *%rcx
cmpl %r14d, %eax
jge 0x2a7c
movb $0x1, 0x71(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
xorl %eax, %eax
leaq -0x9(%rbp), %rbx
movb %al, (%rbx)
movb %al, 0x59(%rdi)
movq %rbx, %rsi
movl $0x1, %edx
callq 0x2a27
movb (%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
leal -0x1(%rbx), %eax
xorl %r15d, %r15d
cmpl $0x1f, %eax
ja 0x2ceb
movq %rdi, %r14
movb 0x59(%rdi), %al
xorl %r13d, %r13d
leaq -0x29(%rbp), %r12
xorl %r15d, %r15d
testb %al, %al
je 0x2c98
movb 0x58(%r14), %sil
jmp 0x2cba
movb %r13b, -0x29(%rbp)
movb %r13b, 0x59(%r14)
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x2a27
movb -0x29(%rbp), %sil
movb %sil, 0x58(%r14)
movb $0x8, %al
movzbl %al, %eax
cmpl %eax, %ebx
movl %eax, %edx
cmovbl %ebx, %edx
movl %edx, %ecx
shll %cl, %r15d
subb %dl, %al
movb %al, 0x59(%r14)
movzbl %sil, %esi
movl %eax, %ecx
shrl %cl, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %edi
notl %edi
andl %esi, %edi
orl %edi, %r15d
subl %edx, %ebx
jg 0x2c8e
movl %r15d, %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_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
pushq %rbx
pushq %rax
movl %esi, %ebx
leal -0x21(%rbx), %ecx
xorl %eax, %eax
cmpl $-0x20, %ecx
jb 0x2d31
movl %ebx, %esi
callq 0x2c63
movl %eax, %edx
leal -0x1(%rbx), %eax
movzbl %al, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %ebx, %ecx
shll %cl, %edi
xorl %eax, %eax
btl %esi, %edx
cmovbl %edi, %eax
orl %edx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x59(%rdi)
movl $0x5, %esi
callq 0x2c63
movb %al, (%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x4(%rbx)
movzbl (%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x8(%rbx)
movzbl (%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0xc(%rbx)
movzbl (%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
leaq -0xc(%rbp), %rbx
movl $0x0, (%rbx)
movb $0x0, 0x59(%rdi)
movq %rbx, %rsi
movl $0x4, %edx
callq 0x2a27
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2e9e
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x2e9e
movq %rbx, %rdi
callq *%rcx
movq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2ecd
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x2ecd
movq %rbx, %rdi
callq *%rcx
movq (%rbx), %rcx
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2f16
movq %rdi, %r14
movl 0x10(%rdi), %edi
testl %edi, %edi
js 0x2f16
testl %edx, %edx
jle 0x2f14
movl %edx, %edx
callq 0x10d0
testl %eax, %eax
js 0x2f16
movl %eax, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %rcx, (%r14)
movl %eax, %ebx
jmp 0x2f16
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x88(%rdi)
je 0x2f8a
leaq 0x88(%rbx), %r14
movq %r14, %rdi
callq 0x1110
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x60(%r14)
cmpq $0x0, 0xf8(%rbx)
je 0x2fb2
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
callq 0x1130
movl $0x88, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movq 0x78(%rbx), %rdi
callq 0x518d
movq %rax, 0x78(%rbx)
movq 0x80(%rbx), %rdi
callq 0x518d
movq %rax, 0x80(%rbx)
movl 0x10(%rbx), %edi
testl %edi, %edi
js 0x2feb
cmpb $0x0, 0x14(%rbx)
je 0x2fe4
callq 0x10c0
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movb $0x0, 0x14(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x180, %esi            # imm = 0x180
callq 0x10e0
testq %rax, %rax
je 0x301d
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x3040
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2f42
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/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rdi), %rsi
cmpq %rsi, 0x8(%rdi)
jbe 0x3083
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x30b9
movb $0x0, 0x71(%rbx)
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0x30b9
xorl %r15d, %r15d
cmpb $0x0, 0x71(%rbx)
jne 0x3151
movq 0x68(%rbx), %rsi
cmpq %rsi, 0x8(%rbx)
jae 0x30d0
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x30b0
movb $0x0, 0x71(%rbx)
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
je 0x30c6
movb $0x1, 0x71(%rbx)
jmp 0x3151
callq 0x12c1
xorl %r15d, %r15d
jmp 0x3151
cmpb $0x0, 0x71(%rbx)
jne 0x3151
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
leaq -0x1a(%rbp), %r15
movw $0x0, (%r15)
movb $0x0, 0x59(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl (%r15), %eax
movl %eax, %ecx
shrl $0x6, %ecx
movw %cx, (%r14)
andl $0x3f, %eax
movl %eax, 0x4(%r14)
cmpl $0x3f, %eax
jne 0x3135
leaq -0x20(%rbp), %r15
movl $0x0, (%r15)
movb $0x0, 0x59(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x2a27
movl (%r15), %eax
movl %eax, 0x4(%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%r14)
movl %eax, %eax
addq %rcx, %rax
movq %rax, 0x68(%rbx)
xorl %r15d, %r15d
cmpb $0x0, 0x71(%rbx)
sete %r15b
movl %r15d, %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_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
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl %esi, 0x10(%rdi)
je 0x3181
movl %esi, %r14d
movq %rbx, %rdi
callq 0x2f42
movl %r14d, 0x10(%rbx)
movb $0x0, 0x14(%rbx)
leaq -0x800(%rip), %rax      # 0x2988
movq %rax, 0x18(%rbx)
leaq -0x2b8(%rip), %rax      # 0x2edb
movq %rax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, %esi
callq 0x2c63
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%r14), %cl
andb $0x1, %al
andb $-0x2, %cl
orb %al, %cl
movb %cl, (%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%r14), %cl
addb %al, %al
andb $0x2, %al
andb $-0x3, %cl
orb %al, %cl
movb %cl, (%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%r14), %cl
shlb $0x2, %al
andb $0x4, %al
andb $-0x5, %cl
orb %al, %cl
movb %cl, (%r14)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%r14), %cl
shlb $0x3, %al
andb $0x8, %al
andb $-0x9, %cl
orb %al, %cl
movb %cl, (%r14)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x2c63
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%r14), %cl
shlb $0x4, %al
andb $0x10, %al
andb $-0x11, %cl
orb %al, %cl
movb %cl, (%r14)
movq %rbx, %rdi
movl $0x18, %esi
callq 0x2c63
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
xorl %eax, %eax
cmpq $0x0, 0x8(%rdi)
je 0x384e
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x2(%rdi), %edi
testq %rdi, %rdi
je 0x3876
addl %edi, %edi
callq 0x1140
movq %rax, %rcx
movq %rax, 0x8(%rbx)
xorl %eax, %eax
cmpq $0x1, %rcx
sbbl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x38ed
movzwl 0x4(%r14), %ecx
movw %cx, (%rax)
xorl %ebx, %ebx
cmpw $0x2, 0x2(%r14)
jb 0x38f6
movq %rdi, %r15
movl $0x1, %r13d
leaq -0x2a(%rbp), %r12
movw $0x0, -0x2a(%rbp)
movb $0x0, 0x59(%r15)
movq %r15, %rdi
movq %r12, %rsi
movl $0x2, %edx
callq 0x2a27
movzwl -0x2a(%rbp), %eax
movq 0x8(%r14), %rcx
movw %ax, (%rcx,%r13,2)
incq %r13
movzwl 0x2(%r14), %eax
cmpq %rax, %r13
jb 0x38b6
jmp 0x38f6
xorl %ebx, %ebx
cmpw 0x2(%r14), %bx
sbbl %ebx, %ebx
movl %ebx, %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_MATRIX
int swf_reader_read_MATRIX(swf_reader *swf,swf_MATRIX *m) {
	swf_reader_read_bytealign(swf);
	m->HasScale = swf_reader_read_UB(swf,1);
	if (m->HasScale) {
		m->NScaleBits = swf_reader_read_UB(swf,5);
		m->ScaleX = swf_reader_read_SB(swf,m->NScaleBits);
		m->ScaleY = swf_reader_read_SB(swf,m->NScaleBits);
	}
	else {
		m->ScaleX = m->ScaleY = 0x10000;
		m->NScaleBits = 0;
	}
	m->HasRotate = swf_reader_read_UB(swf,1);
	if (m->HasRotate) {
		m->NRotateBits = swf_reader_read_UB(swf,5);
		m->RotateSkew0 = swf_reader_read_SB(swf,m->NRotateBits);
		m->RotateSkew1 = swf_reader_read_SB(swf,m->NRotateBits);
	}
	else {
		m->NRotateBits = 0;
		m->RotateSkew0 = 0;
		m->RotateSkew1 = 0;
	}
	m->NTranslateBits = swf_reader_read_UB(swf,5);
	m->TranslateX = swf_reader_read_SB(swf,m->NTranslateBits);
	m->TranslateY = swf_reader_read_SB(swf,m->NTranslateBits);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x59(%rdi)
movl $0x1, %esi
callq 0x2c63
movb (%rbx), %cl
movl %eax, %edx
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, (%rbx)
testb $0x1, %al
jne 0x39c0
movl $0x10000, 0x4(%rbx)     # imm = 0x10000
movb $0x0, 0x1(%rbx)
movl $0x10000, %eax          # imm = 0x10000
jmp 0x39ea
movq %r14, %rdi
movl $0x5, %esi
callq 0x2c63
movb %al, 0x1(%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x4(%rbx)
movzbl 0x1(%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x8(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movb (%rbx), %cl
leal (%rax,%rax), %edx
andb $0x2, %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, (%rbx)
testb $0x1, %al
jne 0x3a1c
movb $0x0, 0x2(%rbx)
movl $0x0, 0xc(%rbx)
xorl %eax, %eax
jmp 0x3a46
movq %r14, %rdi
movl $0x5, %esi
callq 0x2c63
movb %al, 0x2(%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0xc(%rbx)
movzbl 0x2(%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x10(%rbx)
movq %r14, %rdi
movl $0x5, %esi
callq 0x2c63
movb %al, 0x3(%rbx)
movzbl %al, %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x14(%rbx)
movzbl 0x3(%rbx), %esi
movq %r14, %rdi
callq 0x2cfd
movl %eax, 0x18(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
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, (%rbx)
leaq 0x4(%rbx), %rsi
movq %r14, %rdi
callq 0x2d38
leaq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2d38
movq %r14, %rdi
movl $0x5, %esi
callq 0x2c63
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movb 0x2c(%rbx), %cl
andb $0x1, %al
andb $-0x2, %cl
orb %al, %cl
movb %cl, 0x2c(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movb 0x2c(%rbx), %cl
addb %al, %al
andb $0x2, %al
andb $-0x3, %cl
orb %al, %cl
movb %cl, 0x2c(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x2c63
movb 0x2c(%rbx), %cl
shlb $0x2, %al
andb $0x4, %al
andb $-0x5, %cl
orb %al, %cl
movb %cl, 0x2c(%rbx)
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_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
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x59(%rdi)
movl $0x4, %esi
callq 0x2c63
movl (%rbx), %ecx
andl $0xf, %eax
andl $-0x10, %ecx
orl %eax, %ecx
movw %cx, (%rbx)
movq %r14, %rdi
movl $0x4, %esi
callq 0x2c63
shll $0x4, %eax
movl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
andl (%rbx), %ecx
movzbl %al, %eax
orl %eax, %ecx
movw %cx, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq