// File: /workspace/github_cpp_makefile_star2_O1/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 0x1137d
leaq 0x15176(%rip), %rax     # 0x264f2
retq
pushq %rbp
pushq %rbx
movslq %esi, %rdx
shlq $0x6, %rdx
movq (%rdi), %rsi
movq 0x18(%rdi), %r8
movq 0x20(%rdi), %r9
xorl %eax, %eax
movb $0x1, %cl
cmpq %r9, %r8
je 0x113d1
movl $0x1, %r11d
xorl %r10d, %r10d
movl (%r8), %ebx
cmpl $0x2, %ebx
movzbl %cl, %ecx
cmovbl %eax, %ecx
cmpl $0x6, %ebx
jne 0x113c5
movq 0x8(%r8), %rbx
movl (%rbx), %ebp
cmpl 0x4(%rbx), %ebp
movzbl %r10b, %r10d
cmovnel %r11d, %r10d
addq $0x20, %r8
cmpq %r9, %r8
jne 0x113a3
movl %r10d, %eax
movl 0x3c(%rsi,%rdx), %edx
cmpl $0x3, 0x68(%rdi)
popq %rbx
popq %rbp
jge 0x113ee
testl %edx, %edx
je 0x1141a
cmpl $0x1, %edx
jne 0x113ee
leaq 0x1510f(%rip), %rax     # 0x264fc
retq
testl %edx, %edx
sete %sil
testb %sil, %al
je 0x11401
leaq 0x14e97(%rip), %rax     # 0x26297
retq
testl %edx, %edx
sete %al
andb %cl, %al
testb $0x30, 0x70(%rdi)
je 0x11422
testb %al, %al
je 0x1142e
leaq 0x150f8(%rip), %rax     # 0x26511
retq
leaq 0x150d6(%rip), %rax     # 0x264f7
retq
testb %al, %al
je 0x11440
leaq 0x150d5(%rip), %rax     # 0x26502
retq
cmpl $0x1, %edx
sete %al
testb %al, %cl
je 0x11452
leaq 0x150d7(%rip), %rax     # 0x26516
retq
cmpl $0x1, %edx
sete %al
testb %al, %cl
je 0x11464
leaq 0x150b5(%rip), %rax     # 0x26506
retq
cmpl $0x2, %edx
sete %al
testb %al, %cl
je 0x11490
leaq 0x150bb(%rip), %rax     # 0x2651e
retq
testl %edx, %edx
sete %sil
cmpl $0x2, %edx
sete %al
andb %al, %cl
orb %cl, %sil
leaq 0x15090(%rip), %rdi     # 0x2650c
leaq 0x150ac(%rip), %rax     # 0x2652f
testb %cl, %cl
cmovneq %rdi, %rax
testb %sil, %sil
je 0x114a7
jmp 0x114be
leal -0x3(%rdx), %eax
cmpl $0x3, %eax
jae 0x114a3
movl %eax, %eax
leaq 0x14ef3(%rip), %rcx     # 0x26394
jmp 0x114b7
testl %edx, %edx
je 0x114c7
decl %edx
cmpl $0x6, %edx
jae 0x114bf
movl %edx, %eax
leaq 0x14ee9(%rip), %rcx     # 0x263a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x15092(%rip), %rax     # 0x26558
retq
leaq 0x15061(%rip), %rax     # 0x2652f
retq