// File: /workspace/github_c_makefile_star2_O0/blakemcbride[P]LISP9/ls9.c
// Function: mul
cell mul(cell x, cell y) {
	int	a, b;

	if (!fixp(x)) expect("*", "fixnum", x);
	if (!fixp(y)) expect("*", "fixnum", y);
	a = fixval(x);
	b = fixval(y);
	/*
	 * Overflow of a*b is undefined, sooo
	 */
	/* Shortcuts, also protect later division */
	if (0 == a || 0 == b) return Zero;
	if (1 == a) return y;
	if (1 == b) return x;
	/* abs(INT_MIN) is undefined using two's complement, so */
	if (INT_MIN == a || INT_MIN == b) fixover("*", x, y);
	/* Catch the rest */
	/* Bug: result may not be INT_MIN */
	if (abs(a) > INT_MAX / abs(b)) fixover("*", x, y);
	return mkfix(a * b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0xda70
movq 0x12905(%rip), %rax     # 0x20350
movslq -0x8(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xda70
movq 0x128de(%rip), %rcx     # 0x20340
movslq -0x8(%rbp), %rdx
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
cmpl (%rcx,%rdx,4), %eax
je 0xda86
movl -0x8(%rbp), %edx
leaq 0xe52f(%rip), %rdi      # 0x1bfa9
leaq 0xde9e(%rip), %rsi      # 0x1b91f
callq 0x2950
cmpl $0x0, -0xc(%rbp)
jl 0xdab8
movq 0x128bd(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xdab8
movq 0x12896(%rip), %rcx     # 0x20340
movslq -0xc(%rbp), %rdx
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
cmpl (%rcx,%rdx,4), %eax
je 0xdace
movl -0xc(%rbp), %edx
leaq 0xe4e7(%rip), %rdi      # 0x1bfa9
leaq 0xde56(%rip), %rsi      # 0x1b91f
callq 0x2950
movq 0x1286b(%rip), %rax     # 0x20340
movq 0x1286c(%rip), %rcx     # 0x20348
movslq -0x8(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq 0x1284f(%rip), %rax     # 0x20340
movq 0x12850(%rip), %rcx     # 0x20348
movslq -0xc(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
je 0xdb14
xorl %eax, %eax
cmpl -0x14(%rbp), %eax
jne 0xdb22
movl 0x12692(%rip), %eax     # 0x201ac
movl %eax, -0x4(%rbp)
jmp 0xdbd6
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jne 0xdb37
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdbd6
movl $0x1, %eax
cmpl -0x14(%rbp), %eax
jne 0xdb4c
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdbd6
movl $0x80000000, %eax       # imm = 0x80000000
cmpl -0x10(%rbp), %eax
je 0xdb60
movl $0x80000000, %eax       # imm = 0x80000000
cmpl -0x14(%rbp), %eax
jne 0xdb72
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0xe43c(%rip), %rdi      # 0x1bfa9
callq 0xd630
movl -0x10(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movl %ecx, %eax
negl %eax
cmovnsl %eax, %ecx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cltd
idivl %ecx
movl %eax, %ecx
movl -0x18(%rbp), %eax
cmpl %ecx, %eax
jle 0xdbac
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
leaq 0xe402(%rip), %rdi      # 0x1bfa9
callq 0xd630
movl -0x10(%rbp), %edi
imull -0x14(%rbp), %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x3990
movl %eax, %esi
movl $0xfffffff2, %edi       # imm = 0xFFFFFFF2
movl $0x1, %edx
callq 0x3990
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop