// File: /workspace/github_c_makefile_star2_O0/radekh[P]palbart/palbart-2.5.c
// Function: main
int main( int argc, char *argv[] )
{
  int     ix;
  int     space;

  /* Set the default values for global symbols.                               */
  binary_data_output = FALSE;
  fltg_input = FALSE;
  literals_on = FALSE;
  print_permanent_symbols = FALSE;
  rim_mode = FALSE;
  symtab_print = FALSE;
  xref = FALSE;
  pathname = NULL;

  /* Get the options and pathnames                                            */
  getArgs( argc, argv );

  /* Setup the error file in case symbol table overflows while installing the */
  /* permanent symbols.                                                       */
  errorfile = fopen( errorpathname, "w" );
  errors = 0;
  save_error_count = 0;
  pass = 0;             /* This is required for symbol table initialization.  */
  symtab = (SYM_T *) malloc( sizeof( SYM_T ) * SYMBOL_TABLE_SIZE );

  if( symtab == NULL )
  {
    fprintf( stderr, "Could not allocate memory for symbol table.\n");
    exit( -1 );
  }

  /* Place end marker in symbol table.                                        */
  symtab[0] = sym_undefined;
  symbol_top = 0;
  number_of_fixed_symbols = symbol_top;
  fixed_symbols = &symtab[symbol_top - 1];

  /* Enter the pseudo-ops into the symbol table                               */
  for( ix = 0; ix < DIM( pseudo ); ix++ )
  {
    defineSymbol( pseudo[ix].name, pseudo[ix].val, pseudo[ix].type, 0 );
  }

  /* Enter the predefined symbols into the table.                             */
  /* Also make them part of the permanent symbol table.                       */
  for( ix = 0; ix < DIM( permanent_symbols ); ix++ )
  {
    defineSymbol( permanent_symbols[ix].name,
                  permanent_symbols[ix].val,
                  permanent_symbols[ix].type | DEFFIX , 0 );
  }

  number_of_fixed_symbols = symbol_top;
  fixed_symbols = &symtab[symbol_top - 1];

  /* Do pass one of the assembly                                              */
  checksum = 0;
  pass = 1;
  page_lineno = LIST_LINES_PER_PAGE;
  onePass();
  errors_pass_1 = errors;

  /* Set up for pass two                                                      */
  rewind( infile );
  errorfile = fopen( errorpathname, "w" );
  objectfile = fopen( objectpathname, "wb" );
  objectsave = objectfile;

  listfile = fopen( listpathname, "w" );
  listsave = NULL;

  punchLeader( 0 );
  checksum = 0;

  /* Do pass two of the assembly                                              */
  errors = 0;
  save_error_count = 0;
  page_lineno = LIST_LINES_PER_PAGE;

  if( xref )
  {
    /* Get the amount of space that will be required for the concordance.     */
    for( space = 0, ix = 0; ix < symbol_top; ix++ )
    {
      symtab[ix].xref_index = space;    /* Index into concordance table.      */
      space += symtab[ix].xref_count + 1;
      symtab[ix].xref_count = 0;        /* Clear the count for pass 2.        */

    }
    /* Allocate the necessary space.                                          */
    xreftab = (WORD16 *) malloc( sizeof( WORD16 ) * space );

    /* Clear the cross reference space.                                       */
    for( ix = 0; ix < space; ix++ )
    {
      xreftab[ix] = 0;
    }
  }
  pass = 2;
  onePass();

  /* Undo effects of NOPUNCH for any following checksum                       */
  objectfile = objectsave;
  punchChecksum();

  /* Works great for trailer.                                                 */
  punchLeader( 1 );

  /* undo effects of XLIST for any following output to listing file.          */
  if( listfile == NULL )
  {
    listfile = listsave;
  }

  /* Display value of error counter.                                          */
  if( errors == 0 )
  {
    fprintf( listfile, "\n      %s %s %s\n", s_no, s_detected, s_errors );
  }
  else
  {
    fprintf( errorfile, "\n      %d %s %s\n", errors, s_detected,
                                        ( errors == 1 ? s_error : s_errors ));
    fprintf( listfile, "\n      %d %s %s\n", errors, s_detected,
                                        ( errors == 1 ? s_error : s_errors ));
    fprintf( stderr,   "      %d %s %s\n", errors, s_detected,
                                        ( errors == 1 ? s_error : s_errors ));
  }

  if( symtab_print )
  {
    printSymbolTable();
  }

  if( print_permanent_symbols )
  {
    printPermanentSymbolTable();
  }

  if( xref )
  {
    printCrossReference();
  }

  fclose( objectfile );
  fclose( listfile );
  fclose( errorfile );
  if( errors == 0 && errors_pass_1 == 0 )
  {
    remove( errorpathname );
  }

  return( errors != 0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, 0x9f1b(%rip)      # 0xb1b8
movb $0x0, 0x9f15(%rip)      # 0xb1b9
movb $0x0, 0x9f0f(%rip)      # 0xb1ba
movb $0x0, 0x9f09(%rip)      # 0xb1bb
movb $0x0, 0x9f03(%rip)      # 0xb1bc
movb $0x0, 0x9efd(%rip)      # 0xb1bd
movb $0x0, 0x9ef7(%rip)      # 0xb1be
movq $0x0, 0x9eee(%rip) # 0xb1c0
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x1800
leaq 0x9eeb(%rip), %rdi      # 0xb1d0
leaq 0x6128(%rip), %rsi      # 0x7414
callq 0x1130
movq %rax, 0x9f58(%rip)      # 0xb250
movl $0x0, 0x9f56(%rip)      # 0xb258
movl $0x0, 0x9f50(%rip)      # 0xb25c
movl $0x0, 0x9f4a(%rip)      # 0xb260
movl $0x6000, %edi           # imm = 0x6000
callq 0x1110
movq %rax, 0x9f41(%rip)      # 0xb268
cmpq $0x0, 0x9f39(%rip)      # 0xb268
jne 0x1353
movq 0x8cc0(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x6282(%rip), %rsi      # 0x75c4
movb $0x0, %al
callq 0x1100
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1160
movq 0x9f0e(%rip), %rax      # 0xb268
movq 0x9e3f(%rip), %rcx      # 0xb1a0
movq %rcx, (%rax)
movq 0x9e3d(%rip), %rcx      # 0xb1a8
movq %rcx, 0x8(%rax)
movq 0x9e3a(%rip), %rcx      # 0xb1b0
movq %rcx, 0x10(%rax)
movl $0x0, 0x9eec(%rip)      # 0xb270
movl 0x9ee6(%rip), %eax      # 0xb270
movl %eax, 0x9ee4(%rip)      # 0xb274
movq 0x9ed1(%rip), %rax      # 0xb268
movl 0x9ed3(%rip), %ecx      # 0xb270
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x9ec7(%rip)      # 0xb278
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
cmpq $0x1a, %rax
jae 0x1417
movslq -0x14(%rbp), %rax
leaq 0x8d13(%rip), %rdi      # 0xa0e0
imulq $0x18, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0x14(%rbp), %rcx
leaq 0x8cfd(%rip), %rax      # 0xa0e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movw 0xc(%rax), %ax
movslq -0x14(%rbp), %rdx
leaq 0x8ce7(%rip), %rcx      # 0xa0e0
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %edx
xorl %ecx, %ecx
movswl %ax, %esi
callq 0x1de0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13b8
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
cmpq $0x7c, %rax
jae 0x1480
movslq -0x14(%rbp), %rax
leaq 0x8f1d(%rip), %rdi      # 0xa350
imulq $0x18, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
movslq -0x14(%rbp), %rcx
leaq 0x8f07(%rip), %rax      # 0xa350
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movw 0xc(%rax), %ax
movslq -0x14(%rbp), %rdx
leaq 0x8ef1(%rip), %rcx      # 0xa350
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %edx
orl $0x3, %edx
xorl %ecx, %ecx
movswl %ax, %esi
callq 0x1de0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x141e
movl 0x9dea(%rip), %eax      # 0xb270
movl %eax, 0x9de8(%rip)      # 0xb274
movq 0x9dd5(%rip), %rax      # 0xb268
movl 0x9dd7(%rip), %ecx      # 0xb270
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x9dcb(%rip)      # 0xb278
movw $0x0, 0x9dca(%rip)      # 0xb280
movl $0x1, 0x9da0(%rip)      # 0xb260
movl $0x37, 0x9dba(%rip)     # 0xb284
callq 0x1f70
movl 0x9d83(%rip), %eax      # 0xb258
movl %eax, 0x9dad(%rip)      # 0xb288
movq 0x9dae(%rip), %rdi      # 0xb290
callq 0x10a0
leaq 0x9ce2(%rip), %rdi      # 0xb1d0
leaq 0x5f1f(%rip), %rsi      # 0x7414
callq 0x1130
movq %rax, 0x9d4f(%rip)      # 0xb250
leaq 0x9d98(%rip), %rdi      # 0xb2a0
leaq 0x60e2(%rip), %rsi      # 0x75f1
callq 0x1130
movq %rax, 0x9e05(%rip)      # 0xb320
movq 0x9dfe(%rip), %rax      # 0xb320
movq %rax, 0x9dff(%rip)      # 0xb328
leaq 0x9e00(%rip), %rdi      # 0xb330
leaq 0x5edd(%rip), %rsi      # 0x7414
callq 0x1130
movq %rax, 0x9e6d(%rip)      # 0xb3b0
movq $0x0, 0x9e6a(%rip) # 0xb3b8
xorl %edi, %edi
callq 0x2410
movw $0x0, 0x9d22(%rip)      # 0xb280
movl $0x0, 0x9cf0(%rip)      # 0xb258
movl $0x0, 0x9cea(%rip)      # 0xb25c
movl $0x37, 0x9d08(%rip)     # 0xb284
cmpb $0x0, 0x9c3b(%rip)      # 0xb1be
je 0x163c
movl $0x0, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x9cd0(%rip), %eax      # 0xb270
jge 0x15fc
movl -0x18(%rbp), %ecx
movq 0x9cbc(%rip), %rax      # 0xb268
movslq -0x14(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x9ca7(%rip), %rax      # 0xb268
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
addl $0x1, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq 0x9c89(%rip), %rax      # 0xb268
movslq -0x14(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1597
movslq -0x18(%rbp), %rdi
shlq %rdi
callq 0x1110
movq %rax, 0x9db1(%rip)      # 0xb3c0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x163a
movq 0x9d9b(%rip), %rax      # 0xb3c0
movslq -0x14(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1616
jmp 0x163c
movl $0x2, 0x9c1a(%rip)      # 0xb260
callq 0x1f70
movq 0x9cd6(%rip), %rax      # 0xb328
movq %rax, 0x9cc7(%rip)      # 0xb320
callq 0x2480
movl $0x1, %edi
callq 0x2410
cmpq $0x0, 0x9d40(%rip)      # 0xb3b0
jne 0x1680
movq 0x9d3f(%rip), %rax      # 0xb3b8
movq %rax, 0x9d30(%rip)      # 0xb3b0
cmpl $0x0, 0x9bd1(%rip)      # 0xb258
jne 0x16b8
movq 0x9d20(%rip), %rdi      # 0xb3b0
leaq 0x5f5d(%rip), %rsi      # 0x75f4
leaq 0x9868(%rip), %rdx      # 0xaf06
leaq 0x984b(%rip), %rcx      # 0xaef0
leaq 0x9853(%rip), %r8       # 0xaeff
movb $0x0, %al
callq 0x1100
jmp 0x1772
movq 0x9b91(%rip), %rdi      # 0xb250
movl 0x9b93(%rip), %edx      # 0xb258
movl 0x9b8d(%rip), %ecx      # 0xb258
leaq 0x982d(%rip), %r8       # 0xaeff
leaq 0x9820(%rip), %rax      # 0xaef9
cmpl $0x1, %ecx
cmoveq %rax, %r8
leaq 0x5f1e(%rip), %rsi      # 0x7605
leaq 0x9802(%rip), %rcx      # 0xaef0
movb $0x0, %al
callq 0x1100
movq 0x9cb4(%rip), %rdi      # 0xb3b0
movl 0x9b56(%rip), %edx      # 0xb258
movl 0x9b50(%rip), %ecx      # 0xb258
leaq 0x97f0(%rip), %r8       # 0xaeff
leaq 0x97e3(%rip), %rax      # 0xaef9
cmpl $0x1, %ecx
cmoveq %rax, %r8
leaq 0x5ee1(%rip), %rsi      # 0x7605
leaq 0x97c5(%rip), %rcx      # 0xaef0
movb $0x0, %al
callq 0x1100
movq 0x88bf(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movl 0x9b16(%rip), %edx      # 0xb258
movl 0x9b10(%rip), %ecx      # 0xb258
leaq 0x97b0(%rip), %r8       # 0xaeff
leaq 0x97a3(%rip), %rax      # 0xaef9
cmpl $0x1, %ecx
cmoveq %rax, %r8
leaq 0x5ea2(%rip), %rsi      # 0x7606
leaq 0x9785(%rip), %rcx      # 0xaef0
movb $0x0, %al
callq 0x1100
cmpb $0x0, 0x9a44(%rip)      # 0xb1bd
je 0x1780
callq 0x24c0
cmpb $0x0, 0x9a34(%rip)      # 0xb1bb
je 0x178e
callq 0x26f0
cmpb $0x0, 0x9a29(%rip)      # 0xb1be
je 0x179c
callq 0x28c0
movq 0x9b7d(%rip), %rdi      # 0xb320
callq 0x1080
movq 0x9c01(%rip), %rdi      # 0xb3b0
callq 0x1080
movq 0x9a95(%rip), %rdi      # 0xb250
callq 0x1080
cmpl $0x0, 0x9a91(%rip)      # 0xb258
jne 0x17de
cmpl $0x0, 0x9ab8(%rip)      # 0xb288
jne 0x17de
leaq 0x99f7(%rip), %rdi      # 0xb1d0
callq 0x1040
cmpl $0x0, 0x9a73(%rip)      # 0xb258
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)