// File: /workspace/github_cpp_makefile_star2_O2/minirop[P]JDecomqiler/src/ClassFile.cpp
// Function: ClassFile::parseField()
FieldOutput ClassFile::parseField()
{
	FieldOutput field;
	
	std::uint16_t access_flags, name_index, descriptor_index;
	stream >> access_flags >> name_index >> descriptor_index;
	
	field.name = getName(name_index);
	int i = 0;
	field.type = parseType(getName(descriptor_index), i);
	
	if(access_flags & ACC_PUBLIC)
		field.isPublic = true;
	if(access_flags & ACC_PRIVATE)
		field.isPrivate = true;
	if(access_flags & ACC_PROTECTED)
		field.isProtected = true;
	if(access_flags & ACC_STATIC)
		field.isStatic = true;
	if(access_flags & ACC_FINAL)
		field.isFinal = true;
	if(access_flags & ACC_VOLATILE)
		field.isVolatile = true;
	if(access_flags & ACC_TRANSIENT)
		field.isTransient = true;
	if(access_flags & ACC_SYNTHETIC)
		cout << "Declared synthetic; not present in the source code." << endl;
	if(access_flags & ACC_ENUM)
		cout << "is part of an enum." << endl;
	if(access_flags & ~ACC_FIELD_MASK)
		cerr << "ERROR: unrecognized flag(s)" << endl;
	
	std::uint16_t attributes_count;
	stream >> attributes_count;
	cout << "- " << attributes_count << " attributes" << endl;
	for(std::uint16_t i = 0;i < attributes_count;i++)
	{
		field.attributes.push_back(parseAttribute());
	}
	
	return field;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb %al, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x4f(%rdi)
leaq 0xa8(%rsi), %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 -0x98(%rbp), %rdi
callq 0x119f9
leaq -0x98(%rbp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22b0
movq %r12, %rdi
callq 0x2140
andl $0x0, -0x34(%rbp)
movzwl -0x2c(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0x119f9
leaq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x11d64
leaq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x22b0
movq %r12, %rdi
callq 0x2140
leaq -0x58(%rbp), %rdi
callq 0x2140
movzwl -0x30(%rbp), %r12d
testb $0x1, %r12b
je 0x3127
movb $0x1, 0x58(%rbx)
testb $0x2, %r12b
je 0x3131
movb $0x1, 0x5a(%rbx)
testb $0x4, %r12b
je 0x313b
movb $0x1, 0x59(%rbx)
testb $0x8, %r12b
je 0x3145
movb $0x1, 0x5d(%rbx)
testb $0x10, %r12b
je 0x314f
movb $0x1, 0x5c(%rbx)
testb $0x40, %r12b
je 0x3159
movb $0x1, 0x5b(%rbx)
testb %r12b, %r12b
jns 0x3162
movb $0x1, 0x5e(%rbx)
btl $0xc, %r12d
jae 0x3184
movq 0x15e60(%rip), %rdi     # 0x18fd0
leaq 0xefbe(%rip), %rsi      # 0x12135
callq 0x2230
movq %rax, %rdi
callq 0x2150
btl $0xe, %r12d
jae 0x31a6
movq 0x15e3e(%rip), %rdi     # 0x18fd0
leaq 0xefd0(%rip), %rsi      # 0x12169
callq 0x2230
movq %rax, %rdi
callq 0x2150
testw $0xaf20, %r12w          # imm = 0xAF20
je 0x31c9
movq 0x15e3b(%rip), %rdi     # 0x18ff0
leaq 0xeef1(%rip), %rsi      # 0x120ad
callq 0x2230
movq %rax, %rdi
callq 0x2150
leaq -0x2a(%rbp), %rsi
movq %r15, %rdi
callq 0x280c
movq 0x15df4(%rip), %rdi     # 0x18fd0
leaq 0xf574(%rip), %rsi      # 0x12757
callq 0x2230
movzwl -0x2a(%rbp), %r13d
movzwl %r13w, %esi
movq %rax, %rdi
callq 0x2380
leaq 0xeee6(%rip), %rsi      # 0x120e6
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x2150
leaq 0x40(%rbx), %r15
leaq -0x98(%rbp), %r12
subw $0x1, %r13w
jb 0x3242
movq %r12, %rdi
movq %r14, %rsi
callq 0x34a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x456a
movq %r12, %rdi
callq 0x3716
jmp 0x321b
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x2140
jmp 0x3280
jmp 0x326c
jmp 0x326c
jmp 0x326c
jmp 0x326c
jmp 0x326c
movq %rax, %r14
jmp 0x3280
movq %rax, %r14
leaq -0x98(%rbp), %rdi
callq 0x3716
movq %rbx, %rdi
callq 0x36a2
movq %r14, %rdi
callq 0x23b0