// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, 0x7b53(%rip)      # 0xa1e0
andq $0x0, 0x7b8b(%rip)      # 0xa220
andq $0x0, 0x7ca3(%rip)      # 0xa340
movq %rsi, %rbx
andq $0x0, 0x7ca0(%rip)      # 0xa348
andq $0x0, 0x7c00(%rip)      # 0xa2b0
andq $0x0, 0x7c00(%rip)      # 0xa2b8
movq 0x7a91(%rip), %r14      # 0xa150
movslq %edi, %rax
pushq $0x1
popq %rdx
leaq 0x7a81(%rip), %rsi      # 0xa14d
leaq 0x393d(%rip), %rdi      # 0x6010
leaq 0x7a70(%rip), %r8       # 0xa14a
leaq 0x7a6a(%rip), %r9       # 0xa14b
leaq 0x7a64(%rip), %r10      # 0xa14c
leaq 0x7a5f(%rip), %r11      # 0xa14e
cmpq %rax, %rdx
jge 0x275c
movq (%rbx,%rdx,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x2744
leaq 0x1(%rcx), %r15
movsbl (%r15), %r12d
testl %r12d, %r12d
je 0x2757
addl $-0x64, %r12d
rorl %r12d
cmpl $0xa, %r12d
ja 0x2913
movslq (%rdi,%r12,4), %r13
addq %rdi, %r13
movq %rsi, %r12
jmpq *%r13
movq %r8, %r12
jmp 0x273a
movq %r9, %r12
jmp 0x273a
movq %r11, %r12
jmp 0x273a
movq %r10, %r12
movb $0x1, (%r12)
incq %r15
jmp 0x2701
testq %r14, %r14
jne 0x2a03
movq %rcx, 0x79fc(%rip)      # 0xa150
movq %rcx, %r14
incq %rdx
jmp 0x26ef
testq %r14, %r14
je 0x2a20
movq %r14, %rdi
callq 0x2090
movq %rax, %r15
cmpl $0x7c, %r15d
jge 0x2a36
leaq 0x3a47(%rip), %rsi      # 0x61c8
movq %r14, %rdi
callq 0x2130
movq %rax, 0x7a90(%rip)      # 0xa220
testq %rax, %rax
je 0x2a4f
movq 0x79b0(%rip), %rbx      # 0xa150
leal -0x1(%r15), %eax
movslq %eax, %r12
movq %r12, %rax
movzbl (%rbx,%rax), %ecx
movl %ecx, %edx
andb $-0x2, %dl
cmpb $0x2e, %dl
je 0x27c7
testq %rax, %rax
js 0x27c7
cmpb $0x5c, %cl
je 0x27c7
decq %rax
jmp 0x27aa
cmpl $0x2f, %ecx
je 0x27d4
cmpl $0x5c, %ecx
je 0x27d4
movq %rax, %r15
movslq %r15d, %r14
leaq 0x7a52(%rip), %r15      # 0xa230
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
xorl %ebp, %ebp
movb %bpl, (%r14,%r15)
cmpb %bpl, 0x7953(%rip)      # 0xa14c
leaq 0x3efd(%rip), %rax      # 0x66fd
leaq 0x3ef1(%rip), %r13      # 0x66f8
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 0x7a95(%rip), %r15      # 0xa2c0
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 0x7907(%rip), %r15      # 0xa160
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 0x7ad9(%rip), %r15      # 0xa360
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 0x2170
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x4, 0x1(%rax,%rcx,2)
je 0x28d8
cmpb $0x3a, 0x1(%rbx)
jne 0x28d8
cmpb $0x5c, 0x2(%rbx)
je 0x28d8
movb $0x5c, 0x1(%rbx)
movq 0x7878(%rip), %rbx      # 0xa150
leaq (%r12,%rbx), %rcx
incq %rcx
movq %rcx, %rsi
movb -0x1(%rcx), %al
cmpb $0x2f, %al
je 0x28f9
testq %r12, %r12
js 0x28f9
decq %r12
leaq -0x1(%rsi), %rcx
cmpb $0x5c, %al
jne 0x28df
leaq 0x7ae0(%rip), %rdi      # 0xa3e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2060
movq 0x66de(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x3c7f(%rip), %rsi      # 0x65a6
xorl %eax, %eax
callq 0x2100
movq 0x66c3(%rip), %r15      # 0x8ff8
movq (%r15), %rcx
leaq 0x3c7d(%rip), %rdi      # 0x65bc
pushq $0x19
popq %r14
pushq $0x1
popq %rbx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3c7b(%rip), %rdi      # 0x65d6
pushq $0x16
popq %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3c7d(%rip), %rdi      # 0x65ed
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3c82(%rip), %rdi      # 0x6607
pushq $0x1e
popq %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3c8c(%rip), %rdi      # 0x6626
pushq $0x28
popq %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3ca0(%rip), %rdi      # 0x664f
pushq $0x17
popq %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rcx
leaq 0x3ca3(%rip), %rdi      # 0x6667
pushq $0x26
popq %rsi
movq %rbx, %rdx
callq 0x2160
movq (%r15), %rdi
callq 0x2120
pushq $-0x1
popq %rdi
callq 0x2150
movq 0x6612(%rip), %rbx      # 0x8ff8
movq (%rbx), %rdi
movq 0x66e0(%rip), %rdx      # 0x90d0
leaq 0x3bc1(%rip), %rsi      # 0x65b8
xorl %eax, %eax
callq 0x2100
movq (%rbx), %rdi
jmp 0x29d2
movq 0x65ee(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x3c77(%rip), %rsi      # 0x668e
xorl %eax, %eax
callq 0x2100
jmp 0x29d7
movq 0x65d1(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x3c74(%rip), %rsi      # 0x66a8
jmp 0x2a17
movq 0x65bb(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x3c7c(%rip), %rsi      # 0x66c6
movq %r14, %rcx
jmp 0x2a6a
movq 0x65a2(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq (%rbx), %rdx
movq 0x76ed(%rip), %rcx      # 0xa150
leaq 0x3c78(%rip), %rsi      # 0x66e2
xorl %eax, %eax
callq 0x2100
jmp 0x29d7