// File: /workspace/github_c_makefile_star2_O2/hfiguiere[P]exifprobe/maker_nikon.c
// Function: nikon2_offset_makervalue
void
nikon2_offset_makervalue(FILE *inptr,unsigned short byteorder,
    struct ifd_entry *entry_ptr,unsigned long fileoffset_base,
    struct image_summary *summary_entry,char *parent_name,char*prefix,
    int indent,int make,int model,int at_offset)
{
    unsigned long max_offset = 0;
    unsigned long value_offset;
    unsigned long count;
    unsigned long dumplength;
    unsigned long orig_print_options;
    unsigned short marker;
    char *nameoftag;
    char *fulldirname = NULL;
    int status = 0;
    int chpr = 0;
    int ifdnum = -1;
    int subifdnum = -1;

    if(entry_ptr)
    {
        nameoftag = maker_tagname(entry_ptr->tag,make,model); 
        fulldirname = splice(parent_name,".",nameoftag);
        value_offset = fileoffset_base + entry_ptr->value;
        count = entry_ptr->count;

        switch(entry_ptr->tag)
        {
            case 0x0011: /* "NikonPreviewImage"                       */
                if(at_offset && (PRINT_SECTION))
                {
                    print_tag_address(VALUE_AT_OFFSET,value_offset,indent,prefix);
                    chpr += printf("# Start of Nikon Preview Image SubIFD from MakerNote");
                }
                else if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu",value_offset);
                }
                chpr = newline(chpr);
                if(summary_entry)
                {
                    ifdnum = summary_entry->ifdnum;
                    subifdnum = summary_entry->subifdnum;
                }
                value_offset = process_tiff_ifd(inptr,byteorder,entry_ptr->value,
                                        fileoffset_base,0,summary_entry,fulldirname,
                                        MAKER_SUBIFD,ifdnum,subifdnum,
                                        indent+SMALLINDENT);
                if(at_offset && (PRINT_SECTION))
                {
                    chpr = newline(chpr);
                    if(value_offset == 0)
                        PUSHCOLOR(RED);
                    print_tag_address(VALUE_AT_OFFSET,value_offset - 1,
                                                indent,"-");
                    if(value_offset == 0)
                        POPCOLOR();
                    chpr += printf("# End of Nikon Preview Image SubIFD from MakerNote");
                    if(value_offset == 0)
                        printred(" (INVALID)");
                }
                if(summary_entry)
                { 
                    /* The new one is on the end of the chain         */
                    if((summary_entry = last_summary_entry(summary_entry)))
                    {
                        summary_entry->filesubformat |= FILESUBFMT_MNSUBIFD;
                        summary_entry->datatype = MAKER_SUBIFD;
                        summary_entry->subfiletype = REDUCED_RES_TYPE;
                    }
                }
                break;
            case 0x0100: /* Jpeg Thumbnail                            */
                if(at_offset && (PRINT_SECTION))
                {
                    print_tag_address(VALUE_AT_OFFSET,value_offset,indent,prefix);
                    chpr += printf("# Start of JPEG Thumbnail from MakerNote");
                    chpr += printf(" length %lu",count); 
                }
                else if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu:%lu",value_offset,count);
                    else
                        chpr += printf(":%lu", count);
                    if(!(PRINT_VALUE_AT_OFFSET))
                        chpr += printf(" # UNDEFINED");
                }
                if((PRINT_SECTION) || (PRINT_SEGMENT))
                    chpr = newline(chpr);
                marker = read_ushort(inptr,TIFF_MOTOROLA,value_offset);
                max_offset = process_jpeg_segments(inptr,value_offset,marker,
                                    count,summary_entry,fulldirname,
                                    prefix,indent+SMALLINDENT);
#if 0
/* an alternate place to look */
                if((status = jpeg_status(status)) == JPEG_NO_SOI)
                {
                    marker = read_ushort(inptr,TIFF_MOTOROLA,value_offset - fileoffset_base);
                    max_offset = process_jpeg_segments(inptr,value_offset - fileoffset_base,
                                            marker,count,summary_entry,
                                            prefix,indent+SMALLINDENT);
                    if(max_offset)
                        value_offset -= fileoffset_base;
                }
#endif
                if(at_offset)
                {
                    if((PRINT_SECTION))
                    {
                        if((status = jpeg_status(0) == JPEG_EARLY_EOI))
                            chpr = newline(chpr);
                        jpeg_status(status);
                        print_tag_address(VALUE_AT_OFFSET,value_offset + count - 1,
                                                    indent,"-");
                        chpr += printf("# End of JPEG Thumbnail from MakerNote");
                        chpr += printf(" length %lu",count); 
                        if((PRINT_ENTRY) && !(PRINT_VALUE))
                            chpr = newline(chpr);
                    }
                }
                print_jpeg_status();
                if(marker && summary_entry)
                { 
                    /* The new one is on the end of the chain         */
                    if((summary_entry = last_summary_entry(summary_entry)))
                    {
                        summary_entry->filesubformat |= FILESUBFMT_MNOTE;
                        summary_entry->datatype = MAKER_IFD;
                        summary_entry->subfiletype = THUMBNAIL_TYPE;
                    }
                }
                /* make certain we're at the end unless 'inptr' bad   */
                clearerr(inptr);
                fseek(inptr,value_offset + count,SEEK_SET);
                break;
            case 0x0e00: /* PrintIM (Epson Print Image matching)      */
                if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu:%lu",value_offset,count);
                    if(!(PRINT_VALUE_AT_OFFSET))
                        chpr += printf("    # UNDEFINED");
                    chpr = newline(chpr);
                }
                process_pim(inptr,byteorder,entry_ptr->value,fileoffset_base,
                    count,nameoftag,parent_name,prefix,indent);
                break;
            case 0x0010: /* Data                                      */
                if(at_offset && (PRINT_ENTRY))
                {
                    print_tag_address(ENTRY,value_offset,indent,prefix);
                    print_makertagid(entry_ptr,25," : ",make,model);
                    chpr += printf("length %-9lu # UNDEFINED", count);
                }
                else if(!at_offset && (PRINT_VALUE))
                {
                    if(!(PRINT_OFFSET))
                        chpr += printf("@%lu:%lu",value_offset,count);
                    else
                        chpr += printf(":%lu",count);
                    if(!(PRINT_VALUE_AT_OFFSET))
                        chpr += printf("    # UNDEFINED");
                }
                if(Max_undefined == 0)
                {
                    if(chpr)
                        printred(" (not dumped, use -U)");
                }
                else
                {
                    if((Max_undefined == DUMPALL) || (Max_undefined > count))
                        dumplength = count;
                    else 
                        dumplength = Max_undefined;
                    chpr = newline(chpr);
                    hexdump(inptr,value_offset,count,dumplength,12,
                                indent,SUBINDENT);
                    chpr = newline(1);
                }
                /* make certain we're at the end                      */
                fseek(inptr,value_offset + count,SEEK_SET);
                break;
            case 0x0097:    /* Color Balance ????                     */
                /* Most models show this as an UNDEFINED section; the */
                /* SQ provides it as ASCII, with the value an "array" */
                /* of ascii strings (including newlines). Can these   */
                /* both have the same function?                       */
                if(entry_ptr->value_type == UNDEFINED)
                {
#if 1
                    if(at_offset && (PRINT_ENTRY)) /* PRINT_VALUE?    */
                    {
                        print_tag_address(ENTRY,value_offset,indent,prefix);
                        print_makertagid(entry_ptr,MAKERTAGWIDTH," = ",make,model);
                    }
                    if(at_offset && (PRINT_VALUE) && (PRINT_VALUE_AT_OFFSET))
                        nikon_colorbalance(inptr,entry_ptr,byteorder,fileoffset_base,indent);
                    else if(!at_offset && (PRINT_VALUE))
                    {
                        if(!(PRINT_OFFSET))
                            chpr += printf("@%lu:%-9lu",value_offset,count);
                        else
                            chpr = printf("length %-9lu", entry_ptr->count);
                        if(!(PRINT_VALUE_AT_OFFSET))
                            chpr += printf(" # UNDEFINED");
                    }
#else
                    print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
                                        fileoffset_base,fulldirname,prefix,
                                        indent,make,model,at_offset);
