// File: /workspace/github_cpp_makefile_star2_O2/besm6[P]pascal-re/pascompl.cc
// Function: initOptions(int, char**)
void initOptions(int argc, char **argv)
{
    PASINFOR.startOffset -= 040000;
    commentModeCH = ' ';
    lineNesting = 0;
    maxLineLen = 120;
    CH = ' ';
    linePos = 0;
    prevErrPos = 0;
    errsInLine = 0;
    lineCnt = 1;
    checkFortran = false;
    bool110z = false;
    int93z = 1;
    int92z = 1;
    moduleOffset = 16384;
    lineStartOffset = 16384;
    int94z = 1;
    parsingParam = false;
    dataCheck = false;
    heapSize = 100;
    bool49z = true;
    atEOL = false;
    doPMD = true; // not (42 in curVal.m);
    checkTypes = true;
    fixMult = true;
    fuzzReals = true;
    pseudoZ = true;
    checkBounds = true; // not (44 in curVal.m);
    declExternal = false;
    errors = false;
    allowCompat = false;
    fileBufSize = 1;
    charEncoding = 2;
    chain = NULL;
    longSymCnt = 0;
    extSymAdornment = 0;
    symTabCnt = 0;
    stdArrayFmt = false;

    // Get base name of the program.
    progname = strrchr(argv[0], '/');
    progname = progname ? progname+1 : argv[0];

    for (;;) {
        switch (getopt(argc, argv, "vVhPe:p:t:c:r:m:y:u:f:a:d:k:b:s:l:")) {
        case EOF:
            break;
        case 'a':
            charEncoding = strtoul(optarg, 0, 0);
            if (charEncoding > 2) {
                fprintf(stderr, "%s: Bad option -a\n", progname);
                exit(-1);
            }
            continue;
        case 'b':
            fileBufSize = strtoul(optarg, 0, 0);
            if (fileBufSize > 4) {
                fprintf(stderr, "%s: Bad option -b\n", progname);
                exit(-1);
            }
            continue;
        case 'c':
            checkTypes = (optarg[0] == '+');
            continue;
        case 'd':
            curVal.i = strtoul(optarg, 0, 0);
            if (curVal.i > 15) {
                fprintf(stderr, "%s: Bad option -d\n", progname);
                exit(-1);
            }
            optSflags.m = optSflags.m * BitRange(0, 40) + curVal.m * BitRange(41, 47);
            continue;
        case 'e':
            declExternal = (optarg[0] == '+');
            continue;
        case 'f':
            checkFortran = (optarg[0] == '+');
            continue;
        case 'k':
            heapSize = strtoul(optarg, 0, 0);
            if (heapSize > 23) {
                fprintf(stderr, "%s: Bad option -k\n", progname);
                exit(-1);
            }
            continue;
        case 'l':
            PASINFOR.listMode = strtoul(optarg, 0, 0);
            if (PASINFOR.listMode > 3) {
                fprintf(stderr, "%s: Bad option -l\n", progname);
                exit(-1);
            }
            continue;
        case 'm':
            fixMult = (optarg[0] == '+');
            continue;
        case 'P':
            stdArrayFmt = true;
            continue;
        case 'p':
            doPMD = (optarg[0] == '+');
            continue;
        case 'r':
            fuzzReals = (optarg[0] == '+');
            continue;
        case 's':
            curVal.i = strtoul(optarg, 0, 0);
            if (curVal.i > 9) {
                fprintf(stderr, "%s: Bad option -s\n", progname);
                exit(-1);
            }
            if (curVal.i == 3) {
                lineCnt = 1;
            } else if (4 <= curVal.i && curVal.i <= 9) {
                optSflags.m = optSflags.m + Bits(curVal.i - 3);
            } else {
                extSymAdornment = curVal.i;
            }
            continue;
        case 't':
            checkBounds = (optarg[0] == '+');
            continue;
        case 'u':
            maxLineLen = (optarg[0] == '+') ? 72 : 120;
            continue;
        case 'y':
            allowCompat = (optarg[0] == '+');
            continue;
        case 'v':
            printf("%s\n", boilerplate);
            exit(0);
        case 'V':
            ++verbose;
            continue;
        default:
            usage();
        }
        break;
    }
    argc -= optind;
    argv += optind;
    if (argc < 1 || argc > 2)
        usage();

    // Open input file on stdin.
    if (strcmp(argv[0], "-") != 0) {
        if (freopen(argv[0], "r", stdin) == NULL) {
            fprintf(stderr, "%s: Cannot open input file\n", progname);
            perror(argv[0]);
            exit(-1);
        }
    }

    // Open output file on stdout.
    if (argc > 1) {
        outFileName = argv[1];
        unlink(outFileName);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
addq $-0x4000, 0xaa4d8(%rip) # imm = 0xC000
movq %rsi, %rbp
andq $0x0, 0x51a8d(%rip)     # 0x63928
movl %edi, %r14d
andq $0x0, 0x519ca(%rip)     # 0x63870
movb $0x20, %al
andq $0x0, 0x519c8(%rip)     # 0x63878
movb %al, 0x51a62(%rip)      # 0x63918
andq $0x0, 0x519c2(%rip)     # 0x63880
movq $0x78, 0x5199f(%rip) # 0x63868
movb %al, 0x51a4a(%rip)      # 0x63919
pushq $0x1
popq %rax
movq %rax, 0x519d7(%rip)     # 0x638b0
xorl %ecx, %ecx
movb %cl, 0x51a9f(%rip)      # 0x63980
movb %cl, 0x51a96(%rip)      # 0x6397d
movq %rax, 0x51a5a(%rip)     # 0x63948
movq %rax, 0x51a4b(%rip)     # 0x63940
movl $0x4000, %edx           # imm = 0x4000
movq %rdx, 0x51987(%rip)     # 0x63888
movq %rdx, 0x51988(%rip)     # 0x63890
movq %rax, 0x51a41(%rip)     # 0x63950
movb %cl, 0x518e3(%rip)      # 0x637f8
movb %cl, 0x518e0(%rip)      # 0x637fb
movq $0x64, 0x519aa(%rip) # 0x638d0
movb $0x1, %dl
movb %dl, 0x518cc(%rip)      # 0x637fa
movb %cl, 0x51a3d(%rip)      # 0x63971
movb %dl, 0x51a3f(%rip)      # 0x63979
movb %dl, 0x51a32(%rip)      # 0x63972
movb %dl, 0x51a36(%rip)      # 0x6397c
movb %dl, 0x51a2f(%rip)      # 0x6397b
movb %dl, 0x51a2c(%rip)      # 0x6397e
movb %dl, 0x51a22(%rip)      # 0x6397a
andq $0x0, 0x51ac0(%rip)     # 0x63a20
movb %cl, 0x51a11(%rip)      # 0x63977
andq $0x0, 0x97d82(%rip)     # 0xa9cf0
movb %cl, 0x51a02(%rip)      # 0x63976
andq $0x0, 0x51b4c(%rip)     # 0x63ac8
movb %cl, 0x519fd(%rip)      # 0x6397f
andq $0x0, 0x51b7e(%rip)     # 0x63b08
movq %rax, 0x518b7(%rip)     # 0x63848
movq $0x2, 0x519c4(%rip) # 0x63960
movb %cl, 0x519ce(%rip)      # 0x63970
movq (%rsi), %rdi
pushq $0x2f
popq %rsi
callq 0x3290
movq %rax, 0xaa3d4(%rip)     # 0xbc388
testq %rax, %rax
je 0x11fbe
incq %rax
jmp 0x11fc2
movq (%rbp), %rax
movq %rax, 0xaa3bf(%rip)     # 0xbc388
leaq 0x8497(%rip), %r15      # 0x1a467
leaq 0x76e1(%rip), %r13      # 0x196b8
movq 0x10fc2(%rip), %r12     # 0x22fa0
leaq 0x51a4b(%rip), %rbx     # 0x63a30
movq %r14, 0x10(%rsp)
movq %rbp, 0x8(%rsp)
movl %r14d, %edi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x3060
leal -0x50(%rax), %ecx
cmpl $0x29, %ecx
ja 0x12279
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x1, 0x51956(%rip)     # 0x63970
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x5194f(%rip)           # 0x63979
jmp 0x11fef
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rax, 0xaa320(%rip)     # 0xbc360
cmpq $0x4, %rax
jl 0x11fef
jmp 0x12319
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x51922(%rip)           # 0x6397b
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x51913(%rip)           # 0x6397c
jmp 0x11fef
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rax, 0x51851(%rip)     # 0x638d0
cmpq $0x18, %rax
jl 0x11fef
jmp 0x122fc
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x381c
movq 0x51983(%rip), %rcx     # 0x63a30
shlq $0x17, %rcx
movq %rcx, %rax
sarq $0x17, %rax
cmpq $0xa, %rax
jge 0x12333
cmpq $0x1800000, %rcx        # imm = 0x1800000
jne 0x1223f
movq $0x1, 0x517d6(%rip) # 0x638b0
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x51892(%rip)           # 0x6397f
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x5187a(%rip)           # 0x6397a
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x5185f(%rip)           # 0x63972
jmp 0x11fef
movq (%r12), %rax
cmpb $0x2b, (%rax)
pushq $0x78
popq %rax
pushq $0x48
popq %rcx
cmoveq %rcx, %rax
movq %rax, 0x51738(%rip)     # 0x63868
jmp 0x11fef
incl 0x51849(%rip)           # 0x63984
jmp 0x11fef
movq %r15, %r14
movq %r12, %r15
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x381c
movq 0x518cb(%rip), %r12     # 0x63a30
movq %r12, %rax
shlq $0x17, %rax
cmpq $0x7800001, %rax        # imm = 0x7800001
jge 0x12381
xorl %edi, %edi
pushq $0x28
popq %rsi
callq 0x37ec
movq %rax, %rbp
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
andq %rax, %rbp
andq 0x518d7(%rip), %rbp     # 0x63a70
pushq $0x29
popq %rdi
pushq $0x2f
popq %rsi
callq 0x37ec
movabsq $-0x1000000000000, %rcx # imm = 0xFFFF000000000000
orq %rcx, %r12
andq %rax, %r12
orq %rbp, %r12
movq %r12, 0x518b2(%rip)     # 0x63a70
movq %r15, %r12
movq %r14, %r15
movq 0x8(%rsp), %rbp
movq 0x10(%rsp), %r14
jmp 0x11fef
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rax, 0x51779(%rip)     # 0x63960
cmpq $0x3, %rax
jl 0x11fef
jmp 0x1234d
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x5177c(%rip)           # 0x63980
jmp 0x11fef
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x30a0
movq %rax, 0x5162b(%rip)     # 0x63848
cmpq $0x5, %rax
jl 0x11fef
jmp 0x12367
movq (%r12), %rax
cmpb $0x2b, (%rax)
sete 0x5173d(%rip)           # 0x63977
jmp 0x11fef
cmpq $0x4, %rax
jl 0x1226d
movb $0x32, %cl
subb %al, %cl
movq 0x51820(%rip), %rax     # 0x63a70
movabsq $0xffffffffffff, %rdx   # imm = 0xFFFFFFFFFFFF
andq %rdx, %rax
btsq %rcx, %rax
movq %rax, 0x51808(%rip)     # 0x63a70
jmp 0x11fef
movq %rax, 0x51854(%rip)     # 0x63ac8
jmp 0x11fef
cmpl $-0x1, %eax
jne 0x122f7
movq 0x10d53(%rip), %rax     # 0x22fd8
movslq (%rax), %r15
subl %r15d, %r14d
leal -0x3(%r14), %eax
cmpl $-0x3, %eax
jbe 0x122f7
movq (%rbp,%r15,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x122a4
cmpb $0x0, 0x1(%rdi)
je 0x122c3
movq 0x10d0d(%rip), %rax     # 0x22fb8
movq (%rax), %rdx
leaq 0x7df9(%rip), %rsi      # 0x1a0ae
callq 0x3280
testq %rax, %rax
je 0x123bb
cmpl $0x2, %r14d
jb 0x122e8
movq 0x8(%rbp,%r15,8), %rdi
movq %rdi, 0x10f8b(%rip)     # 0x23260
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3100
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11c6e
movq 0x10ccd(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xaa07b(%rip), %rdx     # 0xbc388
leaq 0x81af(%rip), %rsi      # 0x1a4c3
jmp 0x12399
movq 0x10cb0(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xaa05e(%rip), %rdx     # 0xbc388
leaq 0x81a5(%rip), %rsi      # 0x1a4d6
jmp 0x12399
movq 0x10c96(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xaa044(%rip), %rdx     # 0xbc388
leaq 0x819e(%rip), %rsi      # 0x1a4e9
jmp 0x12399
movq 0x10c7c(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xaa02a(%rip), %rdx     # 0xbc388
leaq 0x8125(%rip), %rsi      # 0x1a48a
jmp 0x12399
movq 0x10c62(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xaa010(%rip), %rdx     # 0xbc388
leaq 0x811e(%rip), %rsi      # 0x1a49d
jmp 0x12399
movq 0x10c48(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xa9ff6(%rip), %rdx     # 0xbc388
leaq 0x8117(%rip), %rsi      # 0x1a4b0
xorl %eax, %eax
callq 0x3330
pushq $-0x1
popq %rdi
callq 0x32e0
movq 0x10eb9(%rip), %rdi     # 0x23268
callq 0x3360
xorl %edi, %edi
callq 0x32e0
movq 0x10c0e(%rip), %rax     # 0x22fd0
movq (%rax), %rdi
movq 0xa9fbc(%rip), %rdx     # 0xbc388
leaq 0x8129(%rip), %rsi      # 0x1a4fc
xorl %eax, %eax
callq 0x3330
movq (%rbp,%r15,8), %rdi
callq 0x31d0
jmp 0x123a0