// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x73c1(%rip), %rsi      # 0xc313
movl $0x1, %ebp
movl $0x1, %edx
callq 0x5a02
testl %eax, %eax
jne 0x4f7d
leaq 0x73ad(%rip), %rsi      # 0xc319
movq %r14, %rdi
movl $0x1, %edx
callq 0x5a02
testl %eax, %eax
je 0x4f8e
incl 0xda15(%rip)            # 0x12998
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
testq %rbx, %rbx
je 0x502c
leaq 0x73b3(%rip), %rsi      # 0xc351
movq %r14, %rdi
movl $0x4, %edx
callq 0x5a02
testl %eax, %eax
je 0x4fcd
movsbl (%rbx), %eax
addl $-0x30, %eax
movl %eax, 0xd9c9(%rip)      # 0x12984
cmpl $0x1, %eax
ja 0x4fc6
cmpb $0x0, 0x1(%rbx)
je 0x4fe5
callq 0x35e2
jmp 0x4fe5
leaq 0x6200(%rip), %rsi      # 0xb1d4
movq %r14, %rdi
movl $0xa, %edx
callq 0x5a02
testl %eax, %eax
je 0x4fec
movl $0x2, %ebp
jmp 0x4f83
leaq 0x738a(%rip), %rsi      # 0xc37d
movq %r14, %rdi
movl $0xa, %edx
callq 0x5a02
testl %eax, %eax
je 0x5051
leaq 0x96a9(%rip), %rsi      # 0xe6b4
leaq 0xd976(%rip), %rdx      # 0x12988
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %eax
jne 0x4f83
jmp 0x4fe5
movq 0xcfc5(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x72e4(%rip), %rsi      # 0xc321
movq %r14, %rdx
xorl %eax, %eax
callq 0x32a0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x4f83
leaq 0x7330(%rip), %rsi      # 0xc388
movq %r14, %rdi
movl $0x9, %edx
callq 0x5a02
testl %eax, %eax
je 0x50a6
leaq 0x9644(%rip), %rsi      # 0xe6b4
leaq 0xd915(%rip), %rdx      # 0x1298c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %eax
jne 0x4f83
cmpl $0x2, 0xd8f6(%rip)      # 0x1298c
jb 0x4fe5
callq 0x35fe
jmp 0x4f83
leaq 0x7303(%rip), %rsi      # 0xc3b0
movq %r14, %rdi
movl $0x4, %edx
callq 0x5a02
testl %eax, %eax
jne 0x50d6
leaq 0x72f5(%rip), %rsi      # 0xc3ba
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x50e9
leaq 0x95d7(%rip), %rsi      # 0xe6b4
leaq 0xd8ac(%rip), %rdx      # 0x12990
jmp 0x5012
leaq 0x72d3(%rip), %rsi      # 0xc3c3
movq %r14, %rdi
movl $0x10, %edx
callq 0x5a02
testl %eax, %eax
je 0x5114
leaq 0x95ac(%rip), %rsi      # 0xe6b4
leaq 0xd1b5(%rip), %rdx      # 0x122c4
jmp 0x5012
leaq 0x72b9(%rip), %rsi      # 0xc3d4
movq %r14, %rdi
movl $0xf, %edx
callq 0x5a02
testl %eax, %eax
je 0x513f
leaq 0x9581(%rip), %rsi      # 0xe6b4
leaq 0xd18e(%rip), %rdx      # 0x122c8
jmp 0x5012
leaq 0x729e(%rip), %rsi      # 0xc3e4
movq %r14, %rdi
callq 0x3260
testl %eax, %eax
je 0x516a
leaq 0x7293(%rip), %rsi      # 0xc3ec
movq %r14, %rdi
movl $0xa, %edx
callq 0x5a02
testl %eax, %eax
je 0x517d
leaq 0x9543(%rip), %rsi      # 0xe6b4
leaq 0xd134(%rip), %rdx      # 0x122ac
jmp 0x5012
leaq 0x7273(%rip), %rsi      # 0xc3f7
movq %r14, %rdi
movl $0xb, %edx
callq 0x5a02
testl %eax, %eax
je 0x51a8
leaq 0x9518(%rip), %rsi      # 0xe6b4
leaq 0xd10d(%rip), %rdx      # 0x122b0
jmp 0x5012
leaq 0x7258(%rip), %rsi      # 0xc407
movq %r14, %rdi
movl $0xa, %edx
callq 0x5a02
testl %eax, %eax
je 0x51d3
leaq 0x94ed(%rip), %rsi      # 0xe6b4
leaq 0xd7c6(%rip), %rdx      # 0x12994
jmp 0x5012
leaq 0x723a(%rip), %rsi      # 0xc414
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x51fe
leaq 0x94c2(%rip), %rsi      # 0xe6b4
leaq 0xdaef(%rip), %rdx      # 0x12ce8
jmp 0x5012
leaq 0x7215(%rip), %rsi      # 0xc41a
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x5229
leaq 0x9497(%rip), %rsi      # 0xe6b4
leaq 0xdd9c(%rip), %rdx      # 0x12fc0
jmp 0x5012
leaq 0x71f6(%rip), %rsi      # 0xc426
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x5254
leaq 0x946c(%rip), %rsi      # 0xe6b4
leaq 0xdd79(%rip), %rdx      # 0x12fc8
jmp 0x5012
leaq 0x71d5(%rip), %rsi      # 0xc430
movq %r14, %rdi
movl $0x4, %edx
callq 0x5a02
testl %eax, %eax
je 0x5285
leaq 0xdd5d(%rip), %rdi      # 0x12fd0
movl $0xc7, %edx
movq %rbx, %rsi
callq 0x3090
jmp 0x4fe5
leaq 0x71af(%rip), %rsi      # 0xc43b
movq %r14, %rdi
movl $0x3, %edx
callq 0x5a02
testl %eax, %eax
je 0x52dd
leaq 0x1086c(%rip), %r14     # 0x15b10
leaq 0x4(%r14), %rcx
leaq 0x7190(%rip), %rsi      # 0xc43f
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3380
leal -0x3(%rax), %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x2, %ecx
jb 0x4f83
movl (%r14), %ecx
cmpl $0x1, %eax
jne 0x5343
movl %ecx, 0x4(%r14)
movl %ecx, %eax
jmp 0x5347
leaq 0x7184(%rip), %rsi      # 0xc468
movq %r14, %rdi
movl $0x3, %edx
callq 0x5a02
testl %eax, %eax
je 0x5365
leaq 0x10814(%rip), %r14     # 0x15b10
leaq 0x8(%r14), %rdx
leaq 0xc(%r14), %rcx
leaq 0x7166(%rip), %rsi      # 0xc471
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
leal -0x3(%rax), %ecx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x2, %ecx
jb 0x4f83
movss 0x8(%r14), %xmm0
cmpl $0x1, %eax
jne 0x53c5
movss %xmm0, 0xc(%r14)
movaps %xmm0, %xmm1
jmp 0x53cb
movl 0x4(%r14), %eax
cmpl $0xa, %ecx
jl 0x535b
cmpl %eax, %ecx
jg 0x535b
cmpl $0x1901, %eax           # imm = 0x1901
jl 0x4fe5
callq 0x361a
jmp 0x4f83
leaq 0x7145(%rip), %rsi      # 0xc4b1
movq %r14, %rdi
movl $0x6, %edx
callq 0x5a02
testl %eax, %eax
je 0x53f9
leaq 0x1078c(%rip), %r14     # 0x15b10
leaq 0x10(%r14), %rdx
leaq 0x9325(%rip), %rsi      # 0xe6b4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %eax
jne 0x4f83
movl $0xffffff00, %eax       # imm = 0xFFFFFF00
addl 0x10(%r14), %eax
cmpl $0xffffff31, %eax       # imm = 0xFFFFFF31
ja 0x4fe5
callq 0x3652
jmp 0x4f83
movss 0xc(%r14), %xmm1
cvtss2sd %xmm0, %xmm2
movsd 0x6001(%rip), %xmm3     # 0xb3d8
ucomisd %xmm2, %xmm3
ja 0x53ef
ucomiss %xmm1, %xmm0
ja 0x53ef
ucomiss 0x5ff7(%rip), %xmm1     # 0xb3e0
jbe 0x4fe5
callq 0x3636
jmp 0x4f83
leaq 0x70ed(%rip), %rsi      # 0xc4ed
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x5459
leaq 0x106f8(%rip), %r14     # 0x15b10
leaq 0x14(%r14), %rdx
leaq 0x9291(%rip), %rsi      # 0xe6b4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %eax
jne 0x4f83
movl $0xffff3caf, %eax       # imm = 0xFFFF3CAF
addl 0x14(%r14), %eax
cmpl $0xffff4096, %eax       # imm = 0xFFFF4096
ja 0x4fe5
callq 0x366e
jmp 0x4f83
leaq 0x70c5(%rip), %rsi      # 0xc525
movq %r14, %rdi
movl $0xb, %edx
callq 0x5a02
testl %eax, %eax
je 0x547d
leaq 0xdc28(%rip), %rdi      # 0x130a0
jmp 0x5273
leaq 0x70ad(%rip), %rsi      # 0xc531
movq %r14, %rdi
movl $0xc, %edx
callq 0x5a02
testl %eax, %eax
je 0x54a1
leaq 0xdcd4(%rip), %rdi      # 0x13170
jmp 0x5273
leaq 0x7096(%rip), %rsi      # 0xc53e
movq %r14, %rdi
movl $0xd, %edx
callq 0x5a02
testl %eax, %eax
je 0x54ee
leaq 0x6f7f(%rip), %rsi      # 0xc43f
leaq 0xcded(%rip), %rdx      # 0x122b4
leaq 0xcdea(%rip), %rcx      # 0x122b8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3380
cmpl $0x1, %eax
jne 0x5512
movl 0xcdd1(%rip), %eax      # 0x122b4
movl %eax, 0xcdcf(%rip)      # 0x122b8
jmp 0x4fe5
leaq 0x7057(%rip), %rsi      # 0xc54c
movq %r14, %rdi
movl $0x4, %edx
callq 0x5a02
testl %eax, %eax
je 0x5527
leaq 0xd573(%rip), %rdi      # 0x12a80
jmp 0x5273
decl %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
jae 0x4f83
jmp 0x4fe5
leaq 0x7026(%rip), %rsi      # 0xc554
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x5593
leaq 0xd60a(%rip), %r14      # 0x12b50
movl $0xc7, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3090
xorl %eax, %eax
leaq 0x6fff(%rip), %rcx      # 0xc55e
movzbl (%rax,%r14), %edx
cmpl $0x25, %edx
je 0x5576
testl %edx, %edx
je 0x4fe5
incq %rax
jmp 0x555f
movb 0x1(%rax,%r14), %dl
incq %rax
xorl %esi, %esi
cmpb (%rsi,%rcx), %dl
je 0x555f
incq %rsi
cmpq $0xa, %rsi
jne 0x5580
callq 0x368a
leaq 0x7016(%rip), %rsi      # 0xc5b0
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x55b7
leaq 0xd66e(%rip), %rdi      # 0x12c20
jmp 0x5273
leaq 0x6ffd(%rip), %rsi      # 0xc5bb
movq %r14, %rdi
movl $0x8, %edx
callq 0x5a02
testl %eax, %eax
je 0x55db
leaq 0xd84a(%rip), %rdi      # 0x12e20
jmp 0x5273
leaq 0x6fe3(%rip), %rsi      # 0xc5c5
movq %r14, %rdi
movl $0xc, %edx
callq 0x5a02
testl %eax, %eax
je 0x55ff
leaq 0xd8f6(%rip), %rdi      # 0x12ef0
jmp 0x5273
leaq 0x6fcc(%rip), %rsi      # 0xc5d2
movq %r14, %rdi
movl $0x3, %edx
callq 0x5a02
testl %eax, %eax
je 0x5633
leaq 0xd79a(%rip), %rdi      # 0x12db8
movq %rbx, %rsi
callq 0x5a7f
testl %eax, %eax
jne 0x4fe5
jmp 0x5711
leaq 0x6f9f(%rip), %rsi      # 0xc5d9
movq %r14, %rdi
movl $0x4, %edx
callq 0x5a02
testl %eax, %eax
je 0x56b2
cmpl $0x5, 0xd7c6(%rip)      # 0x12e18
jge 0x57e2
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x5a7f
testl %eax, %eax
je 0x5711
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
leaq 0x6f78(%rip), %rdi      # 0xc5fa
xorl %eax, %eax
callq 0x3170
movslq 0xd788(%rip), %rax      # 0x12e18
leaq 0xd721(%rip), %rcx      # 0x12db8
leal 0x1(%rax), %edx
movl %edx, 0xd778(%rip)      # 0x12e18
shlq $0x4, %rax
movups (%rsp), %xmm0
movups %xmm0, 0x10(%rax,%rcx)
jmp 0x4fe5
leaq 0x6f62(%rip), %rsi      # 0xc61b
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x56d6
leaq 0xd61f(%rip), %rdi      # 0x12cf0
jmp 0x5273
leaq 0x6f46(%rip), %rsi      # 0xc623
movq %r14, %rdi
movl $0x5, %edx
callq 0x5a02
testl %eax, %eax
je 0x5734
leaq 0xd2bb(%rip), %rdi      # 0x129b0
movl $0xc7, %edx
movq %rbx, %rsi
callq 0x3090
movl $0x0, 0xd274(%rip)      # 0x12980
jmp 0x4fe5
movq 0xc8e0(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x6f57(%rip), %rsi      # 0xc679
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x32a0
jmp 0x5047
leaq 0x6eee(%rip), %rsi      # 0xc629
movq %r14, %rdi
movl $0x6, %edx
callq 0x5a02
testl %eax, %eax
je 0x576f
leaq 0xd25d(%rip), %rdi      # 0x129b0
movl $0xc7, %edx
movq %rbx, %rsi
callq 0x3090
movl $0x1, 0xd216(%rip)      # 0x12980
jmp 0x4fe5
leaq 0x6ebd(%rip), %rsi      # 0xc633
movq %r14, %rdi
movl $0x6, %edx
callq 0x5a02
testl %eax, %eax
je 0x5793
leaq 0xdbb2(%rip), %rdi      # 0x13340
jmp 0x5273
leaq 0x6ea1(%rip), %rsi      # 0xc63b
movq %r14, %rdi
movl $0x7, %edx
callq 0x5a02
testl %eax, %eax
je 0x57be
leaq 0x8f02(%rip), %rsi      # 0xe6b4
leaq 0xdaa7(%rip), %rdx      # 0x13260
jmp 0x5012
leaq 0x6e7e(%rip), %rsi      # 0xc643
movq %r14, %rdi
movl $0xf, %edx
callq 0x5a02
testl %eax, %eax
je 0x57e7
leaq 0xda93(%rip), %rdi      # 0x13270
jmp 0x5273
callq 0x36ab
leaq 0x6e65(%rip), %rsi      # 0xc653
movq %r14, %rdi
movl $0x7, %edx
callq 0x5a02
testl %eax, %eax
je 0x5810
leaq 0xda3a(%rip), %rdi      # 0x13240
movl $0x1d, %edx
jmp 0x5278
movq 0xc7e1(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x6e3a(%rip), %rsi      # 0xc65b
jmp 0x503d