// File: alan0201tw[P]RayTracer/include/stb_image.h
// Function: load_jpeg_image(stbi__jpeg*, int*, int*, int*, int)
static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp)
{
   int n, decode_n, is_rgb;
   z->s->img_n = 0; // make stbi__cleanup_jpeg safe

   // validate req_comp
   if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");

   // load a jpeg image from whichever source, but leave in YCbCr format
   if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; }

   // determine actual number of components to generate
   n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1;

   is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif));

   if (z->s->img_n == 3 && n < 3 && !is_rgb)
      decode_n = 1;
   else
      decode_n = z->s->img_n;

   // resample and color-convert
   {
      int k;
      unsigned int i,j;
      stbi_uc *output;
      stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL };

      stbi__resample res_comp[4];

      for (k=0; k < decode_n; ++k) {
         stbi__resample *r = &res_comp[k];

         // allocate line buffer big enough for upsampling off the edges
         // with upsample factor of 4
         z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3);
         if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }

         r->hs      = z->img_h_max / z->img_comp[k].h;
         r->vs      = z->img_v_max / z->img_comp[k].v;
         r->ystep   = r->vs >> 1;
         r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
         r->ypos    = 0;
         r->line0   = r->line1 = z->img_comp[k].data;

         if      (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
         else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2;
         else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2;
         else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel;
         else                               r->resample = stbi__resample_row_generic;
      }

      // can't error after this so, this is safe
      output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1);
      if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }

      // now go ahead and resample
      for (j=0; j < z->s->img_y; ++j) {
         stbi_uc *out = output + n * z->s->img_x * j;
         for (k=0; k < decode_n; ++k) {
            stbi__resample *r = &res_comp[k];
            int y_bot = r->ystep >= (r->vs >> 1);
            coutput[k] = r->resample(z->img_comp[k].linebuf,
                                     y_bot ? r->line1 : r->line0,
                                     y_bot ? r->line0 : r->line1,
                                     r->w_lores, r->hs);
            if (++r->ystep >= r->vs) {
               r->ystep = 0;
               r->line0 = r->line1;
               if (++r->ypos < z->img_comp[k].y)
                  r->line1 += z->img_comp[k].w2;
            }
         }
         if (n >= 3) {
            stbi_uc *y = coutput[0];
            if (z->s->img_n == 3) {
               if (is_rgb) {
                  for (i=0; i < z->s->img_x; ++i) {
                     out[0] = y[i];
                     out[1] = coutput[1][i];
                     out[2] = coutput[2][i];
                     out[3] = 255;
                     out += n;
                  }
               } else {
                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
               }
            } else if (z->s->img_n == 4) {
               if (z->app14_color_transform == 0) { // CMYK
                  for (i=0; i < z->s->img_x; ++i) {
                     stbi_uc m = coutput[3][i];
                     out[0] = stbi__blinn_8x8(coutput[0][i], m);
                     out[1] = stbi__blinn_8x8(coutput[1][i], m);
                     out[2] = stbi__blinn_8x8(coutput[2][i], m);
                     out[3] = 255;
                     out += n;
                  }
               } else if (z->app14_color_transform == 2) { // YCCK
                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
                  for (i=0; i < z->s->img_x; ++i) {
                     stbi_uc m = coutput[3][i];
                     out[0] = stbi__blinn_8x8(255 - out[0], m);
                     out[1] = stbi__blinn_8x8(255 - out[1], m);
                     out[2] = stbi__blinn_8x8(255 - out[2], m);
                     out += n;
                  }
               } else { // YCbCr + alpha?  Ignore the fourth channel for now
                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
               }
            } else
               for (i=0; i < z->s->img_x; ++i) {
                  out[0] = out[1] = out[2] = y[i];
                  out[3] = 255; // not used if n==3
                  out += n;
               }
         } else {
            if (is_rgb) {
               if (n == 1)
                  for (i=0; i < z->s->img_x; ++i)
                     *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
               else {
                  for (i=0; i < z->s->img_x; ++i, out += 2) {
                     out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
                     out[1] = 255;
                  }
               }
            } else if (z->s->img_n == 4 && z->app14_color_transform == 0) {
               for (i=0; i < z->s->img_x; ++i) {
                  stbi_uc m = coutput[3][i];
                  stbi_uc r = stbi__blinn_8x8(coutput[0][i], m);
                  stbi_uc g = stbi__blinn_8x8(coutput[1][i], m);
                  stbi_uc b = stbi__blinn_8x8(coutput[2][i], m);
                  out[0] = stbi__compute_y(r, g, b);
                  out[1] = 255;
                  out += n;
               }
            } else if (z->s->img_n == 4 && z->app14_color_transform == 2) {
               for (i=0; i < z->s->img_x; ++i) {
                  out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]);
                  out[1] = 255;
                  out += n;
               }
            } else {
               stbi_uc *y = coutput[0];
               if (n == 1)
                  for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
               else
                  for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; }
            }
         }
      }
      stbi__cleanup_jpeg(z);
      *out_x = z->s->img_x;
      *out_y = z->s->img_y;
      if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output
      return output;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x8(%rax)
