// File: /workspace/github_cpp_makefile_star2_O3/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, %r13
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)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x4f(%rdi)
leaq -0x78(%rbp), %rsi
movw $0x0, (%rsi)
movq 0xa8(%r14), %rdi
movl $0x2, %edx
movq %r13, -0x30(%rbp)
callq 0x22d0
leaq -0x78(%rbp), %rsi
movzbl (%rsi), %r12d
movzbl 0x1(%rsi), %eax
movl %eax, -0x34(%rbp)
movw $0x0, (%rsi)
movq 0xa8(%r14), %rdi
movl $0x2, %edx
callq 0x22d0
leaq -0x78(%rbp), %rsi
movzbl (%rsi), %r15d
movzbl 0x1(%rsi), %ebx
movw $0x0, (%rsi)
movq 0xa8(%r14), %rdi
movl $0x2, %edx
callq 0x22d0
movzwl %r15w, %eax
shll $0x8, %eax
movzwl %bx, %esi
orl %eax, %esi
leaq -0x78(%rbp), %rdi
movzwl (%rdi), %ebx
callq 0x1a8c6
rolw $0x8, %bx
leaq -0x78(%rbp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x22c0
movq (%r15), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3838
callq 0x2200
movl $0x0, -0x38(%rbp)
movzwl %bx, %esi
leaq -0x98(%rbp), %rdi
callq 0x1a8c6
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x1ad8d
movl -0x34(%rbp), %ebx
leaq 0x20(%r13), %rdi
movq %r15, %rsi
callq 0x22c0
movq (%r15), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3882
callq 0x2200
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3897
callq 0x2200
movzwl %bx, %eax
testb $0x1, %al
je 0x38a3
movb $0x1, 0x58(%r13)
testb $0x2, %al
je 0x38ac
movb $0x1, 0x5a(%r13)
testb $0x4, %al
je 0x38b5
movb $0x1, 0x59(%r13)
testb $0x8, %al
je 0x38be
movb $0x1, 0x5d(%r13)
testb $0x10, %al
je 0x38c7
movb $0x1, 0x5c(%r13)
testb $0x40, %al
je 0x38d0
movb $0x1, 0x5b(%r13)
testb %bl, %bl
jns 0x38d9
movb $0x1, 0x5e(%r13)
movzwl %r12w, %r13d
testb $0x10, %r13b
je 0x3929
movq 0x1f6e6(%rip), %r15     # 0x22fd0
leaq 0x18830(%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 0x1f6b4(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
testb $0x40, %r13b
je 0x3975
movq 0x1f69a(%rip), %r15     # 0x22fd0
leaq 0x18818(%rip), %rsi     # 0x1c155
movl $0x13, %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 0x1f668(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
shll $0x8, %r12d
orl %ebx, %r12d
testl $0xaf20, %r12d          # imm = 0xAF20
je 0x39cb
movq 0x1f664(%rip), %r15     # 0x22ff0
leaq 0x18706(%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 0x1f632(%rip), %rdi     # 0x22ff0
callq 0x2040
movq %rax, %rdi
callq 0x2180
leaq -0x78(%rbp), %rsi
movw $0x0, (%rsi)
movq 0xa8(%r14), %rdi
movl $0x2, %edx
callq 0x22d0
movzbl -0x78(%rbp), %r12d
movzbl -0x77(%rbp), %ebx
movq 0x1f5db(%rip), %rdi     # 0x22fd0
leaq 0x18d5b(%rip), %rsi     # 0x1c757
movl $0x2, %edx
callq 0x2280
shll $0x8, %r12d
leal (%r12,%rbx), %r13d
movzwl %r13w, %esi
movq 0x1f5b7(%rip), %rdi     # 0x22fd0
callq 0x2170
movq %rax, %r15
leaq 0x186aa(%rip), %rsi     # 0x1c0d2
movl $0xb, %edx
movq %rax, %rdi
callq 0x2280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
testw %r13w, %r13w
je 0x3ab3
movq -0x30(%rbp), %rax
leaq 0x40(%rax), %r15
leaq -0x48(%rbp), %r13
movzwl %bx, %ebx
addl %r12d, %ebx
leaq -0x78(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ebe
movq %r15, %rdi
movq %r12, %rsi
callq 0x5378
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x3a9c
callq 0x2200
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3aae
callq 0x2200
decw %bx
jne 0x3a78
movq -0x30(%rbp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3afb
callq 0x2200
jmp 0x3afb
jmp 0x3aea
jmp 0x3aea
jmp 0x3aea
jmp 0x3aea
jmp 0x3aea
movq %rax, %r14
jmp 0x3afb
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x424a
movq -0x30(%rbp), %rdi
callq 0x4194
movq %r14, %rdi
callq 0x23b0