// File: /workspace/github_cpp_makefile_star2_O3/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 $0xd8, %rsp
movq %rsi, %r13
movq %rdi, %r14
cmpb $0x1, 0x8b(%rdi)
jne 0x561f
leaq 0x16bc5(%rip), %rsi     # 0x1c1d7
movl $0x7, %edx
movq %r13, %rdi
callq 0x2280
cmpb $0x1, 0x89(%r14)
jne 0x563d
leaq 0x16baf(%rip), %rsi     # 0x1c1df
movl $0x9, %edx
movq %r13, %rdi
callq 0x2280
cmpb $0x1, 0x88(%r14)
jne 0x565b
leaq 0x16b9b(%rip), %rsi     # 0x1c1e9
movl $0x6, %edx
movq %r13, %rdi
callq 0x2280
cmpb $0x1, 0x8a(%r14)
jne 0x5673
leaq 0x16b84(%rip), %rsi     # 0x1c1f0
movl $0xa, %edx
jmp 0x5697
cmpb $0x1, 0x8d(%r14)
jne 0x568b
leaq 0x16b77(%rip), %rsi     # 0x1c1fb
movl $0x5, %edx
jmp 0x5697
leaq 0x16b6f(%rip), %rsi     # 0x1c201
movl $0x6, %edx
movq %r13, %rdi
callq 0x2280
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r13, %rdi
callq 0x2280
leaq 0x20(%r14), %rdi
leaq 0x16b4f(%rip), %rsi     # 0x1c208
movq %rdi, -0x38(%rbp)
callq 0x20c0
testl %eax, %eax
je 0x56ea
leaq 0x16b42(%rip), %rsi     # 0x1c20f
movl $0x9, %edx
movq %r13, %rdi
callq 0x2280
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %r13, %rdi
callq 0x2280
movq 0x48(%r14), %rax
cmpq 0x40(%r14), %rax
je 0x577c
leaq 0x16b1a(%rip), %rsi     # 0x1c219
movl $0xc, %edx
movq %r13, %rdi
callq 0x2280
movq 0x40(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r13, %rdi
callq 0x2280
movq 0x48(%r14), %rax
subq 0x40(%r14), %rax
cmpq $0x21, %rax
jb 0x577c
movl $0x1, %ebx
movl $0x28, %r15d
leaq 0x16ae7(%rip), %r12     # 0x1c226
movl $0x2, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x2280
movq 0x40(%r14), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r13, %rdi
callq 0x2280
movq 0x48(%r14), %rax
subq 0x40(%r14), %rax
incq %rbx
sarq $0x5, %rax
addq $0x20, %r15
cmpq %rax, %rbx
jb 0x573f
leaq 0x17092(%rip), %rsi     # 0x1c815
movl $0x3, %edx
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x2280
movq 0x58(%r14), %r12
movq 0x60(%r14), %r15
cmpq %r15, %r12
je 0x5858
leaq -0xe8(%rbp), %rbx
leaq -0xf8(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x59a8
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x2150
leaq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2150
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x5da8
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x57f5
callq 0x2200
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x5807
callq 0x2200
leaq -0xa0(%rbp), %rdi
callq 0x4328
leaq -0xb8(%rbp), %rdi
callq 0x42d0
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5837
callq 0x2200
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x5848
callq 0x2200
addq $0xc0, %r12
cmpq %r15, %r12
jne 0x57b3
movq 0x70(%r14), %r15
movq 0x78(%r14), %rbx
cmpq %rbx, %r15
je 0x5925
leaq -0xe8(%rbp), %r14
leaq -0xb8(%rbp), %r12
leaq -0xf8(%rbp), %r13
movq %r14, -0xf8(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x4552
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x4552
addq $0x40, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x5b8e
movl 0x18(%r15), %eax
movl 0x1b(%r15), %ecx
movl %ecx, 0x4b(%r14)
movl %eax, 0x48(%r14)
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x1a6c0
movq %r12, %rdi
callq 0x4328
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x5907
callq 0x2200
movq -0xf8(%rbp), %rdi
cmpq %r14, %rdi
je 0x5918
callq 0x2200
addq $0x20, %r15
cmpq %rbx, %r15
jne 0x587e
leaq 0x168fd(%rip), %rsi     # 0x1c229
movl $0x2, %edx
movq -0x30(%rbp), %rdi
callq 0x2280
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x596c
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x596c
callq 0x2200
movq -0xf8(%rbp), %rdi
cmpq %r14, %rdi
je 0x599f
callq 0x2200
jmp 0x599f
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x4194
jmp 0x599f
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x41d2
movq %rbx, %rdi
callq 0x23b0
nop