// File: /workspace/github_cpp_makefile_star2_O3/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: parseType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&)
std::string parseType(std::string signature, int & i)
{
	std::string tmp;
	switch(signature[i])
	{
		case 'B':
			tmp = "byte";
			break;
		case 'C':
			tmp = "char";
			break;
		case 'D':
			tmp = "double";
			break;
		case 'F':
			tmp = "float";
			break;
		case 'I':
			tmp = "int";
			break;
		case 'J':
			tmp = "long";
			break;
		case 'L':
			do
			{
				i++;
				tmp += signature[i];
			} while(signature[i] != ';');
			tmp.pop_back();
			break;
		case 'S':
			tmp = "short";
			break;
		case 'Z':
			tmp = "boolean";
			break;
		case '[':
			i++;
			tmp = parseType(signature, i);
			tmp += "[]";
			break;
		case 'V':
			tmp = "void";
			break;
		default:
			cerr << "unrecognized parameter '" << signature[i] << "' type in signature" << endl;
			exit(1);
	}
	
	tmp = checkClassName(tmp);
	
	return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movslq (%rdx), %rax
movq (%rsi), %rsi
movzbl (%rsi,%rax), %ecx
addl $-0x42, %ecx
cmpl $0x19, %ecx
ja 0x1af71
movl $0x4, %r8d
leaq 0x1eb3(%rip), %rdx      # 0x1cc90
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1f80(%rip), %rcx      # 0x1cd6d
jmp 0x1aefd
cltq
leaq 0x1(%rax), %rcx
movl %ecx, (%r14)
movsbl 0x1(%rsi,%rax), %esi
movq %rbx, %rdi
callq 0x21e0
movslq (%r14), %rax
movq (%r15), %rsi
cmpb $0x3b, (%rsi,%rax)
jne 0x1adf2
movq %rbx, %rdi
callq 0x22b0
jmp 0x1af09
movl $0x7, %r8d
leaq 0x1f32(%rip), %rcx      # 0x1cd60
jmp 0x1aefd
incl %eax
movl %eax, (%r14)
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x4552
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rdx
callq 0x1ad8d
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1ae86
callq 0x2200
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x1ae97
callq 0x2200
leaq 0x1896(%rip), %rsi      # 0x1c734
movq %rbx, %rdi
callq 0x23d0
jmp 0x1af09
leaq 0x1a9f(%rip), %rcx      # 0x1c94e
jmp 0x1aefd
movl $0x3, %r8d
leaq 0x1879(%rip), %rcx      # 0x1c737
jmp 0x1aefd
leaq 0x1874(%rip), %rcx      # 0x1c73b
jmp 0x1aefd
movl $0x6, %r8d
leaq 0x1870(%rip), %rcx      # 0x1c746
jmp 0x1aefd
movl $0x5, %r8d
leaq 0x1e8d(%rip), %rcx      # 0x1cd72
jmp 0x1aefd
movl $0x5, %r8d
leaq 0x184c(%rip), %rcx      # 0x1c740
jmp 0x1aefd
leaq 0x1e6b(%rip), %rcx      # 0x1cd68
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2320
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4552
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1a962
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1af51
callq 0x2200
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1af5f
callq 0x2200
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8078(%rip), %rdi      # 0x22ff0
leaq 0x1e09(%rip), %rsi      # 0x1cd88
movl $0x18, %edx
callq 0x2280
movslq (%r14), %rax
movq (%r15), %rcx
movb (%rcx,%rax), %al
leaq -0x48(%rbp), %rsi
movb %al, (%rsi)
movq 0x8051(%rip), %rdi      # 0x22ff0
movl $0x1, %edx
callq 0x2280
movq %rax, %r14
leaq 0x1dee(%rip), %rsi      # 0x1cda1
movl $0x13, %edx
movq %rax, %rdi
callq 0x2280
movq %r14, %rdi
callq 0x2130
movl $0x1, %edi
callq 0x22a0
movq %rax, %r14
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
jne 0x1aff3
jmp 0x1afff
jmp 0x1affc
jmp 0x1affc
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1afff
callq 0x2200
jmp 0x1afff
jmp 0x1affc
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1b00c
callq 0x2200
movq %r14, %rdi
callq 0x23b0