cmpl $0x0, -0x2c(%rbp)
jl 0x66669
cmpl $0x4, -0x2c(%rbp)
jle 0x66689
leaq 0x1aa9b(%rip), %rdi     # 0x8110b
callq 0x56040
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x6739d
movq -0x10(%rbp), %rdi
callq 0x673b0
cmpl $0x0, %eax
jne 0x666ad
movq -0x10(%rbp), %rdi
callq 0x675c0
movq $0x0, -0x8(%rbp)
jmp 0x6739d
cmpl $0x0, -0x2c(%rbp)
je 0x666be
movl -0x2c(%rbp), %eax
movl %eax, -0x16c(%rbp)
jmp 0x666de
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x3, %edx
cmovgel %ecx, %eax
movl %eax, -0x16c(%rbp)
movl -0x16c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpl $0x3, 0x8(%rcx)
movb %al, -0x16d(%rbp)
jne 0x66754
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x3, 0x4850(%rcx)
movb %al, -0x16e(%rbp)
je 0x66748
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x484c(%rcx)
movb %al, -0x16f(%rbp)
jne 0x6673c
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4848(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x16f(%rbp)
movb -0x16f(%rbp), %al
movb %al, -0x16e(%rbp)
movb -0x16e(%rbp), %al
movb %al, -0x16d(%rbp)
movb -0x16d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x3, 0x8(%rax)
jne 0x66784
cmpl $0x3, -0x30(%rbp)
jge 0x66784
cmpl $0x0, -0x38(%rbp)
jne 0x66784
movl $0x1, -0x34(%rbp)
jmp 0x66791
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x7290
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x66a06
movslq -0x3c(%rbp), %rcx
leaq -0x130(%rbp), %rax
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x57060
movq %rax, %rcx
movq -0x10(%rbp), %rax
addq $0x46a0, %rax           # imm = 0x46A0
movslq -0x3c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
addq $0x46a0, %rax           # imm = 0x46A0
movslq -0x3c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x48(%rax)
jne 0x66843
movq -0x10(%rbp), %rdi
callq 0x675c0
leaq 0x1a8d8(%rip), %rdi     # 0x81102
callq 0x56040
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x6739d
movq -0x10(%rbp), %rax
movl 0x4688(%rax), %eax
movq -0x10(%rbp), %rcx
addq $0x46a0, %rcx           # imm = 0x46A0
movslq -0x3c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rcx
cltd
idivl 0x4(%rcx)
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x468c(%rax), %eax
movq -0x10(%rbp), %rcx
addq $0x46a0, %rcx           # imm = 0x46A0
movslq -0x3c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rcx
cltd
idivl 0x8(%rcx)
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x138(%rbp), %rax
movl 0x1c(%rax), %ecx
sarl %ecx
movq -0x138(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movq -0x138(%rbp), %rcx
addl 0x18(%rcx), %eax
subl $0x1, %eax
movq -0x138(%rbp), %rcx
xorl %edx, %edx
divl 0x18(%rcx)
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x138(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
addq $0x46a0, %rax           # imm = 0x46A0
movslq -0x3c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rcx
movq -0x138(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x138(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x138(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x66954
movq -0x138(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x66954
movq -0x138(%rbp), %rax
leaq 0xca4(%rip), %rcx       # 0x675f0
movq %rcx, (%rax)
jmp 0x669f6
movq -0x138(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x66981
movq -0x138(%rbp), %rax
cmpl $0x2, 0x1c(%rax)
jne 0x66981
movq -0x138(%rbp), %rax
leaq 0xc94(%rip), %rcx       # 0x67610
movq %rcx, (%rax)
jmp 0x669f4
movq -0x138(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0x669ae
movq -0x138(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x669ae
movq -0x138(%rbp), %rax
leaq 0xcd7(%rip), %rcx       # 0x67680
movq %rcx, (%rax)
jmp 0x669f2
movq -0x138(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0x669df
movq -0x138(%rbp), %rax
cmpl $0x2, 0x1c(%rax)
jne 0x669df
movq -0x10(%rbp), %rax
movq 0x4880(%rax), %rcx
movq -0x138(%rbp), %rax
movq %rcx, (%rax)
jmp 0x669f0
movq -0x138(%rbp), %rax
leaq 0xe13(%rip), %rcx       # 0x67800
movq %rcx, (%rax)
jmp 0x669f2
jmp 0x669f4
jmp 0x669f6
jmp 0x669f8
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x667a8
movl -0x30(%rbp), %edi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %edx
movl $0x1, %ecx
callq 0x664e0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x66a5a
movq -0x10(%rbp), %rdi
callq 0x675c0
leaq 0x1a6c1(%rip), %rdi     # 0x81102
callq 0x56040
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x6739d
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x4(%rcx), %eax
jae 0x67346
movq -0x50(%rbp), %rax
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
imull (%rdx), %ecx
imull -0x44(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x66c6d
movslq -0x3c(%rbp), %rcx
leaq -0x130(%rbp), %rax
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x148(%rbp), %rcx
movl 0x1c(%rcx), %ecx
sarl %ecx
cmpl %ecx, %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14c(%rbp)
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x180(%rbp)
movq -0x10(%rbp), %rax
addq $0x46a0, %rax           # imm = 0x46A0
movslq -0x3c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
movq %rax, -0x178(%rbp)
cmpl $0x0, -0x14c(%rbp)
je 0x66b35
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x188(%rbp)
jmp 0x66b47
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x190(%rbp)
cmpl $0x0, -0x14c(%rbp)
je 0x66b72
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x198(%rbp)
jmp 0x66b84
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x198(%rbp)
movq -0x180(%rbp), %rax
movq -0x190(%rbp), %rsi
movq -0x178(%rbp), %rdi
movq -0x198(%rbp), %rdx
movq -0x148(%rbp), %rcx
movl 0x20(%rcx), %ecx
movq -0x148(%rbp), %r8
movl 0x18(%r8), %r8d
callq *%rax
movq %rax, %rcx
movslq -0x3c(%rbp), %rax
movq %rcx, -0x70(%rbp,%rax,8)
movq -0x148(%rbp), %rcx
movl 0x24(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x24(%rcx)
movq -0x148(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jl 0x66c5d
movq -0x148(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x148(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x148(%rbp), %rcx
movl 0x28(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x28(%rcx)
movq -0x10(%rbp), %rcx
addq $0x46a0, %rcx           # imm = 0x46A0
movslq -0x3c(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x20(%rcx), %eax
jge 0x66c5b
movq -0x10(%rbp), %rax
addq $0x46a0, %rax           # imm = 0x46A0
movslq -0x3c(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %edx
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
jmp 0x66c5d
jmp 0x66c5f
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x66a9c
cmpl $0x3, -0x30(%rbp)
jl 0x67004
movq -0x70(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x3, 0x8(%rax)
jne 0x66d55
cmpl $0x0, -0x38(%rbp)
je 0x66d1f
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x66d1d
movq -0x158(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %cl
movq -0x140(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x60(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %cl
movq -0x140(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x3(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x66ca4
jmp 0x66d50
movq -0x10(%rbp), %rax
movq 0x4878(%rax), %rax
movq -0x140(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %r8
movq (%r8), %r8
movl (%r8), %r8d
movl -0x30(%rbp), %r9d
callq *%rax
jmp 0x66fff
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, 0x8(%rax)
jne 0x66f8f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x484c(%rax)
jne 0x66e43
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x66e3e
movq -0x58(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x159(%rbp)
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x159(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x159(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x60(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x159(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x3(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x66d7e
jmp 0x66f8d
movq -0x10(%rbp), %rax
cmpl $0x2, 0x484c(%rax)
jne 0x66f5a
movq -0x10(%rbp), %rax
movq 0x4878(%rax), %rax
movq -0x140(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %r8
movq (%r8), %r8
movl (%r8), %r8d
movl -0x30(%rbp), %r9d
callq *%rax
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x66f58
movq -0x58(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15a(%rbp)
movq -0x140(%rbp), %rax
movzbl (%rax), %ecx
movl $0xff, %eax
subl %ecx, %eax
movzbl %al, %edi
movzbl -0x15a(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0xff, %eax
subl %ecx, %eax
movzbl %al, %edi
movzbl -0x15a(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x140(%rbp), %rax
movzbl 0x2(%rax), %ecx
movl $0xff, %eax
subl %ecx, %eax
movzbl %al, %edi
movzbl -0x15a(%rbp), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x66e8c
jmp 0x66f8b
movq -0x10(%rbp), %rax
movq 0x4878(%rax), %rax
movq -0x140(%rbp), %rdi
movq -0x158(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %r8
movq (%r8), %r8
movl (%r8), %r8d
movl -0x30(%rbp), %r9d
callq *%rax
jmp 0x66f8d
jmp 0x66ffd
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x66ffb
movq -0x158(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %cl
movq -0x140(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x140(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x3(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x66f96
jmp 0x66ffd
jmp 0x66fff
jmp 0x67336
cmpl $0x0, -0x38(%rbp)
je 0x670ea
cmpl $0x1, -0x30(%rbp)
jne 0x67075
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x67073
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %edi
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %esi
movq -0x60(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %edx
callq 0x678c0
movb %al, %cl
movq -0x140(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x140(%rbp)
movb %cl, (%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x6701b
jmp 0x670e5
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x670e3
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %edi
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %esi
movq -0x60(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %edx
callq 0x678c0
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x1(%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x140(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x140(%rbp)
jmp 0x6707c
jmp 0x670e5
jmp 0x67334
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, 0x8(%rax)
jne 0x671ec
movq -0x10(%rbp), %rax
cmpl $0x0, 0x484c(%rax)
jne 0x671ec
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x671e7
movq -0x58(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15b(%rbp)
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x15b(%rbp), %esi
callq 0x67880
movb %al, -0x15c(%rbp)
movq -0x68(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x15b(%rbp), %esi
callq 0x67880
movb %al, -0x15d(%rbp)
movq -0x60(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %al
movzbl %al, %edi
movzbl -0x15b(%rbp), %esi
callq 0x67880
movb %al, -0x15e(%rbp)
movzbl -0x15c(%rbp), %edi
movzbl -0x15d(%rbp), %esi
movzbl -0x15e(%rbp), %edx
callq 0x678c0
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x1(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x67113
jmp 0x67332
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x4, 0x8(%rax)
jne 0x67283
movq -0x10(%rbp), %rax
cmpl $0x2, 0x484c(%rax)
jne 0x67283
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x6727e
movq -0x70(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movl $0xff, %eax
subl %ecx, %eax
movb %al, %dl
movq -0x58(%rbp), %rax
movl -0x40(%rbp), %ecx
movzbl %dl, %edi
movzbl (%rax,%rcx), %esi
callq 0x67880
movb %al, %cl
movq -0x140(%rbp), %rax
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movb $-0x1, 0x1(%rax)
movl -0x30(%rbp), %ecx
movq -0x140(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x67211
jmp 0x67330
movq -0x70(%rbp), %rax
movq %rax, -0x168(%rbp)
cmpl $0x1, -0x30(%rbp)
jne 0x672d0
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x672ce
movq -0x168(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x140(%rbp), %rax
movl -0x40(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x6729b
jmp 0x6732e
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl (%rcx), %eax
jae 0x6732c
movq -0x168(%rbp), %rax
movl -0x40(%rbp), %ecx
movb (%rax,%rcx), %cl
movq -0x140(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x140(%rbp)
movb %cl, (%rax)
movq -0x140(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x140(%rbp)
movb $-0x1, (%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x672d7
jmp 0x6732e
jmp 0x67330
jmp 0x67332
jmp 0x67334
jmp 0x67336
jmp 0x67338
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x66a61
movq -0x10(%rbp), %rdi
callq 0x675c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x67395
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %edx
movl $0x1, %ecx
movl $0x3, %eax
cmpl $0x3, %edx
cmovgel %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw (%rax,%rax)