// File: /workspace/github_c_makefile_star2_O1/azhai[P]mlite/mlite.c
// Function: cmp
cell cmp(char *name,
	int ncmp(cell x, cell y),
	int ccmp(int x, int y),
	int scmp(char *s1, char *s2, int k),
	cell x
) {
	int	k;
	char	msg[100], *s;

	if (*name == '=' && (virtual_p(car(x)) || virtual_p(cadr(x))))
		return (car(x) == cadr(x))? TRUE: FALSE;
	if (number_p(car(x)) && number_p(cadr(x)))
		return ncmp(car(x), cadr(x))? TRUE: FALSE;
	else if (char_p(car(x)) && char_p(cadr(x)))
		return ccmp(char_value(car(x)), char_value(cadr(x)))? TRUE:
			FALSE;
	else if (string_p(car(x)) && string_p(cadr(x))) {
		k = string_len(car(x));
		if (k != string_len(cadr(x))) {
			if (scmp == str_eq || scmp == str_ieq)
				return FALSE;
			if (scmp == str_ne || scmp == str_ine)
				return TRUE;
		}
		return !scmp(string(car(x)), string(cadr(x)), k)? FALSE: TRUE;
	}
	else {
		if (*name == '=')
			s = "num/char/str/bool/unit/nil";
		else
			s = "num/char/str";
		sprintf(msg, "%s: expected tuple of %s, but got", name, s);
		error(msg, x);
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rsi, %r8
movq %rdi, %rax
movb (%rdi), %r9b
cmpb $0x3d, %r9b
jne 0xfb0e
movq 0xe685(%rip), %rsi      # 0x1e170
movq (%rsi,%rbx,8), %rdi
testq %rdi, %rdi
js 0xfbca
movq 0xeac1(%rip), %r10      # 0x1e5c0
movq (%r10,%rbx,8), %r10
cmpq $0x0, (%rsi,%r10,8)
js 0xfbca
movq 0xe65b(%rip), %r10      # 0x1e170
movq (%r10,%rbx,8), %rdi
testq %rdi, %rdi
js 0xfc5c
movq 0xeab7(%rip), %r11      # 0x1e5e0
testb $0x1, (%r11,%rdi)
je 0xfb73
movq (%r10,%rdi,8), %rsi
cmpq $-0x18, %rsi
je 0xfb40
cmpq $-0x1f, %rsi
jne 0xfb73
movq 0xea79(%rip), %rsi      # 0x1e5c0
movq (%rsi,%rbx,8), %rsi
movq (%r10,%rsi,8), %rsi
testq %rsi, %rsi
js 0xfb73
testb $0x1, (%r11,%rsi)
je 0xfb73
movq (%r10,%rsi,8), %r11
cmpq $-0x18, %r11
je 0xfb6b
cmpq $-0x1f, %r11
jne 0xfb73
callq *%r8
jmp 0xfc4c
testq %rdi, %rdi
js 0xfc5c
movq 0xea5d(%rip), %r8       # 0x1e5e0
testb $0x1, (%r8,%rdi)
je 0xfbe9
cmpq $-0x16, (%r10,%rdi,8)
jne 0xfbe9
movq 0xea28(%rip), %rsi      # 0x1e5c0
movq (%rsi,%rbx,8), %r11
movq (%r10,%r11,8), %r11
testq %r11, %r11
js 0xfbe9
testb $0x1, (%r8,%r11)
je 0xfbe9
cmpq $-0x16, (%r10,%r11,8)
jne 0xfbe9
movq (%rsi,%rdi,8), %rax
movl (%r10,%rax,8), %edi
movq (%rsi,%r11,8), %rax
movl (%r10,%rax,8), %esi
callq *%rdx
jmp 0xfc4c
movq 0xe9ef(%rip), %rax      # 0x1e5c0
movq (%rax,%rbx,8), %rax
xorl %r14d, %r14d
cmpq (%rsi,%rax,8), %rdi
sete %r14b
addq $-0x3, %r14
jmp 0xfc98
testq %rdi, %rdi
js 0xfc5c
movq 0xe9eb(%rip), %rdx      # 0x1e5e0
testb $0x10, (%rdx,%rdi)
je 0xfc5c
cmpq $-0x21, (%r10,%rdi,8)
jne 0xfc5c
movq 0xe9b7(%rip), %r8       # 0x1e5c0
movq (%r8,%rbx,8), %rsi
movq (%r10,%rsi,8), %r11
testq %r11, %r11
js 0xfc5c
testb $0x10, (%rdx,%r11)
je 0xfc5c
cmpq $-0x21, (%r10,%r11,8)
jne 0xfc5c
movq 0xe9bd(%rip), %rax      # 0x1e5e8
movq (%r8,%rdi,8), %rsi
movq -0x8(%rax,%rsi,8), %rdx
movslq %edx, %rdi
movq (%r8,%r11,8), %r8
cmpq -0x8(%rax,%r8,8), %rdi
jne 0xfca6
leaq (%rax,%rsi,8), %rdi
leaq (%rax,%r8,8), %rsi
callq *%rcx
cmpl $0x1, %eax
movq $-0x2, %r14
sbbq $0x0, %r14
jmp 0xfc98
cmpb $0x3d, %r9b
leaq 0x7039(%rip), %rdx      # 0x16ca0
leaq 0x704d(%rip), %rcx      # 0x16cbb
cmoveq %rdx, %rcx
leaq 0x704f(%rip), %rsi      # 0x16cc8
xorl %r14d, %r14d
leaq -0x80(%rbp), %r15
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x31f0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x33eb
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x271(%rip), %rdi      # 0xfa3c
cmpq %rdi, %rcx
sete %dil
leaq -0x2ed(%rip), %r9       # 0xf9ce
cmpq %r9, %rcx
sete %r9b
orb %dil, %r9b
movq $-0x3, %r14
jne 0xfc98
leaq -0x282(%rip), %rdi      # 0xfa53
cmpq %rdi, %rcx
sete %dil
leaq -0x301(%rip), %r9       # 0xf9e2
cmpq %r9, %rcx
sete %r9b
orb %dil, %r9b
movq $-0x2, %r14
je 0xfc42
jmp 0xfc98