// File: /workspace/github_c_makefile_star2_O2/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 0x351d0(%rip), %rax     # 0x57180
movzwl 0x2(%rax), %eax
testw $0x104, %ax             # imm = 0x104
je 0x21fcd
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x1f71d
xorl %r15d, %r15d
jmp 0x21fe9
leaq 0x24d95(%rip), %rdx     # 0x46d69
pushq $0x1
popq %r8
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %ecx
callq 0x1f7e6
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 0x48de
movl %eax, %ebx
leal 0x8(%r12), %ebp
leaq 0x20963(%rip), %rcx     # 0x42981
movl $0x4003333, %edi        # imm = 0x4003333
movq %r13, %rsi
movl %ebp, %edx
callq 0x5100
leaq 0x3514c(%rip), %rax     # 0x57180
movq (%rax), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x2206d
testb $0x40, %al
je 0x22052
leaq 0x24d50(%rip), %rdi     # 0x46d98
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x1f2a1(%rip), %rdi     # 0x412fa
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x35116(%rip), %rax     # 0x57180
movq (%rax), %rax
testb $0x30, %al
movq %r12, 0x8(%rsp)
je 0x2208a
movzwl %bx, %esi
leaq 0x20eda(%rip), %rdi     # 0x42f5a
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x160f7
movl %eax, %r15d
leaq 0x1(%r13), %r12
movq (%rsp), %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %r12, %rdx
callq 0x42ba
movq %rax, %rbx
leaq 0x208cd(%rip), %rcx     # 0x42981
movl $0x4003333, %edi        # imm = 0x4003333
movq %r12, %rsi
movl %ebp, %edx
callq 0x5100
leaq 0x350b6(%rip), %rax     # 0x57180
movq (%rax), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x22103
testb $0x40, %al
je 0x220e8
leaq 0x24cba(%rip), %rdi     # 0x46d98
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x23d1b(%rip), %rdi     # 0x45e0a
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x35080(%rip), %rax     # 0x57180
movq (%rax), %rax
testb $0x30, %al
je 0x22124
shrl $0x8, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
leaq 0x1cfb4(%rip), %rdi     # 0x3f0cb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x160f7
movl %eax, %r15d
leaq 0x4(%r13), %rbx
leaq 0x20847(%rip), %rcx     # 0x42981
movl $0x4003333, %edi        # imm = 0x4003333
movq %rbx, %rsi
movl %ebp, %edx
callq 0x5100
leaq 0x35030(%rip), %rax     # 0x57180
movq (%rax), %rax
testw $0x3003, %ax            # imm = 0x3003
je 0x2218f
testb $0x40, %al
movq (%rsp), %rbp
je 0x22172
leaq 0x24c30(%rip), %rdi     # 0x46d98
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x1f038(%rip), %rdi     # 0x411b1
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
leaq 0x34ff6(%rip), %rax     # 0x57180
movq (%rax), %rax
jmp 0x22193
movq (%rsp), %rbp
testb $0x30, %al
je 0x221d1
movq %r14, %r12
subq %rbx, %r12
leaq 0x24c06(%rip), %rdi     # 0x46daa
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r15d
movl %r15d, %edi
callq 0x16a4f
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x71a9
leaq 0x34fb2(%rip), %rax     # 0x57180
movq (%rax), %rax
movq 0x8(%rsp), %rbx
btl $0x12, %eax
jae 0x2220e
movl %r15d, %edi
callq 0x160f7
movl %eax, %r15d
addq $0x3, %r13
leaq 0x1ceea(%rip), %rcx     # 0x3f0dc
movl $0x40000, %edi          # imm = 0x40000
movq %r13, %rsi
movl %ebx, %edx
callq 0x5100
pushq $0x1
popq %rsi
movq 0x10(%rsp), %rdi
callq 0x1f649
movl %r15d, %edi
callq 0x160f7
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq