// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a932
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 0x3830
callq 0x2200
movl $0x0, -0x38(%rbp)
movzwl %bx, %esi
leaq -0x98(%rbp), %rdi
callq 0x1a932
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x1adf0
movl -0x34(%rbp), %ebx
leaq 0x20(%r13), %rdi
movq %r15, %rsi
callq 0x22c0
movq (%r15), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x387a
callq 0x2200
leaq -0x88(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x388f
callq 0x2200
movzwl %bx, %eax
testb $0x1, %al
je 0x389b
movb $0x1, 0x58(%r13)
testb $0x2, %al
je 0x38a4
movb $0x1, 0x5a(%r13)
testb $0x4, %al
je 0x38ad
movb $0x1, 0x59(%r13)
testb $0x8, %al
je 0x38b6
movb $0x1, 0x5d(%r13)
testb $0x10, %al
je 0x38bf
movb $0x1, 0x5c(%r13)
testb $0x40, %al
je 0x38c8
movb $0x1, 0x5b(%r13)
testb %bl, %bl
jns 0x38d1
movb $0x1, 0x5e(%r13)
movzwl %r12w, %r13d
testb $0x10, %r13b
je 0x3921
movq 0x1f6ee(%rip), %r15     # 0x22fd0
leaq 0x18838(%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 0x1f6bc(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
testb $0x40, %r13b
je 0x396d
movq 0x1f6a2(%rip), %r15     # 0x22fd0
leaq 0x18820(%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 0x1f670(%rip), %rdi     # 0x22fd0
callq 0x2040
movq %rax, %rdi
callq 0x2180
shll $0x8, %r12d
orl %ebx, %r12d
testl $0xaf20, %r12d          # imm = 0xAF20
je 0x39c3
movq 0x1f66c(%rip), %r15     # 0x22ff0
leaq 0x1870e(%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 0x1f63a(%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 0x1f5e3(%rip), %rdi     # 0x22fd0
leaq 0x18d63(%rip), %rsi     # 0x1c757
movl $0x2, %edx
callq 0x2280
shll $0x8, %r12d
leal (%r12,%rbx), %r13d
movzwl %r13w, %esi
movq 0x1f5bf(%rip), %rdi     # 0x22fd0
callq 0x2170
movq %rax, %r15
leaq 0x186b2(%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 0x3aab
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 0x3ecc
movq %r15, %rdi
movq %r12, %rsi
callq 0x536e
movq -0x58(%rbp), %rdi
cmpq %r13, %rdi
je 0x3a94
callq 0x2200
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x3aa6
callq 0x2200
decw %bx
jne 0x3a70
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 0x3af3
callq 0x2200
jmp 0x3af3
jmp 0x3ae2
jmp 0x3ae2
jmp 0x3ae2
jmp 0x3ae2
jmp 0x3ae2
movq %rax, %r14
jmp 0x3af3
movq %rax, %r14
leaq -0x78(%rbp), %rdi
callq 0x4252
movq -0x30(%rbp), %rdi
callq 0x419c
movq %r14, %rdi
callq 0x23b0