// File: /workspace/github_c_makefile_star2_O0/dalnefre[P]kernel_abe/reduce.c
// Function: apply_sum
BEH_DECL(apply_sum)
{
	CONS* msg = WHAT;
	CONS* expr = map_get(msg, expr_symbol);
	CONS* state = MINE;
	CONS* acc = map_get(state, ATOM("acc"));
	CONS* form = map_get(state, form_symbol);
	CONS* cont = map_get(state, cont_symbol);
	CONS* env = map_get(state, env_symbol);
	
	DBUG_ENTER("apply_sum");
	if (numberp(expr)) {
		assert(numberp(acc));
		acc = NUMBER(MK_INT(acc) + MK_INT(expr));
		if (nilp(form) || !consp(form)) {
			expr = acc;
		} else {
			state = NIL;
			state = map_put(state, env_symbol, env);
			state = map_put(state, cont_symbol, cont);
			state = map_put(state, form_symbol, cdr(form));
			state = map_put(state, ATOM("acc"), acc);
			BECOME(THIS, state);
			msg = NIL;
			msg = map_put(msg, env_symbol, env);
			msg = map_put(msg, cont_symbol, SELF);
			msg = map_put(msg, expr_symbol, car(form));
			SEND(a_reduce, msg);
			DBUG_RETURN;
		}
	} else {	/* error */
		SEND(an_error, ATOM("numeric args required"));
		expr = undefined_symbol;
	}
	DBUG_PRINT("", ("expr=%s", cons_to_str(expr)));
	msg = NIL;
	msg = map_put(msg, expr_symbol, expr);
	SEND(cont, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16990
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x1a93d(%rip), %rsi     # 0x20148
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16800
movq %rax, %rdi
callq 0xba80
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x14af8(%rip), %rdi     # 0x1a338
callq 0x12b60
movq -0x70(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1a8ec(%rip), %rsi     # 0x20150
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1a8c4(%rip), %rsi     # 0x20140
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1a8c4(%rip), %rsi     # 0x20158
xorl %eax, %eax
movl %eax, %edx
callq 0x171b0
movq %rax, -0x40(%rbp)
leaq 0x14a94(%rip), %rax     # 0x1a33c
movq %rax, -0x68(%rbp)
leaq 0x1aad5(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl $0x2df, -0x5c(%rbp)     # imm = 0x2DF
leaq 0x173e2(%rip), %rax     # 0x1ccb0
movq %rax, -0x58(%rbp)
leaq 0x1a857(%rip), %rax     # 0x20130
movq %rax, -0x50(%rbp)
leaq 0x1aaa4(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x19910
movq -0x18(%rbp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5b70
movq -0x28(%rbp), %rax
andq $0x3, %rax
cmpq $0x3, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5936
jmp 0x5955
leaq 0x14a09(%rip), %rdi     # 0x1a346
leaq 0x146e9(%rip), %rsi     # 0x1a02d
movl $0x2e1, %edx            # imm = 0x2E1
leaq 0x14a03(%rip), %rcx     # 0x1a353
callq 0x20f0
movq -0x28(%rbp), %rax
sarq $0x2, %rax
movq -0x18(%rbp), %rcx
sarq $0x2, %rcx
addl %ecx, %eax
cltq
shlq $0x2, %rax
orq $0x3, %rax
movq %rax, -0x28(%rbp)
leaq 0x1a97c(%rip), %rax     # 0x202f8
cmpq %rax, -0x30(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x59be
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x71(%rbp)
je 0x59ae
movq -0x30(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
jne 0x59cb
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x5b6e
leaq 0x1a926(%rip), %rax     # 0x202f8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1a777(%rip), %rsi     # 0x20158
movq -0x40(%rbp), %rdx
callq 0x172a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1a747(%rip), %rsi     # 0x20140
movq -0x38(%rbp), %rdx
callq 0x172a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq 0x1a738(%rip), %rax     # 0x20150
movq %rax, -0xb0(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16990
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
callq 0x172a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x148e4(%rip), %rdi     # 0x1a338
callq 0x12b60
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0x172a0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16800
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16800
movq %rax, %rdi
callq 0xba10
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0xbf60
leaq 0x1a845(%rip), %rax     # 0x202f8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x1a696(%rip), %rsi     # 0x20158
movq -0x40(%rbp), %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x1a65f(%rip), %rax     # 0x20140
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x16800
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq %rax, %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x1a627(%rip), %rax     # 0x20148
movq %rax, -0x80(%rbp)
movq -0x30(%rbp), %rdi
callq 0x16800
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq %rax, %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq 0x1a630(%rip), %rsi     # 0x20180
movq -0x10(%rbp), %rdx
callq 0xcc90
movl $0x2f1, -0x5c(%rbp)     # imm = 0x2F1
leaq -0x68(%rbp), %rdi
callq 0x19ae0
jmp 0x5c63
jmp 0x5bb6
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq 0x1a5de(%rip), %rax     # 0x20160
movq %rax, -0xc0(%rbp)
leaq 0x147dc(%rip), %rdi     # 0x1a36c
callq 0x12b60
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq %rax, %rdx
callq 0xcc90
movq 0x1a5b6(%rip), %rax     # 0x20168
movq %rax, -0x18(%rbp)
jmp 0x5bb8
leaq 0x1ad71(%rip), %rax     # 0x20930
cmpl $0x0, (%rax)
je 0x5c1d
leaq 0x1a7bd(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
leaq 0x170d7(%rip), %rcx     # 0x1ccb0
movq %rcx, 0x10(%rax)
leaq 0x170cc(%rip), %rdi     # 0x1ccb0
callq 0x18d20
cmpl $0x0, %eax
je 0x5c1d
leaq 0x1a793(%rip), %rax     # 0x20388
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x2f7, 0xc(%rax)       # imm = 0x2F7
movq -0x18(%rbp), %rdi
callq 0xe6d0
movq %rax, %rsi
leaq 0x1497d(%rip), %rdi     # 0x1a593
movb $0x0, %al
callq 0x199c0
jmp 0x5c1f
leaq 0x1a6d2(%rip), %rax     # 0x202f8
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x1a513(%rip), %rsi     # 0x20148
movq -0x18(%rbp), %rdx
callq 0x172a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xcc90
movl $0x2fb, -0x5c(%rbp)     # imm = 0x2FB
leaq -0x68(%rbp), %rdi
callq 0x19ae0
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)