// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/jp2000.c
// Function: process_jp2_ulst
unsigned long
process_jp2_ulst(FILE *inptr,struct jp2box *box,int indent)
{
    unsigned long boxoffset,max_offset,dataoffset,tbox;
    unsigned long boxlength;
    unsigned short nuuid,byte;
    int chpr = 0;
    int i,j;

    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;

    nuuid = read_ushort(inptr,TIFF_MOTOROLA,dataoffset);
    print_tag_address(ENTRY,dataoffset,indent + 8,"=");
    if((PRINT_TAGINFO))
    {
        if((PRINT_LONGNAMES))
            chpr += printf("JP2.uinf.ulst.");
        chpr += printf("NumberOfUuids");
    }
    if((PRINT_VALUE))
        chpr += printf(" = %u",nuuid);
    chpr = newline(chpr);
    dataoffset += 2;

    /* Print the uuid list, in hex                                */
    for(i = 0; i < nuuid; ++i)
    {
        print_tag_address(SECTION|ENTRY,dataoffset,indent + 4,"*");
        if((PRINT_TAGINFO))
        {
            if((PRINT_LONGNAMES))
                chpr += printf("JP2.uinf.ulst.");
            chpr += printf("ID%d = ",i);
        }
        if((PRINT_VALUE))
            chpr += printf(" = ");
        if(!feof(inptr) && !ferror(inptr))
        {
            for(j = 0; j < 16; ++i)
            {
                byte = read_ubyte(inptr,dataoffset++);
                if(feof(inptr) || ferror(inptr))
                    break;
                if((PRINT_VALUE))
                    chpr += printf(",%02x",(unsigned int)byte & 0xff);
            }
        }
        else
            break;
        chpr = newline(chpr);
    }
    if((PRINT_SECTION))
    {
        chpr = newline(chpr);
        print_tag_address(SECTION,dataoffset - 1,indent,"@");
        print_jp2type(box->tbox,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, -0x48(%rbp)
leaq 0x44fef(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x1040000, %rax        # imm = 0x1040000
cmpq $0x0, %rax
jne 0x321c2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %ecx
leaq 0x393a3(%rip), %rdx     # 0x6b555
movl $0x1, %r8d
callq 0x2eab0
movl %eax, -0x48(%rbp)
jmp 0x321d2
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), %rdx
movl $0x4d4d, %esi           # imm = 0x4D4D
callq 0x4480
movw %ax, -0x42(%rbp)
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x8, %edx
movl $0x4003333, %edi        # imm = 0x4003333
leaq 0x34e15(%rip), %rcx     # 0x67053
callq 0x5ed0
leaq 0x44f36(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x32295
leaq 0x44f20(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x32281
leaq 0x392eb(%rip), %rdi     # 0x6b55f
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq 0x392e6(%rip), %rdi     # 0x6b56e
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq 0x44ee4(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x322c1
movzwl -0x42(%rbp), %esi
leaq 0x35378(%rip), %rdi     # 0x6762c
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %edi
callq 0x1ef50
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movzwl -0x42(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3244d
movq -0x30(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x4, %edx
movl $0x4043333, %edi        # imm = 0x4043333
leaq 0x32620(%rip), %rcx     # 0x64924
callq 0x5ed0
leaq 0x44e70(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x3003, %rax           # imm = 0x3003
cmpq $0x0, %rax
je 0x3235e
leaq 0x44e5a(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x32347
leaq 0x39225(%rip), %rdi     # 0x6b55f
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x4c(%rbp), %esi
leaq 0x3922b(%rip), %rdi     # 0x6b57c
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq 0x44e1b(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x32386
leaq 0x3a99f(%rip), %rdi     # 0x6cd18
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x32432
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
jne 0x32432
movl $0x0, -0x50(%rbp)
cmpl $0x10, -0x50(%rbp)
jge 0x32430
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
callq 0x4f20
movw %ax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3190
cmpl $0x0, %eax
jne 0x323ef
movq -0x8(%rbp), %rdi
callq 0x30a0
cmpl $0x0, %eax
je 0x323f1
jmp 0x32430
leaq 0x44d88(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x30, %rax
cmpq $0x0, %rax
je 0x32423
movzwl -0x44(%rbp), %esi
andl $0xff, %esi
leaq 0x322ef(%rip), %rdi     # 0x64705
movb $0x0, %al
callq 0x3110
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x32425
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x323b1
jmp 0x32434
jmp 0x3244d
movl -0x48(%rbp), %edi
callq 0x1ef50
movl %eax, -0x48(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x322df
leaq 0x44d2c(%rip), %rax     # 0x77180
movq (%rax), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x3249c
movl -0x48(%rbp), %edi
callq 0x1ef50
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rsi
subq $0x1, %rsi
movl -0x14(%rbp), %edx
movl $0x40000, %edi          # imm = 0x40000
leaq 0x31c57(%rip), %rcx     # 0x640dc
callq 0x5ed0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x2e830
movl -0x48(%rbp), %edi
callq 0x1ef50
movl %eax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)