// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__gif_load_next(stbi__context*, stbi__gif*, int*, int, unsigned char*)
static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back)
{
   int dispose; 
   int first_frame; 
   int pi; 
   int pcount; 
   STBI_NOTUSED(req_comp);

   // on first frame, any non-written pixels get the background colour (non-transparent)
   first_frame = 0; 
   if (g->out == 0) {
      if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header
      if (!stbi__mad3sizes_valid(4, g->w, g->h, 0))
         return stbi__errpuc("too large", "GIF image is too large");
      pcount = g->w * g->h;
      g->out = (stbi_uc *) stbi__malloc(4 * pcount);
      g->background = (stbi_uc *) stbi__malloc(4 * pcount);
      g->history = (stbi_uc *) stbi__malloc(pcount);
      if (!g->out || !g->background || !g->history)
         return stbi__errpuc("outofmem", "Out of memory");

      // image is treated as "transparent" at the start - ie, nothing overwrites the current background; 
      // background colour is only used for pixels that are not rendered first frame, after that "background"
      // color refers to the color that was there the previous frame. 
      memset(g->out, 0x00, 4 * pcount);
      memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent)
      memset(g->history, 0x00, pcount);        // pixels that were affected previous frame
      first_frame = 1; 
   } else {
      // second frame - how do we dispoase of the previous one?
      dispose = (g->eflags & 0x1C) >> 2; 
      pcount = g->w * g->h; 

      if ((dispose == 3) && (two_back == 0)) {
         dispose = 2; // if I don't have an image to revert back to, default to the old background
      }

      if (dispose == 3) { // use previous graphic
         for (pi = 0; pi < pcount; ++pi) {
            if (g->history[pi]) {
               memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); 
            }
         }
      } else if (dispose == 2) { 
         // restore what was changed last frame to background before that frame; 
         for (pi = 0; pi < pcount; ++pi) {
            if (g->history[pi]) {
               memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); 
            }
         }
      } else {
         // This is a non-disposal case eithe way, so just 
         // leave the pixels as is, and they will become the new background
         // 1: do not dispose
         // 0:  not specified.
      }

      // background is what out is after the undoing of the previou frame; 
      memcpy( g->background, g->out, 4 * g->w * g->h ); 
   }

   // clear my history; 
   memset( g->history, 0x00, g->w * g->h );        // pixels that were affected previous frame

   for (;;) {
      int tag = stbi__get8(s); 
      switch (tag) {
         case 0x2C: /* Image Descriptor */
         {
            stbi__int32 x, y, w, h;
            stbi_uc *o;

            x = stbi__get16le(s);
            y = stbi__get16le(s);
            w = stbi__get16le(s);
            h = stbi__get16le(s);
            if (((x + w) > (g->w)) || ((y + h) > (g->h)))
               return stbi__errpuc("bad Image Descriptor", "Corrupt GIF");

            g->line_size = g->w * 4;
            g->start_x = x * 4;
            g->start_y = y * g->line_size;
            g->max_x   = g->start_x + w * 4;
            g->max_y   = g->start_y + h * g->line_size;
            g->cur_x   = g->start_x;
            g->cur_y   = g->start_y;

            // if the width of the specified rectangle is 0, that means
            // we may not see *any* pixels or the image is malformed;
            // to make sure this is caught, move the current y down to
            // max_y (which is what out_gif_code checks).
            if (w == 0)
               g->cur_y = g->max_y;

            g->lflags = stbi__get8(s);

            if (g->lflags & 0x40) {
               g->step = 8 * g->line_size; // first interlaced spacing
               g->parse = 3;
            } else {
               g->step = g->line_size;
               g->parse = 0;
            }

            if (g->lflags & 0x80) {
               stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
               g->color_table = (stbi_uc *) g->lpal;
            } else if (g->flags & 0x80) {
               g->color_table = (stbi_uc *) g->pal;
            } else
               return stbi__errpuc("missing color table", "Corrupt GIF");            
            
            o = stbi__process_gif_raster(s, g);
            if (!o) return NULL;

            // if this was the first frame, 
            pcount = g->w * g->h; 
            if (first_frame && (g->bgindex > 0)) {
               // if first frame, any pixel not drawn to gets the background color
               for (pi = 0; pi < pcount; ++pi) {
                  if (g->history[pi] == 0) {
                     g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; 
                     memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); 
                  }
               }
            }

            return o;
         }

         case 0x21: // Comment Extension.
         {
            int len;
            int ext = stbi__get8(s); 
            if (ext == 0xF9) { // Graphic Control Extension.
               len = stbi__get8(s);
               if (len == 4) {
                  g->eflags = stbi__get8(s);
                  g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths.

                  // unset old transparent
                  if (g->transparent >= 0) {
                     g->pal[g->transparent][3] = 255; 
                  } 
                  if (g->eflags & 0x01) {
                     g->transparent = stbi__get8(s);
                     if (g->transparent >= 0) {
                        g->pal[g->transparent][3] = 0; 
                     }
                  } else {
                     // don't need transparent
                     stbi__skip(s, 1); 
                     g->transparent = -1; 
                  }
               } else {
                  stbi__skip(s, len);
                  break;
               }
            } 
            while ((len = stbi__get8(s)) != 0) {
               stbi__skip(s, len);
            }
            break;
         }

         case 0x3B: // gif stream termination code
            return (stbi_uc *) s; // using '1' causes warning on some compilers

         default:
            return stbi__errpuc("unknown code", "Corrupt GIF");
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x35f6d
movl 0x4(%rbx), %eax
movl 0x30(%rbx), %esi
shrl $0x2, %esi
andl $0x7, %esi
imull (%rbx), %eax
cmpl $0x3, %esi
movl $0x2, %edx
cmovnel %esi, %edx
testq %rcx, %rcx
cmovnel %esi, %edx
cmpl $0x3, %edx
je 0x36034
cmpl $0x2, %edx
jne 0x36058
testl %eax, %eax
jle 0x36058
movl %eax, %eax
xorl %ecx, %ecx
movq 0x18(%rbx), %rdx
cmpb $0x0, (%rdx,%rcx)
je 0x35f60
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
movl (%rsi,%rcx,4), %esi
movl %esi, (%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x35f48
jmp 0x36058
xorl %r13d, %r13d
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x36b56
testl %eax, %eax
je 0x36b44
movl (%rbx), %ebp
movl 0x4(%rbx), %r12d
movl $0x4, %edi
movl %ebp, %esi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x32132
testl %eax, %eax
je 0x36b33
imull %ebp, %r12d
leal (,%r12,4), %eax
movslq %eax, %r15
movq %r15, %rdi
callq 0x64c0
movq %rax, %r13
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x64c0
movq %rax, %rbp
movq %rax, 0x10(%rbx)
movslq %r12d, %rdi
movq %rdi, 0x28(%rsp)
callq 0x64c0
movq %rax, %r12
movq %rax, 0x18(%rbx)
leaq 0x9738(%rip), %rax      # 0x3f724
testq %r13, %r13
je 0x36b3a
testq %rbp, %rbp
sete %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
jne 0x36b3a
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x6210
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x6210
movq %r12, %rdi
xorl %esi, %esi
movq 0x28(%rsp), %rdx
callq 0x6210
jmp 0x36074
testl %eax, %eax
jle 0x36058
movl %eax, %eax
xorl %edx, %edx
movq 0x18(%rbx), %rsi
cmpb $0x0, (%rsi,%rdx)
je 0x36050
movq 0x8(%rbx), %rsi
movl (%rcx,%rdx,4), %edi
movl %edi, (%rsi,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x3603c
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
movslq (%rbx), %rax
movslq 0x4(%rbx), %rdx
imulq %rax, %rdx
shlq $0x2, %rdx
callq 0x6330
movq 0x18(%rbx), %rdi
movslq (%rbx), %rax
movslq 0x4(%rbx), %rdx
imulq %rax, %rdx
xorl %esi, %esi
callq 0x6210
leaq 0x38(%r14), %r15
leaq 0x39(%r14), %r12
leaq 0x434(%rbx), %rax
movq %rax, 0x50(%rsp)
leaq 0x34(%rbx), %rax
movq %rax, 0x48(%rsp)
movq %rbx, 0x10(%rsp)
movq %r12, 0x20(%rsp)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36116
cmpl $0x0, 0x30(%r14)
je 0x360f0
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x360f4
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x3610f
xorl %eax, %eax
jmp 0x36123
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
cmpb $0x21, %al
je 0x3619c
movzbl %al, %eax
cmpl $0x3b, %eax
je 0x36192
cmpl $0x2c, %eax
jne 0x361ea
movq %r14, %rdi
callq 0x358cc
movl %eax, %r12d
movq %r14, %rdi
callq 0x358cc
movl %eax, %ebp
movq %r14, %rdi
callq 0x358cc
movl %eax, %r13d
movq %r14, %rdi
callq 0x358cc
leal (%r12,%r13), %edx
movl (%rbx), %ecx
cmpl %ecx, %edx
jg 0x36175
addl %ebp, %eax
cmpl 0x4(%rbx), %eax
jle 0x36202
leaq 0x9b5a(%rip), %rax      # 0x3fcd6
movq %rax, 0x19365(%rip)     # 0x4f4e8
xorl %eax, %eax
xorl %r13d, %r13d
movq 0x20(%rsp), %r12
jmp 0x36b29
xorl %eax, %eax
movq %r14, %r13
jmp 0x36b29
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x362b9
cmpl $0x0, 0x30(%r14)
je 0x36aad
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x36297
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x362b2
leaq 0x9b0e(%rip), %rax      # 0x3fcff
movq %rax, 0x192f0(%rip)     # 0x4f4e8
xorl %eax, %eax
xorl %r13d, %r13d
jmp 0x36b29
shll $0x2, %ecx
movl %ecx, 0x8864(%rbx)
shll $0x2, %r12d
movl %r12d, 0x884c(%rbx)
imull %ecx, %ebp
movl %ebp, 0x8850(%rbx)
shll $0x2, %edx
movl %edx, 0x8854(%rbx)
imull %eax, %ecx
movl %ecx, 0x8858(%rbx)
movl %r12d, 0x885c(%rbx)
testl %r13d, %r13d
cmovnel %ebp, %ecx
movl %ecx, 0x8860(%rbx)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
movq 0x20(%rsp), %r12
jb 0x363ca
cmpl $0x0, 0x30(%r14)
je 0x3639d
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x363a8
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x363c3
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
cmpb $-0x7, (%rax)
jne 0x36aad
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36332
cmpl $0x0, 0x30(%r14)
je 0x3630c
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x36310
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x3632b
xorl %eax, %eax
jmp 0x3633f
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
cmpb $0x4, %al
jne 0x3638d
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x364d6
cmpl $0x0, 0x30(%r14)
je 0x363a1
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x364b4
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x364cf
movzbl %al, %esi
movq %r14, %rdi
callq 0x320e4
jmp 0x36b27
xorl %ecx, %ecx
jmp 0x363d7
xorl %eax, %eax
jmp 0x364e4
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %cl
movzbl %cl, %edx
movl %edx, 0x8848(%rbx)
movl 0x8864(%rbx), %eax
testb $0x40, %dl
jne 0x363fd
movl %eax, 0x8844(%rbx)
movl $0x0, 0x8840(%rbx)
jmp 0x36410
shll $0x3, %eax
movl %eax, 0x8844(%rbx)
movl $0x3, 0x8840(%rbx)
testb %cl, %cl
js 0x36426
testb $-0x80, 0x20(%rbx)
jne 0x36457
leaq 0x98ca(%rip), %rax      # 0x3fceb
jmp 0x361f1
andb $0x7, %cl
movl $0x2, %edx
shll %cl, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, 0x30(%rbx)
je 0x3643e
movl 0x2c(%rbx), %ecx
movq %r14, %rdi
movq 0x50(%rsp), %r13
movq %r13, %rsi
callq 0x3707d
movq %r13, 0x8838(%rbx)
jmp 0x36463
movq 0x48(%rsp), %rax
movq %rax, 0x8838(%rbx)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x365c6
cmpl $0x0, 0x30(%r14)
je 0x364ad
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x365a4
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x365bf
xorl %ecx, %ecx
jmp 0x365d3
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movzbl (%rax), %eax
movl %eax, 0x30(%rbx)
movq %r14, %rdi
callq 0x358cc
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl %eax, 0x8868(%rbx)
movslq 0x2c(%rbx), %rax
testq %rax, %rax
js 0x36508
movb $-0x1, 0x37(%rbx,%rax,4)
testb $0x1, 0x30(%rbx)
jne 0x36534
cmpq $0x0, 0x10(%r14)
je 0x3652b
movq 0xc0(%r14), %rax
movl 0xb8(%r14), %edx
movl %eax, %ecx
subl %edx, %ecx
testl %ecx, %ecx
jle 0x36582
incq 0xb8(%r14)
jmp 0x36598
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36a88
cmpl $0x0, 0x30(%r14)
je 0x36a62
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x36a66
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x36a81
movq %rax, 0xb8(%r14)
movq 0x28(%r14), %rdi
movl $0x1, %esi
subl %ecx, %esi
callq *0x18(%r14)
movl $0xffffffff, 0x2c(%rbx) # imm = 0xFFFFFFFF
jmp 0x36aad
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %cl
cmpb $0xc, %cl
jbe 0x365e6
movq $0x0, 0x18(%rsp)
jmp 0x369d6
movzbl %cl, %edx
movl $0x1, %esi
shll %cl, %esi
xorl %eax, %eax
movw $0xffff, 0x834(%rbx,%rax,4) # imm = 0xFFFF
movb %al, 0x836(%rbx,%rax,4)
movb %al, 0x837(%rbx,%rax,4)
incq %rax
cmpq %rax, %rsi
jne 0x365f2
movl $0x2, %eax
shll %cl, %eax
incl %edx
decl %eax
leal 0x2(%rsi), %ecx
movq %rsi, 0x60(%rsp)
incl %esi
movl %esi, 0x38(%rsp)
xorl %ebx, %ebx
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movl $0x1, 0x8(%rsp)
movl %edx, 0x44(%rsp)
movq %rdx, 0x28(%rsp)
movl %eax, 0x40(%rsp)
movl %eax, 0xc(%rsp)
movl %ecx, 0x3c(%rsp)
movl %ecx, %eax
movq %rax, 0x30(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movl %ebp, %r13d
subl 0x28(%rsp), %ebp
jge 0x36785
testl %r12d, %r12d
jne 0x366f7
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x366de
cmpl $0x0, 0x30(%r14)
je 0x366b3
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x366b7
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x366d7
xorl %eax, %eax
jmp 0x366eb
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
testb %al, %al
je 0x369c8
movzbl %al, %r12d
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36761
cmpl $0x0, 0x30(%r14)
je 0x36736
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x3673a
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x3675a
xorl %eax, %eax
jmp 0x3676f
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq 0x20(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movzbl (%rax), %eax
movl %r13d, %ecx
shll %cl, %eax
decl %r12d
orl %eax, %ebx
addl $0x8, %r13d
movl %r13d, %ebp
jmp 0x36661
movl %ebx, %r13d
movq 0x28(%rsp), %rcx
sarl %cl, %ebx
andl 0xc(%rsp), %r13d
movb $0x1, %dl
xorl %ecx, %ecx
cmpl 0x60(%rsp), %r13d
jne 0x367c4
movl 0x44(%rsp), %eax
movq %rax, 0x28(%rsp)
movl 0x40(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x3c(%rsp), %eax
movq %rax, 0x30(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x368ca
cmpl 0x38(%rsp), %r13d
jne 0x3685e
movq 0x20(%rsp), %r13
movq %r14, %rdi
movl %r12d, %esi
callq 0x320e4
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36844
cmpl $0x0, 0x30(%r14)
je 0x3681e
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x36822
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x3683d
xorl %eax, %eax
jmp 0x36851
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r13, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
testb %al, %al
je 0x36880
movzbl %al, %r12d
jmp 0x367d4
movq 0x30(%rsp), %rax
cmpl %eax, %r13d
jle 0x368a0
leaq 0x94c2(%rip), %rax      # 0x3fd31
movq %rax, 0x18c72(%rip)     # 0x4f4e8
xorl %edx, %edx
movl 0x8(%rsp), %eax
movl %eax, %ecx
jmp 0x368bc
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d
movl 0x8(%rsp), %eax
movl %eax, %ecx
movl 0x4(%rsp), %r13d
xorl %edx, %edx
jmp 0x368ca
cmpl $0x0, 0x8(%rsp)
je 0x368e0
leaq 0x9466(%rip), %rax      # 0x3fd14
movq %rax, 0x18c33(%rip)     # 0x4f4e8
movl $0x1, %ecx
xorl %edx, %edx
movl 0x4(%rsp), %r13d
movq $0x0, 0x18(%rsp)
movl %ecx, 0x8(%rsp)
movl %r13d, 0x4(%rsp)
testb %dl, %dl
jne 0x3665e
jmp 0x369d6
cmpl $0x0, 0x4(%rsp)
js 0x3690a
leal 0x1(%rax), %edx
cmpl $0x2000, %eax           # imm = 0x2000
jl 0x36928
leaq 0x942a(%rip), %rax      # 0x3fd22
movq %rax, 0x18be9(%rip)     # 0x4f4e8
xorl %ecx, %ecx
movl %edx, %eax
movq %rax, 0x30(%rsp)
jmp 0x3691f
cmpl %eax, %r13d
jne 0x36967
leaq 0x941b(%rip), %rax      # 0x3fd31
movq %rax, 0x18bcb(%rip)     # 0x4f4e8
xorl %ecx, %ecx
movl 0x4(%rsp), %r13d
xorl %edx, %edx
jmp 0x368c1
cltq
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %ecx
movw %cx, 0x834(%rdi,%rax,4)
movl %ecx, %ecx
movb 0x836(%rdi,%rcx,4), %cl
movb %cl, 0x836(%rdi,%rax,4)
cmpl %edx, %r13d
je 0x3695a
movslq %r13d, %rcx
movb 0x836(%rdi,%rcx,4), %cl
movb %cl, 0x837(%rdi,%rax,4)
movl %edx, 0x4(%rsp)
jmp 0x36970
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
movzwl %r13w, %esi
callq 0x37242
movl 0xc(%rsp), %r8d
movl 0x4(%rsp), %r9d
testl %r8d, %r9d
sete %al
cmpl $0x1000, %r9d           # imm = 0x1000
setl %dl
movq 0x28(%rsp), %rdi
leal 0x1(%rdi), %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
testb %al, %dl
cmovnel %ecx, %edi
movq %rdi, 0x28(%rsp)
notl %esi
cmovnel %esi, %r8d
movl %r8d, 0xc(%rsp)
movl %r9d, %eax
movq %rax, 0x30(%rsp)
xorl %ecx, %ecx
movb $0x1, %dl
jmp 0x368ca
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %r13
testq %r13, %r13
je 0x369f9
cmpq $0x0, 0x58(%rsp)
movq 0x20(%rsp), %r12
je 0x36a08
xorl %eax, %eax
movq 0x10(%rsp), %rbx
jmp 0x36b29
xorl %eax, %eax
xorl %r13d, %r13d
movq 0x10(%rsp), %rbx
jmp 0x36188
movq 0x10(%rsp), %rbx
movl 0x4(%rbx), %eax
imull (%rbx), %eax
cmpl $0x0, 0x24(%rbx)
setg %cl
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x36a5b
movl %eax, %ecx
xorl %edx, %edx
movq 0x18(%rbx), %rax
cmpb $0x0, (%rax,%rdx)
jne 0x36a4c
movslq 0x24(%rbx), %rax
movb $-0x1, 0x37(%rbx,%rax,4)
movq 0x8(%rbx), %rax
movslq 0x24(%rbx), %rsi
movl 0x34(%rbx,%rsi,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jne 0x36a2a
jmp 0x36b29
xorl %eax, %eax
jmp 0x36b29
xorl %eax, %eax
jmp 0x36a95
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
movzbl %al, %eax
movl %eax, 0x2c(%rbx)
movb $0x0, 0x37(%rbx,%rax,4)
jmp 0x36aad
movzbl %al, %esi
movq %r14, %rdi
callq 0x320e4
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x36b12
cmpl $0x0, 0x30(%r14)
je 0x36aec
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x36af0
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x36b0b
xorl %eax, %eax
jmp 0x36b1f
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq %r12, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
testb %al, %al
jne 0x36aa2
movb $0x1, %al
testb %al, %al
jne 0x360b1
jmp 0x36b44
leaq 0x8be0(%rip), %rax      # 0x3f71a
movq %rax, 0x189a7(%rip)     # 0x4f4e8
xorl %r13d, %r13d
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq