// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdx, %r14
movq %rsi, %r15
movb $0x0, 0x10(%rdi)
movslq (%rdx), %rax
movq (%rsi), %rcx
movzbl (%rcx,%rax), %edx
addl $-0x42, %edx
cmpl $0x19, %edx
ja 0x11ed5
leaq 0xee9(%rip), %rsi       # 0x12c90
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
leaq 0xf76(%rip), %rsi       # 0x12d2d
jmp 0x11e86
cltq
leaq 0x1(%rax), %rdx
movl %edx, (%r14)
movsbl 0x1(%rcx,%rax), %esi
movq %rbx, %rdi
callq 0x21f0
movslq (%r14), %rax
movq (%r15), %rcx
cmpb $0x3b, (%rcx,%rax)
jne 0x11dbc
movq %rbx, %rdi
callq 0x22a0
jmp 0x11e8e
leaq 0xf2e(%rip), %rsi       # 0x12d20
jmp 0x11e86
incl %eax
movl %eax, (%r14)
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
callq 0x22f0
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq %r14, %rdx
callq 0x11d64
leaq -0x78(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b0
movq %r14, %rdi
callq 0x2140
leaq -0x58(%rbp), %rdi
callq 0x2140
leaq 0x8f5(%rip), %rsi       # 0x12734
movq %rbx, %rdi
callq 0x23d0
jmp 0x11e8e
leaq 0xafe(%rip), %rsi       # 0x1294e
jmp 0x11e86
leaq 0x8de(%rip), %rsi       # 0x12737
jmp 0x11e86
leaq 0x8d9(%rip), %rsi       # 0x1273b
jmp 0x11e86
leaq 0x8db(%rip), %rsi       # 0x12746
jmp 0x11e86
leaq 0xebe(%rip), %rsi       # 0x12d32
jmp 0x11e86
leaq 0x8c3(%rip), %rsi       # 0x12740
jmp 0x11e86
leaq 0xea2(%rip), %rsi       # 0x12d28
movq %rbx, %rdi
callq 0x23e0
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x22f0
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x11a78
leaq -0x78(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b0
movq %r14, %rdi
callq 0x2140
leaq -0x38(%rbp), %rdi
callq 0x2140
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x7114(%rip), %rdi      # 0x18ff0
leaq 0xe65(%rip), %rsi       # 0x12d48
callq 0x2230
movslq (%r14), %rcx
movq (%r15), %rdx
movsbl (%rdx,%rcx), %esi
movq %rax, %rdi
callq 0x2280
leaq 0xe60(%rip), %rsi       # 0x12d61
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x2150
pushq $0x1
popq %rdi
callq 0x2290
movq %rax, %r14
leaq -0x58(%rbp), %rdi
jmp 0x11f2d
jmp 0x11f36
jmp 0x11f36
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x2140
jmp 0x11f39
jmp 0x11f36
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x23b0
nop