// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/jp2000.c
// Function: process_jp2_xml
unsigned long
process_jp2_xml(FILE *inptr,struct jp2box *box,int indent)
{
    unsigned long boxoffset,max_offset,dataoffset;
    unsigned long readsize;
    unsigned long boxlength,size;
    int chpr = 0;

    print_jp2box(inptr,box,indent);
    boxoffset = box->boxoffset;
    boxlength = box->boxlength;

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

    if((PRINT_SECTION))
    {
        print_tag_address(VALUE,dataoffset,indent + 10,"=");
        if((PRINT_VALUE))
        {
            if((inptr && (fseek(inptr,dataoffset,SEEK_SET)) != -1))
            {
                while(size > 0ULL)
                {
                    if(size > READSIZE)
                        readsize = READSIZE;
                    else
                        readsize = size;
                    /* Print as ascii                                     */
                    setcharsprinted(chpr);
                    print_ascii(inptr,readsize,dataoffset);
                    dataoffset += readsize;
                    size -= readsize;
                }
            }
        }
        chpr = newline(chpr);
        print_tag_address(SECTION,dataoffset - 1,indent,"=");
        print_jp2type(box->tbox,1);
    }
    else if((LIST_MODE))
        chpr = list_jp2box(inptr,box,"JP2.",indent,1);
    chpr = newline(chpr);
    return(max_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x4c(%rbp)
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 -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x10(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x20(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
subq $0x8, %rax
movq %rax, -0x48(%rbp)
leaq 0x47d17(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x2f560
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0xa, %edx
movl $0x30, %edi
leaq 0x37bc1(%rip), %rcx     # 0x67053
callq 0x5ed0
leaq 0x47ce2(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x2f525
cmpq $0x0, -0x8(%rbp)
je 0x2f523
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x3200
cmpl $-0x1, %eax
je 0x2f523
jmp 0x2f4c8
cmpq $0x0, -0x48(%rbp)
jbe 0x2f521
cmpq $0x2000, -0x48(%rbp)    # imm = 0x2000
jbe 0x2f4e3
movq $0x2000, -0x38(%rbp)    # imm = 0x2000
jmp 0x2f4eb
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x4c(%rbp), %edi
callq 0x1ff00
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x8e70
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x2f4c8
jmp 0x2f523
jmp 0x2f525
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rsi
subq $0x1, %rsi
movl -0x14(%rbp), %edx
movl $0x40000, %edi          # imm = 0x40000
leaq 0x37b0c(%rip), %rcx     # 0x67053
callq 0x5ed0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x2e830
jmp 0x2f598
leaq 0x47c19(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1040000, %rax        # imm = 0x1040000
cmpq $0x0, %rax
jne 0x2f596
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %ecx
leaq 0x3bed3(%rip), %rdx     # 0x6b45b
movl $0x1, %r8d
callq 0x2eab0
movl %eax, -0x4c(%rbp)
jmp 0x2f598
movl -0x4c(%rbp), %edi
callq 0x1ef50
movl %eax, -0x4c(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)