// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/htslib/cram/cram_decode.c
// Function: cram_dependent_data_series
int cram_dependent_data_series(cram_fd *fd,
			       cram_block_compression_hdr *hdr,
			       cram_slice *s) {
    int *block_used;
    int core_used = 0;
    int i;
    static int i_to_id[] = {
	DS_BF, DS_AP, DS_FP, DS_RL, DS_DL, DS_NF, DS_BA, DS_QS,
	DS_FC, DS_FN, DS_BS, DS_IN, DS_RG, DS_MQ, DS_TL, DS_RN,
	DS_NS, DS_NP, DS_TS, DS_MF, DS_CF, DS_RI, DS_RS, DS_PD,
	DS_HC, DS_SC, DS_BB, DS_QQ,
    };
    uint32_t orig_ds;

    /*
     * Set the data_series bit field based on fd->required_fields
     * contents.
     */
    if (fd->required_fields && fd->required_fields != INT_MAX) {
	hdr->data_series = 0;

	if (fd->required_fields & SAM_QNAME)
	    hdr->data_series |= CRAM_RN;

	if (fd->required_fields & SAM_FLAG)
	    hdr->data_series |= CRAM_BF;

	if (fd->required_fields & SAM_RNAME)
	    hdr->data_series |= CRAM_RI | CRAM_BF;

	if (fd->required_fields & SAM_POS)
	    hdr->data_series |= CRAM_AP | CRAM_BF;

	if (fd->required_fields & SAM_MAPQ)
	    hdr->data_series |= CRAM_MQ;

	if (fd->required_fields & SAM_CIGAR)
	    hdr->data_series |= CRAM_CIGAR;

	if (fd->required_fields & SAM_RNEXT)
	    hdr->data_series |= CRAM_CF | CRAM_NF | CRAM_RI | CRAM_NS |CRAM_BF;

	if (fd->required_fields & SAM_PNEXT)
	    hdr->data_series |= CRAM_CF | CRAM_NF | CRAM_AP | CRAM_NP | CRAM_BF;

	if (fd->required_fields & SAM_TLEN)
	    hdr->data_series |= CRAM_CF | CRAM_NF | CRAM_AP | CRAM_TS |
		CRAM_BF | CRAM_MF | CRAM_RI | CRAM_CIGAR;

	if (fd->required_fields & SAM_SEQ)
	    hdr->data_series |= CRAM_SEQ;

	if (!(fd->required_fields & SAM_AUX))
	    // No easy way to get MD/NM without other tags at present
	    fd->decode_md = 0;

	if (fd->required_fields & SAM_QUAL)
	    hdr->data_series |= CRAM_QUAL;

	if (fd->required_fields & SAM_AUX)
	    hdr->data_series |= CRAM_RG | CRAM_TL | CRAM_aux;

	if (fd->required_fields & SAM_RGAUX)
	    hdr->data_series |= CRAM_RG | CRAM_BF;

	// Always uncompress CORE block
	if (cram_uncompress_block(s->block[0]))
	    return -1;
    } else {
	hdr->data_series = CRAM_ALL;

	for (i = 0; i < s->hdr->num_blocks; i++) {
	    if (cram_uncompress_block(s->block[i]))
		return -1;
	}

	return 0;
    }

    block_used = calloc(s->hdr->num_blocks+1, sizeof(int));
    if (!block_used)
	return -1;

    do {
	/*
	 * Also set data_series based on code prerequisites. Eg if we need
	 * CRAM_QS then we also need to know CRAM_RL so we know how long it
	 * is, or if we need FC/FP then we also need FN (number of features).
	 *
	 * It's not reciprocal though. We may be needing to decode FN
	 * but have no need to decode FC, FP and cigar ops.
	 */
	if (hdr->data_series & CRAM_RS)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_PD)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_HC)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_QS)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_IN)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_SC)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_BS)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_DL)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_BA)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_BB)    hdr->data_series |= CRAM_FC|CRAM_FP;
	if (hdr->data_series & CRAM_QQ)    hdr->data_series |= CRAM_FC|CRAM_FP;

	// cram_decode_seq() needs seq[] array
	if (hdr->data_series & (CRAM_SEQ|CRAM_CIGAR)) hdr->data_series |= CRAM_RL;

	if (hdr->data_series & CRAM_FP)    hdr->data_series |= CRAM_FC;
	if (hdr->data_series & CRAM_FC)    hdr->data_series |= CRAM_FN;
	if (hdr->data_series & CRAM_aux)   hdr->data_series |= CRAM_TL;
	if (hdr->data_series & CRAM_MF)    hdr->data_series |= CRAM_CF;
	if (hdr->data_series & CRAM_MQ)    hdr->data_series |= CRAM_BF;
	if (hdr->data_series & CRAM_BS)    hdr->data_series |= CRAM_RI;
	if (hdr->data_series & (CRAM_MF |CRAM_NS |CRAM_NP |CRAM_TS |CRAM_NF))
	    hdr->data_series |= CRAM_CF;
	if (!hdr->read_names_included && hdr->data_series & CRAM_RN)
	    hdr->data_series |= CRAM_CF | CRAM_NF;
	if (hdr->data_series & (CRAM_BA | CRAM_QS | CRAM_BB | CRAM_QQ))
	    hdr->data_series |= CRAM_BF | CRAM_CF | CRAM_RL;

	orig_ds = hdr->data_series;

	// Find which blocks are in use.
	for (i = 0; i < sizeof(i_to_id)/sizeof(*i_to_id); i++) {
	    int bnum1, bnum2, j;
	    cram_codec *c = hdr->codecs[i_to_id[i]];

	    if (!(hdr->data_series & (1<<i)))
		continue;

	    if (!c)
		continue;

	    bnum1 = cram_codec_to_id(c, &bnum2);

	    for (;;) {
		switch (bnum1) {
		case -2:
		    break;

		case -1:
		    core_used = 1;
		    break;

		default:
		    for (j = 0; j < s->hdr->num_blocks; j++) {
			if (s->block[j]->content_type == EXTERNAL &&
			    s->block[j]->content_id == bnum1) {
			    block_used[j] = 1;
			    if (cram_uncompress_block(s->block[j])) {
				free(block_used);
				return -1;
			    }
			}
		    }
		    break;
		}

		if (bnum2 == -2 || bnum1 == bnum2)
		    break;

		bnum1 = bnum2; // 2nd pass
	    }
	}

	// Tags too
	if ((fd->required_fields & SAM_AUX) ||
	    (hdr->data_series & CRAM_aux)) {
	    for (i = 0; i < CRAM_MAP_HASH; i++) {
		int bnum1, bnum2, j;
		cram_map *m = hdr->tag_encoding_map[i];

		while (m) {
		    cram_codec *c = m->codec;
		    if (!c)
			continue;

		    bnum1 = cram_codec_to_id(c, &bnum2);

		    for (;;) {
			switch (bnum1) {
			case -2:
			    break;

			case -1:
			    core_used = 1;
			    break;

			default:
			    for (j = 0; j < s->hdr->num_blocks; j++) {
				if (s->block[j]->content_type == EXTERNAL &&
				    s->block[j]->content_id == bnum1) {
				    block_used[j] = 1;
				    if (cram_uncompress_block(s->block[j])) {
					free(block_used);
					return -1;
				    }
				}
			    }
			    break;
			}

			if (bnum2 == -2 || bnum1 == bnum2)
			    break;

			bnum1 = bnum2; // 2nd pass
		    }

		    m = m->next;
		}
	    }
	}

	// We now know which blocks are in used, so repeat and find
	// which other data series need to be added.
	for (i = 0; i < sizeof(i_to_id)/sizeof(*i_to_id); i++) {
	    int bnum1, bnum2, j;
	    cram_codec *c = hdr->codecs[i_to_id[i]];

	    if (!c)
		continue;

	    bnum1 = cram_codec_to_id(c, &bnum2);

	    for (;;) {
		switch (bnum1) {
		case -2:
		    break;

		case -1:
		    if (core_used) {
			//printf(" + data series %08x:\n", 1<<i);
			hdr->data_series |= 1<<i;
		    }
		    break;

		default:
		    for (j = 0; j < s->hdr->num_blocks; j++) {
			if (s->block[j]->content_type == EXTERNAL &&
			    s->block[j]->content_id == bnum1) {
			    if (block_used[j]) {
				//printf(" + data series %08x:\n", 1<<i);
				hdr->data_series |= 1<<i;
			    }
			}
		    }
		    break;
		}

		if (bnum2 == -2 || bnum1 == bnum2)
		    break;

		bnum1 = bnum2; // 2nd pass
	    }
	}

	// Tags too
	for (i = 0; i < CRAM_MAP_HASH; i++) {
	    int bnum1, bnum2, j;
	    cram_map *m = hdr->tag_encoding_map[i];

	    while (m) {
		cram_codec *c = m->codec;
		if (!c)
		    continue;

		bnum1 = cram_codec_to_id(c, &bnum2);
		
		for (;;) {
		    switch (bnum1) {
		    case -2:
			break;

		    case -1:
			//printf(" + data series %08x:\n", CRAM_aux);
			hdr->data_series |= CRAM_aux;
			break;

		    default:
			for (j = 0; j < s->hdr->num_blocks; j++) {
			    if (s->block[j]->content_type &&
				s->block[j]->content_id == bnum1) {
				if (block_used[j]) {
				    //printf(" + data series %08x:\n",
				    //       CRAM_aux);
				    hdr->data_series |= CRAM_aux;
				}
			    }
			}
			break;
		    }

		    if (bnum2 == -2 || bnum1 == bnum2)
			break;

		    bnum1 = bnum2; // 2nd pass
		}

		m = m->next;
	    }
	}
    } while (orig_ds != hdr->data_series);

    free(block_used);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movl 0x224(%rdi), %eax
