// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro1/macro1.c
// Function: readLine
void readLine()
{
    BOOL    ffseen;
    WORD32  ix;
    WORD32  iy;
    char    inpline[LINELEN];

    /* XXX panic if nrepeats > 0 (if self-feeding, do the backup here?) */

    listLine();				/* List previous line if needed. */
    error_in_line = FALSE;		/* No error in line. */

    if(curmacro && *curmacro->mac_ptr == '\0') { /* end of macro? */
	struct macinv *mp;

	listed = TRUE;			/* Already listed. */

	/* Restore invoking line. */
	strcpy(line, curmacro->mac_line);
	cc = lexstartprev = curmacro->mac_cc; /* Restore cc. */
	maxcc = strlen( line );		/* Restore maxcc. */

	mp = curmacro->prev;		/* pop stack */
	free(curmacro);
	curmacro = mp;

	return;
    } /* end of macro */

    cc = 0;				/* Initialize column counter. */
    lexstartprev = 0;
    if( curmacro ) {			/* Inside macro? */
	char mc;

	maxcc = 0;
	do {

	    mc = *curmacro->mac_ptr++;	/* Next character. */
	    /* watch for overflow? how could it?? */
	    line[maxcc++] = mc;
	} while( !ISEND( mc ));		/* note: terminates on tab?! */
	line[maxcc] = '\0';
	listed = nomac_exp;
	return;
    } /* inside macro */

    lineno++;				/* Count lines read. */
    listed = FALSE;			/* Mark as not listed. */
 READ_LINE:
    if(( fgets( inpline, LINELEN - 1, infile )) == NULL ) {
	filix_curr++;			/* Advance to next file. */
	if( filix_curr < save_argc ) {	/* More files? */
	    fclose( infile );
	    if(( infile = fopen( save_argv[filix_curr], "r" )) == NULL ) {
		fprintf( stderr, "%s: cannot open \"%s\"\n", save_argv[0],
			save_argv[filix_curr] );
		exit( -1 );
	    }
	    list_title_set = FALSE;
	    goto READ_LINE;
	}
	else
	    end_of_input = TRUE;
    } /* fgets failed */

    ffseen = FALSE;
    for( ix = 0, iy = 0; inpline[ix] != '\0'; ix++ ) {
	if( inpline[ix] == '\f' ) {
	    if( !ffseen && list_title_set ) topOfForm( list_title, NULL );
	    ffseen = TRUE;
	}
	else
	    line[iy++] = inpline[ix];
    }
    line[iy] = '\0';

    /* If the line is terminated by CR-LF, remove, the CR. */
    if( line[iy - 2] == '\r' ) {
	iy--;
	line[iy - 1] = line[iy - 0];
	line[iy] = '\0';
    }
    maxcc = iy;				/* Save the current line length. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
callq 0x6350
movb $0x0, 0x8dc1(%rip)      # 0xe138
cmpq $0x0, 0x8d41(%rip)      # 0xe0c0
je 0x5408
movq 0x8d34(%rip), %rax      # 0xe0c0
movq 0x68(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x5408
movl $0x1, 0x8db6(%rip)      # 0xe158
movq 0x8d17(%rip), %rsi      # 0xe0c0
leaq 0x8ca0(%rip), %rdi      # 0xe050
callq 0x2070
movq 0x8d04(%rip), %rax      # 0xe0c0
movl 0x60(%rax), %eax
movl %eax, 0x8d7f(%rip)      # 0xe144
movl %eax, 0x8ced(%rip)      # 0xe0b8
leaq 0x8c7e(%rip), %rdi      # 0xe050
callq 0x2090
movl %eax, 0x8d57(%rip)      # 0xe134
movq 0x8cdc(%rip), %rax      # 0xe0c0
movq 0x78(%rax), %rax
movq %rax, -0x78(%rbp)
movq 0x8ccd(%rip), %rdi      # 0xe0c0
callq 0x2030
movq -0x78(%rbp), %rax
movq %rax, 0x8cbd(%rip)      # 0xe0c0
jmp 0x569b
movl $0x0, 0x8ca6(%rip)      # 0xe0b8
movl $0x0, 0x8d28(%rip)      # 0xe144
cmpq $0x0, 0x8c9c(%rip)      # 0xe0c0
je 0x54c6
movl $0x0, 0x8d00(%rip)      # 0xe134
movq 0x8c85(%rip), %rcx      # 0xe0c0
movq 0x68(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x68(%rcx)
movb (%rax), %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %dl
movl 0x8cdc(%rip), %eax      # 0xe134
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x8cd1(%rip)      # 0xe134
movslq %eax, %rcx
leaq 0x8be3(%rip), %rax      # 0xe050
movb %dl, (%rax,%rcx)
movsbl -0x79(%rbp), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x7a(%rbp)
je 0x5499
movsbl -0x79(%rbp), %ecx
movb $0x1, %al
cmpl $0xa, %ecx
movb %al, -0x7a(%rbp)
je 0x5499
movsbl -0x79(%rbp), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x7a(%rbp)
movb -0x7a(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5434
movslq 0x8c8b(%rip), %rcx      # 0xe134
leaq 0x8ba0(%rip), %rax      # 0xe050
movb $0x0, (%rax,%rcx)
movzbl 0x68a6(%rip), %eax      # 0xbd61
movl %eax, 0x8c97(%rip)      # 0xe158
jmp 0x569b
movl 0x8c90(%rip), %eax      # 0xe15c
addl $0x1, %eax
movl %eax, 0x8c87(%rip)      # 0xe15c
movl $0x0, 0x8c79(%rip)      # 0xe158
leaq -0x70(%rbp), %rdi
movq 0x69d6(%rip), %rdx      # 0xbec0
movl $0x5f, %esi
callq 0x20d0
cmpq $0x0, %rax
jne 0x55a9
movl 0x8c68(%rip), %eax      # 0xe16c
addl $0x1, %eax
movl %eax, 0x8c5f(%rip)      # 0xe16c
movl 0x8c59(%rip), %eax      # 0xe16c
cmpl 0x683b(%rip), %eax      # 0xbd54
jge 0x55a0
movq 0x699a(%rip), %rdi      # 0xbec0
callq 0x2080
movq 0x6826(%rip), %rax      # 0xbd58
movslq 0x8c33(%rip), %rcx      # 0xe16c
movq (%rax,%rcx,8), %rdi
leaq 0x2cec(%rip), %rsi      # 0x8230
callq 0x2150
movq %rax, 0x6970(%rip)      # 0xbec0
cmpq $0x0, %rax
jne 0x5594
movq 0x5a9b(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x67f1(%rip), %rax      # 0xbd58
movq (%rax), %rdx
movq 0x67e7(%rip), %rax      # 0xbd58
movslq 0x8bf4(%rip), %rcx      # 0xe16c
movq (%rax,%rcx,8), %rcx
leaq 0x3284(%rip), %rsi      # 0x8807
movb $0x0, %al
callq 0x2110
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
movb $0x0, 0x8b2d(%rip)      # 0xe0c8
jmp 0x54df
movb $0x1, 0x8b89(%rip)      # 0xe130
jmp 0x55a9
movb $0x0, -0x1(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movslq -0x8(%rbp), %rax
movsbl -0x70(%rbp,%rax), %eax
cmpl $0x0, %eax
je 0x562c
movslq -0x8(%rbp), %rax
movsbl -0x70(%rbp,%rax), %eax
cmpl $0xc, %eax
jne 0x55ff
cmpb $0x0, -0x1(%rbp)
jne 0x55f9
movzbl 0x8ae4(%rip), %eax      # 0xe0c8
cmpl $0x0, %eax
je 0x55f9
leaq 0x8ae0(%rip), %rdi      # 0xe0d0
xorl %eax, %eax
movl %eax, %esi
callq 0x6380
movb $0x1, -0x1(%rbp)
jmp 0x561f
movslq -0x8(%rbp), %rax
movb -0x70(%rbp,%rax), %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0x8a34(%rip), %rax      # 0xe050
movb %dl, (%rax,%rcx)
jmp 0x5621
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x55bb
movslq -0xc(%rbp), %rcx
leaq 0x8a19(%rip), %rax      # 0xe050
movb $0x0, (%rax,%rcx)
movl -0xc(%rbp), %eax
subl $0x2, %eax
movslq %eax, %rcx
leaq 0x8a05(%rip), %rax      # 0xe050
movsbl (%rax,%rcx), %eax
cmpl $0xd, %eax
jne 0x5692
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0x0, %eax
movslq %eax, %rcx
leaq 0x89e3(%rip), %rax      # 0xe050
movb (%rax,%rcx), %dl
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x89d0(%rip), %rax      # 0xe050
movb %dl, (%rax,%rcx)
movslq -0xc(%rbp), %rcx
leaq 0x89c2(%rip), %rax      # 0xe050
movb $0x0, (%rax,%rcx)
movl -0xc(%rbp), %eax
movl %eax, 0x8a99(%rip)      # 0xe134
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)