// File: /workspace/github_c_makefile_star2_O3/radekh[P]palbart/palbart-2.5.c
// Function: getArgs
void getArgs( int argc, char *argv[] )
{
  int  len;
  int  ix, jx;

  /* Set the defaults                                                         */
  errorfile = NULL;
  infile = NULL;
  listfile = NULL;
  listsave = NULL;
  objectfile = NULL;
  objectsave = NULL;

  for( ix = 1; ix < argc; ix++ )
  {
    if( argv[ix][0] == '-' )
    {
      for( jx = 1; argv[ix][jx] != 0; jx++ )
      {
        switch( argv[ix][jx] )
        {
        case 'd':
          symtab_print = TRUE;
          break;

        case 'r':
          rim_mode = TRUE;
          break;

        case 'l':
          literals_on = TRUE;
          break;

        case 'p':
          print_permanent_symbols = TRUE;
          break;

        case 'x':
          xref = TRUE;
          break;

        case 'v':
          fprintf( stderr, "%s\n", release );
          fflush( stderr );
          exit( -1 );
          break;

        default:
          fprintf( stderr, "%s: unknown flag: %s\n", argv[0], argv[ix] );
        case 'h':
          fprintf( stderr, " -d -- dump symbol table\n" );
          fprintf( stderr, " -h -- show this help\n" );
          fprintf( stderr, " -l -- generate literals\n" );
          fprintf( stderr, " -r -- output rim format file\n" );
          fprintf( stderr, " -p -- output permanent symbols to file\n" );
          fprintf( stderr, " -v -- display version\n" );
          fprintf( stderr, " -x -- output cross reference to file\n" );
          fflush( stderr );
          exit( -1 );
        } /* end switch                                                       */
      } /* end for                                                            */
    }
    else
    {
      if( pathname != NULL )
      {
        fprintf( stderr, "%s: too many input files\n", argv[0] );
        exit( -1 );
      }
      pathname = &argv[ix][0];
    }
  } /* end for                                                                */

  if( pathname == NULL )
  {
    fprintf( stderr, "%s:  no input file specified\n", argv[0] );
    exit( -1 );
  }

  len = strlen( pathname );
  if( len > NAMELEN - 5 )
  {
    fprintf( stderr, "%s: pathname \"%s\" too long\n", argv[0], pathname );
    exit( -1 );
  }

  /* Now open the input file.                                                 */
  if(( infile = fopen( pathname, "r" )) == NULL )
  {
    fprintf( stderr, "%s: cannot open \"%s\"\n", argv[0], pathname );
    exit( -1 );
  }

  /* Now make the pathnames                                                   */
  /* Find last '.', if it exists.                                             */
  jx = len - 1;
  while( pathname[jx] != '.'  && pathname[jx] != '/'
      && pathname[jx] != '\\' && jx >= 0 )
  {
    jx--;
  }

  switch( pathname[jx] )
  {
  case '.':
    break;

  case '/':
  case '\\':
    jx = len;
    break;

  default:
    break;
  }

  /* Add the pathname extensions.                                             */
  strncpy( objectpathname, pathname, jx );
  objectpathname[jx] = '\0';
  strcat( objectpathname, rim_mode ? ".rim" : ".bin" );

  strncpy( listpathname, pathname, jx );
  listpathname[jx] = '\0';
  strcat( listpathname, ".lst" );

  strncpy( errorpathname, pathname, jx );
  errorpathname[jx] = '\0';
  strcat( errorpathname, ".err" );

  strncpy( permpathname, pathname, jx );
  permpathname[jx] = '\0';
  strcat( permpathname, ".prm" );

  /* Extract the filename from the path.                                      */
  if( isalpha( pathname[0] ) && pathname[1] == ':' && pathname[2] != '\\' )
  {
    pathname[1] = '\\';         /* MS-DOS style pathname                      */
  }

  jx = len - 1;
  while( pathname[jx] != '/' && pathname[jx] != '\\' && jx >= 0 )
  {
    jx--;
  }
  strcpy( filename, &pathname[jx + 1] );

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %eax, %eax
movq %rax, 0x897c(%rip)      # 0xb1f0
movq %rax, 0x89b5(%rip)      # 0xb230
movq %rax, 0x8ace(%rip)      # 0xb350
movq %rax, 0x8acf(%rip)      # 0xb358
movq %rax, 0x8a30(%rip)      # 0xb2c0
movq %rax, 0x8a31(%rip)      # 0xb2c8
movq 0x88c2(%rip), %r11      # 0xb160
cmpl $0x2, %edi
jl 0x2955
movl %edi, %eax
movl $0x1, %ecx
leaq 0x88a8(%rip), %rdx      # 0xb15d
leaq 0x4754(%rip), %rsi      # 0x7010
leaq 0x8897(%rip), %rdi      # 0xb15a
leaq 0x8891(%rip), %r8       # 0xb15b
leaq 0x888b(%rip), %r9       # 0xb15c
leaq 0x8886(%rip), %r10      # 0xb15e
movq (%rbx,%rcx,8), %r14
cmpb $0x2d, (%r14)
jne 0x2938
movb 0x1(%r14), %bpl
testb %bpl, %bpl
je 0x2933
leaq 0x2(%r14), %r15
movsbl %bpl, %r12d
addl $-0x64, %r12d
rorl %r12d
cmpl $0xa, %r12d
ja 0x2b29
movslq (%rsi,%r12,4), %r13
addq %rsi, %r13
movq %rdx, %r12
jmpq *%r13
movq %rdi, %r12
jmp 0x2923
movq %r8, %r12
jmp 0x2923
movq %r10, %r12
jmp 0x2923
movq %r9, %r12
movb $0x1, (%r12)
movb (%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x28ef
movq %r11, %r14
jmp 0x2948
testq %r11, %r11
jne 0x2b51
movq %r14, 0x8818(%rip)      # 0xb160
incq %rcx
movq %r14, %r11
cmpq %rax, %rcx
jne 0x28d8
jmp 0x2958
movq %r11, %r14
testq %r14, %r14
je 0x2b59
movq %r14, %rdi
callq 0x2090
movq %rax, %r15
cmpl $0x7c, %r15d
jge 0x2b61
leaq 0x484b(%rip), %rsi      # 0x71c8
movq %r14, %rdi
callq 0x2140
movq %rax, 0x88a4(%rip)      # 0xb230
testq %rax, %rax
je 0x2b6c
movslq %r15d, %r12
movq 0x87c1(%rip), %rbx      # 0xb160
movb -0x1(%rbx,%r12), %al
decq %r12
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x2e, %cl
jne 0x29b6
movl %r12d, %ecx
jmp 0x29da
movq %r12, %rdx
movl %r12d, %ecx
testq %rdx, %rdx
js 0x29da
cmpb $0x5c, %al
je 0x29da
decl %ecx
movb -0x1(%rbx,%rdx), %al
decq %rdx
movl %eax, %esi
andb $-0x2, %sil
cmpb $0x2e, %sil
jne 0x29bc
cmpb $0x5c, %al
je 0x29e6
movzbl %al, %eax
cmpl $0x2f, %eax
jne 0x29e9
movl %r15d, %ecx
movslq %ecx, %r14
leaq 0x884d(%rip), %r15      # 0xb240
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
xorl %ebp, %ebp
movb %bpl, (%r14,%r15)
cmpb %bpl, 0x874e(%rip)      # 0xb15c
leaq 0x4ce8(%rip), %rax      # 0x76fd
leaq 0x4cdc(%rip), %r13      # 0x76f8
cmoveq %rax, %r13
movq %r15, %rdi
callq 0x2090
movl (%r13), %ecx
movl %ecx, (%rax,%r15)
movb 0x4(%r13), %cl
movb %cl, 0x4(%rax,%r15)
leaq 0x8890(%rip), %r15      # 0xb2d0
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
movb %bpl, (%r14,%r15)
movq %r15, %rdi
callq 0x2090
movb %bpl, 0x4(%rax,%r15)
movl $0x74736c2e, (%rax,%r15) # imm = 0x74736C2E
leaq 0x8702(%rip), %r15      # 0xb170
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
movb %bpl, (%r14,%r15)
movq %r15, %rdi
callq 0x2090
movb %bpl, 0x4(%rax,%r15)
movl $0x7272652e, (%rax,%r15) # imm = 0x7272652E
leaq 0x88d4(%rip), %r15      # 0xb370
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
movb %bpl, (%r14,%r15)
movq %r15, %rdi
callq 0x2090
movb %bpl, 0x4(%rax,%r15)
movl $0x6d72702e, (%rax,%r15) # imm = 0x6D72702E
callq 0x2180
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x4, 0x1(%rax,%rcx,2)
je 0x2aed
cmpb $0x3a, 0x1(%rbx)
jne 0x2aed
cmpb $0x5c, 0x2(%rbx)
je 0x2aed
movb $0x5c, 0x1(%rbx)
movq 0x8673(%rip), %rbx      # 0xb160
movb (%rbx,%r12), %al
cmpb $0x2f, %al
je 0x2b08
testq %r12, %r12
js 0x2b08
cmpb $0x5c, %al
je 0x2b08
movb -0x1(%rbx,%r12), %al
decq %r12
jmp 0x2af1
leaq (%rbx,%r12), %rsi
incq %rsi
leaq 0x88da(%rip), %rdi      # 0xb3f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2060
movq 0x74c8(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x4a69(%rip), %rsi      # 0x75a6
movq %r14, %rcx
xorl %eax, %eax
callq 0x2110
callq 0x22ba
callq 0x228a
movq %rbx, %rdi
callq 0x2263
movq %rbx, %rdi
callq 0x23c8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x239e
movq %rbx, %rdi
callq 0x2370