// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_convert(unsigned char*, unsigned char const*, LodePNGColorMode const*, LodePNGColorMode const*, unsigned int, unsigned int)
unsigned lodepng_convert(unsigned char* out, const unsigned char* in,
                         const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in,
                         unsigned w, unsigned h) {
  size_t i;
  ColorTree tree;
  size_t numpixels = (size_t)w * (size_t)h;
  unsigned error = 0;

  if(mode_in->colortype == LCT_PALETTE && !mode_in->palette) {
    return 107; /* error: must provide palette if input mode is palette */
  }

  if(lodepng_color_mode_equal(mode_out, mode_in)) {
    size_t numbytes = lodepng_get_raw_size(w, h, mode_in);
    for(i = 0; i != numbytes; ++i) out[i] = in[i];
    return 0;
  }

  if(mode_out->colortype == LCT_PALETTE) {
    size_t palettesize = mode_out->palettesize;
    const unsigned char* palette = mode_out->palette;
    size_t palsize = (size_t)1u << mode_out->bitdepth;
    /*if the user specified output palette but did not give the values, assume
    they want the values of the input color type (assuming that one is palette).
    Note that we never create a new palette ourselves.*/
    if(palettesize == 0) {
      palettesize = mode_in->palettesize;
      palette = mode_in->palette;
      /*if the input was also palette with same bitdepth, then the color types are also
      equal, so copy literally. This to preserve the exact indices that were in the PNG
      even in case there are duplicate colors in the palette.*/
      if (mode_in->colortype == LCT_PALETTE && mode_in->bitdepth == mode_out->bitdepth) {
        size_t numbytes = lodepng_get_raw_size(w, h, mode_in);
        for(i = 0; i != numbytes; ++i) out[i] = in[i];
        return 0;
      }
    }
    if(palettesize < palsize) palsize = palettesize;
    color_tree_init(&tree);
    for(i = 0; i != palsize; ++i) {
      const unsigned char* p = &palette[i * 4];
      color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned)i);
    }
  }

  if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) {
    for(i = 0; i != numpixels; ++i) {
      unsigned short r = 0, g = 0, b = 0, a = 0;
      getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);
      rgba16ToPixel(out, i, mode_out, r, g, b, a);
    }
  } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) {
    getPixelColorsRGBA8(out, numpixels, in, mode_in);
  } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) {
    getPixelColorsRGB8(out, numpixels, in, mode_in);
  } else {
    unsigned char r = 0, g = 0, b = 0, a = 0;
    for(i = 0; i != numpixels; ++i) {
      getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in);
      error = rgba8ToPixel(out, i, mode_out, &tree, r, g, b, a);
      if (error) break;
    }
  }

  if(mode_out->colortype == LCT_PALETTE) {
    color_tree_cleanup(&tree);
  }

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %r9d, %ebp
movl %r8d, %r13d
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
movl (%rcx), %ebx
cmpl $0x3, %ebx
jne 0x68cbf
cmpq $0x0, 0x8(%r12)
je 0x68d3d
movq %r15, %rdi
movq %r12, %rsi
callq 0x698da
testl %eax, %eax
je 0x68d06
movl 0x4(%r12), %ecx
movl %r13d, %edi
movl %ebp, %esi
movl %ebx, %edx
callq 0x684b0
testq %rax, %rax
je 0x68d94
xorl %r13d, %r13d
xorl %ecx, %ecx
movq 0x18(%rsp), %rsi
movb (%r14,%rcx), %dl
movb %dl, (%rsi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x68cf2
jmp 0x6928c
movl %ebp, 0x10(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
cmpl $0x3, (%r15)
jne 0x68e18
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdx
movl 0x4(%rax), %ecx
movl $0x1, %ebp
shlq %cl, %rbp
testq %rdx, %rdx
je 0x68d48
movq 0x8(%rax), %r15
jmp 0x68d9c
movl $0x6b, %r13d
jmp 0x6928c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x10(%rax), %rdx
cmpl $0x3, %ebx
jne 0x68d9c
movl 0x4(%rax), %eax
cmpl %ecx, %eax
jne 0x68d9c
movl %r13d, %edi
movl 0x10(%rsp), %esi
movl %ebx, %edx
movl %eax, %ecx
callq 0x684b0
testq %rax, %rax
je 0x68d94
xorl %r13d, %r13d
xorl %ecx, %ecx
movq 0x18(%rsp), %rsi
movb (%r14,%rcx), %dl
movb %dl, (%rsi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x68d80
jmp 0x6928c
xorl %r13d, %r13d
jmp 0x6928c
cmpq %rbp, %rdx
cmovbq %rdx, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movl $0xffffffff, 0xb0(%rsp) # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x68e18
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
movzbl (%r15,%rbx,4), %esi
movzbl 0x1(%r15,%rbx,4), %edx
movzbl 0x2(%r15,%rbx,4), %ecx
movzbl 0x3(%r15,%rbx,4), %r8d
movq %r12, %rdi
movl %ebx, %r9d
callq 0x69947
incq %rbx
cmpq %rbx, %rbp
jne 0x68dee
movl %r13d, %edx
movl 0x10(%rsp), %eax
movq %rax, %r11
imulq %rdx, %r11
movq 0x20(%rsp), %r9
movl 0x4(%r9), %ecx
cmpq $0x10, %rcx
movq 0x28(%rsp), %rbp
movq %r11, 0x10(%rsp)
jne 0x68f60
cmpl $0x10, 0x4(%rbp)
jne 0x68f60
testq %r11, %r11
je 0x69279
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
leaq 0x2060f(%rip), %r13     # 0x89474
xorl %ebx, %ebx
xorl %ebp, %ebp
movw %r12w, 0xe(%rsp)
movw %r12w, 0xc(%rsp)
movw %r12w, 0xa(%rsp)
movw %r12w, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0xe(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xa(%rsp), %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbp, %r9
callq 0x69a03
movq 0x28(%rsp), %rax
movl (%rax), %esi
cmpq $0x6, %rsi
ja 0x68f41
movzwl 0xe(%rsp), %eax
movzwl 0xc(%rsp), %edx
movzwl 0xa(%rsp), %edi
movzwl 0x8(%rsp), %ecx
movslq (%r13,%rsi,4), %rsi
addq %r13, %rsi
jmpq *%rsi
rolw $0x8, %ax
movq 0x18(%rsp), %rcx
movw %ax, (%rcx,%rbp,2)
jmp 0x68f41
movq 0x18(%rsp), %rdx
movb %ah, (%rdx,%rbp,4)
movb %al, 0x1(%rdx,%rbp,4)
movb %ch, 0x2(%rdx,%rbp,4)
movb %cl, 0x3(%rdx,%rbp,4)
jmp 0x68f41
movq 0x18(%rsp), %rcx
movb %ah, (%rcx,%rbx,2)
movb %al, 0x1(%rcx,%rbx,2)
movb %dh, 0x2(%rcx,%rbx,2)
movb %dl, 0x3(%rcx,%rbx,2)
movl %edi, %eax
movb %ah, 0x4(%rcx,%rbx,2)
movb %al, 0x5(%rcx,%rbx,2)
jmp 0x68f41
movq 0x18(%rsp), %rsi
movb %ah, (%rsi,%rbp,8)
movb %al, 0x1(%rsi,%rbp,8)
movb %dh, 0x2(%rsi,%rbp,8)
movb %dl, 0x3(%rsi,%rbp,8)
movl %edi, %eax
movb %ah, 0x4(%rsi,%rbp,8)
movb %al, 0x5(%rsi,%rbp,8)
movb %ch, 0x6(%rsi,%rbp,8)
movb %cl, 0x7(%rsi,%rbp,8)
incq %rbp
addq $0x3, %rbx
cmpq %rbp, 0x10(%rsp)
jne 0x68e69
xorl %r13d, %r13d
movq 0x28(%rsp), %rbp
jmp 0x6927c
movl 0x4(%rbp), %esi
cmpl $0x8, %esi
movq 0x18(%rsp), %rdi
jne 0x69072
cmpl $0x6, (%rbp)
jne 0x69005
movl (%r9), %esi
xorl %r13d, %r13d
cmpq $0x6, %rsi
ja 0x6927c
leaq 0x204c6(%rip), %r8      # 0x89458
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
cmpq $0x8, %rcx
je 0x6952c
cmpl $0x10, %ecx
jne 0x69588
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
xorl %ecx, %ecx
movzbl (%r14,%rcx,2), %edx
movb %dl, 0x2(%rdi,%rcx,4)
movb %dl, 0x1(%rdi,%rcx,4)
movb %dl, (%rdi,%rcx,4)
testl %eax, %eax
je 0x68fef
shll $0x8, %edx
movzbl 0x1(%r14,%rcx,2), %esi
orl %edx, %esi
movq 0x20(%rsp), %rdx
cmpl 0x1c(%rdx), %esi
setne %dl
negb %dl
jmp 0x68ff1
movb $-0x1, %dl
movb %dl, 0x3(%rdi,%rcx,4)
incq %rcx
xorl %r13d, %r13d
cmpq %rcx, %r11
jne 0x68fc1
jmp 0x6927c
cmpl $0x8, %esi
jne 0x69072
cmpl $0x2, (%rbp)
jne 0x69072
movl (%r9), %eax
xorl %r13d, %r13d
cmpq $0x6, %rax
ja 0x6927c
leaq 0x20415(%rip), %rdx     # 0x8943c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
cmpq $0x8, %rcx
je 0x69825
cmpl $0x10, %ecx
jne 0x69854
testq %r11, %r11
je 0x6927c
addq $0x2, %rdi
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,2), %cl
movb %cl, (%rdi)
movb %cl, -0x1(%rdi)
movb %cl, -0x2(%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x69055
jmp 0x6927c
xorl %r13d, %r13d
movb %r13b, 0xe(%rsp)
movb %r13b, 0xc(%rsp)
movb %r13b, 0xa(%rsp)
movb %r13b, 0x8(%rsp)
testq %r11, %r11
je 0x6927c
xorl %r15d, %r15d
leaq 0x20384(%rip), %rbx     # 0x89420
movq %r9, (%rsp)
leaq 0xe(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xa(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x69b82
movl (%rbp), %r8d
movb $0x1, %r12b
cmpq $0x6, %r8
ja 0x6925b
movb 0xe(%rsp), %al
movzbl %al, %esi
movb 0xc(%rsp), %dl
movb 0xa(%rsp), %cl
movb 0x8(%rsp), %dil
movslq (%rbx,%r8,4), %r8
addq %rbx, %r8
jmpq *%r8
movl 0x4(%rbp), %edx
cmpl $0x10, %edx
je 0x6920f
cmpl $0x8, %edx
jne 0x69239
movq 0x18(%rsp), %rcx
movb %al, (%rcx,%r15)
jmp 0x6925b
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %dil, %r8d
leaq 0x30(%rsp), %rdi
callq 0x71230
testl %eax, %eax
js 0x69204
movl 0x4(%rbp), %edx
cmpl $0x8, %edx
jne 0x6924c
movq 0x18(%rsp), %rcx
movb %al, (%rcx,%r15)
jmp 0x6925b
cmpl $0x8, 0x4(%rbp)
leaq (%r15,%r15,2), %rsi
jne 0x691b5
movq 0x18(%rsp), %rdi
movb %al, (%rdi,%rsi)
movb %dl, 0x1(%rdi,%rsi)
movb %cl, 0x2(%rdi,%rsi)
jmp 0x6925b
movl 0x4(%rbp), %ecx
cmpl $0x10, %ecx
je 0x6921f
cmpl $0x8, %ecx
movq 0x10(%rsp), %rdx
jne 0x6918a
movq 0x18(%rsp), %rcx
movb %al, (%rcx,%r15,2)
movb %dil, 0x1(%rcx,%r15,2)
xorl %r13d, %r13d
jmp 0x69263
cmpl $0x8, 0x4(%rbp)
jne 0x691d6
movq 0x18(%rsp), %rsi
movb %al, (%rsi,%r15,4)
movb %dl, 0x1(%rsi,%r15,4)
movb %cl, 0x2(%rsi,%r15,4)
movb %dil, 0x3(%rsi,%r15,4)
jmp 0x6925b
movq 0x18(%rsp), %rdi
movb %al, 0x1(%rdi,%rsi,2)
movb %al, (%rdi,%rsi,2)
movb %dl, 0x3(%rdi,%rsi,2)
movb %dl, 0x2(%rdi,%rsi,2)
movb %cl, 0x5(%rdi,%rsi,2)
movb %cl, 0x4(%rdi,%rsi,2)
jmp 0x6925b
movq 0x18(%rsp), %rsi
movb %al, 0x1(%rsi,%r15,8)
movb %al, (%rsi,%r15,8)
movb %dl, 0x3(%rsi,%r15,8)
movb %dl, 0x2(%rsi,%r15,8)
movb %cl, 0x5(%rsi,%r15,8)
movb %cl, 0x4(%rsi,%r15,8)
movb %dil, 0x7(%rsi,%r15,8)
movb %dil, 0x6(%rsi,%r15,8)
jmp 0x6925b
movl $0x52, %r13d
xorl %r12d, %r12d
jmp 0x6925e
movq 0x18(%rsp), %rcx
movb %al, 0x1(%rcx,%r15,2)
movb %al, (%rcx,%r15,2)
jmp 0x6925b
movq 0x18(%rsp), %rcx
movb %al, 0x1(%rcx,%r15,4)
movb %al, (%rcx,%r15,4)
movb %dil, 0x3(%rcx,%r15,4)
movb %dil, 0x2(%rcx,%r15,4)
jmp 0x6925b
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
notl %eax
andl %esi, %eax
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movl %eax, %ecx
callq 0x711d8
xorl %r13d, %r13d
movq 0x10(%rsp), %rdx
testb %r12b, %r12b
movq 0x20(%rsp), %r9
je 0x6927c
incq %r15
cmpq %rdx, %r15
jne 0x6909c
xorl %r13d, %r13d
cmpl $0x3, (%rbp)
jne 0x6928c
leaq 0x30(%rsp), %rdi
callq 0x69e55
movl %r13d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x8, %ecx
jne 0x693b1
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
xorl %r13d, %r13d
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movl (%rax,%rdx,4), %edx
movl %edx, (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %r11
jne 0x692bd
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x6942b
testq %r11, %r11
je 0x69303
movq %r11, %rcx
movb 0x2(%r14), %sil
movb %sil, 0x2(%rdi)
movzwl (%r14), %esi
movw %si, (%rdi)
movb $-0x1, 0x3(%rdi)
addq $0x4, %rdi
addq $0x3, %r14
decq %rcx
jne 0x692e3
testq %r11, %r11
je 0x6927c
cmpl $0x0, 0x18(%r9)
je 0x6927c
movl 0x1c(%r9), %ecx
imulq %rdx, %rax
negq %rax
movzbl (%rdi,%rax,4), %edx
cmpl %edx, %ecx
jne 0x69345
movzbl 0x1(%rdi,%rax,4), %edx
cmpl %edx, 0x20(%r9)
jne 0x69345
movzbl 0x2(%rdi,%rax,4), %edx
cmpl %edx, 0x24(%r9)
jne 0x69345
movb $0x0, 0x3(%rdi,%rax,4)
incq %rax
jne 0x69322
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x694bc
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,2), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb %cl, 0x1(%rdi,%rax,4)
movb %cl, (%rdi,%rax,4)
movb 0x1(%r14,%rax,2), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
cmpq %rax, %r11
jne 0x69366
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x694ef
shlq $0x2, %r11
testq %r11, %r11
je 0x6927c
movq %r14, %rsi
movq %r11, %rdx
callq 0x3a3a0
jmp 0x6927c
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
xorl %edx, %edx
xorl %esi, %esi
xorl %r15d, %r15d
testq %rcx, %rcx
je 0x69410
movq %rcx, %r8
movq %rsi, %r9
movq %r9, %r10
shrq $0x3, %r10
movzbl (%r14,%r10), %r10d
movl %r9d, %r11d
notb %r11b
movzbl %r11b, %r11d
andl $0x7, %r11d
xorl %ebx, %ebx
btl %r11d, %r10d
setb %bl
incq %r9
leal (%rbx,%r15,2), %r15d
decq %r8
jne 0x693d5
addq %rcx, %rsi
shll $0x2, %r15d
movq 0x10(%rsp), %r11
movl (%rax,%r15), %r8d
movl %r8d, (%rdi)
incq %rdx
addq $0x4, %rdi
xorl %r13d, %r13d
cmpq %r11, %rdx
jne 0x693c7
jmp 0x6927c
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
addq $0x5, %r14
xorl %ecx, %ecx
movq 0x20(%rsp), %rbx
movzbl -0x5(%r14), %r8d
movb %r8b, (%rdi,%rcx,4)
movzbl -0x3(%r14), %r10d
movb %r10b, 0x1(%rdi,%rcx,4)
movzbl -0x1(%r14), %esi
movb %sil, 0x2(%rdi,%rcx,4)
movb $-0x1, %dl
testl %eax, %eax
je 0x694a4
shll $0x8, %r8d
movzbl -0x4(%r14), %r9d
orl %r8d, %r9d
cmpl 0x1c(%rbx), %r9d
jne 0x694a4
shll $0x8, %r10d
movzbl -0x2(%r14), %r8d
orl %r10d, %r8d
cmpl 0x20(%rbx), %r8d
jne 0x694a4
shll $0x8, %esi
movzbl (%r14), %edx
orl %esi, %edx
movq 0x20(%rsp), %rsi
cmpl 0x24(%rsi), %edx
setne %dl
negb %dl
movb %dl, 0x3(%rdi,%rcx,4)
incq %rcx
addq $0x6, %r14
xorl %r13d, %r13d
cmpq %rcx, %r11
jne 0x69447
jmp 0x6927c
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,4), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb %cl, 0x1(%rdi,%rax,4)
movb %cl, (%rdi,%rax,4)
movb 0x2(%r14,%rax,4), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
cmpq %rax, %r11
jne 0x694ca
jmp 0x6927c
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,8), %cl
movb %cl, (%rdi,%rax,4)
movb 0x2(%r14,%rax,8), %cl
movb %cl, 0x1(%rdi,%rax,4)
movb 0x4(%r14,%rax,8), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb 0x6(%r14,%rax,8), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
cmpq %rax, %r11
jne 0x694fd
jmp 0x6927c
testq %r11, %r11
je 0x69552
xorl %ecx, %ecx
movb (%r14,%rcx), %sil
movb %sil, 0x2(%rdi)
movb %sil, 0x1(%rdi)
movb %sil, (%rdi)
movb $-0x1, 0x3(%rdi)
incq %rcx
addq $0x4, %rdi
cmpq %rcx, %r11
jne 0x69533
testq %r11, %r11
je 0x6927c
cmpl $0x0, 0x18(%r9)
je 0x6927c
movl 0x1c(%r9), %ecx
imulq %rdx, %rax
negq %rax
movzbl (%rdi,%rax,4), %edx
cmpl %edx, %ecx
jne 0x6957e
movb $0x0, 0x3(%rdi,%rax,4)
incq %rax
jne 0x69571
jmp 0x6927c
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
testq %r11, %r11
je 0x6927c
notl %esi
movq 0x20(%rsp), %rax
movl 0x18(%rax), %r12d
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
testq %rcx, %rcx
je 0x695ec
movq %rcx, %rax
movq %r9, %rdx
movq %rdx, %r11
shrq $0x3, %r11
movzbl (%r14,%r11), %r11d
movl %edx, %ebx
notb %bl
movzbl %bl, %ebx
andl $0x7, %ebx
xorl %r15d, %r15d
btl %ebx, %r11d
setb %r15b
incq %rdx
leal (%r15,%r10,2), %r10d
decq %rax
jne 0x695b7
addq %rcx, %r9
movq 0x10(%rsp), %r11
movl %r10d, %eax
shll $0x8, %eax
subl %r10d, %eax
xorl %edx, %edx
divl %esi
movb %al, 0x2(%rdi)
movb %al, 0x1(%rdi)
movb %al, (%rdi)
testl %r12d, %r12d
je 0x69616
movq 0x20(%rsp), %rax
cmpl 0x1c(%rax), %r10d
setne %al
negb %al
jmp 0x69618
movb $-0x1, %al
movb %al, 0x3(%rdi)
incq %r8
addq $0x4, %rdi
xorl %r13d, %r13d
cmpq %r11, %r8
jne 0x695a9
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x69707
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
xorl %r13d, %r13d
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movb 0x2(%rax,%rdx,4), %sil
movb %sil, 0x2(%rdi)
movzwl (%rax,%rdx,4), %edx
movw %dx, (%rdi)
incq %rcx
addq $0x3, %rdi
cmpq %rcx, %r11
jne 0x69653
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x6978c
testq %r11, %r11
je 0x6927c
leaq (%r11,%r11,2), %rdx
movq %r14, %rsi
jmp 0x693a7
cmpl $0x8, %ecx
jne 0x697c1
testq %r11, %r11
je 0x6927c
addq $0x2, %rdi
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,2), %cl
movb %cl, (%rdi)
movb %cl, -0x1(%rdi)
movb %cl, -0x2(%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x696b2
jmp 0x6927c
cmpl $0x8, %ecx
jne 0x697f0
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb 0x2(%r14,%rax,4), %cl
movb %cl, 0x2(%rdi)
movzwl (%r14,%rax,4), %ecx
movw %cx, (%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x696e6
jmp 0x6927c
testq %r11, %r11
je 0x6927c
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
xorl %edx, %edx
xorl %esi, %esi
xorl %r15d, %r15d
testq %rcx, %rcx
je 0x69766
movq %rcx, %r8
movq %rsi, %r9
movq %r9, %r10
shrq $0x3, %r10
movzbl (%r14,%r10), %r10d
movl %r9d, %r11d
notb %r11b
movzbl %r11b, %r11d
andl $0x7, %r11d
xorl %ebx, %ebx
btl %r11d, %r10d
setb %bl
incq %r9
leal (%rbx,%r15,2), %r15d
decq %r8
jne 0x6972b
addq %rcx, %rsi
shll $0x2, %r15d
movq 0x10(%rsp), %r11
movb 0x2(%rax,%r15), %r8b
movb %r8b, 0x2(%rdi)
movzwl (%rax,%r15), %r8d
movw %r8w, (%rdi)
incq %rdx
addq $0x3, %rdi
xorl %r13d, %r13d
cmpq %r11, %rdx
jne 0x6971d
jmp 0x6927c
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,2), %cl
movb %cl, (%rdi,%rax)
movb 0x2(%r14,%rax,2), %cl
movb %cl, 0x1(%rdi,%rax)
movb 0x4(%r14,%rax,2), %cl
movb %cl, 0x2(%rdi,%rax)
addq $0x3, %rax
decq %r11
jne 0x6979a
jmp 0x6927c
testq %r11, %r11
je 0x6927c
addq $0x2, %rdi
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,4), %cl
movb %cl, (%rdi)
movb %cl, -0x1(%rdi)
movb %cl, -0x2(%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x697d3
jmp 0x6927c
testq %r11, %r11
je 0x6927c
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax,8), %cl
movb %cl, (%rdi)
movb 0x2(%r14,%rax,8), %cl
movb %cl, 0x1(%rdi)
movb 0x4(%r14,%rax,8), %cl
movb %cl, 0x2(%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x697fe
jmp 0x6927c
testq %r11, %r11
je 0x6927c
addq $0x2, %rdi
xorl %r13d, %r13d
xorl %eax, %eax
movb (%r14,%rax), %cl
movb %cl, (%rdi)
movb %cl, -0x1(%rdi)
movb %cl, -0x2(%rdi)
incq %rax
addq $0x3, %rdi
cmpq %rax, %r11
jne 0x69837
jmp 0x6927c
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
shll %cl, %esi
testq %r11, %r11
je 0x6927c
notl %esi
xorl %r15d, %r15d
xorl %r8d, %r8d
testq %rcx, %rcx
je 0x698b8
xorl %edx, %edx
movq %rcx, %rax
movq %r8, %r9
movq %r9, %r10
shrq $0x3, %r10
movzbl (%r14,%r10), %r10d
movl %r9d, %r11d
notb %r11b
movzbl %r11b, %r11d
andl $0x7, %r11d
xorl %ebx, %ebx
btl %r11d, %r10d
setb %bl
incq %r9
leal (%rbx,%rdx,2), %edx
decq %rax
jne 0x69879
addq %rcx, %r8
movl %edx, %eax
shll $0x8, %eax
subl %edx, %eax
movq 0x10(%rsp), %r11
jmp 0x698ba
xorl %eax, %eax
xorl %r13d, %r13d
xorl %edx, %edx
divl %esi
movb %al, 0x2(%rdi)
movb %al, 0x1(%rdi)
movb %al, (%rdi)
incq %r15
addq $0x3, %rdi
cmpq %r11, %r15
jne 0x6986c
jmp 0x6927c