// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/encoding.cpp
// Function: ch_describe(Image const&, int)
const char * ch_describe(const Image &image, int i) {
    if (i < image.nb_meta_channels) return "Meta";
    int c=image.channel[i].component;
    bool rgb=true, palette=false;
    for (const Transform &t : image.transform) {
        if (t.ID == TRANSFORM_YCoCg) rgb=false;
        if (t.ID == TRANSFORM_YCbCr) rgb=false;
        if (t.ID == TRANSFORM_PALETTE && t.parameters[0] != t.parameters[1]) { palette=true;}
    }
    if (image.real_nb_channels < 3) {
        if (c==0) return "Gray";
        if (c==1) return "Alpha";
    }
    if (palette && c==0) return "Palette";
    if ((image.colormodel & 48) == 0) {
        if (rgb && c==0) return "Red";
        if (rgb && c==1) return "Green";
        if (rgb && c==2) return "Blue";
    } else {
        if (rgb && c==0) return "Cyan";
        if (rgb && c==1) return "Magenta";
        if (rgb && c==2) return "Yellow";
        if (c==3) return "Key";
        if (c==4) return "Alpha";
        if (c==5) return "Depth";
    }
    if (c==0) return "Luma";
    if (c==1) return "Chroma1";
    if (c==2) return "Chroma2";
    if (c==3) return "Alpha";
    if (c==4) return "Depth";
    if (c==5) return "Unknown_5";
    if (c==6) return "Unknown_6";
    return "Unknown";
}

// Assembly:
cmpl %esi, 0x6c(%rdi)
jle 0xcd4e
leaq 0x11755(%rip), %rax     # 0x1e4a2
retq
movslq %esi, %rax
shlq $0x6, %rax
movq (%rdi), %rcx
movq 0x18(%rdi), %rsi
movl 0x3c(%rcx,%rax), %ecx
movq 0x20(%rdi), %r8
movb $0x1, %dl
xorl %r9d, %r9d
xorl %eax, %eax
cmpq %r8, %rsi
je 0xcd9c
movl (%rsi), %r10d
cmpl $0x2, %r10d
movzbl %dl, %edx
cmovbl %r9d, %edx
cmpl $0x6, %r10d
jne 0xcd96
movq 0x8(%rsi), %r10
movl (%r10), %r11d
cmpl 0x4(%r10), %r11d
setne %r10b
orb %r10b, %al
addq $0x20, %rsi
jmp 0xcd6b
cmpl $0x3, 0x68(%rdi)
jge 0xcdb3
testl %ecx, %ecx
je 0xcdc6
cmpl $0x1, %ecx
jne 0xcdce
leaq 0x116fa(%rip), %rax     # 0x1e4ac
retq
testl %ecx, %ecx
sete %sil
testb %sil, %al
je 0xcdd0
leaq 0x11452(%rip), %rax     # 0x1e217
retq
leaq 0x116da(%rip), %rax     # 0x1e4a7
retq
xorl %esi, %esi
movl %edx, %eax
andb %sil, %al
testb $0x30, 0x70(%rdi)
je 0xcde7
testb $0x1, %al
je 0xcdf3
leaq 0x116db(%rip), %rax     # 0x1e4c1
retq
testb $0x1, %al
je 0xce05
leaq 0x116c0(%rip), %rax     # 0x1e4b2
retq
cmpl $0x1, %ecx
sete %al
testb %al, %dl
je 0xce17
leaq 0x116c2(%rip), %rax     # 0x1e4c6
retq
cmpl $0x1, %ecx
sete %al
testb %al, %dl
je 0xce29
leaq 0x116a0(%rip), %rax     # 0x1e4b6
retq
cmpl $0x2, %ecx
sete %al
testb %al, %dl
je 0xce50
leaq 0x116a6(%rip), %rax     # 0x1e4ce
retq
cmpl $0x2, %ecx
sete %al
andb %al, %dl
orb %dl, %sil
leaq 0x11681(%rip), %rdi     # 0x1e4bc
leaq 0x1169d(%rip), %rax     # 0x1e4df
testb %dl, %dl
cmovneq %rdi, %rax
testb $0x1, %sil
je 0xce70
jmp 0xce87
leal -0x3(%rcx), %eax
cmpl $0x3, %eax
jae 0xce63
movl %eax, %eax
leaq 0x114b3(%rip), %rcx     # 0x1e314
jmp 0xce80
testb %sil, %sil
je 0xce70
leaq 0x11670(%rip), %rax     # 0x1e4df
retq
decl %ecx
cmpl $0x6, %ecx
jae 0xce88
movl %ecx, %eax
leaq 0x114a0(%rip), %rcx     # 0x1e320
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x11679(%rip), %rax     # 0x1e508
retq