// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro1/macro1.c
// Function: onePass
void onePass() {
    int     ix;

    clc = 4;				/* Default location is 4 */
    start_addr = 0;			/* No starting address. */
    nconst = 0;				/* No constant blocks seen */
    nvars = 0;				/* No variables seen */

    while (curmacro) {			/* pop macro stack */
	struct macinv *mp;

	mp = curmacro->prev;
	free(curmacro);
	curmacro = mp;
    }

    for( ix = 0; ix < mac_count; ix++) {
	if (mac_defs[ix])
	    free( mac_defs[ix] );
	mac_defs[ix] = NULL;
    }
    mac_count = 0;			/* No macros defined. */

    listed = TRUE;
    lineno = 0;
    list_pageno = 0;
    list_lineno = 0;
    list_title_set = FALSE;
    page_lineno = LIST_LINES_PER_PAGE;	/* Force top of page for new titles. */
    radix = 8;				/* Initial radix is octal (base 8). */

    /* Now open the first input file. */
    end_of_input = FALSE;
    filix_curr = filix_start;		/* Initialize pointer to input files. */
    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 );
    }

    for (;;) {
	readLine();
	if (end_of_input) {
	    eob();
	    fclose( infile );
	    return;
	}
	processLine();
    } /* forever */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x4, 0xb2d2(%rip)      # 0xe0b4
movl $0x0, 0xb35c(%rip)      # 0xe148
movl $0x0, 0xb356(%rip)      # 0xe14c
movl $0x0, 0xb350(%rip)      # 0xe150
cmpq $0x0, 0xb2b8(%rip)      # 0xe0c0
je 0x2e32
movq 0xb2af(%rip), %rax      # 0xe0c0
movq 0x78(%rax), %rax
movq %rax, -0x10(%rbp)
movq 0xb2a0(%rip), %rdi      # 0xe0c0
callq 0x2030
movq -0x10(%rbp), %rax
movq %rax, 0xb290(%rip)      # 0xe0c0
jmp 0x2e00
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0xb312(%rip), %eax      # 0xe154
jge 0x2e88
movslq -0x4(%rbp), %rcx
leaq 0x9201(%rip), %rax      # 0xc050
cmpq $0x0, (%rax,%rcx,8)
je 0x2e6a
movslq -0x4(%rbp), %rcx
leaq 0x91ef(%rip), %rax      # 0xc050
movq (%rax,%rcx,8), %rdi
callq 0x2030
movslq -0x4(%rbp), %rcx
leaq 0x91db(%rip), %rax      # 0xc050
movq $0x0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2e39
movl $0x0, 0xb2c2(%rip)      # 0xe154
movl $0x1, 0xb2bc(%rip)      # 0xe158
movl $0x0, 0xb2b6(%rip)      # 0xe15c
movl $0x0, 0xb2b0(%rip)      # 0xe160
movl $0x0, 0xb2aa(%rip)      # 0xe164
movb $0x0, 0xb207(%rip)      # 0xe0c8
movl $0x3c, 0xb29d(%rip)     # 0xe168
movl $0x8, 0xb26b(%rip)      # 0xe140
movb $0x0, 0xb254(%rip)      # 0xe130
movl 0x8fe6(%rip), %eax      # 0xbec8
movl %eax, 0xb284(%rip)      # 0xe16c
movq 0x8e69(%rip), %rax      # 0xbd58
movslq 0xb276(%rip), %rcx      # 0xe16c
movq (%rax,%rcx,8), %rdi
leaq 0x532f(%rip), %rsi      # 0x8230
callq 0x2150
movq %rax, 0x8fb3(%rip)      # 0xbec0
cmpq $0x0, %rax
jne 0x2f51
movq 0x80de(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq 0x8e34(%rip), %rax      # 0xbd58
movq (%rax), %rdx
movq 0x8e2a(%rip), %rax      # 0xbd58
movslq 0xb237(%rip), %rcx      # 0xe16c
movq (%rax,%rcx,8), %rcx
leaq 0x58c7(%rip), %rsi      # 0x8807
movb $0x0, %al
callq 0x2110
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2190
jmp 0x2f53
callq 0x5360
cmpb $0x0, 0xb1d1(%rip)      # 0xe130
je 0x2f78
callq 0x56b0
movq 0x8f53(%rip), %rdi      # 0xbec0
callq 0x2080
addq $0x10, %rsp
popq %rbp
retq
callq 0x4040
jmp 0x2f53
nop