// File: /workspace/github_c_makefile_star2_O0/Matthias-Wandel[P]imgcomp/src/config.c
// Function: parse_parameter
static int parse_parameter (const char * tag, const char * value)
{
    if (keymatch(tag, "debug", 1) || keymatch(tag, "verbose", 1)) {
        // Enable debug printouts.  Specify more than once for more detail.
        Verbosity += 1;
        return 1;
    }
    if (!value){
        fprintf(stderr, "Parameter '%s' needs to be followed by a value\n",tag);
        return -1;
    }

    if (keymatch(tag, "spurious", 4)) {
        SpuriousReject = value[0]-'0';
        if ((SpuriousReject != 0 && SpuriousReject != 1) || value[1] != 0){
            fprintf(stderr, "Spurious value can only be 0 or 1\n");
        }
    }else if (keymatch(tag, "configfile", 10)) {
        // do nothing; this arg was already interpreted earlier.  Also this is meaningless
        // inside a config file.
    }else if (keymatch(tag, "postmotion", 10)) {
        if (sscanf(value, "%d", &PostMotionKeep) != 1) return -1;
    }else if (keymatch(tag, "premotion", 9)) {
        if (sscanf(value, "%d", &PreMotionKeep) != 1) return -1;
        if (PreMotionKeep != 0 && PreMotionKeep != 1){
            fprintf(stderr, "preMotion may only be 0 or 1\n");
            return -1;
        }
    }else if (keymatch(tag, "brmonitor", 4)) {
        // exposure monnitor works a lot like how brmonitor used to work.
        if (sscanf(value, "%d", &ExposureManagementOn) != 1) return -1;
    }else if (keymatch(tag, "exmanage", 5)) {
        if (sscanf(value, "%d", &ExposureManagementOn) != 1) return -1;
    }else if (keymatch(tag, "relaunch_timeout", 16)) {
        if (sscanf(value, "%d", &relaunch_timeout) != 1) return -1;        
    }else if (keymatch(tag, "give_up_timeout", 15)) {
        if (sscanf(value, "%d", &give_up_timeout) != 1) return -1;
    }else if (strcmp(tag, "fatigue") == 0 || keymatch(tag, "fatigue_tc", 10)) {
        if (sscanf(value, "%d", &MotionFatigueTc) != 1) return -1;
    }else if (keymatch(tag, "fatigue_percent", 11)) {
        if (sscanf(value, "%d", &FatigueGainPercent) != 1) return -1;
    }else if (keymatch(tag, "fatigue_skip", 10)) {
        if (sscanf(value, "%d", &FatigueSkipCount) != 1) return -1;
    } else if (keymatch(tag, "scale", 5)) {
        // Scale the output image by a fraction 1/N.
        if (sscanf(value, "%d", &ScaleDenom) != 1) return -1;
    } else if (keymatch(tag, "sensitivity", 5)) {
        // Sensitivity level (lower = more senstitive) 
        if (sscanf(value, "%d", &Sensitivity) != 1) return -1;
    } else if (keymatch(tag, "timelapse", 5)) {
        // Scale the output image by a fraction M/N.
        if (sscanf(value, "%d", (int *)&TimelapseInterval) != 1) return -1;
    } else if (keymatch(tag, "aquire_cmd", 4)) {
        // Set the command for raspistill command.
        strncpy(camera_prog_cmd, value, sizeof(camera_prog_cmd)-1);
    } else if (keymatch(tag, "iso", 3)) {
        int n = sscanf(value, "%d-%d", &ex.ISOmin, &ex.ISOmax);
        if (n != 1 && n != 2) return -1;
        if (n == 1) ex.ISOmax = ex.ISOmin;
        if (ex.ISOmin > ex.ISOmax || ex.ISOmax > 6400 || ex.ISOmin < 10){
            fprintf(stderr, "Bad ISO range.  Must be 10 - 6400\n");
            return -1;
        }
    } else if (keymatch(tag, "exposure", 3)) {
        int n = sscanf(value, "%f-%f", &ex.Tmin, &ex.Tmax);
        if (n != 1 && n != 2) return -1;
        if (n == 1) ex.Tmax = ex.Tmin;
        if (ex.Tmin > ex.Tmax || ex.Tmax > 0.25 || ex.Tmin < 0.00009){
            // Timelapses mode with more than 1/4 second exposure time tends to mess up
            // raspistill, some combinations hard locking up the whole Pi.
            fprintf(stderr, "Bad exposure time values.  Must be 0.0001 - 10 (seconds)\n");
            return -1;
        }
    } else if (keymatch(tag, "pixsat", 6)) {
        if (sscanf(value, "%d", &ex.SatVal) != 1) return -1;
        if (ex.SatVal < 50 || ex.SatVal > 255){
            fprintf(stderr, "Pixel saturation must be between in range of 50-255\n");
            return -1;
        }
    } else if (keymatch(tag, "isooverextime", 5)) {
        if (sscanf(value, "%d", &ex.ISOoverExTime) != 1) return -1;
        if (ex.ISOoverExTime < 1000 || ex.ISOoverExTime > 50000){
            fprintf(stderr, "ISO/Exposure is out of range (100-50000)\n");
            return -1;
        }
        
    } else if (keymatch(tag, "lighton_run", 11)) {
        strncpy(lighton_run, value, sizeof(lighton_run)-1);
    } else if (keymatch(tag, "lightoff_run", 12)) {
        strncpy(lightoff_run, value, sizeof(lightoff_run)-1);
    } else if (keymatch(tag, "lightoffdelay", 13)) {
        int n = sscanf(value, "%d-%d", &lightoff_min, &lightoff_max);
        if (n != 1 && n != 2) return -1;
        if (n == 1) lightoff_max = lightoff_min;
    } else if (keymatch(tag, "savedir", 4)) {
        // Set where output goes
        strncpy(SaveDir,value, sizeof(SaveDir)-1);
    } else if (keymatch(tag, "savenames", 5)) {
        // Set file / directory naming scheme.  Do not chagne from default
        // if you want the HTML browsing system to still work.
        strncpy(SaveNames,value, sizeof(SaveNames)-1);
        {
            int a,b;
            for (a=0;SaveNames[a];a++){
                if (SaveNames[a] == '%'){
                    for (b=0;b<10;b++) if (SaveNames[a+1] == "dHjmMSUwyY"[b]) break;
                    if (b >=10){
                        fprintf(stderr, "savenames '%%' may only be followed by one of d,H,j,m,M,S,U,w,y, or Y\n");
                        exit(-1);
                    }
                }
            }
        }
    } else if (keymatch(tag, "copyjpgcmd", 5)) {
        // Set the optional copyjpgcmd value, which can be used to process images to keep
        // to make them losselssly 5% smaller with jpegtran, provided your on raspberry pi2 or faster.
        strncpy(CopyJpgCmd, value, sizeof(CopyJpgCmd)-1);

    } else if (keymatch(tag, "logtofile", 8)) {
        // Log to a file instead of stdout.  Must log to /ramdisk/log.txt for realtime view to work.
        strncpy(LogToFile, value, sizeof(SaveDir)-1);
    } else if (keymatch(tag, "movelognames", 12)) {
        // Where to backup logs to.
        strncpy(MoveLogNames,value, sizeof(SaveDir)-1);
    } else if (keymatch(tag, "region", 3)) {
        if (!ParseRegion(&Regions.DetectReg, value)) goto bad_value;
    } else if (keymatch(tag, "exclude", 4)) {
        if (Regions.NumExcludeReg >= MAX_EXCLUDE_REGIONS){
            fprintf(stderr, "too many exclude regions");
            exit(-1);
        }else{
            Region_t NewEx;
            if (!ParseRegion(&NewEx, value)) goto bad_value;
            printf("Exclude region x:%d-%d, y:%d-%d\n",NewEx.x1, NewEx.x2, NewEx.y1, NewEx.y2);
            Regions.ExcludeReg[Regions.NumExcludeReg++] = NewEx;
        }
    } else if (keymatch(tag, "diffmap", 5)) {
        strncpy(DiffMapFileName,value, sizeof(DiffMapFileName)-1);

    } else if (keymatch(tag, "dodir", 5)) {
        // Scale the output image by a fraction M/N. */
        strncpy(DoDirName, value, sizeof(DoDirName)-1);
        FollowDir = 0;
    } else if (keymatch(tag, "followdir", 6)) {
        strncpy(DoDirName,value, sizeof(DoDirName)-1);
        FollowDir = 1;
    } else if (keymatch(tag, "tempdir", 6)) {
        strncpy(TempDirName,value, sizeof(DoDirName)-1);
    } else if (keymatch(tag, "vidmode", 7)) {
        if (sscanf(value, "%d", &VidMode) != 1) return -1;
    } else if (keymatch(tag, "viddecomposecmd", 15)) {
        strncpy(VidDecomposeCmd, value, sizeof(VidDecomposeCmd)-1);
    } else if (keymatch(tag, "sendudp", 7)) {
        strncpy(UdpDest,value, sizeof(UdpDest)-1);
    }else{
        fprintf(stderr,"argument '%s' not understood\n",tag);
        return -1;     // bogus switch
        bad_value:
        fprintf(stderr, "Value of %s=%s\n not understood\n",tag,value);
        return -1;
    }
    return 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa2b1(%rip), %rsi      # 0xf30c
movl $0x1, %edx
callq 0x6140
cmpl $0x0, %eax
jne 0x5084
movq -0x10(%rbp), %rdi
leaq 0xa29d(%rip), %rsi      # 0xf312
movl $0x1, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x509f
movl 0xf96e(%rip), %eax      # 0x149f8
addl $0x1, %eax
movl %eax, 0xf965(%rip)      # 0x149f8
movl $0x1, -0x4(%rbp)
jmp 0x5dc6
cmpq $0x0, -0x18(%rbp)
jne 0x50ce
movq 0xef43(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0xa25f(%rip), %rsi      # 0xf31a
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
movq -0x10(%rbp), %rdi
leaq 0xa271(%rip), %rsi      # 0xf34a
movl $0x4, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5134
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, 0xf8ec(%rip)      # 0x149e4
cmpl $0x0, 0xf8e5(%rip)      # 0x149e4
je 0x510a
cmpl $0x1, 0xf8dc(%rip)      # 0x149e4
jne 0x5117
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x512f
movq 0xeed2(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0xa22b(%rip), %rsi      # 0xf353
movb $0x0, %al
callq 0x3290
jmp 0x5dbf
movq -0x10(%rbp), %rdi
leaq 0x90a5(%rip), %rsi      # 0xe1e4
movl $0xa, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5153
jmp 0x5dbd
movq -0x10(%rbp), %rdi
leaq 0xa218(%rip), %rsi      # 0xf376
movl $0xa, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x519c
movq -0x18(%rbp), %rdi
leaq 0xc558(%rip), %rsi      # 0x116d0
leaq 0xf869(%rip), %rdx      # 0x149e8
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x5197
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5dbb
movq -0x10(%rbp), %rdi
leaq 0xa1da(%rip), %rsi      # 0xf381
movl $0x9, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x521b
movq -0x18(%rbp), %rdi
leaq 0xc50f(%rip), %rsi      # 0x116d0
leaq 0xf824(%rip), %rdx      # 0x149ec
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x51e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
cmpl $0x0, 0xf805(%rip)      # 0x149ec
je 0x5216
cmpl $0x1, 0xf7fc(%rip)      # 0x149ec
je 0x5216
movq 0xedf7(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0xa188(%rip), %rsi      # 0xf38b
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5db9
movq -0x10(%rbp), %rdi
leaq 0xa183(%rip), %rsi      # 0xf3a9
movl $0x4, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5264
movq -0x18(%rbp), %rdi
leaq 0xc490(%rip), %rsi      # 0x116d0
leaq 0xf7a9(%rip), %rdx      # 0x149f0
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x525f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5db7
movq -0x10(%rbp), %rdi
leaq 0xa144(%rip), %rsi      # 0xf3b3
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x52ad
movq -0x18(%rbp), %rdi
leaq 0xc447(%rip), %rsi      # 0x116d0
leaq 0xf760(%rip), %rdx      # 0x149f0
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x52a8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5db5
movq -0x10(%rbp), %rdi
leaq 0xa104(%rip), %rsi      # 0xf3bc
movl $0x10, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x52f6
movq -0x18(%rbp), %rdi
leaq 0xc3fe(%rip), %rsi      # 0x116d0
leaq 0xf03f(%rip), %rdx      # 0x14318
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x52f1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5db3
movq -0x10(%rbp), %rdi
leaq 0xa0cc(%rip), %rsi      # 0xf3cd
movl $0xf, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x533f
movq -0x18(%rbp), %rdi
leaq 0xc3b5(%rip), %rsi      # 0x116d0
leaq 0xeffa(%rip), %rdx      # 0x1431c
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x533a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5db1
movq -0x10(%rbp), %rdi
leaq 0xa093(%rip), %rsi      # 0xf3dd
callq 0x3250
cmpl $0x0, %eax
je 0x536e
movq -0x10(%rbp), %rdi
leaq 0xa086(%rip), %rsi      # 0xf3e5
movl $0xa, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x539d
movq -0x18(%rbp), %rdi
leaq 0xc357(%rip), %rsi      # 0x116d0
leaq 0xef24(%rip), %rdx      # 0x142a4
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x5398
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5daf
movq -0x10(%rbp), %rdi
leaq 0xa048(%rip), %rsi      # 0xf3f0
movl $0xb, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x53e6
movq -0x18(%rbp), %rdi
leaq 0xc30e(%rip), %rsi      # 0x116d0
leaq 0xeedf(%rip), %rdx      # 0x142a8
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x53e1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5dad
movq -0x10(%rbp), %rdi
leaq 0xa00f(%rip), %rsi      # 0xf400
movl $0xa, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x542f
movq -0x18(%rbp), %rdi
leaq 0xc2c5(%rip), %rsi      # 0x116d0
leaq 0xf5e2(%rip), %rdx      # 0x149f4
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x542a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5dab
movq -0x10(%rbp), %rdi
leaq 0x9fd3(%rip), %rsi      # 0xf40d
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5478
movq -0x18(%rbp), %rdi
leaq 0xc27c(%rip), %rsi      # 0x116d0
leaq 0xf8ed(%rip), %rdx      # 0x14d48
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x5473
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5da9
movq -0x10(%rbp), %rdi
leaq 0x9f90(%rip), %rsi      # 0xf413
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x54c1
movq -0x18(%rbp), %rdi
leaq 0xc233(%rip), %rsi      # 0x116d0
leaq 0xfb7c(%rip), %rdx      # 0x15020
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x54bc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5da7
movq -0x10(%rbp), %rdi
leaq 0x9f53(%rip), %rsi      # 0xf41f
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x550a
movq -0x18(%rbp), %rdi
leaq 0xc1ea(%rip), %rsi      # 0x116d0
leaq 0xfb3b(%rip), %rdx      # 0x15028
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x5505
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5da5
movq -0x10(%rbp), %rdi
leaq 0x9f14(%rip), %rsi      # 0xf429
movl $0x4, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x553e
movq -0x18(%rbp), %rsi
leaq 0xfb01(%rip), %rdi      # 0x15030
movl $0xc7, %edx
callq 0x3090
jmp 0x5da3
movq -0x10(%rbp), %rdi
leaq 0x9eeb(%rip), %rsi      # 0xf434
movl $0x3, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x560a
movq -0x18(%rbp), %rdi
leaq 0x9ed1(%rip), %rsi      # 0xf438
leaq 0x12632(%rip), %rdx     # 0x17ba0
movq %rdx, %rcx
addq $0x4, %rcx
movb $0x0, %al
callq 0x3370
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x5597
cmpl $0x2, -0x1c(%rbp)
je 0x5597
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
cmpl $0x1, -0x1c(%rbp)
jne 0x55b0
leaq 0x125fc(%rip), %rax     # 0x17ba0
movl (%rax), %ecx
leaq 0x125f3(%rip), %rax     # 0x17ba0
movl %ecx, 0x4(%rax)
leaq 0x125e9(%rip), %rax     # 0x17ba0
movl (%rax), %eax
leaq 0x125e0(%rip), %rcx     # 0x17ba0
cmpl 0x4(%rcx), %eax
jg 0x55e1
leaq 0x125d4(%rip), %rax     # 0x17ba0
cmpl $0x1900, 0x4(%rax)      # imm = 0x1900
jg 0x55e1
leaq 0x125c4(%rip), %rax     # 0x17ba0
cmpl $0xa, (%rax)
jge 0x5605
movq 0xea08(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9e4c(%rip), %rsi      # 0xf43e
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5da1
movq -0x10(%rbp), %rdi
leaq 0x9e4c(%rip), %rsi      # 0xf461
movl $0x3, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5703
movq -0x18(%rbp), %rdi
leaq 0x9e37(%rip), %rsi      # 0xf46a
leaq 0x12566(%rip), %rcx     # 0x17ba0
movq %rcx, %rdx
addq $0x8, %rdx
addq $0xc, %rcx
movb $0x0, %al
callq 0x3370
movl %eax, -0x20(%rbp)
cmpl $0x1, -0x20(%rbp)
je 0x5667
cmpl $0x2, -0x20(%rbp)
je 0x5667
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
cmpl $0x1, -0x20(%rbp)
jne 0x5685
leaq 0x1252c(%rip), %rax     # 0x17ba0
movss 0x8(%rax), %xmm0
leaq 0x12520(%rip), %rax     # 0x17ba0
movss %xmm0, 0xc(%rax)
leaq 0x12514(%rip), %rax     # 0x17ba0
movss 0x8(%rax), %xmm0
leaq 0x12508(%rip), %rax     # 0x17ba0
ucomiss 0xc(%rax), %xmm0
ja 0x56da
leaq 0x124fb(%rip), %rax     # 0x17ba0
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x8cfa(%rip), %xmm1     # 0xe3b0
ucomisd %xmm1, %xmm0
ja 0x56da
leaq 0x124dd(%rip), %rax     # 0x17ba0
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x8ce4(%rip), %xmm0     # 0xe3b8
ucomisd %xmm1, %xmm0
jbe 0x56fe
movq 0xe90f(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9d85(%rip), %rsi      # 0xf470
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5d9f
movq -0x10(%rbp), %rdi
leaq 0x9d9c(%rip), %rsi      # 0xf4aa
movl $0x6, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5791
movq -0x18(%rbp), %rdi
leaq 0xbfa8(%rip), %rsi      # 0x116d0
leaq 0x12471(%rip), %rdx     # 0x17ba0
addq $0x10, %rdx
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x574b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
leaq 0x1244e(%rip), %rax     # 0x17ba0
cmpl $0x32, 0x10(%rax)
jl 0x5768
leaq 0x12441(%rip), %rax     # 0x17ba0
cmpl $0xff, 0x10(%rax)
jle 0x578c
movq 0xe881(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9d38(%rip), %rsi      # 0xf4b1
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5d9d
movq -0x10(%rbp), %rdi
leaq 0x9d4a(%rip), %rsi      # 0xf4e6
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5822
movq -0x18(%rbp), %rdi
leaq 0xbf1a(%rip), %rsi      # 0x116d0
leaq 0x123e3(%rip), %rdx     # 0x17ba0
addq $0x14, %rdx
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x57d9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
leaq 0x123c0(%rip), %rax     # 0x17ba0
cmpl $0x3e8, 0x14(%rax)      # imm = 0x3E8
jl 0x57f9
leaq 0x123b0(%rip), %rax     # 0x17ba0
cmpl $0xc350, 0x14(%rax)     # imm = 0xC350
jle 0x581d
movq 0xe7f0(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9cea(%rip), %rsi      # 0xf4f4
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5d9b
movq -0x10(%rbp), %rdi
leaq 0x9cf1(%rip), %rsi      # 0xf51e
movl $0xb, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5856
movq -0x18(%rbp), %rsi
leaq 0xf8b9(%rip), %rdi      # 0x15100
movl $0xc7, %edx
callq 0x3090
jmp 0x5d99
movq -0x10(%rbp), %rdi
leaq 0x9cc9(%rip), %rsi      # 0xf52a
movl $0xc, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x588a
movq -0x18(%rbp), %rsi
leaq 0xf955(%rip), %rdi      # 0x151d0
movl $0xc7, %edx
callq 0x3090
jmp 0x5d97
movq -0x10(%rbp), %rdi
leaq 0x9ca2(%rip), %rsi      # 0xf537
movl $0xd, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x58f6
movq -0x18(%rbp), %rdi
leaq 0x9b89(%rip), %rsi      # 0xf438
leaq 0xe9f6(%rip), %rdx      # 0x142ac
leaq 0xe9f3(%rip), %rcx      # 0x142b0
movb $0x0, %al
callq 0x3370
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
je 0x58df
cmpl $0x2, -0x24(%rbp)
je 0x58df
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
cmpl $0x1, -0x24(%rbp)
jne 0x58f1
movl 0xe9c1(%rip), %eax      # 0x142ac
movl %eax, 0xe9bf(%rip)      # 0x142b0
jmp 0x5d95
movq -0x10(%rbp), %rdi
leaq 0x9c44(%rip), %rsi      # 0xf545
movl $0x4, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x592a
movq -0x18(%rbp), %rsi
leaq 0xf1c5(%rip), %rdi      # 0x14ae0
movl $0xc7, %edx
callq 0x3090
jmp 0x5d93
movq -0x10(%rbp), %rdi
leaq 0x9c18(%rip), %rsi      # 0xf54d
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5a0f
movq -0x18(%rbp), %rsi
leaq 0xf25d(%rip), %rdi      # 0x14bb0
movl $0xc7, %edx
callq 0x3090
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0xf241(%rip), %rax      # 0x14bb0
cmpb $0x0, (%rax,%rcx)
je 0x5a0a
movslq -0x28(%rbp), %rcx
leaq 0xf22c(%rip), %rax      # 0x14bb0
movsbl (%rax,%rcx), %eax
cmpl $0x25, %eax
jne 0x59fa
movl $0x0, -0x2c(%rbp)
cmpl $0xa, -0x2c(%rbp)
jge 0x59d0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0xf206(%rip), %rax      # 0x14bb0
movsbl (%rax,%rcx), %eax
movslq -0x2c(%rbp), %rdx
leaq 0x9b9e(%rip), %rcx      # 0xf557
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x59c3
jmp 0x59d0
jmp 0x59c5
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5994
cmpl $0xa, -0x2c(%rbp)
jl 0x59f8
movq 0xe613(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9b7b(%rip), %rsi      # 0xf562
movb $0x0, %al
callq 0x3290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3480
jmp 0x59fa
jmp 0x59fc
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5964
jmp 0x5d91
movq -0x10(%rbp), %rdi
leaq 0x9b8f(%rip), %rsi      # 0xf5a9
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5a43
movq -0x18(%rbp), %rsi
leaq 0xf24c(%rip), %rdi      # 0x14c80
movl $0xc7, %edx
callq 0x3090
jmp 0x5d8f
movq -0x10(%rbp), %rdi
leaq 0x9b66(%rip), %rsi      # 0xf5b4
movl $0x8, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5a77
movq -0x18(%rbp), %rsi
leaq 0xf418(%rip), %rdi      # 0x14e80
movl $0xc7, %edx
callq 0x3090
jmp 0x5d8d
movq -0x10(%rbp), %rdi
leaq 0x9b3c(%rip), %rsi      # 0xf5be
movl $0xc, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5aab
movq -0x18(%rbp), %rsi
leaq 0xf4b4(%rip), %rdi      # 0x14f50
movl $0xc7, %edx
callq 0x3090
jmp 0x5d8b
movq -0x10(%rbp), %rdi
leaq 0x9b15(%rip), %rsi      # 0xf5cb
movl $0x3, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5ae4
movq -0x18(%rbp), %rsi
leaq 0xf348(%rip), %rdi      # 0x14e18
callq 0x6200
cmpl $0x0, %eax
jne 0x5adf
jmp 0x5d50
jmp 0x5d89
movq -0x10(%rbp), %rdi
leaq 0x9ae3(%rip), %rsi      # 0xf5d2
movl $0x4, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5b99
cmpl $0x5, 0xf36f(%rip)      # 0x14e78
jl 0x5b2d
movq 0xe4de(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x9abe(%rip), %rsi      # 0xf5da
movb $0x0, %al
callq 0x3290
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3480
movq -0x18(%rbp), %rsi
leaq -0x3c(%rbp), %rdi
callq 0x6200
cmpl $0x0, %eax
jne 0x5b44
jmp 0x5d50
movl -0x3c(%rbp), %esi
movl -0x38(%rbp), %edx
movl -0x34(%rbp), %ecx
movl -0x30(%rbp), %r8d
leaq 0x9a9b(%rip), %rdi      # 0xf5f3
movb $0x0, %al
callq 0x3170
movl 0xf313(%rip), %eax      # 0x14e78
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xf308(%rip)      # 0x14e78
movslq %eax, %rcx
leaq 0xf29e(%rip), %rax      # 0x14e18
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x3c(%rbp), %rcx
movq %rcx, (%rax)
movq -0x34(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x5d87
movq -0x10(%rbp), %rdi
leaq 0x9a70(%rip), %rsi      # 0xf614
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5bcd
movq -0x18(%rbp), %rsi
leaq 0xf192(%rip), %rdi      # 0x14d50
movl $0xc7, %edx
callq 0x3090
jmp 0x5d85
movq -0x10(%rbp), %rdi
leaq 0x9a44(%rip), %rsi      # 0xf61c
movl $0x5, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5c0b
movq -0x18(%rbp), %rsi
leaq 0xee1e(%rip), %rdi      # 0x14a10
movl $0xc7, %edx
callq 0x3090
movl $0x0, 0xedda(%rip)      # 0x149e0
jmp 0x5d83
movq -0x10(%rbp), %rdi
leaq 0x9a0c(%rip), %rsi      # 0xf622
movl $0x6, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5c49
movq -0x18(%rbp), %rsi
leaq 0xede0(%rip), %rdi      # 0x14a10
movl $0xc7, %edx
callq 0x3090
movl $0x1, 0xed9c(%rip)      # 0x149e0
jmp 0x5d81
movq -0x10(%rbp), %rdi
leaq 0x99d8(%rip), %rsi      # 0xf62c
movl $0x6, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5c7d
movq -0x18(%rbp), %rsi
leaq 0xf732(%rip), %rdi      # 0x153a0
movl $0xc7, %edx
callq 0x3090
jmp 0x5d7f
movq -0x10(%rbp), %rdi
leaq 0x99ac(%rip), %rsi      # 0xf634
movl $0x7, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5cc6
movq -0x18(%rbp), %rdi
leaq 0xba2e(%rip), %rsi      # 0x116d0
leaq 0xf617(%rip), %rdx      # 0x152c0
movb $0x0, %al
callq 0x3370
cmpl $0x1, %eax
je 0x5cc1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5d7d
movq -0x10(%rbp), %rdi
leaq 0x996b(%rip), %rsi      # 0xf63c
movl $0xf, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5cfa
movq -0x18(%rbp), %rsi
leaq 0xf5e5(%rip), %rdi      # 0x152d0
movl $0xc7, %edx
callq 0x3090
jmp 0x5d7b
movq -0x10(%rbp), %rdi
leaq 0x9947(%rip), %rsi      # 0xf64c
movl $0x7, %edx
callq 0x6140
cmpl $0x0, %eax
je 0x5d2b
movq -0x18(%rbp), %rsi
leaq 0xf581(%rip), %rdi      # 0x152a0
movl $0x1d, %edx
callq 0x3090
jmp 0x5d79
movq 0xe2be(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x9914(%rip), %rsi      # 0xf654
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
movq 0xe299(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x9909(%rip), %rsi      # 0xf672
movb $0x0, %al
callq 0x3290
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5dc6
jmp 0x5d7b
jmp 0x5d7d
jmp 0x5d7f
jmp 0x5d81
jmp 0x5d83
jmp 0x5d85
jmp 0x5d87
jmp 0x5d89
jmp 0x5d8b
jmp 0x5d8d
jmp 0x5d8f
jmp 0x5d91
jmp 0x5d93
jmp 0x5d95
jmp 0x5d97
jmp 0x5d99
jmp 0x5d9b
jmp 0x5d9d
jmp 0x5d9f
jmp 0x5da1
jmp 0x5da3
jmp 0x5da5
jmp 0x5da7
jmp 0x5da9
jmp 0x5dab
jmp 0x5dad
jmp 0x5daf
jmp 0x5db1
jmp 0x5db3
jmp 0x5db5
jmp 0x5db7
jmp 0x5db9
jmp 0x5dbb
jmp 0x5dbd
jmp 0x5dbf
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop