// File: /workspace/github_cpp_makefile_star2_O1/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 $0x88, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x90(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x6b(%rdi)
movq %rcx, 0x80(%rdi)
movq %rax, 0x88(%rdi)
movb %al, 0x90(%rdi)
leaq 0xb0(%rdi), %rcx
movq %rcx, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movb %al, 0xb0(%rdi)
leaq -0x70(%rbp), %rsi
movw $0x0, (%rsi)
movq %rdx, -0x30(%rbp)
movq 0xa8(%rdx), %rdi
movl $0x2, %edx
callq 0x22d0
leaq -0x70(%rbp), %rsi
movzbl (%rsi), %r13d
movzbl 0x1(%rsi), %r12d
movw $0x0, (%rsi)
movq -0x30(%rbp), %rax
movq 0xa8(%rax), %rdi
movl $0x2, %edx
callq 0x22d0
leaq -0x70(%rbp), %rsi
movzbl (%rsi), %r15d
movzbl 0x1(%rsi), %r14d
movw $0x0, (%rsi)
movq -0x30(%rbp), %rax
movq 0xa8(%rax), %rdi
movl $0x2, %edx
callq 0x22d0
movzwl %r15w, %eax
shll $0x8, %eax
movzwl %r14w, %esi
orl %eax, %esi
leaq -0x70(%rbp), %rdi
movzwl (%rdi), %r14d
callq 0x1a932
leaq -0x70(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22c0
movq (%r15), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3c2c
callq 0x2200
movzwl %r12w, %eax
testb $0x1, %al
je 0x3c38
movb $0x1, 0x70(%rbx)
testb $0x2, %al
je 0x3c40
movb $0x1, 0x72(%rbx)
testb $0x4, %al
je 0x3c48
movb $0x1, 0x71(%rbx)
testb $0x8, %al
je 0x3c50
movb $0x1, 0x75(%rbx)
testb $0x10, %al
je 0x3c58
movb $0x1, 0x74(%rbx)
testb $0x20, %al
je 0x3c60
movb $0x1, 0x76(%rbx)
testb $0x40, %al
je 0x3c68
movb $0x1, 0x77(%rbx)
testb %r12b, %r12b
jns 0x3c71
movb $0x1, 0x78(%rbx)
movzwl %r13w, %r12d
testb $0x1, %r12b
je 0x3c7f
movb $0x1, 0x79(%rbx)
testb $0x4, %r12b
je 0x3c89
movb $0x1, 0x73(%rbx)
testb $0x8, %r12b
je 0x3c93
movb $0x1, 0x7a(%rbx)
testb $0x10, %r12b
je 0x3cdf
movq 0x1f330(%rip), %r15     # 0x22fd0
leaq 0x1847a(%rip), %rsi     # 0x1c121
movl $0x33, %edx
movq %r15, %rdi
callq 0x2280
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x1f2fe(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
testb $-0x1e, %r12b
je 0x3d2b
movq 0x1f304(%rip), %r15     # 0x22ff0
leaq 0x183a6(%rip), %rsi     # 0x1c099
movl $0x1b, %edx
movq %r15, %rdi
callq 0x2280
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq 0x1f2d2(%rip), %rdi     # 0x22ff0
callq 0x2040
movq %rax, %rdi
callq 0x2180
rolw $0x8, %r14w
movzwl %r14w, %esi
leaq -0x90(%rbp), %rdi
callq 0x1a932
leaq -0xa8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1ab6d
leaq 0x20(%rbx), %r15
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x40(%rbx), %rax
movups 0x48(%rbx), %xmm0
leaq -0xa8(%rbp), %r12
movq (%r12), %rcx
movq %rcx, 0x40(%rbx)
movq 0x8(%r12), %rcx
movq %rcx, 0x48(%rbx)
movq 0x10(%r12), %rcx
movq %rcx, 0x50(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%r12)
movq %rdx, 0x8(%r12)
movq %rsi, 0x10(%r12)
callq 0x42d8
movq %r12, %rdi
callq 0x42d8
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dd1
callq 0x2200
movq 0x48(%rbx), %rsi
addq $-0x20, %rsi
movq %r15, %rdi
callq 0x2150
movq 0x48(%rbx), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x48(%rbx)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x3dff
callq 0x2200
leaq -0x70(%rbp), %rsi
movw $0x0, (%rsi)
movq -0x30(%rbp), %rax
movq 0xa8(%rax), %rdi
movl $0x2, %edx
callq 0x22d0
movzwl -0x70(%rbp), %r13d
rolw $0x8, %r13w
testw %r13w, %r13w
je 0x3e76
leaq 0x58(%rbx), %r15
leaq -0x40(%rbp), %r14
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x3ecc
movq %r15, %rdi
movq %r12, %rsi
callq 0x536e
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x3e5e
callq 0x2200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3e70
callq 0x2200
decw %r13w
jne 0x3e39
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3eaa
movq %rax, %r14
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ebb
callq 0x2200
jmp 0x3ebb
jmp 0x3eaa
jmp 0x3eaa
jmp 0x3eaa
movq %rax, %r14
jmp 0x3ebb
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x4252
movq %rbx, %rdi
callq 0x41da
movq %r14, %rdi
callq 0x23b0
nop