// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_error_text(unsigned int)
const char* lodepng_error_text(unsigned code) {
  switch(code) {
    case 0: return "no error, everything went ok";
    case 1: return "nothing done yet"; /*the Encoder/Decoder has done nothing yet, error checking makes no sense yet*/
    case 10: return "end of input memory reached without huffman end code"; /*while huffman decoding*/
    case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decoding*/
    case 13: return "problem while processing dynamic deflate block";
    case 14: return "problem while processing dynamic deflate block";
    case 15: return "problem while processing dynamic deflate block";
    /*this error could happen if there are only 0 or 1 symbols present in the huffman code:*/
    case 16: return "invalid code while processing dynamic deflate block";
    case 17: return "end of out buffer memory reached while inflating";
    case 18: return "invalid distance code while inflating";
    case 19: return "end of out buffer memory reached while inflating";
    case 20: return "invalid deflate block BTYPE encountered while decoding";
    case 21: return "NLEN is not ones complement of LEN in a deflate block";

    /*end of out buffer memory reached while inflating:
    This can happen if the inflated deflate data is longer than the amount of bytes required to fill up
    all the pixels of the image, given the color depth and image dimensions. Something that doesn't
    happen in a normal, well encoded, PNG image.*/
    case 22: return "end of out buffer memory reached while inflating";
    case 23: return "end of in buffer memory reached while inflating";
    case 24: return "invalid FCHECK in zlib header";
    case 25: return "invalid compression method in zlib header";
    case 26: return "FDICT encountered in zlib header while it's not used for PNG";
    case 27: return "PNG file is smaller than a PNG header";
    /*Checks the magic file header, the first 8 bytes of the PNG file*/
    case 28: return "incorrect PNG signature, it's no PNG or corrupted";
    case 29: return "first chunk is not the header chunk";
    case 30: return "chunk length too large, chunk broken off at end of file";
    case 31: return "illegal PNG color type or bpp";
    case 32: return "illegal PNG compression method";
    case 33: return "illegal PNG filter method";
    case 34: return "illegal PNG interlace method";
    case 35: return "chunk length of a chunk is too large or the chunk too small";
    case 36: return "illegal PNG filter type encountered";
    case 37: return "illegal bit depth for this color type given";
    case 38: return "the palette is too small or too big"; /*0, or more than 256 colors*/
    case 39: return "tRNS chunk before PLTE or has more entries than palette size";
    case 40: return "tRNS chunk has wrong size for grayscale image";
    case 41: return "tRNS chunk has wrong size for RGB image";
    case 42: return "tRNS chunk appeared while it was not allowed for this color type";
    case 43: return "bKGD chunk has wrong size for palette image";
    case 44: return "bKGD chunk has wrong size for grayscale image";
    case 45: return "bKGD chunk has wrong size for RGB image";
    case 48: return "empty input buffer given to decoder. Maybe caused by non-existing file?";
    case 49: return "jumped past memory while generating dynamic huffman tree";
    case 50: return "jumped past memory while generating dynamic huffman tree";
    case 51: return "jumped past memory while inflating huffman block";
    case 52: return "jumped past memory while inflating";
    case 53: return "size of zlib data too small";
    case 54: return "repeat symbol in tree while there was no value symbol yet";
    /*jumped past tree while generating huffman tree, this could be when the
    tree will have more leaves than symbols after generating it out of the
    given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/
    case 55: return "jumped past tree while generating huffman tree";
    case 56: return "given output image colortype or bitdepth not supported for color conversion";
    case 57: return "invalid CRC encountered (checking CRC can be disabled)";
    case 58: return "invalid ADLER32 encountered (checking ADLER32 can be disabled)";
    case 59: return "requested color conversion not supported";
    case 60: return "invalid window size given in the settings of the encoder (must be 0-32768)";
    case 61: return "invalid BTYPE given in the settings of the encoder (only 0, 1 and 2 are allowed)";
    /*LodePNG leaves the choice of RGB to grayscale conversion formula to the user.*/
    case 62: return "conversion from color to grayscale not supported";
    /*(2^31-1)*/
    case 63: return "length of a chunk too long, max allowed for PNG is 2147483647 bytes per chunk";
    /*this would result in the inability of a deflated block to ever contain an end code. It must be at least 1.*/
    case 64: return "the length of the END symbol 256 in the Huffman tree is 0";
    case 66: return "the length of a text chunk keyword given to the encoder is longer than the maximum of 79 bytes";
    case 67: return "the length of a text chunk keyword given to the encoder is smaller than the minimum of 1 byte";
    case 68: return "tried to encode a PLTE chunk with a palette that has less than 1 or more than 256 colors";
    case 69: return "unknown chunk type with 'critical' flag encountered by the decoder";
    case 71: return "invalid interlace mode given to encoder (must be 0 or 1)";
    case 72: return "while decoding, invalid compression method encountering in zTXt or iTXt chunk (it must be 0)";
    case 73: return "invalid tIME chunk size";
    case 74: return "invalid pHYs chunk size";
    /*length could be wrong, or data chopped off*/
    case 75: return "no null termination char found while decoding text chunk";
    case 76: return "iTXt chunk too short to contain required bytes";
    case 77: return "integer overflow in buffer size";
    case 78: return "failed to open file for reading"; /*file doesn't exist or couldn't be opened for reading*/
    case 79: return "failed to open file for writing";
    case 80: return "tried creating a tree of 0 symbols";
    case 81: return "lazy matching at pos 0 is impossible";
    case 82: return "color conversion to palette requested while a color isn't in palette, or index out of bounds";
    case 83: return "memory allocation failed";
    case 84: return "given image too small to contain all pixels to be encoded";
    case 86: return "impossible offset in lz77 encoding (internal bug)";
    case 87: return "must provide custom zlib function pointer if LODEPNG_COMPILE_ZLIB is not defined";
    case 88: return "invalid filter strategy given for LodePNGEncoderSettings.filter_strategy";
    case 89: return "text chunk keyword too short or long: must have size 1-79";
    /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/
    case 90: return "windowsize must be a power of two";
    case 91: return "invalid decompressed idat size";
    case 92: return "integer overflow due to too many pixels";
    case 93: return "zero width or height is invalid";
    case 94: return "header chunk must have a size of 13 bytes";
    case 95: return "integer overflow with combined idat chunk size";
    case 96: return "invalid gAMA chunk size";
    case 97: return "invalid cHRM chunk size";
    case 98: return "invalid sRGB chunk size";
    case 99: return "invalid sRGB rendering intent";
    case 100: return "invalid ICC profile color type, the PNG specification only allows RGB or GRAY";
    case 101: return "PNG specification does not allow RGB ICC profile on gray color types and vice versa";
    case 102: return "not allowed to set grayscale ICC profile with colored pixels by PNG specification";
    case 103: return "invalid palette index in bKGD chunk. Maybe it came before PLTE chunk?";
    case 104: return "invalid bKGD color while encoding (e.g. palette index out of range)";
    case 105: return "integer overflow of bitsize";
    case 106: return "PNG file must have PLTE chunk if color type is palette";
    case 107: return "color convert from palette mode requested without setting the palette data in it";
    case 108: return "tried to add more than 256 values to a palette";
    /*this limit can be configured in LodePNGDecompressSettings*/
    case 109: return "tried to decompress zlib or deflate data larger than desired max_output_size";
    case 110: return "custom zlib or inflate decompression failed";
    case 111: return "custom zlib or deflate compression failed";
    /*max text size limit can be configured in LodePNGDecoderSettings. This error prevents
    unreasonable memory consumption when decoding due to impossibly large text sizes.*/
    case 112: return "compressed text unreasonably large";
    /*max ICC size limit can be configured in LodePNGDecoderSettings. This error prevents
    unreasonable memory consumption when decoding due to impossibly large ICC profile*/
    case 113: return "ICC profile unreasonably large";
    case 114: return "sBIT chunk has wrong size for the color type of the image";
    case 115: return "sBIT value out of range";
    case 116: return "cICP value out of range";
    case 117: return "invalid cICP chunk size";
    case 118: return "mDCV value out of range";
    case 119: return "invalid mDCV chunk size";
    case 120: return "invalid cLLI chunk size";
    case 121: return "invalid chunk type name: may only contain [a-zA-Z]";
    case 122: return "invalid chunk type name: third character must be uppercase";
  }
  return "unknown error code";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7a, %rax
ja 0x11591
movq -0x18(%rbp), %rax
leaq 0x9e13d(%rip), %rcx     # 0xaf010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa06da(%rip), %rax     # 0xb15bd
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa06e7(%rip), %rax     # 0xb15da
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa06e8(%rip), %rax     # 0xb15eb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa070d(%rip), %rax     # 0xb1620
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0735(%rip), %rax     # 0xb1658
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0725(%rip), %rax     # 0xb1658
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0715(%rip), %rax     # 0xb1658
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0734(%rip), %rax     # 0xb1687
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0758(%rip), %rax     # 0xb16bb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0779(%rip), %rax     # 0xb16ec
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0738(%rip), %rax     # 0xb16bb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa077f(%rip), %rax     # 0xb1712
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa07a6(%rip), %rax     # 0xb1749
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0708(%rip), %rax     # 0xb16bb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa07bc(%rip), %rax     # 0xb177f
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa07dc(%rip), %rax     # 0xb17af
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa07ea(%rip), %rax     # 0xb17cd
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0804(%rip), %rax     # 0xb17f7
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0831(%rip), %rax     # 0xb1834
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0847(%rip), %rax     # 0xb185a
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0869(%rip), %rax     # 0xb188c
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa087d(%rip), %rax     # 0xb18b0
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa08a5(%rip), %rax     # 0xb18e8
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa08b3(%rip), %rax     # 0xb1906
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa08c2(%rip), %rax     # 0xb1925
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa08cc(%rip), %rax     # 0xb193f
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa08d9(%rip), %rax     # 0xb195c
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0905(%rip), %rax     # 0xb1998
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0919(%rip), %rax     # 0xb19bc
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0935(%rip), %rax     # 0xb19e8
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0949(%rip), %rax     # 0xb1a0c
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0976(%rip), %rax     # 0xb1a49
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0994(%rip), %rax     # 0xb1a77
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa09ac(%rip), %rax     # 0xb1a9f
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa09dd(%rip), %rax     # 0xb1ae0
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa09f9(%rip), %rax     # 0xb1b0c
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0a17(%rip), %rax     # 0xb1b3a
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0a2f(%rip), %rax     # 0xb1b62
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0a67(%rip), %rax     # 0xb1baa
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0a57(%rip), %rax     # 0xb1baa
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0a80(%rip), %rax     # 0xb1be3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0aa1(%rip), %rax     # 0xb1c14
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ab4(%rip), %rax     # 0xb1c37
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ac0(%rip), %rax     # 0xb1c53
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0aea(%rip), %rax     # 0xb1c8d
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0b09(%rip), %rax     # 0xb1cbc
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0b45(%rip), %rax     # 0xb1d08
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0b6c(%rip), %rax     # 0xb1d3f
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0b9b(%rip), %rax     # 0xb1d7e
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0bb4(%rip), %rax     # 0xb1da7
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0bef(%rip), %rax     # 0xb1df2
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0c30(%rip), %rax     # 0xb1e43
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0c51(%rip), %rax     # 0xb1e74
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0c8f(%rip), %rax     # 0xb1ec2
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0cb9(%rip), %rax     # 0xb1efc
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0d08(%rip), %rax     # 0xb1f5b
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0d56(%rip), %rax     # 0xb1fb9
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0d9f(%rip), %rax     # 0xb2012
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0dd2(%rip), %rax     # 0xb2055
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0dfb(%rip), %rax     # 0xb208e
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0e48(%rip), %rax     # 0xb20eb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0e50(%rip), %rax     # 0xb2103
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0e58(%rip), %rax     # 0xb211b
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0e81(%rip), %rax     # 0xb2154
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ea0(%rip), %rax     # 0xb2183
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0eb0(%rip), %rax     # 0xb21a3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ec0(%rip), %rax     # 0xb21c3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ed0(%rip), %rax     # 0xb21e3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ee3(%rip), %rax     # 0xb2206
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0ef8(%rip), %rax     # 0xb222b
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0f45(%rip), %rax     # 0xb2288
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0f4e(%rip), %rax     # 0xb22a1
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0f78(%rip), %rax     # 0xb22db
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0f9a(%rip), %rax     # 0xb230d
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa0fdb(%rip), %rax     # 0xb235e
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1014(%rip), %rax     # 0xb23a7
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa103e(%rip), %rax     # 0xb23e1
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1050(%rip), %rax     # 0xb2403
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa105f(%rip), %rax     # 0xb2422
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1077(%rip), %rax     # 0xb244a
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1087(%rip), %rax     # 0xb246a
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10a1(%rip), %rax     # 0xb2494
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10c0(%rip), %rax     # 0xb24c3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10c8(%rip), %rax     # 0xb24db
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10d0(%rip), %rax     # 0xb24f3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10d8(%rip), %rax     # 0xb250b
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa10e6(%rip), %rax     # 0xb2529
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1124(%rip), %rax     # 0xb2577
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1168(%rip), %rax     # 0xb25cb
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa11aa(%rip), %rax     # 0xb261d
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa11e0(%rip), %rax     # 0xb2663
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1214(%rip), %rax     # 0xb26a7
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1220(%rip), %rax     # 0xb26c3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1247(%rip), %rax     # 0xb26fa
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1288(%rip), %rax     # 0xb274b
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa12a7(%rip), %rax     # 0xb277a
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa12e4(%rip), %rax     # 0xb27c7
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1300(%rip), %rax     # 0xb27f3
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa131a(%rip), %rax     # 0xb281d
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa132d(%rip), %rax     # 0xb2840
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa133c(%rip), %rax     # 0xb285f
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1369(%rip), %rax     # 0xb2899
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1374(%rip), %rax     # 0xb28b1
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa137f(%rip), %rax     # 0xb28c9
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa138a(%rip), %rax     # 0xb28e1
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa1395(%rip), %rax     # 0xb28f9
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa13a0(%rip), %rax     # 0xb2911
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa13ab(%rip), %rax     # 0xb2929
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa13d1(%rip), %rax     # 0xb295c
movq %rax, -0x8(%rbp)
jmp 0x1159c
leaq 0xa13ff(%rip), %rax     # 0xb2997
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)