// File: /workspace/github_c_makefile_star2_O2/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, %r13
movq %rdi, %r12
pushq $0x38
popq %rdi
callq 0xd87c
movq %rax, 0x38(%rsp)
movq %rax, %rbx
andq $0x0, 0x18(%rsp)
leaq 0x5861(%rip), %rsi      # 0x1a545
movq %r13, %rdi
callq 0x7677
movl %eax, 0x40(%rsp)
testl %eax, %eax
movq %rbx, 0x28(%rsp)
jne 0x14e0d
xorl %edi, %edi
callq 0x9df0
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq %rax, 0x50(%rsp)
andq $0x0, 0x20(%rsp)
andq $0x0, (%rsp)
leaq 0x582e(%rip), %r15      # 0x1a552
movq 0x8030(%r12), %rax
cmpq %rax, 0x8008(%r12)
jb 0x14d40
cmpq 0x8038(%r12), %rax
jb 0x14d87
movq %r12, %rdi
callq 0x154d7
movq %rax, (%rsp)
testq %rax, %rax
je 0x14d60
movq %r15, %rdi
movq %rax, %rsi
callq 0x76a5
testl %eax, %eax
jne 0x14d95
movq %rbx, %rdi
callq 0xd909
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
testq %rdi, %rdi
je 0x14d24
callq 0x7b17
jmp 0x14d24
leaq 0x57c7(%rip), %rdi      # 0x1a555
xorl %eax, %eax
callq 0xa61f
leaq 0x50(%rsp), %r14
movq (%r14), %rdi
movq %rsp, %rbx
movq (%rbx), %rdx
addq $0x2, %rdx
movl 0x2276f(%rip), %eax     # 0x3751c
cmpl $0x3, %eax
leaq 0x578c(%rip), %rcx      # 0x1a543
leaq 0x5702(%rip), %rsi      # 0x1a4c0
cmoveq %rcx, %rsi
cmpl $0x2, %eax
leaq 0x56f3(%rip), %rcx      # 0x1a4bf
cmovneq %rsi, %rcx
leaq 0x57a7(%rip), %rsi      # 0x1a57e
movq %rcx, %r8
xorl %eax, %eax
callq 0xa0eb
movq %r14, %rdi
callq 0x9e4a
movq %rax, %r13
leaq 0x8(%rsp), %rdi
callq 0xd909
leaq 0x20(%rsp), %rdi
callq 0xd909
movq %rbx, %rdi
callq 0xd909
movq 0x28(%rsp), %rbx
movq %r12, 0x30(%rsp)
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x9df0
andq $0x0, 0x8(%rsp)
movq %rax, %r12
andq $0x0, (%rsp)
movq %rax, 0x50(%rsp)
andl $0x0, 0x14(%rsp)
pushq $0x3
popq %rdi
pushq $0x1
popq %rsi
callq 0xb010
movq %rax, 0x8(%rbx)
testq %r13, %r13
je 0x14e61
leaq 0x59d8(%rip), %rdi      # 0x1a826
pushq $0x1
popq %rsi
movq %r13, %rdx
callq 0xba3c
movq %rax, %rbp
movq %rax, 0x8(%rsp)
movq %rsp, %rbx
leaq 0x14(%rsp), %r15
testq %r13, %r13
je 0x14e82
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xbcea
movq (%rsp), %rax
jmp 0x14e90
movq 0x30(%rsp), %rdi
callq 0x154d7
movq %rax, (%rsp)
cmpb $0x0, (%rax)
je 0x14e69
leaq 0x20(%rsp), %rbx
movq %rsp, %r14
leaq 0x14(%rsp), %r15
andl $0x0, 0x14(%r12)
movq 0x8(%r12), %rax
movb $0x0, (%rax)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
testq %r13, %r13
je 0x14ece
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xbcea
jmp 0x14edc
movq 0x30(%rsp), %rdi
callq 0x154d7
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x9ffe
testq %r13, %r13
jne 0x14ef6
movq %rbx, %rdi
callq 0xd909
callq 0x37a0
movq (%rax), %rcx
movq (%rsp), %rax
movsbq (%rax), %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x14eb4
movq 0x8(%r12), %rbx
movq %rbx, 0x20(%rsp)
movq %rbx, %rdi
pushq $0x3a
popq %rsi
callq 0x3260
movq %rax, %r14
testq %rax, %rax
jne 0x14f3b
leaq 0x5901(%rip), %rdi      # 0x1a832
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
movb $0x0, (%r14)
incq %r14
movq %rbx, %rdi
callq 0x835e
movq %rax, %rbx
movq %rax, %rdi
callq 0x7d4d
movq %r14, %rdi
callq 0x835e
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %r14
movq %rax, %rdi
callq 0x5ede
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xad17
movq (%rsp), %rax
cmpb $0x0, (%rax)
leaq 0x20(%rsp), %rbx
movq %rsp, %r14
jne 0x14ea2
testq %r13, %r13
je 0x14fbe
cmpl $0x0, 0x2257f(%rip)     # 0x3751c
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %r12
jne 0x14fb2
movl 0x38(%rbp), %eax
movl %eax, 0x2256a(%rip)     # 0x3751c
leaq 0x8(%rsp), %rdi
callq 0xc178
jmp 0x14fd0
movq %rsp, %rdi
callq 0xd909
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %r12
leaq 0x50(%rsp), %rdi
callq 0x9e2b
movq 0x8(%rbx), %rdi
leaq 0x52ac(%rip), %rsi      # 0x1a291
callq 0xaf0d
testq %rax, %rax
je 0x1529b
movq %rax, %rbx
leaq 0x55b3(%rip), %rdi      # 0x1a5b0
movq %rax, %rsi
callq 0x76a5
testl %eax, %eax
je 0x1529b
andq $0x0, 0x8(%rsp)
movq 0x8018(%r12), %rax
movq %rax, 0x48(%rsp)
leaq 0x5594(%rip), %rsi      # 0x1a5bb
movq %rbx, %rdi
callq 0x14b8c
movq %rax, %r15
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x3200
cmpq $0x4d, %rax
jb 0x15056
leaq 0x5578(%rip), %rdi      # 0x1a5c4
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
leaq 0x55a6(%rip), %rdx      # 0x1a603
leaq 0x50(%rsp), %rbx
pushq $0x4d
popq %rsi
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x939d
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0xd909
movq %rbx, %rdi
callq 0x5ede
movq %rax, (%r14)
cmpl $0x0, 0x40(%rsp)
je 0x150c3
leaq 0x8(%rsp), %rbx
movq %r12, %rdi
callq 0x154d7
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x3440
movl %eax, %ebp
movq %rbx, %rdi
callq 0xd909
testl %ebp, %ebp
jne 0x15096
movq 0x18(%rsp), %rax
movl 0x22453(%rip), %ecx     # 0x3751c
cmpl $0x3, %ecx
leaq 0x5470(%rip), %rdx      # 0x1a543
leaq 0x53e6(%rip), %rsi      # 0x1a4c0
cmoveq %rdx, %rsi
cmpl $0x2, %ecx
leaq 0x53d7(%rip), %rcx      # 0x1a4bf
cmovneq %rsi, %rcx
leaq 0x30b4(%rip), %rdx      # 0x181a7
leaq 0x50(%rsp), %r13
pushq $0x4d
popq %rsi
movq %r13, %rdi
movq %rax, %r8
xorl %eax, %eax
callq 0x939d
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xd909
movq %r13, %rdi
callq 0x5ede
movq %rax, (%rbx)
movq %r12, %rdi
movq %rax, %rsi
callq 0x155c3
addq $0x30, 0x38(%rsp)
leaq 0x8(%rsp), %rbp
movq %r12, %rdi
xorl %esi, %esi
callq 0x14cb0
movq 0x38(%rsp), %rdx
movq (%rdx), %rcx
movq %rcx, (%rax)
movq %rax, (%rdx)
movq %rbp, %rdi
callq 0xd909
xorl %r14d, %r14d
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x3200
cmpq %r14, %rax
jbe 0x1517d
movq %r12, %rdi
callq 0x155f6
movb %al, 0x50(%rsp,%r14)
incq %r14
jmp 0x15159
movb $0x0, 0x50(%rsp,%r14)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3440
testl %eax, %eax
je 0x151a6
leaq 0x546f(%rip), %rdi      # 0x1a608
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0xa61f
movq %r12, %rdi
callq 0x155f6
movl %eax, %ebx
movb $0x20, %r15b
cmpb $0x2d, %al
jne 0x151e3
movq %r12, %rdi
callq 0x155f6
cmpb $0x2d, %al
je 0x1547a
movl %eax, %r15d
movsbl %al, %ecx
movq 0x18(%rsp), %rsi
leaq 0x545a(%rip), %rdi      # 0x1a633
pushq $0x2d
popq %rdx
xorl %eax, %eax
callq 0xa61f
movl 0x22333(%rip), %esi     # 0x3751c
cmpl $0x2, %esi
jne 0x151ff
movq %r12, %rdi
callq 0x155f6
movl %eax, %r15d
movl 0x2231d(%rip), %esi     # 0x3751c
movsbl %bl, %r12d
cmpl $0x1, %esi
je 0x1523a
cmpl $0x3, %esi
je 0x15255
cmpl $0x2, %esi
jne 0x15276
movl %ebx, %eax
xorb $0xd, %al
movl %r15d, %ecx
xorb $0xa, %cl
orb %al, %cl
je 0x15289
movsbl %r15b, %ecx
movq 0x18(%rsp), %rsi
leaq 0x5439(%rip), %rdi      # 0x1a669
movl %r12d, %edx
xorl %eax, %eax
callq 0xa61f
cmpb $0xa, %bl
je 0x15289
movq 0x18(%rsp), %rsi
leaq 0x5456(%rip), %rdi      # 0x1a6a1
movl %r12d, %edx
xorl %eax, %eax
callq 0xa61f
cmpb $0xd, %bl
je 0x15289
movq 0x18(%rsp), %rsi
leaq 0x546f(%rip), %rdi      # 0x1a6d5
movl %r12d, %edx
xorl %eax, %eax
callq 0xa61f
movl 0x222a6(%rip), %esi     # 0x3751c
movq 0x18(%rsp), %rdx
leaq 0x5487(%rip), %rdi      # 0x1a709
xorl %eax, %eax
callq 0xa61f
movq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x15662
jmp 0x15136
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
movq %r12, %rbx
leaq 0x14(%rsp), %r12
andl $0x0, (%r12)
leaq 0x44(%rsp), %r13
andl $0x0, (%r13)
movabsq $0x1000000000, %rbp     # imm = 0x1000000000
andq $0x0, 0x20(%rsp)
movl $0x400, %edi            # imm = 0x400
callq 0x9df0
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x1(%rbp), %rax
movq %rax, 0x38(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x15698
cmpl $0x0, 0x44(%rsp)
je 0x15310
movq 0x28(%rsp), %rax
movl $0x1, 0x28(%rax)
movslq 0x14(%rsp), %rbx
testl %r14d, %r14d
jne 0x153a4
movq 0x28(%rsp), %r14
movq 0x10(%r14), %rax
addq %rbx, %rax
cmpq 0x38(%rsp), %rax
jge 0x15346
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %ebx, %edx
callq 0x9eec
xorl %r14d, %r14d
jmp 0x153b9
leaq 0x50(%rsp), %r15
movq %r15, %rdi
leaq 0x53db(%rip), %rsi      # 0x1a730
leaq 0x53d9(%rip), %rdx      # 0x1a735
callq 0x15718
movq %r15, %rdi
callq 0x5ede
movq %rax, 0x20(%r14)
movq %rax, %rdi
leaq 0x26bc(%rip), %rsi      # 0x17a33
callq 0x8645
movq %rax, %r15
movq %rax, 0x20(%rsp)
movq (%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x14(%rax), %rdx
movq %r15, %rdi
callq 0x870b
movq %rsp, %rdi
callq 0x9e2b
pushq $0x1
popq %r14
movq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x870b
movslq 0x14(%rsp), %rbx
movq 0x28(%rsp), %rax
addq 0x10(%rax), %rbx
movq %rbx, 0x10(%rax)
cmpq %rbp, %rbx
jle 0x153dc
leaq 0x5368(%rip), %rdi      # 0x1a73a
movq %rbp, %rsi
xorl %eax, %eax
callq 0xa61f
movq 0x30(%rsp), %rbx
movq 0x8008(%rbx), %rax
movq 0x8010(%rbx), %rcx
testq %rcx, %rcx
setne %dl
cmpq %rcx, %rax
sete %cl
testb %cl, %dl
jne 0x1541e
cmpq 0x8030(%rbx), %rax
jne 0x15411
cmpq 0x8038(%rbx), %rax
jb 0x1541e
movq %rbx, %rdi
callq 0x14a51
jmp 0x152ea
movq (%rsp), %rax
testq %rax, %rax
je 0x15469
movslq 0x14(%rax), %rdi
incq %rdi
callq 0xd684
movq 0x28(%rsp), %r14
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 0x9e2b
testq %r15, %r15
je 0x154c0
leaq 0x20(%rsp), %rdi
callq 0x8c9c
jmp 0x154c0
leaq 0x8(%rsp), %rdi
callq 0xd909
movq 0x38(%rsp), %rdi
callq 0x613f
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xd909
movq 0x48(%rsp), %rsi
movq %rsi, (%rbx)
movq %r12, %rdi
callq 0x155c3
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
leaq 0x14(%rsp), %rcx
movq %r12, %rdi
callq 0x15698
movq 0x28(%rsp), %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq