// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekmsc.c
// Function: tekargv
void
tekargv(int argc, char const * const argv[])
{
     int       p;
     char      argmatch=0;

     if( (argc >= 2) ) {
          if( strchr(argv[1],'.') != 0 ) {
               strcpy(boardfilename,argv[1]);
               if( (strcmp(boardfilename,"matrix.map") == 0) || (strcmp(boardfilename,"MATRIX.MAP") == 0) ) {
                    mission=7;
               }
               singlemapmode=1;
               nobriefflag=1;
          }
     }
     else {
          strcpy(boardfilename,"subway0.map");
     }

     goreflag=1;

     for( p=1 ; p < argc ; p++ ) {
          if (Bstrcasecmp(argv[p],"PRACTICE") == 0) {
               generalplay=1;
               argmatch++;
          }
          if (Bstrcasecmp(argv[p],"NOVIDEOID") == 0) {
               novideoid=1;
               argmatch++;
          }
          if (Bstrcasecmp(argv[p],"NETNAME") == 0) {
               bypasscdcheck=1;
               if( (p+1) < argc ) {
                    memset(localname,0,sizeof(localname));
                    strncpy(localname,argv[p+1],sizeof(localname)-1);
                    Bstrupr(localname);
               }
               argmatch++;
          }
          if (Bstrcasecmp(argv[p],"NOGORE") == 0) {
               argmatch++;
               goreflag=0;
          }
          if (Bstrcasecmp(argv[p],"NOENEMIES") == 0) {
               argmatch++;
               noenemiesflag=1;
          }
          if (Bstrcasecmp(argv[p],"NOGUARD") == 0) {
               argmatch++;
               noguardflag=1;
          }
          if (Bstrcasecmp(argv[p],"NOSTALK") == 0) {
               argmatch++;
               nostalkflag=1;
          }
          if (Bstrcasecmp(argv[p],"NOCHASE") == 0) {
               argmatch++;
               nochaseflag=1;
          }
          if (Bstrcasecmp(argv[p],"NOSTROLL") == 0) {
               argmatch++;
               nostrollflag=1;
          }
          if (Bstrcasecmp(argv[p],"DIGILOOPS") == 0) {
               argmatch++;
               //digiloopflag=1;
          }
          if (Bstrcasecmp(argv[p],"NOBRIEFS") == 0) {
               argmatch++;
               nobriefflag=1;
          }
          if (Bstrcasecmp(argv[p],"DEBUG") == 0) {
               argmatch++;
               dbgflag=1;
          }
          if (Bstrcasecmp(argv[p],"COOP") == 0) {
               argmatch++;
               coopmode=1;
          }
          if (Bstrcasecmp(argv[p],"SWITCHLEVELS") == 0) {
               argmatch++;
               switchlevelsflag=1;
          }
     }

     if( singlemapmode ) {
          if( access(boardfilename, F_OK) != 0 ) {
               printf("\ncant find %s\n", boardfilename);
               exit(-1);
          }
     }

     if( (argmatch == 0) && (singlemapmode != 1) && (argc > 1) ) {
          usage();
          exit(-1);
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x15(%rbp)
cmpl $0x2, -0x4(%rbp)
jl 0x1f492
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x2e, %esi
callq 0x86f0
cmpq $0x0, %rax
je 0x1f490
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x10f390(%rip), %rdi    # 0x12e7d0
callq 0x8550
leaq 0x10f384(%rip), %rdi    # 0x12e7d0
leaq 0xba757(%rip), %rsi     # 0xd9baa
callq 0x8b90
cmpl $0x0, %eax
je 0x1f475
leaq 0x10f36c(%rip), %rdi    # 0x12e7d0
leaq 0xba74a(%rip), %rsi     # 0xd9bb5
callq 0x8b90
cmpl $0x0, %eax
jne 0x1f47f
movl $0x7, 0x159051(%rip)    # 0x1784d0
movb $0x1, 0x15ab47(%rip)    # 0x179fcd
movl $0x1, 0x15ab40(%rip)    # 0x179fd0
jmp 0x1f4a5
leaq 0x10f337(%rip), %rdi    # 0x12e7d0
leaq 0xba51f(%rip), %rsi     # 0xd99bf
callq 0x8550
leaq 0x158e74(%rip), %rax    # 0x178320
movl $0x1, (%rax)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1f7af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba6e8(%rip), %rsi     # 0xd9bc0
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f4f1
movb $0x1, 0x15aaeb(%rip)    # 0x179fd4
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba6c5(%rip), %rsi     # 0xd9bc9
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f51d
movb $0x1, 0x15aac0(%rip)    # 0x179fd5
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba6a3(%rip), %rsi     # 0xd9bd3
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f598
leaq 0x3585d3(%rip), %rax    # 0x377b14
movb $0x1, (%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
cmpl -0x4(%rbp), %eax
jge 0x1f590
leaq 0x10f0ca(%rip), %rdi    # 0x12e620
xorl %esi, %esi
movl $0xb, %edx
callq 0x8410
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x10f0a6(%rip), %rdi    # 0x12e620
movl $0xa, %edx
callq 0x8200
leaq 0x10f095(%rip), %rdi    # 0x12e620
callq 0x4fbf0
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba630(%rip), %rsi     # 0xd9bdb
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f5ca
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
leaq 0x158d5c(%rip), %rax    # 0x178320
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba605(%rip), %rsi     # 0xd9be2
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f5f9
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a9df(%rip)    # 0x179fd8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba5e0(%rip), %rsi     # 0xd9bec
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f628
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a9b4(%rip)    # 0x179fdc
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba5b9(%rip), %rsi     # 0xd9bf4
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f657
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a989(%rip)    # 0x179fe0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba592(%rip), %rsi     # 0xd9bfc
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f686
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a95e(%rip)    # 0x179fe4
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba56b(%rip), %rsi     # 0xd9c04
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f6b5
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a933(%rip)    # 0x179fe8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba545(%rip), %rsi     # 0xd9c0d
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f6da
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba52a(%rip), %rsi     # 0xd9c17
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f709
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
movl $0x1, 0x15a8c7(%rip)    # 0x179fd0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba504(%rip), %rsi     # 0xd9c20
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f73b
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
leaq 0x10e22f(%rip), %rax    # 0x12d964
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba4d8(%rip), %rsi     # 0xd9c26
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f76d
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
leaq 0x24aa79(%rip), %rax    # 0x26a1e0
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xba4ab(%rip), %rsi     # 0xd9c2b
callq 0x8b00
cmpl $0x0, %eax
jne 0x1f79f
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
leaq 0x24aa4b(%rip), %rax    # 0x26a1e4
movl $0x1, (%rax)
jmp 0x1f7a1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1f4b9
cmpb $0x0, 0x15a817(%rip)    # 0x179fcd
je 0x1f7ec
leaq 0x10f011(%rip), %rdi    # 0x12e7d0
xorl %esi, %esi
callq 0x8180
cmpl $0x0, %eax
je 0x1f7ea
leaq 0xba466(%rip), %rdi     # 0xd9c38
leaq 0x10eff7(%rip), %rsi    # 0x12e7d0
movb $0x0, %al
callq 0x80b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x88d0
jmp 0x1f7ec
movsbl -0x15(%rbp), %eax
cmpl $0x0, %eax
jne 0x1f816
movsbl 0x15a7d1(%rip), %eax    # 0x179fcd
cmpl $0x1, %eax
je 0x1f816
cmpl $0x1, -0x4(%rbp)
jle 0x1f816
callq 0x1f3a0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x88d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)