// File: /workspace/github_c_makefile_star2_O0/FirestonnneTFM[P]tfm_key_parser/src/abc_executer.cpp
// Function: abc_executer::step(int*)
uint8_t abc_executer::step(int32_t *ret) {
	uint8_t op;
	*this >> op;
	if (AS3_OP[op] == nullptr) {
		printf("opcode = 0x%02x\n", op);
		fatal("Unknown opcode");
	}
	size_t len = strlen(AS3_OP[op]);
	for (unsigned i = 0; i < len; ++i) {
		switch (AS3_OP[op][i]) {
		case 'u': {
			uint32_t dummy;
			*this >> dummy;
			*ret = dummy;
			break;
		}
		case 'b': {
			uint8_t dummy;
			*this >> dummy;
			*ret = dummy;
			break;
		}
		case 'h': {
			uint32_t dummy;
			*this >> dummy;
			*ret = (int16_t)dummy;
			break;
		}
		case 'i': {
			*ret = s24();
			break;
		}
		default:
			std::cout << "opcode param = " << AS3_OP[op][i] << std::endl;
			fatal("Unknown opcode param");
		}
	}
	return op;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
leaq -0x11(%rbp), %rsi
callq 0x4370
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xc682(%rip), %rax      # 0xf1d0
cmpq $0x0, (%rax,%rcx,8)
jne 0x2bc3
movzbl -0x11(%rbp), %esi
leaq 0x7520(%rip), %rdi      # 0xa080
xorl %eax, %eax
callq 0x2040
movl $0x18, %edi
callq 0x20e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
leaq 0x750f(%rip), %rsi      # 0xa091
leaq 0x7517(%rip), %rdx      # 0xa0a0
movl $0x10, %ecx
callq 0x2f30
jmp 0x2b95
movq -0x50(%rbp), %rdi
leaq 0xc1e8(%rip), %rsi      # 0xed88
xorl %eax, %eax
movl %eax, %edx
callq 0x22b0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2110
jmp 0x2d4a
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xc600(%rip), %rax      # 0xf1d0
movq (%rax,%rcx,8), %rdi
callq 0x20d0
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpq -0x30(%rbp), %rax
jae 0x2d41
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xc5d2(%rip), %rax      # 0xf1d0
movq (%rax,%rcx,8), %rax
movl -0x34(%rbp), %ecx
movsbl (%rax,%rcx), %eax
addl $-0x62, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x13, %eax
ja 0x2c96
movq -0x58(%rbp), %rax
leaq 0x73e2(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x43d0
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2d31
movq -0x48(%rbp), %rdi
leaq -0x39(%rbp), %rsi
callq 0x4370
movzbl -0x39(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2d31
movq -0x48(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x43d0
movl -0x40(%rbp), %eax
movswl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2d31
movq -0x48(%rbp), %rdi
callq 0x4320
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x2d31
movq 0xc333(%rip), %rdi      # 0xefd0
leaq 0x7411(%rip), %rsi      # 0xa0b5
callq 0x2170
movq %rax, %rdi
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0xc517(%rip), %rax      # 0xf1d0
movq (%rax,%rcx,8), %rax
movl -0x34(%rbp), %ecx
movsbl (%rax,%rcx), %esi
callq 0x21f0
movq %rax, %rdi
movq 0xc2ed(%rip), %rsi      # 0xefc0
callq 0x21c0
movl $0x18, %edi
callq 0x20e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x60(%rbp)
leaq 0x73d2(%rip), %rsi      # 0xa0c5
leaq 0x73a6(%rip), %rdx      # 0xa0a0
movl $0x2d, %ecx
callq 0x2f30
jmp 0x2d06
movq -0x60(%rbp), %rdi
leaq 0xc077(%rip), %rsi      # 0xed88
xorl %eax, %eax
movl %eax, %edx
callq 0x22b0
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2110
jmp 0x2d4a
jmp 0x2d33
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2be4
movb -0x11(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)