// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/extracters/ckabstape/ckabstape.c
// Function: disasm
void disasm(unsigned int instr)
{
	char *idx;
	if(instr & 0010000) idx = ",X"; else idx = "  ";

	if((instr & 0700000) != 0700000)
	switch(instr & 0740000){
	 case(0000000):
	  printf("CAL%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0040000):
	  printf("DAC%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0100000):
	  printf("JMS%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0140000):
	  printf("DZM%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0200000):
	  printf("LAC%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0240000):
	  printf("XOR%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0300000):
	  printf("ADD%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0340000):
	  printf("TAD%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0400000):
	  printf("XCT%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0440000):
	  printf("ISZ%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0500000):
	  printf("AND%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0540000):
	  printf("SAD%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 case(0600000):
	  printf("JMP%c %04o%s ", (instr & 0020000)?'*':' ', instr &07777, idx);
	  break;
	 default:
	  printf("????         ");
	  break;
	}
/*
 */
	if((instr & 0700000) == 0700000)
	 switch(instr){
	 case(0700000):
	  printf("IOT        ");
	  break;
	 case(0700002):
	  printf("IOF        ");
	  break;
	 case(0700004):
	  printf("CLOF       ");
	  break;
	 case(0700042):
	  printf("ION        ");
	  break;	

	 case(0700101):
	  printf("RSF (hsrdr)");
	  break;
	 case(0700102):
	  printf("RCF (hsrdr)");
	  break;
	 case(0700104):
	  printf("RSA (hsrdr)");
	  break;
	 case(0700112):
	  printf("RRB (hsrdr)");
	  break;
	 case(0700144):
	  printf("RSB (hsrdr)");
	  break;

	 case(0700201):
	  printf("PSF (hsptp)");
	  break;
	 case(0700202):
	  printf("PCF (hsptp)");
	  break;
	 case(0700204):
	  printf("PSA (hsptp)");
	  break;
	 case(0700244):
	  printf("PSB (hsptp)");
	  break;

	 case(0700301):
	  printf("KSF (ttykb)");
	  break;
	 case(0700312):
	  printf("KRB (ttyrd)");
	  break;
	 case(0700314):
	  printf("IORS       ");
	  break;
	 case(0700322):
	  printf("KRS (ttykb)");
	  break;

	 case(0700401):
	  printf("TSF (ttyout)");
	  break;
	 case(0700402):
	  printf("TCF (ttyout)");
	  break;
	 case(0700406):
	  printf("TLS (ttyout)");
	  break;

	
	 case(0703302):
	  printf("CAF         ");
	  break;

	 case(0707721):
	  printf("SBA         ");
	  break;
	 case(0707722):
	 case(0707762):
	  printf("DBA         ");
	  break;
	 case(0707724):
	 case(0707764):
	  printf("EBA         ");
	  break;

/*
 */
	 case(0720000):
	  printf("AAS         ");
	  break;
	 case(0723000):
	  printf("AAC         ");
	  break;
	 case(0725000):
	  printf("AXS         ");
	  break;
	 case(0736000):
	  printf("CLLR        ");
	  break;
	 case(0735000):
	  printf("CLX         ");
	  break;
	 case(0722000):
	  printf("PAL         ");
	  break;
	 case(0721000):
	  printf("PAX         ");
	  break;
	 case(0730000):
	  printf("PLA         ");
	  break;
	 case(0731000):
	  printf("PLX         ");
	  break;
	 case(0724000):
	  printf("PXA         ");
	  break;
	 case(0726000):
	  printf("PXL         ");
	  break;
	

/*
 * operate instructions
 */
	 case(0740000):
	  printf("NOP         ");
	  break;
	 case(0740001):		/* CMA compliment AC */
	  printf("CMA         ");
	  break;
	 case(0740002):
	  printf("CML         ");
	  break;
	 case(0740004):
	  printf("OAS         ");
	  break;
	 case(0740010):
	  printf("RAL         ");
	  break;
	 case(0740020):
	  printf("RAR         ");
	  break;
	 case(0740030):
	  printf("IAC         ");
	  break;
	 case(0740031):
	  printf("TCA         ");
	  break;
	 case(0740040):
	  printf("HLT         ");
	  break;
	 case(0740100):
	  printf("SMA         ");
	  break;
	 case(0740200):
	  printf("SZA         ");
	  break;
	 case(0740400):
	  printf("SNL         ");
	  break;
	 case(0741000):
	  printf("SKP         ");
	  break;
	 case(0741100):
	  printf("SPA         ");
	  break;
	 case(0741200):
	  printf("SNA         ");
	  break;
	 case(0741400):
	  printf("SZL         ");
	  break;
	 case(0742010):
	  printf("RTL         ");
	  break;
	 case(0742020):
	  printf("RTR         ");
	  break;
	 case(0742030):
	  printf("SWHA        ");
	  break;
	 case(0744000):
	  printf("CLL         ");
	  break;
	 case(0744002):
	  printf("STL         ");
	  break;	
	 case(0744010):
	  printf("CCL         ");
	  break;
	 case(0744020):
	  printf("RCL         ");
	  break;
	 case(0750000):
	  printf("CLA         ");
	  break;
	 case(0750001):
	  printf("LAS         ");
	  break;
	 case(0750004):
	  printf("LAT         ");
	  break;
	 case(0750010):
	  printf("GLK         ");
	  break;
	 case(0760000):
	  printf("LAW         ");
	  break;
	 default:
	  printf("???         ");
	  break;
	}
}

// Assembly:
movl %edi, %edx
btl $0xc, %edi
leaq 0xed3(%rip), %rax       # 0x21c4
leaq 0xe08(%rip), %rcx       # 0x2100
cmovaeq %rax, %rcx
movl %edi, %eax
notl %eax
testl $0x38000, %eax          # imm = 0x38000
jne 0x1367
cmpl $0x3abff, %edx          # imm = 0x3ABFF
jle 0x13ab
cmpl $0x3c1ff, %edx          # imm = 0x3C1FF
jg 0x13ff
cmpl $0x3c00f, %edx          # imm = 0x3C00F
jg 0x1537
cmpl $0x3b9ff, %edx          # imm = 0x3B9FF
jg 0x1573
cmpl $0x3ac00, %edx          # imm = 0x3AC00
je 0x19ea
cmpl $0x3b000, %edx          # imm = 0x3B000
je 0x19de
cmpl $0x3b200, %edx          # imm = 0x3B200
jne 0x1b63
leaq 0xff4(%rip), %rdi       # 0x2356
jmp 0x1bb2
movl %edx, %eax
shrl $0xe, %eax
andl $0xf, %eax
cmpl $0xc, %eax
ja 0x16d6
leaq 0xc91(%rip), %rsi       # 0x2010
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xd5d(%rip), %rdi       # 0x2103
jmp 0x1740
cmpl $0x380d1, %edx          # imm = 0x380D1
jg 0x1447
cmpl $0x38063, %edx          # imm = 0x38063
jg 0x14c6
cmpl $0x38021, %edx          # imm = 0x38021
jg 0x1777
cmpl $0x38000, %edx          # imm = 0x38000
je 0x1a26
cmpl $0x38002, %edx          # imm = 0x38002
je 0x1a1a
cmpl $0x38004, %edx          # imm = 0x38004
jne 0x1b63
leaq 0xde5(%rip), %rdi       # 0x21df
jmp 0x1bb2
cmpl $0x3c801, %edx          # imm = 0x3C801
jg 0x148f
cmpl $0x3c407, %edx          # imm = 0x3C407
jg 0x1747
cmpl $0x3c27f, %edx          # imm = 0x3C27F
jg 0x18b6
cmpl $0x3c200, %edx          # imm = 0x3C200
je 0x1a86
cmpl $0x3c240, %edx          # imm = 0x3C240
jne 0x1b63
leaq 0xfe4(%rip), %rdi       # 0x2426
jmp 0x1bb2
cmpl $0x38ff1, %edx          # imm = 0x38FF1
jg 0x1502
cmpl $0x386c1, %edx          # imm = 0x386C1
jg 0x17a2
cmpl $0x38101, %edx          # imm = 0x38101
jg 0x18fe
cmpl $0x380d2, %edx          # imm = 0x380D2
je 0x1ab6
cmpl $0x38101, %edx          # imm = 0x38101
jne 0x1b63
leaq 0xe09(%rip), %rdi       # 0x2293
jmp 0x1bb2
cmpl $0x3cfff, %edx          # imm = 0x3CFFF
jle 0x1862
leal -0x3d000(%rdx), %eax
cmpl $0x8, %eax
ja 0x1a32
leaq 0xbdf(%rip), %rcx       # 0x2090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfe7(%rip), %rdi       # 0x24a8
jmp 0x1bb2
cmpl $0x380a3, %edx          # imm = 0x380A3
jg 0x17d2
cmpl $0x38081, %edx          # imm = 0x38081
jg 0x1922
cmpl $0x38064, %edx          # imm = 0x38064
je 0x1ac2
cmpl $0x38081, %edx          # imm = 0x38081
jne 0x1b63
leaq 0xd36(%rip), %rdi       # 0x2233
jmp 0x1bb2
cmpl $0x3a3ff, %edx          # imm = 0x3A3FF
jg 0x1802
cmpl $0x39fff, %edx          # imm = 0x39FFF
jg 0x1946
cmpl $0x38ff2, %edx          # imm = 0x38FF2
je 0x19d2
cmpl $0x38ff4, %edx          # imm = 0x38FF4
je 0x197e
jmp 0x1b63
cmpl $0x3c01f, %edx          # imm = 0x3C01F
jle 0x1832
cmpl $0x3c07f, %edx          # imm = 0x3C07F
jg 0x1892
cmpl $0x3c020, %edx          # imm = 0x3C020
je 0x1a6e
cmpl $0x3c040, %edx          # imm = 0x3C040
jne 0x1b63
leaq 0xe84(%rip), %rdi       # 0x23f2
jmp 0x1bb2
leal -0x3c000(%rdx), %eax
cmpl $0x8, %eax
ja 0x19f6
leaq 0xae3(%rip), %rcx       # 0x206c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xde4(%rip), %rdi       # 0x237d
jmp 0x1bb2
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xbe1(%rip), %rdi       # 0x219d
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xb5c(%rip), %rdi       # 0x213b
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xba9(%rip), %rdi       # 0x21ab
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xb5c(%rip), %rdi       # 0x2181
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xad7(%rip), %rdi       # 0x211f
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xac2(%rip), %rdi       # 0x212d
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xad7(%rip), %rdi       # 0x2165
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xa60(%rip), %rdi       # 0x2111
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xa75(%rip), %rdi       # 0x2149
jmp 0x1740
leaq 0xadc(%rip), %rdi       # 0x21b9
jmp 0x1bb2
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xa57(%rip), %rdi       # 0x2157
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xa6f(%rip), %rdi       # 0x218f
jmp 0x1740
btl $0xd, %edx
movl $0x20, %eax
movl $0x2a, %esi
cmovael %eax, %esi
andl $0xfff, %edx            # imm = 0xFFF
leaq 0xa33(%rip), %rdi       # 0x2173
xorl %eax, %eax
jmp 0x1050
cmpl $0x3c417, %edx          # imm = 0x3C417
jg 0x18da
cmpl $0x3c408, %edx          # imm = 0x3C408
je 0x1a92
cmpl $0x3c410, %edx          # imm = 0x3C410
jne 0x1b63
leaq 0xce8(%rip), %rdi       # 0x245a
jmp 0x1bb2
leal -0x38041(%rdx), %eax
cmpl $0x9, %eax
ja 0x1b52
leaq 0x8b7(%rip), %rcx       # 0x2044
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa5a(%rip), %rdi       # 0x21f7
jmp 0x1bb2
cmpl $0x38fd1, %edx          # imm = 0x38FD1
jg 0x196a
cmpl $0x386c2, %edx          # imm = 0x386C2
je 0x1ace
cmpl $0x38fd1, %edx          # imm = 0x38FD1
jne 0x1b63
leaq 0xafa(%rip), %rdi       # 0x22c7
jmp 0x1bb2
cmpl $0x380c9, %edx          # imm = 0x380C9
jg 0x198a
cmpl $0x380a4, %edx          # imm = 0x380A4
je 0x1ada
cmpl $0x380c1, %edx          # imm = 0x380C1
jne 0x1b63
leaq 0xa66(%rip), %rdi       # 0x2263
jmp 0x1bb2
cmpl $0x3a7ff, %edx          # imm = 0x3A7FF
jg 0x19ae
cmpl $0x3a400, %edx          # imm = 0x3A400
je 0x1ae6
cmpl $0x3a600, %edx          # imm = 0x3A600
jne 0x1b63
leaq 0xace(%rip), %rdi       # 0x22fb
jmp 0x1bb2
cmpl $0x3c010, %edx          # imm = 0x3C010
je 0x1b37
cmpl $0x3c018, %edx          # imm = 0x3C018
je 0x1b2e
cmpl $0x3c019, %edx          # imm = 0x3C019
jne 0x1b63
leaq 0xb7b(%rip), %rdi       # 0x23d8
jmp 0x1bb2
cmpl $0x3c802, %edx          # imm = 0x3C802
je 0x1b49
cmpl $0x3c808, %edx          # imm = 0x3C808
je 0x1b40
cmpl $0x3c810, %edx          # imm = 0x3C810
jne 0x1b63
leaq 0xc0e(%rip), %rdi       # 0x249b
jmp 0x1bb2
cmpl $0x3c080, %edx          # imm = 0x3C080
je 0x1a7a
cmpl $0x3c100, %edx          # imm = 0x3C100
jne 0x1b63
leaq 0xb5b(%rip), %rdi       # 0x240c
jmp 0x1bb2
cmpl $0x3c280, %edx          # imm = 0x3C280
je 0x1a9e
cmpl $0x3c300, %edx          # imm = 0x3C300
jne 0x1b63
leaq 0xb6b(%rip), %rdi       # 0x2440
jmp 0x1bb2
cmpl $0x3c418, %edx          # imm = 0x3C418
je 0x1aaa
cmpl $0x3c800, %edx          # imm = 0x3C800
jne 0x1b63
leaq 0xb7b(%rip), %rdi       # 0x2474
jmp 0x1bb2
cmpl $0x38102, %edx          # imm = 0x38102
je 0x1af2
cmpl $0x38106, %edx          # imm = 0x38106
jne 0x1b63
leaq 0x990(%rip), %rdi       # 0x22ad
jmp 0x1bb2
cmpl $0x38082, %edx          # imm = 0x38082
je 0x1afe
cmpl $0x38084, %edx          # imm = 0x38084
jne 0x1b63
leaq 0x90a(%rip), %rdi       # 0x224b
jmp 0x1bb2
cmpl $0x3a000, %edx          # imm = 0x3A000
je 0x1b0a
cmpl $0x3a200, %edx          # imm = 0x3A200
jne 0x1b63
leaq 0x9d7(%rip), %rdi       # 0x233c
jmp 0x1bb2
cmpl $0x38fd2, %edx          # imm = 0x38FD2
je 0x19d2
cmpl $0x38fd4, %edx          # imm = 0x38FD4
jne 0x1b63
leaq 0x95c(%rip), %rdi       # 0x22e1
jmp 0x1bb2
cmpl $0x380ca, %edx          # imm = 0x380CA
je 0x1b16
cmpl $0x380cc, %edx          # imm = 0x380CC
jne 0x1b63
leaq 0x8d2(%rip), %rdi       # 0x227b
jmp 0x1bb2
cmpl $0x3a800, %edx          # imm = 0x3A800
je 0x1b22
cmpl $0x3aa00, %edx          # imm = 0x3AA00
jne 0x1b63
leaq 0x93b(%rip), %rdi       # 0x2308
jmp 0x1bb2
leaq 0x8fb(%rip), %rdi       # 0x22d4
jmp 0x1bb2
leaq 0x964(%rip), %rdi       # 0x2349
jmp 0x1bb2
leaq 0x97f(%rip), %rdi       # 0x2370
jmp 0x1bb2
cmpl $0x3ba00, %edx          # imm = 0x3BA00
je 0x1bab
cmpl $0x3bc00, %edx          # imm = 0x3BC00
jne 0x1b63
leaq 0x900(%rip), %rdi       # 0x2315
jmp 0x1bb2
leaq 0x7b2(%rip), %rdi       # 0x21d3
jmp 0x1bb2
leaq 0x79a(%rip), %rdi       # 0x21c7
jmp 0x1bb2
cmpl $0x3e000, %edx          # imm = 0x3E000
jne 0x1b63
leaq 0xa97(%rip), %rdi       # 0x24dc
jmp 0x1bb2
leaq 0xa64(%rip), %rdi       # 0x24b5
jmp 0x1bb2
leaq 0xa72(%rip), %rdi       # 0x24cf
jmp 0x1bb2
leaq 0xa59(%rip), %rdi       # 0x24c2
jmp 0x1bb2
leaq 0x970(%rip), %rdi       # 0x23e5
jmp 0x1bb2
leaq 0x97e(%rip), %rdi       # 0x23ff
jmp 0x1bb2
leaq 0x98c(%rip), %rdi       # 0x2419
jmp 0x1bb2
leaq 0x9b4(%rip), %rdi       # 0x244d
jmp 0x1bb2
leaq 0x98e(%rip), %rdi       # 0x2433
jmp 0x1bb2
leaq 0x9b6(%rip), %rdi       # 0x2467
jmp 0x1bb2
leaq 0x7ca(%rip), %rdi       # 0x2287
jmp 0x1bb2
leaq 0x75e(%rip), %rdi       # 0x2227
jmp 0x1bb2
leaq 0x7e5(%rip), %rdi       # 0x22ba
jmp 0x1bb2
leaq 0x776(%rip), %rdi       # 0x2257
jmp 0x1bb2
leaq 0x842(%rip), %rdi       # 0x232f
jmp 0x1bb2
leaq 0x7a7(%rip), %rdi       # 0x22a0
jmp 0x1bb2
leaq 0x73a(%rip), %rdi       # 0x223f
jmp 0x1bb2
leaq 0x7dd(%rip), %rdi       # 0x22ee
jmp 0x1bb2
leaq 0x752(%rip), %rdi       # 0x226f
jmp 0x1bb2
leaq 0x83a(%rip), %rdi       # 0x2363
jmp 0x1bb2
leaq 0x896(%rip), %rdi       # 0x23cb
jmp 0x1bb2
leaq 0x880(%rip), %rdi       # 0x23be
jmp 0x1bb2
leaq 0x947(%rip), %rdi       # 0x248e
jmp 0x1bb2
leaq 0x931(%rip), %rdi       # 0x2481
jmp 0x1bb2
cmpl $0x38022, %edx          # imm = 0x38022
jne 0x1b63
leaq 0x68a(%rip), %rdi       # 0x21eb
jmp 0x1bb2
leaq 0x650(%rip), %rdi       # 0x21ba
jmp 0x1bb2
leaq 0x690(%rip), %rdi       # 0x2203
jmp 0x1bb2
leaq 0x69f(%rip), %rdi       # 0x221b
jmp 0x1bb2
leaq 0x68a(%rip), %rdi       # 0x220f
jmp 0x1bb2
leaq 0x816(%rip), %rdi       # 0x23a4
jmp 0x1bb2
leaq 0x7f3(%rip), %rdi       # 0x238a
jmp 0x1bb2
leaq 0x811(%rip), %rdi       # 0x23b1
jmp 0x1bb2
leaq 0x7ee(%rip), %rdi       # 0x2397
jmp 0x1bb2
leaq 0x770(%rip), %rdi       # 0x2322
xorl %eax, %eax
jmp 0x1050