// File: /workspace/github_c_makefile_star2_O1/blakemcbride[P]LISP9/ls9.c
// Function: expandbody
cell expandbody(cell x) {
	cell	n, vs, as;

	protect(vs = NIL);
	protect(as = NIL);
	while (	pairp(x) &&
		pairp(car(x)) &&
		(caar(x) == S_def ||
		 caar(x) == S_defun))
	{
		if (caar(x) == S_def) {
			n = car(x);
			vs = cons(cadr(n), vs);
			cadr(Protected) = vs;
			n = cons(caddr(n), NIL);
			as = cons(n, as);
			car(Protected) = as;
		}
		else {
			n = expanddef(car(x));
			protect(n);
			vs = cons(cadr(n), vs);
			caddr(Protected) = vs;
			n = cons(caddr(n), NIL);
			as = cons(n, as);
			cadr(Protected) = as;
			unprot(1);
		}
		x = cdr(x);
	}
	if (NIL == vs) {
		unprot(2);
		return x;
	}
	as = car(Protected) = nreverse(as);
	vs = cadr(Protected) = nreverse(vs);
	n = cons(zip(vs, as), x);
	n = cons(S_labels, n);
	n = cons(n, NIL);
	unprot(2);
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %r14d
movl 0xf889(%rip), %esi      # 0x19170
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3162
movl %eax, 0xf872(%rip)      # 0x19170
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %eax, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, 0xf85e(%rip)      # 0x19170
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %r14d, %r14d
js 0x9aa9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq 0xfa24(%rip), %rcx      # 0x19350
movl %r14d, %r12d
testb $0x9, (%rcx,%r12)
jne 0x9aa9
movq 0xf9ff(%rip), %rax      # 0x19340
movslq (%rax,%r12,4), %r15
testq %r15, %r15
js 0x9aa9
testb $0x9, (%rcx,%r15)
jne 0x9aa9
movl (%rax,%r15,4), %edx
movl 0xfdb9(%rip), %ecx      # 0x1971c
cmpl %ecx, %edx
je 0x9973
cmpl 0xffd3(%rip), %edx      # 0x19940
jne 0x9aa9
cmpl %ecx, (%rax,%r15,4)
jne 0x99e8
movq 0xf9c8(%rip), %rcx      # 0x19348
movslq (%rcx,%r15,4), %rcx
movl (%rax,%rcx,4), %edi
movl %ebx, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, %ebx
movq 0xf9a7(%rip), %rax      # 0x19340
movq 0xf9a8(%rip), %rcx      # 0x19348
movslq 0xf7c9(%rip), %rdx      # 0x19170
movslq (%rcx,%rdx,4), %rdx
movl %ebx, (%rax,%rdx,4)
movslq (%rcx,%r15,4), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3162
movl %eax, %edi
movl %ebp, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, %ebp
movq 0xf967(%rip), %rax      # 0x19340
movslq 0xf790(%rip), %rcx      # 0x19170
movl %ebp, (%rax,%rcx,4)
jmp 0x9a95
movl %r15d, %edi
callq 0x9b40
movl %eax, %r14d
movl 0xf777(%rip), %esi      # 0x19170
movl %eax, %edi
xorl %edx, %edx
callq 0x3162
movl %eax, 0xf768(%rip)      # 0x19170
movq 0xf931(%rip), %rax      # 0x19340
movq 0xf932(%rip), %rcx      # 0x19348
movslq %r14d, %r14
movslq (%rcx,%r14,4), %rcx
movl (%rax,%rcx,4), %edi
movl %ebx, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, %ebx
movq 0xf90e(%rip), %rax      # 0x19340
movq 0xf90f(%rip), %rcx      # 0x19348
movslq 0xf730(%rip), %rdx      # 0x19170
movslq (%rcx,%rdx,4), %rdx
movslq (%rcx,%rdx,4), %rdx
movl %ebx, (%rax,%rdx,4)
movslq (%rcx,%r14,4), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3162
movl %eax, %edi
movl %ebp, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, %ebp
movq 0xf8ca(%rip), %rax      # 0x19340
movq 0xf8cb(%rip), %rcx      # 0x19348
movslq 0xf6ec(%rip), %rdx      # 0x19170
movslq (%rcx,%rdx,4), %rcx
movl %ebp, (%rax,%rcx,4)
movl $0x1, %edi
callq 0x33d7
movq 0xf8ac(%rip), %rax      # 0x19348
movl (%rax,%r12,4), %r14d
testl %r14d, %r14d
jns 0x9925
cmpl $-0x1, %ebx
je 0x9b2a
movl %ebp, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3e6e
movl %eax, %ebp
movq 0xf87d(%rip), %rax      # 0x19340
movslq 0xf6a6(%rip), %rcx      # 0x19170
movl %ebp, (%rax,%rcx,4)
movl %ebx, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3e6e
movq 0xf860(%rip), %rcx      # 0x19340
movq 0xf861(%rip), %rdx      # 0x19348
movslq 0xf682(%rip), %rsi      # 0x19170
movslq (%rdx,%rsi,4), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, %edi
movl %ebp, %esi
callq 0x9823
movl %eax, %edi
movl %r14d, %esi
xorl %edx, %edx
callq 0x3162
movl 0xfe34(%rip), %edi      # 0x19944
movl %eax, %esi
xorl %edx, %edx
callq 0x3162
movl %eax, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x3162
movl %eax, %r14d
movl $0x2, %edi
callq 0x33d7
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq