// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a8c6
leaq -0x70(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22c0
movq (%r15), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3c34
callq 0x2200
movzwl %r12w, %eax
testb $0x1, %al
je 0x3c40
movb $0x1, 0x70(%rbx)
testb $0x2, %al
je 0x3c48
movb $0x1, 0x72(%rbx)
testb $0x4, %al
je 0x3c50
movb $0x1, 0x71(%rbx)
testb $0x8, %al
je 0x3c58
movb $0x1, 0x75(%rbx)
testb $0x10, %al
je 0x3c60
movb $0x1, 0x74(%rbx)
testb $0x20, %al
je 0x3c68
movb $0x1, 0x76(%rbx)
testb $0x40, %al
je 0x3c70
movb $0x1, 0x77(%rbx)
testb %r12b, %r12b
jns 0x3c79
movb $0x1, 0x78(%rbx)
movzwl %r13w, %r12d
testb $0x1, %r12b
je 0x3c87
movb $0x1, 0x79(%rbx)
testb $0x4, %r12b
je 0x3c91
movb $0x1, 0x73(%rbx)
testb $0x8, %r12b
je 0x3c9b
movb $0x1, 0x7a(%rbx)
testb $0x10, %r12b
je 0x3ce7
movq 0x1f328(%rip), %r15     # 0x22fd0
leaq 0x18472(%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 0x1f2f6(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
testb $-0x1e, %r12b
je 0x3d33
movq 0x1f2fc(%rip), %r15     # 0x22ff0
leaq 0x1839e(%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 0x1f2ca(%rip), %rdi     # 0x22ff0
callq 0x2040
movq %rax, %rdi
callq 0x2180
rolw $0x8, %r14w
movzwl %r14w, %esi
leaq -0x90(%rbp), %rdi
callq 0x1a8c6
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1ab01
leaq 0x20(%rbx), %r15
movups 0x40(%rbx), %xmm0
movq 0x50(%rbx), %rax
leaq -0xb0(%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)
leaq -0x70(%rbp), %rdi
movups %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
callq 0x42d0
movq %r12, %rdi
callq 0x42d0
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3dc3
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 0x3df1
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 0x3e68
leaq 0x58(%rbx), %r15
leaq -0x40(%rbp), %r14
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
callq 0x3ebe
movq %r15, %rdi
movq %r12, %rsi
callq 0x5378
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x3e50
callq 0x2200
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x3e62
callq 0x2200
decw %r13w
jne 0x3e2b
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e9c
movq %rax, %r14
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ead
callq 0x2200
jmp 0x3ead
jmp 0x3e9c
jmp 0x3e9c
jmp 0x3e9c
movq %rax, %r14
jmp 0x3ead
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x424a
movq %rbx, %rdi
callq 0x41d2
movq %r14, %rdi
callq 0x23b0
nop