// File: /workspace/github_cpp_makefile_star2_O3/minirop[P]JDecomqiler/src/Helpers.cpp
// Function: parseSignature(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<std::string> parseSignature(std::string signature)
{
	std::vector<std::string> params;
	
	int i = 0;
	if(signature[i] == '(')
	{
		i++;
		
		int next_is_array = 0;
		std::string type;
		while(signature[i] != ')')
		{
			if(signature[i] == '[')
			{
				next_is_array++;
			}
			else
			{
				type = parseType(signature, i);
			}
			
			if(type.length() > 0)
			{
				std::string tmp = type;
				while(next_is_array > 0)
				{
					tmp += "[]";
					next_is_array--;
				}
				params.push_back(tmp);
				tmp.clear();
			}
			
			i++;
		}
		i++; // skip the ')'
	}
	
	params.push_back(parseType(signature, i));
	
	return params;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, -0x38(%rbp)
movq $0x0, 0x10(%rdi)
movl $0x0, -0x2c(%rbp)
movq (%rsi), %rsi
cmpb $0x28, (%rsi)
jne 0x1ac94
leaq -0x2c(%rbp), %rax
movl $0x1, (%rax)
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r15d, %r15d
movl $0x1, %eax
leaq -0x78(%rbp), %r12
leaq 0x1bc7(%rip), %r13      # 0x1c734
leaq -0x98(%rbp), %rbx
movslq %eax, %rcx
movzbl (%rsi,%rcx), %ecx
cmpl $0x5b, %ecx
je 0x1abf4
cmpl $0x29, %ecx
je 0x1ac7a
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x4552
movq %r12, %rdi
movq %rbx, %rsi
leaq -0x2c(%rbp), %rdx
callq 0x1ad8d
leaq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x22c0
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1abd3
callq 0x2200
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x1abeb
callq 0x2200
leaq -0x98(%rbp), %rbx
jmp 0x1abf7
incl %r15d
movq -0x50(%rbp), %rdx
testq %rdx, %rdx
je 0x1ac6a
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rsi
addq %rsi, %rdx
movq %r12, %rdi
callq 0x4552
testl %r15d, %r15d
jle 0x1ac36
incl %r15d
movq %r12, %rdi
movq %r13, %rsi
callq 0x23d0
decl %r15d
cmpl $0x1, %r15d
jg 0x1ac1f
xorl %r15d, %r15d
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x18d4c
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1ac63
callq 0x2200
leaq -0x98(%rbp), %rbx
movl -0x2c(%rbp), %eax
incl %eax
movl %eax, -0x2c(%rbp)
movq (%r14), %rsi
jmp 0x1ab74
incl %eax
movl %eax, -0x2c(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x1ac94
callq 0x2200
movq (%r14), %rsi
leaq -0xa8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x4552
leaq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x1ad8d
leaq -0x58(%rbp), %rsi
movq -0x38(%rbp), %rdi
callq 0x4768
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ace5
callq 0x2200
movq -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1acf6
callq 0x2200
movq -0x38(%rbp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ad26
callq 0x2200
jmp 0x1ad26
movq %rax, %r14
movq -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
jne 0x1ad77
jmp 0x1ad7c
movq %rax, %r14
jmp 0x1ad7c
jmp 0x1ad50
movq %rax, %r14
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
jmp 0x1ad60
jmp 0x1ad55
movq %rax, %r14
jmp 0x1ad6a
movq %rax, %r14
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x1ad6a
callq 0x2200
leaq -0x48(%rbp), %rax
movq -0x58(%rbp), %rdi
cmpq %rax, %rdi
je 0x1ad7c
callq 0x2200
movq -0x38(%rbp), %rdi
callq 0x42d0
movq %r14, %rdi
callq 0x23b0