// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x23b0
movq %rax, %r12
cmpl $0x0, 0x21dd3(%rip)     # 0x2b38c
jle 0x95d5
leaq 0xbe48(%rip), %rdi      # 0x1540a
leaq 0xad15(%rip), %rsi      # 0x142de
movl $0x7ae, %edx            # imm = 0x7AE
xorl %eax, %eax
callq 0xc2a1
leaq 0xbe21(%rip), %rsi      # 0x153fd
movq %r14, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9c90
cmpl $0x0, 0x21d98(%rip)     # 0x2b38c
jle 0x9610
leaq 0xbe38(%rip), %rdi      # 0x15435
leaq 0xacda(%rip), %rsi      # 0x142de
movl $0x7b3, %edx            # imm = 0x7B3
xorl %eax, %eax
callq 0xc2a1
incl 0x18d30(%rbx)
movq %r15, %rdi
callq 0xba23
movq %r15, %rdi
callq 0xba23
leaq 0xbe50(%rip), %rsi      # 0x1547d
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9649
movl $0x66, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbe43(%rip), %rsi      # 0x15493
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x966c
movl $0x6a, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbe31(%rip), %rsi      # 0x154a4
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x968f
movl $0x67, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbe20(%rip), %rsi      # 0x154b6
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x96b2
movl $0x65, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbe0d(%rip), %rsi      # 0x154c6
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x96d5
movl $0x68, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbe00(%rip), %rsi      # 0x154dc
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x96f8
movl $0x69, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbdee(%rip), %rsi      # 0x154ed
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x971b
movl $0x64, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbdd6(%rip), %rsi      # 0x154f8
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x973e
movl $0xcc, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbdc1(%rip), %rsi      # 0x15506
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9761
movl $0xc9, 0x27f8(%rbx)
jmp 0x9898
leaq 0xbda9(%rip), %rsi      # 0x15511
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9784
movl $0xcb, 0x27f8(%rbx)
jmp 0x9898
movq %r12, %r14
leaq 0xbd8d(%rip), %rsi      # 0x1551b
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x97aa
movl $0xc8, 0x27f8(%rbx)
jmp 0x9895
leaq 0xbd70(%rip), %rsi      # 0x15521
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x97cd
movl $0x12d, 0x27f8(%rbx)    # imm = 0x12D
jmp 0x9895
leaq 0xbd57(%rip), %rsi      # 0x1552b
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x97f0
movl $0x12e, 0x27f8(%rbx)    # imm = 0x12E
jmp 0x9895
leaq 0xbd3f(%rip), %rsi      # 0x15536
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9813
movl $0x12c, 0x27f8(%rbx)    # imm = 0x12C
jmp 0x9895
leaq 0xbd23(%rip), %rsi      # 0x1553d
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9833
movl $0x190, 0x27f8(%rbx)    # imm = 0x190
jmp 0x9895
leaq 0xbd0a(%rip), %rsi      # 0x15544
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9853
movl $0x1f4, 0x27f8(%rbx)    # imm = 0x1F4
jmp 0x9895
leaq 0xbcf9(%rip), %rsi      # 0x15553
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9873
movl $0x320, 0x27f8(%rbx)    # imm = 0x320
jmp 0x9895
leaq 0xbce7(%rip), %rsi      # 0x15561
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9ccc
movl $0x258, 0x27f8(%rbx)    # imm = 0x258
movq %r14, %r12
leaq 0xbcee(%rip), %rsi      # 0x1558d
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x98f5
leaq 0xbce6(%rip), %rsi      # 0x15599
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x98f5
cmpl $0x0, 0x21ac5(%rip)     # 0x2b38c
jle 0x98e3
leaq 0xbcd8(%rip), %rdi      # 0x155a8
leaq 0xaa07(%rip), %rsi      # 0x142de
movl $0x7e6, %edx            # imm = 0x7E6
xorl %eax, %eax
callq 0xc2a1
movl $0x1, 0x18d2c(%rbx)
pushq $0x1
popq %rdi
callq 0xde14
testq %r15, %r15
je 0x9947
movzbl (%r15), %eax
cmpl $0x20, %eax
je 0x9908
cmpl $0x9, %eax
jne 0x990d
incq %r15
jmp 0x98fa
leaq 0x27fc(%rbx), %r14
movl $0x500, %edx            # imm = 0x500
movq %r14, %rdi
movq %r15, %rsi
callq 0xba3e
movabsq $0x800000100002601, %rax # imm = 0x800000100002601
movzbl (%r14), %ecx
cmpq $0x3b, %rcx
ja 0x993e
btq %rcx, %rax
jb 0x9943
incq %r14
jmp 0x992e
movb $0x0, (%r14)
leaq 0xb68a(%rip), %rsi      # 0x14fd8
movq %r12, %rdi
callq 0x2300
testq %rax, %rax
je 0x9c90
movq %r12, 0x20(%rsp)
movq %rsp, %rcx
andq $0x0, (%rcx)
incq %rax
leaq 0xbc71(%rip), %rsi      # 0x155e6
movq %rax, %rdi
callq 0x2300
movq %rax, %r15
leaq 0x6efe(%rbx), %r12
leaq 0x162e0(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x5efd(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x31fe(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0xa92c(%rip), %rbp      # 0x142de
testq %r15, %r15
je 0x9c8b
incq %r15
movq %r15, %rdi
callq 0x801e
cmpb $0x0, (%rax)
je 0x9c8b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
leaq 0xba99(%rip), %rdx      # 0x15478
movq %r12, %rcx
movl $0x27f7, %r8d           # imm = 0x27F7
movq %rsp, %r9
callq 0x9073
movq (%rsp), %r13
cmpq %r14, %r13
ja 0x99fc
movq %r14, %r13
testl %eax, %eax
movq 0x8(%rsp), %r14
jne 0x9afa
cmpl $0x0, 0x2197c(%rip)     # 0x2b38c
jle 0x9a2b
leaq 0xbbd3(%rip), %rdi      # 0x155ec
movq %rbp, %rsi
movl $0x839, %edx            # imm = 0x839
movq %r12, %rcx
xorl %eax, %eax
callq 0xc2a1
movq %r12, %rdi
callq 0x2110
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x32d1
testq %rax, %rax
jne 0x9afa
cmpl $0x0, 0x21939(%rip)     # 0x2b38c
jle 0x9a6e
leaq 0xbbd8(%rip), %rdi      # 0x15634
movq %rbp, %rsi
movl $0x840, %edx            # imm = 0x840
movq %r12, %rcx
xorl %eax, %eax
callq 0xc2a1
movq %r12, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0xdf02
cmpl $0x0, 0x2190a(%rip)     # 0x2b38c
jle 0x9a9d
leaq 0xbbdd(%rip), %rdi      # 0x15668
movq %rbp, %rsi
movl $0x842, %edx            # imm = 0x842
movq %r12, %rcx
xorl %eax, %eax
callq 0xc2a1
movq %r12, %rdi
callq 0x2110
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x31c2
movq %r14, %rdi
callq 0x32cd
cmpl $0x2, %eax
jl 0x9ad0
movq %rbx, %rdi
pushq $0x9
popq %rsi
callq 0x7d08
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
movq 0x8(%rsp), %r14
jne 0x9afa
movl $0x1001, %esi           # imm = 0x1001
movq 0x10(%rsp), %rdi
leaq 0xd570(%rip), %rdx      # 0x17060
movq %r12, %rcx
xorl %eax, %eax
callq 0x2140
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x84af(%rip), %rdx      # 0x11fb6
movq %r14, %rcx
movl $0x27f7, %r8d           # imm = 0x27F7
movq %rsp, %r9
callq 0x9073
movl %eax, %r14d
cmpl $0x0, 0x2186a(%rip)     # 0x2b38c
movq (%rsp), %r15
jle 0x9b92
movq %r15, %rcx
subq %r13, %rcx
leaq 0xbb65(%rip), %rdi      # 0x1569a
movq %rbp, %rsi
movl $0x859, %edx            # imm = 0x859
xorl %eax, %eax
callq 0xc2a1
cmpl $0x0, 0x21841(%rip)     # 0x2b38c
jle 0x9b92
leaq 0xbb85(%rip), %rdi      # 0x156d9
movq %rbp, %rsi
movl $0x85a, %edx            # imm = 0x85A
movq %r13, %rcx
xorl %eax, %eax
callq 0xc2a1
cmpq %r13, %r15
ja 0x9b6e
movq %r13, %r15
cmpl $0x0, 0x21817(%rip)     # 0x2b38c
jle 0x9b9a
leaq 0xbb5b(%rip), %rdi      # 0x156d9
movq %rbp, %rsi
movl $0x85c, %edx            # imm = 0x85C
movq %r15, %rcx
xorl %eax, %eax
callq 0xc2a1
jmp 0x9b9a
cmpq %r13, %r15
ja 0x9b9a
movq %r13, %r15
testl %r14d, %r14d
jne 0x9c17
incl 0x59f8(%rbx)
cmpl $0x0, 0x217e0(%rip)     # 0x2b38c
movq 0x8(%rsp), %r14
jle 0x9bcc
leaq 0xbb5b(%rip), %rdi      # 0x15715
movq %rbp, %rsi
movl $0x864, %edx            # imm = 0x864
movq %r14, %rcx
xorl %eax, %eax
callq 0xc2a1
movq %r14, %rdi
callq 0xccb7
cmpl $0x0, 0x217b1(%rip)     # 0x2b38c
jle 0x9bf9
movl 0x59f8(%rbx), %ecx
leaq 0xbb6e(%rip), %rdi      # 0x15758
movq %rbp, %rsi
movl $0x866, %edx            # imm = 0x866
xorl %eax, %eax
callq 0xc2a1
cmpl $0x2, 0x59f8(%rbx)
jl 0x9c17
movq %rbx, %rdi
pushq $0x5
popq %rsi
callq 0x7d08
movl $0x1, 0x59f8(%rbx)
cmpl $0x0, 0x2176e(%rip)     # 0x2b38c
jle 0x9c46
leaq 0xbab2(%rip), %rdi      # 0x156d9
movq %rbp, %rsi
movl $0x875, %edx            # imm = 0x875
movq %r15, %rcx
xorl %eax, %eax
callq 0xc2a1
cmpl $0x0, 0x2174c(%rip)     # 0x2b38c
setg %r14b
jmp 0x9c49
xorl %r14d, %r14d
movq %r15, %rdi
leaq 0xbb50(%rip), %rsi      # 0x157a3
callq 0x2300
movq %rax, %r15
testq %rax, %rax
je 0x99b2
testb %r14b, %r14b
je 0x99b2
leaq 0xba65(%rip), %rdi      # 0x156d9
movq %rbp, %rsi
movl $0x877, %edx            # imm = 0x877
movq %r15, %rcx
xorl %eax, %eax
callq 0xc2a1
jmp 0x99b2
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x2030
cmpl $0x0, 0x216ed(%rip)     # 0x2b38c
jle 0x9cbb
leaq 0xbb00(%rip), %rdi      # 0x157a8
leaq 0xa62f(%rip), %rsi      # 0x142de
movl $0x87f, %edx            # imm = 0x87F
xorl %eax, %eax
callq 0xc2a1
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb897(%rip), %rsi      # 0x1556a
movq %r15, %rdi
callq 0x23d0
testq %rax, %rax
je 0x9d29
movl $0x2bd, 0x27f8(%rbx)    # imm = 0x2BD
cmpb $0x0, 0x5efd(%rbx)
movq %r14, %r12
jne 0x9898
leaq 0x5efd(%rbx), %rdi
cmpb $0x0, 0x1c677(%rip)     # 0x2637f
je 0x9d35
leaq 0xb86f(%rip), %rdx      # 0x15580
leaq 0x1c667(%rip), %rcx     # 0x2637f
movl $0x1001, %esi           # imm = 0x1001
xorl %eax, %eax
callq 0x2140
jmp 0x9895
andl $0x0, 0x27f8(%rbx)
jmp 0x9895
movabsq $0x6c6966656c707061, %rax # imm = 0x6C6966656C707061
movq %rax, (%rdi)
movw $0x65, 0x8(%rdi)
jmp 0x9895