// File: /workspace/github_c_makefile_star2_O1/hfiguiere[P]exifprobe/jp2000.c
// Function: process_jpeg2000_codestream
unsigned long
process_jpeg2000_codestream(FILE *inptr,unsigned long marker_offset,
                                    unsigned long data_length,
                                    struct image_summary *summary_entry,
                                    int indent)
{
    unsigned long max_offset = 0L;
    unsigned long start_of_jp2c_data = marker_offset;
    unsigned long start_of_tile = 0;
    unsigned long tile_length = 0;
    unsigned short seg_length,tmp;
    unsigned short tilenum = 0;
    unsigned short part_index = 0;
    unsigned short nparts = 0;
    unsigned short regvalue = 0;
    unsigned short tag = 0;
    int chpr = 0;
    int tagindent,dataindent;
    char *name;

    if(inptr)
    {
        PUSHCOLOR(JPEG_COLOR);
        tag = read_ushort(inptr,TIFF_MOTOROLA,marker_offset);
        tagindent = indent;
        while(tag != 0)
        {
            switch(tag)
            {
                case JP2C_SOC:  /* Start of code stream               */
                    start_of_jp2c_data = marker_offset;
                    if((summary_entry == NULL) || summary_entry->entry_lock)
                        summary_entry = new_summary_entry(summary_entry,0,IMGFMT_JPEG2000);
                    if(summary_entry)
                    {
                        if(summary_entry->length <= 0)
                            summary_entry->length = data_length;
                        if(summary_entry->offset <= 0)
                            summary_entry->offset = start_of_jp2c_data;
                        summary_entry->imageformat = IMGFMT_JPEG2000;
                        summary_entry->entry_lock = lock_number(summary_entry);
                    }
                    name = jp2000tagname(tag);
                    print_tag_address(SECTION|ENTRY,marker_offset,tagindent,"@");
                    dataindent = charsprinted();
                    if((LIST_MODE))
                    {
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("JP2.jp2c.");
                            chpr += printf("%s",name);
                        }
                        if((PRINT_VALUE))
                            chpr += printf(" = @%lu",marker_offset);
                        chpr = newline(chpr);
                    }
                    else
                        chpr += printf("<%#x=%s> Start of codestream",tag,name);
                    chpr = newline(chpr);
                    marker_offset += 2;
                    break;
                case JP2C_SOT:  /* Start of tile-part                 */
                    name = jp2000tagname(tag);
                    start_of_tile = marker_offset;
                    seg_length = read_ushort(inptr,TIFF_MOTOROLA,marker_offset + 2);
                    print_tag_address(SEGMENT,marker_offset,tagindent,"@");
                    if((PRINT_SEGMENT) && (PRINT_SECTION))
                    {
                        if((LIST_MODE))
                        {
                            if((PRINT_TAGINFO))
                            {
                                if((PRINT_LONGNAMES))
                                    chpr += printf("JP2.jp2c.");
                                chpr += printf("%s",name);
                            }
                            if((PRINT_VALUE))
                                chpr += printf(" = @%lu:%u",marker_offset,seg_length);
                            chpr = newline(chpr);
                        }
                        else
                            chpr += printf("<%#x=%s> length %u",tag,name,seg_length);
                    }

                    tilenum = read_ushort(inptr,TIFF_MOTOROLA,marker_offset + 4);
                    if((PRINT_SEGMENT) && (PRINT_ENTRY) && !(LIST_MODE))
                        chpr += printf(" tile number %u",tilenum);
                    tile_length = read_ulong(inptr,TIFF_MOTOROLA,marker_offset + 6);
                    if((PRINT_SEGMENT) && (PRINT_ENTRY) && !(LIST_MODE))
                        chpr += printf(" tile_length = %lu",tile_length);
                    part_index = read_ubyte(inptr,HERE);
                    if((PRINT_SEGMENT) && (PRINT_ENTRY) && !(LIST_MODE))
                        chpr += printf(" tile index = %u",part_index);
                    nparts = read_ubyte(inptr,HERE);
                    if((PRINT_SEGMENT) && (PRINT_ENTRY) && !(LIST_MODE))
                        chpr += printf(" [of %u tile parts]",nparts);
                    chpr = newline(chpr);

                    if(ferror(inptr))
                    {
                        tag = 0;
                        continue;
                    }
                    marker_offset += seg_length + 2;
                    break;
                case JP2C_EPH:  /* End of packet header               */
                case JP2C_SOD:  /* Start of data                      */
                    name = jp2000tagname(tag);
                    if((PRINT_SEGMENT) && (PRINT_SECTION))
                    {
                        print_tag_address(SEGMENT,marker_offset,tagindent,"@");
                        if((LIST_MODE))
                        {
                            if((PRINT_TAGINFO))
                            {
                                if((PRINT_LONGNAMES))
                                    chpr += printf("JP2.jp2c.");
                                chpr += printf("%s",name);
                            }
                            if((PRINT_VALUE))
                                chpr += printf(" = @%lu",marker_offset);
                            chpr = newline(chpr);
                        }
                        else
                            chpr += printf("<%#x=%s>",tag,name);
                        chpr = newline(chpr);
                    }
                    marker_offset = start_of_tile + tile_length;
                    break;
                case JP2C_COM:
                    name = jp2000tagname(tag);
                    print_tag_address(SECTION|ENTRY,marker_offset,tagindent,"@");
                    if((LIST_MODE))
                    {
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("JP2.jpc.");
                            chpr += printf("Comment");
                        }
                    }
                    else
                        chpr += printf("<%#x=%s>",tag,name);
                    seg_length = read_ushort(inptr,TIFF_MOTOROLA,marker_offset + 2);
                    tmp = read_ushort(inptr,TIFF_MOTOROLA,marker_offset + 4);

                    if(ferror(inptr) == 0)
                    {
                        if(!(LIST_MODE))
                            chpr += printf(" length %u, reg %u",seg_length,
                                                                    regvalue);
                        if((PRINT_VALUE))
                        {
                            chpr += printf(" = ");
                            setcharsprinted(chpr);
                            (void)print_ascii(inptr,seg_length - 6,marker_offset + 6);
                        }
                        chpr = newline(chpr);
                        marker_offset += seg_length + 2;
                    }
                    else
                    {
                        tag = 0;
                        clearerr(inptr);
                    }
                    break;
                case JP2C_SIZ:
                    marker_offset = process_jpc_siz(inptr,marker_offset,tag,
                                                    summary_entry,tagindent);
                    break;
                case JP2C_COD:
                    marker_offset = process_jpc_cod(inptr,marker_offset,tag,
                                                    summary_entry,tagindent);
                    break;
                case JP2C_QCD:
                    marker_offset = process_jpc_qcd(inptr,marker_offset,tag,
                                                    summary_entry,tagindent);
                    break;
                case JP2C_EOC:
                    name = jp2000tagname(tag);
                    print_tag_address(SECTION|ENTRY,marker_offset,tagindent,"@");
                    if((LIST_MODE))
                    {
                        if((PRINT_TAGINFO))
                        {
                            if((PRINT_LONGNAMES))
                                chpr += printf("JP2.jp2c.");
                            chpr += printf("%s",name);
                        }
                        if((PRINT_VALUE))
                            chpr += printf(" = @%lu",marker_offset);
                        chpr = newline(chpr);
                    }
                    else
                        chpr += printf("<%#x=%s> End of codestream",tag,name);
                    chpr = newline(chpr);
                    tag = 0;
                    continue;
                    break;
                /* All of these fall through to the default           */
                case JP2C_CRG:
                case JP2C_SOP:
                case JP2C_POC:
                case JP2C_QCC:
                case JP2C_TLM:  /* Tile-part lengths, main header     */
                case JP2C_PLM:  /* Packet length, main header         */
                case JP2C_PLT:  /* Packet length, tile-part header    */
                case JP2C_PPM:  /* Packed packet headers; main header */
                case JP2C_PPT:  /* Packed packet headers; part header */
                default:
                    name = jp2000tagname(tag);
                    print_tag_address(SEGMENT,marker_offset,tagindent,"@");
                    /* These are exclude from LIST mode unless        */
                    /* SEGMENTS are explicitly enabled                */
                    if((PRINT_SEGMENT))
                    {
                        if((LIST_MODE))
                        {
                            if((PRINT_TAGINFO))
                            {
                                if((PRINT_LONGNAMES))
                                    chpr += printf("JP2.jp2c.");
                                chpr += printf("%s",name);
                            }
                            if((PRINT_VALUE))
                                chpr += printf(" = @%lu",marker_offset);
                        }
                        else
                            chpr += printf("<%#x=%s>",tag,name);
                    }
                    if((tag & 0xff00) != 0xff00)
                    {
                        tag = 0;
                        continue;
                    }
                    seg_length = read_ushort(inptr,TIFF_MOTOROLA,marker_offset + 2);
                    if(ferror(inptr) == 0)
                    {
                        if((PRINT_SEGMENT))
                        {
                            if((LIST_MODE))
                                chpr += printf(":%u",seg_length);
                            else
                                chpr += printf(" length %u",seg_length);
                            chpr = newline(chpr);
                        }
                        marker_offset += seg_length + 2;
                    }
                    else
                    {
                        tag = 0;
                        clearerr(inptr);
                    }
                    break;
            }
            tag = read_ushort(inptr,TIFF_MOTOROLA,marker_offset);
            if(ferror(inptr) == 0)
            {
                max_offset = ftell(inptr);
            }
            else
            {
                tag = 0;
                clearerr(inptr);
            }
        }
        POPCOLOR();
        if((summary_entry) && (summary_entry->length <= 0))
                summary_entry->length = max_offset - start_of_jp2c_data;
    }
    setcharsprinted(chpr);
    return(max_offset);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
testq %rdi, %rdi
je 0x238d2
movl %r8d, %ebp
movq %rsi, %rbx
movq %rdi, %r13
movq %rdx, 0x50(%rsp)
movq %rcx, 0x18(%rsp)
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %rbx, %rdx
callq 0x4574
movl %eax, %r15d
movq $0x0, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
xorl %r12d, %r12d
movq %rbx, 0x38(%rsp)
movq %r13, 0x8(%rsp)
movq %rbx, %r14
addq $0x2, %rbx
leaq 0x4(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x6(%r14), %rax
movq %rax, 0x40(%rsp)
movzwl %r15w, %r13d
cmpl $0xffd8, %r13d          # imm = 0xFFD8
jle 0x230c0
cmpl $0xffd9, %r13d          # imm = 0xFFD9
jne 0x23369
movl %r13d, %edi
callq 0xc7cf
movq %rax, %r15
movl $0x4043333, %edi        # imm = 0x4043333
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1e052(%rip), %rcx     # 0x410dc
callq 0x5605
leaq 0x350ea(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x1040000, %eax        # imm = 0x1040000
je 0x232e9
leaq 0x25f0f(%rip), %rdi     # 0x48fba
movl %r13d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
addl %r12d, %eax
jmp 0x23341
cmpl $0xff63, %r13d          # imm = 0xFF63
jg 0x23102
cmpl $0xff50, %r13d          # imm = 0xFF50
jle 0x23353
cmpl $0xff51, %r13d          # imm = 0xFF51
je 0x235b0
cmpl $0xff52, %r13d          # imm = 0xFF52
je 0x23627
cmpl $0xff5c, %r13d          # imm = 0xFF5C
jne 0x23369
jmp 0x23644
leal -0xff92(%r13), %eax
cmpl $0x2, %eax
jb 0x23480
cmpl $0xff64, %r13d          # imm = 0xFF64
je 0x235d0
cmpl $0xff90, %r13d          # imm = 0xFF90
jne 0x23369
movl %r13d, %edi
callq 0xc7cf
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %rbx, %rdx
callq 0x4574
movl %eax, %r15d
movl $0x80000, %edi          # imm = 0x80000
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1df7d(%rip), %rcx     # 0x410dc
callq 0x5605
leaq 0x35015(%rip), %rax     # 0x58180
movl (%rax), %eax
notl %eax
testl $0xc0000, %eax          # imm = 0xC0000
movw %r15w, 0x16(%rsp)
jne 0x23199
movzwl %r15w, %ecx
leaq 0x25db3(%rip), %rdi     # 0x48f3a
movl %r13d, %esi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq 0x48(%rsp), %rdx
callq 0x4574
leaq 0x34fc9(%rip), %rcx     # 0x58180
movq (%rcx), %rcx
testl $0x1040000, %ecx        # imm = 0x1040000
je 0x231e8
movl %ecx, %edx
andl $0x80000, %edx          # imm = 0x80000
je 0x231e8
andl $0x4003333, %ecx        # imm = 0x4003333
je 0x231e8
movzwl %ax, %esi
leaq 0x25d6f(%rip), %rdi     # 0x48f4d
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq 0x40(%rsp), %rdx
callq 0x46cc
movq %rax, 0x20(%rsp)
leaq 0x34f7a(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x1040000, %eax        # imm = 0x1040000
je 0x23237
movl %eax, %ecx
andl $0x80000, %ecx          # imm = 0x80000
je 0x23237
andl $0x4003333, %eax        # imm = 0x4003333
je 0x23237
leaq 0x25d35(%rip), %rdi     # 0x48f5d
movq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x4d44
leaq 0x34f35(%rip), %rcx     # 0x58180
movq (%rcx), %rcx
testl $0x1040000, %ecx        # imm = 0x1040000
je 0x2327c
movl %ecx, %edx
andl $0x80000, %edx          # imm = 0x80000
je 0x2327c
andl $0x4003333, %ecx        # imm = 0x4003333
je 0x2327c
movzwl %ax, %esi
leaq 0x25cfe(%rip), %rdi     # 0x48f70
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x4d44
leaq 0x34ef0(%rip), %rcx     # 0x58180
movq (%rcx), %rcx
testl $0x1040000, %ecx        # imm = 0x1040000
je 0x232c1
movl %ecx, %edx
andl $0x80000, %edx          # imm = 0x80000
je 0x232c1
andl $0x4003333, %ecx        # imm = 0x4003333
je 0x232c1
movzwl %ax, %esi
leaq 0x25cca(%rip), %rdi     # 0x48f81
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl %r12d, %edi
callq 0x16b56
movl %eax, %r12d
movq %r13, %rdi
callq 0x30b0
xorl %r15d, %r15d
movq %r14, 0x30(%rsp)
testl %eax, %eax
jne 0x23054
jmp 0x23894
testl $0x3003, %eax           # imm = 0x3003
je 0x23319
testb $0x40, %al
je 0x23305
leaq 0x25c0d(%rip), %rdi     # 0x48f08
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x1dd8b(%rip), %rdi     # 0x41097
movq %r15, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x34e60(%rip), %rax     # 0x58180
testb $0x30, (%rax)
je 0x23339
leaq 0x254bd(%rip), %rdi     # 0x487e9
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl %r12d, %edi
callq 0x16b56
movl %eax, %edi
callq 0x16b56
movl %eax, %r12d
xorl %r15d, %r15d
jmp 0x23054
testl %r13d, %r13d
je 0x238a8
cmpl $0xff4f, %r13d          # imm = 0xFF4F
je 0x234e7
movl %r13d, %edi
callq 0xc7cf
movq %rax, %r15
movl $0x80000, %edi          # imm = 0x80000
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1dd57(%rip), %rcx     # 0x410dc
callq 0x5605
leaq 0x34def(%rip), %rax     # 0x58180
movq (%rax), %rax
btl $0x13, %eax
jae 0x23407
testl $0x1040000, %eax        # imm = 0x1040000
je 0x233b7
leaq 0x25bed(%rip), %rdi     # 0x48f95
movl %r13d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
jmp 0x23404
testl $0x3003, %eax           # imm = 0x3003
je 0x233e7
testb $0x40, %al
je 0x233d3
leaq 0x25b3f(%rip), %rdi     # 0x48f08
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x1dcbd(%rip), %rdi     # 0x41097
movq %r15, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x34d92(%rip), %rax     # 0x58180
testb $0x30, (%rax)
je 0x23407
leaq 0x253ef(%rip), %rdi     # 0x487e9
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
notl %r13d
xorl %r15d, %r15d
testl $0xff00, %r13d          # imm = 0xFF00
jne 0x23054
movq 0x8(%rsp), %r13
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %rbx, %rdx
callq 0x4574
movl %eax, %ebx
movq %r13, %rdi
callq 0x30b0
testl %eax, %eax
jne 0x23715
leaq 0x34d38(%rip), %rax     # 0x58180
movq (%rax), %rax
btl $0x13, %eax
movzwl %bx, %ebx
jae 0x23790
testl $0x1040000, %eax        # imm = 0x1040000
leaq 0x25ade(%rip), %rdi     # 0x48f42
leaq 0x25acb(%rip), %rax     # 0x48f36
cmoveq %rax, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
jmp 0x23785
movl %r13d, %edi
callq 0xc7cf
movq %rax, %rbx
leaq 0x34cee(%rip), %r15     # 0x58180
movl (%r15), %eax
notl %eax
testl $0xc0000, %eax          # imm = 0xC0000
jne 0x23667
movl $0x80000, %edi          # imm = 0x80000
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1dc29(%rip), %rcx     # 0x410dc
callq 0x5605
movq (%r15), %rax
testl $0x1040000, %eax        # imm = 0x1040000
je 0x2379c
leaq 0x25ac8(%rip), %rdi     # 0x48f95
movl %r13d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3120
addl %r12d, %eax
movq 0x8(%rsp), %r13
jmp 0x2383e
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x234f8
cmpl $0x0, 0x10(%r15)
je 0x2350a
movq %r15, %rdi
xorl %esi, %esi
movl $0xd0a870a, %edx        # imm = 0xD0A870A
callq 0xfb61
movq %rax, %r15
testq %r15, %r15
je 0x2354d
cmpq $0x0, 0x98(%r15)
jne 0x23525
movq 0x50(%rsp), %rax
movq %rax, 0x98(%r15)
cmpq $0x0, 0x90(%r15)
jne 0x23536
movq %r14, 0x90(%r15)
movq $0xd0a870a, 0x80(%r15) # imm = 0xD0A870A
movq %r15, %rdi
callq 0xfdbf
movl %eax, 0x10(%r15)
movq %r15, 0x18(%rsp)
movl %r13d, %edi
callq 0xc7cf
movq %rax, %r15
movl $0x4043333, %edi        # imm = 0x4043333
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1db6e(%rip), %rcx     # 0x410dc
callq 0x5605
xorl %eax, %eax
callq 0x17a98
leaq 0x34bff(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x1040000, %eax        # imm = 0x1040000
je 0x23671
leaq 0x2597c(%rip), %rdi     # 0x48f12
movl %r13d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
addl %r12d, %eax
movq 0x8(%rsp), %r13
jmp 0x23800
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rdi, %r13
movq 0x18(%rsp), %rcx
movl %ebp, %r8d
callq 0x238f8
jmp 0x2365f
movl %r13d, %edi
callq 0xc7cf
movq %rax, %r15
movl $0x4043333, %edi        # imm = 0x4043333
movq %r14, %rsi
movl %ebp, %edx
leaq 0x1daf0(%rip), %rcx     # 0x410dc
callq 0x5605
leaq 0x34b88(%rip), %rax     # 0x58180
movq (%rax), %rax
testl $0x1040000, %eax        # imm = 0x1040000
je 0x236af
leaq 0x25988(%rip), %rdi     # 0x48f95
movl %r13d, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movq 0x8(%rsp), %r13
jmp 0x236e5
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rdi, %r13
movq 0x18(%rsp), %rcx
movl %ebp, %r8d
callq 0x241dd
jmp 0x2365f
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rdi, %r13
movq 0x18(%rsp), %rcx
movl %ebp, %r8d
callq 0x24c38
movq %rax, %rbx
jmp 0x23856
movq 0x8(%rsp), %r13
jmp 0x23848
testl $0x3003, %eax           # imm = 0x3003
je 0x237d3
testb $0x40, %al
movq 0x8(%rsp), %r13
je 0x23696
leaq 0x2587c(%rip), %rdi     # 0x48f08
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x1d9fa(%rip), %rdi     # 0x41097
movq %r15, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
jmp 0x237d8
testl $0x3003, %eax           # imm = 0x3003
je 0x2361d
testb $0x40, %al
movq 0x8(%rsp), %r13
je 0x236d4
leaq 0x258d4(%rip), %rdi     # 0x48f9e
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x26f4b(%rip), %rdi     # 0x4a626
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %rbx, %rdx
callq 0x4574
movl %eax, %ebx
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq 0x48(%rsp), %rdx
callq 0x4574
movq %r13, %rdi
callq 0x30b0
testl %eax, %eax
je 0x23725
movq %r13, %rdi
callq 0x31b0
movq %r14, %rbx
jmp 0x23856
leaq 0x34a54(%rip), %rax     # 0x58180
movzwl 0x2(%rax), %eax
movzwl %bx, %ebx
testl $0x104, %eax            # imm = 0x104
je 0x2374f
leaq 0x25866(%rip), %rdi     # 0x48fa7
movl %ebx, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x34a2a(%rip), %rax     # 0x58180
testb $0x30, (%rax)
je 0x23785
leaq 0x26e06(%rip), %rdi     # 0x4a568
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl %r12d, %edi
callq 0x17530
leaq -0x6(%rbx), %rsi
movq %r13, %rdi
movq 0x40(%rsp), %rdx
callq 0x7793
movl %r12d, %edi
callq 0x16b56
movl %eax, %r12d
addq %r14, %rbx
addq $0x2, %rbx
jmp 0x23856
testl $0x3003, %eax           # imm = 0x3003
je 0x23811
testb $0x40, %al
movq 0x8(%rsp), %r13
je 0x237bd
leaq 0x25755(%rip), %rdi     # 0x48f08
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
leaq 0x1d8d3(%rip), %rdi     # 0x41097
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
jmp 0x23816
movq 0x8(%rsp), %r13
leaq 0x349a1(%rip), %rax     # 0x58180
testb $0x30, (%rax)
je 0x237f8
leaq 0x24ffe(%rip), %rdi     # 0x487e9
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl %r12d, %edi
callq 0x16b56
movl %eax, %edi
callq 0x16b56
movl %eax, %r12d
movq %r14, 0x38(%rsp)
jmp 0x23856
movq 0x8(%rsp), %r13
leaq 0x34963(%rip), %rax     # 0x58180
testb $0x30, (%rax)
je 0x23836
leaq 0x24fc0(%rip), %rdi     # 0x487e9
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r12d
movl %r12d, %edi
callq 0x16b56
movl %eax, %edi
callq 0x16b56
movl %eax, %r12d
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
leaq (%rax,%rcx), %rbx
movq %r13, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %rbx, %rdx
callq 0x4574
movl %eax, %r15d
movq %r13, %rdi
callq 0x30b0
movq %r13, %rdi
testl %eax, %eax
je 0x23885
callq 0x31b0
xorl %r15d, %r15d
jmp 0x2303b
callq 0x3190
movq %rax, 0x28(%rsp)
jmp 0x2303b
movzwl 0x16(%rsp), %eax
leaq (%r14,%rax), %rbx
addq $0x2, %rbx
movq %r14, 0x30(%rsp)
jmp 0x23856
movq 0x18(%rsp), %rcx
testq %rcx, %rcx
je 0x238d9
cmpq $0x0, 0x98(%rcx)
movq 0x28(%rsp), %rbx
jne 0x238de
movq %rbx, %rax
subq 0x38(%rsp), %rax
movq %rax, 0x98(%rcx)
jmp 0x238de
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x238de
movq 0x28(%rsp), %rbx
movl %r12d, %edi
callq 0x17530
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq