// File: /workspace/github_c_makefile_star2_O1/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 $0x138, %rsp            # imm = 0x138
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbp
movq (%rsi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x11a(%rsp)
movaps %xmm0, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xd0(%rsp)
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x547b
movq 0xc8c5(%rip), %rcx      # 0x11d10
xorl %eax, %eax
movq (%rbp), %rdx
movq (%rdx,%rax,8), %rsi
testq %rsi, %rsi
je 0x5470
movq %rcx, (%rsi)
movq (%rdx,%rax,8), %rcx
movq %rcx, 0xc8a8(%rip)      # 0x11d10
movq $0x0, (%rdx,%rax,8)
incq %rax
cmpq $0xa, %rax
jne 0x544d
jmp 0x54a1
movl $0x88, %edi
callq 0x2140
movq %rax, (%rbp)
testq %rax, %rax
je 0x6159
movl $0x88, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20f0
movq %r15, 0x68(%rsp)
movq %r14, 0x70(%rsp)
movq (%rbp), %rax
movl $0x2, 0x74(%rax)
movq 0x8(%rbp), %rcx
testq %rcx, %rcx
je 0x54cc
cmpl $0x1, 0x50(%rcx)
jne 0x54cc
movl $0x7, 0x74(%rax)
xorl %ecx, %ecx
movl %ecx, 0x78(%rax)
movq %rcx, 0x5c(%rax)
movl %ecx, 0x70(%rax)
movq %rcx, 0x68(%rax)
movl 0x10(%rbp), %eax
leaq 0x28(%rsp), %rcx
movl %eax, 0x4(%rsp)
movl %eax, 0xc(%rcx)
callq 0x21f0
movq %rax, 0x90(%rsp)
leaq 0x20(%rbp), %rax
movq %rax, 0x98(%rsp)
movq 0x8(%rsp), %rcx
cmpl $0x4, %ecx
sete %al
movl %ecx, %edx
movq %rdx, 0x58(%rsp)
leaq (,%rdx,4), %rdx
movq %rdx, 0x88(%rsp)
addl $-0x2, %ecx
cmpl $0x8, %ecx
setb %dl
movb $-0x3d, %sil
movq %rcx, 0x50(%rsp)
shrb %cl, %sil
andb %dl, %sil
orb %al, %sil
leaq 0x6c8f(%rip), %rax      # 0xc1d6
leaq 0x68e3(%rip), %rcx      # 0xbe31
cmovneq %rax, %rcx
movq %rcx, 0x78(%rsp)
leaq 0x6c80(%rip), %rcx      # 0xc1de
cmovneq %rax, %rcx
movq %rcx, 0x80(%rsp)
movl $0x0, 0x14(%rsp)
movq %rbp, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq (%rax), %rcx
xorl %eax, %eax
movsbq (%r12,%rax), %rdx
incq %rax
cmpq $0x2d, %rdx
je 0x5584
movzwl (%rcx,%rdx,2), %esi
andl $0xc00, %esi            # imm = 0xC00
jne 0x5584
movzbl %dl, %ecx
cmpl $0xd, %ecx
je 0x55ab
cmpl $0xa, %ecx
jne 0x55b5
cmpq $0x1, %rax
je 0x60b4
leaq (%r12,%rax), %r15
decq %r15
xorl %ebx, %ebx
movzbl (%r15), %eax
cmpl $0xc, %eax
jg 0x55ce
cmpl $0x9, %eax
je 0x55d3
jmp 0x55db
cmpl $0x20, %eax
jne 0x55e2
incq %r15
incq %rbx
jmp 0x55be
cmpl $0xa, %eax
je 0x55e7
jmp 0x55ec
cmpl $0xd, %eax
jne 0x55ec
subq %rbx, %r15
xorl %ebx, %ebx
movzbl (%r15), %eax
cmpl $0x3a, %eax
je 0x5602
testl %eax, %eax
jne 0x569f
jmp 0x60bc
cmpq %r12, %r15
je 0x569f
testl %ebx, %ebx
je 0x562e
movq 0x18(%rsp), %rax
movl 0x10(%rax), %ecx
xorl %edi, %edi
leaq 0x6811(%rip), %rsi      # 0xbe31
leaq 0x8066(%rip), %rdx      # 0xd68d
xorl %eax, %eax
callq 0x4ae3
movq 0xbadb(%rip), %r13      # 0x11110
leaq 0xbad4(%rip), %r14      # 0x11110
testq %r13, %r13
je 0x567f
movl %ebx, %eax
addq %r12, %rax
movq %r15, %rbp
subq %rax, %rbp
leaq 0xbabd(%rip), %r14      # 0x11110
movq %r13, %rdi
callq 0x20a0
cmpq %rbp, %rax
jne 0x5672
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x2150
testl %eax, %eax
je 0x567f
movq 0x20(%r14), %r13
addq $0x20, %r14
testq %r13, %r13
jne 0x5653
incq %r15
movl 0x14(%rsp), %eax
movq %r14, 0x20(%rsp)
orl 0x18(%r14), %eax
movl %eax, 0x14(%rsp)
movq %r15, 0x48(%rsp)
movq 0x18(%rsp), %rbp
jmp 0x56ce
movsbl %al, %ecx
movq 0x18(%rsp), %rbp
movl 0x10(%rbp), %r8d
xorl %edi, %edi
leaq 0x6b22(%rip), %rsi      # 0xc1d6
leaq 0x7f9f(%rip), %rdx      # 0xd65a
xorl %eax, %eax
callq 0x4ae3
leaq 0xc3d7(%rip), %rax      # 0x11aa0
movq %rax, 0x20(%rsp)
movl 0x10(%rbp), %eax
movl %eax, 0x30(%rsp)
movq %r12, 0x28(%rsp)
movl %r15d, %r14d
subl %r12d, %r14d
notl %ebx
addl %r14d, %ebx
movl %ebx, 0x38(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x48(%rsp), %rax
subq %r12, %rax
movq %rax, 0x40(%rsp)
movq %r12, %r13
movzbl (%r15), %eax
cmpl $0xa, %eax
je 0x571c
cmpl $0xd, %eax
je 0x571c
testl %eax, %eax
jne 0x57e9
jmp 0x5824
cmpl $0x9, 0x8(%rsp)
ja 0x5765
movq 0x8(%rsp), %rax
movl $0x35c, %ecx            # imm = 0x35C
btl %eax, %ecx
jae 0x5765
movl %r15d, %edx
subl %r13d, %edx
movq %r12, %rbx
movq 0x98(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x9e6b
movq %r12, %rdi
movq %rbx, %r12
leaq 0x7f67(%rip), %rsi      # 0xd6c2
movl $0x2, %edx
callq 0x9e6b
cmpl $0x51, %r14d
jl 0x578e
movl 0x10(%rbp), %r9d
xorl %edi, %edi
leaq 0x66b9(%rip), %rsi      # 0xbe31
leaq 0x7f46(%rip), %rdx      # 0xd6c5
movq 0x40(%rsp), %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4ae3
movl 0x10(%rbp), %r9d
incl %r9d
movl %r9d, 0x10(%rbp)
cmpb $0xd, (%r15)
jne 0x57ac
leaq 0x1(%r15), %rax
cmpb $0xa, 0x1(%r15)
cmoveq %rax, %r15
movzbl 0x1(%r15), %eax
movq %r15, %r13
incq %r13
cmpl $0x20, %eax
je 0x57c1
cmpl $0x9, %eax
jne 0x5821
xorl %r14d, %r14d
movzbl (%r13,%r14), %eax
cmpl $0xc, %eax
jg 0x57d6
cmpl $0x9, %eax
je 0x57db
jmp 0x57e0
cmpl $0x20, %eax
jne 0x57f4
incq %r14
jmp 0x57c4
cmpl $0xa, %eax
je 0x57f9
leaq (%r14,%r13), %r15
incq %r15
incl %r14d
jmp 0x5701
cmpl $0xd, %eax
jne 0x57e5
xorl %edi, %edi
leaq 0x662f(%rip), %rsi      # 0xbe31
leaq 0x7ee6(%rip), %rdx      # 0xd6ef
movq 0x40(%rsp), %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4ae3
leaq (%r14,%r13), %r15
jmp 0x5701
movq %r13, %r15
movl 0x10(%rbp), %eax
decl %eax
movl %eax, 0x34(%rsp)
movq 0x20(%rsp), %r14
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x5b5d
cmpl $0x4, %eax
jne 0x586a
cmpq $0x0, 0xc4b5(%rip)      # 0x11d00
jne 0x586a
movq 0x48(%rsp), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc4a3(%rip)      # 0x11d00
movl %ecx, %eax
notl %eax
addl %r15d, %eax
movl %eax, 0xc49e(%rip)      # 0x11d08
movq %r14, %rax
leaq 0xb89c(%rip), %rcx      # 0x11110
subq %rcx, %rax
shrq $0x5, %rax
movslq %eax, %rbx
cmpb $0x0, 0xe0(%rsp,%rbx)
leaq 0x28(%rsp), %r12
je 0x58aa
testb $0x8, 0x18(%r14)
jne 0x58aa
movq %r12, %rdi
movq 0x78(%rsp), %rsi
leaq 0x7e80(%rip), %rdx      # 0xd723
xorl %eax, %eax
callq 0x4ae3
movb $0x1, 0xe0(%rsp,%rbx)
movl 0x8(%r14), %ebp
movq $0x100, 0xa0(%rsp,%rbp,8) # imm = 0x100
testq %rbp, %rbp
je 0x6435
movq 0x18(%rsp), %rdi
movq (%rdi), %rbx
movl 0xc1e7(%rip), %ecx      # 0x11ac0
movl %ecx, 0x40(%rsp)
movq 0x48(%rsp), %rsi
movl %esi, %edx
notl %edx
addl %r15d, %edx
movl 0x18(%r14), %ecx
movq %r12, %r8
callq 0x64e3
testq %rax, %rax
je 0x5953
movq %rax, %r13
cmpl $0x5, 0x10(%rax)
jne 0x5956
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
cmpb $0x43, (%rax)
je 0x5956
movq %r12, %rdi
leaq 0x6516(%rip), %rsi      # 0xbe31
leaq 0x81d5(%rip), %rdx      # 0xdaf7
xorl %eax, %eax
callq 0x4ae3
movq 0xc3e0(%rip), %rax      # 0x11d10
movq %r13, %rcx
cmpl $0x5, 0x10(%r13)
jne 0x5ead
movq (%rcx), %r13
movq %rax, (%rcx)
movq %rcx, 0xc3c5(%rip)      # 0x11d10
movq %rcx, %rax
testq %r13, %r13
jne 0x5930
xorl %r13d, %r13d
testq %r13, %r13
je 0x5b93
cmpl $0x1, 0x8(%rsp)
jne 0x597a
movq 0x20(%rsp), %rax
movzwl 0x18(%rax), %eax
testl $0x3f0, %eax            # imm = 0x3F0
jne 0x5a6d
cmpl $0x9, 0x8(%rsp)
ja 0x5bd4
movq 0x58(%rsp), %rax
leaq 0x5713(%rip), %rcx      # 0xb0a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rax
movl 0x18(%rax), %eax
testl $0x3f0, %eax            # imm = 0x3F0
setne %cl
testb %al, %al
setns %al
testb %al, %cl
jne 0x5a6d
cmpl $0x7, 0x50(%rsp)
ja 0x5bd4
movq 0x50(%rsp), %rax
leaq 0x56fe(%rip), %rcx      # 0xb0cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rax
testb $0x10, 0x18(%rax)
je 0x5a6d
movq 0x8(%rsp), %rax
addl $-0x3, %eax
cmpl $0x6, %eax
ja 0x5bd4
leaq 0x56ee(%rip), %rcx      # 0xb0ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rax
testb $0x20, 0x18(%rax)
je 0x5a6d
cmpl $0x4, 0x8(%rsp)
je 0x5a5e
cmpl $0x9, 0x8(%rsp)
je 0x5a48
cmpl $0x8, 0x8(%rsp)
jne 0x5bd4
movq 0x20(%rsp), %rax
testb $0x1, 0x19(%rax)
je 0x5a6d
cmpl $0x4, 0x8(%rsp)
je 0x5a5e
cmpl $0x9, 0x8(%rsp)
jne 0x5bd4
movq 0x20(%rsp), %rax
testb $0x2, 0x19(%rax)
je 0x5a6d
cmpl $0x4, 0x8(%rsp)
jne 0x5bd4
movq 0x20(%rsp), %rax
testb $0x40, 0x18(%rax)
jne 0x5bd4
movq %rbp, %r14
movl 0x38(%rsp), %ebp
movl $0x0, 0x38(%rsp)
movq 0x28(%rsp), %r8
movq 0x88(%rsp), %rax
leaq 0x6758(%rip), %rcx      # 0xc1e8
movslq (%rax,%rcx), %r9
addq %rcx, %r9
movq %r12, %rdi
leaq 0x6390(%rip), %rsi      # 0xbe31
leaq 0x8073(%rip), %rdx      # 0xdb1b
movl %ebp, %ecx
xorl %eax, %eax
callq 0x4ae3
movl %ebp, 0x38(%rsp)
movq %r14, %rbp
leaq (%rsp,%rbp,8), %r14
addq $0xa0, %r14
movq 0x20(%rsp), %rbp
movq 0x10(%rbp), %rsi
testq %rsi, %rsi
je 0x5ae7
movq 0x18(%rsp), %rdi
movq %r13, %rdx
movq %r14, %rcx
movq %rbp, %r8
movq %r12, %r9
callq 0x6d16
cmpl $0x1, 0x8(%rbp)
jne 0x5bb0
movl 0x4(%r14), %eax
movl %eax, 0x74(%rbx)
testl %eax, %eax
je 0x5c21
movq 0x8(%rbx), %rbp
testq %rbp, %rbp
je 0x5c82
cmpl $0x0, 0x10(%rbp)
je 0x5c82
cmpl $0x2, 0x14(%rbp)
jl 0x5c82
movq 0x8(%rbp), %rsi
movl $0x2, %edx
leaq 0x804e(%rip), %rdi      # 0xdb7f
callq 0x2150
testl %eax, %eax
jne 0x5c82
movq 0x18(%rsp), %rax
movl 0x10(%rax), %r8d
movq %r12, %rdi
leaq 0x62e0(%rip), %rsi      # 0xbe31
leaq 0x8079(%rip), %rdx      # 0xdbd1
jmp 0x5c78
movq %r15, %r12
leaq 0xbf39(%rip), %rax      # 0x11aa0
cmpq %rax, %r14
je 0x5577
leaq 0x28(%rsp), %rdi
movq 0x80(%rsp), %rsi
leaq 0x7baa(%rip), %rdx      # 0xd72e
xorl %eax, %eax
callq 0x4ae3
movq %r15, %r12
jmp 0x5577
movq %r12, %rdi
leaq 0x6639(%rip), %rsi      # 0xc1d6
leaq 0x7f70(%rip), %rdx      # 0xdb14
xorl %eax, %eax
callq 0x4ae3
jmp 0x5f78
cmpq $0x0, 0x10(%rbp)
jne 0x5f0d
testb $0x3, 0x18(%rbp)
movl $0x1, %eax
movl 0x40(%rsp), %ecx
cmovnel %eax, %ecx
movl %ecx, 0x40(%rsp)
jmp 0x5f0d
cmpl $0x1, 0x8(%rsp)
jne 0x5ab8
cmpl $0x9, 0x38(%rsp)
jl 0x5c04
movq 0x28(%rsp), %rsi
movl $0x8, %edx
leaq 0x7f3c(%rip), %rdi      # 0xdb33
callq 0x2150
testl %eax, %eax
je 0x5ab8
movq %r12, %rdi
leaq 0x6223(%rip), %rsi      # 0xbe31
leaq 0x7f27(%rip), %rdx      # 0xdb3c
xorl %eax, %eax
callq 0x4ae3
jmp 0x5ab8
movq (%rbx), %rbp
testq %rbp, %rbp
je 0x5b00
cmpl $0x0, 0x10(%rbp)
je 0x5b00
cmpl $0x2, 0x14(%rbp)
jl 0x5b00
movq 0x8(%rbp), %rsi
movl $0x2, %edx
leaq 0x7f2e(%rip), %rdi      # 0xdb7f
callq 0x2150
testl %eax, %eax
jne 0x5b00
movq 0x18(%rsp), %rax
movl 0x10(%rax), %r8d
movq %r12, %rdi
leaq 0x61c0(%rip), %rsi      # 0xbe31
leaq 0x7f0a(%rip), %rdx      # 0xdb82
movq %rbp, %rcx
xorl %eax, %eax
callq 0x4ae3
movl 0x74(%rbx), %eax
cmpl $0x1, %eax
je 0x5e49
cmpl $0x2, %eax
jne 0x5f0d
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x5f08
movq 0x18(%rsp), %rax
movl 0x10(%rax), %r14d
movq $0x0, 0x68(%rbx)
leaq 0x89af(%rip), %rdi      # 0xe66b
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x5f00
leaq 0x8a0d(%rip), %rdi      # 0xe6e5
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x5ed6
leaq 0x8980(%rip), %rdi      # 0xe674
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x5ed6
leaq 0x89c7(%rip), %rdi      # 0xe6d7
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
jne 0x5d3b
xorl %edi, %edi
leaq 0x6107(%rip), %rsi      # 0xbe31
leaq 0x8955(%rip), %rdx      # 0xe686
movl %r14d, %ecx
xorl %eax, %eax
callq 0x4ae3
leaq 0x89a9(%rip), %rdi      # 0xe6eb
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x601f
leaq 0x8994(%rip), %rdi      # 0xe6f2
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x6032
leaq 0x897e(%rip), %rdi      # 0xe6f8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x6045
leaq 0x896d(%rip), %rdi      # 0xe703
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x605f
leaq 0x895c(%rip), %rdi      # 0xe70e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdx
callq 0x645a
testl %eax, %eax
je 0x6079
movl 0x10(%r12), %ebp
testl %ebp, %ebp
je 0x5e20
cmpl $0x9, 0x14(%r12)
jl 0x5df6
movq 0x8(%r12), %rsi
movl $0x9, %edx
leaq 0x64a2(%rip), %rdi      # 0xc28b
callq 0x2150
testl %eax, %eax
je 0x608c
testl %ebp, %ebp
je 0x5e20
cmpl $0x2, 0x14(%r12)
jl 0x5e20
movq 0x8(%r12), %rsi
movl $0x2, %edx
leaq 0x7d6c(%rip), %rdi      # 0xdb7f
callq 0x2150
testl %eax, %eax
je 0x609f
xorl %edi, %edi
leaq 0x63b5(%rip), %rsi      # 0xc1de
leaq 0x8915(%rip), %rdx      # 0xe745
movq %r12, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x4ae3
movl $0x8, 0x70(%rbx)
jmp 0x5f08
cmpq $0x0, 0x10(%rbx)
je 0x5eb5
movq 0x8(%rbx), %rbp
leaq 0x7de6(%rip), %rdi      # 0xdc41
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbp, %rdx
callq 0x645a
testl %eax, %eax
je 0x5f85
leaq 0x7dd1(%rip), %rdi      # 0xdc48
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbp, %rdx
callq 0x645a
testl %eax, %eax
je 0x5f91
leaq 0x7dbd(%rip), %rdi      # 0xdc50
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rbp, %rdx
callq 0x645a
testl %eax, %eax
jne 0x5f0d
movl $0x1, 0x50(%rbx)
jmp 0x5f0d
movq %rcx, %r13
jmp 0x5956
movl $0x0, 0x74(%rbx)
movq %r12, %rdi
leaq 0x6310(%rip), %rsi      # 0xc1d6
leaq 0x7d4f(%rip), %rdx      # 0xdc1c
xorl %eax, %eax
callq 0x4ae3
jmp 0x5f0d
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x6c(%rbx)
xorl %edi, %edi
leaq 0x5f44(%rip), %rsi      # 0xbe31
leaq 0x8792(%rip), %rdx      # 0xe686
movl %r14d, %ecx
xorl %eax, %eax
callq 0x4ae3
jmp 0x5f08
movq $0x1, 0x6c(%rbx)
leaq 0x28(%rsp), %r12
cmpl $0x0, 0x40(%rsp)
je 0x5f3a
movq %r12, %rdi
leaq 0x5ef2(%rip), %r14      # 0xbe10
movq %r14, %rsi
leaq 0x7d2f(%rip), %rdx      # 0xdc57
xorl %eax, %eax
callq 0x4ae3
movq %r14, %rdi
movq %r13, %rsi
callq 0x9820
movq %r13, %rax
movq $-0x50, %rcx
cmpq 0x50(%rbx,%rcx), %rax
je 0x5f55
addq $0x8, %rcx
jne 0x5f44
movb $0x1, %cl
jmp 0x5f5b
testq %rcx, %rcx
sete %cl
movq (%rax), %r13
testb %cl, %cl
je 0x5f73
movq 0xbda7(%rip), %rcx      # 0x11d10
movq %rcx, (%rax)
movq %rax, 0xbd9d(%rip)      # 0x11d10
testq %r13, %r13
jne 0x5f3a
movq %r15, %r12
movq 0x18(%rsp), %rbp
jmp 0x5577
movl $0x1, 0x54(%rbx)
jmp 0x5f0d
movl $0x1, 0x58(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x5f0d
movq 0x8(%rax), %rsi
movl 0x14(%rax), %edx
movq %r14, 0x60(%rsp)
movq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0x3, %ecx
movq %r12, %r8
callq 0x64e3
movq %rax, %rbp
orb $0x2, 0x3c(%rsp)
movq %r14, %rdi
leaq 0x6238(%rip), %rsi      # 0xc210
movq %rax, %rdx
movq 0x60(%rsp), %rcx
movq 0x20(%rsp), %r8
movq %r12, %r9
callq 0x6d16
andb $-0x3, 0x3c(%rsp)
testq %rbp, %rbp
je 0x5f0d
movq %rbp, %rcx
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x5ffe
movq 0xbd00(%rip), %rcx      # 0x11d10
movq %rcx, (%rax)
movq %rbp, 0xbcf6(%rip)      # 0x11d10
jmp 0x5f0d
movl $0x1, 0x68(%rbx)
movl $0x4, 0x70(%rbx)
jmp 0x5f08
movl $0x1, 0x68(%rbx)
movl $0x2, 0x70(%rbx)
jmp 0x5f08
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x68(%rbx)
movl $0x6, 0x70(%rbx)
jmp 0x5f08
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x68(%rbx)
movl $0x7, 0x70(%rbx)
jmp 0x5f08
movl $0x1, 0x68(%rbx)
movl $0x5, 0x70(%rbx)
jmp 0x5f08
movl $0x1, 0x68(%rbx)
movl $0x3, 0x70(%rbx)
jmp 0x5f08
xorl %edi, %edi
leaq 0x5d89(%rip), %rsi      # 0xbe31
leaq 0x8669(%rip), %rdx      # 0xe718
jmp 0x5e30
incq %r12
incl 0x10(%rbp)
jmp 0x60db
movq 0x18(%rsp), %rax
movl 0x10(%rax), %ecx
leaq 0x610b(%rip), %rsi      # 0xc1d6
leaq 0x755b(%rip), %rdx      # 0xd62d
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movq 0x70(%rsp), %rcx
movl (%rcx), %eax
subl %r12d, %eax
movq 0x68(%rsp), %rdx
addl %eax, (%rdx)
movq %r12, (%rcx)
xorl %eax, %eax
cmpl $0x0, 0xb9d0(%rip)      # 0x11ac8
jne 0x6423
xorl %ebx, %ebx
movb $0x1, %r14b
cmpl $0x9, 0x8(%rsp)
ja 0x61e9
leaq 0x4f67(%rip), %rax      # 0xb07c
movq 0x58(%rsp), %rcx
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl 0x14(%rsp), %eax
btl $0x1c, %eax
jb 0x61e1
movl $0x2050000, %ebx        # imm = 0x2050000
testl $0x700000, %eax         # imm = 0x700000
jne 0x61e6
movl 0x34(%rsp), %r8d
leaq 0x5cc3(%rip), %rsi      # 0xbe10
leaq 0x75e3(%rip), %rdx      # 0xd737
xorl %r14d, %r14d
jmp 0x61d2
leaq 0x606e(%rip), %rsi      # 0xc1ce
leaq 0x74b8(%rip), %rdx      # 0xd61f
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6423
movl $0x40001800, %ebx       # imm = 0x40001800
jmp 0x61e6
movl $0x1000, %ebx           # imm = 0x1000
jmp 0x61e6
movl $0xe400, %ebx           # imm = 0xE400
jmp 0x61e6
movl $0xe000, %ebx           # imm = 0xE000
jmp 0x61e6
testl $0x70000, 0x14(%rsp)    # imm = 0x70000
jne 0x61e9
movl 0x34(%rsp), %r8d
leaq 0x602a(%rip), %rsi      # 0xc1d6
leaq 0x75f5(%rip), %rdx      # 0xd7a8
jmp 0x61d0
btl $0x18, 0x14(%rsp)
jb 0x61e9
movl 0x34(%rsp), %r8d
leaq 0x600d(%rip), %rsi      # 0xc1d6
leaq 0x7626(%rip), %rdx      # 0xd7f6
xorl %ebx, %ebx
xorl %edi, %edi
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x4ae3
jmp 0x61e9
movl $0x28070000, %ebx       # imm = 0x28070000
xorl %r14d, %r14d
movq 0xaf20(%rip), %rcx      # 0x11110
testq %rcx, %rcx
sete %al
orb %r14b, %al
jne 0x6245
leaq 0xaf2e(%rip), %r12      # 0x11130
leaq 0x5fcd(%rip), %r14      # 0xc1d6
leaq 0x761b(%rip), %r15      # 0xd82b
movl -0x8(%r12), %eax
andl %ebx, %eax
je 0x6238
andl 0x14(%rsp), %eax
jne 0x6238
movl 0x34(%rsp), %r9d
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
movl 0x4(%rsp), %r8d
xorl %eax, %eax
callq 0x4ae3
movq (%r12), %rcx
addq $0x20, %r12
testq %rcx, %rcx
jne 0x6210
testb $0x1, 0xa8(%rsp)
je 0x6279
testb $0x1, 0xb0(%rsp)
jne 0x6279
movl 0x34(%rsp), %r8d
leaq 0x5f71(%rip), %rsi      # 0xc1d6
leaq 0x75e9(%rip), %rdx      # 0xd855
xorl %edi, %edi
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x4ae3
movq 0x18(%rsp), %rbx
movq (%rbx), %rax
cmpl $0x0, 0x54(%rax)
movl 0x14(%rsp), %ebp
je 0x62b5
testb $0x1, 0xc0(%rsp)
je 0x62b5
movl 0x34(%rsp), %r8d
leaq 0x5f35(%rip), %rsi      # 0xc1d6
leaq 0x7636(%rip), %rdx      # 0xd8de
xorl %edi, %edi
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x4ae3
testb $0x1, 0xc8(%rsp)
je 0x62e8
movl %ebp, %eax
andl $0x800000, %eax         # imm = 0x800000
jne 0x62e8
movl 0x34(%rsp), %r8d
leaq 0x5f02(%rip), %rsi      # 0xc1d6
leaq 0x763f(%rip), %rdx      # 0xd91a
xorl %edi, %edi
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x4ae3
btl $0x1a, %ebp
jae 0x632b
btl $0x1b, %ebp
jb 0x6314
movl 0x34(%rsp), %r8d
leaq 0x5b31(%rip), %rsi      # 0xbe31
leaq 0x7658(%rip), %rdx      # 0xd95f
xorl %edi, %edi
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x4ae3
cmpl $0x0, 0x8(%rsp)
jne 0x632b
movl 0xd4(%rsp), %eax
movl %eax, 0x14(%rbx)
movl 0x10(%rbx), %eax
movl %eax, 0x18(%rbx)
movl 0xbc(%rsp), %ecx
testl %ecx, %ecx
je 0x63b3
movq (%rbx), %rax
movl %ecx, 0x78(%rax)
cmpl $0x3, %ecx
jb 0x6381
movl 0x74(%rax), %ecx
cmpl $0x1, %ecx
je 0x6367
cmpl $0x7, %ecx
jne 0x6381
movq 0x8(%rax), %rdx
leaq 0x847d(%rip), %rdi      # 0xe7d6
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x645a
testl %eax, %eax
jne 0x6381
movl 0x10(%rbx), %ecx
leaq 0x5e65(%rip), %rsi      # 0xc1d6
leaq 0x7627(%rip), %rdx      # 0xd99f
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movq (%rbx), %rax
cmpl $0x2, 0x78(%rax)
jne 0x63b3
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x63b3
cmpl $0x2, 0x78(%rax)
je 0x63b3
movl 0x10(%rbx), %ecx
leaq 0x5e33(%rip), %rsi      # 0xc1d6
leaq 0x765c(%rip), %rdx      # 0xda06
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movq (%rbx), %rax
cmpl $0x2, 0x74(%rax)
jne 0x6409
cmpl $0x2, 0x78(%rax)
jne 0x6409
cmpl $0x0, 0x70(%rax)
je 0x63ef
cmpl $0x0, 0x6c(%rax)
je 0x6409
movq 0x20(%rax), %rcx
movl 0x10(%rbx), %r8d
leaq 0x5df9(%rip), %rsi      # 0xc1d6
leaq 0x76bf(%rip), %rdx      # 0xdaa3
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
jmp 0x6409
movl 0x10(%rbx), %ecx
leaq 0x5ddd(%rip), %rsi      # 0xc1d6
leaq 0x7660(%rip), %rdx      # 0xda60
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movq (%rbx), %rcx
xorl %eax, %eax
cmpl $0x1, 0x74(%rcx)
jne 0x6423
movq 0x8(%rbx), %rdx
movq %rdx, 0x80(%rcx)
movq %rcx, 0x8(%rbx)
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x30(%rsp), %ecx
leaq 0x5d8e(%rip), %rsi      # 0xc1ce
leaq 0x7699(%rip), %rdx      # 0xdae0
xorl %edi, %edi
xorl %eax, %eax
callq 0x4ae3
movl $0x1, %edi
callq 0x21d0