// File: /workspace/github_cpp_makefile_star2_O1/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 0x1afd8
movl $0x4, %r8d
leaq 0x1e50(%rip), %rdx      # 0x1cc90
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1f1d(%rip), %rcx      # 0x1cd6d
jmp 0x1af64
movslq (%r14), %rax
leaq 0x1(%rax), %rcx
movl %ecx, (%r14)
movq (%r15), %rcx
movsbl 0x1(%rcx,%rax), %esi
movq %rbx, %rdi
callq 0x21e0
movslq (%r14), %rax
movq (%r15), %rcx
cmpb $0x3b, (%rcx,%rax)
jne 0x1ae55
movq %rbx, %rdi
callq 0x22b0
jmp 0x1af70
movl $0x7, %r8d
leaq 0x1ecb(%rip), %rcx      # 0x1cd60
jmp 0x1af64
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 0x4550
leaq -0x48(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rdx
callq 0x1adf0
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1aeed
callq 0x2200
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x1aefe
callq 0x2200
leaq 0x182f(%rip), %rsi      # 0x1c734
movq %rbx, %rdi
callq 0x23d0
jmp 0x1af70
leaq 0x1a38(%rip), %rcx      # 0x1c94e
jmp 0x1af64
movl $0x3, %r8d
leaq 0x1812(%rip), %rcx      # 0x1c737
jmp 0x1af64
leaq 0x180d(%rip), %rcx      # 0x1c73b
jmp 0x1af64
movl $0x6, %r8d
leaq 0x1809(%rip), %rcx      # 0x1c746
jmp 0x1af64
movl $0x5, %r8d
leaq 0x1e26(%rip), %rcx      # 0x1cd72
jmp 0x1af64
movl $0x5, %r8d
leaq 0x17e5(%rip), %rcx      # 0x1c740
jmp 0x1af64
leaq 0x1e04(%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 0x4550
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1a9ce
leaq -0x48(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22c0
movq (%r14), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1afb8
callq 0x2200
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1afc6
callq 0x2200
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8011(%rip), %rdi      # 0x22ff0
leaq 0x1da2(%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 0x7fea(%rip), %rdi      # 0x22ff0
movl $0x1, %edx
callq 0x2280
movq %rax, %r14
leaq 0x1d87(%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 0x1b05a
jmp 0x1b066
jmp 0x1b063
jmp 0x1b063
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1b066
callq 0x2200
jmp 0x1b066
jmp 0x1b063
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1b073
callq 0x2200
movq %r14, %rdi
callq 0x23b0
nop