// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpb $0x0, (%rdi)
jne 0x3a93
movq %rdi, %rbx
movb $0x1, (%rdi)
movq 0x78(%rdi), %rax
movq 0x40(%rax), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x303c
movq %rbx, 0x10(%rsp)
movq 0x78(%rbx), %rax
movl 0x24(%rax), %esi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x41b0
leaq 0xc(%rsp), %r12
leaq 0x285f(%rip), %rbx      # 0x60c8
movq %r14, %rdi
movq %r12, %rsi
callq 0x2806
movzbl %al, %r13d
cmpl $0x46, %r13d
jg 0x38ac
cmpl $0x23, %r13d
jle 0x3991
leal -0x24(%r13), %eax
cmpl $0xc, %eax
ja 0x39c2
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0x41de
jmp 0x3869
cmpl $0x95, %r13d
jg 0x38cf
cmpl $0x60, %r13d
jg 0x391d
leal -0x5d(%r13), %eax
cmpl $0x2, %eax
jb 0x3869
cmpl $0x60, %r13d
je 0x3869
jmp 0x3a8d
cmpl $0xa2, %r13d
jg 0x3965
cmpl $0x96, %r13d
je 0x39eb
cmpl $0xa0, %r13d
je 0x3a33
cmpl $0xa2, %r13d
jne 0x3aa2
movq %r15, %rdi
callq 0x41ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x41ec
imull %eax, %ebp
jmp 0x3a47
cmpl $0x61, %r13d
je 0x3937
cmpl $0x66, %r13d
je 0x3a7e
cmpl $0x68, %r13d
jne 0x3aa2
movl 0xc(%rsp), %edi
callq 0x2ebe
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3b14
movq %rax, %r13
movb $0x1, 0x10(%rax)
movq %r15, %rdi
callq 0x41ec
movl %eax, 0x14(%r13)
jmp 0x3869
cmpl $0xa3, %r13d
je 0x39fd
cmpl $0xab, %r13d
je 0x3a56
cmpl $0xd0, %r13d
je 0x3869
jmp 0x3aa2
cmpl $0x10, %r13d
je 0x39b1
cmpl $0x12, %r13d
jne 0x3aa2
movq %r15, %rdi
callq 0x41ec
testl %eax, %eax
jne 0x3869
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x2aba
jmp 0x3869
cmpl $0x46, %r13d
je 0x3869
jmp 0x3aa2
movq %r15, %rdi
callq 0x41ec
jmp 0x3869
movq 0x18(%rsp), %rax
movl -0x4(%rax), %esi
jmp 0x38a2
movq %r15, %rdi
callq 0x41ec
testl %eax, %eax
jne 0x3a7e
jmp 0x3a6c
movq %r15, %rdi
callq 0x41ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x41ec
movl %eax, %ecx
testl %ebp, %ebp
setne %al
testl %ecx, %ecx
setne %dl
testb %dl, %al
je 0x3a7e
movl %ebp, %eax
cltd
idivl %ecx
movq %r15, %rdi
movl %eax, %esi
callq 0x41de
jmp 0x3869
movq %r15, %rdi
callq 0x41ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x41ec
addl %eax, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x41de
jmp 0x3869
movq %r15, %rdi
callq 0x41ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x41ec
cmpl %eax, %ebp
jne 0x3a7e
movq %r15, %rdi
movl $0x1, %esi
callq 0x41de
jmp 0x3869
movq %r15, %rdi
xorl %esi, %esi
callq 0x41de
jmp 0x3869
cmpl $0x47, %r13d
jne 0x3aa2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5527(%rip), %rdi      # 0x8fd0
leaq 0x265b(%rip), %rsi      # 0x610b
callq 0x21c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %r13d, %esi
callq 0x22e0
movq %rax, %rdi
callq 0x20f0
movl $0x18, %edi
callq 0x2100
movl $0x8e, (%rax)
leaq 0x263b(%rip), %rcx      # 0x612f
movq %rcx, 0x8(%rax)
leaq 0x2614(%rip), %rcx      # 0x6113
movq %rcx, 0x10(%rax)
leaq 0x5286(%rip), %rsi      # 0x8d90
movq %rax, %rdi
xorl %edx, %edx
callq 0x22d0