// File: /workspace/github_c_makefile_star2_O1/hfiguiere[P]exifprobe/jp2000.c
// Function: process_jp2_de
unsigned long
process_jp2_de(FILE *inptr,struct jp2box *box,int indent)
{
    unsigned long boxoffset,max_offset,dataoffset,tbox;
    unsigned long boxlength;
    unsigned short vers;
    unsigned long flag;
    int chpr = 0;

    if((LIST_MODE))
        chpr = list_jp2box(inptr,box,"JP2.uinf.",indent,1);
    else
        print_jp2box(inptr,box,indent);
    boxoffset = box->boxoffset;
    boxlength = box->boxlength;
    tbox = box->tbox;

    dataoffset = boxoffset + box->dataoffset;
    max_offset = boxoffset + boxlength;

    vers = read_ubyte(inptr,dataoffset);
    print_tag_address(ENTRY,dataoffset,indent + 8,"=");
    if((PRINT_TAGINFO))
    {
        if((PRINT_LONGNAMES))
            chpr += printf("JP2.jp2h.uinf.de.");
        chpr += printf("Version");
    }
    if((PRINT_VALUE))
            chpr += printf(" = %u",vers);
    chpr = newline(chpr);
    dataoffset ++;
    flag = read_ulong(inptr,TIFF_MOTOROLA,dataoffset);
    flag = (flag >> 8) & 0xfff;
    print_tag_address(ENTRY,dataoffset,indent + 8,"=");
    if((PRINT_TAGINFO))
    {
        if((PRINT_LONGNAMES))
            chpr += printf("JP2.jp2h.uinf.de.");
        chpr += printf("flags");
    }
    if((PRINT_VALUE))
        chpr += printf(" = %lu",flag);
    chpr = newline(chpr);
    dataoffset += 3;
    print_tag_address(ENTRY,dataoffset,indent + 8,"=");
    if((PRINT_TAGINFO))
    {
        if((PRINT_LONGNAMES))
            chpr += printf("JP2.jp2h.uinf.de.");
        chpr += printf("Location");
    }
    if((PRINT_VALUE))
    {
        chpr += printf(" (length %lu) = ",max_offset - dataoffset);
        /* This should be UTF-8  ###%%%                           */
        setcharsprinted(chpr);
        print_ascii(inptr,max_offset - dataoffset,dataoffset);
    }
    if((PRINT_SECTION))
    {
        chpr = newline(chpr);
        print_tag_address(SECTION,dataoffset - 1,indent,"@");
        print_jp2type(tbox,1);
    }
    chpr = newline(chpr);
    return(max_offset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %rbp
leaq 0x35411(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x22d8d
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x2041a
xorl %r15d, %r15d
jmp 0x22dab
leaq 0x25fe5(%rip), %rdx     # 0x48d79
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x204e6
movl %eax, %r15d
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %r14
movq 0x10(%rbx), %r13
addq %r14, %r13
addq 0x20(%rbx), %r14
movq %rbp, (%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4d44
movl %eax, %ebx
leal 0x8(%r12), %ebp
leaq 0x21ba1(%rip), %rcx     # 0x44981
movl $0x4003333, %edi        # imm = 0x4003333
movq %r13, %rsi
movl %ebp, %edx
callq 0x5605
leaq 0x3538a(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x22e26
testb $0x40, %al
je 0x22e15
leaq 0x25f9d(%rip), %rdi     # 0x48da8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x204de(%rip), %rdi     # 0x432fa
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x35353(%rip), %rax     # 0x58180
testb $0x30, (%rax)
movq %r12, 0x8(%rsp)
je 0x22e4b
movzwl %bx, %esi
leaq 0x22119(%rip), %rdi     # 0x44f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x16b56
movl %eax, %r15d
leaq 0x1(%r13), %r12
movq (%rsp), %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %r12, %rdx
callq 0x46cc
movq %rax, %rbx
leaq 0x21b0c(%rip), %rcx     # 0x44981
movl $0x4003333, %edi        # imm = 0x4003333
movq %r12, %rsi
movl %ebp, %edx
callq 0x5605
leaq 0x352f5(%rip), %r12     # 0x58180
movq (%r12), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x22ebc
testb $0x40, %al
je 0x22eab
leaq 0x25f07(%rip), %rdi     # 0x48da8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x24f68(%rip), %rdi     # 0x47e1a
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
testb $0x30, (%r12)
je 0x22ee0
shrl $0x8, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
leaq 0x1e1f8(%rip), %rdi     # 0x410cb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x16b56
movl %eax, %r15d
leaq 0x4(%r13), %rbx
leaq 0x21a8b(%rip), %rcx     # 0x44981
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
movl %ebp, %edx
callq 0x5605
movq (%r12), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x22f3c
testb $0x40, %al
movq (%rsp), %rbp
je 0x22f29
leaq 0x25e89(%rip), %rdi     # 0x48da8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x20281(%rip), %rdi     # 0x431b1
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
jmp 0x22f40
movq (%rsp), %rbp
testb $0x30, (%r12)
je 0x22f7e
movq %r14, %r12
subq %rbx, %r12
leaq 0x25e66(%rip), %rdi     # 0x48dba
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x17530
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x3520a(%rip), %r12     # 0x58180
movq %rbx, %rdx
callq 0x7793
movq 0x8(%rsp), %rbx
testb $0x4, 0x2(%r12)
je 0x22fbf
movl %r15d, %edi
callq 0x16b56
movl %eax, %r15d
addq $0x3, %r13
leaq 0x1e13b(%rip), %rcx     # 0x410dc
movl $0x40000, %edi          # imm = 0x40000
movq %r13, %rsi
movl %ebx, %edx
callq 0x5605
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2033b
movl %r15d, %edi
callq 0x16b56
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq