// File: /workspace/github_c_makefile_star2_O0/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
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x1601e
movq 0x121ce(%rip), %rax     # 0x28180
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x15fda
movq 0x121bc(%rip), %rax     # 0x28180
movq 0x12605(%rip), %rcx     # 0x285d0
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jge 0x1601e
movq 0x1219f(%rip), %rax     # 0x28180
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x12190(%rip), %rax     # 0x28180
movq 0x125d9(%rip), %rcx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movq (%rax,%rcx,8), %rsi
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rsi, %rdx
cmovel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x16551
movq 0x1215b(%rip), %rax     # 0x28180
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16186
movq 0x125b5(%rip), %rax     # 0x285f0
movq 0x1213e(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x16186
movq 0x1211f(%rip), %rax     # 0x28180
movq 0x12118(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1f, (%rax,%rcx,8)
je 0x16098
movq 0x12102(%rip), %rax     # 0x28180
movq 0x120fb(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x18, (%rax,%rcx,8)
jne 0x16186
movq 0x120e1(%rip), %rax     # 0x28180
movq 0x1252a(%rip), %rcx     # 0x285d0
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16186
movq 0x12530(%rip), %rax     # 0x285f0
movq 0x120b9(%rip), %rcx     # 0x28180
movq 0x12502(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x16186
movq 0x1208f(%rip), %rax     # 0x28180
movq 0x12088(%rip), %rcx     # 0x28180
movq 0x124d1(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1f, (%rax,%rcx,8)
je 0x1613a
movq 0x12067(%rip), %rax     # 0x28180
movq 0x12060(%rip), %rcx     # 0x28180
movq 0x124a9(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x18, (%rax,%rcx,8)
jne 0x16186
movq -0x18(%rbp), %rax
movq 0x1203b(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x1202c(%rip), %rcx     # 0x28180
movq 0x12475(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rsi
callq *%rax
movl %eax, %edx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x16551
movq 0x11ff3(%rip), %rax     # 0x28180
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x162d9
movq 0x1244d(%rip), %rax     # 0x285f0
movq 0x11fd6(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x162d9
movq 0x11fb7(%rip), %rax     # 0x28180
movq 0x11fb0(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x16, (%rax,%rcx,8)
jne 0x162d9
movq 0x11f96(%rip), %rax     # 0x28180
movq 0x123df(%rip), %rcx     # 0x285d0
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x162d9
movq 0x123e5(%rip), %rax     # 0x285f0
movq 0x11f6e(%rip), %rcx     # 0x28180
movq 0x123b7(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x162d9
movq 0x11f44(%rip), %rax     # 0x28180
movq 0x11f3d(%rip), %rcx     # 0x28180
movq 0x12386(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x16, (%rax,%rcx,8)
jne 0x162d9
movq -0x20(%rbp), %rax
movq 0x11f18(%rip), %rcx     # 0x28180
movq 0x12361(%rip), %rdx     # 0x285d0
movq 0x11f0a(%rip), %rsi     # 0x28180
movq -0x30(%rbp), %rdi
movq (%rsi,%rdi,8), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %edi
movq 0x11ef1(%rip), %rcx     # 0x28180
movq 0x1233a(%rip), %rdx     # 0x285d0
movq 0x11ee3(%rip), %rsi     # 0x28180
movq 0x1232c(%rip), %r8      # 0x285d0
movq -0x30(%rbp), %r9
movq (%r8,%r9,8), %r8
movq (%rsi,%r8,8), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movl %ecx, %esi
callq *%rax
movl %eax, %edx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x16551
movq 0x11ea0(%rip), %rax     # 0x28180
movq -0x30(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x164ef
movq 0x122fa(%rip), %rax     # 0x285f0
movq 0x11e83(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x164ef
movq 0x11e64(%rip), %rax     # 0x28180
movq 0x11e5d(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x21, (%rax,%rcx,8)
jne 0x164ef
movq 0x11e43(%rip), %rax     # 0x28180
movq 0x1228c(%rip), %rcx     # 0x285d0
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x164ef
movq 0x12292(%rip), %rax     # 0x285f0
movq 0x11e1b(%rip), %rcx     # 0x28180
movq 0x12264(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x164ef
movq 0x11df1(%rip), %rax     # 0x28180
movq 0x11dea(%rip), %rcx     # 0x28180
movq 0x12233(%rip), %rdx     # 0x285d0
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x21, (%rax,%rcx,8)
jne 0x164ef
movq 0x1223d(%rip), %rax     # 0x285f8
movq 0x1220e(%rip), %rcx     # 0x285d0
movq 0x11db7(%rip), %rdx     # 0x28180
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq 0x1220d(%rip), %rcx     # 0x285f8
movq 0x121de(%rip), %rdx     # 0x285d0
movq 0x11d87(%rip), %rsi     # 0x28180
movq 0x121d0(%rip), %rdi     # 0x285d0
movq -0x30(%rbp), %r8
movq (%rdi,%r8,8), %rdi
movq (%rsi,%rdi,8), %rsi
movq (%rdx,%rsi,8), %rdx
subq $0x1, %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x1646a
leaq -0x611(%rip), %rax      # 0x15e10
cmpq %rax, -0x28(%rbp)
je 0x16434
leaq -0x79e(%rip), %rax      # 0x15c90
cmpq %rax, -0x28(%rbp)
jne 0x16441
movq $-0x3, -0x8(%rbp)
jmp 0x16551
leaq -0x5f8(%rip), %rax      # 0x15e50
cmpq %rax, -0x28(%rbp)
je 0x1645b
leaq -0x785(%rip), %rax      # 0x15cd0
cmpq %rax, -0x28(%rbp)
jne 0x16468
movq $-0x2, -0x8(%rbp)
jmp 0x16551
jmp 0x1646a
movq -0x28(%rbp), %rax
movq 0x12183(%rip), %rdi     # 0x285f8
movq 0x12154(%rip), %rcx     # 0x285d0
movq 0x11cfd(%rip), %rdx     # 0x28180
movq -0x30(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rdi
movq 0x1215b(%rip), %rsi     # 0x285f8
movq 0x1212c(%rip), %rcx     # 0x285d0
movq 0x11cd5(%rip), %rdx     # 0x28180
movq 0x1211e(%rip), %r8      # 0x285d0
movq -0x30(%rbp), %r9
movq (%r8,%r9,8), %r8
movq (%rdx,%r8,8), %rdx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movl -0x34(%rbp), %edx
callq *%rax
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
testb $0x1, %dl
cmovnel %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x16551
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x1650b
leaq 0xa84e(%rip), %rax      # 0x20d50
movq %rax, -0xa8(%rbp)
jmp 0x16519
leaq 0xa859(%rip), %rax      # 0x20d6b
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0xa8(%rbp), %rcx
leaq 0xa846(%rip), %rsi      # 0x20d78
movb $0x0, %al
callq 0x3200
leaq -0xa0(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x34b0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nop