#endif
                }
                else
                {
                    /* This is an unpleasant hack to show all of the  */
                    /* null-separated strings, even in LIST mode,     */
                    /* where IGNORE_LENGTH is usually on.             */
                    orig_print_options = Print_options;
                    Print_options &=~(PRINT_ASCII_IGNORE_LENGTH);
                    print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
                                        fileoffset_base,fulldirname,prefix,
                                        indent,make,model,at_offset);
                    Print_options = orig_print_options;
                }
                break;
            case 0x008c:    /* NEFDecodeTable1                        */
            case 0x0096:    /* NEFDecodeTable2                        */
                if((summary_entry) && (summary_entry->fileformat == FILEFMT_TIFF))
                    summary_entry->filesubformat |= FILESUBFMT_NEF;
                print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
                                    fileoffset_base,fulldirname,prefix,
                                    indent,make,model,at_offset);
                break;
            default:
                print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
                                    fileoffset_base,fulldirname,prefix,
                                    indent,make,model,at_offset);
                break;
        }
        if(fulldirname)
            free(fulldirname);
    }
    setcharsprinted(chpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdx, %rdx
je 0x2b3a5
movq %r9, %rbx
movq %rcx, %r12
movq %rdx, %r14
movl %esi, 0x14(%rsp)
movq %r8, 0x38(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xa0(%rsp), %eax
movq %rax, 0x28(%rsp)
movl 0x98(%rsp), %r15d
movl 0x90(%rsp), %ebp
movl 0x88(%rsp), %eax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movzwl (%rdx), %edi
movl %ebp, %esi
movl %r15d, %edx
callq 0x1b2e4
movq %rax, %r13
leaq 0x1469a(%rip), %rsi     # 0x3f997
movq %rbx, %rdi
movq %rax, %rdx
callq 0x16f1d
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %r8
movq 0x10(%r14), %rdx
leaq (%rdx,%r12), %rsi
movzwl (%r14), %eax
cmpl $0x10, %eax
je 0x2b4f2
cmpl $0xe00, %eax            # imm = 0xE00
je 0x2b563
cmpl $0x8c, %eax
je 0x2b3ac
cmpl $0x96, %eax
je 0x2b3ac
cmpl $0x97, %eax
movq 0x38(%rsp), %r13
je 0x2b467
cmpl $0x100, %eax            # imm = 0x100
je 0x2b3f8
cmpl $0x11, %eax
jne 0x2b3c0
leaq 0x2be1a(%rip), %r15     # 0x57180
movq (%r15), %rax
cmpl $0x0, 0x28(%rsp)
je 0x2b6bf
btl $0x12, %eax
jae 0x2b6e1
movl $0x1000000, %edi        # imm = 0x1000000
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x5100
leaq 0x1ccd3(%rip), %rdi     # 0x4806c
xorl %eax, %eax
callq 0x3120
jmp 0x2b6dd
xorl %ebp, %ebp
jmp 0x2ba69
movq 0x38(%rsp), %rax
testq %rax, %rax
je 0x2b3c0
cmpl $0x2a, 0x14(%rax)
jne 0x2b3c0
orb $0x20, 0x18(%rax)
movzwl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
movq %r12, %rcx
movq 0x20(%rsp), %r12
movq %r12, %r8
movq 0x30(%rsp), %r9
pushq 0x28(%rsp)
pushq %r15
pushq %rbp
pushq 0x30(%rsp)
callq 0x185a8
addq $0x20, %rsp
xorl %ebp, %ebp
jmp 0x2ba61
leaq 0x2bd81(%rip), %r13     # 0x57180
movq (%r13), %rax
cmpl $0x0, 0x28(%rsp)
je 0x2b646
btl $0x12, %eax
movq 0x20(%rsp), %r12
jae 0x2b675
movl $0x1000000, %edi        # imm = 0x1000000
movq %rsi, %r15
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %r8, %r14
callq 0x5100
leaq 0x1cbd2(%rip), %rdi     # 0x48010
xorl %eax, %eax
callq 0x3120
movl %eax, %ebx
leaq 0x1b2bc(%rip), %rdi     # 0x4670a
movq %r14, %rsi
xorl %eax, %eax
callq 0x3120
movq %r15, %rsi
movq %r14, %r8
movl %eax, %ebp
addl %ebx, %ebp
jmp 0x2b836
cmpw $0x7, 0x2(%r14)
jne 0x2b5f7
leaq 0x2bd06(%rip), %rbx     # 0x57180
movq (%rbx), %rax
cmpl $0x0, 0x28(%rsp)
je 0x2b7d3
testl $0x4003333, %eax        # imm = 0x4003333
je 0x2b4bd
movl $0x4003333, %edi        # imm = 0x4003333
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x5100
leaq 0x1d0ae(%rip), %rdx     # 0x48558
pushq $0x19
popq %rsi
movq %r14, %rdi
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x1850a
movq (%rbx), %rax
testb $0x30, %al
sete %cl
btl $0x18, %eax
setae %al
xorl %ebp, %ebp
orb %cl, %al
jne 0x2b5ed
movzwl 0x14(%rsp), %edx
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rcx
movq 0x18(%rsp), %r8
callq 0x2c049
jmp 0x2b5ed
leaq 0x2bc87(%rip), %rbx     # 0x57180
movq (%rbx), %rax
cmpl $0x0, 0x28(%rsp)
je 0x2b67c
testl $0x4003333, %eax        # imm = 0x4003333
movq 0x20(%rsp), %r12
je 0x2b6b0
movl $0x4003333, %edi        # imm = 0x4003333
movq %rsi, %r13
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %r8, %rbx
callq 0x5100
leaq 0x19338(%rip), %rdx     # 0x44870
pushq $0x19
popq %rsi
movq %r14, %rdi
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x1850a
leaq 0x14796(%rip), %rdi     # 0x3fce5
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3120
movq %rbx, %r8
movl %eax, %ebp
jmp 0x2b6b5
xorl %ebp, %ebp
cmpl $0x0, 0x28(%rsp)
jne 0x2b5c7
leaq 0x2bc0d(%rip), %r15     # 0x57180
movq (%r15), %rax
testb $0x30, %al
je 0x2b5c7
xorl %ebp, %ebp
testw $0x300, %ax             # imm = 0x300
jne 0x2b59e
leaq 0x17bd9(%rip), %rdi     # 0x43162
movq %r8, %rdx
xorl %eax, %eax
movq %r8, %rbp
callq 0x3120
movq %rbp, %r8
movl %eax, %ebp
movq (%r15), %rax
movq %r8, %r15
btl $0x18, %eax
jb 0x2b5b7
leaq 0x14755(%rip), %rdi     # 0x3fd03
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
movq 0x10(%r14), %rdx
movq %r15, %r8
subq $0x8, %rsp
movzwl 0x1c(%rsp), %esi
movq 0x10(%rsp), %rdi
movq %r12, %rcx
movq %r13, %r9
pushq 0x20(%rsp)
pushq 0x40(%rsp)
pushq %rbx
callq 0x125a8
addq $0x20, %rsp
movq 0x20(%rsp), %r12
jmp 0x2ba61
leaq 0x2bb82(%rip), %rbx     # 0x57180
movq (%rbx), %r13
movq %r13, %rax
andq $-0x40000001, %rax      # imm = 0xBFFFFFFF
movq %rax, (%rbx)
movzwl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
movq %r12, %rcx
movq 0x20(%rsp), %r12
movq %r12, %r8
movq 0x30(%rsp), %r9
pushq 0x28(%rsp)
pushq %r15
pushq %rbp
pushq 0x30(%rsp)
callq 0x185a8
addq $0x20, %rsp
movq %r13, (%rbx)
jmp 0x2b3f1
testb $0x30, %al
movq 0x20(%rsp), %r12
je 0x2b675
testw $0x300, %ax             # imm = 0x300
je 0x2b800
movq %rsi, %r14
leaq 0x17b03(%rip), %rdi     # 0x43166
movq %r8, %rbx
movq %r8, %rsi
xorl %eax, %eax
callq 0x3120
jmp 0x2b817
xorl %ebp, %ebp
jmp 0x2b836
testb $0x30, %al
movq 0x20(%rsp), %r12
je 0x2b6b0
testw $0x300, %ax             # imm = 0x300
movq 0x8(%rsp), %r14
je 0x2b9a4
movq %rsi, %r13
leaq 0x17ac8(%rip), %rdi     # 0x43166
movq %r8, %r15
movq %r8, %rsi
xorl %eax, %eax
callq 0x3120
jmp 0x2b9bb
movq %rsi, %r13
xorl %ebp, %ebp
movq 0x8(%rsp), %r14
jmp 0x2b9d6
testb $0x30, %al
sete %cl
testw $0x300, %ax             # imm = 0x300
setne %al
orb %cl, %al
jne 0x2b6e1
leaq 0x1b106(%rip), %rdi     # 0x467dc
xorl %eax, %eax
callq 0x3120
movl %eax, %edi
jmp 0x2b6e3
xorl %edi, %edi
callq 0x160f7
movl %eax, %ebp
testq %r13, %r13
je 0x2b6ff
movl 0x11c(%r13), %eax
movl 0x120(%r13), %r10d
jmp 0x2b705
pushq $-0x1
popq %rax
movl %eax, %r10d
movl 0x14(%rsp), %esi
movq 0x10(%r14), %rdx
movq 0x18(%rsp), %rcx
leal 0x2(%rcx), %r11d
subq $0x8, %rsp
movzwl %si, %esi
movq 0x10(%rsp), %rdi
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
pushq %r11
pushq %r10
pushq %rax
pushq $0x6
movq 0x48(%rsp), %r12
pushq %r12
callq 0xc004
addq $0x30, %rsp
cmpl $0x0, 0x28(%rsp)
je 0x2b79c
testb $0x4, 0x2(%r15)
je 0x2b79c
movq %rax, %rbx
movl %ebp, %edi
callq 0x160f7
movl %eax, %r14d
leaq -0x1(%rbx), %rsi
leaq 0x13991(%rip), %rcx     # 0x3f0f9
movl $0x1000000, %edi        # imm = 0x1000000
movq 0x18(%rsp), %rdx
callq 0x5100
leaq 0x1c923(%rip), %rdi     # 0x480a1
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
cmpq $0x1, %rbx
jae 0x2b79c
leaq 0x1c93d(%rip), %rdi     # 0x480d4
callq 0x56e2
testq %r13, %r13
je 0x2ba61
movq %r13, %rdi
callq 0xf111
testq %rax, %rax
je 0x2ba61
orb $0x2, 0x19(%rax)
movl $0x6, 0x118(%rax)
movl $0x5, 0xc4(%rax)
jmp 0x2ba61
testb $0x30, %al
je 0x2ba82
testw $0x300, %ax             # imm = 0x300
movq 0x20(%rsp), %r12
je 0x2ba89
leaq 0x1e442(%rip), %rdi     # 0x49c33
movq %r8, %rsi
xorl %eax, %eax
callq 0x3120
jmp 0x2ba9a
leaq 0x1795b(%rip), %rdi     # 0x43162
movq %rsi, %r14
movq %r8, %rbx
movq %r8, %rdx
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x1, 0x3(%r13)
jne 0x2b830
leaq 0x144df(%rip), %rdi     # 0x3fd06
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq %rbx, %r8
movq %r14, %rsi
movq %r8, 0x40(%rsp)
movq %rsi, %r15
testb $0xc, 0x2(%r13)
je 0x2b84e
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
movq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x4d4d, %esi           # imm = 0x4D4D
movq %r15, %rdx
callq 0x416a
movl %eax, %ebx
movq 0x18(%rsp), %rax
addl $0x2, %eax
movzwl %bx, %edx
movq %r14, %rdi
movq %r15, %rsi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r13
movq %r13, %r8
movq %r12, %r9
pushq %rax
pushq 0x38(%rsp)
callq 0x105af
addq $0x10, %rsp
cmpl $0x0, 0x28(%rsp)
je 0x2b8a8
leaq 0x2b8de(%rip), %rax     # 0x57180
testb $0x4, 0x2(%rax)
jne 0x2b8b2
movq 0x8(%rsp), %r14
jmp 0x2b950
xorl %edi, %edi
callq 0x1259b
xorl %r14d, %r14d
cmpl $0x1, %eax
sete %r14b
jne 0x2b8ce
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
movl %r14d, %edi
callq 0x1259b
movq 0x40(%rsp), %r13
leaq (%r15,%r13), %rsi
decq %rsi
leaq 0x13810(%rip), %rcx     # 0x3f0f9
movl $0x1000000, %edi        # imm = 0x1000000
movq 0x18(%rsp), %rdx
callq 0x5100
leaq 0x1c73a(%rip), %rdi     # 0x48039
xorl %eax, %eax
callq 0x3120
movl %eax, %r14d
addl %ebp, %r14d
leaq 0x1adf7(%rip), %rdi     # 0x4670a
movq %r13, %rsi
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
addl %r14d, %ebp
leaq 0x2b857(%rip), %rax     # 0x57180
movq (%rax), %rax
testl $0x4003333, %eax        # imm = 0x4003333
sete %cl
testb $0x30, %al
setne %al
orb %cl, %al
jne 0x2b946
movl %ebp, %edi
callq 0x160f7
movl %eax, %ebp
movq 0x8(%rsp), %r14
movq 0x38(%rsp), %r13
xorl %eax, %eax
callq 0x8fb2
testw %bx, %bx
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
jne 0x2b98c
movq %r13, %rdi
callq 0xf111
testq %rax, %rax
je 0x2b98c
orb $0x1, 0x19(%rax)
movl $0x5, 0x118(%rax)
movl $0x2, 0xc4(%rax)
movq %r14, %rdi
callq 0x31b0
addq 0x40(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
jmp 0x2ba5a
leaq 0x177b7(%rip), %rdi     # 0x43162
movq %rsi, %r13
movq %r8, %r15
movq %r8, %rdx
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x1, 0x3(%rbx)
jne 0x2b9d3
leaq 0x14339(%rip), %rdi     # 0x3fd03
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
movq %r15, %r8
leaq 0x2ca2b(%rip), %rax     # 0x58408
movq (%rax), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %r8, %rbx
cmpq %rcx, %rax
je 0x2ba18
testq %rax, %rax
jne 0x2ba0e
testl %ebp, %ebp
je 0x2ba7e
leaq 0x13cbe(%rip), %rdi     # 0x3f6bf
movq %r8, %rbx
callq 0x56e2
movq %rbx, %r8
jmp 0x2ba51
cmpq %r8, %rax
cmovaeq %r8, %rax
movq %rax, %rbx
movl %ebp, %edi
movq %r8, %r15
callq 0x160f7
subq $0x8, %rsp
pushq $0xc
popq %r8
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq 0x20(%rsp), %r9
pushq $0x2
callq 0x6e93
popq %rax
popq %rcx
pushq $0x1
popq %rdi
callq 0x160f7
movq %r15, %r8
movl %eax, %ebp
addq %r8, %r13
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x3210
movq %r12, %rdi
callq 0x3050
movl %ebp, %edi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16a4f
xorl %ebp, %ebp
jmp 0x2ba51
xorl %ebp, %ebp
jmp 0x2b5ed
leaq 0x16e89(%rip), %rdi     # 0x42919
movq %r8, %rdx
xorl %eax, %eax
callq 0x3120
movl %eax, %ebp
testb $0x1, 0x3(%rbx)
jne 0x2ba61
leaq 0x1425d(%rip), %rdi     # 0x3fd06
xorl %eax, %eax
callq 0x3120
addl %eax, %ebp
jmp 0x2ba61