// File: /workspace/github_c_makefile_star2_O3/42Bastian[P]lyxass/lyxass.c
// Function: CommandLine
void CommandLine(int *_argc, char **_argv)
{

  int argc = *_argc;
  char **argv = _argv;
  int c_arg = 0;

  if ( argc < 2 ){
    usage();
    exit(1);
  }

  while ( c_arg++,argv++,--argc ){
    char *s = *argv;
    if ( s[0] != '-' ) break;
    switch ( argv[0][1] ){
    case 'n':
      if ( argv[0][2] == 'c' ){
        noCcomment = 1;
      } else {
        Error(-CMD_ERR,"");
      }
      break;
    case 'o':
      --argc;
      ++argv;
      c_arg++;
      outfile = my_malloc((long)strlen(*argv)+1);
      strcpy(outfile,*argv);
      break;
    case 'v':
      if ( verbose < 3 ) ++verbose;
      break;
    case 'w':
      warning = 1;
      break;
    case 'd':
      data = 1;
      break;
    case 'D':
      {
        label_t label;
        int solved;

        --argc;
        ++argv;
        ++c_arg;
        srcLinePtr = *argv;

        atom = ' ';

        if ( GetLabel( &label ) ) Error(-CMD_ERR,"");
        label.value = 1;
        label.type = NORMAL;
        if ( TestAtom('=') ){
          int64_t l;
          if ( uni(&l) ) Error(-CMD_ERR,"");
          label.value = (int32_t)l;
        }
        DefineLabel(&label, &solved);
      }
      break;
    case 'x':
      {
        int64_t l;

        --argc;
        ++argv;
        ++c_arg;
        srcLinePtr = *argv;
        atom = ' ';
        if ( uni(&l) ) Error(-CMD_ERR,"");
        Global.run = (uint32_t)l;
        Global.mainMode = sourceMode;
        Global.genesis = 1;
        Global.pc =  (uint32_t)l;
      }
      break;
    case 't':
        if ( argv[0][2] == 'l' || argv[0][2] == 'L' ){
          sourceMode = LYNX;
          jaguar_mode = -1;
        } else if ( argv[0][2] == 'g' || argv[0][2] == 'G' ){
          sourceMode = JAGUAR_GPU;
          jaguar_mode = 0;
        } else if ( argv[0][2] == 'D' || argv[0][2] == 'D' ){
          sourceMode = JAGUAR_DSP;
          jaguar_mode = 1;
        } else {
          Error(-SYNTAX_ERR,"Need l,g or d\n");
        }
        Global.mainMode = sourceMode;
        break;
    case 'h':
      help();
      exit(1);
    case 'r':
      dumpGlobals = 1;
      break;
    case 's':
      if (argv[0][2] == 'h' ){
        hexsymbols=1;
      }
      symbols = 1;
      break;
    default:
      Error(-CMD_ERR,"");
    }
  }
  if ( argc != 1 ) Error(-CMD_ERR,"");

  if ( !outfile ){
    char *p;
    outfile = my_malloc((long)strlen(*argv)+2);
    strcpy(outfile,*argv);
    p = outfile+strlen(outfile);
    while ( *p != '.' && p != outfile )
      --p;

    if ( p == outfile ){
      p += strlen(outfile);
      p[0] = '.';
    }
    p[1] = 'o';
    p[2] = 0;
  }

  *_argc = c_arg;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, 0x10(%rsp)
movl (%rdi), %r12d
cmpl $0x2, %r12d
jl 0x3ebf
movq %rsi, %rbp
leaq 0x8(%rsi), %rbx
leal -0x1(%r12), %r14d
xorl %r13d, %r13d
movl $0x1, %r15d
leaq 0x84d3(%rip), %rsi      # 0xc010
movq 0x8(%rbp), %rax
cmpb $0x2d, (%rax)
jne 0x3e1a
movzbl 0x1(%rax), %ecx
leal -0x64(%rcx), %edx
cmpl $0x14, %edx
ja 0x3b6e
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl $0x1, 0x10817(%rip)     # 0x14380
jmp 0x3dfe
cmpl $0x44, %ecx
jne 0x3cb1
movq 0x10(%rbp), %rax
leaq 0x1939e(%rip), %rcx     # 0x1cf20
movq %rax, (%rcx)
leaq 0x193a4(%rip), %rax     # 0x1cf30
movl $0x20, (%rax)
leaq 0x18(%rsp), %rdi
callq 0x52f1
testl %eax, %eax
je 0x3bb1
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0x93e6(%rip), %rsi      # 0xcf92
callq 0xa1d8
movq $0x1, 0x20(%rsp)
movl $0x1, 0x1c(%rsp)
movl $0x3d, %edi
callq 0x4fa8
testl %eax, %eax
je 0x3bf9
leaq 0x8(%rsp), %rdi
callq 0x97a4
testl %eax, %eax
je 0x3bef
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0x93a8(%rip), %rsi      # 0xcf92
callq 0xa1d8
movslq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
addl $-0x2, %r12d
addq $0x10, %rbp
addl $0x2, %r13d
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5cf9
jmp 0x3c82
movq 0x10(%rbp), %rax
leaq 0x192ff(%rip), %rcx     # 0x1cf20
movq %rax, (%rcx)
leaq 0x19305(%rip), %rax     # 0x1cf30
movl $0x20, (%rax)
leaq 0x18(%rsp), %rdi
callq 0x97a4
testl %eax, %eax
je 0x3c50
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0x9347(%rip), %rsi      # 0xcf92
callq 0xa1d8
addl $-0x2, %r12d
addq $0x10, %rbp
addl $0x2, %r13d
movl 0x18(%rsp), %eax
movl %eax, 0x1075a(%rip)     # 0x143c0
movl 0x10984(%rip), %ecx     # 0x145f0
movl %ecx, 0x1075a(%rip)     # 0x143cc
movl $0x1, 0x10748(%rip)     # 0x143c4
movl %eax, 0x1072e(%rip)     # 0x143b0
movq %rbp, %rbx
movl %r13d, %r15d
movl %r12d, %r14d
jmp 0x3cc2
movl $0x1, 0x106e1(%rip)     # 0x14378
jmp 0x3dfe
cmpb $0x63, 0x2(%rax)
jne 0x3cb1
movl $0x1, 0x106f4(%rip)     # 0x143a0
jmp 0x3dfe
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0x92d5(%rip), %rsi      # 0xcf92
callq 0xa1d8
leaq 0x8347(%rip), %rsi      # 0xc010
jmp 0x3dfe
movl 0x106a8(%rip), %eax     # 0x1437c
cmpl $0x2, %eax
jg 0x3dfe
incl %eax
movl %eax, 0x10697(%rip)     # 0x1437c
jmp 0x3dfe
movzbl 0x2(%rax), %eax
cmpl $0x4b, %eax
jle 0x3d9a
cmpl $0x6c, %eax
je 0x3d0e
cmpl $0x67, %eax
je 0x3da4
cmpl $0x4c, %eax
jne 0x3dda
movl $0x1, 0x108d8(%rip)     # 0x145f0
movl $0xffffffff, 0x108d2(%rip) # imm = 0xFFFFFFFF
movl $0x1, %eax
jmp 0x3df8
addl $-0x2, %r12d
leaq 0x10(%rbp), %rbx
addl $0x2, %r13d
movq 0x10(%rbp), %rdi
callq 0x30b0
leaq 0x1(%rax), %rdi
callq 0x331c
movq %rax, 0x1061f(%rip)     # 0x14370
movq 0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x3070
leaq 0x82ac(%rip), %rsi      # 0xc010
movl %r13d, %r15d
movl %r12d, %r14d
jmp 0x3dfe
movl $0x1, 0x1060b(%rip)     # 0x14384
jmp 0x3dfe
cmpb $0x68, 0x2(%rax)
jne 0x3d8e
movl $0x1, 0x105fe(%rip)     # 0x1438c
movl $0x1, 0x105f0(%rip)     # 0x14388
jmp 0x3dfe
cmpl $0x44, %eax
je 0x3dbf
cmpl $0x47, %eax
jne 0x3dda
movl $0x2, 0x10842(%rip)     # 0x145f0
movl $0x0, 0x1083c(%rip)     # 0x145f4
movl $0x2, %eax
jmp 0x3df8
movl $0x3, 0x10827(%rip)     # 0x145f0
movl $0x1, 0x10821(%rip)     # 0x145f4
movl $0x3, %eax
jmp 0x3df8
movl $0xffffffee, %edi       # imm = 0xFFFFFFEE
leaq 0x9178(%rip), %rsi      # 0xcf5e
callq 0xa1d8
leaq 0x821e(%rip), %rsi      # 0xc010
movl 0x107f8(%rip), %eax     # 0x145f0
movl %eax, 0x105ce(%rip)     # 0x143cc
movl %r14d, %r12d
movl %r15d, %r13d
movq %rbx, %rbp
leal 0x1(%r13), %r15d
addq $0x8, %rbx
decl %r14d
jne 0x3b3d
jmp 0x3e20
cmpl $0x1, %r14d
je 0x3e31
leaq 0x916b(%rip), %rsi      # 0xcf92
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
callq 0xa1d8
cmpq $0x0, 0x10537(%rip)     # 0x14370
jne 0x3ea1
movq (%rbx), %rdi
callq 0x30b0
leaq 0x2(%rax), %rdi
callq 0x331c
movq %rax, %r14
movq %rax, 0x1051a(%rip)     # 0x14370
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x3070
movq %r14, %rdi
callq 0x30b0
leaq (%r14,%rax), %rcx
incq %rcx
addq %rax, %r14
negq %rax
movq %rax, %rsi
leaq -0x1(%rcx), %rdx
incq %rax
testq %rsi, %rsi
je 0x3e8e
cmpb $0x2e, -0x1(%rcx)
movq %rdx, %rcx
jne 0x3e76
cmpq $0x1, %rax
jne 0x3e9b
movb $0x2e, (%r14)
movq %r14, %rdx
movw $0x6f, 0x1(%rdx)
movq 0x10(%rsp), %rax
movl %r15d, (%rax)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3ae5
jmp 0x3ec4
callq 0x3ac2
movl $0x1, %edi
callq 0x31c0