// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x2, %edi
jl 0x2961
movq 0x88b9(%rip), %r14      # 0xb160
movl %edi, %eax
movl $0x1, %edx
leaq 0x88a8(%rip), %rsi      # 0xb15d
leaq 0x4754(%rip), %rdi      # 0x7010
leaq 0x8897(%rip), %r8       # 0xb15a
leaq 0x8891(%rip), %r9       # 0xb15b
leaq 0x888b(%rip), %r10      # 0xb15c
leaq 0x8886(%rip), %r11      # 0xb15e
movq (%rbx,%rdx,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x2942
movq (%rbx,%rdx,8), %rcx
movb 0x1(%rcx), %bpl
testb %bpl, %bpl
je 0x293d
movl $0x2, %r15d
movsbl %bpl, %r12d
addl $-0x64, %r12d
rorl %r12d
cmpl $0xa, %r12d
ja 0x2b3b
movslq (%rdi,%r12,4), %r13
addq %rdi, %r13
movq %rsi, %r12
jmpq *%r13
movq %r8, %r12
jmp 0x2928
movq %r9, %r12
jmp 0x2928
movq %r11, %r12
jmp 0x2928
movq %r10, %r12
movb $0x1, (%r12)
movq (%rbx,%rdx,8), %rcx
movb (%rcx,%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x28f4
movq %r14, %rcx
jmp 0x2952
testq %r14, %r14
jne 0x2b60
movq %rcx, 0x880e(%rip)      # 0xb160
incq %rdx
movq %rcx, %r14
cmpq %rax, %rdx
jne 0x28d8
movq 0x87f8(%rip), %r15      # 0xb160
testq %r15, %r15
je 0x2b68
movq %r15, %rdi
callq 0x2090
movq %rax, %r14
cmpl $0x7c, %r14d
jge 0x2b70
leaq 0x483b(%rip), %rsi      # 0x71c8
movq %r15, %rdi
callq 0x2140
movq %rax, 0x8894(%rip)      # 0xb230
testq %rax, %rax
je 0x2b7b
movslq %r14d, %r12
movq 0x87b1(%rip), %rbx      # 0xb160
movb -0x1(%rbx,%r12), %al
decq %r12
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x2e, %cl
jne 0x29c6
movl %r12d, %ecx
jmp 0x29ea
movslq %r12d, %rdx
movl %r12d, %ecx
testq %rdx, %rdx
js 0x29ea
cmpb $0x5c, %al
je 0x29ea
decl %ecx
movb -0x1(%rbx,%rdx), %al
decq %rdx
movl %eax, %esi
andb $-0x2, %sil
cmpb $0x2e, %sil
jne 0x29cc
cmpb $0x5c, %al
je 0x29f6
movzbl %al, %eax
cmpl $0x2f, %eax
jne 0x29f9
movl %r14d, %ecx
movslq %ecx, %r14
leaq 0x883d(%rip), %r15      # 0xb240
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2040
xorl %ebp, %ebp
movb %bpl, (%r14,%r15)
cmpb %bpl, 0x873e(%rip)      # 0xb15c
leaq 0x4cd8(%rip), %rax      # 0x76fd
leaq 0x4ccc(%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 0x8880(%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 0x86f2(%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 0x88c4(%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 0x2af6
cmpb $0x3a, 0x1(%rbx)
jne 0x2af6
cmpb $0x5c, 0x2(%rbx)
je 0x2af6
movb $0x5c, 0x1(%rbx)
movq 0x8663(%rip), %rax      # 0xb160
movb (%rax,%r12), %cl
cmpb $0x2f, %cl
je 0x2b1a
testq %r12, %r12
js 0x2b1a
cmpb $0x5c, %cl
je 0x2b1a
movb -0x1(%rax,%r12), %cl
decq %r12
jmp 0x2b01
leaq (%rax,%r12), %rsi
incq %rsi
leaq 0x88c8(%rip), %rdi      # 0xb3f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2060
movq 0x74b6(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x4a57(%rip), %rsi      # 0x75a6
xorl %eax, %eax
callq 0x2110
callq 0x22ba
callq 0x228a
movq %rbx, %rdi
callq 0x2263
movq %rbx, %rdi
callq 0x23c8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x239e
movq %rbx, %rdi
callq 0x2370