// File: karel-brinda[P]ococo/ext/htslib/cram/cram_encode.c
// Function: cram_encode_aux_1_0
static char *cram_encode_aux_1_0(cram_fd *fd, bam_seq_t *b, cram_container *c,
				 cram_slice *s, cram_record *cr) {
    char *aux, *tmp, *rg = NULL;
    int aux_size = bam_blk_size(b) -
	((char *)bam_aux(b) - (char *)&bam_ref(b));
	
    /* Worst case is 1 nul char on every ??:Z: string, so +33% */
    BLOCK_GROW(s->aux_blk, aux_size*1.34+1);
    tmp = (char *)BLOCK_END(s->aux_blk);

    aux = (char *)bam_aux(b);
    cr->TN_idx = s->nTN;

    while (aux[0] != 0) {
	int32_t i32;
	int r;

	if (aux[0] == 'R' && aux[1] == 'G' && aux[2] == 'Z') {
	    rg = &aux[3];
	    while (*aux++);
	    continue;
	}
	if (aux[0] == 'M' && aux[1] == 'D' && aux[2] == 'Z') {
	    while (*aux++);
	    continue;
	}
	if (aux[0] == 'N' && aux[1] == 'M') {
	    switch(aux[2]) {
	    case 'A': case 'C': case 'c': aux+=4; break;
	    case 'I': case 'i': case 'f': aux+=7; break;
	    default:
		fprintf(stderr, "Unhandled type code for NM tag\n");
		return NULL;
	    }
	    continue;
	}

	cr->ntags++;

	i32 = (aux[0]<<16) | (aux[1]<<8) | aux[2];
	kh_put(s_i2i, c->tags_used, i32, &r);
	if (-1 == r)
	    return NULL;

	if (s->nTN >= s->aTN) {
	    s->aTN = s->aTN ? s->aTN*2 : 1024;
	    if (!(s->TN = realloc(s->TN, s->aTN * sizeof(*s->TN))))
		return NULL;
	}
	s->TN[s->nTN++] = i32;
	cram_stats_add(c->stats[DS_TN], i32);

	switch(aux[2]) {
	case 'A': case 'C': case 'c':
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    *tmp++=*aux++;
	    break;

	case 'S': case 's':
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    *tmp++=*aux++; *tmp++=*aux++;
	    break;

	case 'I': case 'i': case 'f':
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    break;

	case 'd':
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    break;

	case 'Z': case 'H':
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;
	    while ((*tmp++=*aux++));
	    *tmp++ = '\t'; // stop byte
	    break;

	case 'B': {
	    int type = aux[3], blen;
	    uint32_t count = (uint32_t)((((unsigned char *)aux)[4]<< 0) +
					(((unsigned char *)aux)[5]<< 8) +
					(((unsigned char *)aux)[6]<<16) +
					(((unsigned char *)aux)[7]<<24));
	    // skip TN field
	    aux+=3; //*tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;

	    // We use BYTE_ARRAY_LEN with external length, so store that first
	    switch (type) {
	    case 'c': case 'C':
		blen = count;
		break;
	    case 's': case 'S':
		blen = 2*count;
		break;
	    case 'i': case 'I': case 'f':
		blen = 4*count;
		break;
	    default:
		fprintf(stderr, "Unknown sub-type '%c' for aux type 'B'\n",
			type);
		return NULL;
		    
	    }

	    tmp += itf8_put(tmp, blen+5);

	    *tmp++=*aux++; // sub-type & length
	    *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++; *tmp++=*aux++;

	    // The tag data itself
	    memcpy(tmp, aux, blen); tmp += blen; aux += blen;

	    //cram_stats_add(c->aux_B_stats, blen);
	    break;
	}
	default:
	    fprintf(stderr, "Unknown aux type '%c'\n", aux[2]);
	    return NULL;
	}
    }
    cram_stats_add(c->stats[DS_TC], cr->ntags);

    cr->aux = BLOCK_SIZE(s->aux_blk);
    cr->aux_size = (uc *)tmp - (BLOCK_DATA(s->aux_blk) + cr->aux);
    BLOCK_SIZE(s->aux_blk) = (uc *)tmp - BLOCK_DATA(s->aux_blk);
    assert(s->aux_blk->byte <= s->aux_blk->alloc);

    return rg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x18(%rbp), %rax
movslq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rdx
shrq $0x30, %rdx
shll $0x2, %edx
movslq %edx, %rdx
addq %rdx, %rcx
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rdx
shrq $0x18, %rdx
andq $0xff, %rdx
movslq %edx, %rdx
addq %rdx, %rcx
movq -0x18(%rbp), %rdx
movl 0x10(%rdx), %edx
addl $0x1, %edx
sarl %edx
movslq %edx, %rdx
addq %rdx, %rcx
movq -0x18(%rbp), %rdx
movslq 0x10(%rdx), %rdx
addq %rdx, %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl %eax, -0x4c(%rbp)
jmp 0x3c1f1
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x28(%rax), %xmm1
movaps 0x3e8d8(%rip), %xmm3    # 0x7aae0
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x3e8dc(%rip), %xmm2    # 0x7aaf0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq 0x30(%rax), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
cvtsi2sdl -0x4c(%rbp), %xmm2
movsd 0x3fc30(%rip), %xmm3    # 0x7be78
mulsd %xmm3, %xmm2
movsd 0x3be34(%rip), %xmm3    # 0x78088
addsd %xmm3, %xmm2
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x3c340
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3c2bd
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x28(%rax), %xmm0
movaps 0x3e851(%rip), %xmm1    # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x3e855(%rip), %xmm1    # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x3f826(%rip), %xmm1    # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x3c2cc
movsd 0x3f80b(%rip), %xmm0    # 0x7bad0
movsd %xmm0, -0x68(%rbp)
jmp 0x3c2cc
movsd -0x68(%rbp), %xmm0
movsd 0x3e7e7(%rip), %xmm2    # 0x7aac0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x28(%rax), %rsi
callq 0x4990
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0x3c1f1
jmp 0x3c342
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x88(%rcx), %rcx
addq 0x30(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x30, %rcx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
shrq $0x18, %rcx
andq $0xff, %rcx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movl 0x10(%rcx), %ecx
addl $0x1, %ecx
sarl %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
movslq 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl 0x58(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3cc81
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x52, %eax
jne 0x3c423
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x47, %eax
jne 0x3c423
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5a, %eax
jne 0x3c423
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpb $0x0, (%rax)
je 0x3c421
jmp 0x3c40b
jmp 0x3c3c9
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4d, %eax
jne 0x3c466
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x44, %eax
jne 0x3c466
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x5a, %eax
jne 0x3c466
jmp 0x3c44b
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpb $0x0, (%rax)
je 0x3c461
jmp 0x3c44b
jmp 0x3c3c9
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
jne 0x3c511
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x4d, %eax
jne 0x3c511
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
movl %eax, -0x6c(%rbp)
subl $0x41, %eax
je 0x3c4cb
jmp 0x3c499
movl -0x6c(%rbp), %eax
subl $0x43, %eax
je 0x3c4cb
jmp 0x3c4a3
movl -0x6c(%rbp), %eax
subl $0x49, %eax
je 0x3c4d9
jmp 0x3c4ad
movl -0x6c(%rbp), %eax
subl $0x63, %eax
je 0x3c4cb
jmp 0x3c4b7
movl -0x6c(%rbp), %eax
subl $0x66, %eax
je 0x3c4d9
jmp 0x3c4c1
movl -0x6c(%rbp), %eax
subl $0x69, %eax
je 0x3c4d9
jmp 0x3c4e7
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x3c50c
movq -0x38(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x38(%rbp)
jmp 0x3c50c
movq 0x4dae2(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
leaq 0x401f3(%rip), %rsi     # 0x7c6eb
movb $0x0, %al
callq 0x4830
movq $0x0, -0x8(%rbp)
jmp 0x3cd48
jmp 0x3c3c9
movq -0x30(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
shll $0x10, %eax
movq -0x38(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x38(%rbp), %rcx
movsbl 0x2(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x238(%rax), %rdi
movl -0x50(%rbp), %esi
leaq -0x54(%rbp), %rdx
callq 0x40960
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x54(%rbp), %eax
jne 0x3c570
movq $0x0, -0x8(%rbp)
jmp 0x3cd48
movq -0x28(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jl 0x3c5e2
movq -0x28(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
je 0x3c598
movq -0x28(%rbp), %rax
movl 0x5c(%rax), %eax
shll %eax
movl %eax, -0x70(%rbp)
jmp 0x3c5a2
movl $0x400, %eax            # imm = 0x400
movl %eax, -0x70(%rbp)
jmp 0x3c5a2
movl -0x70(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rax
movslq 0x5c(%rax), %rsi
shlq $0x2, %rsi
callq 0x4990
movq -0x28(%rbp), %rcx
movq %rax, 0x50(%rcx)
cmpq $0x0, %rax
jne 0x3c5e0
movq $0x0, -0x8(%rbp)
jmp 0x3cd48
jmp 0x3c5e2
movl -0x50(%rbp), %edx
movq -0x28(%rbp), %rsi
movq 0x50(%rsi), %rax
movslq 0x58(%rsi), %rcx
movl %ecx, %edi
incl %edi
movl %edi, 0x58(%rsi)
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x1f8(%rax), %rdi
movl -0x50(%rbp), %esi
callq 0x54c30
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x32, %eax
ja 0x3cc4f
movq -0x78(%rbp), %rax
leaq 0x3f9fd(%rip), %rcx     # 0x7c030
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x3cc7c
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x3cc7c
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x3cc7c
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
jmp 0x3cc7c
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %al
movq -0x40(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
je 0x3c8b2
jmp 0x3c88a
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x9, (%rax)
jmp 0x3cc7c
movq -0x38(%rbp), %rax
movsbl 0x3(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x38(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x7c(%rbp)
subl $0x43, %eax
je 0x3c933
jmp 0x3c8f7
movl -0x7c(%rbp), %eax
subl $0x49, %eax
je 0x3c945
jmp 0x3c901
movl -0x7c(%rbp), %eax
subl $0x53, %eax
je 0x3c93b
jmp 0x3c90b
movl -0x7c(%rbp), %eax
subl $0x63, %eax
je 0x3c933
jmp 0x3c915
movl -0x7c(%rbp), %eax
subl $0x66, %eax
je 0x3c945
jmp 0x3c91f
movl -0x7c(%rbp), %eax
subl $0x69, %eax
je 0x3c945
jmp 0x3c929
movl -0x7c(%rbp), %eax
subl $0x73, %eax
je 0x3c93b
jmp 0x3c950
movl -0x60(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x3c978
movl -0x60(%rbp), %eax
shll %eax
movl %eax, -0x5c(%rbp)
jmp 0x3c978
movl -0x60(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x5c(%rbp)
jmp 0x3c978
movq 0x4d679(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movl -0x58(%rbp), %edx
leaq 0x3fda7(%rip), %rsi     # 0x7c70b
movb $0x0, %al
callq 0x4830
movq $0x0, -0x8(%rbp)
jmp 0x3cd48
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x3c9a1
movl -0x5c(%rbp), %eax
addl $0x5, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x3cb5f
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0x3c9eb
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x8, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, %eax
movl %eax, -0x84(%rbp)
jmp 0x3cb56
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0x3ca4c
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x10, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, %eax
movl %eax, -0x88(%rbp)
jmp 0x3cb4a
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x3cac1
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x18, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x4, %eax
movl %eax, -0x8c(%rbp)
jmp 0x3cb3e
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x1c, %eax
andl $0xff, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x14, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0xc, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
sarl $0x4, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x3(%rax)
movl -0x5c(%rbp), %eax
addl $0x5, %eax
andl $0xf, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x4(%rax)
movl $0x5, %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movb (%rax), %cl
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x40(%rbp)
movb %cl, (%rax)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x5c(%rbp), %rdx
callq 0x4460
movl -0x5c(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x5c(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x3cc7c
movq 0x4d37a(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movsbl 0x2(%rax), %edx
leaq 0x3facb(%rip), %rsi     # 0x7c733
movb $0x0, %al
callq 0x4830
movq $0x0, -0x8(%rbp)
jmp 0x3cd48
jmp 0x3c3c9
movq -0x20(%rbp), %rax
movq 0x220(%rax), %rdi
movq -0x30(%rbp), %rax
movl 0x38(%rax), %esi
callq 0x54c30
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x30(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x88(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0x30(%rbp), %rdx
movslq 0x3c(%rdx), %rdx
addq %rdx, %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x20(%rax), %rax
subq %rax, %rcx
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x88(%rcx), %rcx
cmpq 0x28(%rcx), %rax
ja 0x3cd21
jmp 0x3cd40
leaq 0x3fa22(%rip), %rdi     # 0x7c74a
leaq 0x3f80f(%rip), %rsi     # 0x7c53e
movl $0x87b, %edx            # imm = 0x87B
leaq 0x3fa35(%rip), %rcx     # 0x7c770
callq 0x4360
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)