// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x54(%rbp)
leaq 0x44c9f(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1040000, %rax        # imm = 0x1040000
cmpq $0x0, %rax
jne 0x32512
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %ecx
leaq 0x39053(%rip), %rdx     # 0x6b555
movl $0x1, %r8d
callq 0x2eab0
movl %eax, -0x54(%rbp)
jmp 0x32522
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x2e980
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x4f20
movw %ax, -0x42(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x8, %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0x34aca(%rip), %rcx     # 0x67053
callq 0x5ed0
leaq 0x44beb(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x325e0
leaq 0x44bd5(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x325cc
leaq 0x38fc5(%rip), %rdi     # 0x6b584
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x3352f(%rip), %rdi     # 0x65b02
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x44b99(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x3260c
movzwl -0x42(%rbp), %esi
leaq 0x3502d(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
callq 0x1ef50
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x4d4d, %esi           # imm = 0x4D4D
callq 0x4610
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
andq $0xfff, %rax            # imm = 0xFFF
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x8, %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0x349f2(%rip), %rcx     # 0x67053
callq 0x5ed0
leaq 0x44b13(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x326b8
leaq 0x44afd(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x326a4
leaq 0x38eed(%rip), %rdi     # 0x6b584
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x38eeb(%rip), %rdi     # 0x6b596
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x44ac1(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x326e4
movq -0x50(%rbp), %rsi
leaq 0x319f4(%rip), %rdi     # 0x640cb
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
callq 0x1ef50
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x8, %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0x34942(%rip), %rcx     # 0x67053
callq 0x5ed0
leaq 0x44a63(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x32768
leaq 0x44a4d(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x32754
leaq 0x38e3d(%rip), %rdi     # 0x6b584
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x3325e(%rip), %rdi     # 0x659b9
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
leaq 0x44a11(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x327b5
movq -0x28(%rbp), %rsi
subq -0x30(%rbp), %rsi
leaq 0x38e11(%rip), %rdi     # 0x6b59c
movb $0x0, %al
callq 0x3110
addl -0x54(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %edi
callq 0x1ff00
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
subq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x8e70
leaq 0x449c4(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x32800
movl -0x54(%rbp), %edi
callq 0x1ef50
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rsi
subq $0x1, %rsi
movl -0x14(%rbp), %edx
movl $0x40000, %edi          # imm = 0x40000
leaq 0x318ef(%rip), %rcx     # 0x640dc
callq 0x5ed0
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0x2e830
movl -0x54(%rbp), %edi
callq 0x1ef50
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)