// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/tagnames.c
// Function: jp2000tagname
char *
jp2000tagname(unsigned short tag)
{
    static char unknown_buf[16];
    char *tagname;

    switch(tag)
    {
		case 0xFF4F: tagname = "JP2C_SOC"; break;
		case 0xFF90: tagname = "JP2C_SOT"; break;
		case 0xFF93: tagname = "JP2C_SOD"; break;
		case 0xFFd9: tagname = "JP2C_EOC"; break;
		case 0xFF51: tagname = "JP2C_SIZ"; break;
		case 0xFF52: tagname = "JP2C_COD"; break;
		case 0xFF53: tagname = "JP2C_COC"; break;
		case 0xFF5e: tagname = "JP2C_RGN"; break;
		case 0xFF5c: tagname = "JP2C_QCD"; break;
		case 0xFF5d: tagname = "JP2C_QCC"; break;
		case 0xFF5F: tagname = "JP2C_POC"; break;
		case 0xFF55: tagname = "JP2C_TLM"; break;
		case 0xFF57: tagname = "JP2C_PLM"; break;
		case 0xFF58: tagname = "JP2C_PLT"; break;
		case 0xFF60: tagname = "JP2C_PPM"; break;
		case 0xFF61: tagname = "JP2C_PPT"; break;
		case 0xFF91: tagname = "JP2C_SOP"; break;
		case 0xFF92: tagname = "JP2C_EPH"; break;
		case 0xFF63: tagname = "JP2C_CRG"; break;
		case 0xFF64: tagname = "JP2C_COM"; break;
        default:
            if(snprintf(unknown_buf,12,"JP2C_%#06x",(int)tag) > 12)
            {
                printf(" bad tag %#x not converted\n",tag);
                why(stdout);
                tagname = "<BADTAG>";
            }
            else
                tagname = unknown_buf;
            break;
    }
    tagname = strdup(tagname);
    return(tagname);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
leal -0xff4f(%r14), %eax
cmpl $0x15, %eax
ja 0xbec6
leaq 0x347eb(%rip), %rcx     # 0x4069c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3610f(%rip), %rbx     # 0x41fd0
jmp 0xbff3
leal -0xff90(%r14), %eax
cmpl $0x3, %eax
ja 0xbeee
leaq 0x3481b(%rip), %rcx     # 0x406f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x360f0(%rip), %rbx     # 0x41fd9
jmp 0xbff3
cmpl $0xffd9, %r14d          # imm = 0xFFD9
jne 0xbf03
leaq 0x360ed(%rip), %rbx     # 0x41feb
jmp 0xbff3
leaq 0x50616(%rip), %rbx     # 0x5c520
leaq 0x36173(%rip), %rdx     # 0x42084
pushq $0xc
popq %rsi
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3130
cmpl $0xd, %eax
jl 0xbff3
leaq 0x33d62(%rip), %rdi     # 0x3fc93
movl %r14d, %esi
xorl %eax, %eax
callq 0x3120
movq 0x4b086(%rip), %rax     # 0x56fc8
movq (%rax), %rdi
callq 0x16e8c
leaq 0x33d5e(%rip), %rbx     # 0x3fcaf
jmp 0xbff3
leaq 0x360e8(%rip), %rbx     # 0x42045
jmp 0xbff3
leaq 0x360b8(%rip), %rbx     # 0x42021
jmp 0xbff3
leaq 0x360e2(%rip), %rbx     # 0x42057
jmp 0xbff3
leaq 0x3607f(%rip), %rbx     # 0x41ffd
jmp 0xbff3
leaq 0x360a3(%rip), %rbx     # 0x4202a
jmp 0xbff3
leaq 0x360a3(%rip), %rbx     # 0x42033
jmp 0xbff3
leaq 0x360e2(%rip), %rbx     # 0x4207b
jmp 0xbff3
leaq 0x3606d(%rip), %rbx     # 0x4200f
jmp 0xbff3
leaq 0x36049(%rip), %rbx     # 0x41ff4
jmp 0xbff3
leaq 0x36088(%rip), %rbx     # 0x4203c
jmp 0xbff3
leaq 0x36049(%rip), %rbx     # 0x42006
jmp 0xbff3
leaq 0x360ac(%rip), %rbx     # 0x42072
jmp 0xbff3
leaq 0x36049(%rip), %rbx     # 0x42018
jmp 0xbff3
leaq 0x36076(%rip), %rbx     # 0x4204e
jmp 0xbff3
leaq 0x36088(%rip), %rbx     # 0x42069
jmp 0xbff3
leaq 0x35ff8(%rip), %rbx     # 0x41fe2
jmp 0xbff3
leaq 0x3606d(%rip), %rbx     # 0x42060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32b0
nop