// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movb $0x1, %bl
decl %edi
cmpl $0xa, %edi
ja 0x41b9
leaq 0x2012(%rip), %rax      # 0x6044
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x3575
callq 0x5104
jmp 0x41b9
callq 0x54b8
jmp 0x41b9
xorl %edi, %edi
callq 0x3575
callq 0x2bef
jmp 0x41b9
xorl %edi, %edi
callq 0x3575
movl $0x1, 0x5cea(%rip)      # 0x9d64
jmp 0x41b9
xorl %edi, %edi
callq 0x3575
cmpl $0x1, 0x5cf3(%rip)      # 0x9d80
jne 0x41b9
movq 0x5cae(%rip), %rax      # 0x9d48
movq 0x5c9f(%rip), %rcx      # 0x9d40
movq %rcx, 0x10(%rax)
movups 0x5c84(%rip), %xmm0     # 0x9d30
movups %xmm0, (%rax)
andl $0x0, 0x5c9a(%rip)      # 0x9d50
jmp 0x41b9
xorl %edi, %edi
callq 0x3575
callq 0x369a
movl %eax, %ebx
movslq 0x7fe0(%rip), %r14      # 0xc0b0
leaq 0x7f79(%rip), %rax      # 0xc050
cmpb $0x2c, (%r14,%rax)
jne 0x40ec
xorl %edi, %edi
callq 0x3575
movl 0x7fc4(%rip), %r14d     # 0xc0b0
andl $0xfff, %ebx            # imm = 0xFFF
incl 0x92cc(%rip)            # 0xd3c4
testl %ebx, %ebx
jle 0x410c
decl %ebx
movl %r14d, 0x7fb3(%rip)     # 0xc0b8
callq 0x36d8
jmp 0x40f8
movl 0x8022(%rip), %eax      # 0xc134
movl %eax, 0x7fa0(%rip)      # 0xc0b8
decl 0x92a6(%rip)            # 0xd3c4
jmp 0x41a9
xorl %edi, %edi
callq 0x3575
callq 0x5012
movslq 0x7f7a(%rip), %rax      # 0xc0b0
leaq 0x7f13(%rip), %rcx      # 0xc050
movzbl (%rax,%rcx), %eax
cmpq $0x2f, %rax
ja 0x4164
movabsq $0x800000000601, %rcx   # imm = 0x800000000601
btq %rax, %rcx
jb 0x41a2
cmpq $0x20, %rax
jne 0x4164
xorl %edi, %edi
callq 0x3575
callq 0x369a
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, 0x7fd4(%rip)      # 0xc148
xorl %edi, %edi
callq 0x3575
movl 0x7fc7(%rip), %edx      # 0xc148
leaq 0x7ec8(%rip), %rdi      # 0xc050
pushq $0x1
popq %rcx
xorl %esi, %esi
callq 0x3ae0
movl $0x30000, %edi          # imm = 0x30000
orl 0x7fab(%rip), %edi      # 0xc148
callq 0x4f56
movb $0x0, 0x7f1f(%rip)      # 0xc0c8
xorl %ebx, %ebx
jmp 0x41b9
xorl %edi, %edi
callq 0x3575
callq 0x544b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq