// File: /workspace/github_cpp_makefile_star2_O3/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 0x112f3
leaq 0x15200(%rip), %rax     # 0x264f2
retq
pushq %rbx
movslq %esi, %rax
shlq $0x6, %rax
movq (%rdi), %rdx
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %r9
xorl %r10d, %r10d
movb $0x1, %cl
xorl %r8d, %r8d
cmpq %r9, %rsi
je 0x1133f
movl (%rsi), %r11d
cmpl $0x2, %r11d
movzbl %cl, %ecx
cmovbl %r10d, %ecx
cmpl $0x6, %r11d
jne 0x11339
movq 0x8(%rsi), %r11
movl (%r11), %ebx
cmpl 0x4(%r11), %ebx
setne %r11b
orb %r11b, %r8b
addq $0x20, %rsi
jmp 0x1130e
movl 0x3c(%rdx,%rax), %edx
cmpl $0x3, 0x68(%rdi)
popq %rbx
jge 0x1135b
testl %edx, %edx
je 0x1136e
cmpl $0x1, %edx
jne 0x11376
leaq 0x151a2(%rip), %rax     # 0x264fc
retq
testl %edx, %edx
sete %sil
testb %sil, %r8b
je 0x11378
leaq 0x14f2a(%rip), %rax     # 0x26297
retq
leaq 0x15182(%rip), %rax     # 0x264f7
retq
xorl %esi, %esi
movl %ecx, %eax
andb %sil, %al
testb $0x30, 0x70(%rdi)
je 0x1138f
testb $0x1, %al
je 0x1139b
leaq 0x15183(%rip), %rax     # 0x26511
retq
testb $0x1, %al
je 0x113ad
leaq 0x15168(%rip), %rax     # 0x26502
retq
cmpl $0x1, %edx
sete %al
testb %al, %cl
je 0x113bf
leaq 0x1516a(%rip), %rax     # 0x26516
retq
cmpl $0x1, %edx
sete %al
testb %al, %cl
je 0x113d1
leaq 0x15148(%rip), %rax     # 0x26506
retq
cmpl $0x2, %edx
sete %al
testb %al, %cl
je 0x113f8
leaq 0x1514e(%rip), %rax     # 0x2651e
retq
cmpl $0x2, %edx
sete %al
andb %al, %cl
orb %cl, %sil
leaq 0x15129(%rip), %rdi     # 0x2650c
leaq 0x15145(%rip), %rax     # 0x2652f
testb %cl, %cl
cmovneq %rdi, %rax
testb $0x1, %sil
je 0x11418
jmp 0x1142f
leal -0x3(%rdx), %eax
cmpl $0x3, %eax
jae 0x1140b
movl %eax, %eax
leaq 0x14f8b(%rip), %rcx     # 0x26394
jmp 0x11428
testb %sil, %sil
je 0x11418
leaq 0x15118(%rip), %rax     # 0x2652f
retq
decl %edx
cmpl $0x6, %edx
jae 0x11430
movl %edx, %eax
leaq 0x14f78(%rip), %rcx     # 0x263a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x15121(%rip), %rax     # 0x26558
retq