// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/crossassemblers/macro1/macro1.c
// Function: pseudo
BOOL pseudo( PSEUDO_T val )
{
    int count;
    int repeatstart;

    switch( (PSEUDO_T) val ) {
    case CONSTANTS:
	next(0);			/* Skip symbol */
	constants();
	break;

    case VARIABLES:
	next(0);			/* Skip symbol */
	variables();
	break;

    case DEFINE:
	next(0);			/* Skip symbol */
	defineMacro();
	return FALSE;
	break;

    case REPEAT:
	next(0);			/* Skip symbol */

	/* NOTE!! constant followed by SPACE picked up as expression!! */
	count = getExprs() & ADDRESS_FIELD;
	/* XXX error if sign bit set? */

	/* allow comma, but do not require */
	if( line[lexstart] == ',')
	    next(0);

	nrepeats++;
	repeatstart = lexstart;		/* save line start */
	while (count-- > 0) {
	    cc = repeatstart;		/* reset input pointer */
	    processLine();		/* recurse! */
	}
	cc = maxcc;
	nrepeats--;

	return FALSE;
	break;

    case START:
	next(0);			/* Skip symbol */
	/* XXX illegal in macro or repeat */
	flushLoader();
	if (!ISDONE(line[lexstart])) {
	    if (line[lexstart] == ' ')
		next(0);
	    start_addr = getExprs() & ADDRESS_FIELD;
	    next(0);
	    printLine( line, 0, start_addr, LINE_VAL );
	    /* MACRO punches 4" of leader */
	    punchTriplet(JMP | start_addr);
	    /* MACRO punches 24" of leader? */
	}
	/*
	 * handle multiple tapes concatenated into one file!!
	 * have command line option?? treat "start" as EOF??
	 */
	list_title_set = FALSE;
	return FALSE;

    case TEXT:
	/* NOTE!! no next()! */
	text();
	break;

    case NOINPUT:
	next(0);			/* Skip symbol */
	noinput = TRUE;
	break;

    case EXPUNGE:
	next(0);			/* Skip symbol */
	if (pass == 1)
	    init_symtab();
	break;

    default:
	break;
    } /* end switch for pseudo-ops */
    return TRUE;			/* keep scanning */
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bl
decl %edi
cmpl $0xa, %edi
ja 0x4612
leaq 0x1bc0(%rip), %rax      # 0x6044
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x384a
callq 0x570e
jmp 0x4612
callq 0x5ad6
jmp 0x4612
xorl %edi, %edi
callq 0x384a
callq 0x2e1d
jmp 0x4612
xorl %edi, %edi
callq 0x384a
movl $0x1, 0x5898(%rip)      # 0x9d64
jmp 0x4612
xorl %edi, %edi
callq 0x384a
cmpl $0x1, 0x58a1(%rip)      # 0x9d80
jne 0x4612
movq 0x585c(%rip), %rax      # 0x9d48
movq 0x584d(%rip), %rcx      # 0x9d40
movq %rcx, 0x10(%rax)
movups 0x5832(%rip), %xmm0     # 0x9d30
movups %xmm0, (%rax)
movl $0x0, 0x5845(%rip)      # 0x9d50
jmp 0x4612
xorl %edi, %edi
callq 0x384a
callq 0x398a
movl %eax, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
movslq 0x7b85(%rip), %rax      # 0xc0b0
leaq 0x7b1e(%rip), %rcx      # 0xc050
cmpb $0x2c, (%rax,%rcx)
jne 0x453f
xorl %edi, %edi
callq 0x384a
incl 0x8e7f(%rip)            # 0xd3c4
testl %ebx, %ebx
je 0x4563
movl 0x7b61(%rip), %ebp      # 0xc0b0
incl %ebx
movl %ebp, 0x7b61(%rip)      # 0xc0b8
callq 0x39c8
decl %ebx
cmpl $0x1, %ebx
jg 0x4551
movl 0x7bcb(%rip), %eax      # 0xc134
movl %eax, 0x7b49(%rip)      # 0xc0b8
decl 0x8e4f(%rip)            # 0xd3c4
jmp 0x4602
xorl %edi, %edi
callq 0x384a
callq 0x5601
movslq 0x7b23(%rip), %rax      # 0xc0b0
leaq 0x7abc(%rip), %rcx      # 0xc050
movzbl (%rax,%rcx), %eax
cmpq $0x2f, %rax
ja 0x45bb
movabsq $0x800000000601, %rcx   # imm = 0x800000000601
btq %rax, %rcx
jb 0x45fb
cmpq $0x20, %rax
jne 0x45bb
xorl %edi, %edi
callq 0x384a
callq 0x398a
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, 0x7b7d(%rip)      # 0xc148
xorl %edi, %edi
callq 0x384a
movl 0x7b70(%rip), %edx      # 0xc148
leaq 0x7a71(%rip), %rdi      # 0xc050
xorl %esi, %esi
movl $0x1, %ecx
callq 0x3eb2
movl $0x30000, %edi          # imm = 0x30000
orl 0x7b52(%rip), %edi      # 0xc148
callq 0x5516
movb $0x0, 0x7ac6(%rip)      # 0xc0c8
xorl %ebx, %ebx
jmp 0x4612
xorl %edi, %edi
callq 0x384a
callq 0x5a6e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq