// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x8b(%rdi)
jne 0x4812
leaq 0xd9e1(%rip), %rsi      # 0x121eb
movq %rbx, %rdi
callq 0x2230
cmpb $0x1, 0x89(%r14)
jne 0x482b
leaq 0xd9d0(%rip), %rsi      # 0x121f3
movq %rbx, %rdi
callq 0x2230
cmpb $0x1, 0x88(%r14)
jne 0x4844
leaq 0xd9c1(%rip), %rsi      # 0x121fd
movq %rbx, %rdi
callq 0x2230
leaq 0xd9c4(%rip), %rax      # 0x1220f
testb $0x1, 0x8d(%r14)
leaq 0xd9bb(%rip), %rcx      # 0x12215
cmovneq %rax, %rcx
leaq 0xd99f(%rip), %rsi      # 0x12204
cmpb $0x0, 0x8a(%r14)
cmoveq %rcx, %rsi
movq %rbx, %rdi
callq 0x2230
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2210
leaq 0x20(%r14), %rdi
leaq 0xd98d(%rip), %rsi      # 0x1221c
movq %rdi, -0x30(%rbp)
callq 0x4a03
testb %al, %al
je 0x48b7
leaq 0xd980(%rip), %rsi      # 0x12223
movq %rbx, %rdi
callq 0x2230
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0x2210
movq 0x48(%r14), %rax
cmpq 0x40(%r14), %rax
je 0x491f
leaq 0xd965(%rip), %rsi      # 0x1222d
movq %rbx, %rdi
callq 0x2230
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x2210
pushq $0x1
popq %r12
pushq $0x20
popq %r13
leaq 0xd94f(%rip), %r15      # 0x1223a
movq 0x48(%r14), %rax
subq 0x40(%r14), %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0x491f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2230
movq 0x40(%r14), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x2210
incq %r12
addq $0x20, %r13
jmp 0x48eb
leaq 0xdeef(%rip), %rsi      # 0x12815
movq %rbx, %rdi
callq 0x2230
movq 0x58(%r14), %r12
movq 0x60(%r14), %r15
leaq -0xf0(%rbp), %r13
cmpq %r15, %r12
je 0x4982
movq %r13, %rdi
movq %r12, %rsi
callq 0x4a10
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x2170
leaq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2170
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4d80
movq %r13, %rdi
callq 0x36cc
addq $0xc0, %r12
jmp 0x493d
movq 0x70(%r14), %r15
movq 0x78(%r14), %r12
leaq -0xf0(%rbp), %r14
cmpq %r12, %r15
je 0x49ba
movq %r14, %rdi
movq %r15, %rsi
callq 0x4af0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11848
movq %r14, %rdi
callq 0x36a2
addq $0x60, %r15
jmp 0x4991
leaq 0xd87c(%rip), %rsi      # 0x1223d
movq %rbx, %rdi
callq 0x2230
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x36a2
jmp 0x49fb
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x36cc
movq %rbx, %rdi
callq 0x23b0