// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0x5005
movq -0x18(%rbp), %rax
leaq 0x3286(%rip), %rcx      # 0x80b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorl %edi, %edi
callq 0x3e10
callq 0x3050
jmp 0x5007
xorl %edi, %edi
callq 0x3e10
callq 0x6f80
jmp 0x5007
xorl %edi, %edi
callq 0x3e10
callq 0x6920
movb $0x0, -0x1(%rbp)
jmp 0x500b
xorl %edi, %edi
callq 0x3e10
callq 0x3ff0
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, -0xc(%rbp)
movslq 0x922b(%rip), %rcx      # 0xe0b0
leaq 0x91c4(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x4e9c
xorl %edi, %edi
callq 0x3e10
movl 0xa522(%rip), %eax      # 0xf3c4
addl $0x1, %eax
movl %eax, 0xa519(%rip)      # 0xf3c4
movl 0x91ff(%rip), %eax      # 0xe0b0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
jle 0x4ed4
movl -0x10(%rbp), %eax
movl %eax, 0x91eb(%rip)      # 0xe0b8
callq 0x4040
jmp 0x4eb4
movl 0x925a(%rip), %eax      # 0xe134
movl %eax, 0x91d8(%rip)      # 0xe0b8
movl 0xa4de(%rip), %eax      # 0xf3c4
addl $-0x1, %eax
movl %eax, 0xa4d5(%rip)      # 0xf3c4
movb $0x0, -0x1(%rbp)
jmp 0x500b
xorl %edi, %edi
callq 0x3e10
callq 0x6770
movslq 0x91a5(%rip), %rcx      # 0xe0b0
leaq 0x913e(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
je 0x4fc7
movslq 0x918a(%rip), %rcx      # 0xe0b0
leaq 0x9123(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x4fc7
movslq 0x916f(%rip), %rcx      # 0xe0b0
leaq 0x9108(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x4fc7
movslq 0x9158(%rip), %rcx      # 0xe0b0
leaq 0x90f1(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
je 0x4fc7
movslq 0x9141(%rip), %rcx      # 0xe0b0
leaq 0x90da(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x4f86
xorl %edi, %edi
callq 0x3e10
callq 0x3ff0
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, 0x91b2(%rip)      # 0xe148
xorl %edi, %edi
callq 0x3e10
movl 0x91a5(%rip), %edx      # 0xe148
leaq 0x90a6(%rip), %rdi      # 0xe050
xorl %esi, %esi
movl $0x1, %ecx
callq 0x4650
movl 0x918c(%rip), %edi      # 0xe148
orl $0x30000, %edi          # imm = 0x30000
callq 0x6660
movb $0x0, 0x90fa(%rip)      # 0xe0c8
movb $0x0, -0x1(%rbp)
jmp 0x500b
callq 0x7000
jmp 0x5007
xorl %edi, %edi
callq 0x3e10
movl $0x1, 0x6d78(%rip)      # 0xbd64
jmp 0x5007
xorl %edi, %edi
callq 0x3e10
cmpl $0x1, 0x6d84(%rip)      # 0xbd80
jne 0x5003
callq 0x22c0
jmp 0x5007
jmp 0x5007
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)