// File: /workspace/github_cpp_makefile_star2_O2/minirop[P]JDecomqiler/src/ClassFile.cpp
// Function: ClassFile::parseMethod()
MethodOutput ClassFile::parseMethod()
{
	MethodOutput method;
	
	std::uint16_t access_flags, name_index, descriptor_index;
	stream >> access_flags >> name_index >> descriptor_index;
	method.name = getName(name_index);
	
	if(access_flags & ACC_PUBLIC)
		method.isPublic = true;
	if(access_flags & ACC_PRIVATE)
		method.isPrivate = true;
	if(access_flags & ACC_PROTECTED)
		method.isProtected = true;
	if(access_flags & ACC_STATIC)
		method.isStatic = true;
	if(access_flags & ACC_FINAL)
		method.isFinal = true;
	if(access_flags & ACC_SYNCHRONIZED)
		method.isSynchronized = true;
	if(access_flags & ACC_BRIDGE)
		method.isBridge = true;
	if(access_flags & ACC_VARARGS)
		method.isVarargs = true;
	if(access_flags & ACC_NATIVE)
		method.isNative = true;
	if(access_flags & ACC_ABSTRACT)
		method.isAbstract = true;
	if(access_flags & ACC_STRICT)
		method.isStrict = true;
	if(access_flags & ACC_SYNTHETIC)
		cout << "Declared synthetic; not present in the source code." << endl;
	if(access_flags & ~ACC_METHOD_MASK)
		cerr << "ERROR: unrecognized flag(s)" << endl;
	
	method.parametersType = parseSignature(getName(descriptor_index));
	method.returnType = method.parametersType.back();
	method.parametersType.pop_back();
	
	std::uint16_t attributes_count;
	stream >> attributes_count;
	for(std::uint16_t i = 0;i < attributes_count;i++)
	{
		method.attributes.push_back(parseAttribute());
	}
	
	return method;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x37c2
leaq 0xa8(%r14), %r15
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
callq 0x280c
leaq -0x2e(%rbp), %rsi
movq %r15, %rdi
callq 0x280c
leaq -0x2c(%rbp), %rsi
movq %r15, %rdi
callq 0x280c
movzwl -0x2e(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x119f9
leaq -0x90(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22b0
movq %r12, %rdi
callq 0x2140
movzwl -0x30(%rbp), %r12d
testb $0x1, %r12b
je 0x3310
movb $0x1, 0x70(%rbx)
testb $0x2, %r12b
je 0x331a
movb $0x1, 0x72(%rbx)
testb $0x4, %r12b
je 0x3324
movb $0x1, 0x71(%rbx)
testb $0x8, %r12b
je 0x332e
movb $0x1, 0x75(%rbx)
testb $0x10, %r12b
je 0x3338
movb $0x1, 0x74(%rbx)
testb $0x20, %r12b
je 0x3342
movb $0x1, 0x76(%rbx)
testb $0x40, %r12b
je 0x334c
movb $0x1, 0x77(%rbx)
testb %r12b, %r12b
jns 0x3355
movb $0x1, 0x78(%rbx)
btl $0x8, %r12d
jae 0x3360
movb $0x1, 0x79(%rbx)
btl $0xa, %r12d
jae 0x336b
movb $0x1, 0x73(%rbx)
btl $0xb, %r12d
jae 0x3376
movb $0x1, 0x7a(%rbx)
btl $0xc, %r12d
jae 0x3398
movq 0x15c4c(%rip), %rdi     # 0x18fd0
leaq 0xedaa(%rip), %rsi      # 0x12135
callq 0x2230
movq %rax, %rdi
callq 0x2150
testw $0xe200, %r12w          # imm = 0xE200
je 0x33bb
movq 0x15c49(%rip), %rdi     # 0x18ff0
leaq 0xecff(%rip), %rsi      # 0x120ad
callq 0x2230
movq %rax, %rdi
callq 0x2150
movzwl -0x2c(%rbp), %esi
leaq -0x50(%rbp), %rdi
callq 0x119f9
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11b7c
leaq 0x40(%rbx), %r12
leaq -0x90(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x4772
movq %r13, %rdi
callq 0x3834
leaq -0x50(%rbp), %rdi
callq 0x2140
movq 0x48(%rbx), %rsi
addq $-0x20, %rsi
leaq 0x20(%rbx), %rdi
callq 0x2170
movq %r12, %rdi
callq 0x3860
leaq -0x2a(%rbp), %rsi
movq %r15, %rdi
callq 0x280c
movzwl -0x2a(%rbp), %r13d
leaq 0x58(%rbx), %r15
leaq -0x90(%rbp), %r12
subw $0x1, %r13w
jb 0x345b
movq %r12, %rdi
movq %r14, %rsi
callq 0x34a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x456a
movq %r12, %rdi
callq 0x3716
jmp 0x3434
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3483
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x2140
jmp 0x3497
jmp 0x3483
jmp 0x3483
jmp 0x3483
movq %rax, %r14
jmp 0x3497
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x3716
movq %rbx, %rdi
callq 0x36cc
movq %r14, %rdi
callq 0x23b0
nop