// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xe3d3
movq 0x11fa2(%rip), %rax     # 0x20350
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe3d3
movq 0x11f7b(%rip), %rcx     # 0x20340
movslq -0xc(%rbp), %rdx
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
cmpl (%rcx,%rdx,4), %eax
je 0xe3e9
movl -0xc(%rbp), %edx
leaq 0xd57b(%rip), %rdi      # 0x1b958
leaq 0xd53b(%rip), %rsi      # 0x1b91f
callq 0x2950
cmpl $0x0, -0x4(%rbp)
jl 0xe41b
movq 0x11f5a(%rip), %rax     # 0x20350
movslq -0x4(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe41b
movq 0x11f33(%rip), %rcx     # 0x20340
movslq -0x4(%rbp), %rdx
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
cmpl (%rcx,%rdx,4), %eax
je 0xe431
movl -0x4(%rbp), %edx
leaq 0xd533(%rip), %rdi      # 0x1b958
leaq 0xd4f3(%rip), %rsi      # 0x1b91f
callq 0x2950
cmpl $0x0, -0x8(%rbp)
jl 0xe463
movq 0x11f12(%rip), %rax     # 0x20350
movslq -0x8(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xe463
movq 0x11eeb(%rip), %rcx     # 0x20340
movslq -0x8(%rbp), %rdx
movl $0xfffffff2, %eax       # imm = 0xFFFFFFF2
cmpl (%rcx,%rdx,4), %eax
je 0xe479
movl -0x8(%rbp), %edx
leaq 0xd4eb(%rip), %rdi      # 0x1b958
leaq 0xd4ab(%rip), %rsi      # 0x1b91f
callq 0x2950
movq 0x11ec0(%rip), %rax     # 0x20340
movq 0x11ec1(%rip), %rcx     # 0x20348
movslq -0xc(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq 0x11ea4(%rip), %rax     # 0x20340
movq 0x11ea5(%rip), %rcx     # 0x20348
movslq -0x4(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movq 0x11e88(%rip), %rax     # 0x20340
movq 0x11e89(%rip), %rcx     # 0x20348
movslq -0x8(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x12, %rax
ja 0xe5f3
movq -0x28(%rbp), %rax
leaq 0xcb18(%rip), %rcx      # 0x1b004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
andl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
jmp 0xe602
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
andl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
xorl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
orl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
orl -0x18(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
xorl -0x18(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x18(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
xorl $-0x1, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
orl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
andl -0x18(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0xe602
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
sarl %cl, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x14(%rbp)
jmp 0xe602
movl -0xc(%rbp), %esi
leaq 0xd361(%rip), %rdi      # 0x1b95e
callq 0x26c0
movl -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
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)