// File: /workspace/github_c_makefile_star2_O0/goodpaul6[P]generic/script.c
// Function: execute_cycle
static void execute_cycle(script_t* script)
{
	if(script->pc < 0) return;
	if (script->pc >= script->code.length)
	{
		script->pc = -1;
		return;
	}

	word code = vec_get_value(&script->code, script->pc, word);
	++script->pc;
	
	switch(code)
	{
		case OP_PUSH_NULL:
		{
			script_push_null(script);
		} break;
		
		case OP_PUSH_TRUE:
		{
			script_push_bool(script, 1);
		} break;
		
		case OP_PUSH_FALSE:
		{
			script_push_bool(script, 0);
		} break;
		
		case OP_PUSH_CHAR:
		{
			char c = (char)read_int(script);
			script_push_char(script, c);
		} break;
		
		case OP_PUSH_NUMBER:
		{
			int index = read_int(script);
			script_push_number(script, vec_get_value(&script->numbers, index, double));
		} break;
		
		case OP_PUSH_STRING:
		{
			int index = read_int(script);
			script_push_string(script, vec_get_value(&script->strings, index, script_string_t));
		} break;
		
		case OP_PUSH_FUNC:
		{
			int index = read_int(script);
			push_func(script, 0, index);
		} break;
		
		case OP_PUSH_EXTERN_FUNC:
		{
			int index = read_int(script);
			push_func(script, 1, index);
		} break;
	
		case OP_PUSH_ARRAY:
		{
			size_t length = (size_t)script_pop_number(script);
			script_push_array(script, length);
		} break;
		
		case OP_PUSH_ARRAY_BLOCK:
		{
			int length = read_int(script);
			vector_t array;

			vec_init(&array, sizeof(script_value_t*));
			vec_copy_region(&array, &script->stack, 0, script->stack.length - length, length);
			script->stack.length -= length;
			
			script_push_premade_array(script, array);
		} break;
				
		case OP_PUSH_RETVAL:
		{
			if(script->ret_val)
				push_value(script, script->ret_val);
			else
				script_push_null(script);
		} break;
		
		case OP_PUSH_STRUCT:
		{
			int length = read_int(script);
			int n_init = read_int(script);
			
			vector_t members;
			vec_init(&members, sizeof(script_value_t*));
			
			// initialize all members to null
			script_value_t* init_value = NULL;
			vec_resize(&members, length, &init_value);
			
			for(int i = 0; i < n_init; ++i)
			{
				script_value_t* val = pop_value(script);
				int index = (int)script_pop_number(script);
				
				vec_set(&members, index, &val);
			}
			
			// NOTE: not destroying members because 
			// the data should not be destroyed
			push_struct(script, members);
		} break;
		
		case OP_STRING_LEN:
		{
			script_string_t string = script_pop_string(script);
			script_push_number(script, string.length);
		} break;
		
		case OP_ARRAY_LEN:
		{
			vector_t* array = script_pop_array(script);
			script_push_number(script, array->length);
		} break;
		
		case OP_STRING_GET:
		{
			script_string_t string = script_pop_string(script);
			int index = (int)script_pop_number(script);
			
			if(index < 0 || index >= string.length) error_exit_script(script, "String index out of bounds\n");
			
			script_push_char(script, string.data[index]);
		} break;
		
		case OP_ARRAY_GET:
		{
			vector_t* array = script_pop_array(script);
			int index = (int)script_pop_number(script);
			
			script_value_t* val = vec_get_value(array, index, script_value_t*);
			if(!val) script_push_null(script);
			else push_value(script, val);
		} break;
		
		case OP_ARRAY_SET:
		{
			vector_t* array = script_pop_array(script);
			int index = (int)script_pop_number(script);
			script_value_t* value = pop_value(script);
			
			vec_set(array, index, &value);
		} break;
		
		case OP_STRUCT_GET:
		{
			int index = read_int(script);
			script_struct_t* s = pop_struct(script);
			
			script_value_t* val = vec_get_value(&s->members, index, script_value_t*);
			if(!val) script_push_null(script);
			else push_value(script, val);
		} break;
		
		case OP_STRUCT_SET:
		{
			int index = read_int(script);
			script_struct_t* s = pop_struct(script);
			script_value_t* val = pop_value(script);
			
			vec_set(&s->members, index, &val);
		} break;
		
		#define BOP_TYPE(name, op, type) case name: { type a = (type)script_pop_number(script), b = (type)script_pop_number(script); script_push_number(script, a op b); } break;
		#define BOP(name, op) BOP_TYPE(name, op, double)
		
		#define BOP_REL(name, op) case name: { double a = script_pop_number(script), b = script_pop_number(script); script_push_bool(script, a op b); } break;
		
		BOP(OP_ADD, +)
		BOP(OP_SUB, -)
		BOP(OP_MUL, *)
		BOP(OP_DIV, /)
		BOP_TYPE(OP_MOD, %, int)

		BOP_REL(OP_LT, <)
		BOP_REL(OP_GT, >)
		BOP_REL(OP_LTE, <=)
		BOP_REL(OP_GTE, >=)
		
		#undef BOP_TYPE
		#undef BOP
		
		case OP_LAND:
		{
			script_push_bool(script, script_pop_bool(script) && script_pop_bool(script));
		} break;
		
		case OP_LOR:
		{
			script_push_bool(script, script_pop_bool(script) || script_pop_bool(script));
		} break;
		
		case OP_NEG:
		{
			script_push_number(script, -script_pop_number(script));
		} break;
		
		case OP_NOT:
		{
			script_push_bool(script, !script_pop_bool(script));
		} break;

		// TODO: this should be specialized (OP_NUMBER_EQU, OP_STRING_EQU, OP_FUNC_EQU, OP_ARRAY_EQU)
		case OP_EQU:
		{
			script_value_t* a = pop_value(script);
			script_value_t* b = pop_value(script);
			
			script_push_bool(script, compare_values(a, b));
		} break;

		case OP_READ:
		{
			vector_t buf;
			int c = getchar();
			
			vec_init(&buf, sizeof(char));
			
			while(c != '\n')
			{
				vec_push_back(&buf, &c);
				c = getchar();
			}
			
			// NOTE: not destroying vector because that will free the memory
			// of the string
			script_string_t str = { buf.length, (char*)buf.data };
			script_push_string(script, str);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x11c(%rax)
jge 0x56c1
jmp 0x657c
movq -0x8(%rbp), %rax
movslq 0x11c(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1e8(%rcx), %rax
jb 0x56ec
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x11c(%rax) # imm = 0xFFFFFFFF
jmp 0x657c
movq -0x8(%rbp), %rax
movq %rax, %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movslq 0x11c(%rax), %rsi
callq 0x11890
movb (%rax), %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
incl %ecx
movl %ecx, 0x11c(%rax)
movzbl -0x9(%rbp), %eax
movq %rax, -0x270(%rbp)
subq $0x30, %rax
ja 0x6556
movq -0x270(%rbp), %rax
leaq 0xd9b4(%rip), %rcx      # 0x130f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x38c0
jmp 0x6556
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rdi
movsbl -0xa(%rbp), %esi
callq 0x3300
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movslq -0x10(%rbp), %rsi
callq 0x11890
movq -0x278(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x8(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movslq -0x14(%rbp), %rsi
callq 0x11890
movq -0x280(%rbp), %rdi
movl (%rax), %esi
movq 0x8(%rax), %rdx
callq 0x35c0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
xorl %esi, %esi
callq 0x10f70
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movl $0x1, %esi
callq 0x10f70
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd 0xded4(%rip), %xmm2     # 0x13740
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x36a0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
movl $0x8, %esi
callq 0x114e0
movq -0x8(%rbp), %rsi
addq $0x198, %rsi            # imm = 0x198
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rcx
movslq -0x2c(%rbp), %rax
subq %rax, %rcx
movslq -0x2c(%rbp), %r8
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x116d0
movslq -0x2c(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x1a8(%rax)
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x3700
jmp 0x6556
movq -0x8(%rbp), %rax
cmpq $0x0, 0x160(%rax)
je 0x5959
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x160(%rax), %rsi
callq 0x3140
jmp 0x5962
movq -0x8(%rbp), %rdi
callq 0x38c0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x58(%rbp)
leaq -0x78(%rbp), %rdi
movl $0x8, %esi
callq 0x114e0
movq $0x0, -0x80(%rbp)
movslq -0x54(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x11800
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x5a06
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0x94(%rbp)
movslq -0x94(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x118f0
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x59b0
movq -0x8(%rbp), %rdi
leaq -0x78(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x10fc0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3630
movl %eax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
movq -0x8(%rbp), %rdi
movl -0xa8(%rbp), %eax
cvtsi2sd %rax, %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3760
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq 0x10(%rax), %xmm0
movaps 0xdc90(%rip), %xmm1     # 0x13720
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xdc94(%rip), %xmm1     # 0x13730
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3630
movl %eax, -0xc0(%rbp)
movq %rdx, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0xc4(%rbp)
cmpl $0x0, -0xc4(%rbp)
jl 0x5af5
movl -0xc4(%rbp), %eax
cmpl -0xc0(%rbp), %eax
jb 0x5b07
movq -0x8(%rbp), %rdi
leaq 0x10018(%rip), %rsi     # 0x15b18
movb $0x0, %al
callq 0x3200
movq -0x8(%rbp), %rdi
movq -0xb8(%rbp), %rax
movslq -0xc4(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x3300
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3760
movq %rax, -0xd0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0xd4(%rbp)
movq -0xd0(%rbp), %rdi
movslq -0xd4(%rbp), %rsi
callq 0x11890
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, -0xe0(%rbp)
jne 0x5b7c
movq -0x8(%rbp), %rdi
callq 0x38c0
jmp 0x5b8c
movq -0x8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x3140
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3760
movq %rax, -0xe8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0xec(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0xf8(%rbp)
movq -0xe8(%rbp), %rdi
movslq -0xec(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x118f0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0xfc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11020
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
movslq -0xfc(%rbp), %rsi
callq 0x11890
movq (%rax), %rax
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
jne 0x5c34
movq -0x8(%rbp), %rdi
callq 0x38c0
jmp 0x5c44
movq -0x8(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x3140
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x114(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11020
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rdi
movslq -0x114(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x118f0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x130(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x138(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x130(%rbp), %xmm0
addsd -0x138(%rbp), %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x140(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x148(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x140(%rbp), %xmm0
subsd -0x148(%rbp), %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x150(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x158(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x150(%rbp), %xmm0
mulsd -0x158(%rbp), %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x160(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x168(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x160(%rbp), %xmm0
divsd -0x168(%rbp), %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0x16c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
cvttsd2si %xmm0, %eax
movl %eax, -0x170(%rbp)
movq -0x8(%rbp), %rdi
movl -0x16c(%rbp), %eax
cltd
idivl -0x170(%rbp)
cvtsi2sd %edx, %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x178(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x180(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x178(%rbp), %xmm1
movsd -0x180(%rbp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x188(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x190(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x188(%rbp), %xmm0
ucomisd -0x190(%rbp), %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x198(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x1a0(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x198(%rbp), %xmm1
movsd -0x1a0(%rbp), %xmm0
ucomisd %xmm1, %xmm0
setae %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x1a8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movsd %xmm0, -0x1b0(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x1a8(%rbp), %xmm0
ucomisd -0x1b0(%rbp), %xmm0
setae %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x281(%rbp)
je 0x5f4c
movq -0x8(%rbp), %rdi
callq 0x31a0
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x281(%rbp)
movq -0x290(%rbp), %rdi
movb -0x281(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movsbl %al, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x291(%rbp)
jne 0x5fa7
movq -0x8(%rbp), %rdi
callq 0x31a0
movsbl %al, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x291(%rbp)
movq -0x2a0(%rbp), %rdi
movb -0x291(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x34a0
movq -0x2a8(%rbp), %rdi
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x3450
jmp 0x6556
movq -0x8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movq -0x2b0(%rbp), %rdi
cmpb $0x0, %al
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x1b8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x1c0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq -0x1b8(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
callq 0x11080
movq -0x2b8(%rbp), %rdi
movsbl %al, %esi
callq 0x30e0
jmp 0x6556
callq 0x2140
movl %eax, -0x1e4(%rbp)
leaq -0x1e0(%rbp), %rdi
movl $0x1, %esi
callq 0x114e0
cmpl $0xa, -0x1e4(%rbp)
je 0x60cd
leaq -0x1e0(%rbp), %rdi
leaq -0x1e4(%rbp), %rsi
callq 0x11960
callq 0x2140
movl %eax, -0x1e4(%rbp)
jmp 0x60a4
movq -0x1d0(%rbp), %rax
movl %eax, -0x1f8(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1f8(%rbp), %esi
movq -0x1f0(%rbp), %rdx
callq 0x35c0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, %rdi
xorl %esi, %esi
callq 0xc3e0
leaq 0xed1f(%rip), %rdi      # 0x14e3c
movb $0x0, %al
callq 0x20c0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x1fc(%rbp)
movl -0x1fc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x11c(%rax)
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x200(%rbp)
movq -0x8(%rbp), %rdi
callq 0x31a0
movb %al, -0x201(%rbp)
movsbl -0x201(%rbp), %eax
cmpl $0x0, %eax
jne 0x6187
movl -0x200(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x11c(%rax)
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x208(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x210(%rbp)
movq -0x8(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movslq -0x208(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x118f0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x214(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq -0x8(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movslq -0x214(%rbp), %rsi
callq 0x11890
movq -0x2c0(%rbp), %rdi
movq (%rax), %rsi
callq 0x3140
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x218(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, -0x220(%rbp)
movq -0x8(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
movq -0x8(%rbp), %rax
movl 0x120(%rax), %eax
addl -0x218(%rbp), %eax
movslq %eax, %rsi
leaq -0x220(%rbp), %rdx
callq 0x118f0
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x224(%rbp)
movq -0x8(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
movq -0x8(%rbp), %rax
movl 0x120(%rax), %eax
addl -0x224(%rbp), %eax
movslq %eax, %rsi
callq 0x11890
movq (%rax), %rax
movq %rax, -0x230(%rbp)
movq -0x8(%rbp), %rdi
movq -0x230(%rbp), %rsi
callq 0x3140
jmp 0x6556
movq -0x8(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movq -0x8(%rbp), %rcx
movl 0x11c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x11c(%rcx)
movslq %eax, %rsi
callq 0x11890
movb (%rax), %al
movb %al, -0x231(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11300
movq %rax, -0x23c(%rbp)
cmpb $0x0, -0x23c(%rbp)
je 0x6406
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rax
movzbl -0x231(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x240(%rbp)
leaq -0x260(%rbp), %rdi
movl $0x8, %esi
callq 0x114e0
movzbl -0x231(%rbp), %eax
cmpl $0x0, %eax
jle 0x6365
movq -0x8(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rsi
movzbl -0x231(%rbp), %eax
subq %rax, %rsi
callq 0x11890
movq %rax, -0x2c8(%rbp)
jmp 0x6370
xorl %eax, %eax
movq %rax, -0x2c8(%rbp)
jmp 0x6370
movq -0x2c8(%rbp), %rax
movq %rax, -0x260(%rbp)
movzbl -0x231(%rbp), %eax
movq %rax, -0x250(%rbp)
movq %rax, -0x248(%rbp)
movq -0x8(%rbp), %rdi
movb -0x231(%rbp), %al
movq -0x23c(%rbp), %rsi
movzbl %al, %edx
callq 0x11360
movq -0x8(%rbp), %rax
movb $0x1, 0x119(%rax)
movq -0x8(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
movslq -0x238(%rbp), %rsi
callq 0x11890
movq (%rax), %rax
movq -0x8(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movb $0x0, 0x119(%rax)
movq -0x8(%rbp), %rdi
callq 0x9440
movslq -0x240(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1a8(%rax)
jmp 0x6452
movq -0x8(%rbp), %rdi
movzbl -0x231(%rbp), %esi
callq 0x6750
movq -0x8(%rbp), %rdi
movb -0x231(%rbp), %al
movq -0x23c(%rbp), %rsi
movzbl %al, %edx
callq 0x11360
movq -0x8(%rbp), %rdi
addq $0x298, %rdi            # imm = 0x298
movslq -0x238(%rbp), %rsi
callq 0x11890
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x11c(%rax)
jmp 0x6556
movq -0x8(%rbp), %rax
movq $0x0, 0x160(%rax)
movq -0x8(%rbp), %rdi
callq 0x113f0
movq -0x8(%rbp), %rdi
callq 0x9440
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x3090
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x160(%rax)
movq -0x8(%rbp), %rdi
callq 0x113f0
movq -0x8(%rbp), %rdi
callq 0x9440
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x264(%rbp)
movq -0x8(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movslq -0x264(%rbp), %rsi
callq 0x11890
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x128(%rax)
jmp 0x6556
movq -0x8(%rbp), %rdi
callq 0x10ef0
movl %eax, -0x268(%rbp)
movl -0x268(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x124(%rax)
jmp 0x6556
movq -0x8(%rbp), %rax
movb 0x118(%rax), %cl
addb $0x1, %cl
movb %cl, 0x118(%rax)
jmp 0x6556
movq -0x8(%rbp), %rax
movb 0x118(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x118(%rax)
movq -0x8(%rbp), %rax
movsbl 0x118(%rax), %eax
cmpl $0x0, %eax
jge 0x6546
movq -0x8(%rbp), %rax
movb $0x0, 0x118(%rax)
jmp 0x6556
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x11c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movslq 0x11c(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x1e8(%rcx), %rax
jb 0x657c
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x11c(%rax) # imm = 0xFFFFFFFF
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
nopw %cs:(%rax,%rax)