// File: karel-brinda[P]ococo/ext/htslib/cram/vlen.c
// Function: vflen
int vflen(char *fmt, va_list ap)
{
    int len = 0;
    char *cp, c;
    long long l;
    int i;
    double d; 

    /*
     * This code modifies 'ap', but we do not know if va_list is a structure
     * or a pointer to an array so we do not know if it is a local variable
     * or not.
     * C99 gets around this by defining va_copy() to make copies of ap, but
     * this does not exist on all systems.
     * For now, I just assume that when va_list is a pointer the system also
     * provides a va_copy macro to work around this problem. The only system
     * I have seen needing this so far was Linux on AMD64.
     */
#if defined(HAVE_VA_COPY)
    va_list ap_local;
    va_copy(ap_local, ap);
#    define ap ap_local
#endif

    for(cp = fmt; *cp; cp++) {
	switch(*cp) {

	/* A format specifier */
	case '%': {
	    char *endp;
	    long conv_len1=0, conv_len2=0, conv_len=0;
	    signed int arg_size;

	    /* Firstly, strip the modifier flags (+-#0 and [space]) */
	    for(; (c=*++cp);) {
		if ('#' == c)
		    len+=2; /* Worst case of "0x" */
		else if ('-' == c || '+' == c || ' ' == c)
		    len++;
		else
		    break;
	    }

	    /* Width specifier */
	    l = strtol(cp, &endp, 10);
	    if (endp != cp) {
		cp = endp;
		conv_len = conv_len1 = l;
	    } else if (*cp == '*') {
		conv_len = conv_len1 = (int)va_arg(ap, int);
		cp++;
	    }

	    /* Precision specifier */
	    if ('.' == *cp) {
		cp++;
		conv_len2 = strtol(cp, &endp, 10);
		if (endp != cp) {
		    cp = endp;
		} else if (*cp == '*') {
		    conv_len2 = (int)va_arg(ap, int);
		    cp++;
		}
		conv_len = MAX(conv_len1, conv_len2);
	    }

	    /* Short/long identifier */
	    if ('h' == *cp) {
		arg_size = -1; /* short */
		cp++;
	    } else if ('l' == *cp) {
		arg_size = 1; /* long */
		cp++;
		if ('l' == *cp) {
		    arg_size = 2; /* long long */
		    cp++;
		}
	    } else {
		arg_size = 0; /* int */
	    }

	    /* The actual type */
	    switch (*cp) {
	    case '%':
		/*
		 * Not real ANSI I suspect, but we'll allow for the
		 * completely daft "%10%" example.
		 */
		len += MAX(conv_len1, 1);
		break;

	    case 'd':
	    case 'i':
	    case 'u':
	    case 'a':
	    case 'x':
	    case 'X':
		/* Remember: char and short are sent as int on the stack */
		if (arg_size == -1)
		    l = (long)va_arg(ap, int);
		else if (arg_size == 1)
		    l = va_arg(ap, long); 
		else if (arg_size == 2)
		    l = va_arg(ap, long long); 
		else 
		    l = (long)va_arg(ap, int);

		DEBUG_printf("%d", l);

		/*
		 * No number can be more than 24 characters so we'll take
		 * the max of conv_len and 24 (23 is len(2^64) in octal).
		 * All that work above and we then go and estimate ;-),
		 * but it's needed incase someone does %500d.
		 */
		len += MAX(conv_len, 23);
		break;

	    case 'c':
		i = va_arg(ap, int);
		DEBUG_printf("%c", i);
		/*
		 * Note that %10c and %.10c act differently.
		 * Besides, I think precision is not really allowed for %c.
		 */
		len += MAX(conv_len1, i>=0x80 ?MB_CUR_MAX :1);
		break;

	    case 'f':
		d = va_arg(ap, double);
		DEBUG_printf("%f", d);
		/*
		 * Maybe "Inf" or "NaN", but we'll not worry about that.
		 * Again, err on side of caution and take max of conv_len
		 * and max length of a double. The worst case I can
		 * think of is 317 characters (-1[308 zeros].000000)
		 * without using precision codes. That's horrid. I
		 * cheat and either use 317 or 15 depending on how
		 * large the number is as I reckon 99% of floats
		 * aren't that long.
		 */
		l = (ABS(d) > 1000000) ? 317 : 15;
		l = MAX(l, conv_len1 + 2);
		if (conv_len2) l += conv_len2 - 6;
		len += l;
		break;

	    case 'e':
	    case 'E':
	    case 'g':
	    case 'G':
		d = va_arg(ap, double);
		DEBUG_printf("%g", d);
		/*
		 * Maybe "Inf" or "NaN", but we'll not worry about that
		 * Again, err on side of caution and take max of conv_len
		 * and max length of a double (which defaults to only
		 * '-' + 6 + '.' + 'E[+-]xxx' == 13.
		 */
		len += MAX(conv_len, 13);
		break;

	    case 'p':
		l = (long)va_arg(ap, void *);
		/*
		 * Max pointer is 64bits == 16 chars (on alpha),
		 * == 20 with + "0x".
		 */
		DEBUG_printf("%p", (void *)l);
		len += MAX(conv_len, 20);
		break;

	    case 'n':
		/* produces no output */
		break;

	    case 's': {
		char *s = (char *)va_arg(ap, char *);
		DEBUG_printf("%s", s);

		if (!conv_len2) {
		    len += MAX(conv_len, (int)strlen(s));
		} else {
		    len += conv_len;
		}
		break;
	    }

	    default:
		/* wchar_t types of 'C' and 'S' aren't supported */
		DEBUG_printf("Arg is %c\n", *cp);
	    }
	    
	}

	case '\0':
	    break;

	default:
	    DEBUG_printf("%c", *cp);
	    len++;
	}
    }

    va_end(ap);

    return len+1; /* one for the null character */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x61a25
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x74(%rbp)
testl %eax, %eax
je 0x61a07
jmp 0x61093
movl -0x74(%rbp), %eax
subl $0x25, %eax
jne 0x61a09
jmp 0x610a1
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb 0x1(%rax), %al
movb %al, -0x21(%rbp)
cmpb $0x0, %al
je 0x61122
movsbl -0x21(%rbp), %ecx
movl $0x23, %eax
cmpl %ecx, %eax
jne 0x610ea
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x61120
movsbl -0x21(%rbp), %ecx
movl $0x2d, %eax
cmpl %ecx, %eax
je 0x61111
movsbl -0x21(%rbp), %ecx
movl $0x2b, %eax
cmpl %ecx, %eax
je 0x61111
movsbl -0x21(%rbp), %ecx
movl $0x20, %eax
cmpl %ecx, %eax
jne 0x6111c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6111e
jmp 0x61122
jmp 0x61120
jmp 0x610b9
movq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x4820
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x61158
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x60(%rbp)
jmp 0x611cc
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x611ca
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movl (%rax), %eax
movl %eax, -0x78(%rbp)
cmpl $0x28, %eax
ja 0x61192
movq -0x80(%rbp), %rcx
movl -0x78(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x88(%rbp)
jmp 0x611ac
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x50(%rbp)
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x611cc
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movl $0x2e, %eax
cmpl %ecx, %eax
jne 0x612c2
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0xa, %edx
callq 0x4820
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x61216
movq -0x48(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x61295
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x61293
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x28, %eax
ja 0x6125c
movq -0x98(%rbp), %rcx
movl -0x8c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xa0(%rbp)
jmp 0x61279
movq -0x98(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x61295
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jle 0x612ac
movq -0x50(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x612b7
movq -0x58(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movl $0x68, %eax
cmpl %ecx, %eax
jne 0x612e7
movl $0xffffffff, -0x64(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x61338
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movl $0x6c, %eax
cmpl %ecx, %eax
jne 0x6132f
movl $0x1, -0x64(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
movl $0x6c, %eax
cmpl %ecx, %eax
jne 0x6132d
movl $0x2, -0x64(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x61336
movl $0x0, -0x64(%rbp)
jmp 0x61338
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
addl $-0x25, %eax
movl %eax, %ecx
movq %rcx, -0xb0(%rbp)
subl $0x53, %eax
ja 0x61a03
movq -0xb0(%rbp), %rax
leaq 0x1c8b6(%rip), %rcx     # 0x7dc18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x1, -0x50(%rbp)
jle 0x6137f
movq -0x50(%rbp), %rax
movq %rax, -0xb8(%rbp)
jmp 0x6138d
movl $0x1, %eax
movq %rax, -0xb8(%rbp)
jmp 0x6138d
movq -0xb8(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
cmpl $-0x1, -0x64(%rbp)
jne 0x61413
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl (%rax), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x28, %eax
ja 0x613e3
movq -0xc8(%rbp), %rcx
movl -0xbc(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xd0(%rbp)
jmp 0x61400
movq -0xc8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x61559
cmpl $0x1, -0x64(%rbp)
jne 0x61483
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl (%rax), %eax
movl %eax, -0xd4(%rbp)
cmpl $0x28, %eax
ja 0x61453
movq -0xe0(%rbp), %rcx
movl -0xd4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xe8(%rbp)
jmp 0x61470
movq -0xe0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x61557
cmpl $0x2, -0x64(%rbp)
jne 0x614f0
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl (%rax), %eax
movl %eax, -0xec(%rbp)
cmpl $0x28, %eax
ja 0x614c3
movq -0xf8(%rbp), %rcx
movl -0xec(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x100(%rbp)
jmp 0x614e0
movq -0xf8(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x61555
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movl (%rax), %eax
movl %eax, -0x104(%rbp)
cmpl $0x28, %eax
ja 0x6152a
movq -0x110(%rbp), %rcx
movl -0x104(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x118(%rbp)
jmp 0x61547
movq -0x110(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x61557
jmp 0x61559
cmpq $0x17, -0x60(%rbp)
jle 0x6156d
movq -0x60(%rbp), %rax
movq %rax, -0x120(%rbp)
jmp 0x6157b
movl $0x17, %eax
movq %rax, -0x120(%rbp)
jmp 0x6157b
movq -0x120(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
movl (%rax), %eax
movl %eax, -0x124(%rbp)
cmpl $0x28, %eax
ja 0x615cb
movq -0x130(%rbp), %rcx
movl -0x124(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x138(%rbp)
jmp 0x615e8
movq -0x130(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x140(%rbp)
cmpl $0x80, -0x34(%rbp)
jl 0x61616
callq 0x40b0
movq %rax, -0x148(%rbp)
jmp 0x61624
movl $0x1, %eax
movq %rax, -0x148(%rbp)
jmp 0x61624
movq -0x140(%rbp), %rax
movq -0x148(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x61644
movq -0x50(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x61677
cmpl $0x80, -0x34(%rbp)
jl 0x6165b
callq 0x40b0
movq %rax, -0x158(%rbp)
jmp 0x61669
movl $0x1, %eax
movq %rax, -0x158(%rbp)
jmp 0x61669
movq -0x158(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
movq -0x10(%rbp), %rax
movq %rax, -0x170(%rbp)
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x168(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x15c(%rbp)
cmpl $0xa0, %eax
ja 0x616df
movq -0x168(%rbp), %rcx
movl -0x15c(%rbp), %edx
movq -0x170(%rbp), %rsi
movslq %edx, %rax
addq 0x10(%rsi), %rax
addl $0x10, %edx
movl %edx, (%rcx)
movq %rax, -0x178(%rbp)
jmp 0x616fc
movq -0x170(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x61729
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x180(%rbp)
jmp 0x6174d
movsd -0x40(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x180(%rbp)
movsd -0x180(%rbp), %xmm0
movsd 0x1c4b3(%rip), %xmm1    # 0x7dc10
movl $0xf, %eax
movl $0x13d, %ecx            # imm = 0x13D
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
cltq
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jle 0x61792
movq -0x30(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0x617a1
movq -0x50(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x617c3
movq -0x58(%rbp), %rax
subq $0x6, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x198(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x18c(%rbp)
cmpl $0xa0, %eax
ja 0x61828
movq -0x198(%rbp), %rcx
movl -0x18c(%rbp), %edx
movq -0x1a0(%rbp), %rsi
movslq %edx, %rax
addq 0x10(%rsi), %rax
addl $0x10, %edx
movl %edx, (%rcx)
movq %rax, -0x1a8(%rbp)
jmp 0x61845
movq -0x1a0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
cmpq $0xd, -0x60(%rbp)
jle 0x61869
movq -0x60(%rbp), %rax
movq %rax, -0x1b0(%rbp)
jmp 0x61877
movl $0xd, %eax
movq %rax, -0x1b0(%rbp)
jmp 0x61877
movq -0x1b0(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movl (%rax), %eax
movl %eax, -0x1b4(%rbp)
cmpl $0x28, %eax
ja 0x618c7
movq -0x1c0(%rbp), %rcx
movl -0x1b4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1c8(%rbp)
jmp 0x618e4
movq -0x1c0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x14, -0x60(%rbp)
jle 0x61906
movq -0x60(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x61914
movl $0x14, %eax
movq %rax, -0x1d0(%rbp)
jmp 0x61914
movq -0x1d0(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
jmp 0x61a05
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl (%rax), %eax
movl %eax, -0x1d4(%rbp)
cmpl $0x28, %eax
ja 0x61969
movq -0x1e0(%rbp), %rcx
movl -0x1d4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x1e8(%rbp)
jmp 0x61986
movq -0x1e0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x619f3
movq -0x60(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x70(%rbp), %rdi
callq 0x4230
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x619ce
movq -0x60(%rbp), %rax
movq %rax, -0x1f8(%rbp)
jmp 0x619e0
movq -0x70(%rbp), %rdi
callq 0x4230
cltq
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a01
movq -0x60(%rbp), %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
jmp 0x61a05
jmp 0x61a05
jmp 0x61a07
jmp 0x61a12
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x61a14
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x61072
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %eax
addl $0x1, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
nopl (%rax,%rax)