// File: minirop[P]JDecomqiler/src/ClassOutput.cpp
// Function: ClassOutput::generate(std::basic_ofstream<char, std::char_traits<char>>&)
void ClassOutput::generate(std::ofstream & file)
{
	if(isPublic)
		W("public ");
	if(isAbstract)
		W("abstract ");
	if(isFinal)
		W("final ");
	if(isInterface)
		W("interface ");
	else if(isEnum)
		W("enum ");
	else
		W("class ");
	
	W(name);
	if(extends != "Object")
	{
		W(" extends ");
		W(extends);
	}
	if(interfaces.size() > 0)
	{
		W(" implements ");
		W(interfaces[0]);
		for(std::size_t i = 1;i < interfaces.size();i++)
		{
			W(", ");
			W(interfaces[i]);
		}
	}
	W(" {\n");
	
	for(MethodOutput m : methods)
	{
		m.thisClass = name;
		m.parentClass = extends;
		m.generate(file);
	}
	
	for(FieldOutput f : fields)
	{
		f.generate(file);
	}
	
	W("}\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x180(%rbp)
testb $0x1, 0x8b(%rax)
je 0xa727
movq -0x10(%rbp), %rdi
leaq 0x1fa8b(%rip), %rsi     # 0x2a1ad
callq 0x32a0
movq -0x180(%rbp), %rax
testb $0x1, 0x89(%rax)
je 0xa747
movq -0x10(%rbp), %rdi
leaq 0x1fa73(%rip), %rsi     # 0x2a1b5
callq 0x32a0
movq -0x180(%rbp), %rax
testb $0x1, 0x88(%rax)
je 0xa767
movq -0x10(%rbp), %rdi
leaq 0x1fa5d(%rip), %rsi     # 0x2a1bf
callq 0x32a0
movq -0x180(%rbp), %rax
testb $0x1, 0x8a(%rax)
je 0xa789
movq -0x10(%rbp), %rdi
leaq 0x1fa44(%rip), %rsi     # 0x2a1c6
callq 0x32a0
jmp 0xa7bd
movq -0x180(%rbp), %rax
testb $0x1, 0x8d(%rax)
je 0xa7ab
movq -0x10(%rbp), %rdi
leaq 0x1fa2d(%rip), %rsi     # 0x2a1d1
callq 0x32a0
jmp 0xa7bb
movq -0x10(%rbp), %rdi
leaq 0x1fa21(%rip), %rsi     # 0x2a1d7
callq 0x32a0
jmp 0xa7bd
movq -0x180(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x3270
movq -0x180(%rbp), %rdi
addq $0x20, %rdi
leaq 0x1f9ff(%rip), %rsi     # 0x2a1de
callq 0xaab0
testb $0x1, %al
jne 0xa7ea
jmp 0xa80e
movq -0x10(%rbp), %rdi
leaq 0x1f9f0(%rip), %rsi     # 0x2a1e5
callq 0x32a0
movq -0x180(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x20, %rsi
callq 0x3270
movq -0x180(%rbp), %rdi
addq $0x40, %rdi
callq 0x7c60
cmpq $0x0, %rax
jbe 0xa8e6
movq -0x10(%rbp), %rdi
leaq 0x1f9bc(%rip), %rsi     # 0x2a1ef
callq 0x32a0
movq -0x180(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x188(%rbp)
addq $0x40, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xaae0
movq -0x188(%rbp), %rdi
movq %rax, %rsi
callq 0x3270
movq $0x1, -0x18(%rbp)
movq -0x180(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x190(%rbp)
addq $0x40, %rdi
callq 0x7c60
movq %rax, %rcx
movq -0x190(%rbp), %rax
cmpq %rcx, %rax
jae 0xa8e4
movq -0x10(%rbp), %rdi
leaq 0x1f959(%rip), %rsi     # 0x2a1fc
callq 0x32a0
movq -0x180(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
addq $0x40, %rdi
movq -0x18(%rbp), %rsi
callq 0xaae0
movq -0x198(%rbp), %rdi
movq %rax, %rsi
callq 0x3270
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0xa86e
jmp 0xa8e6
movq -0x10(%rbp), %rdi
leaq 0x1ff0b(%rip), %rsi     # 0x2a7fc
callq 0x32a0
movq -0x180(%rbp), %rax
addq $0x58, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8ea0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8b40
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xab00
testb $0x1, %al
jne 0xa935
jmp 0xa9c1
leaq -0x28(%rbp), %rdi
callq 0xab40
movq %rax, %rsi
leaq -0xf0(%rbp), %rdi
callq 0xab60
movq -0x180(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x3060
jmp 0xa95f
movq -0x180(%rbp), %rsi
addq $0x20, %rsi
leaq -0x50(%rbp), %rdi
callq 0x3060
jmp 0xa975
movq -0x10(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0xb8b0
jmp 0xa987
leaq -0xf0(%rbp), %rdi
callq 0x5850
leaq -0x28(%rbp), %rdi
callq 0xacb0
jmp 0xa91f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x5850
jmp 0xaa99
movq -0x180(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
callq 0x84e0
movq %rax, -0x110(%rbp)
movq -0x108(%rbp), %rdi
callq 0x81a0
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xacd0
testb $0x1, %al
jne 0xaa12
jmp 0xaa80
leaq -0x110(%rbp), %rdi
callq 0xad10
movq %rax, %rsi
leaq -0x178(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0xad30
movq -0x1a0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x28bb0
jmp 0xaa46
leaq -0x178(%rbp), %rdi
callq 0x57e0
leaq -0x110(%rbp), %rdi
callq 0xadf0
jmp 0xa9f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x57e0
jmp 0xaa99
movq -0x10(%rbp), %rdi
leaq 0x1f774(%rip), %rsi     # 0x2a1ff
callq 0x32a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x34e0
nopw %cs:(%rax,%rax)
nop