// File: /workspace/github_c_makefile_star2_O1/blakemcbride[P]LISP9/ls9.c
// Function: bitop
cell bitop(cell x, cell y, cell o) {
	uint	op, a, b;
	int	i;

	if (!fixp(o)) expect("bitop", "fixnum", o);
	if (!fixp(x)) expect("bitop", "fixnum", x);
	if (!fixp(y)) expect("bitop", "fixnum", y);
	op = fixval(o);
	b = fixval(x);
	a = i = fixval(y);
	switch (op) {
	case  0: a =  0;        break;
	case  1: a =   a &  b;  break;
	case  2: a =   a & ~b;  break;
	case  3: /* a =   a; */ break;
	case  4: a =  ~a &  b;  break;
	case  5: a =        b;  break;
	case  6: a =   a ^  b;  break;
	case  7: a =   a |  b;  break;
	case  8: a = ~(a |  b); break;
	case  9: a = ~(a ^  b); break;
	case 10: a =       ~b;  break;
	case 11: a =   a | ~b;  break;
	case 12: a =  ~a;       break;
	case 13: a =  ~a |  b;  break;
	case 14: a = ~(a &  b); break;
	case 15: a = ~0;        break;
	case 16: a = a  <<  b;  break;
	case 17: a = i  >>  b;  break;
	case 18: a = a  >>  b;  break;
	default: error("bitop: invalid opcode", o);
		 break;
	}
	return mkfix(a);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl %edx, %ebx
testl %edx, %edx
js 0xa8cf
movl %esi, %ebp
movq 0xeb84(%rip), %rsi      # 0x19350
movl %ebx, %ecx
testb $0x1, (%rsi,%rcx)
je 0xa8cf
movq 0xeb61(%rip), %rax      # 0x19340
cmpl $-0xe, (%rax,%rcx,4)
jne 0xa8cf
movl %edi, %r14d
testl %edi, %edi
js 0xa8fb
movl %r14d, %edx
testb $0x1, (%rsi,%rdx)
je 0xa8fb
cmpl $-0xe, (%rax,%rdx,4)
jne 0xa8fb
testl %ebp, %ebp
js 0xa928
movl %ebp, %r8d
testb $0x1, (%rsi,%r8)
je 0xa928
cmpl $-0xe, (%rax,%r8,4)
jne 0xa928
movq 0xeb15(%rip), %rsi      # 0x19348
movslq (%rsi,%rcx,4), %rcx
movl (%rax,%rcx,4), %ecx
cmpq $0x12, %rcx
ja 0xa954
movslq (%rsi,%rdx,4), %rdx
movl (%rax,%rdx,4), %edi
movslq (%rsi,%r8,4), %rdx
movl (%rax,%rdx,4), %eax
leaq 0x87db(%rip), %rdx      # 0x13034
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
xorl %edi, %edi
jmp 0xa8a7
movl %edi, %ecx
shll %cl, %eax
jmp 0xa8a5
andl %edi, %eax
jmp 0xa87c
xorl %eax, %edi
notl %edi
jmp 0xa8a7
notl %edi
jmp 0xa899
orl %edi, %eax
notl %eax
jmp 0xa8a5
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
jmp 0xa8a7
notl %edi
jmp 0xa893
movl %edi, %ecx
sarl %cl, %eax
jmp 0xa8a5
notl %eax
andl %eax, %edi
jmp 0xa8a7
notl %eax
orl %eax, %edi
jmp 0xa8a7
xorl %eax, %edi
jmp 0xa8a7
movl %edi, %ecx
shrl %cl, %eax
movl %eax, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %edx
callq 0x3162
movl $0xfffffff2, %edi       # imm = 0xFFFFFFF2
movl %eax, %esi
movl $0x1, %edx
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3162
leaq 0x8a45(%rip), %rsi      # 0x1331b
leaq 0x8fdb(%rip), %rdx      # 0x138b8
leaq 0x8f9b(%rip), %rcx      # 0x1387f
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x21e0
movq %r14, %rdi
movl %ebx, %esi
callq 0x264c
leaq 0x8a19(%rip), %rsi      # 0x1331b
leaq 0x8faf(%rip), %rdx      # 0x138b8
leaq 0x8f6f(%rip), %rcx      # 0x1387f
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movl %r14d, %esi
callq 0x264c
leaq 0x89ec(%rip), %rsi      # 0x1331b
leaq 0x8f82(%rip), %rdx      # 0x138b8
leaq 0x8f42(%rip), %rcx      # 0x1387f
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x264c
leaq 0x8f63(%rip), %rdi      # 0x138be
jmp 0xa8f4