// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/mime.c
// Function: parseMultiParts
struct mimePart *parseMultiParts(struct mimeBuf *b, char *altHeader)
/* This is a recursive function.  It parses multipart MIME messages.
   Data that are binary or too large will be saved in mimePart->filename
   otherwise saved as a c-string in mimePart->data.  If multipart,
   then first child is mimePart->child, subsequent sibs are in child->next.
   altHeader is a string of headers that can be fed in if the headers have
   already been read off the stream by an earlier process, i.e. apache.
 */
{ 
struct mimePart *p=AllocA(*p);
char *parentboundary = NULL, *boundary = NULL;
char *ct = NULL;
boolean autoBoundary = FALSE;


//debug
//fprintf(stderr,"altHeader=[%s]\n",altHeader);

if (sameOk(altHeader, "autoBoundary"))
    { /* process things with no explicit header.
       *  look for *MIME* \n\n-- */
    struct dyString *dy = dyStringNew(0);
    char *prevPrevLine = NULL;
    char *prevLine = NULL;
    char *line = NULL;
    boolean found = FALSE;
    autoBoundary = TRUE;
    while (TRUE)
	{
	if (b->i >= b->eoi && b->eoi < b->eom)  /* at end of input */
	    break;
	line = getLineMB(b);
	if (line && startsWith("--",line) // && 
	    //sameString(prevLine,"") && 
	    //prevPrevLine &&
	    //stringIn("MULTI",prevPrevLine) && 
	    //stringIn("MIME",prevPrevLine) 
	    )
	    {
	    found = TRUE;
	    break;
	    }
	freez(&prevPrevLine);
	prevPrevLine = prevLine;
	prevLine = line;
	if (prevPrevLine)
	    touppers(prevPrevLine);
	}
    if (!found)
	errAbort("autoBoundary: No initial boundary found.");

    dyStringPrintf(dy, "CONTENT-TYPE:multipart/form-data; boundary=%s%s%s", 
	line+2, getNewLineByType(), getNewLineByType() );
    altHeader = dyStringCannibalize(&dy); 
    
    //debug
    //fprintf(stderr,"autoBoundary altHeader = [%s]\n",altHeader);
    //fflush(stderr); 

    freez(&prevPrevLine);	    
    freez(&prevLine);	    
    freez(&line);	    
    }

//debug
//fprintf(stderr,"\n");
readPartHeaderMB(b,p,altHeader);

ct = hashFindVal(p->hdr,"content-type");  /* use lowercase key */
//debug
//fprintf(stderr,"ct from hash:%s\n",ct);
//fflush(stderr); 

if (ct && startsWith("multipart/",ct))
    {
    char bound[MAXBOUNDARY]; 
    char *bnd = NULL;
    struct mimePart *child = NULL;

    /* these 3 vars just for processing epilog chunk: */
    char *bp=NULL;
    int size=0;
    boolean hasZeros=FALSE;

    /* save */
    parentboundary = b->boundary;

    boundary = getMimeHeaderFieldVal(ct,"boundary");
    if (strlen(boundary) >= MAXBOUNDARY)
	errAbort("error: boundary= value too long in MIME header Content-type:%s",ct);
    safef(bound, sizeof(bound), "--%s",boundary);  /* do not prepend CRLF to boundary yet */
    freez(&boundary);
    boundary = cloneString(bound);
    //debug
    //fprintf(stderr,"initial boundary parsed:%s\n",boundary);
    //fflush(stderr); 

    if (!autoBoundary)
	{
	/* skip any extra "prolog" before the initial boundary marker */
	while (TRUE)
	    {
	    bnd = getLineMB(b);
	    if (sameString(bnd,boundary)) 
	       break;
	    freez(&bnd);
	    }
	    //debug
	    //fprintf(stderr,"initial boundary found:%s\n",bnd);
	    //fflush(stderr); 
	freez(&bnd);
	}

    /* include crlf in the boundary so bodies won't have trailing a CRLF
     * this is done here so that in case there's no extra CRLF
     * between the header and the boundary, it will still work,
     * so we only prepend the CRLF to the boundary after initial found */
    safef(bound,sizeof(bound),"%s%s", getNewLineByType(), boundary);
    freez(&boundary);
    boundary=cloneString(bound);
    
    setBoundaryMB(b, boundary);

    while(TRUE)
	{
	int i = 0;
	char c1 = ' ', c2 = ' ';
    	child = parseMultiParts(b,NULL);
	slAddHead(&p->multi,child);
	//call getLine, compare to boundary 
	/* skip extra initial boundary marker - it's moot anyway */
	freez(&bnd);
	    //debug
	    //fprintf(stderr,"post-parse pre-getLineMB dumpMB: ");
	    //dumpMB(b);  //debug
	for (i=0;i<strlen(boundary);++i)
	    bound[i] = getcMB(b);
	bound[i] = 0;    
	if (!sameString(bound,boundary))
	    errAbort("expected boundary %s, but found %s in MIME",boundary,bound);
	//debug
    	//fprintf(stderr,"\nfound boundary:%s\n",bound);
	//fflush(stderr); 
    	c1 = getcMB(b);
	if (c1 == '-')
	    {
	    c2 = getcMB(b);
	    if (c2 == '-')
    		break;  /* last boundary found */
	    else		    
	    	errAbort("expected -- after boundary %s, but found %c%c in MIME",boundary,c1,c2);
	    }
	if (nlType == nlt_dos)
	    c2 = getcMB(b);
	switch (nlType)
	    {
	    case nlt_dos:
		if (c1 == 0x0d && c2 == 0x0a)
		    break;
		else		    
		    errAbort("expected CRLF after boundary %s, but found %c%c in MIME",boundary,c1,c2);
	    case nlt_unix:
		if (c1 == 0x0a)
		    break;
		else		    
		    errAbort("expected LF after boundary %s, but found %c in MIME",boundary,c1);
	    case nlt_mac:
		if (c1 == 0x0d)
		    break;
		else		    
		    errAbort("expected CR after boundary %s, but found %c in MIME",boundary,c1);
	    default:
		    errAbort("unexpected nlType %d after boundary %s",nlType,boundary);
	    }
	setEopMB(b);
	}	
    freez(&bnd);
    slReverse(&p->multi);
    /* restore */
    freez(&boundary);
    boundary = parentboundary;
	//debug
    	//fprintf(stderr,"restoring parent boundary = %s\n",boundary);
    setBoundaryMB(b, boundary);

    /* dump any "epilog" that may be between the 
     * end of the child boundary and the parent boundary */
    getChunkMB(b, &bp, &size, &hasZeros);
    //debug
    //fprintf(stderr,"epilog size=%d\n",size);
    	   
    
    }
else
    {
    char *bp=NULL;
    int size=0;
    boolean hasZeros=FALSE;
    boolean toobig=FALSE;
    boolean asFile=FALSE;
    boolean convert=FALSE;
    FILE *f = NULL;
    struct dyString *dy=newDyString(1024);
    //debug
    //fprintf(stderr,"starting new part (non-multi), dumpMB: \n");
    //dumpMB(b);  //debug
    
    //debug
    //ct = hashFindVal(p->hdr,"content-transfer-encoding");  /* use lowercase key */
    //fprintf(stderr,"cte from hash:%s\n",ct);
	
    while(TRUE)
	{
	// break if eop, eod, eoi
    	getChunkMB(b, &bp, &size, &hasZeros);
	//debug
    	//fprintf(stderr,"bp=%lu size=%d, hasZeros=%d \n", 
	//    (unsigned long) bp,
	//    size,
	//    hasZeros);
	if (hasZeros)
	    {
	    p->binary=TRUE;
	    }
	//if (hasZeros && !asFile)
	//    {
	//    convert=TRUE;
	//    }
	if (!asFile && p->size+size > MAXPARTSIZE)
	    {
	    toobig = TRUE;
	    convert=TRUE;
	    }
	if (convert)
	    {
	    struct tempName uploadedData;
	    convert=FALSE;
	    asFile = TRUE;
	    makeTempName(&uploadedData, "hgSs", ".cgi");
	    p->fileName=cloneString(uploadedData.forCgi);
	    f = mustOpen(p->fileName,"w");
	    mustWrite(f,dy->string,dy->stringSize);
	    freeDyString(&dy);
	    }
	if (asFile)
	    {
	    mustWrite(f,bp,size);
	    }
	else
	    {
    	    dyStringAppendN(dy,bp,size);
	    }
	p->size+=size;
	if (p->size > MAXDATASIZE)
	    errAbort("max data size allowable for upload in MIME exceeded %llu",(unsigned long long)MAXDATASIZE);
	    
	
	if (b->eop && b->i == b->eop)  /* end of part */
	    {
	    break;
	    }
	if (b->i == b->eoi && b->eoi < b->eom) /* end of data */
	    {
	    break;
	    }
	moreMimeBuf(b);
	}
    if (dy)
	{
	p->data=needLargeMem(dy->stringSize+1);
	memcpy(p->data,dy->string,dy->stringSize);
	p->data[dy->stringSize] = 0;
    	freeDyString(&dy);
	}
    if (f)
	carefulClose(&f);

    //debug
    //fprintf(stderr,"p->fileName=%s p->data=[%s]\n",p->fileName,p->data);

    }

return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %r15
movq %rdi, %r13
movl $0x38, %edi
callq 0xf07d
movq %rax, %r14
movq $0x0, 0x20(%rsp)
leaq 0x5a40(%rip), %rsi      # 0x1c569
movq %r15, %rdi
callq 0x81e2
movl %eax, 0x38(%rsp)
testl %eax, %eax
jne 0x16c45
xorl %ebx, %ebx
xorl %edi, %edi
callq 0xaf38
movq %rax, 0x50(%rsp)
leaq 0x8(%rsp), %r15
movq %rbx, (%r15)
movq %rbx, 0x18(%rsp)
movq %rbx, (%rsp)
leaq 0x4092(%rip), %r12      # 0x1abf5
movq 0x8030(%r13), %rax
cmpq %rax, 0x8008(%r13)
jb 0x16b7c
cmpq 0x8038(%r13), %rax
jb 0x16bc3
movq %r13, %rdi
callq 0x17347
movq %rax, (%rsp)
testq %rax, %rax
je 0x16b9c
movq %r12, %rdi
movq %rax, %rsi
callq 0x8214
testl %eax, %eax
jne 0x16bd1
movq %r15, %rdi
callq 0xf139
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
testq %rdi, %rdi
je 0x16b63
callq 0x86d7
jmp 0x16b63
leaq 0x59ac(%rip), %rdi      # 0x1c576
xorl %eax, %eax
callq 0xb8d7
leaq 0x50(%rsp), %rbx
movq (%rbx), %rdi
movq %rsp, %r12
movq (%r12), %rdx
addq $0x2, %rdx
movl 0x21912(%rip), %eax     # 0x384fc
cmpl $0x3, %eax
leaq 0x5973(%rip), %rcx      # 0x1c567
leaq 0x58e9(%rip), %rsi      # 0x1c4e4
cmoveq %rcx, %rsi
cmpl $0x2, %eax
leaq 0x58da(%rip), %rcx      # 0x1c4e3
cmovneq %rsi, %rcx
leaq 0x598b(%rip), %rsi      # 0x1c59f
movq %rcx, %r8
xorl %eax, %eax
callq 0xb2d2
movq %rbx, %rdi
callq 0xaf94
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0xf139
leaq 0x18(%rsp), %rdi
callq 0xf139
movq %r12, %rdi
callq 0xf139
xorl %ebx, %ebx
xorl %edi, %edi
callq 0xaf38
movq %rax, 0x50(%rsp)
movq %rbx, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movq %rbx, (%rsp)
movl $0x0, 0x14(%rsp)
movl $0x3, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x8(%r14)
testq %r15, %r15
je 0x16cb3
leaq 0x5bbf(%rip), %rdi      # 0x1c847
movl $0x1, %esi
movq %r15, %rdx
callq 0xcfaa
movq %rax, 0x8(%rsp)
testq %r15, %r15
je 0x16cb3
movq 0x8(%rsp), %rdi
movq %rsp, %rsi
leaq 0x14(%rsp), %rdx
callq 0xd274
jmp 0x16cbf
movq %r13, %rdi
callq 0x17347
movq %rax, (%rsp)
movq (%rsp), %rax
cmpb $0x0, (%rax)
je 0x16c9a
movq %r13, 0x30(%rsp)
movq %r14, 0x28(%rsp)
leaq 0x18(%rsp), %r12
movq %rsp, %rbp
leaq 0x14(%rsp), %r13
movq 0x50(%rsp), %rax
movl $0x0, 0x14(%rax)
movq 0x8(%rax), %rax
movb $0x0, (%rax)
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
testq %r15, %r15
je 0x16d12
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xd274
jmp 0x16d20
movq 0x30(%rsp), %rdi
callq 0x17347
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xb18d
testq %r15, %r15
jne 0x16d3c
movq %r12, %rdi
callq 0xf139
callq 0x37a0
movq (%rax), %rax
movq (%rsp), %rcx
movsbq (%rcx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x16cf2
movq 0x50(%rsp), %rax
movq 0x8(%rax), %r14
movq %r14, 0x18(%rsp)
movq %r14, %rdi
movl $0x3a, %esi
callq 0x3260
movq %rax, %rbx
testq %rax, %rax
jne 0x16d87
leaq 0x5ad6(%rip), %rdi      # 0x1c853
movq %r14, %rsi
xorl %eax, %eax
callq 0xb8d7
movb $0x0, (%rbx)
incq %rbx
movq %r14, %rdi
callq 0x90a7
movq %rax, %r14
movq %rax, %rdi
callq 0x8961
movq %rbx, %rdi
callq 0x90a7
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rbx
movq %rax, %rdi
callq 0x647e
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xc04f
movq (%rsp), %rax
cmpb $0x0, (%rax)
jne 0x16cdf
testq %r15, %r15
je 0x16e06
cmpl $0x0, 0x2171c(%rip)     # 0x384fc
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %r13
jne 0x16dfa
movq 0x8(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, 0x21702(%rip)     # 0x384fc
leaq 0x8(%rsp), %rdi
callq 0xd800
jmp 0x16e18
movq %rsp, %rdi
callq 0xf139
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %r13
leaq 0x50(%rsp), %rdi
callq 0xaf75
movq 0x8(%rbx), %rdi
leaq 0x5457(%rip), %rsi      # 0x1c284
callq 0xc2ba
testq %rax, %rax
je 0x17117
movq %rax, %r15
leaq 0x578c(%rip), %rdi      # 0x1c5d1
movq %rax, %rsi
callq 0x8214
testl %eax, %eax
je 0x17117
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, (%rsp)
movl %eax, 0x14(%rsp)
movq 0x8018(%r13), %rax
movq %rax, 0x48(%rsp)
leaq 0x5761(%rip), %rsi      # 0x1c5dc
movq %r15, %rdi
callq 0x169ae
movq %rax, 0x20(%rsp)
movq %rax, %rdi
callq 0x3200
cmpq $0x4d, %rax
jb 0x16ea7
leaq 0x5748(%rip), %rdi      # 0x1c5e5
movq %r15, %rsi
xorl %eax, %eax
callq 0xb8d7
leaq 0x20(%rsp), %rbx
movq (%rbx), %rcx
leaq 0x576e(%rip), %rdx      # 0x1c624
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movl $0x4d, %esi
xorl %eax, %eax
callq 0xa2ce
movq %rbx, %rdi
callq 0xf139
movq %r14, %rdi
callq 0x647e
movq %rax, (%rbx)
cmpl $0x0, 0x38(%rsp)
movq 0x28(%rsp), %r14
je 0x16f3c
movq %r13, %rdi
callq 0x17347
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x3440
testl %eax, %eax
je 0x16f32
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xf139
movq %r13, %rdi
callq 0x17347
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x3440
testl %eax, %eax
jne 0x16f0c
leaq 0x8(%rsp), %rdi
callq 0xf139
movl 0x215ba(%rip), %eax     # 0x384fc
cmpl $0x3, %eax
leaq 0x561b(%rip), %rcx      # 0x1c567
leaq 0x5591(%rip), %rdx      # 0x1c4e4
cmoveq %rcx, %rdx
cmpl $0x2, %eax
leaq 0x5582(%rip), %rcx      # 0x1c4e3
cmovneq %rdx, %rcx
leaq 0x20(%rsp), %rbx
movq (%rbx), %r8
leaq 0x3223(%rip), %rdx      # 0x1a197
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movl $0x4d, %esi
xorl %eax, %eax
callq 0xa2ce
movq %rbx, %rdi
callq 0xf139
movq %r12, %rdi
callq 0x647e
movq %rax, (%rbx)
movq %r13, %rdi
movq %rax, %rsi
callq 0x17426
movq %r13, %rdi
xorl %esi, %esi
callq 0x16af5
movq 0x30(%r14), %rcx
movq %rcx, (%rax)
movq %rax, 0x30(%r14)
leaq 0x8(%rsp), %rdi
callq 0xf139
movq 0x20(%rsp), %r15
cmpb $0x0, (%r15)
movl $0x0, %ebx
je 0x16ff8
xorl %ebx, %ebx
movq %r13, %rdi
callq 0x17482
movb %al, 0x50(%rsp,%rbx)
incq %rbx
movq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x3200
cmpq %rbx, %rax
ja 0x16fd7
movb $0x0, 0x50(%rsp,%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3440
testl %eax, %eax
je 0x17020
leaq 0x5616(%rip), %rdi      # 0x1c629
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0xb8d7
movq %r13, %rdi
callq 0x17482
movl %eax, %ebp
movb $0x20, %r15b
cmpb $0x2d, %al
jne 0x1705f
movq %r13, %rdi
callq 0x17482
cmpb $0x2d, %al
je 0x172e7
movl %eax, %r15d
movsbl %al, %ecx
movq 0x20(%rsp), %rsi
leaq 0x5601(%rip), %rdi      # 0x1c654
movl $0x2d, %edx
xorl %eax, %eax
callq 0xb8d7
cmpl $0x2, 0x21496(%rip)     # 0x384fc
jne 0x17073
movq %r13, %rdi
callq 0x17482
movl %eax, %r15d
movsbl %bpl, %r13d
movl 0x2147f(%rip), %eax     # 0x384fc
cmpl $0x1, %eax
je 0x170b4
cmpl $0x3, %eax
je 0x170d0
cmpl $0x2, %eax
jne 0x170ec
movl %ebp, %eax
xorb $0xd, %al
movl %r15d, %ecx
xorb $0xa, %cl
orb %al, %cl
je 0x17105
movsbl %r15b, %ecx
movq 0x20(%rsp), %rsi
leaq 0x55e0(%rip), %rdi      # 0x1c68a
movl %r13d, %edx
xorl %eax, %eax
callq 0xb8d7
cmpb $0xa, %bpl
je 0x17105
movq 0x20(%rsp), %rsi
leaq 0x55fc(%rip), %rdi      # 0x1c6c2
movl %r13d, %edx
xorl %eax, %eax
callq 0xb8d7
cmpb $0xd, %bpl
je 0x17105
movq 0x20(%rsp), %rsi
leaq 0x5614(%rip), %rdi      # 0x1c6f6
movl %r13d, %edx
xorl %eax, %eax
callq 0xb8d7
movl 0x2140a(%rip), %esi     # 0x384fc
movq 0x20(%rsp), %rdx
leaq 0x562c(%rip), %rdi      # 0x1c72a
xorl %eax, %eax
callq 0xb8d7
movq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0x174eb
jmp 0x16fa6
movabsq $0x1000000000, %r15     # imm = 0x1000000000
xorl %eax, %eax
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
leaq 0x14(%rsp), %rbx
movl %eax, (%rbx)
leaq 0x44(%rsp), %rbp
movl %eax, (%rbp)
movq %rax, 0x18(%rsp)
movl $0x400, %edi            # imm = 0x400
callq 0xaf38
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x1(%r15), %rax
movq %rax, 0x38(%rsp)
xorl %r14d, %r14d
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
callq 0x17521
cmpl $0x0, 0x44(%rsp)
je 0x17180
movq 0x28(%rsp), %rax
movl $0x1, 0x28(%rax)
testl %r14d, %r14d
jne 0x171fc
movslq 0x14(%rsp), %rax
movq 0x28(%rsp), %rcx
addq 0x10(%rcx), %rax
cmpq 0x38(%rsp), %rax
jl 0x171fc
leaq 0x50(%rsp), %r14
movq %r14, %rdi
leaq 0x55a8(%rip), %rsi      # 0x1c751
leaq 0x55a6(%rip), %rdx      # 0x1c756
callq 0x17584
movq %r14, %rdi
callq 0x647e
movq 0x28(%rsp), %rcx
movq %rax, 0x20(%rcx)
movq %rax, %rdi
leaq 0x2853(%rip), %rsi      # 0x19a23
callq 0x9532
movq %rax, 0x18(%rsp)
movq (%rsp), %rcx
movq 0x8(%rcx), %rsi
movslq 0x14(%rcx), %rdx
movq %rax, %rdi
callq 0x95f6
movq %rsp, %rdi
callq 0xaf75
movl $0x1, %r14d
movq 0x8(%rsp), %rsi
movslq 0x14(%rsp), %rdx
testl %r14d, %r14d
je 0x17217
movq 0x18(%rsp), %rdi
callq 0x95f6
jmp 0x17220
movq (%rsp), %rdi
callq 0xb042
movslq 0x14(%rsp), %rax
movq 0x28(%rsp), %rcx
addq 0x10(%rcx), %rax
movq %rax, 0x10(%rcx)
cmpq %r15, %rax
jle 0x17248
leaq 0x551d(%rip), %rdi      # 0x1c75b
movq %r15, %rsi
xorl %eax, %eax
callq 0xb8d7
movq 0x30(%rsp), %r13
movq 0x8010(%r13), %rax
testq %rax, %rax
je 0x17262
cmpq %rax, 0x8008(%r13)
je 0x17288
movq 0x8030(%r13), %rax
cmpq %rax, 0x8008(%r13)
jne 0x1727b
cmpq 0x8038(%r13), %rax
jb 0x17288
movq %r13, %rdi
callq 0x1682f
jmp 0x1715c
movq (%rsp), %rax
testq %rax, %rax
movq 0x28(%rsp), %r14
je 0x172d3
movslq 0x14(%rax), %rdi
incq %rdi
callq 0xee85
movq %rax, 0x18(%r14)
movq %rsp, %rbx
movq (%rbx), %rcx
movq 0x8(%rcx), %rsi
movslq 0x14(%rcx), %rdx
movq %rax, %rdi
callq 0x34a0
movq 0x18(%r14), %rax
movq (%rbx), %rcx
movslq 0x14(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq %rbx, %rdi
callq 0xaf75
cmpq $0x0, 0x18(%rsp)
je 0x17332
leaq 0x18(%rsp), %rdi
callq 0x9bbc
jmp 0x17332
movq %r14, %rbx
addq $0x30, %rbx
leaq 0x8(%rsp), %rdi
callq 0xf139
movq %rbx, %rdi
callq 0x673b
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0xf139
movq 0x48(%rsp), %rsi
movq %rsi, (%rbx)
movq %r13, %rdi
callq 0x17426
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x14(%rsp), %rcx
movq %r13, %rdi
callq 0x17521
movq %r14, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq