// File: /workspace/github_c_makefile_star2_O3/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 0x4687
leaq 0x1b5f(%rip), %rax      # 0x6044
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x3911
callq 0x5772
jmp 0x4687
callq 0x5b64
jmp 0x4687
xorl %edi, %edi
callq 0x3911
callq 0x2e26
jmp 0x4687
xorl %edi, %edi
callq 0x3911
movl $0x1, 0x5837(%rip)      # 0x9d64
jmp 0x4687
xorl %edi, %edi
callq 0x3911
cmpl $0x1, 0x5840(%rip)      # 0x9d80
jne 0x4687
movq 0x57fb(%rip), %rax      # 0x9d48
movq 0x57ec(%rip), %rcx      # 0x9d40
movq %rcx, 0x10(%rax)
movups 0x57d1(%rip), %xmm0     # 0x9d30
movups %xmm0, (%rax)
movl $0x0, 0x57e4(%rip)      # 0x9d50
jmp 0x4687
xorl %edi, %edi
callq 0x3911
callq 0x3a39
movl %eax, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
movslq 0x7b24(%rip), %r14      # 0xc0b0
leaq 0x7abd(%rip), %rax      # 0xc050
cmpb $0x2c, (%r14,%rax)
jne 0x45a8
xorl %edi, %edi
callq 0x3911
movl 0x7b08(%rip), %r14d     # 0xc0b0
movl 0x8e16(%rip), %eax      # 0xd3c4
leal 0x1(%rax), %ecx
movl %ecx, 0x8e0d(%rip)      # 0xd3c4
testl %ebx, %ebx
je 0x45d8
incl %ebx
movl %r14d, 0x7af4(%rip)     # 0xc0b8
callq 0x3a77
decl %ebx
cmpl $0x1, %ebx
ja 0x45bd
movl 0x8dee(%rip), %eax      # 0xd3c4
decl %eax
movl 0x7b56(%rip), %ecx      # 0xc134
movl %ecx, 0x7ad4(%rip)      # 0xc0b8
movl %eax, 0x8dda(%rip)      # 0xd3c4
jmp 0x4677
xorl %edi, %edi
callq 0x3911
callq 0x5665
movslq 0x7aae(%rip), %rax      # 0xc0b0
leaq 0x7a47(%rip), %rcx      # 0xc050
movzbl (%rax,%rcx), %eax
cmpq $0x2f, %rax
ja 0x4630
movabsq $0x800000000601, %rcx   # imm = 0x800000000601
btq %rax, %rcx
jb 0x4670
cmpq $0x20, %rax
jne 0x4630
xorl %edi, %edi
callq 0x3911
callq 0x3a39
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, 0x7b08(%rip)      # 0xc148
xorl %edi, %edi
callq 0x3911
movl 0x7afb(%rip), %edx      # 0xc148
leaq 0x79fc(%rip), %rdi      # 0xc050
xorl %esi, %esi
movl $0x1, %ecx
callq 0x3f62
movl $0x30000, %edi          # imm = 0x30000
orl 0x7add(%rip), %edi      # 0xc148
callq 0x5578
movb $0x0, 0x7a51(%rip)      # 0xc0c8
xorl %ebx, %ebx
jmp 0x4687
xorl %edi, %edi
callq 0x3911
callq 0x5af3
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq