// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x3ef0
callq 0x3e50
movl $0x1, %edi
callq 0x31b0
jmp 0x3ef2
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x42ac
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0x3f35
jmp 0x42ac
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, -0xb8(%rbp)
subl $0x34, %eax
ja 0x4296
movq -0xb8(%rbp), %rax
leaq 0xc0ad(%rip), %rcx      # 0x10010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x63, %eax
jne 0x3f88
movl $0x1, 0x1440a(%rip)     # 0x18390
jmp 0x3f99
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xd0c9(%rip), %rsi      # 0x1105d
callq 0xd130
jmp 0x42a7
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x30a0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x32e0
movq %rax, 0x14385(%rip)     # 0x18360
movq 0x1437e(%rip), %rdi     # 0x18360
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x3060
jmp 0x42a7
cmpl $0x3, 0x14372(%rip)     # 0x1836c
jge 0x400b
movl 0x1436a(%rip), %eax     # 0x1836c
addl $0x1, %eax
movl %eax, 0x14361(%rip)     # 0x1836c
jmp 0x42a7
movl $0x1, 0x1434e(%rip)     # 0x18368
jmp 0x42a7
movl $0x1, 0x14347(%rip)     # 0x18370
jmp 0x42a7
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
leaq 0x1ceb6(%rip), %rax     # 0x20f10
movq %rcx, (%rax)
leaq 0x1cebc(%rip), %rax     # 0x20f20
movl $0x20, (%rax)
leaq -0x90(%rbp), %rdi
callq 0x5de0
cmpl $0x0, %eax
je 0x408c
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xcfd6(%rip), %rsi      # 0x1105d
callq 0xd130
movq $0x1, -0x88(%rbp)
movl $0x1, -0x8c(%rbp)
movl $0x3d, %edi
callq 0x5a90
cmpl $0x0, %eax
je 0x40e2
leaq -0xa0(%rbp), %rdi
callq 0xbfa0
cmpl $0x0, %eax
je 0x40d2
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xcf90(%rip), %rsi      # 0x1105d
callq 0xd130
movq -0xa0(%rbp), %rax
cltq
movq %rax, -0x88(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x6810
jmp 0x42a7
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
leaq 0x1cdea(%rip), %rax     # 0x20f10
movq %rcx, (%rax)
leaq 0x1cdf0(%rip), %rax     # 0x20f20
movl $0x20, (%rax)
leaq -0xa8(%rbp), %rdi
callq 0xbfa0
cmpl $0x0, %eax
je 0x4158
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xcf0a(%rip), %rsi      # 0x1105d
callq 0xd130
movq -0xa8(%rbp), %rax
movl %eax, 0x1424b(%rip)     # 0x183b0
movl 0x14475(%rip), %eax     # 0x185e0
movl %eax, 0x1424b(%rip)     # 0x183bc
movl $0x1, 0x14239(%rip)     # 0x183b4
movq -0xa8(%rbp), %rax
movl %eax, 0x14218(%rip)     # 0x183a0
jmp 0x42a7
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x6c, %eax
je 0x41ad
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x4c, %eax
jne 0x41c6
movl $0x1, 0x14429(%rip)     # 0x185e0
movl $0xffffffff, 0x14423(%rip) # imm = 0xFFFFFFFF
jmp 0x4247
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x67, %eax
je 0x41e6
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x47, %eax
jne 0x41fc
movl $0x2, 0x143f0(%rip)     # 0x185e0
movl $0x0, 0x143ea(%rip)     # 0x185e4
jmp 0x4245
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x44, %eax
je 0x421c
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x44, %eax
jne 0x4232
movl $0x3, 0x143ba(%rip)     # 0x185e0
movl $0x1, 0x143b4(%rip)     # 0x185e4
jmp 0x4243
movl $0xffffffee, %edi       # imm = 0xFFFFFFEE
leaq 0xcdeb(%rip), %rsi      # 0x11029
callq 0xd130
jmp 0x4245
jmp 0x4247
movl 0x14393(%rip), %eax     # 0x185e0
movl %eax, 0x14169(%rip)     # 0x183bc
jmp 0x42a7
callq 0x3e80
movl $0x1, %edi
callq 0x31b0
movl $0x1, 0x14106(%rip)     # 0x18374
jmp 0x42a7
movq -0x20(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x68, %eax
jne 0x428a
movl $0x1, 0x140f2(%rip)     # 0x1837c
movl $0x1, 0x140e4(%rip)     # 0x18378
jmp 0x42a7
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xcdbb(%rip), %rsi      # 0x1105d
callq 0xd130
jmp 0x3ef2
cmpl $0x1, -0x14(%rbp)
je 0x42c3
movl $0xffffffd8, %edi       # imm = 0xFFFFFFD8
leaq 0xcd9f(%rip), %rsi      # 0x1105d
callq 0xd130
cmpq $0x0, 0x14095(%rip)     # 0x18360
jne 0x43c9
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x30a0
movq %rax, %rdi
addq $0x2, %rdi
callq 0x32e0
movq %rax, 0x14070(%rip)     # 0x18360
movq 0x14069(%rip), %rdi     # 0x18360
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x3060
movq 0x14056(%rip), %rax     # 0x18360
movq %rax, -0xc0(%rbp)
movq 0x14048(%rip), %rdi     # 0x18360
callq 0x30a0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, -0xc1(%rbp)
je 0x435f
movq -0xb0(%rbp), %rax
cmpq 0x1400a(%rip), %rax     # 0x18360
setne %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x436b
jmp 0x437f
movq -0xb0(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x4331
movq -0xb0(%rbp), %rax
cmpq 0x13fd3(%rip), %rax     # 0x18360
jne 0x43b3
movq 0x13fca(%rip), %rdi     # 0x18360
callq 0x30a0
addq -0xb0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movb $0x2e, (%rax)
movq -0xb0(%rbp), %rax
movb $0x6f, 0x1(%rax)
movq -0xb0(%rbp), %rax
movb $0x0, 0x2(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)