// File: /workspace/github_c_makefile_star2_O3/hfiguiere[P]exifprobe/main.c
// Function: main
int
main(int argc,char **argv)
{
    char *file;
    char *name = CNULL;
    FILE *inptr;
    int status = -1;
    unsigned long max_offset = 0UL;
    unsigned long ifd_offset = 0UL;
    unsigned long dumplength = 0UL;
    struct fileheader *header = NULL;
    struct image_summary *summary_entry = NULL;
    unsigned long filesize = 0UL;
    int chpr = 0;


    Progname = *argv;

    /* Gather options from EXIFPROBE_OPTIONS first                    */
    env_options();

    /* Now the command line                                           */
    argv += process_options(argc,argv);

    while((file = *argv++))
    {
        inptr = fopen(file,"rb");
        if(inptr == FNULL)
        {
            fprintf(stderr,"%s: failed to open file %s\n",Progname,file);
            why(stderr);
            max_offset = 0L;
        }
        else
        {
            PUSHCOLOR(BLACK);
            setfilename(file);  /* for '-n' option                    */
            filesize = get_filesize(inptr);

            if(Start_offset > filesize)
            {
                PUSHCOLOR(RED);
                print_filename();
                chpr += printf(" start offset %lu > filesize %lu\n",
                                            Start_offset,filesize);
                POPCOLOR();
                continue;
            }
            else if(Start_offset)
            {
                if(fseek(inptr,Start_offset,SEEK_SET) == -1)
                {
                    fprintf(stderr,"%s: FAILED to seek to start offset %lu\n",
                                                        Progname,Start_offset);
                    why(stdout);
                    continue;
                }
                printf("# Start at %ld\n",ftell(inptr));
            }

            print_filename();   /* for '-n' option                    */
            if((LIST_MODE))
                chpr += printf("FileName = %s",file);
            else
                chpr += printf("File Name = %s",file);
            chpr = newline(chpr);

            header = read_imageheader(inptr,Start_offset);
            if(ferror(inptr))
                continue;
            print_filename();
            if((LIST_MODE))
                chpr += printf("FileType = ");
            else
                chpr += printf("File Type = ");
            status = print_filetype(header->probe_magic,header->file_marker);
            chpr = newline(chpr);

            print_filename();
            if((LIST_MODE))
                chpr += printf("FileSize = %lu",filesize);
            else
                chpr += printf("File Size = %lu",filesize);
            chpr = newline(chpr);

            if(status == 0)
            {
                switch(header->probe_magic)
                {
                    case ORF1_MAGIC:
                    case ORF2_MAGIC:
                    case RW2_MAGIC:
                    case TIFF_MAGIC:
                        ifd_offset = read_ulong(inptr,header->file_marker,HERE); 
                        if(ifd_offset > filesize)
                        {
                            hexdump(inptr,Start_offset,10,10,12,0,0);
                            chpr = newline(chpr);
                            if(Max_undefined > 0L)
                                dumplength = Max_undefined - 10;
                            else
                                dumplength = 60;
                            if(dumplength)
                            {
                                hexdump(inptr,Start_offset +  10,
                                            filesize - 10 - Start_offset,
                                                            dumplength,12,0,0);
                                chpr = newline(1);
                            }
                            status = -1;
                            break;
                        }
                        summary_entry = new_summary_entry(NULL,header->probe_magic,TIFF_IFD);
                        name = "TIFF";
                        switch(header->probe_magic)
                        {
                            case ORF1_MAGIC:
                                name = "ORF1";
                                break;
                            case ORF2_MAGIC:
                                name = "ORF2";
                                break;
                            case RW2_MAGIC:
                                name = "RW2";
                                break;
                            case TIFF_MAGIC:
                            default:
                                break;
                        }

                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_header(header,SECTION);
                            chpr += printf(" ifd offset = %#lx/%lu",ifd_offset,ifd_offset);
                            if(Start_offset)
                            {
                                chpr += printf(" (+ %lu = %#lx/%lu)",Start_offset,
                                                                Start_offset + ifd_offset,
                                                                Start_offset + ifd_offset);
                            }
                            chpr = newline(chpr);
                        }
                        max_offset = process_tiff_ifd(inptr,header->file_marker,
                                            ifd_offset,Start_offset,0L,summary_entry,name,
                                            TIFF_IFD,0,-1,0);
                        if(max_offset > 0L)
                            status = 0;
                        fflush(stdout);
                        break;
                    case JPEG_SOI:
                        summary_entry = new_summary_entry(NULL,FILEFMT_JPEG,IMGFMT_JPEG);
                        if(summary_entry)
                            summary_entry->subfiletype = PRIMARY_TYPE;
                        max_offset = process_jpeg_segments(inptr,Start_offset,JPEG_SOI,0L,summary_entry,
                                                                            "JPEG","@",0);
                        status = jpeg_status(0);
                        fflush(stdout);
                        break;
                    case PROBE_CIFFMAGIC:
                        summary_entry = new_summary_entry(NULL,FILEFMT_CIFF,IMGFMT_CRW);
                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_header(header,SECTION);
                        }
                        max_offset = process_ciff(inptr,header,Start_offset,0L,summary_entry,"CIFF",0,0);
                        if(max_offset > 0L)
                            status = 0;
                        fflush(stdout);
                        break;
                    case PROBE_JP2MAGIC:
                        summary_entry = new_summary_entry(NULL,FILEFMT_JP2,IMGFMT_JPEG2000);
                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_header(header,SECTION);
                        }
                        max_offset = process_jp2(inptr,Start_offset + 12L,summary_entry,"JP2",0L);
                        if(max_offset > 0L)
                            status = 0;
                        fflush(stdout);
                        break;
                    case PROBE_MRWMAGIC:
                        summary_entry = new_summary_entry(NULL,FILEFMT_MRW,IMGFMT_MRW);
                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_header(header,SECTION);
                        }
                        max_offset =
                            process_mrw(inptr,Start_offset + 8L,
                                    header->mrw_header.mrw_dataoffset,
                                    filesize - header->mrw_header.mrw_dataoffset,
                                    summary_entry,"MRW",0L);
                        if(max_offset > 0L)
                            status = 0;
                        fflush(stdout);
                        break;
                    case PROBE_RAFMAGIC:
                        summary_entry = new_summary_entry(NULL,FILEFMT_RAF,IMGFMT_RAF);
                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_raf_header(inptr,header,SECTION);
                        }
                        if(status == 0)
                        {
                            max_offset = process_raf(inptr,Start_offset + 60,summary_entry,"RAF",0L);
                            if(max_offset > 0L)
                                status = 0;
                        }
                        fflush(stdout);
                        break;
                    case PROBE_X3FMAGIC:
                        summary_entry = new_summary_entry(NULL,FILEFMT_X3F,IMGFMT_X3F);
                        if(PRINT_SECTION)
                        {
                            print_tag_address(SECTION,Start_offset,0,"@");
                            status = print_x3f_header(inptr,header,SECTION);
                        }
                        if(status == 0)
                        {
                            max_offset = process_x3f(inptr,header,Start_offset,summary_entry,
                                                                                "X3F",0,0);
                            if(max_offset > 0L)
                                status = 0;
                        }
                        break;
                    default:
                        status = -1;
                        break;
                }
                if(status == JPEG_EARLY_EOI)
                    chpr = newline(chpr);
                print_tag_address(SECTION,filesize - 1,0,"-");
                if(PRINT_SECTION)
                {
                    chpr += printf("END OF FILE");
                    if(status == JPEG_EARLY_EOI)
                    {
                        jpeg_status(status);
                        print_jpeg_status();
                    }
                }
                chpr = newline(chpr);
                /* Print a summary of image sections found            */
                print_summary(summary_entry);
            }
            else
            {
                /* Allow hex/ascii dump of unregcognized file         */
                /* formats. In fact, always dump a little bit.        */
                if(Max_undefined == DUMPALL)
                    dumplength = filesize;
                else if(Max_undefined > 0L)
                    dumplength = Max_undefined;
                else
                    dumplength = DEF_DUMPLENGTH;
                if(dumplength)
                {
                    hexdump(inptr,Start_offset,filesize,dumplength,16,0,0);
                    chpr = newline(chpr);
                }
            }
            print_fileformat(summary_entry);
            summary_entry = destroy_summary(summary_entry);
            chpr = newline(1);
            if(inptr && fclose(inptr))
            {
                fprintf(stderr,"%s: FAILED to close stream for file \"%s\"\n",Progname,file);
                why(stderr);
            }
        }
        clear_memory();     /* Make, Model, Software...               */
        chpr = newline(1);
    }
    if(PRINT_CAMERA_NAMES)
        print_camera_makes();
    return(status);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rax
