// File: /workspace/github_c_makefile_star2_O0/FirestonnneTFM[P]tfm_key_parser/src/class_info.cpp
// Function: class_info::do_static_init()
void class_info::do_static_init() {
	if (static_init_already_done)
		return;
	static_init_already_done = true;
	abc_executer exec(static_ctor->code.begin());
	bool ret = true;
	int_stack stack(static_ctor->max_stack);
	while (ret) {
		int32_t param;
		uint8_t op = exec.step(&param);
		switch (op) {
		case OP_returnvoid:
			ret = false;
			break;
		case OP_pushint:
		case OP_pushuint:
		case OP_pushbyte:
		case OP_pushshort:
			stack.push(param);
			break;
		case OP_pushfalse:
		case OP_pushstring:
		case OP_getproperty:
			stack.push(0);
			break;
		case OP_pushtrue:
			stack.push(1);
			break;
		case OP_not:
			if (stack.pop())
				stack.push(0);
			else
				stack.push(1);
			break;
		case OP_equals:
			if (stack.pop() == stack.pop())
				stack.push(1);
			else
				stack.push(0);
			break;
		case OP_dup:
			stack.push(stack.top());
			break;
		case OP_pop:
			stack.pop();
			break;
		case OP_add:
			stack.push(stack.pop() + stack.pop());
			break;
		case OP_multiply:
			stack.push(stack.pop() * stack.pop());
			break;
		case OP_divide: {
			int p = stack.pop();
			int q = stack.pop();
			if (p == 0 || q == 0)
				stack.push(0);
			else
				stack.push(p / q);
			break;
		}
		case OP_setproperty:
		case OP_initproperty: {
			traits_info *t = get_trait_by_name(abc_file::get_multiname(param));
			t->has_loaded_value = true;
			t->loaded_value = stack.pop();
			break;
		}
		case OP_jump:
			exec.rel_jmp(param);
			break;
		case OP_iffalse:
			if (stack.pop() == 0)
				exec.rel_jmp(param);
			break;
		case OP_getlocal_0:
		case OP_pushscope:
		case OP_findproperty:
		case OP_findpropstrict:
		case OP_getlex:
		case OP_callproperty:
			// do nothing
			break;
		default:
			std::cout << "op = 0x" << std::hex << +op << std::endl;
			fatal("static init not handling op");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
testb $0x1, (%rax)
je 0x4fa1
jmp 0x528f
movq -0x60(%rbp), %rax
movb $0x1, (%rax)
movq 0x78(%rax), %rdi
addq $0x38, %rdi
callq 0x5560
movq %rax, %rsi
leaq -0x18(%rbp), %rdi
callq 0x5580
movq -0x60(%rbp), %rax
movb $0x1, -0x19(%rbp)
movq 0x78(%rax), %rax
movl 0x24(%rax), %esi
leaq -0x30(%rbp), %rdi
callq 0x6df0
testb $0x1, -0x19(%rbp)
je 0x528f
leaq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x2b20
movb %al, -0x35(%rbp)
movzbl -0x35(%rbp), %eax
addl $-0x10, %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0xc0, %eax
ja 0x51f4
movq -0x68(%rbp), %rax
leaq 0x512e(%rip), %rcx      # 0xa144
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, -0x19(%rbp)
jmp 0x528a
movl -0x34(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
cmpl $0x0, %eax
je 0x5077
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x6e60
jmp 0x5085
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, -0x6c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cmpl %ecx, %eax
jne 0x50b8
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x6e60
jmp 0x50c3
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x55b0
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, -0x70(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl -0x70(%rbp), %esi
addl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, -0x74(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl -0x74(%rbp), %esi
imull %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x6e60
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x5164
cmpl $0x0, -0x40(%rbp)
jne 0x5171
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x6e60
jmp 0x5183
movl -0x3c(%rbp), %eax
cltd
idivl -0x40(%rbp)
movl %eax, %esi
leaq -0x30(%rbp), %rdi
callq 0x6e60
jmp 0x528a
movl -0x34(%rbp), %edi
callq 0x35d0
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x52b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movb $0x1, 0x10(%rax)
leaq -0x30(%rbp), %rdi
callq 0x6e90
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x528a
movl -0x34(%rbp), %esi
leaq -0x18(%rbp), %rdi
callq 0x2f00
jmp 0x528a
leaq -0x30(%rbp), %rdi
callq 0x6e90
cmpl $0x0, %eax
jne 0x51ea
movl -0x34(%rbp), %esi
leaq -0x18(%rbp), %rdi
callq 0x2f00
jmp 0x528a
jmp 0x528a
movq 0x9dd5(%rip), %rdi      # 0xefd0
leaq 0x5255(%rip), %rsi      # 0xa457
callq 0x2170
movq %rax, %rdi
leaq -0x22b1(%rip), %rsi     # 0x2f60
callq 0x2090
movq %rax, %rdi
movzbl -0x35(%rbp), %esi
callq 0x22c0
movq %rax, %rdi
movq 0x9d94(%rip), %rsi      # 0xefc0
callq 0x21c0
movl $0x18, %edi
callq 0x20e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
leaq 0x5213(%rip), %rsi      # 0xa45f
leaq 0x5228(%rip), %rdx      # 0xa47b
movl $0x8e, %ecx
callq 0x2f30
jmp 0x525f
movq -0x80(%rbp), %rdi
leaq 0x9b1e(%rip), %rsi      # 0xed88
xorl %eax, %eax
movl %eax, %edx
callq 0x22b0
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0x2110
jmp 0x5298
jmp 0x4fd9
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)