// File: /workspace/github_c_makefile_star2_O0/lyda[P]tz/localtime.c
// Function: tzload
static int
tzload(name, sp, doextend)
register const char *		name;
register struct state * const	sp;
register const int		doextend;
{
	register const char *		p;
	register int			i;
	register int			fid;
	register int			stored;
	register int			nread;
	typedef union {
		struct tzhead	tzhead;
		char		buf[2 * sizeof(struct tzhead) +
					2 * sizeof *sp +
					4 * TZ_MAX_TIMES];
	} u_t;
#ifdef ALL_STATE
	register u_t *			up;

	up = (u_t *) calloc(1, sizeof *up);
	if (up == NULL)
		return -1;
#else /* !defined ALL_STATE */
	u_t				u;
	register u_t * const		up = &u;
#endif /* !defined ALL_STATE */

	sp->goback = sp->goahead = FALSE;
	if (name == NULL && (name = TZDEFAULT) == NULL)
		goto oops;
	{
		register int	doaccess;
		/*
		** Section 4.9.1 of the C standard says that
		** "FILENAME_MAX expands to an integral constant expression
		** that is the size needed for an array of char large enough
		** to hold the longest file name string that the implementation
		** guarantees can be opened."
		*/
		char		fullname[FILENAME_MAX + 1];

		if (name[0] == ':')
			++name;
		doaccess = name[0] == '/';
		if (!doaccess) {
			if ((p = TZDIR) == NULL)
				goto oops;
			if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)
				goto oops;
			(void) strcpy(fullname, p);
			(void) strcat(fullname, "/");
			(void) strcat(fullname, name);
			/*
			** Set doaccess if '.' (as in "../") shows up in name.
			*/
			if (strchr(name, '.') != NULL)
				doaccess = TRUE;
			name = fullname;
		}
		if (doaccess && access(name, R_OK) != 0)
			goto oops;
		if ((fid = open(name, OPEN_MODE)) == -1)
			goto oops;
	}
	nread = read(fid, up->buf, sizeof up->buf);
	if (close(fid) < 0 || nread <= 0)
		goto oops;
	for (stored = 4; stored <= 8; stored *= 2) {
		int		ttisstdcnt;
		int		ttisgmtcnt;

		ttisstdcnt = (int) detzcode(up->tzhead.tzh_ttisstdcnt);
		ttisgmtcnt = (int) detzcode(up->tzhead.tzh_ttisgmtcnt);
		sp->leapcnt = (int) detzcode(up->tzhead.tzh_leapcnt);
		sp->timecnt = (int) detzcode(up->tzhead.tzh_timecnt);
		sp->typecnt = (int) detzcode(up->tzhead.tzh_typecnt);
		sp->charcnt = (int) detzcode(up->tzhead.tzh_charcnt);
		p = up->tzhead.tzh_charcnt + sizeof up->tzhead.tzh_charcnt;
		if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS ||
			sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES ||
			sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES ||
			sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||
			(ttisstdcnt != sp->typecnt && ttisstdcnt != 0) ||
			(ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0))
				goto oops;
		if (nread - (p - up->buf) <
			sp->timecnt * stored +		/* ats */
			sp->timecnt +			/* types */
			sp->typecnt * 6 +		/* ttinfos */
			sp->charcnt +			/* chars */
			sp->leapcnt * (stored + 4) +	/* lsinfos */
			ttisstdcnt +			/* ttisstds */
			ttisgmtcnt)			/* ttisgmts */
				goto oops;
		for (i = 0; i < sp->timecnt; ++i) {
			sp->ats[i] = (stored == 4) ?
				detzcode(p) : detzcode64(p);
			p += stored;
		}
		for (i = 0; i < sp->timecnt; ++i) {
			sp->types[i] = (unsigned char) *p++;
			if (sp->types[i] >= sp->typecnt)
				goto oops;
		}
		for (i = 0; i < sp->typecnt; ++i) {
			register struct ttinfo *	ttisp;

			ttisp = &sp->ttis[i];
			ttisp->tt_gmtoff = detzcode(p);
			p += 4;
			ttisp->tt_isdst = (unsigned char) *p++;
			if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1)
				goto oops;
			ttisp->tt_abbrind = (unsigned char) *p++;
			if (ttisp->tt_abbrind < 0 ||
				ttisp->tt_abbrind > sp->charcnt)
					goto oops;
		}
		for (i = 0; i < sp->charcnt; ++i)
			sp->chars[i] = *p++;
		sp->chars[i] = '\0';	/* ensure '\0' at end */
		for (i = 0; i < sp->leapcnt; ++i) {
			register struct lsinfo *	lsisp;

			lsisp = &sp->lsis[i];
			lsisp->ls_trans = (stored == 4) ?
				detzcode(p) : detzcode64(p);
			p += stored;
			lsisp->ls_corr = detzcode(p);
			p += 4;
		}
		for (i = 0; i < sp->typecnt; ++i) {
			register struct ttinfo *	ttisp;

			ttisp = &sp->ttis[i];
			if (ttisstdcnt == 0)
				ttisp->tt_ttisstd = FALSE;
			else {
				ttisp->tt_ttisstd = *p++;
				if (ttisp->tt_ttisstd != TRUE &&
					ttisp->tt_ttisstd != FALSE)
						goto oops;
			}
		}
		for (i = 0; i < sp->typecnt; ++i) {
			register struct ttinfo *	ttisp;

			ttisp = &sp->ttis[i];
			if (ttisgmtcnt == 0)
				ttisp->tt_ttisgmt = FALSE;
			else {
				ttisp->tt_ttisgmt = *p++;
				if (ttisp->tt_ttisgmt != TRUE &&
					ttisp->tt_ttisgmt != FALSE)
						goto oops;
			}
		}
		/*
		** Out-of-sort ats should mean we're running on a
		** signed time_t system but using a data file with
		** unsigned values (or vice versa).
		*/
		for (i = 0; i < sp->timecnt - 2; ++i)
			if (sp->ats[i] > sp->ats[i + 1]) {
				++i;
				if (TYPE_SIGNED(time_t)) {
					/*
					** Ignore the end (easy).
					*/
					sp->timecnt = i;
				} else {
					/*
					** Ignore the beginning (harder).
					*/
					register int	j;

					for (j = 0; j + i < sp->timecnt; ++j) {
						sp->ats[j] = sp->ats[j + i];
						sp->types[j] = sp->types[j + i];
					}
					sp->timecnt = j;
				}
				break;
			}
		/*
		** If this is an old file, we're done.
		*/
		if (up->tzhead.tzh_version[0] == '\0')
			break;
		nread -= p - up->buf;
		for (i = 0; i < nread; ++i)
			up->buf[i] = p[i];
		/*
		** If this is a narrow integer time_t system, we're done.
		*/
		if (stored >= (int) sizeof(time_t) && TYPE_INTEGRAL(time_t))
			break;
	}
	if (doextend && nread > 2 &&
		up->buf[0] == '\n' && up->buf[nread - 1] == '\n' &&
		sp->typecnt + 2 <= TZ_MAX_TYPES) {
			struct state	ts;
			register int	result;

			up->buf[nread - 1] = '\0';
			result = tzparse(&up->buf[1], &ts, FALSE);
			if (result == 0 && ts.typecnt == 2 &&
				sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) {
					for (i = 0; i < 2; ++i)
						ts.ttis[i].tt_abbrind +=
							sp->charcnt;
					for (i = 0; i < ts.charcnt; ++i)
						sp->chars[sp->charcnt++] =
							ts.chars[i];
					i = 0;
					while (i < ts.timecnt &&
						ts.ats[i] <=
						sp->ats[sp->timecnt - 1])
							++i;
					while (i < ts.timecnt &&
					    sp->timecnt < TZ_MAX_TIMES) {
						sp->ats[sp->timecnt] =
							ts.ats[i];
						sp->types[sp->timecnt] =
							sp->typecnt +
							ts.types[i];
						++sp->timecnt;
						++i;
					}
					sp->ttis[sp->typecnt++] = ts.ttis[0];
					sp->ttis[sp->typecnt++] = ts.ttis[1];
			}
	}
	if (sp->timecnt > 1) {
		for (i = 1; i < sp->timecnt; ++i)
			if (typesequiv(sp, sp->types[i], sp->types[0]) &&
				differ_by_repeat(sp->ats[i], sp->ats[0])) {
					sp->goback = TRUE;
					break;
				}
		for (i = sp->timecnt - 2; i >= 0; --i)
			if (typesequiv(sp, sp->types[sp->timecnt - 1],
				sp->types[i]) &&
				differ_by_repeat(sp->ats[sp->timecnt - 1],
				sp->ats[i])) {
					sp->goahead = TRUE;
					break;
		}
	}
