// File: cloudinary[P]fuif/image/image.cpp
// Function: colormodel_name(int, int)
const char * colormodel_name(int colormodel, int nb_channels) {
    if (nb_channels == 1) return "Grayscale";
    else if (nb_channels == 2) return "Grayscale+alpha";

    switch (colormodel>>4) {
        case 7: return "Custom other";
        case 6: return "Custom CIE";
        case 5: return "Custom CMYK";
        case 4: return "Custom RGB";
        case 3: return "[RESERVED]";
        case 2:
            if (nb_channels == 3) {
                if (colormodel & 1) return "CIEXYZ";
                else return "CIELAB";
            } else if (nb_channels == 4) {
                if (colormodel & 1) return "CIEXYZ+alpha";
                else return "CIELAB+alpha";
            }
        case 1:
            if (nb_channels == 3) return "CMY";
            else if (nb_channels == 4) return "CMYK";
            else if (nb_channels == 5) return "CMYK+alpha";
            else return "CMYK+";

        case 0:
        default:
            if (nb_channels == 3) return "RGB";
            else if (nb_channels == 4) return "RGBA";
            else return "RGB+";
    }
}

// Assembly:
movl %edi, -0xc(%rsp)
movl %esi, -0x10(%rsp)
cmpl $0x1, -0x10(%rsp)
jne 0x41e0
leaq 0x41e62(%rip), %rax     # 0x46038
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x2, -0x10(%rsp)
jne 0x41f8
leaq 0x41e54(%rip), %rax     # 0x46042
movq %rax, -0x8(%rsp)
jmp 0x436e
jmp 0x41fa
movl -0xc(%rsp), %eax
sarl $0x4, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rsp)
subl $0x7, %eax
ja 0x4338
movq -0x18(%rsp), %rax
leaq 0x41de7(%rip), %rcx     # 0x46004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x41e25(%rip), %rax     # 0x46052
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41e21(%rip), %rax     # 0x4605f
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41e1b(%rip), %rax     # 0x4606a
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41e16(%rip), %rax     # 0x46076
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41e10(%rip), %rax     # 0x46081
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x3, -0x10(%rsp)
jne 0x42b0
movl -0xc(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x429f
leaq 0x41df7(%rip), %rax     # 0x4608c
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41ded(%rip), %rax     # 0x46093
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x4, -0x10(%rsp)
jne 0x42e5
movl -0xc(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x42d4
leaq 0x41dd0(%rip), %rax     # 0x4609a
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41dcc(%rip), %rax     # 0x460a7
movq %rax, -0x8(%rsp)
jmp 0x436e
jmp 0x42e7
jmp 0x42e9
cmpl $0x3, -0x10(%rsp)
jne 0x42fe
leaq 0x41dbd(%rip), %rax     # 0x460b4
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x4, -0x10(%rsp)
jne 0x4313
leaq 0x41d65(%rip), %rax     # 0x46071
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x5, -0x10(%rsp)
jne 0x4328
leaq 0x41d97(%rip), %rax     # 0x460b8
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41d94(%rip), %rax     # 0x460c3
movq %rax, -0x8(%rsp)
jmp 0x436e
jmp 0x4338
cmpl $0x3, -0x10(%rsp)
jne 0x434d
leaq 0x41d37(%rip), %rax     # 0x4607d
movq %rax, -0x8(%rsp)
jmp 0x436e
cmpl $0x4, -0x10(%rsp)
jne 0x4362
leaq 0x41d6e(%rip), %rax     # 0x460c9
movq %rax, -0x8(%rsp)
jmp 0x436e
leaq 0x41d65(%rip), %rax     # 0x460ce
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)