pushq $-0x1
popq %rbp
testl %eax, %eax
je 0x679a3
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
jne 0x679d9
movl $0x7fffffff, 0x410(%r15) # imm = 0x7FFFFFFF
xorl %ebx, %ebx
movq (%r14), %rax
movslq 0x20(%rax), %rax
cmpq %rax, %rbx
jge 0x67fd1
movq 0x10(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x4e1ab
incq %rbx
testl %eax, %eax
je 0x679b0
jmp 0x67fd3
movq %rdi, %rbx
shll $0xf, %eax
movzwl %ax, %edx
movl %edx, 0x410(%r15)
movl 0x224(%rdi), %eax
movl %eax, %edi
shrl %edi
andl $0x1, %edi
movl %eax, %esi
andl $0x10, %esi
shll $0x9, %esi
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa 0x21f71(%rip), %xmm1    # 0x89980
pand %xmm0, %xmm1
pand 0x21f75(%rip), %xmm0    # 0x89990
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
packssdw %xmm0, %xmm1
packsswb %xmm1, %xmm1
pmovmskb %xmm1, %ecx
testb $-0x80, %cl
movl $0x200001, %r8d         # imm = 0x200001
cmovnel %edi, %r8d
orl %edx, %r8d
movl %r8d, %edx
orl $0x3, %edx
testb $0x40, %cl
cmovnel %r8d, %edx
orl %esi, %edx
movl %edx, %esi
orl $0x3c00b1d, %esi        # imm = 0x3C00B1D
testb $0x20, %cl
cmovnel %edx, %esi
movl %esi, %edx
orl $0x310021, %edx         # imm = 0x310021
testb $0x10, %cl
cmovnel %esi, %edx
movl %edx, %esi
orl $0x120023, %esi         # imm = 0x120023
testb $0x8, %cl
cmovnel %edx, %esi
movl %esi, %edi
orl $0x3fc0b3f, %edi        # imm = 0x3FC0B3F
testb $0x4, %cl
cmovnel %esi, %edi
movl %edi, %edx
orl $0x7c00f5f, %edx        # imm = 0x7C00F5F
testb $0x2, %cl
cmovnel %edi, %edx
testb $0x1, %cl
jne 0x67aa4
movl %edx, 0x410(%r15)
btl $0xb, %eax
jb 0x67ab1
andl $0x0, 0x1f8(%rbx)
testw $0x1c00, %ax            # imm = 0x1C00
je 0x67aeb
movl %edx, %ecx
orl $0x13c00b9f, %ecx       # imm = 0x13C00B9F
btl $0xa, %eax
cmovael %edx, %ecx
movl %ecx, %edx
orl $0x40005000, %edx       # imm = 0x40005000
btl $0xb, %eax
cmovael %ecx, %edx
movl %edx, %ecx
orl $0x1001, %ecx           # imm = 0x1001
btl $0xc, %eax
cmovael %edx, %ecx
movl %ecx, 0x410(%r15)
movq 0x10(%r14), %rax
movq (%rax), %rdi
callq 0x4e1ab
testl %eax, %eax
jne 0x67fd3
movq (%r14), %rax
movslq 0x20(%rax), %rdi
incq %rdi
pushq $0x4
popq %rsi
callq 0x6470
testq %rax, %rax
je 0x67fd3
movq %rax, %r13
movq %rbx, 0x20(%rsp)
leaq 0x180(%r15), %rax
movq %rax, 0x18(%rsp)
movl 0x410(%r15), %r11d
movl $0x104, %edx            # imm = 0x104
movl $0x400, %ecx            # imm = 0x400
movl $0x0, 0x4(%rsp)
movl %r11d, %esi
andl $0x400000, %esi         # imm = 0x400000
movl %r11d, %eax
orl %edx, %eax
testl %esi, %esi
cmovnel %eax, %r11d
movl %r11d, %edi
andl $0x800000, %edi         # imm = 0x800000
movl %edi, 0xc(%rsp)
cmovnel %eax, %r11d
movl %r11d, %edi
andl $0x1000000, %edi        # imm = 0x1000000
movl %edi, 0x10(%rsp)
cmovnel %eax, %r11d
movl %r11d, %edi
andl $0x80, %edi
movl %r11d, %eax
orl %edx, %eax
testl %edi, %edi
cmovnel %eax, %r11d
movl %r11d, %r8d
andl $0x800, %r8d            # imm = 0x800
cmovnel %eax, %r11d
movl %r11d, %r9d
andl $0x2000000, %r9d        # imm = 0x2000000
cmovnel %eax, %r11d
movl %r11d, %ebx
andl %ecx, %ebx
movl %r11d, %eax
orl %edx, %eax
testl %ebx, %ebx
cmovnel %eax, %r11d
movl %r11d, %ecx
andl $0x10, %ecx
cmovnel %eax, %r11d
movl %r11d, %ebp
andl $0x40, %ebp
cmovnel %eax, %r11d
movl %r11d, %eax
andl $0x4000000, %eax        # imm = 0x4000000
movl %r11d, %r10d
orl %edx, %r10d
testl %eax, %eax
cmovnel %r10d, %r11d
movl %r11d, %edx
andl $0x10000000, %edx       # imm = 0x10000000
cmovnel %r10d, %r11d
movl %r11d, %r12d
andl $0x7c00f5f, %r12d       # imm = 0x7C00F5F
movl %r11d, %r10d
orl $0x8, %r10d
testl %r12d, %r12d
cmovel %r11d, %r10d
orl %ebx, %ecx
orl %ebp, %ecx
orl %eax, %ecx
movl %r10d, %eax
andl $0x4, %eax
orl %edx, %ecx
orl %r12d, %ecx
movl $0x400, %ebx            # imm = 0x400
orl %eax, %ecx
shll $0x6, %eax
orl %r10d, %eax
movl %r10d, %edx
andl $0x40000000, %edx       # imm = 0x40000000
orl %edx, %ecx
shrl $0x10, %edx
movl %eax, %r11d
andl $0x80100, %r11d         # imm = 0x80100
leal (%rdx,%r11,2), %edx
addl 0xc(%rsp), %r11d
orl %esi, %r11d
addl 0x10(%rsp), %r11d
orl %edi, %r11d
orl %r8d, %r11d
orl %r9d, %r11d
movl %r10d, %esi
andl $0x2000, %esi           # imm = 0x2000
orl %esi, %ecx
shrl $0xd, %esi
orl %edx, %esi
andl %ebx, %r10d
orl %r10d, %ecx
shll $0xb, %r10d
orl %esi, %r10d
orl %eax, %r10d
orl %r11d, %ecx
movl %r10d, %edx
andl $0xf0020, %edx          # imm = 0xF0020
movl %r10d, %eax
orl $0x100000, %eax         # imm = 0x100000
testl %edx, %edx
cmovel %r10d, %eax
orl %ecx, %edx
je 0x67c9f
movl %eax, 0x410(%r15)
cmpl $0x0, 0x30(%r15)
sete %cl
testw %ax, %ax
sets %dl
andb %cl, %dl
movl %eax, %ecx
orl $0x100020, %ecx         # imm = 0x100020
testb %dl, %dl
cmovel %eax, %ecx
movl %ecx, %esi
orl $0x100009, %esi         # imm = 0x100009
testl $0x140000c0, %ecx       # imm = 0x140000C0
setne %al
cmovel %ecx, %esi
orb %dl, %al
cmpb $0x1, %al
jne 0x67cdd
movl %esi, 0x410(%r15)
movl %esi, 0xc(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq $0x1c, %rbx
je 0x67d8e
movl 0x410(%r15), %eax
btl %ebx, %eax
jae 0x67d86
leaq 0x21d59(%rip), %rax     # 0x89a60
movslq (%rax,%rbx,4), %rax
movq 0x280(%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x67d86
leaq 0x8(%rsp), %rsi
callq 0x79d1c
movl %eax, %ebp
cmpl $-0x2, %ebp
je 0x67d77
cmpl $-0x1, %ebp
jne 0x67d37
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
jmp 0x67d77
xorl %r12d, %r12d
movq (%r14), %rax
movslq 0x20(%rax), %rax
cmpq %rax, %r12
jge 0x67d74
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x67d6f
cmpl %ebp, 0xc(%rdi)
jne 0x67d6f
movl $0x1, (%r13,%r12,4)
callq 0x4e1ab
testl %eax, %eax
jne 0x67fe4
incq %r12
jmp 0x67d3a
xorl %r12d, %r12d
movl 0x8(%rsp), %eax
cmpl $-0x2, %eax
je 0x67d86
cmpl %eax, %ebp
movl %eax, %ebp
jne 0x67d24
incq %rbx
jmp 0x67ce6
movq 0x20(%rsp), %rax
testb $0x8, 0x225(%rax)
jne 0x67e51
testb $0x40, 0x413(%r15)
jne 0x67e51
movl 0x4(%rsp), %ebx
xorl %ebp, %ebp
cmpq $0x1c, %rbp
je 0x67f0c
leaq 0x21c9b(%rip), %rax     # 0x89a60
movslq (%rax,%rbp,4), %rax
movq 0x280(%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x67e49
leaq 0x8(%rsp), %rsi
callq 0x79d1c
movl 0x8(%rsp), %edx
pushq $0x1
popq %rsi
movl %ebp, %ecx
shll %cl, %esi
cmpl $-0x2, %eax
je 0x67e00
cmpl $-0x1, %eax
jne 0x67e0d
testl %ebx, %ebx
je 0x67e00
orl %esi, 0x410(%r15)
cmpl $-0x2, %edx
je 0x67e49
cmpl %edx, %eax
movl %edx, %eax
jne 0x67deb
jmp 0x67e49
movq (%r14), %rcx
movl 0x20(%rcx), %ecx
testl %ecx, %ecx
cmovlel %r12d, %ecx
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x67e00
movq 0x10(%r14), %r8
movq (%r8,%rdi,8), %r8
cmpl $0x4, 0x8(%r8)
jne 0x67e44
cmpl %eax, 0xc(%r8)
jne 0x67e44
cmpl $0x0, (%r13,%rdi,4)
je 0x67e44
orl %esi, 0x410(%r15)
incq %rdi
jmp 0x67e1b
incq %rbp
jmp 0x67db4
xorl %ecx, %ecx
movl 0x4(%rsp), %ebx
cmpq $0x20, %rcx
je 0x67db2
movl %ebx, 0x4(%rsp)
movq 0x18(%rsp), %rax
leaq (%rax,%rcx,8), %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x67f04
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x67e71
movq %rcx, 0x10(%rsp)
leaq 0x8(%rsp), %rsi
callq 0x79d1c
movl %eax, %ebp
cmpl $-0x2, %ebp
je 0x67ee7
cmpl $-0x1, %ebp
jne 0x67ea7
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
jmp 0x67ee7
xorl %r12d, %r12d
movq (%r14), %rax
movslq 0x20(%rax), %rax
cmpq %rax, %r12
jge 0x67ee4
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdi
cmpl $0x4, 0x8(%rdi)
jne 0x67edf
cmpl %ebp, 0xc(%rdi)
jne 0x67edf
movl $0x1, (%r13,%r12,4)
callq 0x4e1ab
testl %eax, %eax
jne 0x67fe4
incq %r12
jmp 0x67eaa
xorl %r12d, %r12d
movl 0x8(%rsp), %eax
cmpl $-0x2, %eax
je 0x67ef6
cmpl %eax, %ebp
movl %eax, %ebp
jne 0x67e94
addq $0x18, %rbx
movq 0x10(%rsp), %rcx
jmp 0x67e6e
incq %rcx
jmp 0x67e53
movl %ebx, 0x4(%rsp)
xorl %ebx, %ebx
cmpq $0x20, %rbx
je 0x67fad
movq 0x18(%rsp), %rax
leaq (%rax,%rbx,8), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x67fa5
movq 0x10(%rbp), %rdi
testq %rdi, %rdi
je 0x67f29
leaq 0x8(%rsp), %rsi
callq 0x79d1c
movl 0x8(%rsp), %ecx
cmpl $-0x2, %eax
je 0x67f57
cmpl $-0x1, %eax
jne 0x67f64
orb $0x40, 0x413(%r15)
cmpl $-0x2, %ecx
je 0x67f9f
cmpl %ecx, %eax
movl %ecx, %eax
jne 0x67f45
jmp 0x67f9f
movq (%r14), %rdx
movl 0x20(%rdx), %edx
testl %edx, %edx
cmovlel %r12d, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x67f57
movq 0x10(%r14), %rdi
movq (%rdi,%rsi,8), %rdi
cmpl $0x0, 0x8(%rdi)
je 0x67f9a
cmpl %eax, 0xc(%rdi)
jne 0x67f9a
cmpl $0x0, (%r13,%rsi,4)
je 0x67f9a
orb $0x40, 0x413(%r15)
incq %rsi
jmp 0x67f72
addq $0x18, %rbp
jmp 0x67f25
incq %rbx
jmp 0x67f12
movl 0x410(%r15), %r11d
cmpl %r11d, 0xc(%rsp)
movl $0x104, %edx            # imm = 0x104
movl $0x400, %ecx            # imm = 0x400
jne 0x67b47
movq %r13, %rdi
callq 0x68a0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x68a0
pushq $-0x1
popq %rbp
jmp 0x67fd3