// File: /workspace/github_c_makefile_star2_O3/azhai[P]mlite/mlite.c
// Function: sf_define_type
cell sf_define_type(cell x, int *pc) {
	cell	p, t, n, a, defs, type, new;

	if (!tuple_p(cdr(x)) || !tuple_p(cddr(x)))
		return error("define_type: syntax error", x);
	if (!symbol_p(cadr(x)))
		return error("define_type: expected id, got", cadr(x));
	a = node(NIL, NIL);
	save(a);
	for (p = cddr(x); p != NIL; p = cdr(p)) {
		t = car(p);
		if (symbol_p(t)) {		/* (name 'name) */
			n = node(t, NIL);
			n = node(S_quote, n);
			n = node(n, NIL);
			n = node(t, n);
		}
		else {				/* (name (fn (x y))) */
			n = make_constructor(t);
			n = node(n, NIL);
			n = node(car(t), n);
		}
		n = node(S_define, n);
		car(a) = n;
		if (cdr(p) != NIL) {
			set(cdr(a), node(NIL, NIL));
			a = cdr(a);
		}
	}
	type = cadr(x);			/* (define T '(T cons ...)) */
	type = node(type, cddr(x));
	type = node(type, NIL);
	type = node(S_quote, type);
	type = node(type, NIL);
	type = node(cadr(x), type);
	type = node(S_define, type);
	defs = unsave(1);		/* (begin type-def cons-def ...) */
	defs = node(type, defs);
	defs = node(S_begin, defs);
	*pc = 1;
	return defs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0xfa1f(%rip), %rdx      # 0x1e5c0
movq (%rdx,%rdi,8), %rax
testq %rax, %rax
js 0xebb7
movq 0xfa2f(%rip), %rcx      # 0x1e5e0
testb $0x19, (%rcx,%rax)
je 0xebdc
leaq 0x800b(%rip), %rdi      # 0x16bc9
movq %r14, %rsi
callq 0x33eb
movq $-0x5, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
js 0xebb7
testb $0x19, (%rcx,%rdx)
jne 0xebb7
movq %rsi, %rbx
movq 0xf57b(%rip), %rdx      # 0x1e170
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
js 0xee04
testb $0x10, (%rcx,%rsi)
je 0xee04
cmpq $-0x22, (%rdx,%rsi,8)
jne 0xee04
movq $-0x1, %r12
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r15
movq 0xf4eb(%rip), %rsi      # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0xf4da(%rip)      # 0x1e128
movq 0xf96b(%rip), %rcx      # 0x1e5c0
movq (%rcx,%r14,8), %rax
movq (%rcx,%rax,8), %r13
movq 0xf50c(%rip), %rcx      # 0x1e170
cmpq $-0x1, %r13
je 0xed5c
movq (%rcx,%r13,8), %r12
testq %r12, %r12
js 0xecc4
movq 0xf962(%rip), %rax      # 0x1e5e0
testb $0x10, (%rax,%r12)
je 0xecc4
cmpq $-0x22, (%rcx,%r12,8)
jne 0xecc4
movq %r12, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xfa04(%rip), %rdi      # 0x1e6a8
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq %r12, %rdi
jmp 0xece8
movq %r12, %rdi
callq 0xe7b0
movq %rax, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf48c(%rip), %rcx      # 0x1e170
movq (%rcx,%r12,8), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xfa67(%rip), %rdi      # 0x1e760
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf466(%rip), %rcx      # 0x1e170
movq %rax, (%rcx,%r15,8)
movq 0xf8ab(%rip), %rdx      # 0x1e5c0
cmpq $-0x1, (%rdx,%r13,8)
je 0xed54
movq $-0x1, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf888(%rip), %rdx      # 0x1e5c0
movq %rax, (%rdx,%r15,8)
movq 0xf42d(%rip), %rcx      # 0x1e170
movq (%rdx,%r13,8), %r13
movq %rax, %r15
cmpq $-0x1, %r13
jne 0xec6e
movq (%rdx,%r14,8), %rax
movq (%rdx,%rax,8), %r12
movq (%rcx,%rax,8), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf926(%rip), %rdi      # 0x1e6a8
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf3cc(%rip), %rcx      # 0x1e170
movq 0xf815(%rip), %rdx      # 0x1e5c0
movq (%rdx,%r14,8), %rdx
movq (%rcx,%rdx,8), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf99c(%rip), %rdi      # 0x1e760
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, %r14
movl $0x1, %edi
callq 0x384f
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xf969(%rip), %rdi      # 0x1e758
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movl $0x1, (%rbx)
jmp 0xebcd
leaq 0x7dd8(%rip), %rdi      # 0x16be3
jmp 0xebc1