// File: lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: testAutoColorModels()
void testAutoColorModels() {
  // 1-bit gray
  std::vector<unsigned char> gray1;
  for(size_t i = 0; i < 2; i++) addColor(gray1, i * 255, i * 255, i * 255, 255);
  testAutoColorModel(gray1, 8, LCT_GREY, 1, false);

  // 2-bit gray
  std::vector<unsigned char> gray2;
  for(size_t i = 0; i < 4; i++) addColor(gray2, i * 85, i * 85, i * 85, 255);
  testAutoColorModel(gray2, 8, LCT_GREY, 2, false);

  // 4-bit gray
  std::vector<unsigned char> gray4;
  for(size_t i = 0; i < 16; i++) addColor(gray4, i * 17, i * 17, i * 17, 255);
  testAutoColorModel(gray4, 8, LCT_GREY, 4, false);

  // 8-bit gray
  std::vector<unsigned char> gray8;
  for(size_t i = 0; i < 256; i++) addColor(gray8, i, i, i, 255);
  testAutoColorModel(gray8, 8, LCT_GREY, 8, false);

  // 16-bit gray
  std::vector<unsigned char> gray16;
  for(size_t i = 0; i < 257; i++) addColor16(gray16, i, i, i, 65535);
  testAutoColorModel(gray16, 16, LCT_GREY, 16, false);

  // 8-bit gray+alpha
  std::vector<unsigned char> gray8a;
  for(size_t i = 0; i < 17; i++) addColor(gray8a, i, i, i, i);
  testAutoColorModel(gray8a, 8, LCT_PALETTE, 8, false);
  // palette not possible, becomes gray alpha
  for(size_t i = 0; i < 256; i++) addColor(gray8a, i, i, i, i ^ 1);
  testAutoColorModel(gray8a, 8, LCT_GREY_ALPHA, 8, false);

  // 16-bit gray+alpha
  std::vector<unsigned char> gray16a;
  for(size_t i = 0; i < 257; i++) addColor16(gray16a, i, i, i, i);
  testAutoColorModel(gray16a, 16, LCT_GREY_ALPHA, 16, false);


  // various palette tests
  std::vector<unsigned char> palette;
  addColor(palette, 0, 0, 1, 255);
  testAutoColorModel(palette, 8, LCT_PALETTE, 1, false);
  addColor(palette, 0, 0, 2, 255);
  testAutoColorModel(palette, 8, LCT_PALETTE, 1, false);
  for(int i = 3; i <= 4; i++) addColor(palette, 0, 0, i, 255);
  testAutoColorModel(palette, 8, LCT_PALETTE, 2, false);
  for(int i = 5; i <= 7; i++) addColor(palette, 0, 0, i, 255);
  testAutoColorModel(palette, 8, LCT_PALETTE, 4, false);
  for(int i = 8; i <= 17; i++) addColor(palette, 0, 0, i, 255);
  testAutoColorModel(palette, 8, LCT_PALETTE, 8, false);
  addColor(palette, 0, 0, 18, 0); // transparent
  testAutoColorModel(palette, 8, LCT_PALETTE, 8, false);
  addColor(palette, 0, 0, 18, 1); // translucent
  testAutoColorModel(palette, 8, LCT_PALETTE, 8, false);

  // 1-bit gray + alpha not possible, becomes palette
  std::vector<unsigned char> gray1a;
  for(size_t i = 0; i < 2; i++) addColor(gray1a, i, i, i, 128);
  testAutoColorModel(gray1a, 8, LCT_PALETTE, 1, false);

  // 2-bit gray + alpha not possible, becomes palette
  std::vector<unsigned char> gray2a;
  for(size_t i = 0; i < 4; i++) addColor(gray2a, i, i, i, 128);
  testAutoColorModel(gray2a, 8, LCT_PALETTE, 2, false);

  // 4-bit gray + alpha not possible, becomes palette
  std::vector<unsigned char> gray4a;
  for(size_t i = 0; i < 16; i++) addColor(gray4a, i, i, i, 128);
  testAutoColorModel(gray4a, 8, LCT_PALETTE, 4, false);

  // 8-bit rgb
  std::vector<unsigned char> rgb = gray8;
  addColor(rgb, 255, 0, 0, 255);
  testAutoColorModel(rgb, 8, LCT_RGB, 8, false);

  // 8-bit rgb + key
  std::vector<unsigned char> rgb_key = rgb;
  addColor(rgb_key, 128, 0, 0, 0);
  testAutoColorModel(rgb_key, 8, LCT_RGB, 8, true);

  // 8-bit rgb, not key due to edge case: single key color, but opaque color has same RGB value
  std::vector<unsigned char> rgb_key2 = rgb_key;
  addColor(rgb_key2, 128, 0, 0, 255); // same color but opaque ==> no more key
  testAutoColorModel(rgb_key2, 8, LCT_RGBA, 8, false);

  // 8-bit rgb, not key due to semi translucent
  std::vector<unsigned char> rgb_key3 = rgb_key;
  addColor(rgb_key3, 128, 0, 0, 255); // semi-translucent ==> no more key
  testAutoColorModel(rgb_key3, 8, LCT_RGBA, 8, false);

  // 8-bit rgb, not key due to multiple transparent colors
  std::vector<unsigned char> rgb_key4 = rgb_key;
  addColor(rgb_key4, 128, 0, 0, 255);
  addColor(rgb_key4, 129, 0, 0, 255); // two different transparent colors ==> no more key
  testAutoColorModel(rgb_key4, 8, LCT_RGBA, 8, false);

  // 1-bit gray with key
  std::vector<unsigned char> gray1_key = gray1;
  gray1_key[7] = 0;
  testAutoColorModel(gray1_key, 8, LCT_GREY, 1, true);

  // 2-bit gray with key
  std::vector<unsigned char> gray2_key = gray2;
  gray2_key[7] = 0;
  testAutoColorModel(gray2_key, 8, LCT_GREY, 2, true);

  // 4-bit gray with key
  std::vector<unsigned char> gray4_key = gray4;
  gray4_key[7] = 0;
  testAutoColorModel(gray4_key, 8, LCT_GREY, 4, true);

  // 8-bit gray with key
  std::vector<unsigned char> gray8_key = gray8;
  gray8_key[7] = 0;
  testAutoColorModel(gray8_key, 8, LCT_GREY, 8, true);

  // 16-bit gray with key
  std::vector<unsigned char> gray16_key = gray16;
  gray16_key[14] = gray16_key[15] = 0;
  testAutoColorModel(gray16_key, 16, LCT_GREY, 16, true);

  // a single 16-bit color, can't become palette due to being 16-bit
  std::vector<unsigned char> small16;
  addColor16(small16, 1, 0, 0, 65535);
  testAutoColorModel(small16, 16, LCT_RGB, 16, false);

  std::vector<unsigned char> small16a;
  addColor16(small16a, 1, 0, 0, 1);
  testAutoColorModel(small16a, 16, LCT_RGBA, 16, false);

  // what we provide as 16-bit is actually representable as 8-bit, so 8-bit palette expected for single color
  std::vector<unsigned char> not16;
  addColor16(not16, 257, 257, 257, 0);
  testAutoColorModel(not16, 16, LCT_PALETTE, 1, false);

  // the rgb color is representable as 8-bit, but the alpha channel only as 16-bit, so ensure it uses 16-bit and not palette for this single color
  std::vector<unsigned char> alpha16;
  addColor16(alpha16, 257, 0, 0, 10000);
  testAutoColorModel(alpha16, 16, LCT_RGBA, 16, false);

  // 1-bit gray, with attempt to get color key but can't do it due to opaque color with same value
  std::vector<unsigned char> gray1k;
  addColor(gray1k, 0, 0, 0, 255);
  addColor(gray1k, 255, 255, 255, 255);
  addColor(gray1k, 255, 255, 255, 0);
  testAutoColorModel(gray1k, 8, LCT_PALETTE, 2, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
leaq -0x18(%rbp), %rdi
callq 0x1a4a0
movq $0x0, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jae 0x5c381
movl -0x20(%rbp), %eax
negl %eax
movzbl %al, %ecx
leaq -0x18(%rbp), %rdi
movl $0xff, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c360
jmp 0x5c362
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5c33c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d3de
leaq -0x18(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x5a910
jmp 0x5c39c
leaq -0x48(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c3a7
movq $0x0, -0x50(%rbp)
cmpq $0x4, -0x50(%rbp)
jae 0x5c3f5
movl -0x50(%rbp), %eax
imull $0x55, %eax, %eax
movzbl %al, %ecx
leaq -0x48(%rbp), %rdi
movl $0xff, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c3d4
jmp 0x5c3d6
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x5c3af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d3d1
leaq -0x48(%rbp), %rdi
movl $0x8, %esi
movl $0x2, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x5a910
jmp 0x5c410
leaq -0x68(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c41b
movq $0x0, -0x70(%rbp)
cmpq $0x10, -0x70(%rbp)
jae 0x5c46d
movl -0x70(%rbp), %eax
movl %eax, %ecx
shll $0x4, %ecx
addl %ecx, %eax
movzbl %al, %ecx
leaq -0x68(%rbp), %rdi
movl $0xff, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c44c
jmp 0x5c44e
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x5c423
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d3c4
leaq -0x68(%rbp), %rdi
movl $0x8, %esi
movl $0x4, %ecx
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x5a910
jmp 0x5c488
leaq -0x88(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c496
movq $0x0, -0x90(%rbp)
cmpq $0x100, -0x90(%rbp) # imm = 0x100
jae 0x5c4f4
movzbl -0x90(%rbp), %ecx
leaq -0x88(%rbp), %rdi
movl $0xff, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c4cd
jmp 0x5c4cf
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x5c4a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d3b4
leaq -0x88(%rbp), %rdi
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
movl %r8d, %edx
callq 0x5a910
jmp 0x5c50f
leaq -0xa8(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c51d
movq $0x0, -0xb0(%rbp)
cmpq $0x101, -0xb0(%rbp) # imm = 0x101
jae 0x5c57b
movzwl -0xb0(%rbp), %ecx
leaq -0xa8(%rbp), %rdi
movl $0xffff, %r8d           # imm = 0xFFFF
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a810
jmp 0x5c554
jmp 0x5c556
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x5c528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d3a4
leaq -0xa8(%rbp), %rdi
movl $0x10, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
movl %r8d, %edx
callq 0x5a910
jmp 0x5c596
leaq -0xc8(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c5a4
movq $0x0, -0xd0(%rbp)
cmpq $0x11, -0xd0(%rbp)
jae 0x5c5ff
movzbl -0xd0(%rbp), %r8d
leaq -0xc8(%rbp), %rdi
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x5a7b0
jmp 0x5c5d8
jmp 0x5c5da
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0x5c5af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d394
leaq -0xc8(%rbp), %rdi
movl $0x3, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c61c
movq $0x0, -0xd8(%rbp)
cmpq $0x100, -0xd8(%rbp) # imm = 0x100
jae 0x5c66e
movl -0xd8(%rbp), %ecx
movl %ecx, %eax
xorl $0x1, %eax
movzbl %cl, %ecx
movzbl %al, %r8d
leaq -0xc8(%rbp), %rdi
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c658
jmp 0x5c65a
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x5c627
leaq -0xc8(%rbp), %rdi
movl $0x4, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c68b
leaq -0xf0(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c699
movq $0x0, -0xf8(%rbp)
cmpq $0x101, -0xf8(%rbp) # imm = 0x101
jae 0x5c6f7
movzwl -0xf8(%rbp), %r8d
leaq -0xf0(%rbp), %rdi
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x5a810
jmp 0x5c6d0
jmp 0x5c6d2
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x5c6a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d384
leaq -0xf0(%rbp), %rdi
movl $0x4, %edx
movl $0x10, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c714
leaq -0x110(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c722
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0x1, %ecx
movl $0xff, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c73f
leaq -0x110(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5c75f
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0x2, %ecx
movl $0xff, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c77c
leaq -0x110(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5c79c
movl $0x3, -0x114(%rbp)
cmpl $0x4, -0x114(%rbp)
jg 0x5c7f2
movzbl -0x114(%rbp), %ecx
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0xff, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c7ce
jmp 0x5c7d0
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x5c7a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d374
leaq -0x110(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5c812
movl $0x5, -0x118(%rbp)
cmpl $0x7, -0x118(%rbp)
jg 0x5c857
movzbl -0x118(%rbp), %ecx
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0xff, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c844
jmp 0x5c846
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x5c81c
leaq -0x110(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5c877
movl $0x8, -0x11c(%rbp)
cmpl $0x11, -0x11c(%rbp)
jg 0x5c8bc
movzbl -0x11c(%rbp), %ecx
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0xff, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c8a9
jmp 0x5c8ab
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x5c881
leaq -0x110(%rbp), %rdi
movl $0x3, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c8d9
leaq -0x110(%rbp), %rdi
movl $0x12, %ecx
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
callq 0x5a7b0
jmp 0x5c8f5
leaq -0x110(%rbp), %rdi
movl $0x3, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c912
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
movl $0x12, %ecx
movl $0x1, %r8d
movl %edx, %esi
callq 0x5a7b0
jmp 0x5c92f
leaq -0x110(%rbp), %rdi
movl $0x3, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5c94c
leaq -0x138(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c95a
movq $0x0, -0x140(%rbp)
cmpq $0x2, -0x140(%rbp)
jae 0x5c9b5
movzbl -0x140(%rbp), %ecx
leaq -0x138(%rbp), %rdi
movl $0x80, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5c98e
jmp 0x5c990
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
jmp 0x5c965
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d364
leaq -0x138(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5c9d5
leaq -0x158(%rbp), %rdi
callq 0x1a4a0
jmp 0x5c9e3
movq $0x0, -0x160(%rbp)
cmpq $0x4, -0x160(%rbp)
jae 0x5ca3e
movzbl -0x160(%rbp), %ecx
leaq -0x158(%rbp), %rdi
movl $0x80, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5ca17
jmp 0x5ca19
movq -0x160(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x160(%rbp)
jmp 0x5c9ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d354
leaq -0x158(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5ca5e
leaq -0x178(%rbp), %rdi
callq 0x1a4a0
jmp 0x5ca6c
movq $0x0, -0x180(%rbp)
cmpq $0x10, -0x180(%rbp)
jae 0x5cac7
movzbl -0x180(%rbp), %ecx
leaq -0x178(%rbp), %rdi
movl $0x80, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5caa0
jmp 0x5caa2
movq -0x180(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x180(%rbp)
jmp 0x5ca77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d344
leaq -0x178(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5cae7
leaq -0x198(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x25250
jmp 0x5cafc
leaq -0x198(%rbp), %rdi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %r8d, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cb17
leaq -0x198(%rbp), %rdi
movl $0x2, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cb34
leaq -0x1b0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x25250
jmp 0x5cb49
leaq -0x1b0(%rbp), %rdi
movl $0x80, %esi
xorl %r8d, %r8d
movl %r8d, %edx
movl %r8d, %ecx
callq 0x5a7b0
jmp 0x5cb65
leaq -0x1b0(%rbp), %rdi
movl $0x2, %edx
movl $0x8, %ecx
movl $0x1, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cb85
leaq -0x1c8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x25250
jmp 0x5cb9a
leaq -0x1c8(%rbp), %rdi
movl $0x80, %esi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cbb7
leaq -0x1c8(%rbp), %rdi
movl $0x6, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cbd4
leaq -0x1e0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x25250
jmp 0x5cbe9
leaq -0x1e0(%rbp), %rdi
movl $0x80, %esi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cc06
leaq -0x1e0(%rbp), %rdi
movl $0x6, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cc23
leaq -0x1f8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x25250
jmp 0x5cc38
leaq -0x1f8(%rbp), %rdi
movl $0x80, %esi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cc55
leaq -0x1f8(%rbp), %rdi
movl $0x81, %esi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cc72
leaq -0x1f8(%rbp), %rdi
movl $0x6, %edx
movl $0x8, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cc8f
leaq -0x210(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x25250
jmp 0x5cca1
leaq -0x210(%rbp), %rdi
movl $0x7, %esi
callq 0x1a5f0
movq %rax, -0x2f0(%rbp)
jmp 0x5ccbb
movq -0x2f0(%rbp), %rax
movb $0x0, (%rax)
leaq -0x210(%rbp), %rdi
movl $0x8, %esi
xorl %edx, %edx
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x5a910
jmp 0x5cce3
leaq -0x228(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x25250
jmp 0x5ccf5
leaq -0x228(%rbp), %rdi
movl $0x7, %esi
callq 0x1a5f0
movq %rax, -0x2f8(%rbp)
jmp 0x5cd0f
movq -0x2f8(%rbp), %rax
movb $0x0, (%rax)
leaq -0x228(%rbp), %rdi
movl $0x8, %esi
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
callq 0x5a910
jmp 0x5cd39
leaq -0x240(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x25250
jmp 0x5cd4b
leaq -0x240(%rbp), %rdi
movl $0x7, %esi
callq 0x1a5f0
movq %rax, -0x300(%rbp)
jmp 0x5cd65
movq -0x300(%rbp), %rax
movb $0x0, (%rax)
leaq -0x240(%rbp), %rdi
movl $0x8, %esi
xorl %edx, %edx
movl $0x4, %ecx
movl $0x1, %r8d
callq 0x5a910
jmp 0x5cd8f
leaq -0x258(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x25250
jmp 0x5cda4
leaq -0x258(%rbp), %rdi
movl $0x7, %esi
callq 0x1a5f0
movq %rax, -0x308(%rbp)
jmp 0x5cdbe
movq -0x308(%rbp), %rax
movb $0x0, (%rax)
leaq -0x258(%rbp), %rdi
xorl %edx, %edx
movl $0x8, %ecx
movl $0x1, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cde5
leaq -0x270(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x25250
jmp 0x5cdfa
leaq -0x270(%rbp), %rdi
movl $0xf, %esi
callq 0x1a5f0
movq %rax, -0x310(%rbp)
jmp 0x5ce14
movq -0x310(%rbp), %rax
movb $0x0, (%rax)
leaq -0x270(%rbp), %rdi
movl $0xe, %esi
callq 0x1a5f0
movq %rax, -0x318(%rbp)
jmp 0x5ce38
movq -0x318(%rbp), %rax
movb $0x0, (%rax)
leaq -0x270(%rbp), %rdi
xorl %edx, %edx
movl $0x10, %ecx
movl $0x1, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5ce5f
leaq -0x288(%rbp), %rdi
callq 0x1a4a0
jmp 0x5ce6d
leaq -0x288(%rbp), %rdi
movl $0x1, %esi
xorl %ecx, %ecx
movl $0xffff, %r8d           # imm = 0xFFFF
movl %ecx, %edx
callq 0x5a810
jmp 0x5ce8a
leaq -0x288(%rbp), %rdi
movl $0x2, %edx
movl $0x10, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cea7
leaq -0x2a0(%rbp), %rdi
callq 0x1a4a0
jmp 0x5ceb5
leaq -0x2a0(%rbp), %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %r8d, %esi
movl %ecx, %edx
callq 0x5a810
jmp 0x5ced0
leaq -0x2a0(%rbp), %rdi
movl $0x6, %edx
movl $0x10, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5ceed
leaq -0x2b8(%rbp), %rdi
callq 0x1a4a0
jmp 0x5cefb
leaq -0x2b8(%rbp), %rdi
movl $0x101, %ecx            # imm = 0x101
xorl %r8d, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a810
jmp 0x5cf15
leaq -0x2b8(%rbp), %rdi
movl $0x10, %esi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5cf35
leaq -0x2d0(%rbp), %rdi
callq 0x1a4a0
jmp 0x5cf43
leaq -0x2d0(%rbp), %rdi
movl $0x101, %esi            # imm = 0x101
xorl %ecx, %ecx
movl $0x2710, %r8d           # imm = 0x2710
movl %ecx, %edx
callq 0x5a810
jmp 0x5cf60
leaq -0x2d0(%rbp), %rdi
movl $0x6, %edx
movl $0x10, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
callq 0x5a910
jmp 0x5cf7d
leaq -0x2e8(%rbp), %rdi
callq 0x1a4a0
jmp 0x5cf8b
leaq -0x2e8(%rbp), %rdi
xorl %ecx, %ecx
movl $0xff, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cfa5
leaq -0x2e8(%rbp), %rdi
movl $0xff, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x5a7b0
jmp 0x5cfc2
leaq -0x2e8(%rbp), %rdi
movl $0xff, %ecx
xorl %r8d, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a7b0
jmp 0x5cfdc
leaq -0x2e8(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x5a910
jmp 0x5cffc
leaq -0x2e8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d00a
leaq -0x2d0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d018
leaq -0x2b8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d026
leaq -0x2a0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d034
leaq -0x288(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d042
leaq -0x270(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d050
leaq -0x258(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d05e
leaq -0x240(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d06c
leaq -0x228(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d07a
leaq -0x210(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d088
leaq -0x1f8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d096
leaq -0x1e0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0a4
leaq -0x1c8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0b2
leaq -0x1b0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0c0
leaq -0x198(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0ce
leaq -0x178(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0dc
leaq -0x158(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0ea
leaq -0x138(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d0f8
leaq -0x110(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d106
leaq -0xf0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d114
leaq -0xc8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d122
leaq -0xa8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d130
leaq -0x88(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d13e
leaq -0x68(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d149
leaq -0x48(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d154
leaq -0x18(%rbp), %rdi
callq 0x1a4c0
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d334
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d324
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d314
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d304
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d2a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d294
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d284
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d274
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x5d264
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d262
jmp 0x5d264
leaq -0x2d0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d272
jmp 0x5d274
leaq -0x2b8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d282
jmp 0x5d284
leaq -0x2a0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d292
jmp 0x5d294
leaq -0x288(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2a2
jmp 0x5d2a4
leaq -0x270(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2b2
jmp 0x5d2b4
leaq -0x258(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2c2
jmp 0x5d2c4
leaq -0x240(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2d2
jmp 0x5d2d4
leaq -0x228(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2e2
jmp 0x5d2e4
leaq -0x210(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d2f2
jmp 0x5d2f4
leaq -0x1f8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d302
jmp 0x5d304
leaq -0x1e0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d312
jmp 0x5d314
leaq -0x1c8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d322
jmp 0x5d324
leaq -0x1b0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d332
jmp 0x5d334
leaq -0x198(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d342
jmp 0x5d344
leaq -0x178(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d352
jmp 0x5d354
leaq -0x158(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d362
jmp 0x5d364
leaq -0x138(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d372
jmp 0x5d374
leaq -0x110(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d382
jmp 0x5d384
leaq -0xf0(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d392
jmp 0x5d394
leaq -0xc8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3a2
jmp 0x5d3a4
leaq -0xa8(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3b2
jmp 0x5d3b4
leaq -0x88(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3c2
jmp 0x5d3c4
leaq -0x68(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3cf
jmp 0x5d3d1
leaq -0x48(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3dc
jmp 0x5d3de
leaq -0x18(%rbp), %rdi
callq 0x1a4c0
jmp 0x5d3e9
jmp 0x5d3eb
movq -0x28(%rbp), %rdi
callq 0x3430
movq %rax, %rdi
callq 0x1a490
nopl (%rax)