// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x23a0
movq %rax, %r12
cmpl $0x0, 0x22b91(%rip)     # 0x2c38c
jle 0x9817
leaq 0xcc06(%rip), %rdi      # 0x1640a
leaq 0xbad3(%rip), %rsi      # 0x152de
movl $0x7ae, %edx            # imm = 0x7AE
xorl %eax, %eax
callq 0xc84f
leaq 0xcbdf(%rip), %rsi      # 0x163fd
movq %rbx, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9f4b
cmpl $0x0, 0x22b56(%rip)     # 0x2c38c
jle 0x9852
leaq 0xcbf6(%rip), %rdi      # 0x16435
leaq 0xba98(%rip), %rsi      # 0x152de
movl $0x7b3, %edx            # imm = 0x7B3
xorl %eax, %eax
callq 0xc84f
incl 0x18d30(%r14)
movq %r15, %rdi
callq 0xbeb9
movq %r15, %rdi
callq 0xbeb9
leaq 0xcc0d(%rip), %rsi      # 0x1647d
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
movq %r14, (%rsp)
je 0x9891
movl $0x66, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcbfb(%rip), %rsi      # 0x16493
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x98b5
movl $0x6a, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcbe8(%rip), %rsi      # 0x164a4
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x98d9
movl $0x67, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcbd6(%rip), %rsi      # 0x164b6
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x98fd
movl $0x65, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcbc2(%rip), %rsi      # 0x164c6
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9921
movl $0x68, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcbb4(%rip), %rsi      # 0x164dc
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9945
movl $0x69, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcba1(%rip), %rsi      # 0x164ed
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9969
movl $0x64, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcb88(%rip), %rsi      # 0x164f8
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x998d
movl $0xcc, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcb72(%rip), %rsi      # 0x16506
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x99b1
movl $0xc9, 0x27f8(%r14)
jmp 0x9b11
leaq 0xcb59(%rip), %rsi      # 0x16511
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x99d5
movl $0xcb, 0x27f8(%r14)
jmp 0x9b11
movq %r12, %rbx
leaq 0xcb3c(%rip), %rsi      # 0x1651b
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9a00
movq (%rsp), %r14
movl $0xc8, 0x27f8(%r14)
jmp 0x9b0e
leaq 0xcb1a(%rip), %rsi      # 0x16521
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9a28
movq (%rsp), %r14
movl $0x12d, 0x27f8(%r14) # imm = 0x12D
jmp 0x9b0e
leaq 0xcafc(%rip), %rsi      # 0x1652b
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9a50
movq (%rsp), %r14
movl $0x12e, 0x27f8(%r14) # imm = 0x12E
jmp 0x9b0e
leaq 0xcadf(%rip), %rsi      # 0x16536
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9a78
movq (%rsp), %r14
movl $0x12c, 0x27f8(%r14) # imm = 0x12C
jmp 0x9b0e
leaq 0xcabe(%rip), %rsi      # 0x1653d
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9a9d
movq (%rsp), %r14
movl $0x190, 0x27f8(%r14) # imm = 0x190
jmp 0x9b0e
leaq 0xcaa0(%rip), %rsi      # 0x16544
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9ac2
movq (%rsp), %r14
movl $0x1f4, 0x27f8(%r14) # imm = 0x1F4
jmp 0x9b0e
leaq 0xca8a(%rip), %rsi      # 0x16553
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9ae7
movq (%rsp), %r14
movl $0x320, 0x27f8(%r14) # imm = 0x320
jmp 0x9b0e
leaq 0xca73(%rip), %rsi      # 0x16561
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9f8c
movq (%rsp), %r14
movl $0x258, 0x27f8(%r14) # imm = 0x258
movq %rbx, %r12
leaq 0xca75(%rip), %rsi      # 0x1658d
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9b71
leaq 0xca6d(%rip), %rsi      # 0x16599
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9b71
cmpl $0x0, 0x2284c(%rip)     # 0x2c38c
jle 0x9b5c
leaq 0xca5f(%rip), %rdi      # 0x165a8
leaq 0xb78e(%rip), %rsi      # 0x152de
movl $0x7e6, %edx            # imm = 0x7E6
xorl %eax, %eax
callq 0xc84f
movl $0x1, 0x18d2c(%r14)
movl $0x1, %edi
callq 0xe473
testq %r15, %r15
je 0x9bc1
movzbl (%r15), %eax
cmpl $0x20, %eax
je 0x9b84
cmpl $0x9, %eax
jne 0x9b89
incq %r15
jmp 0x9b76
leaq 0x27fc(%r14), %rbx
movl $0x500, %edx            # imm = 0x500
movq %rbx, %rdi
movq %r15, %rsi
callq 0xbede
movabsq $0x800000100002601, %rax # imm = 0x800000100002601
movzbl (%rbx), %ecx
cmpq $0x3b, %rcx
ja 0x9bb9
btq %rcx, %rax
jb 0x9bbe
incq %rbx
jmp 0x9baa
movb $0x0, (%rbx)
leaq 0xc410(%rip), %rsi      # 0x15fd8
movq %r12, %rdi
callq 0x22f0
testq %rax, %rax
je 0x9f4b
movq %r12, 0x28(%rsp)
movq $0x0, 0x8(%rsp)
incq %rax
leaq 0xc9f5(%rip), %rsi      # 0x165e6
movq %rax, %rdi
callq 0x22f0
testq %rax, %rax
je 0x9f46
movq %rax, %rbp
leaq 0x6efe(%r14), %r15
leaq 0x162e0(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x5efd(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x31fe(%r14), %r13
leaq 0x8(%rsp), %r12
leaq 0xb6a7(%rip), %rbx      # 0x152de
movq %r15, 0x18(%rsp)
movq %r13, 0x30(%rsp)
movzbl 0x1(%rbp), %eax
incq %rbp
cmpl $0x9, %eax
je 0x9c41
cmpl $0x20, %eax
je 0x9c41
testl %eax, %eax
je 0x9f46
movq %r14, %rdi
movq %rbp, %rsi
leaq 0xc811(%rip), %rdx      # 0x16478
movq %r15, %rcx
movl $0x27f7, %r8d           # imm = 0x27F7
movq %r12, %r9
callq 0x9285
movq 0x8(%rsp), %rcx
cmpq %rbp, %rcx
cmovaq %rcx, %rbp
testl %eax, %eax
jne 0x9d7a
cmpl $0x0, 0x226f9(%rip)     # 0x2c38c
jle 0x9cae
leaq 0xc950(%rip), %rdi      # 0x165ec
movq %rbx, %rsi
movl $0x839, %edx            # imm = 0x839
movq %r15, %rcx
xorl %eax, %eax
callq 0xc84f
movq %r15, %rdi
callq 0x2110
movq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x33fc
testq %rax, %rax
jne 0x9d7a
cmpl $0x0, 0x226b6(%rip)     # 0x2c38c
jle 0x9cf1
leaq 0xc955(%rip), %rdi      # 0x16634
movq %rbx, %rsi
movl $0x840, %edx            # imm = 0x840
movq %r15, %rcx
xorl %eax, %eax
callq 0xc84f
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xe573
cmpl $0x0, 0x22687(%rip)     # 0x2c38c
jle 0x9d20
leaq 0xc95a(%rip), %rdi      # 0x16668
movq %rbx, %rsi
movl $0x842, %edx            # imm = 0x842
movq %r15, %rcx
xorl %eax, %eax
callq 0xc84f
movq %r15, %rdi
callq 0x2110
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32eb
movq %rbx, %rdi
callq 0x33f8
cmpl $0x2, %eax
jl 0x9d55
movq %r14, %rdi
movl $0x9, %esi
callq 0x7f77
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x9d7a
movl $0x1001, %esi           # imm = 0x1001
movq 0x10(%rsp), %rdi
leaq 0xe2f0(%rip), %rdx      # 0x18060
movq %r15, %rcx
xorl %eax, %eax
callq 0x2140
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x922f(%rip), %rdx      # 0x12fb6
movq %r13, %rcx
movl $0x27f7, %r8d           # imm = 0x27F7
movq %r12, %r13
movq %r12, %r9
callq 0x9285
movl %eax, %ebx
cmpl $0x0, 0x225e8(%rip)     # 0x2c38c
movq 0x8(%rsp), %r12
jle 0x9e26
movq %r12, %rcx
subq %rbp, %rcx
leaq 0xc8e2(%rip), %rdi      # 0x1669a
leaq 0xb51f(%rip), %rsi      # 0x152de
movl $0x859, %edx            # imm = 0x859
xorl %eax, %eax
callq 0xc84f
cmpl $0x0, 0x225ba(%rip)     # 0x2c38c
jle 0x9e26
leaq 0xc8fe(%rip), %r14      # 0x166d9
movq %r14, %rdi
leaq 0xb4f9(%rip), %r15      # 0x152de
movq %r15, %rsi
movl $0x85a, %edx            # imm = 0x85A
movq %rbp, %rcx
xorl %eax, %eax
callq 0xc84f
cmpq %rbp, %r12
cmovaq %r12, %rbp
cmpl $0x0, 0x22587(%rip)     # 0x2c38c
jle 0x9e1c
movq %r14, %rdi
movq %r15, %rsi
movl $0x85c, %edx            # imm = 0x85C
movq %rbp, %rcx
xorl %eax, %eax
callq 0xc84f
movq %r13, %r12
movq 0x18(%rsp), %r15
jmp 0x9e30
cmpq %rbp, %r12
cmovaq %r12, %rbp
movq %r13, %r12
testl %ebx, %ebx
movq 0x30(%rsp), %r13
movq (%rsp), %r14
leaq 0xb49c(%rip), %rbx      # 0x152de
jne 0x9ebd
incl 0x59f8(%r14)
cmpl $0x0, 0x2253a(%rip)     # 0x2c38c
jle 0x9e6d
leaq 0xc8ba(%rip), %rdi      # 0x16715
movq %rbx, %rsi
movl $0x864, %edx            # imm = 0x864
movq %r13, %rcx
xorl %eax, %eax
callq 0xc84f
movq %r13, %rdi
callq 0xd2e1
cmpl $0x0, 0x22510(%rip)     # 0x2c38c
jle 0x9e9b
movl 0x59f8(%r14), %ecx
leaq 0xc8cc(%rip), %rdi      # 0x16758
movq %rbx, %rsi
movl $0x866, %edx            # imm = 0x866
xorl %eax, %eax
callq 0xc84f
cmpl $0x2, 0x59f8(%r14)
jl 0x9ebd
movq %r14, %rdi
movl $0x5, %esi
callq 0x7f77
movl $0x1, 0x59f8(%r14)
cmpl $0x0, 0x224c8(%rip)     # 0x2c38c
jle 0x9f22
leaq 0xc80c(%rip), %rdi      # 0x166d9
movq %rbx, %rsi
movl $0x875, %edx            # imm = 0x875
movq %rbp, %rcx
xorl %eax, %eax
callq 0xc84f
movl 0x224a7(%rip), %ebx     # 0x2c38c
movq %rbp, %rdi
leaq 0xc8b4(%rip), %rsi      # 0x167a3
callq 0x22f0
movq %rax, %rbp
testq %rax, %rax
je 0x9f36
testl %ebx, %ebx
jle 0x9f36
leaq 0xc7d2(%rip), %rdi      # 0x166d9
leaq 0xb3d0(%rip), %rbx      # 0x152de
movq %rbx, %rsi
movl $0x877, %edx            # imm = 0x877
movq %rbp, %rcx
xorl %eax, %eax
callq 0xc84f
jmp 0x9f3d
movq %rbp, %rdi
leaq 0xc877(%rip), %rsi      # 0x167a3
callq 0x22f0
movq %rax, %rbp
jmp 0x9f3d
leaq 0xb3a1(%rip), %rbx      # 0x152de
testq %rbp, %rbp
jne 0x9c41
movq 0x28(%rsp), %r12
testq %r12, %r12
je 0x9f58
movq %r12, %rdi
callq 0x2030
cmpl $0x0, 0x2242d(%rip)     # 0x2c38c
jle 0x9f7b
leaq 0xc840(%rip), %rdi      # 0x167a8
leaq 0xb36f(%rip), %rsi      # 0x152de
movl $0x87f, %edx            # imm = 0x87F
xorl %eax, %eax
callq 0xc84f
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc5d7(%rip), %rsi      # 0x1656a
movq %r15, %rdi
callq 0x23c0
testq %rax, %rax
je 0x9fec
movq (%rsp), %r14
movl $0x2bd, 0x27f8(%r14) # imm = 0x2BD
cmpb $0x0, 0x5efd(%r14)
movq %rbx, %r12
jne 0x9b11
leaq 0x5efd(%r14), %rdi
cmpb $0x0, 0x1d3b1(%rip)     # 0x2737f
je 0xa000
leaq 0xc5a9(%rip), %rdx      # 0x16580
leaq 0x1d3a1(%rip), %rcx     # 0x2737f
movl $0x1001, %esi           # imm = 0x1001
xorl %eax, %eax
callq 0x2140
jmp 0xa013
movq (%rsp), %r14
movl $0x0, 0x27f8(%r14)
jmp 0x9b0e
movabsq $0x6c6966656c707061, %rax # imm = 0x6C6966656C707061
movq %rax, (%rdi)
movw $0x65, 0x8(%rdi)
movq %rbx, %r12
movq (%rsp), %r14
jmp 0x9b11