// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/MIME_headers.c
// Function: MIMEH_parse_contenttype
int MIMEH_parse_contenttype( char *header_name, char *header_value, struct MIMEH_header_info *hinfo )
{

    int return_value;
    char *p, *q;
    char *hv = strdup( header_value );

    // CONTENT TYPE -------------------------------
    // CONTENT TYPE -------------------------------
    // CONTENT TYPE -------------------------------

    DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Start",FL);

    p = strstr(header_name,"content-type");
    if (p != NULL)
    {
        DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype: Content-type string found in header-name",FL);

        /** 20041216-1106:PLD: Increase our sanity **/
        hinfo->sanity++;
        PLD_strlower(  header_value );
        PLD_strlower(  header_value );
        q = header_value;

        if (strstr(q,"multipart/appledouble")) hinfo->content_type = _CTYPE_MULTIPART_APPLEDOUBLE;
        else if (strstr(q,"multipart/signed")) hinfo->content_type = _CTYPE_MULTIPART_SIGNED;
        else if (strstr(q,"multipart/related")) hinfo->content_type = _CTYPE_MULTIPART_RELATED;
        else if (strstr(q,"multipart/mixed")) hinfo->content_type = _CTYPE_MULTIPART_MIXED;
        else if (strstr(q,"multipart/alternative")) hinfo->content_type = _CTYPE_MULTIPART_ALTERNATIVE;
        else if (strstr(q,"multipart/report")) hinfo->content_type = _CTYPE_MULTIPART_REPORT;
        else if (strstr(q,"multipart/")) hinfo->content_type = _CTYPE_MULTIPART;
        else if (strstr(q,"text/calendar")) hinfo->content_type = _CTYPE_TEXT_CALENDAR;
        else if (strstr(q,"text/plain")) hinfo->content_type = _CTYPE_TEXT_PLAIN;
        else if (strstr(q,"text/html")) hinfo->content_type = _CTYPE_TEXT_HTML;
        else if (strstr(q,"text/")) hinfo->content_type = _CTYPE_TEXT;
        else if (strstr(q,"image/gif")) hinfo->content_type = _CTYPE_IMAGE_GIF;
        else if (strstr(q,"image/jpeg")) hinfo->content_type = _CTYPE_IMAGE_JPEG;
        else if (strstr(q,"image/")) hinfo->content_type = _CTYPE_IMAGE;
        else if (strstr(q,"audio/")) hinfo->content_type = _CTYPE_AUDIO;
        else if (strstr(q,"message/rfc822")) hinfo->content_type = _CTYPE_RFC822;
        else if (strstr(q,"/octet-stream")) hinfo->content_type = _CTYPE_OCTECT;
        else if (strstr(q,"/ms-tnef")) hinfo->content_type = _CTYPE_TNEF;
        else if (strstr(q,"application/applefile"))
        {
            hinfo->content_type = _CTYPE_APPLICATION_APPLEFILE;
            if ( hinfo->filename[0] == '\0' )
            {
                if (strlen(glb.appledouble_filename)>0)
                {
                    snprintf(hinfo->filename, sizeof(hinfo->filename), "%s.applemeta", glb.appledouble_filename );
                } else {
                    snprintf(hinfo->filename, sizeof(hinfo->filename), "applefile");
                }
            }
        }
        else hinfo->content_type = _CTYPE_UNKNOWN;

        /** Is there an x-mac-type|creator parameter? **/
        if ((strstr(header_value,"x-mac-type="))&&(strstr(header_value,"x-mac-creator=")))
        {
            /** By setting this flag to 1, we are saying that if the
             ** filename contains a forward slash '/' char, then it's
             ** to be treated as a normal char, not a directory
             ** separator.  However, as we cannot generate a filename
             ** with that char normally, we'll convert it to something
             ** else
             **/
            DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Located x-mac attachment",FL);
            hinfo->x_mac = 1;
            FNFILTER_set_mac(hinfo->x_mac);
        }


        // Copy the string to our content-type string storage field
        p = header_value;
        if (p != NULL)
        {
            char *c = p;

            // Step 1 - jump over any whitespace
            while ( *c == ' ' || *c == '\t') c++;

            // Step 2 - Copy the string
            PLD_strncpy( hinfo->content_type_string, c, _MIMEH_CONTENT_TYPE_MAX);

            // Step 3 - clean up the string
            c = hinfo->content_type_string;
            while (*c && *c != ' ' && *c != '\t' && *c != '\n' && *c != '\r' && *c != ';') c++;

            // Step 4 - Terminate the string
            *c = '\0';
        }

        // If we have an additional parameter at the end of our content-type, then we
        //  should search for a name="foobar" sequence.
        //p = strchr( hv, ';' );
        p = strpbrk( hv, ";\t\n\r " );
        if (p != NULL)
        {
            char *param = NULL;
            char *data_end_point = param;

            p++;
            param = strpbrk( p, ";\n\r\t " );
            while ( param != NULL )
            {
                /**
                 **
                 ** The Process of decoding our line....
                 ** . While not end of the line...
                 **     . Remove whitespace
                 **     . test for 'name'
                 **     . test for 'boundary'
                 **     . Move to next char after parameter values
                 **
                 ** Go to the next character after the 'token separator' character
                 ** and then proceed to absorb any excess white space.
                 ** Once we've stopped at a new, non-white character, we can begin
                 ** to see if we've got a sensible parameter like name=, filename=
                 ** or boundary=
                 **/
                param++;
                param = MIMEH_absorb_whitespace(param);

                /**
                 ** If we get to the end of the line, just break out of the token
                 ** parsing while loop
                 **/
                if (*param == '\0') break;

                /**
                 ** Look for name or filename specifications in the headers
                 ** Look for name or filename specifications in the headers
                 ** Look for name or filename specifications in the headers
                 **/

                return_value = MIMEH_parse_header_parameter( hinfo, param, "name", hinfo->name, sizeof(hinfo->name), &data_end_point);
                /** Update param to point where data_end_point is
                 ** this is so when we come around here again due
                 ** to the while loop, we'll know where to pick up
                 ** the search for more parameters
                 **/
                if (data_end_point > param) param = data_end_point;

                // If we finally had success, then copy the name into filename for hinfo
                if ( return_value == 0 )
                {
                    // Move the parameter search point up to where we stopped
                    //      processing the data in the MIMEH_parse_header_parameter() call

                    DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Pushing new filename to stack '%s'",FL, hinfo->name);
                    /** Step 1:  Check to see if this filename already
                     ** exists in the stack.  We do this so that we don't
                     ** duplicate entries and also to prevent false
                     ** bad-header reports. **/
                    if (SS_cmp(&(hinfo->ss_names), hinfo->name, strlen(hinfo->name))==NULL)
                    {
                        DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Filtering '%s'",FL, hinfo->name);
                        FNFILTER_filter(hinfo->name, _MIMEH_FILENAMELEN_MAX);
                        DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Pushing '%s'",FL, hinfo->name);
                        SS_push(&(hinfo->ss_names),hinfo->name,strlen(hinfo->name));
                        if (SS_count(&(hinfo->ss_names)) > 1)
                        {
                            MIMEH_set_defect(hinfo, MIMEH_DEFECT_MULTIPLE_NAMES);
                        }

                        if ( hinfo->filename[0] == '\0' ) {
                            snprintf( hinfo->filename, sizeof(hinfo->filename), "%s", hinfo->name );
                        }
                    } /* If the file name doesn't already exist in the stack */

                } /* If a filename was located in the headers */




                /**
                 ** Look for the MIME Boundary specification in the headers
                 ** Look for the MIME Boundary specification in the headers
                 ** Look for the MIME Boundary specification in the headers
                 **/
                return_value = MIMEH_parse_header_parameter(hinfo, param, "boundary", hinfo->boundary, sizeof(hinfo->boundary), &data_end_point);
                DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Param<=>data_end gap = %d", FL,data_end_point -param);
                DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: param start pos = '%s'",FL, param);
                if (data_end_point > param) param = data_end_point;
                DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: param start pos = '%s'",FL, param);

                if ( return_value == 0 ) {
                    // Move the parameter search point up to where we stopped
                    //      processing the data in the MIMEH_parse_header_parameter() call

                    //hinfo->boundary_located = 1;
                    hinfo->boundary_located++;
                    if (MIMEH_DNORMAL) LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Pushed boundary to stack (%s)",FL, hinfo->boundary);
                    BS_push(hinfo->boundary);
                    if (MIMEH_DNORMAL) LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: Setting hinfo->boundary_located to %d",FL, hinfo->boundary_located );

                    if (hinfo->boundary_located > 1)
                    {
                        // Register the defect
                        MIMEH_set_defect(hinfo, MIMEH_DEFECT_MULTIPLE_BOUNDARIES);

                        //Reset the counter back to 1.
                        hinfo->boundary_located=1;
                    }
                }

                //param = PLD_strtok( &tx, NULL, ";\n\r" );
                // * PLD:20040831-22H15: Added 'if (param != NULL)' prefix to debugging lines
                // * In response to bug #32, submitted by ICL ZA
                if (param != NULL) DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: param start pos = '%s'",FL, param);
                param = strpbrk( param, ";\n\r " );
                if (param != NULL) DMIMEH LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: param start pos = '%s'",FL, param);

            } // While
        }
    }

    if (hv != NULL) free(hv);

    if (MIMEH_DNORMAL) LOGGER_log("%s:%d:MIMEH_parse_contenttype:DEBUG: end.",FL);

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2390
movq %rax, -0x38(%rbp)
cmpl $0x1, 0x25b51(%rip)     # 0x3277c
jl 0xcc47
leaq 0x10966(%rip), %rdi     # 0x1d59a
leaq 0xf833(%rip), %rsi      # 0x1c46e
movl $0x7ae, %edx            # imm = 0x7AE
movb $0x0, %al
callq 0x117c0
movq -0x8(%rbp), %rdi
leaq 0x1093b(%rip), %rsi     # 0x1d58d
callq 0x23b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd604
cmpl $0x1, 0x25b0f(%rip)     # 0x3277c
jl 0xcc89
leaq 0x1094f(%rip), %rdi     # 0x1d5c5
leaq 0xf7f1(%rip), %rsi      # 0x1c46e
movl $0x7b3, %edx            # imm = 0x7B3
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rax
movl 0x18d30(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18d30(%rax)
movq -0x10(%rbp), %rdi
callq 0x105f0
movq -0x10(%rbp), %rdi
callq 0x105f0
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x1094c(%rip), %rsi     # 0x1d60d
callq 0x23b0
cmpq $0x0, %rax
je 0xccdf
movq -0x18(%rbp), %rax
movl $0x66, 0x27f8(%rax)
jmp 0xd064
movq -0x30(%rbp), %rdi
leaq 0x10939(%rip), %rsi     # 0x1d623
callq 0x23b0
cmpq $0x0, %rax
je 0xcd08
movq -0x18(%rbp), %rax
movl $0x6a, 0x27f8(%rax)
jmp 0xd062
movq -0x30(%rbp), %rdi
leaq 0x10921(%rip), %rsi     # 0x1d634
callq 0x23b0
cmpq $0x0, %rax
je 0xcd31
movq -0x18(%rbp), %rax
movl $0x67, 0x27f8(%rax)
jmp 0xd060
movq -0x30(%rbp), %rdi
leaq 0x1090a(%rip), %rsi     # 0x1d646
callq 0x23b0
cmpq $0x0, %rax
je 0xcd5a
movq -0x18(%rbp), %rax
movl $0x65, 0x27f8(%rax)
jmp 0xd05e
movq -0x30(%rbp), %rdi
leaq 0x108f1(%rip), %rsi     # 0x1d656
callq 0x23b0
cmpq $0x0, %rax
je 0xcd83
movq -0x18(%rbp), %rax
movl $0x68, 0x27f8(%rax)
jmp 0xd05c
movq -0x30(%rbp), %rdi
leaq 0x108de(%rip), %rsi     # 0x1d66c
callq 0x23b0
cmpq $0x0, %rax
je 0xcdac
movq -0x18(%rbp), %rax
movl $0x69, 0x27f8(%rax)
jmp 0xd05a
movq -0x30(%rbp), %rdi
leaq 0x108c6(%rip), %rsi     # 0x1d67d
callq 0x23b0
cmpq $0x0, %rax
je 0xcdd5
movq -0x18(%rbp), %rax
movl $0x64, 0x27f8(%rax)
jmp 0xd058
movq -0x30(%rbp), %rdi
leaq 0x108a8(%rip), %rsi     # 0x1d688
callq 0x23b0
cmpq $0x0, %rax
je 0xcdfe
movq -0x18(%rbp), %rax
movl $0xcc, 0x27f8(%rax)
jmp 0xd056
movq -0x30(%rbp), %rdi
leaq 0x1088d(%rip), %rsi     # 0x1d696
callq 0x23b0
cmpq $0x0, %rax
je 0xce27
movq -0x18(%rbp), %rax
movl $0xc9, 0x27f8(%rax)
jmp 0xd054
movq -0x30(%rbp), %rdi
leaq 0x1086f(%rip), %rsi     # 0x1d6a1
callq 0x23b0
cmpq $0x0, %rax
je 0xce50
movq -0x18(%rbp), %rax
movl $0xcb, 0x27f8(%rax)
jmp 0xd052
movq -0x30(%rbp), %rdi
leaq 0x10850(%rip), %rsi     # 0x1d6ab
callq 0x23b0
cmpq $0x0, %rax
je 0xce79
movq -0x18(%rbp), %rax
movl $0xc8, 0x27f8(%rax)
jmp 0xd050
movq -0x30(%rbp), %rdi
leaq 0x1082d(%rip), %rsi     # 0x1d6b1
callq 0x23b0
cmpq $0x0, %rax
je 0xcea2
movq -0x18(%rbp), %rax
movl $0x12d, 0x27f8(%rax)    # imm = 0x12D
jmp 0xd04e
movq -0x30(%rbp), %rdi
leaq 0x1080e(%rip), %rsi     # 0x1d6bb
callq 0x23b0
cmpq $0x0, %rax
je 0xcecb
movq -0x18(%rbp), %rax
movl $0x12e, 0x27f8(%rax)    # imm = 0x12E
jmp 0xd04c
movq -0x30(%rbp), %rdi
leaq 0x107f0(%rip), %rsi     # 0x1d6c6
callq 0x23b0
cmpq $0x0, %rax
je 0xcef4
movq -0x18(%rbp), %rax
movl $0x12c, 0x27f8(%rax)    # imm = 0x12C
jmp 0xd04a
movq -0x30(%rbp), %rdi
leaq 0x107ce(%rip), %rsi     # 0x1d6cd
callq 0x23b0
cmpq $0x0, %rax
je 0xcf1d
movq -0x18(%rbp), %rax
movl $0x190, 0x27f8(%rax)    # imm = 0x190
jmp 0xd048
movq -0x30(%rbp), %rdi
leaq 0x107ac(%rip), %rsi     # 0x1d6d4
callq 0x23b0
cmpq $0x0, %rax
je 0xcf46
movq -0x18(%rbp), %rax
movl $0x1f4, 0x27f8(%rax)    # imm = 0x1F4
jmp 0xd046
movq -0x30(%rbp), %rdi
leaq 0x10792(%rip), %rsi     # 0x1d6e3
callq 0x23b0
cmpq $0x0, %rax
je 0xcf6f
movq -0x18(%rbp), %rax
movl $0x320, 0x27f8(%rax)    # imm = 0x320
jmp 0xd044
movq -0x30(%rbp), %rdi
leaq 0x10777(%rip), %rsi     # 0x1d6f1
callq 0x23b0
cmpq $0x0, %rax
je 0xcf98
movq -0x18(%rbp), %rax
movl $0x258, 0x27f8(%rax)    # imm = 0x258
jmp 0xd042
movq -0x30(%rbp), %rdi
leaq 0x10757(%rip), %rsi     # 0x1d6fa
callq 0x23b0
cmpq $0x0, %rax
je 0xd032
movq -0x18(%rbp), %rax
movl $0x2bd, 0x27f8(%rax)    # imm = 0x2BD
movq -0x18(%rbp), %rax
movsbl 0x5efd(%rax), %eax
cmpl $0x0, %eax
jne 0xd030
leaq 0x20798(%rip), %rdi     # 0x2d76f
callq 0x2100
cmpq $0x0, %rax
jbe 0xd010
movq -0x18(%rbp), %rdi
addq $0x5efd, %rdi           # imm = 0x5EFD
movl $0x1001, %esi           # imm = 0x1001
leaq 0x10717(%rip), %rdx     # 0x1d710
leaq 0x1df70(%rip), %rcx     # 0x2af70
addq $0x27ff, %rcx           # imm = 0x27FF
movb $0x0, %al
callq 0x2130
jmp 0xd02e
movq -0x18(%rbp), %rdi
addq $0x5efd, %rdi           # imm = 0x5EFD
movl $0x1001, %esi           # imm = 0x1001
leaq 0x106df(%rip), %rdx     # 0x1d706
movb $0x0, %al
callq 0x2130
jmp 0xd030
jmp 0xd040
movq -0x18(%rbp), %rax
movl $0x0, 0x27f8(%rax)
jmp 0xd042
jmp 0xd044
jmp 0xd046
jmp 0xd048
jmp 0xd04a
jmp 0xd04c
jmp 0xd04e
jmp 0xd050
jmp 0xd052
jmp 0xd054
jmp 0xd056
jmp 0xd058
jmp 0xd05a
jmp 0xd05c
jmp 0xd05e
jmp 0xd060
jmp 0xd062
jmp 0xd064
movq -0x10(%rbp), %rdi
leaq 0x106ae(%rip), %rsi     # 0x1d71d
callq 0x23b0
cmpq $0x0, %rax
je 0xd0d0
movq -0x10(%rbp), %rdi
leaq 0x106a4(%rip), %rsi     # 0x1d729
callq 0x23b0
cmpq $0x0, %rax
je 0xd0d0
cmpl $0x1, 0x256e5(%rip)     # 0x3277c
jl 0xd0b3
leaq 0x10698(%rip), %rdi     # 0x1d738
leaq 0xf3c7(%rip), %rsi      # 0x1c46e
movl $0x7e6, %edx            # imm = 0x7E6
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rax
movl $0x1, 0x18d2c(%rax)
movq -0x18(%rbp), %rax
movl 0x18d2c(%rax), %edi
callq 0x14290
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd1cd
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x51(%rbp)
je 0xd10c
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xd115
jmp 0xd123
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xd0eb
movq -0x18(%rbp), %rdi
addq $0x27fc, %rdi           # imm = 0x27FC
movq -0x40(%rbp), %rsi
movl $0x500, %edx            # imm = 0x500
callq 0x10640
movq -0x18(%rbp), %rax
addq $0x27fc, %rax           # imm = 0x27FC
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x52(%rbp)
je 0xd1af
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x52(%rbp)
je 0xd1af
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x9, %ecx
movb %al, -0x52(%rbp)
je 0xd1af
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x52(%rbp)
je 0xd1af
movq -0x40(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xd, %ecx
movb %al, -0x52(%rbp)
je 0xd1af
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3b, %eax
setne %al
movb %al, -0x52(%rbp)
movb -0x52(%rbp), %al
testb $0x1, %al
jne 0xd1b8
jmp 0xd1c6
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xd14a
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rdi
leaq 0xff90(%rip), %rsi      # 0x1d168
callq 0x22e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd602
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x10563(%rip), %rsi     # 0x1d776
callq 0x22e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xd600
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xab00
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xd251
jmp 0xd600
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rcx
addq $0x6efe, %rcx           # imm = 0x6EFE
leaq 0x1039d(%rip), %rdx     # 0x1d608
movl $0x27f7, %r8d           # imm = 0x27F7
leaq -0x50(%rbp), %r9
callq 0xc2d0
movl %eax, -0x1c(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0xd28f
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xd41a
cmpl $0x1, 0x254dc(%rip)     # 0x3277c
jl 0xd2c7
movq -0x18(%rbp), %rcx
addq $0x6efe, %rcx           # imm = 0x6EFE
leaq 0x104c8(%rip), %rdi     # 0x1d77c
leaq 0xf1b3(%rip), %rsi      # 0x1c46e
movl $0x839, %edx            # imm = 0x839
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rax
addq $0x162e0, %rax          # imm = 0x162E0
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
addq $0x6efe, %rax           # imm = 0x6EFE
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
addq $0x6efe, %rdi           # imm = 0x6EFE
callq 0x2100
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq %rax, %rdx
callq 0x3ad0
cmpq $0x0, %rax
jne 0xd418
cmpl $0x1, 0x25468(%rip)     # 0x3277c
jl 0xd33b
movq -0x18(%rbp), %rcx
addq $0x6efe, %rcx           # imm = 0x6EFE
leaq 0x1049c(%rip), %rdi     # 0x1d7c4
leaq 0xf13f(%rip), %rsi      # 0x1c46e
movl $0x840, %edx            # imm = 0x840
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rdi
addq $0x6efe, %rdi           # imm = 0x6EFE
movl $0x1000, %esi           # imm = 0x1000
callq 0x144e0
cmpl $0x1, 0x25425(%rip)     # 0x3277c
jl 0xd37e
movq -0x18(%rbp), %rcx
addq $0x6efe, %rcx           # imm = 0x6EFE
leaq 0x1048d(%rip), %rdi     # 0x1d7f8
leaq 0xf0fc(%rip), %rsi      # 0x1c46e
movl $0x842, %edx            # imm = 0x842
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rax
addq $0x162e0, %rax          # imm = 0x162E0
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
addq $0x6efe, %rax           # imm = 0x6EFE
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
addq $0x6efe, %rdi           # imm = 0x6EFE
callq 0x2100
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq %rax, %rdx
callq 0x38e0
movq -0x18(%rbp), %rdi
addq $0x162e0, %rdi          # imm = 0x162E0
callq 0x3ab0
cmpl $0x1, %eax
jle 0xd3dd
movq -0x18(%rbp), %rdi
movl $0x9, %esi
callq 0xa610
movq -0x18(%rbp), %rax
movsbl 0x5efd(%rax), %eax
cmpl $0x0, %eax
jne 0xd416
movq -0x18(%rbp), %rdi
addq $0x5efd, %rdi           # imm = 0x5EFD
movq -0x18(%rbp), %rcx
addq $0x6efe, %rcx           # imm = 0x6EFE
movl $0x1001, %esi           # imm = 0x1001
leaq 0x11b9b(%rip), %rdx     # 0x1efaa
movb $0x0, %al
callq 0x2130
jmp 0xd418
jmp 0xd41a
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rcx
addq $0x31fe, %rcx           # imm = 0x31FE
leaq 0xca22(%rip), %rdx      # 0x19e56
movl $0x27f7, %r8d           # imm = 0x27F7
leaq -0x50(%rbp), %r9
callq 0xc2d0
movl %eax, -0x1c(%rbp)
cmpl $0x1, 0x2532f(%rip)     # 0x3277c
jl 0xd474
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
subq %rax, %rcx
leaq 0x103c9(%rip), %rdi     # 0x1d82a
leaq 0xf006(%rip), %rsi      # 0x1c46e
movl $0x859, %edx            # imm = 0x859
movb $0x0, %al
callq 0x117c0
cmpl $0x1, 0x25301(%rip)     # 0x3277c
jl 0xd49b
movq -0x48(%rbp), %rcx
leaq 0x103e1(%rip), %rdi     # 0x1d869
leaq 0xefdf(%rip), %rsi      # 0x1c46e
movl $0x85a, %edx            # imm = 0x85A
movb $0x0, %al
callq 0x117c0
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jbe 0xd4ad
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x1, 0x252c8(%rip)     # 0x3277c
jl 0xd4d4
movq -0x48(%rbp), %rcx
leaq 0x103a8(%rip), %rdi     # 0x1d869
leaq 0xefa6(%rip), %rsi      # 0x1c46e
movl $0x85c, %edx            # imm = 0x85C
movb $0x0, %al
callq 0x117c0
cmpl $0x0, -0x1c(%rbp)
jne 0xd587
movq -0x18(%rbp), %rax
movl 0x59f8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x59f8(%rax)
cmpl $0x1, 0x25284(%rip)     # 0x3277c
jl 0xd51f
movq -0x18(%rbp), %rcx
addq $0x31fe, %rcx           # imm = 0x31FE
leaq 0x10399(%rip), %rdi     # 0x1d8a5
leaq 0xef5b(%rip), %rsi      # 0x1c46e
movl $0x864, %edx            # imm = 0x864
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rdi
addq $0x31fe, %rdi           # imm = 0x31FE
callq 0x12910
cmpl $0x1, 0x25246(%rip)     # 0x3277c
jl 0xd55c
movq -0x18(%rbp), %rax
movl 0x59f8(%rax), %ecx
leaq 0x1039f(%rip), %rdi     # 0x1d8e8
leaq 0xef1e(%rip), %rsi      # 0x1c46e
movl $0x866, %edx            # imm = 0x866
movb $0x0, %al
callq 0x117c0
movq -0x18(%rbp), %rax
cmpl $0x1, 0x59f8(%rax)
jle 0xd585
movq -0x18(%rbp), %rdi
movl $0x5, %esi
callq 0xa610
movq -0x18(%rbp), %rax
movl $0x1, 0x59f8(%rax)
jmp 0xd587
cmpq $0x0, -0x48(%rbp)
je 0xd5b7
cmpl $0x1, 0x251e7(%rip)     # 0x3277c
jl 0xd5b5
movq -0x48(%rbp), %rcx
leaq 0x102c7(%rip), %rdi     # 0x1d869
leaq 0xeec5(%rip), %rsi      # 0x1c46e
movl $0x875, %edx            # imm = 0x875
movb $0x0, %al
callq 0x117c0
jmp 0xd5b7
movq -0x48(%rbp), %rdi
leaq 0x10371(%rip), %rsi     # 0x1d933
callq 0x22e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xd5fb
cmpl $0x1, 0x251a3(%rip)     # 0x3277c
jl 0xd5f9
movq -0x48(%rbp), %rcx
leaq 0x10283(%rip), %rdi     # 0x1d869
leaq 0xee81(%rip), %rsi      # 0x1c46e
movl $0x877, %edx            # imm = 0x877
movb $0x0, %al
callq 0x117c0
jmp 0xd5fb
jmp 0xd21c
jmp 0xd602
jmp 0xd604
cmpq $0x0, -0x38(%rbp)
je 0xd614
movq -0x38(%rbp), %rdi
callq 0x2030
cmpl $0x1, 0x25161(%rip)     # 0x3277c
jl 0xd637
leaq 0x10314(%rip), %rdi     # 0x1d938
leaq 0xee43(%rip), %rsi      # 0x1c46e
movl $0x87f, %edx            # imm = 0x87F
movb $0x0, %al
callq 0x117c0
xorl %eax, %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)