movq %rax, 0x55c7f(%rip)     # 0x59468
xorl %eax, %eax
callq 0x1cb26
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1c664
cltq
movq (%rbx,%rax,8), %r12
testq %r12, %r12
je 0x4183
leaq (%rbx,%rax,8), %rbx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
leaq 0x3d7ea(%rip), %r13     # 0x41004
xorl %r14d, %r14d
movq $0x0, 0x10(%rsp)
movq %r15, 0x8(%rsp)
addq $0x8, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3220
testq %rax, %rax
je 0x3b29
movq %rax, %r15
movq %r12, %rdi
callq 0x17ff1
movq %r15, %rdi
callq 0x50f3
movq %rax, %rbp
movq 0x55bc8(%rip), %rsi     # 0x59428
cmpq %rax, %rsi
ja 0x3926
testq %rsi, %rsi
je 0x38b5
movq %r15, %rdi
xorl %edx, %edx
callq 0x3210
cmpl $-0x1, %eax
jne 0x389c
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
callq 0x32f0
movq 0x20(%rsp), %r12
addq $0x8, %rbx
testb $0x1, %al
je 0x382f
jmp 0x417c
movq %r15, %rdi
callq 0x3190
leaq 0x3d7c2(%rip), %rdi     # 0x4106d
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
xorl %eax, %eax
callq 0x17ff9
testl $0x1040000, 0x548ba(%rip) # imm = 0x1040000
leaq 0x3d7be(%rip), %rdi     # 0x4108b
leaq 0x3d7a9(%rip), %rax     # 0x4107d
cmoveq %rax, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x1707a
movl %eax, %r14d
movq 0x55b31(%rip), %rsi     # 0x59428
movq %r15, %rdi
callq 0x41ac
movq %rax, %r13
movq %r15, %rdi
callq 0x30b0
testl %eax, %eax
je 0x394a
movq (%rbx), %r12
testq %r12, %r12
leaq 0x3d6e9(%rip), %r13     # 0x41004
jne 0x382b
jmp 0x417c
xorl %eax, %eax
callq 0x17ff9
movq 0x55af4(%rip), %rsi     # 0x59428
leaq 0x3d6e8(%rip), %rdi     # 0x41023
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
jmp 0x390e
xorl %eax, %eax
callq 0x17ff9
testl $0x1040000, 0x54825(%rip) # imm = 0x1040000
leaq 0x3d744(%rip), %rdi     # 0x410a6
leaq 0x3d731(%rip), %rax     # 0x4109a
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movq 0x8(%r13), %rdi
movzwl (%r13), %esi
callq 0x5495
movq %rax, 0x8(%rsp)
movl %r14d, %edi
callq 0x1707a
movl %eax, %r14d
xorl %eax, %eax
callq 0x17ff9
testl $0x1040000, 0x547da(%rip) # imm = 0x1040000
leaq 0x3d715(%rip), %rdi     # 0x410c2
leaq 0x3d6ff(%rip), %rax     # 0x410b3
cmoveq %rax, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x1707a
cmpl $0x0, 0x8(%rsp)
movl %eax, (%rsp)
je 0x3a00
movq 0x55a2a(%rip), %rcx     # 0x59408
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rcx
je 0x3a4a
testq %rcx, %rcx
leaq 0x3d612(%rip), %r13     # 0x41004
movq 0x10(%rsp), %r14
jne 0x3a62
movl $0x40, %ecx
jmp 0x3a62
movq 0x8(%r13), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x8(%rsp)
xorl %r14d, %r14d
cmpq $0x5351, %rax           # imm = 0x5351
jg 0x3a94
cmpq $0x54, %rax
jle 0x3b3a
cmpq $0x55, %rax
je 0x3bd1
cmpq $0x4655, %rax           # imm = 0x4655
je 0x3df0
cmpq $0x4f52, %rax           # imm = 0x4F52
je 0x3bd1
jmp 0x3f10
movq %rbp, %rcx
testq %rbp, %rbp
leaq 0x3d5ad(%rip), %r13     # 0x41004
movq 0x10(%rsp), %r14
je 0x4100
movq 0x559bf(%rip), %rsi     # 0x59428
subq $0x8, %rsp
movq %r15, %rdi
movq %rbp, %rdx
movl $0x10, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x7480
addq $0x10, %rsp
movl (%rsp), %edi
callq 0x1707a
jmp 0x4100
cmpq $0x4d524c, %rax         # imm = 0x4D524C
jle 0x3b53
cmpq $0x4d524d, %rax         # imm = 0x4D524D
je 0x3d5f
cmpq $0xd0a870a, %rax        # imm = 0xD0A870A
je 0x3e51
cmpq $0x62564f46, %rax       # imm = 0x62564F46
jne 0x3f10
xorl %edi, %edi
movl $0x62564f46, %esi       # imm = 0x62564F46
movl $0x62564f46, %edx       # imm = 0x62564F46
callq 0xfc85
movq %rax, 0x10(%rsp)
testb $0x4, 0x546a1(%rip)     # 0x58182
je 0x3ed9
movq 0x5593a(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d5e0(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %edx          # imm = 0x40000
movq %r15, %rdi
movq %r13, %rsi
callq 0x28daa
testl %eax, %eax
je 0x3ed9
movl %eax, 0x4(%rsp)
leaq 0x3d4e0(%rip), %r13     # 0x41004
jmp 0x4071
leaq 0x3d4d7(%rip), %rsi     # 0x41007
movq 0x8(%rsp), %r15
jmp 0x4137
cmpq $0x1a, %rax
je 0x3cdd
cmpq $0x2a, %rax
je 0x3bd1
jmp 0x3f10
cmpq $0x5352, %rax           # imm = 0x5352
je 0x3bd1
cmpq $0xffd8, %rax           # imm = 0xFFD8
jne 0x3f10
xorl %edi, %edi
movl $0xffd8, %esi           # imm = 0xFFD8
movl $0xffd8, %edx           # imm = 0xFFD8
callq 0xfc85
testq %rax, %rax
leaq 0x3d482(%rip), %r13     # 0x41004
je 0x3b8e
movl $0x1, 0xc4(%rax)
movq 0x55893(%rip), %rsi     # 0x59428
movq %r15, %rdi
movl $0xffd8, %edx           # imm = 0xFFD8
xorl %ecx, %ecx
movq %rax, %r8
movq %rax, 0x10(%rsp)
leaq 0x41eb7(%rip), %r9      # 0x45a65
pushq $0x0
leaq 0x3d525(%rip), %rax     # 0x410dc
pushq %rax
callq 0x11455
addq $0x10, %rsp
xorl %edi, %edi
callq 0x1336d
movl %eax, 0x4(%rsp)
jmp 0x3f4b
movzwl (%r13), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x4707
cmpq %rbp, %rax
jbe 0x3c91
movq 0x55835(%rip), %rsi     # 0x59428
subq $0x8, %rsp
xorl %r14d, %r14d
movl $0xa, %edx
movl $0xa, %ecx
movq %r15, %rdi
movl $0xc, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x7480
addq $0x10, %rsp
movl (%rsp), %edi
callq 0x1707a
movl %eax, %edx
movq 0x557dc(%rip), %rax     # 0x59408
leaq -0xa(%rax), %rcx
testq %rax, %rax
movl $0x3c, %eax
cmoveq %rax, %rcx
testq %rcx, %rcx
leaq 0x3d3be(%rip), %r13     # 0x41004
je 0x3ed1
movq 0x557d5(%rip), %rsi     # 0x59428
movq %rbp, %rdx
subq %rsi, %rdx
addq $0xa, %rsi
addq $-0xa, %rdx
subq $0x8, %rsp
xorl %r14d, %r14d
movq %r15, %rdi
movl $0xc, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0x7480
addq $0x10, %rsp
movl $0x1, %edi
callq 0x1707a
movl %eax, (%rsp)
jmp 0x409c
movq %rax, %r14
movl 0x8(%r13), %esi
xorl %edi, %edi
xorl %edx, %edx
callq 0xfc85
movq %rax, %r9
movq 0x8(%r13), %rax
cmpq $0x55, %rax
je 0x3f68
cmpq $0x5352, %rax           # imm = 0x5352
je 0x3f5f
leaq 0x4165e(%rip), %r10     # 0x45323
cmpq $0x4f52, %rax           # imm = 0x4F52
jne 0x3f6f
leaq 0x3d3fa(%rip), %r10     # 0x410d2
jmp 0x3f6f
xorl %edi, %edi
movl $0x1a, %esi
movl $0x1a, %edx
callq 0xfc85
movq %rax, %r14
testb $0x4, 0x5448a(%rip)     # 0x58182
movl $0x0, %eax
je 0x3d26
movq 0x55722(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d3c8(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %esi          # imm = 0x40000
movq %r13, %rdi
callq 0x5158
movl %eax, 0x4(%rsp)
movq 0x556f7(%rip), %rdx     # 0x59428
movq %r15, %rdi
movq %r13, %rsi
xorl %ecx, %ecx
movq %r14, 0x10(%rsp)
movq %r14, %r8
leaq 0x41be9(%rip), %r9      # 0x45931
xorl %eax, %eax
pushq %rax
movq $0x0, 0x10(%rsp)
pushq %rax
callq 0x1ceac
jmp 0x3de7
movq $0x0, 0x8(%rsp)
xorl %edi, %edi
movl $0x4d524d, %esi         # imm = 0x4D524D
movl $0x4d524d, %edx         # imm = 0x4D524D
callq 0xfc85
movq %rax, %r14
testb $0x4, 0x543ff(%rip)     # 0x58182
movl $0x0, %eax
je 0x3db1
movq 0x55697(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d33d(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %esi          # imm = 0x40000
movq %r13, %rdi
callq 0x5158
movl %eax, 0x4(%rsp)
movq 0x5566c(%rip), %rsi     # 0x59428
addq $0x8, %rsi
movq 0x38(%r13), %rdx
movq %rbp, %rcx
subq %rdx, %rcx
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, 0x18(%rsp)
movq %r14, %r8
leaq 0x41c0c(%rip), %r9      # 0x459ec
pushq $0x0
callq 0x257dc
addq $0x10, %rsp
jmp 0x404d
xorl %edi, %edi
movl $0x4655, %esi           # imm = 0x4655
movl $0x4655, %edx           # imm = 0x4655
callq 0xfc85
movq %rax, %r14
testb $0x4, 0x54377(%rip)     # 0x58182
movq %rax, 0x10(%rsp)
je 0x3f1c
movq 0x5560b(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d2b1(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %edx          # imm = 0x40000
movq %r15, %rdi
movq %r13, %rsi
callq 0x279b0
testl %eax, %eax
je 0x3f1c
movl %eax, 0x4(%rsp)
jmp 0x3f44
movq $0x0, 0x8(%rsp)
xorl %edi, %edi
movl $0xd0a870a, %esi        # imm = 0xD0A870A
movl $0xd0a870a, %edx        # imm = 0xD0A870A
callq 0xfc85
movq %rax, %r14
testb $0x4, 0x5430d(%rip)     # 0x58182
movl $0x0, %eax
je 0x3ea3
movq 0x555a5(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d24b(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %esi          # imm = 0x40000
movq %r13, %rdi
callq 0x5158
movl %eax, 0x4(%rsp)
movq 0x5557a(%rip), %rsi     # 0x59428
addq $0xc, %rsi
movq %r15, %rdi
movq %r14, 0x10(%rsp)
movq %r14, %rdx
leaq 0x3d231(%rip), %rcx     # 0x410f5
xorl %r8d, %r8d
callq 0x20baa
jmp 0x404d
movl %edx, (%rsp)
jmp 0x409c
movq 0x55548(%rip), %rdx     # 0x59428
subq $0x8, %rsp
xorl %r14d, %r14d
movq %r15, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rcx
leaq 0x41b04(%rip), %r8      # 0x459fd
xorl %r9d, %r9d
pushq $0x0
callq 0x29323
addq $0x10, %rsp
movq $0x0, 0x8(%rsp)
leaq 0x3d0ed(%rip), %r13     # 0x41004
jmp 0x409c
movq 0x55505(%rip), %rsi     # 0x59428
addq $0x3c, %rsi
movl $0x0, 0x4(%rsp)
movq %r15, %rdi
movq %r14, %rdx
leaq 0x41abc(%rip), %rcx     # 0x459f8
xorl %r8d, %r8d
callq 0x27a2b
leaq 0x3d0b9(%rip), %r13     # 0x41004
movq 0x54076(%rip), %rax     # 0x57fc8
movq (%rax), %rdi
callq 0x3200
jmp 0x4071
leaq 0x3d171(%rip), %r10     # 0x410d7
jmp 0x3f6f
leaq 0x41a69(%rip), %r10     # 0x459d8
testb $0x4, 0x5420c(%rip)     # 0x58182
movl $0x0, 0x4(%rsp)
movq %r9, 0x10(%rsp)
je 0x4019
movq %r10, 0x8(%rsp)
movq 0x55493(%rip), %rsi     # 0x59428
movl $0x40000, %edi          # imm = 0x40000
xorl %edx, %edx
leaq 0x3d139(%rip), %rcx     # 0x410dc
callq 0x55eb
movl $0x40000, %esi          # imm = 0x40000
movq %r13, %rdi
callq 0x5158
movl %eax, 0x4(%rsp)
leaq 0x3d11e(%rip), %rdi     # 0x410de
movq %r14, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3120
movq %r14, %rcx
movl %eax, %r14d
addl (%rsp), %r14d
movq 0x5544a(%rip), %rsi     # 0x59428
testq %rsi, %rsi
movq %rcx, 0x18(%rsp)
je 0x3fff
addq %rsi, %rcx
leaq 0x412d5(%rip), %rdi     # 0x452c7
movq %rcx, %rdx
xorl %eax, %eax
callq 0x3120
addl %eax, %r14d
movl %r14d, %edi
callq 0x1707a
movl %eax, (%rsp)
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %r14
movq 0x8(%rsp), %r10
movzwl (%r13), %esi
movq 0x55403(%rip), %rcx     # 0x59428
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
pushq %rax
pushq $-0x1
pushq %rax
movq $0x0, 0x28(%rsp)
pushq %rax
pushq %r10
callq 0xcabc
addq $0x30, %rsp
movq %rax, %r13
movq 0x53f71(%rip), %rax     # 0x57fc8
movq (%rax), %rdi
callq 0x3200
movl $0x0, %r14d
testq %r13, %r13
leaq 0x3cf95(%rip), %r13     # 0x41004
jne 0x409c
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
jne 0x4094
movl (%rsp), %edi
callq 0x1707a
movl %eax, (%rsp)
movl $0x1, %eax
movq %rax, 0x8(%rsp)
movb $0x1, %r14b
jmp 0x409c
xorl %r14d, %r14d
movq %rax, 0x8(%rsp)
decq %rbp
movl $0x40000, %edi          # imm = 0x40000
movq %rbp, %rsi
xorl %edx, %edx
leaq 0x3d049(%rip), %rcx     # 0x410f9
callq 0x55eb
testb $0x4, 0x540c6(%rip)     # 0x58182
jne 0x40c3
movl (%rsp), %ebp
jmp 0x40ec
leaq 0x3d031(%rip), %rdi     # 0x410fb
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl (%rsp), %ebp
testb %r14b, %r14b
je 0x40ec
movl $0x1, %edi
callq 0x1336d
xorl %eax, %eax
callq 0x9734
movq 0x10(%rsp), %r14
movl %ebp, %edi
callq 0x1707a
movq %r14, %rdi
callq 0x16530
movq %r14, %rdi
callq 0x175c4
movq %r14, %rdi
callq 0x13b32
movq %rax, 0x10(%rsp)
movl $0x1, %edi
callq 0x1707a
movq %r15, %rdi
callq 0x30f0
leaq 0x3cfd9(%rip), %rsi     # 0x41107
testl %eax, %eax
movq 0x8(%rsp), %r15
je 0x415a
movq 0x53eba(%rip), %r14     # 0x57ff8
movq (%r14), %rdi
movq 0x55320(%rip), %rdx     # 0x59468
movq %r12, %rcx
xorl %eax, %eax
callq 0x3180
movq (%r14), %rdi
callq 0x17ef7
xorl %eax, %eax
callq 0x17f47
movl $0x1, %edi
callq 0x1707a
movl %eax, %r14d
movq (%rbx), %r12
testq %r12, %r12
jne 0x3826
jmp 0x4189
movq 0x8(%rsp), %r15
jmp 0x4189
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb $0x4, 0x53ff1(%rip)     # 0x58181
je 0x4199
xorl %eax, %eax
callq 0x19ec9
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop