// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/backends/backend.cpp
// Function: smooth::Backends::Backend::InitBackends()
S::Int S::Backends::Backend::InitBackends()
{
	if (backends == NIL)		backends = new Array<Backend *, Void *>;
	if (backend_creators == NIL)	backend_creators = new Array<Backend *(*)(), Void *>;

	for (Int i = 0; i < backend_creators->Length(); i++)
	{
		backends->Add(backend_creators->GetNth(i)());
	}

	for (Int i = 0; i < backends->Length(); i++)
	{
		if (backends->GetNth(i)->Init() == Error())
		{
			/* Deinit already initialized backends and return.
			 */
			for (Int j = i - 1; j >= 0; j--) backends->GetNth(j)->Deinit();

			return Error();
		}
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
cmpq $0x0, 0x1aaec5(%rip)    # 0x20bd78
jne 0x60efc
movl $0x58, %edi
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x68(%rbp)
callq 0x61530
jmp 0x60ed0
movq -0x68(%rbp), %rax
movq %rax, 0x1aae9d(%rip)    # 0x20bd78
jmp 0x60efc
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x58, %esi
callq 0x595b0
jmp 0x61145
cmpq $0x0, 0x1aae7c(%rip)    # 0x20bd80
jne 0x60f4d
movl $0x58, %edi
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
callq 0x61410
jmp 0x60f21
movq -0x70(%rbp), %rax
movq %rax, 0x1aae54(%rip)    # 0x20bd80
jmp 0x60f4d
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x58, %esi
callq 0x595b0
jmp 0x61145
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x74(%rbp)
movq 0x1aae1f(%rip), %rdi    # 0x20bd80
callq 0x5c990
movl %eax, %ecx
movl -0x74(%rbp), %eax
cmpl %ecx, %eax
jge 0x60fa7
movq 0x1aae02(%rip), %rax    # 0x20bd78
movq %rax, -0x80(%rbp)
movq 0x1aadff(%rip), %rdi    # 0x20bd80
movl -0x18(%rbp), %esi
callq 0x615a0
callq *(%rax)
movq -0x80(%rbp), %rdi
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x61570
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x60f54
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x84(%rbp)
movq 0x1aadba(%rip), %rdi    # 0x20bd78
callq 0x5c990
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jge 0x610ea
movq 0x1aad9e(%rip), %rdi    # 0x20bd78
movl -0x24(%rbp), %esi
callq 0x61500
movq (%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movl %eax, -0x94(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x90(%rbp), %rdi
callq 0x59680
movl %eax, -0x88(%rbp)
jmp 0x6101d
leaq -0x38(%rbp), %rdi
callq 0x5b5b0
movl -0x88(%rbp), %ecx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jne 0x610da
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x61086
movq 0x1aad28(%rip), %rdi    # 0x20bd78
movl -0x3c(%rbp), %esi
callq 0x61500
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x61043
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5b5b0
jmp 0x61145
leaq -0x50(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xa0(%rbp), %rdi
callq 0x59680
movl %eax, -0x98(%rbp)
jmp 0x610af
movl -0x98(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5b5b0
jmp 0x61139
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5b5b0
jmp 0x61145
jmp 0x610dc
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x60fae
leaq -0x60(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x5ca80
movq -0xb0(%rbp), %rdi
callq 0x59680
movl %eax, -0xa4(%rbp)
jmp 0x6110e
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0x61139
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0x61145
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x5b6b0
nop