#ifdef ALL_STATE
	(void) free((void *) up);
#endif /* defined ALL_STATE */
	return 0;
oops:
#ifdef ALL_STATE
	(void) free((void *) up);
#endif /* defined ALL_STATE */
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf9f0, %rsp           # imm = 0xF9F0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq -0xa220(%rbp), %rax
movq %rax, -0xa228(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
cmpq $0x0, -0x10(%rbp)
jne 0x2789
leaq 0x4aab(%rip), %rax      # 0x7223
movq %rax, -0x10(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x2784
jmp 0x2789
jmp 0x32fe
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x27a1
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xa22c(%rbp)
cmpl $0x0, -0xa22c(%rbp)
jne 0x2871
leaq 0x4a60(%rip), %rax      # 0x722d
movq %rax, -0x28(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x27d9
jmp 0x27de
jmp 0x32fe
movq -0x28(%rbp), %rdi
callq 0x10a0
movq %rax, -0xf9d0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x10a0
movq %rax, %rcx
movq -0xf9d0(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
cmpq $0x1001, %rax           # imm = 0x1001
jb 0x2815
jmp 0x32fe
leaq -0xb230(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1080
leaq -0xb230(%rbp), %rdi
leaq 0x4a12(%rip), %rsi      # 0x7245
callq 0x11e0
leaq -0xb230(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x11e0
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
callq 0x10c0
cmpq $0x0, %rax
je 0x2866
movl $0x1, -0xa22c(%rbp)
leaq -0xb230(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0xa22c(%rbp)
je 0x2892
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x11b0
cmpl $0x0, %eax
je 0x2892
jmp 0x32fe
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x11a0
movl %eax, -0x30(%rbp)
cmpl $-0x1, %eax
jne 0x28ac
jmp 0x32fe
movl -0x30(%rbp), %edi
movq -0xa228(%rbp), %rsi
movl $0xa1e8, %edx           # imm = 0xA1E8
callq 0x10f0
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %edi
callq 0x10e0
cmpl $0x0, %eax
jl 0x28d6
cmpl $0x0, -0x38(%rbp)
jg 0x28db
jmp 0x32fe
movl $0x4, -0x34(%rbp)
cmpl $0x8, -0x34(%rbp)
jg 0x2f1f
movq -0xa228(%rbp), %rdi
addq $0x18, %rdi
callq 0x4800
movl %eax, -0xb234(%rbp)
movq -0xa228(%rbp), %rdi
addq $0x14, %rdi
callq 0x4800
movl %eax, -0xb238(%rbp)
movq -0xa228(%rbp), %rdi
addq $0x1c, %rdi
callq 0x4800
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0xa228(%rbp), %rdi
addq $0x20, %rdi
callq 0x4800
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0xa228(%rbp), %rdi
addq $0x24, %rdi
callq 0x4800
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xa228(%rbp), %rdi
addq $0x28, %rdi
callq 0x4800
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xa228(%rbp), %rax
addq $0x28, %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x32, (%rax)
jg 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x100, 0x8(%rax)       # imm = 0x100
jg 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jl 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x4b0, 0x4(%rax)       # imm = 0x4B0
jg 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jl 0x2a12
movq -0x18(%rbp), %rax
cmpl $0x32, 0xc(%rax)
jg 0x2a12
movl -0xb234(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x29fa
cmpl $0x0, -0xb234(%rbp)
jne 0x2a12
movl -0xb238(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x2a17
cmpl $0x0, -0xb238(%rbp)
je 0x2a17
jmp 0x32fe
movslq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0xa228(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
imull -0x34(%rbp), %ecx
movq -0x18(%rbp), %rdx
addl 0x4(%rdx), %ecx
movq -0x18(%rbp), %rdx
imull $0x6, 0x8(%rdx), %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
addl 0xc(%rdx), %ecx
movq -0x18(%rbp), %rdx
movl (%rdx), %edx
movl -0x34(%rbp), %esi
addl $0x4, %esi
imull %esi, %edx
addl %edx, %ecx
addl -0xb234(%rbp), %ecx
addl -0xb238(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x2a79
jmp 0x32fe
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2ae4
cmpl $0x4, -0x34(%rbp)
jne 0x2aa4
movq -0x28(%rbp), %rdi
callq 0x4800
movq %rax, -0xf9d8(%rbp)
jmp 0x2ab4
movq -0x28(%rbp), %rdi
callq 0x4870
movq %rax, -0xf9d8(%rbp)
movq -0xf9d8(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, 0x18(%rax,%rcx,8)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2a80
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x2b42
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %dl
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, 0x2598(%rax,%rcx)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl 0x2598(%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x2b35
jmp 0x32fe
jmp 0x2b37
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2aeb
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2c23
movq -0x18(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb240(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4800
movq %rax, %rcx
movq -0xb240(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movzbl (%rax), %ecx
movq -0xb240(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0xb240(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x2bd2
movq -0xb240(%rbp), %rax
cmpl $0x1, 0x8(%rax)
je 0x2bd2
jmp 0x32fe
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movzbl (%rax), %ecx
movq -0xb240(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0xb240(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jl 0x2c0e
movq -0xb240(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x2c13
jmp 0x32fe
jmp 0x2c15
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2b49
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x2c61
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %dl
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, 0x4248(%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2c2a
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, 0x4248(%rax,%rcx)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2d1e
movq -0x18(%rbp), %rax
addq $0x4448, %rax           # imm = 0x4448
movslq -0x2c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xb248(%rbp)
cmpl $0x4, -0x34(%rbp)
jne 0x2cbb
movq -0x28(%rbp), %rdi
callq 0x4800
movq %rax, -0xf9e0(%rbp)
jmp 0x2ccb
movq -0x28(%rbp), %rdi
callq 0x4870
movq %rax, -0xf9e0(%rbp)
movq -0xf9e0(%rbp), %rcx
movq -0xb248(%rbp), %rax
movq %rcx, (%rax)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4800
movq %rax, %rcx
movq -0xb248(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2c78
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2db7
movq -0x18(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb250(%rbp)
cmpl $0x0, -0xb234(%rbp)
jne 0x2d6a
movq -0xb250(%rbp), %rax
movl $0x0, 0x10(%rax)
jmp 0x2da7
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %ecx
movq -0xb250(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0xb250(%rbp), %rax
cmpl $0x1, 0x10(%rax)
je 0x2da5
movq -0xb250(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x2da5
jmp 0x32fe
jmp 0x2da7
jmp 0x2da9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2d25
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x2e50
movq -0x18(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xb258(%rbp)
cmpl $0x0, -0xb238(%rbp)
jne 0x2e03
movq -0xb258(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0x2e40
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movsbl (%rax), %ecx
movq -0xb258(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0xb258(%rbp), %rax
cmpl $0x1, 0x14(%rax)
je 0x2e3e
movq -0xb258(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x2e3e
jmp 0x32fe
jmp 0x2e40
jmp 0x2e42
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2dbe
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x2eab
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movl -0x2c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpq 0x18(%rcx,%rdx,8), %rax
jle 0x2e9e
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x2eab
jmp 0x2ea0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2e57
movq -0xa228(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x2ebd
jmp 0x2f1f
movq -0x28(%rbp), %rcx
movq -0xa228(%rbp), %rax
subq %rax, %rcx
movslq -0x38(%rbp), %rax
subq %rcx, %rax
movl %eax, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x2f08
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0xa228(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2edc
cmpl $0x8, -0x34(%rbp)
jl 0x2f10
jmp 0x2f1f
jmp 0x2f12
movl -0x34(%rbp), %eax
shll %eax
movl %eax, -0x34(%rbp)
jmp 0x28e2
cmpl $0x0, -0x1c(%rbp)
je 0x31d8
cmpl $0x2, -0x38(%rbp)
jle 0x31d8
movq -0xa228(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x31d8
movq -0xa228(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x31d8
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x2, %eax
cmpl $0x100, %eax            # imm = 0x100
jg 0x31d8
movq -0xa228(%rbp), %rax
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0xa228(%rbp), %rdi
addq $0x1, %rdi
leaq -0xf9c0(%rbp), %rsi
xorl %edx, %edx
callq 0x3320
movl %eax, -0xf9c4(%rbp)
cmpl $0x0, -0xf9c4(%rbp)
jne 0x31d6
cmpl $0x2, -0xf9b8(%rbp)
jne 0x31d6
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
addl -0xf9b4(%rbp), %eax
cmpl $0x32, %eax
jg 0x31d6
movl $0x0, -0x2c(%rbp)
cmpl $0x2, -0x2c(%rbp)
jge 0x3018
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
leaq -0xf9c0(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movslq -0x2c(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2fe2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xf9b4(%rbp), %eax
jge 0x305d
movslq -0x2c(%rbp), %rax
movb -0xb778(%rbp,%rax), %dl
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rsi
movl 0xc(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0xc(%rsi)
movslq %ecx, %rcx
movb %dl, 0x4248(%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x301f
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
cmpl -0xf9bc(%rbp), %ecx
movb %al, -0xf9e1(%rbp)
jge 0x30a2
movslq -0x2c(%rbp), %rax
movq -0xf9a8(%rbp,%rax,8), %rax
movq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rdx
movl 0x4(%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
cmpq 0x18(%rcx,%rdx,8), %rax
setle %al
movb %al, -0xf9e1(%rbp)
movb -0xf9e1(%rbp), %al
testb $0x1, %al
jne 0x30ae
jmp 0x30b9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3064
jmp 0x30bb
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
cmpl -0xf9bc(%rbp), %ecx
movb %al, -0xf9e2(%rbp)
jge 0x30e2
movq -0x18(%rbp), %rax
cmpl $0x4b0, 0x4(%rax)       # imm = 0x4B0
setl %al
movb %al, -0xf9e2(%rbp)
movb -0xf9e2(%rbp), %al
testb $0x1, %al
jne 0x30ee
jmp 0x3150
movslq -0x2c(%rbp), %rax
movq -0xf9a8(%rbp,%rax,8), %rdx
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movq %rdx, 0x18(%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movslq -0x2c(%rbp), %rcx
movzbl -0xd428(%rbp,%rcx), %ecx
addl %ecx, %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movb %dl, 0x2598(%rax,%rcx)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x30bb
movq -0x18(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movq -0x18(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xcf78(%rbp), %rcx
movq %rcx, (%rax)
movq -0xcf70(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xcf68(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x2a48, %rax           # imm = 0x2A48
movq -0x18(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq -0xcf60(%rbp), %rcx
movq %rcx, (%rax)
movq -0xcf58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0xcf50(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x31d8
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jle 0x32f5
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x325b
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl 0x2598(%rax,%rcx), %esi
movq -0x18(%rbp), %rax
movzbl 0x2598(%rax), %edx
callq 0x48e0
cmpl $0x0, %eax
je 0x324e
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x4a00
cmpl $0x0, %eax
je 0x324e
movq -0x18(%rbp), %rax
movl $0x1, 0x10(%rax)
jmp 0x325b
jmp 0x3250
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x31ed
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
subl $0x2, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x32f3
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl 0x2598(%rax,%rcx), %esi
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl 0x2598(%rax,%rcx), %edx
callq 0x48e0
cmpl $0x0, %eax
je 0x32e3
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x18(%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rsi
callq 0x4a00
cmpl $0x0, %eax
je 0x32e3
movq -0x18(%rbp), %rax
movl $0x1, 0x14(%rax)
jmp 0x32f3
jmp 0x32e5
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3268
jmp 0x32f5
movl $0x0, -0x4(%rbp)
jmp 0x3305
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xf9f0, %rsp           # imm = 0xF9F0
popq %rbp
retq
nopw %cs:(%rax,%rax)