// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/life.c
// Function: int_generator
BEH_DECL(int_generator)
{
	CONS* msg = WHAT;
	CONS* next = map_get(msg, ATOM("next"));
	CONS* state = MINE;
	CONS* step = map_get(state, ATOM("step"));
	CONS* limit = map_get(state, ATOM("limit"));
	CONS* label = map_get(state, ATOM("label"));
	CONS* ctx = map_get_def(state, ATOM("ctx"), NIL);
	CONS* send_to = map_get(state, ATOM("send-to"));
	
	DBUG_ENTER("int_generator");
	DBUG_PRINT("", ("next=%s", cons_to_str(next)));
	assert(atomp(label));
	assert(actorp(send_to));
	if (0 < MK_INT(step)) {
		if (MK_INT(next) <= MK_INT(limit)) {
			SEND(send_to, map_put(ctx, label, next));
			next = NUMBER(MK_INT(next) + MK_INT(step));
			SEND(SELF, map_put(NIL, ATOM("next"), next));
		}
	} else {
		if (MK_INT(next) >= MK_INT(limit)) {
			SEND(send_to, map_put(ctx, label, next));
			next = NUMBER(MK_INT(next) + MK_INT(step));
			SEND(SELF, map_put(NIL, ATOM("next"), next));
		}
	}
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xf020
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq 0x10c19(%rip), %rdi     # 0x130cb
callq 0xb1f0
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf840
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xee90
movq %rax, %rdi
callq 0x4110
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq 0x10b0f(%rip), %rdi     # 0x13008
callq 0xb1f0
movq -0x98(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf840
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x10ae6(%rip), %rdi     # 0x1300d
callq 0xb1f0
movq -0x90(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf840
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq 0x10abe(%rip), %rdi     # 0x13013
callq 0xb1f0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf840
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x10a99(%rip), %rdi     # 0x13019
callq 0xb1f0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
leaq 0x15dc5(%rip), %rdx     # 0x18358
callq 0xf840
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq 0x10a72(%rip), %rdi     # 0x1301d
callq 0xb1f0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xf840
movq %rax, -0x48(%rbp)
leaq 0x10a5a(%rip), %rax     # 0x13025
movq %rax, -0x70(%rbp)
leaq 0x15e12(%rip), %rax     # 0x183e8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x68(%rbp)
movl $0x8a, -0x64(%rbp)
leaq 0x129bf(%rip), %rax     # 0x14fb0
movq %rax, -0x60(%rbp)
leaq 0x15c24(%rip), %rax     # 0x18220
movq %rax, -0x58(%rbp)
leaq 0x15de1(%rip), %rax     # 0x183e8
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x50(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x11fa0
leaq 0x1656e(%rip), %rax     # 0x18b90
cmpl $0x0, (%rax)
je 0x2680
leaq 0x15dba(%rip), %rax     # 0x183e8
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x12974(%rip), %rcx     # 0x14fb0
movq %rcx, 0x10(%rax)
leaq 0x12969(%rip), %rdi     # 0x14fb0
callq 0x113b0
cmpl $0x0, %eax
je 0x2680
leaq 0x15d90(%rip), %rax     # 0x183e8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x8b, 0xc(%rax)
movq -0x18(%rbp), %rdi
callq 0x6d60
movq %rax, %rsi
leaq 0x109ba(%rip), %rdi     # 0x13033
movb $0x0, %al
callq 0x12050
jmp 0x2682
movq -0x38(%rbp), %rax
andq $0x3, %rax
cmpq $0x2, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x26a0
jmp 0x26bf
leaq 0x10994(%rip), %rdi     # 0x1303b
leaq 0x1099a(%rip), %rsi     # 0x13048
movl $0x8c, %edx
leaq 0x10995(%rip), %rcx     # 0x1304f
callq 0x20f0
movq -0x48(%rbp), %rax
andq $0x3, %rax
cmpq $0x1, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x26dd
jmp 0x26fc
leaq 0x10988(%rip), %rdi     # 0x1306c
leaq 0x1095d(%rip), %rsi     # 0x13048
movl $0x8d, %edx
leaq 0x10958(%rip), %rcx     # 0x1304f
callq 0x20f0
movq -0x28(%rbp), %rax
sarq $0x2, %rax
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jge 0x27de
movq -0x18(%rbp), %rax
sarq $0x2, %rax
movq -0x30(%rbp), %rcx
sarq $0x2, %rcx
cmpl %ecx, %eax
jg 0x27d9
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf930
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq %rax, %rdx
callq 0x5320
movq -0x18(%rbp), %rax
sarq $0x2, %rax
movq -0x28(%rbp), %rcx
sarq $0x2, %rcx
addl %ecx, %eax
cltq
shlq $0x2, %rax
orq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xee90
movq %rax, -0xa8(%rbp)
leaq 0x10920(%rip), %rdi     # 0x130cb
callq 0xb1f0
movq %rax, %rsi
movq -0x18(%rbp), %rdx
leaq 0x15b9a(%rip), %rdi     # 0x18358
callq 0xf930
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x5320
jmp 0x28a9
movq -0x18(%rbp), %rax
sarq $0x2, %rax
movq -0x30(%rbp), %rcx
sarq $0x2, %rcx
cmpl %ecx, %eax
jl 0x28a7
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xf930
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq %rax, %rdx
callq 0x5320
movq -0x18(%rbp), %rax
sarq $0x2, %rax
movq -0x28(%rbp), %rcx
sarq $0x2, %rcx
addl %ecx, %eax
cltq
shlq $0x2, %rax
orq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xee90
movq %rax, -0xc8(%rbp)
leaq 0x10852(%rip), %rdi     # 0x130cb
callq 0xb1f0
movq %rax, %rsi
movq -0x18(%rbp), %rdx
leaq 0x15acc(%rip), %rdi     # 0x18358
callq 0xf930
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq %rax, %rdx
callq 0x5320
jmp 0x28a9
movl $0x9b, -0x64(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x12170
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)