// File: ctSkennerton[P]fxtract/util/./railgun7g.c
// Function: Railgun7g
char *
Railgun7g(char *pbTarget, int cbTarget, char *pbPattern, int cbPattern)
{
    char *pbTargetMax = pbTarget + cbTarget;
    register unsigned long ulHashPattern;
    register unsigned long ulHashTarget;
    signed long count;
    signed long countSTATIC;

    unsigned char SINGLET;
    unsigned long Quadruplet2nd;
    unsigned long Quadruplet3rd;
    unsigned long Quadruplet4th;

    int         AdvanceHopperGrass;

    long i;                     //BMH needed
    int a, j;
    //UNUSED unsigned int bm_bc[256];    //BMH needed
    //UNUSED unsigned int bm_bc2nd[256]; //BMS needed
    unsigned char bm_Sunday_Order2[256 * 256];  //BMHSS(Elsiane) needed, 'char' limits patterns to 255, if 'long' then table becomes 256KB, grrr.
    int     Gulliver;     // or unsigned char or unsigned short

    if (cbPattern > cbTarget)
        return (NULL);

    if (cbPattern < 4) {
        pbTarget = pbTarget + cbPattern;
        ulHashPattern =
            ((*(char *) (pbPattern)) << 8) + *(pbPattern + (cbPattern - 1));

        if (cbPattern == 3) {
            for (;;) {
                if (ulHashPattern == (uint32_t)
                    ((*(uint8_t const *) (pbTarget - 3)) << 8) + *(uint8_t const*)(pbTarget - 1)) {
                    if (*(uint8_t const*) (pbPattern + 1) == *(uint8_t const *) (pbTarget - 2))
                        return ((pbTarget - 3));
                }
                if ((char) (ulHashPattern >> 8) != *(pbTarget - 2))
                    pbTarget++;
                pbTarget++;
                if (pbTarget > pbTargetMax)
                    return (NULL);
            }
        }
        else {
        }
        for (;;) {
            if (ulHashPattern == (uint32_t)
                ((*(uint8_t const*) (pbTarget - 2)) << 8) + *(uint8_t const*)(pbTarget - 1))
                return((pbTarget-2));
            if ((char) (ulHashPattern >> 8) != *(pbTarget - 1))
                pbTarget++;
            pbTarget++;
            if (pbTarget > pbTargetMax)
                return (NULL);
        }
    }
    else {                      //if ( cbPattern<4)
        if (cbTarget < 961) {   // This value is arbitrary(don't know how exactly), it ensures(at least must) better performance than 'Boyer_Moore_Horspool'.
            pbTarget = pbTarget + cbPattern;
            ulHashPattern = *(unsigned long *) (pbPattern);

            SINGLET = ulHashPattern & 0xFF;
            Quadruplet2nd = SINGLET << 8;
            Quadruplet3rd = SINGLET << 16;
            Quadruplet4th = SINGLET << 24;

            for (;;) {
                AdvanceHopperGrass = 0;
                ulHashTarget = *(unsigned long *) (pbTarget - cbPattern);

                if (ulHashPattern == ulHashTarget) {    // Three unnecessary comparisons here, but 'AdvanceHopperGrass' must be calculated - it has a higher priority.
                    count = cbPattern - 1;
                    while (count
                           && *(char *) (pbPattern + (cbPattern - count)) ==
                           *(char *) (pbTarget - count)) {
                        if (cbPattern - 1 == AdvanceHopperGrass + count
                            && SINGLET != *(char *) (pbTarget - count))
                            AdvanceHopperGrass++;
                        count--;
                    }
                    if (count == 0)
                        return((pbTarget-cbPattern));
                }
                else {          // The goal here: to avoid memory accesses by stressing the registers.
                    if (Quadruplet2nd != (ulHashTarget & 0x0000FF00)) {
                        AdvanceHopperGrass++;
                        if (Quadruplet3rd != (ulHashTarget & 0x00FF0000)) {
                            AdvanceHopperGrass++;
                            if (Quadruplet4th != (ulHashTarget & 0xFF000000))
                                AdvanceHopperGrass++;
                        }
                    }
                }

                AdvanceHopperGrass++;

                pbTarget = pbTarget + AdvanceHopperGrass;
                if (pbTarget > pbTargetMax)
                    return (NULL);
            }
        }
        else {                  //if (cbTarget<961)
            countSTATIC = cbPattern - 2 - 2;

            //UNUSED for (a = 0; a < 256; a++) bm_bc[a] = cbPattern, bm_bc2nd[a] = cbPattern + 1;
            //for (j = 0; j < cbPattern - 1; j++) bm_bc[(uint8_t)pbPattern[j]] = cbPattern - j - 1;
            //for (j = 0; j < cbPattern; j++) bm_bc2nd[(uint8_t)pbPattern[j]] = cbPattern - j;

            // Elsiane r.2  [
            for (a = 0; a < 256 * 256; a++) {
                bm_Sunday_Order2[a] = cbPattern - 1;
            }                   // 'memset' if not optimized

            // alfalfa 7 long 6 BBs (al lf fa al lf fa) 3 distinct BBs (al lf fa) 
            // fast 4 0-1-2 fa as st
            for (j = 0; j < cbPattern - 1; j++)
                bm_Sunday_Order2[*(unsigned short *) (pbPattern + j)] = j;  // Rightmost appearance/position is needed

            // Elsiane r.2 ]

            ulHashPattern = *(unsigned short *) (pbPattern + cbPattern - 1 - 1);    // Last two bytes
            ulHashTarget = *(unsigned long *) (pbPattern);  // First four bytes

            AdvanceHopperGrass = 0;
            i = 0;
            while (i <= cbTarget - cbPattern - 1 - 1) {
                Gulliver =
                    bm_Sunday_Order2[*(unsigned short *)
                                     &pbTarget[i + cbPattern - 1 - 1]];

                if (Gulliver == cbPattern - 2) {    // CASE #1: means the pair (char order 2) is found
                    if (*(unsigned long *) &pbTarget[i] == ulHashTarget) {
                        count = countSTATIC;    // Last two chars already matched, to be fixed with -2
                        while (count != 0
                               && *(char *) (pbPattern + (countSTATIC - count) +
                                             4) ==
                               *(char *) (&pbTarget[i] + (countSTATIC - count) +
                                          4))
                            count--;
                        if (count == 0)
                            return(pbTarget+i);
                    }
                    i = i + 1;
                }
                else if (Gulliver == cbPattern - 1) // CASE #2: means the pair (char order 2) is found
                    i = i + Gulliver;   // the pair is not found, skip the whole pattern and fall back one char
                else
                    i = i + cbPattern - Gulliver - 2;   // CASE #3: the pair is found and not as suffix i.e. rightmost position

// 32323218 Order 1 Horspool
// fa af fa af fa as st Order 2 Horspool
//  0  1  2  3  4  5  6
// HIKARIfast
// fafafast
//   fafafast +2 Order 1 'a' vs 't'
//   fafafast +2 = (cbPattern-Gulliver-2 = 8-4-2 = 2) Order 2 'fa' vs 'st' i.e. CASE #3

// 76543218 Order 1 Horspool
// lo on ng gp pa ac ce Order 2 Horspool
//  0  1  2  3  4  5  6
// HIKARIfast
// longpace
//   longpace +2 Order 1 'a' vs 'e'
//        longpace +7 = (cbPattern-1 = 8-1 = 7) Order 2 'fa' vs 'ce' i.e. CASE #2

                AdvanceHopperGrass++;
            }

            if (i == cbTarget - cbPattern - 1) {
                if (*(unsigned long *) &pbTarget[i] == ulHashPattern) {
                    count = countSTATIC;
                    while (count != 0
                           && *(char *) (pbPattern + (countSTATIC - count) +
                                         4) ==
                           *(char *) (&pbTarget[i] + (countSTATIC - count) + 4))
                        count--;
                    if (count == 0)
                        return(pbTarget+i);
                }
                i++;
                AdvanceHopperGrass++;
            }

            if (i == cbTarget - cbPattern) {
                if (*(unsigned long *) &pbTarget[i] == ulHashPattern) {
                    count = countSTATIC;
                    while (count != 0
                           && *(char *) (pbPattern + (countSTATIC - count) +
                                         4) ==
                           *(char *) (&pbTarget[i] + (countSTATIC - count) + 4))
                        count--;
                    if (count == 0)
                        return(pbTarget+i);
                }
                AdvanceHopperGrass++;
            }
#if 0
            GlobalSP += (int) ((double) cbTarget / AdvanceHopperGrass * 100);
            GlobalI += AdvanceHopperGrass;
            printf
                ("Skip-Performance(bigger-the-better): %d%%, %d skips/iterations\n",
                 (int) ((double) cbTarget / AdvanceHopperGrass * 100),
                 AdvanceHopperGrass);
#endif
            return (NULL);
        }                       //if (cbTarget<961)
    }                           //if ( cbPattern<4)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10020, %rsp          # imm = 0x10020
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jle 0x4a0d
movq $0x0, -0x8(%rbp)
jmp 0x50a8
cmpl $0x4, -0x24(%rbp)
jge 0x4b64
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
addl %ecx, %eax
cltq
movq %rax, -0x38(%rbp)
cmpl $0x3, -0x24(%rbp)
jne 0x4ae7
jmp 0x4a55
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl -0x3(%rcx), %ecx
shll $0x8, %ecx
movq -0x10(%rbp), %rdx
movzbl -0x1(%rdx), %edx
addl %edx, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x4a9c
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl -0x2(%rcx), %ecx
cmpl %ecx, %eax
jne 0x4a9a
movq -0x10(%rbp), %rax
addq $-0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
jmp 0x4a9c
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movsbl %al, %eax
movq -0x10(%rbp), %rcx
movsbl -0x2(%rcx), %ecx
cmpl %ecx, %eax
je 0x4abf
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x4ae2
movq $0x0, -0x8(%rbp)
jmp 0x50a8
jmp 0x4a55
jmp 0x4ae9
jmp 0x4aeb
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
movq -0x10(%rbp), %rdx
movzbl -0x1(%rdx), %edx
addl %edx, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jne 0x4b1c
movq -0x10(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movsbl %al, %eax
movq -0x10(%rbp), %rcx
movsbl -0x1(%rcx), %ecx
cmpl %ecx, %eax
je 0x4b3f
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x4b62
movq $0x0, -0x8(%rbp)
jmp 0x50a8
jmp 0x4aeb
cmpl $0x3c1, -0x14(%rbp)     # imm = 0x3C1
jge 0x4d34
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
andq $0xff, %rax
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
shll $0x8, %eax
cltq
movq %rax, -0x60(%rbp)
movzbl -0x51(%rbp), %eax
shll $0x10, %eax
cltq
movq %rax, -0x68(%rbp)
movzbl -0x51(%rbp), %eax
shll $0x18, %eax
cltq
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x4ca0
movl -0x24(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x10095(%rbp)
je 0x4c2d
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
subq -0x48(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
subq -0x48(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x10095(%rbp)
movb -0x10095(%rbp), %al
testb $0x1, %al
jne 0x4c39
jmp 0x4c7e
movl -0x24(%rbp), %eax
subl $0x1, %eax
cltq
movslq -0x74(%rbp), %rcx
addq -0x48(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4c6d
movzbl -0x51(%rbp), %eax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
subq -0x48(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x4c6d
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x4bf5
cmpq $0x0, -0x48(%rbp)
jne 0x4c9e
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
jmp 0x4d00
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
andq $0xff00, %rcx           # imm = 0xFF00
cmpq %rcx, %rax
je 0x4cfe
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x68(%rbp), %rax
movq -0x40(%rbp), %rcx
andq $0xff0000, %rcx         # imm = 0xFF0000
cmpq %rcx, %rax
je 0x4cfc
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x70(%rbp), %rax
movabsq $0xff000000, %rcx       # imm = 0xFF000000
andq -0x40(%rbp), %rcx
cmpq %rcx, %rax
je 0x4cfa
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4cfc
jmp 0x4cfe
jmp 0x4d00
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x10(%rbp), %rax
movslq -0x74(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x4d2f
movq $0x0, -0x8(%rbp)
jmp 0x50a8
jmp 0x4bbf
movl -0x24(%rbp), %eax
subl $0x2, %eax
subl $0x2, %eax
cltq
movq %rax, -0x50(%rbp)
movl $0x0, -0x84(%rbp)
cmpl $0x10000, -0x84(%rbp)   # imm = 0x10000
jge 0x4d80
movl -0x24(%rbp), %eax
subl $0x1, %eax
movb %al, %cl
movslq -0x84(%rbp), %rax
movb %cl, -0x10090(%rbp,%rax)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x4d4d
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4dc9
movl -0x88(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movslq -0x88(%rbp), %rdx
movzwl (%rax,%rdx), %eax
movb %cl, -0x10090(%rbp,%rax)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x4d8a
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movzwl -0x2(%rax,%rcx), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
movl -0x14(%rbp), %ecx
subl -0x24(%rbp), %ecx
subl $0x1, %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jg 0x4f3a
movq -0x10(%rbp), %rax
movq -0x80(%rbp), %rcx
movslq -0x24(%rbp), %rdx
addq %rdx, %rcx
subq $0x1, %rcx
subq $0x1, %rcx
movzwl (%rax,%rcx), %eax
movzbl -0x10090(%rbp,%rax), %eax
movl %eax, -0x10094(%rbp)
movl -0x10094(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x4ee9
movq -0x10(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx), %rax
cmpq -0x40(%rbp), %rax
jne 0x4edb
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x10096(%rbp)
je 0x4ea7
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq -0x48(%rbp), %rcx
movsbl 0x4(%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
addq -0x80(%rbp), %rcx
movq -0x50(%rbp), %rdx
subq -0x48(%rbp), %rdx
movsbl 0x4(%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x10096(%rbp)
movb -0x10096(%rbp), %al
testb $0x1, %al
jne 0x4eb3
jmp 0x4ec1
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x4e67
cmpq $0x0, -0x48(%rbp)
jne 0x4ed9
movq -0x10(%rbp), %rax
addq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
jmp 0x4edb
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x4f2c
movl -0x10094(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4f0d
movq -0x80(%rbp), %rax
movslq -0x10094(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0x4f2a
movq -0x80(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movslq -0x10094(%rbp), %rcx
subq %rcx, %rax
subq $0x2, %rax
movq %rax, -0x80(%rbp)
jmp 0x4f2c
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4df4
movq -0x80(%rbp), %rax
movl -0x14(%rbp), %ecx
subl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jne 0x4ff6
movq -0x10(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx), %rax
cmpq -0x38(%rbp), %rax
jne 0x4fe1
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x10097(%rbp)
je 0x4fad
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq -0x48(%rbp), %rcx
movsbl 0x4(%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
addq -0x80(%rbp), %rcx
movq -0x50(%rbp), %rdx
subq -0x48(%rbp), %rdx
movsbl 0x4(%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x10097(%rbp)
movb -0x10097(%rbp), %al
testb $0x1, %al
jne 0x4fb9
jmp 0x4fc7
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x4f6d
cmpq $0x0, -0x48(%rbp)
jne 0x4fdf
movq -0x10(%rbp), %rax
addq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
jmp 0x4fe1
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x80(%rbp), %rax
movl -0x14(%rbp), %ecx
subl -0x24(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jne 0x50a0
movq -0x10(%rbp), %rax
movq -0x80(%rbp), %rcx
movq (%rax,%rcx), %rax
cmpq -0x38(%rbp), %rax
jne 0x5097
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x48(%rbp)
movb %al, -0x10098(%rbp)
je 0x5066
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq -0x48(%rbp), %rcx
movsbl 0x4(%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
addq -0x80(%rbp), %rcx
movq -0x50(%rbp), %rdx
subq -0x48(%rbp), %rdx
movsbl 0x4(%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x10098(%rbp)
movb -0x10098(%rbp), %al
testb $0x1, %al
jne 0x5072
jmp 0x5080
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x5026
cmpq $0x0, -0x48(%rbp)
jne 0x5095
movq -0x10(%rbp), %rax
addq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x50a8
jmp 0x5097
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10020, %rsp          # imm = 0x10020
popq %rbp
retq
nopw %cs:(%rax,%rax)