// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_get_ref
char *cram_get_ref(cram_fd *fd, int id, int start, int end) {
    ref_entry *r;
    char *seq;
    int ostart = start;

    if (id == -1)
	return NULL;

    /* FIXME: axiomatic query of r->seq being true?
     * Or shortcut for unsorted data where we load once and never free?
     */

    //fd->shared_ref = 1; // hard code for now to simplify things

    pthread_mutex_lock(&fd->ref_lock);

    RP("%d cram_get_ref on fd %p, id %d, range %d..%d\n", gettid(), fd, id, start, end);

    /*
     * Unsorted data implies we want to fetch an entire reference at a time.
     * We just deal with this at the moment by claiming we're sharing
     * references instead, which has the same requirement.
     */
    if (fd->unsorted)
	fd->shared_ref = 1;


    /* Sanity checking: does this ID exist? */
    if (id >= fd->refs->nref) {
	fprintf(stderr, "No reference found for id %d\n", id);
	pthread_mutex_unlock(&fd->ref_lock);
	return NULL;
    }

    if (!fd->refs || !fd->refs->ref_id[id]) {
	fprintf(stderr, "No reference found for id %d\n", id);
	pthread_mutex_unlock(&fd->ref_lock);
	return NULL;
    }

    if (!(r = fd->refs->ref_id[id])) {
	fprintf(stderr, "No reference found for id %d\n", id);
	pthread_mutex_unlock(&fd->ref_lock);
	return NULL;
    }


    /*
     * It has an entry, but may not have been populated yet.
     * Any manually loaded .fai files have their lengths known.
     * A ref entry computed from @SQ lines (M5 or UR field) will have
     * r->length == 0 unless it's been loaded once and verified that we have
     * an on-disk filename for it.
     *
     * 19 Sep 2013: Moved the lock here as the cram_populate_ref code calls
     * open_path_mfile and libcurl, which isn't multi-thread safe unless I
     * rewrite my code to have one curl handle per thread.
     */
    pthread_mutex_lock(&fd->refs->lock);
    if (r->length == 0) {
	if (cram_populate_ref(fd, id, r) == -1) {
	    fprintf(stderr, "Failed to populate reference for id %d\n", id);
	    pthread_mutex_unlock(&fd->refs->lock);
	    pthread_mutex_unlock(&fd->ref_lock);
	    return NULL;
	}
	r = fd->refs->ref_id[id];
	if (fd->unsorted)
	    cram_ref_incr_locked(fd->refs, id);
    }


    /*
     * We now know that we the filename containing the reference, so check
     * for limits. If it's over half the reference we'll load all of it in
     * memory as this will speed up subsequent calls.
     */
    if (end < 1)
	end = r->length;
    if (end >= r->length)
	end  = r->length; 
    assert(start >= 1);

    if (end - start >= 0.5*r->length || fd->shared_ref) {
	start = 1;
	end = r->length;
    }
    
    /*
     * Maybe we have it cached already? If so use it.
     *
     * Alternatively if we don't have the sequence but we're sharing
     * references and/or are asking for the entire length of it, then
     * load the full reference into the refs structure and return
     * a pointer to that one instead.
     */
    if (fd->shared_ref || r->seq || (start == 1 && end == r->length)) {
	char *cp;

	if (id >= 0) {
	    if (r->seq) {
		cram_ref_incr_locked(fd->refs, id);
	    } else {
		ref_entry *e;
		if (!(e = cram_ref_load(fd->refs, id, r->is_md5))) {
		    pthread_mutex_unlock(&fd->refs->lock);
		    pthread_mutex_unlock(&fd->ref_lock);
		    return NULL;
		}

		/* unsorted data implies cache ref indefinitely, to avoid
		 * continually loading and unloading.
		 */
		if (fd->unsorted)
		    cram_ref_incr_locked(fd->refs, id);
	    }	    

	    fd->ref = NULL; /* We never access it directly */
	    fd->ref_start = 1;
	    fd->ref_end   = r->length;
	    fd->ref_id    = id;

	    cp = fd->refs->ref_id[id]->seq + ostart-1;
	} else {
	    fd->ref = NULL;
	    cp = NULL;
	}

	RP("%d cram_get_ref returning for id %d, count %d\n", gettid(), id, (int)r->count);

	pthread_mutex_unlock(&fd->refs->lock);
	pthread_mutex_unlock(&fd->ref_lock);
	return cp;
    }

    /*
     * Otherwise we're not sharing, we don't have a copy of it already and
     * we're only asking for a small portion of it.
     *
     * In this case load up just that segment ourselves, freeing any old
     * small segments in the process.
     */

    /* Unmapped ref ID */
    if (id < 0) {
	if (fd->ref_free) {
	    free(fd->ref_free);
	    fd->ref_free = NULL;
	}
	fd->ref = NULL;
	fd->ref_id = id;
	pthread_mutex_unlock(&fd->refs->lock);
	pthread_mutex_unlock(&fd->ref_lock);
	return NULL;
    }

    /* Open file if it's not already the current open reference */
    if (strcmp(fd->refs->fn, r->fn) || fd->refs->fp == NULL) {
	if (fd->refs->fp)
	    if (bgzf_close(fd->refs->fp) != 0)
		return NULL;
	fd->refs->fn = r->fn;
	if (!(fd->refs->fp = bgzf_open_ref(fd->refs->fn, "r", r->is_md5))) {
	    pthread_mutex_unlock(&fd->refs->lock);
	    pthread_mutex_unlock(&fd->ref_lock);
	    return NULL;
	}
    }

    if (!(fd->ref = load_ref_portion(fd->refs->fp, r, start, end))) {
	pthread_mutex_unlock(&fd->refs->lock);
	pthread_mutex_unlock(&fd->ref_lock);
	return NULL;
    }

    if (fd->ref_free)
	free(fd->ref_free);

    fd->ref_id    = id;
    fd->ref_start = start;
    fd->ref_end   = end;
    fd->ref_free = fd->ref;
    seq = fd->ref;

    pthread_mutex_unlock(&fd->refs->lock);
    pthread_mutex_unlock(&fd->ref_lock);

    return seq + ostart - start;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40e8, %rsp           # imm = 0x40E8
cmpl $-0x1, %esi
je 0x2a13a
movl %ecx, %ebx
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
addq $0x8898, %rdi           # imm = 0x8898
movq %rdi, 0x10(%rsp)
callq 0x47a0
cmpl $0x0, 0x8854(%r14)
je 0x2983e
movl $0x1, 0x220(%r14)
movq 0x48(%r14), %rdi
cmpl %r13d, 0x18(%rdi)
jle 0x2991e
movq 0x10(%rdi), %rax
movslq %r13d, %rcx
movq (%rax,%rcx,8), %r15
testq %r15, %r15
je 0x2991e
movq %rcx, 0x8(%rsp)
addq $0x38, %rdi
callq 0x47a0
cmpq $0x0, 0x10(%r15)
jne 0x29f41
movq %r15, 0x28(%rsp)
leaq 0x1c606(%rip), %rdi     # 0x45e8b
callq 0x4640
movq %rax, %r15
leaq 0x1c600(%rip), %rdi     # 0x45e94
callq 0x4640
cmpl $0x0, 0x1fc(%r14)
jne 0x29eb1
movb $0x0, 0x20e0(%rsp)
testq %r15, %r15
movl %ebx, 0x4(%rsp)
je 0x298c8
cmpb $0x0, (%r15)
je 0x298c8
movq %rax, 0x20(%rsp)
jmp 0x299dd
testq %rax, %rax
je 0x298e3
cmpb $0x0, (%rax)
je 0x298e3
movq %rax, 0x20(%rsp)
leaq 0x1c5e3(%rip), %r15     # 0x45ec1
jmp 0x299dd
leaq 0x1c741(%rip), %rdi     # 0x4602b
callq 0x4640
testq %rax, %rax
je 0x298fc
movq %rax, %rbx
cmpb $0x0, (%rax)
jne 0x2997a
leaq 0x1c732(%rip), %rdi     # 0x46035
callq 0x4640
testq %rax, %rax
je 0x29941
movq %rax, %rbx
cmpb $0x0, (%rax)
je 0x29941
leaq 0x1c71e(%rip), %r15     # 0x4603a
jmp 0x29981
movq 0x2d6ab(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1c24e(%rip), %rsi     # 0x45b7d
xorl %r15d, %r15d
movl %r13d, %edx
xorl %eax, %eax
callq 0x4770
jmp 0x2a20b
leaq 0x1c6fa(%rip), %rdi     # 0x46042
callq 0x4640
testq %rax, %rax
je 0x2995a
movq %rax, %rbx
cmpb $0x0, (%rax)
jne 0x2997a
leaq 0x1c6e8(%rip), %rdi     # 0x46049
callq 0x4640
testq %rax, %rax
je 0x29973
movq %rax, %rbx
cmpb $0x0, (%rax)
jne 0x2997a
leaq 0x1c6d4(%rip), %rbx     # 0x4604e
leaq 0x1a26b(%rip), %r15     # 0x43bec
leaq 0x1c561(%rip), %rdx     # 0x45ee9
leaq 0x20e0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4880
leaq 0x1c54d(%rip), %rdx     # 0x45ef6
leaq 0x30e0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rdi, 0x20(%rsp)
movq %rbx, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4880
leaq 0x1c4f2(%rip), %r15     # 0x45ec1
cmpl $0x0, 0x1fc(%r14)
jne 0x2a154
movq 0x28(%rsp), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x2a1e0
movq 0x18(%r14), %rdi
leaq 0x1c2cb(%rip), %rsi     # 0x45cc4
leaq 0x1c2c7(%rip), %rdx     # 0x45cc7
callq 0x33011
testq %rax, %rax
je 0x2a1e0
movq %rax, %rbx
movq 0x18(%r14), %rdi
leaq 0x1c2ae(%rip), %rdx     # 0x45cca
movq %rax, %rsi
xorl %ecx, %ecx
callq 0x33380
testq %rax, %rax
je 0x29b0f
movq %rax, %rbp
cmpl $0x0, 0x1fc(%r14)
jne 0x29ee1
movl %r12d, (%rsp)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x29a6a
cmpb $0x0, (%rsi)
je 0x29a6a
movq 0x8(%rbp), %rdx
addq $0x3, %rdx
leaq 0xe0(%rsp), %rdi
callq 0x291f5
jmp 0x29ab0
movq 0x8(%rbp), %rdi
addq $0x3, %rdi
movq %r15, %rsi
callq 0x304b6
testq %rax, %rax
je 0x29aca
movq %rax, %r12
leaq 0xe0(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
movq %rax, %rsi
callq 0x42c0
movq %r12, %rdi
callq 0x4600
leaq 0xe0(%rsp), %rdi
callq 0x2f4f0
testl %eax, %eax
je 0x29aca
leaq 0xe0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x44a0
testl %eax, %eax
je 0x29c02
movq 0x8(%rbp), %rdi
addq $0x3, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x30324
testq %rax, %rax
movl (%rsp), %r12d
je 0x29b0f
movq %rax, %r15
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x2fae5
movq 0x28(%rsp), %rdx
movq %rax, 0x30(%rdx)
testq %rax, %rax
je 0x29c84
xorl %r15d, %r15d
jmp 0x29c8c
movq 0x18(%r14), %rdi
leaq 0x1c1b3(%rip), %rdx     # 0x45ccd
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x33380
testq %rax, %rax
je 0x2a1e0
movq 0x8(%rax), %rbx
leaq 0x3(%rbx), %r15
leaq 0x1c402(%rip), %rsi     # 0x45f3e
pushq $0x5
popq %rdx
movq %r15, %rdi
callq 0x4280
addq $0x8, %rbx
testl %eax, %eax
cmovneq %r15, %rbx
movq 0x48(%r14), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x29b77
movq %rax, %rdi
callq 0x377bc
testl %eax, %eax
jne 0x2a1e0
movq 0x48(%r14), %rdi
andq $0x0, 0x28(%rdi)
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2a358
testq %rax, %rax
je 0x2a1e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x2a6ec
movq %rbx, 0x48(%r14)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x29bb8
callq 0x377bc
testl %eax, %eax
jne 0x2a1e0
movq 0x48(%r14), %rbx
andq $0x0, 0x28(%rbx)
cmpq $0x0, 0x20(%rbx)
je 0x2a1e0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x28ead
cmpl $-0x1, %eax
je 0x2a1e0
movq 0x48(%r14), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2a1e0
movq 0x8(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
movl 0x4(%rsp), %ebx
jne 0x29f23
jmp 0x2a1e0
leaq 0x1acac(%rip), %rsi     # 0x448b5
leaq 0xe0(%rsp), %rdi
callq 0x35ed4
testq %rax, %rax
je 0x29aca
movq %rax, %r12
movq 0x80(%rsp), %rax
movq 0x28(%rsp), %r15
movq %rax, 0x10(%r15)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r15)
movq 0x48(%r14), %rax
movq (%rax), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x34873
movq %rax, 0x8(%r15)
movq 0x48(%r14), %rcx
movq 0x28(%rcx), %rdi
testq %rdi, %rdi
je 0x29f06
callq 0x377bc
testl %eax, %eax
movl 0x4(%rsp), %ebx
jne 0x2a1e0
movq 0x48(%r14), %rcx
movq 0x8(%r15), %rax
jmp 0x29f0a
movq 0x8(%r15), %rax
movq %rax, 0x30(%rdx)
movq 0x8(%rsp), %rcx
movl 0x4(%rsp), %ebx
movq 0x20(%rsp), %rsi
movq %r15, 0x38(%rdx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rdx)
movl $0x1, 0x40(%rdx)
testq %rsi, %rsi
je 0x29f23
cmpb $0x0, (%rsi)
je 0x29f23
callq 0x4790
movl %eax, 0x34(%rsp)
callq 0x4480
movq %rax, 0x50(%rsp)
xorl %eax, %eax
xorl %ebx, %ebx
cmpq $0x8, %rax
je 0x29cec
imull $0x1f, %ebx, %ecx
movzbl 0x50(%rsp,%rax), %ebx
addl %ecx, %ebx
incq %rax
jmp 0x29cd7
cmpb $0x0, 0x20e0(%rsp)
je 0x29d17
leaq 0x20e0(%rsp), %rdi
callq 0x2f4bc
testl %eax, %eax
jne 0x29d17
leaq 0x2d83a(%rip), %rax     # 0x57548
cmpl $0x0, (%rax)
jg 0x2a23c
movl %r13d, 0x1c(%rsp)
movq %rbp, 0x38(%rsp)
movq 0x8(%rbp), %rdx
addq $0x3, %rdx
leaq 0xe0(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x291f5
cmpl $0x0, 0x1fc(%r14)
jne 0x2a187
leaq 0xe0(%rsp), %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x2931d
incl %ebx
leaq 0x1c26c(%rip), %r15     # 0x45fd0
leaq 0x10e0(%rsp), %rbp
leaq 0x1c26d(%rip), %r13     # 0x45fe0
xorl %edi, %edi
callq 0x44d0
movq %rax, %r12
callq 0x4380
xorl %eax, %r12d
movq %rbp, %rdi
movq %r15, %rsi
leaq 0xe0(%rsp), %rdx
movl 0x34(%rsp), %ecx
movl %ebx, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x4100
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3a708
testq %rax, %rax
jne 0x29de4
callq 0x4060
incl %ebx
cmpl $0x11, (%rax)
je 0x29d73
leaq 0x10e0(%rsp), %rdi
callq 0x4440
movl 0x1c(%rsp), %r13d
movl (%rsp), %r12d
movq 0x8(%rsp), %rcx
movl 0x4(%rsp), %ebx
jmp 0x29f23
movq %rax, %r12
callq 0x3bb7a
testq %rax, %rax
movl 0x1c(%rsp), %r13d
je 0x2a1cb
movq %rax, %rbx
movq 0x28(%rsp), %rbp
movq 0x10(%rbp), %rdx
movq 0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x3b15d
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ba60
movq %rbx, %rdi
callq 0x3bba4
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3bba9
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rdi
addq $0x3, %rdi
pushq $0x20
popq %rdx
movq %rbx, %rsi
callq 0x4280
testl %eax, %eax
jne 0x2a1ac
movq 0x10(%rbp), %rdx
movq 0x30(%rbp), %rsi
movq %r12, %rdi
callq 0x2691f
cmpq 0x10(%rbp), %rax
jne 0x2a22a
movq %r12, %rdi
callq 0x3a3a2
testl %eax, %eax
movl 0x4(%rsp), %ebx
leaq 0x10e0(%rsp), %rdi
js 0x29eda
movl $0x124, %esi            # imm = 0x124
callq 0x44b0
testl %eax, %eax
movl (%rsp), %r12d
leaq 0x10e0(%rsp), %rdi
je 0x2a142
callq 0x4270
jmp 0x29f1e
movq 0x2d118(%rip), %rcx     # 0x56fd0
movq (%rcx), %rdi
movq %rax, %rbp
leaq 0x1bfd9(%rip), %rsi     # 0x45e9e
movq %r14, %rdx
movl %r13d, %ecx
xorl %eax, %eax
callq 0x4770
movq %rbp, %rax
jmp 0x298a7
callq 0x4270
jmp 0x29f1a
movq 0x2d0e8(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
movq 0x8(%rbp), %rdx
addq $0x3, %rdx
leaq 0x1c033(%rip), %rsi     # 0x45f2d
xorl %eax, %eax
callq 0x4770
jmp 0x29a40
movl 0x4(%rsp), %ebx
movq %r12, 0x28(%rcx)
movq %rax, 0x20(%rcx)
movl $0x1, 0x40(%r15)
movl (%rsp), %r12d
movq 0x8(%rsp), %rcx
movq 0x48(%r14), %rdi
movq 0x10(%rdi), %rax
movq (%rax,%rcx,8), %r15
cmpl $0x0, 0x8854(%r14)
je 0x29f41
movl %r13d, %esi
callq 0x293a9
testl %r12d, %r12d
jle 0x2a261
movq %r15, %rbp
movq 0x10(%r15), %rax
testl %ebx, %ebx
cmovlel %eax, %ebx
movslq %ebx, %r15
cmpq %r15, %rax
cmovlel %eax, %r15d
movl %r15d, %ecx
subl %r12d, %ecx
cvtsi2sd %ecx, %xmm0
cvtsi2sd %rax, %xmm1
mulsd 0x19991(%rip), %xmm1    # 0x43908
ucomisd %xmm1, %xmm0
pushq $0x1
popq %rbx
cmovbl %r12d, %ebx
cmovael %eax, %r15d
cmpl $0x0, 0x220(%r14)
jne 0x29fac
cmpq $0x0, 0x30(%rbp)
jne 0x29fac
cmpl $0x1, %ebx
jne 0x2a035
movslq %r15d, %rcx
cmpq %rcx, %rax
jne 0x2a035
testl %r13d, %r13d
js 0x2a000
cmpq $0x0, 0x30(%rbp)
movq 0x48(%r14), %rdi
je 0x2a011
movl %r13d, %esi
callq 0x293a9
andq $0x0, 0x50(%r14)
movl $0x1, 0x64(%r14)
movl 0x10(%rbp), %eax
movl %eax, 0x68(%r14)
movl %r13d, 0x60(%r14)
movq 0x48(%r14), %rdi
movq 0x10(%rdi), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rax), %rax
movl %r12d, %ecx
leaq (%rax,%rcx), %r15
decq %r15
jmp 0x2a202
andq $0x0, 0x50(%r14)
movq 0x48(%r14), %rdi
xorl %r15d, %r15d
jmp 0x2a202
movl 0x40(%rbp), %edx
movl %r13d, %esi
callq 0x2949c
testq %rax, %rax
je 0x2a123
cmpl $0x0, 0x8854(%r14)
je 0x29fc4
movq 0x48(%r14), %rdi
jmp 0x29fbc
testl %r13d, %r13d
js 0x2a07b
movl %r12d, (%rsp)
movl %r13d, 0x1c(%rsp)
movq 0x48(%r14), %r13
movq 0x20(%r13), %rdi
movq 0x8(%rbp), %r12
movq %r12, %rsi
callq 0x4750
movq 0x28(%r13), %rdi
testl %eax, %eax
je 0x2a09c
testq %rdi, %rdi
je 0x2a0a1
callq 0x377bc
testl %eax, %eax
jne 0x2a13a
movq 0x8(%rbp), %r12
movq 0x48(%r14), %r13
jmp 0x2a0a1
movq 0x58(%r14), %rdi
testq %rdi, %rdi
je 0x2a08e
callq 0x4600
andq $0x0, 0x58(%r14)
andq $0x0, 0x50(%r14)
movl %r13d, 0x60(%r14)
jmp 0x2a123
testq %rdi, %rdi
jne 0x2a0c4
movq %r12, 0x20(%r13)
movl 0x40(%rbp), %esi
movq %r12, %rdi
callq 0x295c3
movq %rax, %rdi
movq 0x48(%r14), %rax
movq %rdi, 0x28(%rax)
testq %rdi, %rdi
je 0x2a17e
movq %rbp, %rsi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x29696
movq %rax, 0x50(%r14)
testq %rax, %rax
je 0x2a123
movq 0x58(%r14), %rdi
callq 0x4600
movl 0x1c(%rsp), %eax
movl %eax, 0x60(%r14)
movl %ebx, 0x64(%r14)
movl %r15d, 0x68(%r14)
movq 0x48(%r14), %rdi
movq 0x50(%r14), %r12
movq %r12, 0x58(%r14)
addq $0x38, %rdi
callq 0x43f0
movq 0x10(%rsp), %rdi
callq 0x43f0
movl (%rsp), %r15d
addq %r12, %r15
movl %ebx, %eax
subq %rax, %r15
jmp 0x2a215
movq 0x48(%r14), %rdi
addq $0x38, %rdi
callq 0x43f0
movq 0x10(%rsp), %rdi
callq 0x43f0
xorl %r15d, %r15d
jmp 0x2a215
leaq 0xe0(%rsp), %rsi
callq 0x4340
jmp 0x29f1e
movq 0x2ce75(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1bdac(%rip), %rsi     # 0x45f11
leaq 0x30e0(%rsp), %rdx
movq %rdx, 0x20(%rsp)
xorl %eax, %eax
callq 0x4770
jmp 0x299dd
addq $0x38, %rax
movq %rax, %rdi
jmp 0x2a12b
movq 0x2ce42(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1be1f(%rip), %rsi     # 0x45fb7
leaq 0xe0(%rsp), %rdx
xorl %eax, %eax
callq 0x4770
jmp 0x29d49
movq 0x2ce1d(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1be26(%rip), %rsi     # 0x45fe3
leaq 0x1be55(%rip), %rdx     # 0x46019
xorl %eax, %eax
callq 0x4770
movq %r12, %rdi
callq 0x3a3fa
leaq 0x10e0(%rsp), %rdi
callq 0x4270
movq 0x2cde9(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1b9aa(%rip), %rsi     # 0x45b9b
xorl %r15d, %r15d
movl %r13d, %edx
xorl %eax, %eax
callq 0x4770
movq 0x48(%r14), %rdi
addq $0x38, %rdi
callq 0x43f0
movq 0x10(%rsp), %rdi
callq 0x43f0
movq %r15, %rax
addq $0x40e8, %rsp           # imm = 0x40E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe0(%rsp), %rdi
callq 0x4440
jmp 0x29e74
movq 0x2cd8d(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x1bcf7(%rip), %rsi     # 0x45f44
leaq 0x20e0(%rsp), %rdx
xorl %eax, %eax
callq 0x4770
jmp 0x29d17
leaq 0x1b95b(%rip), %rdi     # 0x45bc3
leaq 0x1b72f(%rip), %rsi     # 0x4599e
leaq 0x1b958(%rip), %rcx     # 0x45bce
movl $0xa73, %edx            # imm = 0xA73
callq 0x4360