// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: parseheaders
static int parseheaders(msgcontext *ctx, const char **pmsg,
			int *plen, int htype)
{
    const char *line, *vline, *fieldbody, *msg = *pmsg;
    struct headmap *hmap;
    dbinfo db;
    int firstline = 1, mandhead, startline, hflags = 0, hinum, j, pos;
    headinfo hinfo[mischead + 1];
    unsigned char duptab[DUPTABSIZE];

    /* init header info and duplicate table */
    memset(duptab, 0, sizeof (duptab));
    memset(hinfo, 0, sizeof (hinfo));

    /* allocate MIME info, if necessary */
    if (ctx->mcur == ctx->mpart) {
	ctx->mcur = malloc(sizeof (MIMEinfo));
	if (ctx->mcur == NULL) {
	    wprintf(NULL, w_fatal, "out of memory");
	    return (-1);
	}
	memset(ctx->mcur, 0, sizeof (MIMEinfo));
    } else {
	for (j = 0; j < 10; ++j) {
	    if (ctx->mcur->keep[j] != NULL) {
		ctx->mcur->keep[j]->next = msgfree;
		msgfree = ctx->mcur->keep[j];
		ctx->mcur->keep[j] = NULL;
	    }
	}
    }
    ctx->mcur->typenum = text;
    if (ctx->mpart && ctx->mpart->indigest == 1) {
	ctx->mcur->typenum = message;
    }
    ctx->mcur->cte = cte_default;
    ctx->mcur->saw8bit = 0;
    ctx->mcur->saw8char = 0;
    ctx->mcur->csetid = us_ascii;
    ctx->mcur->asciisubset = 0;
    ctx->mcur->cset7bit = 0;
    startline = ctx->lineno;
    db.endline = ctx->lineno;
    for (;;) {

	/* look for a header name */
	line = vline = msg;
	while (isalpha(*msg) || isdigit(*msg) || *msg == '-') {
	    ++msg;
	}
	/* handle end of line */
	if ((*msg == '\n' || *msg == '\r') && msg == line) {
	    ++line, ++ctx->lineno;
	    break;
	}
	/* handle "header   : body" */
	for (j = 0; *msg == ' ' || *msg == '\t'; ++msg, ++j)
	    ;
	if (*msg == '\n' || *msg == '\r') {
	    msg -= j;
	    j = 0;
	}
	hmap = &emptyhead;
	if (*msg == '\0') {
	    wprintf(NULL, w_error, "message ended in middle of header at "
		    "line %d", ctx->lineno);
	    break;
	}
	if (*msg != ':' || msg == line) {
	    wprintf(NULL, w_error, "unexpected character %c"
		    " found in header on line %d", *msg, ctx->lineno);
	} else /* msg == ':' */ {
	    if (j) {
		wprintf(NULL, w_warn, "spaces between header name and "
			"':' unwise on line %d", ctx->lineno);
	    }
	    
	    /* lookup the header name */
	    for (hmap = known_headers; hmap->str != NULL &&
		 (strlen(hmap->str) != msg - line - j ||
		  strncasecmp(hmap->str, line, msg - line - j)); ++hmap)
		;
	    fieldbody = ++msg;
	    hflags |= hmap->flags;
	}
	firstline = 0;

	/* find the end of the header */
	db.startline = ctx->lineno;
	db.headname = line;
	db.headlen = msg - line - j - 1;
	db.flags = 0;
	pos = msg - line;
	while (*msg != '\0') {
	    if (*msg == '\n' || *msg == '\r') {
		if (htype == HEAD_DSN || htype == HEAD_RCPT ||
		    htype == HEAD_MTRKM || htype == HEAD_MTRKR ||
		    htype == HEAD_MDN || htype == HEAD_TEXT) {
		    MD5Update(&ctx->md5, (unsigned char *) vline, msg - vline);
		    MD5Update(&ctx->md5, (unsigned char *) "\r\n", 2);
		}
		if (pos > 80) {
		    wprintf(NULL, w_warn, "line too long in header '%.*s' "
			    "at line %d", fieldbody - line, line, ctx->lineno);
		}
		pos = 0;
		++ctx->lineno;
		if (*msg == '\r' && msg[1] == '\n') ++msg;
		vline = ++msg;
		if (*msg != ' ' && *msg != '\t') {
		    break;
		}
		while (*msg == ' ' || *msg == '\t') ++msg, ++pos;
		if (*msg == '\n' || *msg == '\r') {
		    wprintf(NULL, w_warn, "empty continuation line in "
			    "header '%.*s' at line %d",
			    fieldbody - line, line, ctx->lineno);
		    continue;
		}
	    }
	    ++msg, ++pos;
	}
	db.endline = ctx->lineno - 1;

	/* parse the header */
	if (hmap->type != head_unknown) {
	    if (hmap->type == returnpath && reply_line == NULL) {
		reply_line = fieldbody + 1;
		reply_len = msg - fieldbody - 1;
	    }

	    /* check for duplicate headers */
            hinum = hmap - known_headers;
	    if (duptab[hinum] && (hmap->flags & DUPOK) == 0) {
	    	wprintf(&db, htype == HEAD_DSN || htype == HEAD_RCPT ||
			htype == HEAD_MTRKM || htype == HEAD_MTRKR ||
			htype == HEAD_MDN ? w_error : w_warn,
			"duplicate ");
	    }
	    duptab[hinum] = 1;
	    hinfo[hmap->type].flags = HEAD_PRESENT;
	    hinfo[hmap->type].value = 0;
	    parsehead(ctx, hmap, fieldbody, msg - fieldbody - 1, htype,
	    	hinfo + hmap->type, &db);
	} else if (hmap != &emptyhead) {
	    wprintf(&db, htype == HEAD_DSN || htype == HEAD_RCPT ||
		    htype == HEAD_MTRKM || htype == HEAD_MTRKR ||
		    htype == HEAD_MDN ? w_error : w_unknown,
		    "unknown ");
	}

	/* advance */
	line = msg;
    }
    *plen -= line - *pmsg;
    *pmsg = line;

    /* handle silence */
    if (silent) return (0);
    
    /* check for mandatory headers in header blocks */
    mandhead = 0;
    switch (htype) {
    	case HEAD_MSG:
	    if (hflags & HF_PATH) {
		mandhead = HF_NEWSGROUPS | HF_MID | HF_SUBJECT | HF_DATE |
		    HF_FROM;
		break;
	    }
	    mandhead = HF_DATE | HF_FROM | HF_RETURNPATH;
	    if ((hflags & (HF_TO|HF_CC|HF_BCC)) == 0) {
		wprintf(NULL, w_ok, "None of To, CC, or BCC "
			"fields specified in lines %d-%d - " RFC_TOCCBCC
			" used to require at least one such field",
			startline, db.endline);
	    }
    	    break;
    	    
        case HEAD_DSN:
            mandhead = HF_REPORTMTA;
            break;
            
        case HEAD_RCPT:
            mandhead = HF_ACTION | HF_STATUS | HF_FINALRCPT;
            break;

	case HEAD_MTRKM:
	    mandhead = HF_REPORTMTA | HF_ORIGENVID | HF_ARRIVDATE;
	    break;

	case HEAD_MTRKR:
	    mandhead = HF_ACTION | HF_STATUS | HF_FINALRCPT | HF_ORIGRCPT;
	    break;
        
        case HEAD_INNER:
            if ((hflags & (HF_DATE|HF_FROM|HF_SUBJECT)) == 0) {
                wprintf(NULL, w_error, "At least one of Date, From, Subject "
			"required lines %d-%d (" RFC_MIME_DFS ")",
			startline, db.endline);
            }
            break;

	  case HEAD_EXTB:
	    if ((hflags & HF_CID) == 0) {
		wprintf(NULL, w_error, "Content-ID required lines %d-%d ("
			RFC_EXTB_CID ")", startline, db.endline);
	    }
	    break;
    }
    if (mandhead) for (hmap = known_headers; hmap->str != NULL; ++hmap) {
        if ((hmap->flags & mandhead) != 0 &&
            (hmap->flags & mandhead & hflags) == 0) {
            wprintf(NULL, w_error, "missing mandatory header '%s' lines %d-%d",
            	   hmap->str, startline, db.endline);
        }
    }

    /* check for name content-type param and missing disposition filename */
    if ((hinfo[contenttype].flags & 1) &&
	(hinfo[contentdisp].flags & 1) == 0) {
	wprintf(NULL, w_error, "Content-Type 'name' parameter deprecated in "
		"favor of Content-Disposition 'filename' parameter ("
		RFC_CDISP_FN ") lines %d-%d", startline, db.endline);
    }
    
    /* make sure return-path is empty on a multipart/report */
    if (ctx->mcur->inreport && (hinfo[returnpath].flags & 1)) {
        wprintf(NULL, w_error, "return-path should be empty on "
		"multipart/report lines %d-%d", startline, db.endline);
    }
    
    /* if from multi-valued, sender is mandatory */
    if ((hinfo[fromhead].flags & 1) && !(hflags & HF_SENDER)) {
        wprintf(NULL, w_error, "'Sender' header is mandatory when 'From' is "
		"multi-valued lines %d-%d", startline, db.endline);
    }

    /* if Lines is present, Newsgroups must also be there */
    if (hflags & HF_LINES) {
	if (!(hflags & HF_NEWSGROUPS)) {
	    wprintf(NULL, w_warn, "'Lines' header is not standardized for use "
		    "in email lines %d-%d", startline, db.endline);
	}
	if (htype == HEAD_MSG) {
	    ctx->lines = hinfo[lineshead].value;
	    ctx->endhead = ctx->lineno;
	}
    }
    
    /* save content-transfer-encoding */
    if (hinfo[contentte].value) {
        ctx->mcur->cte = (cteid) hinfo[contentte].value;
        if (ctx->mcur->cte >= quoted_printable &&
            (ctx->mcur->typenum == multipart ||
             (ctx->mcur->typenum == message &&
              tokcomp("rfc822", -1, ctx->mcur->keep[K_SUBTYPE]) == 0))) {
            wprintf(NULL, w_error, "only 7-bit, 8-bit and binary "
		    "content-transfer-encodings are permitted on "
		    "compound media types, line %d", ctx->lineno);
        }
        if (ctx->mcur->cte == cte8bit && ctx->mpart != NULL &&
            ctx->mpart->cte != cte8bit) {
            wprintf(NULL, w_error, "mismatch between inner "
		    "content-transfer-encoding and that of enclosing "
		    "multipart, line %d", ctx->lineno);
        }
    }
    
    /* warn about charset/cte mismatch */
    if (ctx->mcur->typenum == text && ctx->mcur->cte == cte8bit) {
        if (ctx->mcur->csetid == us_ascii) {
	    wprintf(NULL, w_error, "charset 'us-ascii' doesn't match "
		    "content-transfer-encoding line %d", ctx->lineno);
	} else if (ctx->mcur->cset7bit) {
	    wprintf(NULL, w_error, "charset '%t' doesn't match "
		    "content-transfer-encoding line %d",
		    ctx->mcur->keep[K_CHARSET], ctx->lineno);
	}
    }

    /* put multipart on boundary list */
    if (ctx->mcur->typenum == multipart) {
	ctx->mcur->next = ctx->mpart;
	ctx->mpart = ctx->mcur;
    }

    return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %ecx, %r15d
movq %rdx, 0x58(%rsp)
movq %rdi, %r14
movq %rsi, 0x60(%rsp)
movq (%rsi), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x10a(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movq 0x8(%rdi), %rbx
cmpq %rbx, (%rdi)
movq %rdi, (%rsp)
je 0x3c39
movq 0xe11d(%rip), %rcx      # 0x11d20
xorl %eax, %eax
movq (%r14), %rdx
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0x3c27
movq %rcx, (%rsi)
movq (%rdx,%rax,8), %rcx
movq %rcx, 0xe101(%rip)      # 0x11d20
movq $0x0, (%rdx,%rax,8)
incq %rax
cmpq $0xa, %rax
jne 0x3c05
movq (%r14), %rax
movq 0x8(%r14), %rbx
jmp 0x3c54
movl $0x1, %edi
movl $0x88, %esi
callq 0x2110
movq %rax, (%r14)
testq %rax, %rax
je 0x48cc
movl $0x2, 0x74(%rax)
testq %rbx, %rbx
je 0x3c6d
cmpl $0x1, 0x50(%rbx)
jne 0x3c6d
movl $0x7, 0x74(%rax)
xorl %ecx, %ecx
movl %ecx, 0x78(%rax)
movq %rcx, 0x5c(%rax)
movl %ecx, 0x70(%rax)
movq %rcx, 0x68(%rax)
movq (%rsp), %rbx
movl 0x10(%rbx), %eax
leaq 0x18(%rsp), %rcx
movl %eax, 0xc(%rsp)
movl %eax, 0xc(%rcx)
callq 0x2200
movq %rax, 0x80(%rsp)
leaq 0x20(%rbx), %rax
movq %rax, 0x88(%rsp)
cmpl $0x4, %r15d
sete %al
leal -0x2(%r15), %ecx
cmpl $0x8, %ecx
setb %dl
movb $-0x3d, %sil
shrb %cl, %sil
movl %r15d, %ecx
andb %dl, %sil
orb %al, %sil
leaq 0x8496(%rip), %rax      # 0xc166
leaq 0x80ea(%rip), %rdx      # 0xbdc1
cmovneq %rax, %rdx
movq %rdx, 0x70(%rsp)
leaq 0x8487(%rip), %rdx      # 0xc16e
cmovneq %rax, %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, 0x48(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0x68(%rsp)
movl $0x0, 0x8(%rsp)
movq %r15, 0x38(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rdx
xorl %ecx, %ecx
movsbq (%rbp,%rcx), %rax
incq %rcx
cmpq $0x2d, %rax
je 0x3d1c
movzwl (%rdx,%rax,2), %esi
andl $0xc00, %esi            # imm = 0xC00
jne 0x3d1c
movzbl %al, %edx
cmpl $0xd, %edx
je 0x3d44
cmpl $0xa, %edx
jne 0x3d4e
cmpq $0x1, %rcx
je 0x4822
leaq (%rcx,%rbp), %r13
decq %r13
xorl %ebx, %ebx
movzbl %al, %ecx
cmpl $0xc, %ecx
jg 0x3d66
cmpl $0x9, %ecx
je 0x3d6b
jmp 0x3d77
cmpl $0x20, %ecx
jne 0x3d7e
movb 0x1(%r13), %al
incq %r13
incq %rbx
jmp 0x3d57
cmpl $0xa, %ecx
je 0x3d83
jmp 0x3d8c
cmpl $0xd, %ecx
jne 0x3d8c
subq %rbx, %r13
movb (%r13), %al
xorl %ebx, %ebx
cmpb $0x3a, %al
je 0x3da0
movzbl %al, %ecx
testl %ecx, %ecx
jne 0x3e3e
jmp 0x482e
cmpq %rbp, %r13
je 0x3e3e
testl %ebx, %ebx
je 0x3dcb
movq (%rsp), %rax
movl 0x10(%rax), %ecx
xorl %edi, %edi
leaq 0x8004(%rip), %rsi      # 0xbdc1
leaq 0x9855(%rip), %rdx      # 0xd619
xorl %eax, %eax
callq 0x3267
movq 0xd34e(%rip), %r12      # 0x11120
leaq 0xd347(%rip), %r15      # 0x11120
testq %r12, %r12
je 0x3e1c
movl %ebx, %eax
addq %rbp, %rax
movq %r13, %r14
subq %rax, %r14
leaq 0xd330(%rip), %r15      # 0x11120
movq %r12, %rdi
callq 0x20a0
cmpq %r14, %rax
jne 0x3e0f
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x2160
testl %eax, %eax
je 0x3e1c
movq 0x20(%r15), %r12
addq $0x20, %r15
testq %r12, %r12
jne 0x3df0
movq %rbp, %r14
incq %r13
movl 0x8(%rsp), %eax
movq %r15, 0x10(%rsp)
orl 0x18(%r15), %eax
movl %eax, 0x8(%rsp)
movq %r13, 0x40(%rsp)
movq (%rsp), %rbp
jmp 0x3e6f
movq %rbp, %r14
movsbl %al, %ecx
movq (%rsp), %rbp
movl 0x10(%rbp), %r8d
xorl %edi, %edi
leaq 0x8311(%rip), %rsi      # 0xc166
leaq 0x978a(%rip), %rdx      # 0xd5e6
xorl %eax, %eax
callq 0x3267
leaq 0xdc46(%rip), %rax      # 0x11ab0
movq %rax, 0x10(%rsp)
movl 0x10(%rbp), %eax
movl %eax, 0x20(%rsp)
movq %r14, 0x18(%rsp)
movl %r13d, %r15d
subl %r14d, %r15d
notl %ebx
addl %r15d, %ebx
movl %ebx, 0x28(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x40(%rsp), %rax
subq %r14, %rax
movq %rax, 0x50(%rsp)
movq %r14, 0x30(%rsp)
movq 0x38(%rsp), %r12
movzbl (%r13), %eax
cmpl $0xa, %eax
je 0x3ec5
cmpl $0xd, %eax
je 0x3ec5
testl %eax, %eax
jne 0x3f95
jmp 0x3fcb
cmpl $0x9, %r12d
ja 0x3f09
movl $0x35c, %eax            # imm = 0x35C
btl %r12d, %eax
jae 0x3f09
movl %r13d, %edx
subl %r14d, %edx
movq %rbp, %rbx
movq 0x88(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0xa0ab
movq %rbp, %rdi
movq %rbx, %rbp
leaq 0x974f(%rip), %rsi      # 0xd64e
movl $0x2, %edx
callq 0xa0ab
movl 0x10(%rbp), %eax
cmpl $0x51, %r15d
jl 0x3f39
xorl %edi, %edi
leaq 0x7ea6(%rip), %rsi      # 0xbdc1
leaq 0x972f(%rip), %rdx      # 0xd651
movq 0x50(%rsp), %rcx
movq 0x30(%rsp), %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0x3267
movl 0x10(%rbp), %eax
leal 0x1(%rax), %r9d
movl %r9d, 0x10(%rbp)
cmpb $0xd, (%r13)
jne 0x3f55
leaq 0x1(%r13), %rcx
cmpb $0xa, 0x1(%r13)
cmoveq %rcx, %r13
movzbl 0x1(%r13), %ecx
movq %r13, %r14
incq %r14
cmpl $0x20, %ecx
je 0x3f6a
cmpl $0x9, %ecx
jne 0x3fd5
xorl %r15d, %r15d
movq %r14, %r13
movzbl %cl, %eax
cmpl $0xc, %eax
jg 0x3f7f
cmpl $0x9, %eax
je 0x3f84
jmp 0x3f90
cmpl $0x20, %eax
jne 0x3fa0
incl %r15d
movb 0x1(%r13), %cl
incq %r13
jmp 0x3f70
cmpl $0xa, %eax
je 0x3fa5
incq %r13
incl %r15d
jmp 0x3ea9
cmpl $0xd, %eax
jne 0x3f95
xorl %edi, %edi
leaq 0x7e13(%rip), %rsi      # 0xbdc1
leaq 0x96c6(%rip), %rdx      # 0xd67b
movq 0x50(%rsp), %rcx
movq 0x30(%rsp), %r8
xorl %eax, %eax
callq 0x3267
jmp 0x3ea9
movl 0x10(%rbp), %eax
decl %eax
movq %r13, %r15
jmp 0x3fd8
movq %r14, %r15
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rcx
movl 0x8(%rcx), %eax
testl %eax, %eax
je 0x4136
movq %r12, %rbp
cmpl $0x4, %eax
jne 0x401b
cmpq $0x0, 0xdd14(%rip)      # 0x11d10
jne 0x401b
movq 0x40(%rsp), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xdd02(%rip)      # 0x11d10
movl %ecx, %eax
notl %eax
addl %r15d, %eax
movl %eax, 0xdcfd(%rip)      # 0x11d18
movq 0x10(%rsp), %r12
movq %r12, %rax
leaq 0xd0f6(%rip), %rcx      # 0x11120
subq %rcx, %rax
shrq $0x5, %rax
movslq %eax, %rbx
cmpb $0x0, 0xd0(%rsp,%rbx)
je 0x405e
testb $0x8, 0x18(%r12)
jne 0x405e
leaq 0x18(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x9658(%rip), %rdx      # 0xd6af
xorl %eax, %eax
callq 0x3267
movb $0x1, 0xd0(%rsp,%rbx)
movl 0x8(%r12), %r14d
movq $0x100, 0x90(%rsp,%r14,8) # imm = 0x100
testq %r14, %r14
je 0x4bad
movq (%rsp), %rbx
movq (%rbx), %r13
movl 0xda43(%rip), %eax      # 0x11ad0
movl %eax, 0x30(%rsp)
movq 0x40(%rsp), %rsi
movl %esi, %edx
notl %edx
addl %r15d, %edx
movl 0x18(%r12), %ecx
movq %rbx, %rdi
leaq 0x18(%rsp), %r8
callq 0x65a2
testq %rax, %rax
je 0x4114
movq %rax, %r12
cmpl $0x5, 0x10(%rax)
jne 0x4169
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
cmpb $0x43, (%rax)
je 0x4169
leaq 0x18(%rsp), %rdi
leaq 0x7ce2(%rip), %rsi      # 0xbdc1
leaq 0x999d(%rip), %rdx      # 0xda83
xorl %eax, %eax
callq 0x3267
movq 0xdc2c(%rip), %rax      # 0x11d20
movq %r12, %rcx
cmpl $0x5, 0x10(%r12)
jne 0x4166
movq (%rcx), %r12
movq %rax, (%rcx)
movq %rcx, 0xdc14(%rip)      # 0x11d20
movq %rcx, %rax
testq %r12, %r12
jne 0x40f4
leaq 0x18(%rsp), %rdi
leaq 0x8046(%rip), %rsi      # 0xc166
leaq 0x9979(%rip), %rdx      # 0xdaa0
xorl %eax, %eax
callq 0x3267
movq %r15, %rbp
jmp 0x3d0f
leaq 0xd973(%rip), %rax      # 0x11ab0
cmpq %rax, %rcx
movq %r15, %rbp
je 0x3d0f
leaq 0x18(%rsp), %rdi
movq 0x78(%rsp), %rsi
leaq 0x9560(%rip), %rdx      # 0xd6ba
xorl %eax, %eax
callq 0x3267
jmp 0x3d0f
movq %rcx, %r12
cmpl $0x9, %ebp
ja 0x427e
movq 0x48(%rsp), %rax
leaq 0x6f26(%rip), %rcx      # 0xb0a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
testl $0x3f0, %eax            # imm = 0x3F0
setne %cl
testb %al, %al
setns %dl
testb %dl, %cl
jne 0x423a
cmpl $0x4, %ebp
je 0x4236
cmpl $0x3, %ebp
je 0x45bd
cmpl $0x2, %ebp
je 0x41c8
jmp 0x427e
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
testb $0x10, %al
je 0x423a
jmp 0x427e
movq 0x10(%rsp), %rax
testb $0x2, 0x19(%rax)
je 0x423a
jmp 0x427e
movq 0x10(%rsp), %rax
movzwl 0x18(%rax), %eax
testl $0x3f0, %eax            # imm = 0x3F0
jne 0x423a
cmpl $0x9, 0x28(%rsp)
jl 0x4212
movq 0x18(%rsp), %rsi
movl $0x8, %edx
leaq 0x98b6(%rip), %rdi      # 0xdabf
callq 0x2160
testl %eax, %eax
je 0x427e
leaq 0x18(%rsp), %rdi
leaq 0x7ba3(%rip), %rsi      # 0xbdc1
leaq 0x98a3(%rip), %rdx      # 0xdac8
xorl %eax, %eax
callq 0x3267
jmp 0x427e
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
testb $0x40, %al
jne 0x427e
movl 0x28(%rsp), %ebp
movl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %r8
movq 0x68(%rsp), %rax
leaq 0x7f21(%rip), %rcx      # 0xc178
movslq (%rax,%rcx), %r9
addq %rcx, %r9
leaq 0x18(%rsp), %rdi
leaq 0x7b57(%rip), %rsi      # 0xbdc1
leaq 0x9836(%rip), %rdx      # 0xdaa7
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3267
movl %ebp, 0x28(%rsp)
leaq (%rsp,%r14,8), %rcx
addq $0x90, %rcx
movq 0x10(%rsp), %r14
movq 0x10(%r14), %rsi
testq %rsi, %rsi
je 0x42b0
movq %rbx, %rdi
movq %r12, %rdx
movq %rcx, %rbx
movq %r14, %r8
leaq 0x18(%rsp), %r9
callq 0x6e3c
movq %rbx, %rcx
cmpl $0x1, 0x8(%r14)
movq %r15, %rbp
jne 0x4345
movl 0x4(%rcx), %eax
movl %eax, 0x74(%r13)
testl %eax, %eax
je 0x4366
movq 0x8(%r13), %r14
testq %r14, %r14
movq 0x10(%rsp), %r15
je 0x43d9
cmpl $0x0, 0x10(%r14)
je 0x43d9
cmpl $0x2, 0x14(%r14)
jl 0x43d9
movq 0x8(%r14), %rsi
movl $0x2, %edx
leaq 0x9806(%rip), %rdi      # 0xdb0b
movq %rcx, %rbx
callq 0x2160
movq %rbx, %rcx
testl %eax, %eax
jne 0x43d9
movq (%rsp), %rax
movl 0x10(%rax), %r8d
leaq 0x18(%rsp), %rdi
leaq 0x7a95(%rip), %rsi      # 0xbdc1
leaq 0x982a(%rip), %rdx      # 0xdb5d
movq %r14, %rcx
xorl %eax, %eax
callq 0x3267
movq %rbx, %rcx
jmp 0x43d9
cmpq $0x0, 0x10(%r14)
jne 0x463d
movl 0x18(%r14), %eax
andl $0x3, %eax
orl 0x30(%rsp), %eax
je 0x466c
jmp 0x4644
movq (%r13), %r14
testq %r14, %r14
je 0x42cd
cmpl $0x0, 0x10(%r14)
je 0x42cd
cmpl $0x2, 0x14(%r14)
jl 0x42cd
movq 0x8(%r14), %rsi
movl $0x2, %edx
leaq 0x9772(%rip), %rdi      # 0xdb0b
movq %rcx, %rbx
callq 0x2160
movq %rbx, %rcx
testl %eax, %eax
jne 0x42cd
movq (%rsp), %rax
movl 0x10(%rax), %r8d
leaq 0x18(%rsp), %rdi
leaq 0x7a01(%rip), %rsi      # 0xbdc1
leaq 0x9747(%rip), %rdx      # 0xdb0e
movq %r14, %rcx
xorl %eax, %eax
callq 0x3267
movq %rbx, %rcx
movq 0x10(%rsp), %r15
movl 0x74(%r13), %eax
cmpl $0x1, %eax
je 0x4542
cmpl $0x2, %eax
jne 0x463d
movq 0x20(%r13), %r15
testq %r15, %r15
je 0x463d
movq (%rsp), %rax
movl 0x10(%rax), %ebx
movq $0x0, 0x68(%r13)
leaq 0xa1e5(%rip), %rdi      # 0xe5f7
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x462b
leaq 0xa243(%rip), %rdi      # 0xe671
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x4602
leaq 0xa1b6(%rip), %rdi      # 0xe600
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x4602
leaq 0xa1fd(%rip), %rdi      # 0xe663
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
jne 0x4490
xorl %edi, %edi
leaq 0x7941(%rip), %rsi      # 0xbdc1
leaq 0xa18b(%rip), %rdx      # 0xe612
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3267
leaq 0xa1e0(%rip), %rdi      # 0xe677
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x472a
leaq 0xa1cb(%rip), %rdi      # 0xe67e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x473f
leaq 0xa1b5(%rip), %rdi      # 0xe684
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x4754
leaq 0xa1a4(%rip), %rdi      # 0xe68f
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x476f
leaq 0xa193(%rip), %rdi      # 0xe69a
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
callq 0x6523
testl %eax, %eax
je 0x478a
cmpl $0x0, 0x10(%r15)
je 0x47d1
movl 0x14(%r15), %eax
cmpl $0x9, %eax
jge 0x479f
cmpl $0x2, %eax
jge 0x47b8
jmp 0x47d1
cmpq $0x0, 0x10(%r13)
je 0x45de
movq %rcx, %r14
movq 0x8(%r13), %rbx
leaq 0x9672(%rip), %rdi      # 0xdbcd
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdx
callq 0x6523
testl %eax, %eax
je 0x4635
leaq 0x965d(%rip), %rdi      # 0xdbd4
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdx
callq 0x6523
testl %eax, %eax
je 0x46a7
leaq 0x9649(%rip), %rdi      # 0xdbdc
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbx, %rdx
callq 0x6523
testl %eax, %eax
jne 0x463d
movl $0x1, 0x50(%r13)
jmp 0x463d
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
testb $0x20, %al
je 0x423a
jmp 0x427e
movq 0x10(%rsp), %rax
testb $0x1, 0x19(%rax)
je 0x423a
jmp 0x427e
movl $0x0, 0x74(%r13)
leaq 0x18(%rsp), %rdi
leaq 0x7b74(%rip), %rsi      # 0xc166
leaq 0x95af(%rip), %rdx      # 0xdba8
xorl %eax, %eax
callq 0x3267
jmp 0x463d
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x6c(%r13)
xorl %edi, %edi
leaq 0x77a8(%rip), %rsi      # 0xbdc1
leaq 0x9ff2(%rip), %rdx      # 0xe612
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3267
jmp 0x463d
movq $0x1, 0x6c(%r13)
jmp 0x463d
movl $0x1, 0x54(%r13)
cmpl $0x0, 0x30(%rsp)
je 0x466c
leaq 0x18(%rsp), %rdi
leaq 0x7750(%rip), %rbx      # 0xbda0
movq %rbx, %rsi
leaq 0x9589(%rip), %rdx      # 0xdbe3
xorl %eax, %eax
callq 0x3267
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9a50
xorl %eax, %eax
cmpq (%r13,%rax,8), %r12
je 0x4699
incq %rax
cmpq $0xa, %rax
jne 0x466e
movq (%r12), %rax
movq 0xd697(%rip), %rcx      # 0x11d20
movq %rcx, (%r12)
movq %r12, 0xd68c(%rip)      # 0x11d20
movq %rax, %r12
jmp 0x469d
movq (%r12), %r12
testq %r12, %r12
jne 0x466c
jmp 0x3d0f
movl $0x1, 0x58(%r13)
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x463d
movq 0x8(%rax), %rsi
movl 0x14(%rax), %edx
movq (%rsp), %rdi
movl $0x3, %ecx
leaq 0x18(%rsp), %r8
callq 0x65a2
movq %rax, %rbx
orb $0x2, 0x2c(%rsp)
movq (%rsp), %rdi
leaq 0x7abb(%rip), %rsi      # 0xc1a0
movq %rax, %rdx
movq %r14, %rcx
movq %r15, %r8
leaq 0x18(%rsp), %r9
callq 0x6e3c
andb $-0x3, 0x2c(%rsp)
testq %rbx, %rbx
je 0x463d
movq %rbx, %rcx
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x4709
movq 0xd605(%rip), %rcx      # 0x11d20
movq %rcx, (%rax)
movq %rbx, 0xd5fb(%rip)      # 0x11d20
jmp 0x463d
movl $0x1, 0x68(%r13)
movl $0x4, 0x70(%r13)
jmp 0x463d
movl $0x1, 0x68(%r13)
movl $0x2, 0x70(%r13)
jmp 0x463d
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x68(%r13)
movl $0x6, 0x70(%r13)
jmp 0x463d
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x68(%r13)
movl $0x7, 0x70(%r13)
jmp 0x463d
movl $0x1, 0x68(%r13)
movl $0x5, 0x70(%r13)
jmp 0x463d
movq 0x8(%r15), %rsi
movl $0x9, %edx
leaq 0x7a6c(%rip), %rdi      # 0xc21b
callq 0x2160
testl %eax, %eax
je 0x480d
movq 0x8(%r15), %rsi
movl $0x2, %edx
leaq 0x9343(%rip), %rdi      # 0xdb0b
callq 0x2160
testl %eax, %eax
je 0x47fb
xorl %edi, %edi
leaq 0x7994(%rip), %rsi      # 0xc16e
leaq 0x9ef0(%rip), %rdx      # 0xe6d1
movq %r15, %rcx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x3267
movl $0x8, 0x70(%r13)
jmp 0x463d
xorl %edi, %edi
leaq 0x75bd(%rip), %rsi      # 0xbdc1
leaq 0x9e99(%rip), %rdx      # 0xe6a4
jmp 0x47e1
movl $0x1, 0x68(%r13)
movl $0x3, 0x70(%r13)
jmp 0x463d
incq %rbp
movq (%rsp), %rax
incl 0x10(%rax)
jmp 0x484c
movq (%rsp), %rax
movl 0x10(%rax), %ecx
leaq 0x792a(%rip), %rsi      # 0xc166
leaq 0x8d76(%rip), %rdx      # 0xd5b9
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movq 0x60(%rsp), %rcx
movl (%rcx), %eax
subl %ebp, %eax
movq 0x58(%rsp), %rdx
addl %eax, (%rdx)
movq %rbp, (%rcx)
xorl %ebp, %ebp
cmpl $0x0, 0xd270(%rip)      # 0x11ad8
jne 0x4b99
cmpl $0x9, 0x38(%rsp)
ja 0x499e
leaq 0x67fc(%rip), %rax      # 0xb07c
movq 0x48(%rsp), %rcx
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl $0x28070000, %ebx       # imm = 0x28070000
btl $0x1c, 0x8(%rsp)
jb 0x4907
movl $0x2050000, %ebx        # imm = 0x2050000
testl $0x700000, 0x8(%rsp)    # imm = 0x700000
jne 0x4907
movl 0x24(%rsp), %r8d
leaq 0x74ea(%rip), %rsi      # 0xbda0
leaq 0x8e06(%rip), %rdx      # 0xd6c3
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
jmp 0x4907
leaq 0x788b(%rip), %rsi      # 0xc15e
leaq 0x8cd1(%rip), %rdx      # 0xd5ab
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x4b99
movl $0x40001800, %ebx       # imm = 0x40001800
jmp 0x4907
movl $0x1000, %ebx           # imm = 0x1000
jmp 0x4907
movl $0xe400, %ebx           # imm = 0xE400
jmp 0x4907
movl $0xe000, %ebx           # imm = 0xE000
movq 0xc812(%rip), %rcx      # 0x11120
testq %rcx, %rcx
je 0x499e
leaq 0xc822(%rip), %r12      # 0x11140
leaq 0x7841(%rip), %r14      # 0xc166
leaq 0x8e8b(%rip), %r15      # 0xd7b7
movl -0x8(%r12), %eax
andl %ebx, %eax
je 0x4954
andl 0x8(%rsp), %eax
jne 0x4954
movl 0x24(%rsp), %r9d
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
movl 0xc(%rsp), %r8d
xorl %eax, %eax
callq 0x3267
movq (%r12), %rcx
addq $0x20, %r12
testq %rcx, %rcx
jne 0x492c
jmp 0x499e
testl $0x70000, 0x8(%rsp)     # imm = 0x70000
jne 0x499e
leaq 0x8dc0(%rip), %rdx      # 0xd734
jmp 0x4985
btl $0x18, 0x8(%rsp)
jb 0x499e
leaq 0x8dfd(%rip), %rdx      # 0xd782
movl 0x24(%rsp), %r8d
leaq 0x77d5(%rip), %rsi      # 0xc166
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
testb $0x1, 0x98(%rsp)
je 0x49d2
testb $0x1, 0xa0(%rsp)
jne 0x49d2
movl 0x24(%rsp), %r8d
leaq 0x77a8(%rip), %rsi      # 0xc166
leaq 0x8e1c(%rip), %rdx      # 0xd7e1
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
movq (%rsp), %rbx
movq (%rbx), %rax
cmpl $0x0, 0x54(%rax)
je 0x4a09
testb $0x1, 0xb0(%rsp)
je 0x4a09
movl 0x24(%rsp), %r8d
leaq 0x7771(%rip), %rsi      # 0xc166
leaq 0x8e6e(%rip), %rdx      # 0xd86a
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
testb $0x1, 0xb8(%rsp)
je 0x4a3e
movl 0x8(%rsp), %eax
andl $0x800000, %eax         # imm = 0x800000
jne 0x4a3e
movl 0x24(%rsp), %r8d
leaq 0x773c(%rip), %rsi      # 0xc166
leaq 0x8e75(%rip), %rdx      # 0xd8a6
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
movl 0x8(%rsp), %eax
btl $0x1a, %eax
jae 0x4a85
btl $0x1b, %eax
jb 0x4a6e
movl 0x24(%rsp), %r8d
leaq 0x7367(%rip), %rsi      # 0xbdc1
leaq 0x8e8a(%rip), %rdx      # 0xd8eb
xorl %edi, %edi
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x3267
cmpl $0x0, 0x38(%rsp)
jne 0x4a85
movl 0xc4(%rsp), %eax
movl %eax, 0x14(%rbx)
movl 0x10(%rbx), %eax
movl %eax, 0x18(%rbx)
movl 0xac(%rsp), %eax
movq (%rbx), %rbx
testl %eax, %eax
je 0x4b22
movl %eax, 0x78(%rbx)
cmpl $0x3, %eax
jb 0x4ae9
movl 0x74(%rbx), %eax
cmpl $0x1, %eax
je 0x4ac5
cmpl $0x7, %eax
jne 0x4b22
movq 0x8(%rbx), %rdx
leaq 0x9cab(%rip), %rdi      # 0xe762
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x6523
testl %eax, %eax
jne 0x4b22
movq (%rsp), %rbx
movl 0x10(%rbx), %ecx
leaq 0x7693(%rip), %rsi      # 0xc166
leaq 0x8e51(%rip), %rdx      # 0xd92b
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movq (%rbx), %rbx
movl 0x78(%rbx), %eax
cmpl $0x2, %eax
jne 0x4b22
movq (%rsp), %rax
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x4b22
cmpl $0x2, 0x78(%rax)
je 0x4b22
movq (%rsp), %rbx
movl 0x10(%rbx), %ecx
leaq 0x7657(%rip), %rsi      # 0xc166
leaq 0x8e7c(%rip), %rdx      # 0xd992
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movq (%rbx), %rbx
cmpl $0x2, 0x74(%rbx)
jne 0x4b7d
cmpl $0x2, 0x78(%rbx)
jne 0x4b7d
cmpl $0x0, 0x70(%rbx)
je 0x4b5f
cmpl $0x0, 0x6c(%rbx)
je 0x4b7d
movq 0x20(%rbx), %rcx
movq (%rsp), %rax
movl 0x10(%rax), %r8d
leaq 0x7619(%rip), %rsi      # 0xc166
leaq 0x8edb(%rip), %rdx      # 0xda2f
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
jmp 0x4b7d
movq (%rsp), %rax
movl 0x10(%rax), %ecx
leaq 0x75f9(%rip), %rsi      # 0xc166
leaq 0x8e78(%rip), %rdx      # 0xd9ec
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movq (%rsp), %rdx
movq (%rdx), %rax
cmpl $0x1, 0x74(%rax)
jne 0x4b99
movq 0x8(%rdx), %rcx
movq %rcx, 0x80(%rax)
movq %rax, 0x8(%rdx)
movl %ebp, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x20(%rsp), %ecx
leaq 0x75a6(%rip), %rsi      # 0xc15e
leaq 0x8ead(%rip), %rdx      # 0xda6c
xorl %edi, %edi
xorl %eax, %eax
callq 0x3267
movl $0x1, %edi
callq 0x21e0