// File: /workspace/github_c_makefile_star2_O1/dalnefre[P]kernel_abe/life.c
// Function: init_life
CONFIG*
init_life()
{
	static BOOL init_done = FALSE;
	int x, y;
	CONFIG* cfg;
	
	DBUG_ENTER("init_life");
	if (init_done) {
		DBUG_RETURN NULL;
	}
	DBUG_PRINT("", ("init needed"));
	cfg = new_configuration(1000);
	for (y = 0; y < Y_MAX; ++y) {
		for (x = 0; x < X_MAX; ++x) {
			CONS* state = NIL;
			state = map_put(state, ATOM("y"), NUMBER(y));
			state = map_put(state, ATOM("x"), NUMBER(x));
			state = map_put(state, ATOM("value"), NUMBER(get_grid_value(x, y)));
			cells[y][x] = CFG_ACTOR(cfg, cell_actor, state);
			DBUG_PRINT("", ("cell(%d,%d) = %s", x, y, cons_to_str(cells[y][x])));
		}
	}
	init_done = TRUE;
	DBUG_RETURN cfg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0xa89c(%rip), %rax      # 0xe144
leaq 0x20(%rsp), %rdi
movq %rax, (%rdi)
leaq 0xfb41(%rip), %rbx      # 0x133f8
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x15c, 0xc(%rdi)       # imm = 0x15C
leaq 0xc532(%rip), %r14      # 0xfe04
movq %r14, 0x10(%rdi)
leaq 0xf953(%rip), %rcx      # 0x13230
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xdaa6
cmpq $0x0, 0xfd5e(%rip)      # 0x13650
je 0x3900
movl $0x15e, %eax            # imm = 0x15E
xorl %ebx, %ebx
jmp 0x3a96
leaq 0x10299(%rip), %rax     # 0x13ba0
cmpl $0x0, (%rax)
je 0x393f
movq (%rbx), %rax
movq 0x50(%rax), %rax
movq %r14, 0x10(%rax)
movq %r14, %rdi
callq 0xd218
testl %eax, %eax
je 0x393f
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x160, 0xc(%rax)       # imm = 0x160
leaq 0xa816(%rip), %rdi      # 0xe14e
xorl %eax, %eax
callq 0xdb17
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x42f3
movq %rax, 0x10(%rsp)
leaq 0xfafb(%rip), %r15      # 0x13450
leaq 0xf7d4(%rip), %rax      # 0x13130
movq %rax, 0x18(%rsp)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
leaq 0x3(,%rax,4), %r12
movl $0x3, %r13d
xorl %ebp, %ebp
leaq 0xaf03(%rip), %rdi      # 0xe882
callq 0x9210
leaq 0xf9dd(%rip), %rdi      # 0x13368
movq %rax, %rsi
movq %r12, %rdx
callq 0xc280
movq %rbx, %r14
movq %rax, %rbx
leaq 0xba17(%rip), %rdi      # 0xf3ba
callq 0x9210
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xc280
movq %rax, %rbx
leaq 0xbd9b(%rip), %rdi      # 0xf75b
callq 0x9210
movq 0x18(%rsp), %rcx
movslq -0x3(%rcx,%r13), %rcx
leaq 0x3(,%rcx,4), %rdx
movq %rbx, %rdi
movq %r14, %rbx
movq %rax, %rsi
callq 0xc280
movq 0x10(%rsp), %rdi
leaq -0xa5d(%rip), %rsi      # 0x2f94
movq %rax, %rdx
callq 0x49ce
movq %rax, -0x6(%r15,%r13,2)
leaq 0x1019b(%rip), %rax     # 0x13ba0
cmpl $0x0, (%rax)
je 0x3a55
movq (%rbx), %rax
movq 0x50(%rax), %rax
leaq 0xc3ec(%rip), %rdi      # 0xfe04
movq %rdi, 0x10(%rax)
callq 0xd218
testl %eax, %eax
je 0x3a55
movq (%rbx), %rax
movq 0x50(%rax), %rax
movl $0x169, 0xc(%rax)       # imm = 0x169
movq -0x6(%r15,%r13,2), %rdi
callq 0x5d30
leaq 0xa716(%rip), %rdi      # 0xe15a
movl %ebp, %esi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xdb17
incl %ebp
addq $0x4, %r13
cmpq $0x23, %r13
jne 0x3978
movq 0x8(%rsp), %rax
incq %rax
addq $0x40, %r15
addq $0x20, 0x18(%rsp)
cmpq $0x8, %rax
jne 0x3963
movq $0x1, 0xfbc4(%rip) # 0x13650
movl $0x16d, %eax            # imm = 0x16D
movq 0x10(%rsp), %rbx
leaq 0x20(%rsp), %rdi
movl %eax, 0xc(%rdi)
callq 0xdc2b
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq