// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro1/macro1.c
// Function: nextfiodec
int
nextfiodec(int *ccase, int delim)
{
    unsigned char c;

    for (;;) {
	if (cc >= maxcc) {
	    if (delim == -1)
		return -1;

	    /* XXX MUST NOT BE IN A REPEAT!! */
	    readLine();			/* danger will robinson! */
	    if (end_of_input)
		return -1;
	}
	c = line[cc];
	switch (c) {
	case '\n':
	    c = '\r';
	    break;
	case '\r':
	    continue;
	}
	break;
    }

    if (delim != -1 && c == delim) {
	if (*ccase == LC) {
	    cc++;			/* eat delim */
	    return -1;
	}
	*ccase = LC;
	return CONCISE_LC;		/* shift down first */
    }

    if (c > 0177) {			/* non-ascii */
	errorMessage( &illegal_character, cc );
	c = 0;				/* space?! */
    }

    c = ascii_to_fiodec[c&0177];
    if (c == BAD) {
	errorMessage( &illegal_character, cc );
	c = 0;				/* space?! */
    }

    if (!(c & *ccase)) {		/* char not in current case? */
	*ccase ^= BC;			/* switch case */
	if (*ccase == LC)
	    return CONCISE_LC;		/* shift down */
	else
	    return CONCISE_UC;		/* shift up */
    }
    cc++;
    return c & CHARBITS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl 0x8803(%rip), %eax      # 0xe0b8
cmpl 0x8879(%rip), %eax      # 0xe134
jl 0x58eb
cmpl $-0x1, -0x14(%rbp)
jne 0x58cf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5a16
callq 0x5360
cmpb $0x0, 0x8855(%rip)      # 0xe130
je 0x58e9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5a16
jmp 0x58eb
movslq 0x87c6(%rip), %rax      # 0xe0b8
leaq 0x8757(%rip), %rcx      # 0xe050
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0xa, %eax
je 0x5917
jmp 0x590d
movl -0x1c(%rbp), %eax
subl $0xd, %eax
je 0x591d
jmp 0x591f
movb $0xd, -0x15(%rbp)
jmp 0x591f
jmp 0x58af
jmp 0x5921
cmpl $-0x1, -0x14(%rbp)
je 0x596d
movzbl -0x15(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x596d
movq -0x10(%rbp), %rax
cmpl $0x80, (%rax)
jne 0x5957
movl 0x8776(%rip), %eax      # 0xe0b8
addl $0x1, %eax
movl %eax, 0x876d(%rip)      # 0xe0b8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5a16
movq -0x10(%rbp), %rax
movl $0x80, (%rax)
movl $0x3a, -0x4(%rbp)
jmp 0x5a16
movzbl -0x15(%rbp), %eax
cmpl $0x7f, %eax
jle 0x598c
movl 0x873c(%rip), %esi      # 0xe0b8
leaq 0x610d(%rip), %rdi      # 0xba90
callq 0x56c0
movb $0x0, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
andl $0x7f, %eax
movslq %eax, %rcx
leaq 0x62c3(%rip), %rax      # 0xbc60
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
cmpl $0xc, %eax
jne 0x59c2
movl 0x8706(%rip), %esi      # 0xe0b8
leaq 0x60d7(%rip), %rdi      # 0xba90
callq 0x56c0
movb $0x0, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
movq -0x10(%rbp), %rcx
andl (%rcx), %eax
cmpl $0x0, %eax
jne 0x59fd
movq -0x10(%rbp), %rax
movl (%rax), %ecx
xorl $0xc0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x80, (%rax)
jne 0x59f4
movl $0x3a, -0x4(%rbp)
jmp 0x5a16
movl $0x3c, -0x4(%rbp)
jmp 0x5a16
movl 0x86b5(%rip), %eax      # 0xe0b8
addl $0x1, %eax
movl %eax, 0x86ac(%rip)      # 0xe0b8
movzbl -0x15(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop