// File: /workspace/github_c_makefile_star2_O3/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 0x34dae(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
testl $0x104, %eax            # imm = 0x104
je 0x233f0
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x209e0
xorl %r15d, %r15d
jmp 0x2340e
leaq 0x259c2(%rip), %rdx     # 0x48db9
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x20aa9
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 0x4d48
movl %eax, %ebx
leal 0x8(%r12), %ebp
leaq 0x21582(%rip), %rcx     # 0x449c5
movl $0x4003333, %edi        # imm = 0x4003333
movq %r13, %rsi
movl %ebp, %edx
callq 0x55eb
leaq 0x34d27(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x23493
testb $0x40, %al
je 0x23478
leaq 0x2597a(%rip), %rdi     # 0x48de8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x1fe7b(%rip), %rdi     # 0x432fa
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x34cf0(%rip), %rax     # 0x58180
movq (%rax), %rax
testb $0x30, %al
movq %r12, 0x8(%rsp)
je 0x234b0
movzwl %bx, %esi
leaq 0x21af8(%rip), %rdi     # 0x44f9e
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x1707a
movl %eax, %r15d
leaq 0x1(%r13), %r12
movq (%rsp), %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %r12, %rdx
callq 0x4707
movq %rax, %rbx
leaq 0x214eb(%rip), %rcx     # 0x449c5
movl $0x4003333, %edi        # imm = 0x4003333
movq %r12, %rsi
movl %ebp, %edx
callq 0x55eb
leaq 0x34c90(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x2352a
testb $0x40, %al
je 0x2350f
leaq 0x258e3(%rip), %rdi     # 0x48de8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x24944(%rip), %rdi     # 0x47e5a
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x34c59(%rip), %rax     # 0x58180
movq (%rax), %rax
testb $0x30, %al
je 0x2354b
shrl $0x8, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
leaq 0x1db8d(%rip), %rdi     # 0x410cb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x1707a
movl %eax, %r15d
leaq 0x4(%r13), %rbx
leaq 0x21464(%rip), %rcx     # 0x449c5
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
movl %ebp, %edx
callq 0x55eb
leaq 0x34c09(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x3003, %eax           # imm = 0x3003
je 0x235b7
testb $0x40, %al
movq (%rsp), %rbp
je 0x2359a
leaq 0x25858(%rip), %rdi     # 0x48de8
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x1fc10(%rip), %rdi     # 0x431b1
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x34bce(%rip), %rax     # 0x58180
movq (%rax), %rax
jmp 0x235bb
movq (%rsp), %rbp
testb $0x30, %al
je 0x235f9
movq %r14, %r12
subq %rbx, %r12
leaq 0x2582e(%rip), %rdi     # 0x48dfa
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x17a82
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x77d6
leaq 0x34b8a(%rip), %rax     # 0x58180
movq (%rax), %rax
movq 0x8(%rsp), %rbx
btl $0x12, %eax
jae 0x23638
movl %r15d, %edi
callq 0x1707a
movl %eax, %r15d
addq $0x3, %r13
leaq 0x1dac2(%rip), %rcx     # 0x410dc
movl $0x40000, %edi          # imm = 0x40000
movq %r13, %rsi
movl %ebx, %edx
callq 0x55eb
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x208ff
movl %r15d, %edi
callq 0x1707a
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq