// File: /workspace/github_c_makefile_star2_O3/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 0xc97e
leaq 0x35d33(%rip), %rcx     # 0x4269c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x37657(%rip), %rbx     # 0x43fd0
jmp 0xcaad
leal -0xff90(%r14), %eax
cmpl $0x3, %eax
ja 0xc9a6
leaq 0x35d63(%rip), %rcx     # 0x426f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x37638(%rip), %rbx     # 0x43fd9
jmp 0xcaad
cmpl $0xffd9, %r14d          # imm = 0xFFD9
jne 0xc9bb
leaq 0x37635(%rip), %rbx     # 0x43feb
jmp 0xcaad
leaq 0x50b5e(%rip), %rbx     # 0x5d520
leaq 0x376bb(%rip), %rdx     # 0x44084
movl $0xc, %esi
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3130
cmpl $0xd, %eax
jl 0xcaad
leaq 0x352a8(%rip), %rdi     # 0x41c93
movl %r14d, %esi
xorl %eax, %eax
callq 0x3120
movq 0x4b5cc(%rip), %rax     # 0x57fc8
movq (%rax), %rdi
callq 0x17ef7
leaq 0x352a4(%rip), %rbx     # 0x41caf
jmp 0xcaad
leaq 0x3762e(%rip), %rbx     # 0x44045
jmp 0xcaad
leaq 0x375fe(%rip), %rbx     # 0x44021
jmp 0xcaad
leaq 0x37628(%rip), %rbx     # 0x44057
jmp 0xcaad
leaq 0x375c5(%rip), %rbx     # 0x43ffd
jmp 0xcaad
leaq 0x375e9(%rip), %rbx     # 0x4402a
jmp 0xcaad
leaq 0x375e9(%rip), %rbx     # 0x44033
jmp 0xcaad
leaq 0x37628(%rip), %rbx     # 0x4407b
jmp 0xcaad
leaq 0x375b3(%rip), %rbx     # 0x4400f
jmp 0xcaad
leaq 0x3758f(%rip), %rbx     # 0x43ff4
jmp 0xcaad
leaq 0x375ce(%rip), %rbx     # 0x4403c
jmp 0xcaad
leaq 0x3758f(%rip), %rbx     # 0x44006
jmp 0xcaad
leaq 0x375f2(%rip), %rbx     # 0x44072
jmp 0xcaad
leaq 0x3758f(%rip), %rbx     # 0x44018
jmp 0xcaad
leaq 0x375bc(%rip), %rbx     # 0x4404e
jmp 0xcaad
leaq 0x375ce(%rip), %rbx     # 0x44069
jmp 0xcaad
leaq 0x3753e(%rip), %rbx     # 0x43fe2
jmp 0xcaad
leaq 0x375b3(%rip), %rbx     # 0x44060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x32b0