// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe9c8, %rsp           # imm = 0xE9C8
movl %edx, 0x44(%rsp)
movq %rsi, 0x8(%rsp)
movq $0x0, 0x10(%rsi)
testq %rdi, %rdi
leaq 0x2ec6(%rip), %rax      # 0x622b
cmovneq %rdi, %rax
xorl %ecx, %ecx
cmpb $0x3a, (%rax)
sete %cl
leaq (%rax,%rcx), %r14
xorl %ebx, %ebx
cmpb $0x2f, (%rax,%rcx)
sete %bl
je 0x33ef
movq %r14, %rdi
callq 0x20c0
addq $-0xfe9, %rax           # imm = 0xF017
cmpq $-0x1001, %rax          # imm = 0xEFFF
jb 0x3404
movups 0x2e98(%rip), %xmm0     # 0x6235
leaq 0x47e0(%rsp), %r15
movaps %xmm0, (%r15)
movabsq $0x6f666e69656e6f, %rax # imm = 0x6F666E69656E6F
movq %rax, 0x10(%r15)
movq %r15, %rdi
callq 0x20c0
movw $0x2f, 0x47e0(%rsp,%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2210
movq %r14, %rdi
movl $0x2e, %esi
callq 0x20e0
testq %rax, %rax
movl $0x1, %eax
cmovnel %eax, %ebx
movq %r15, %r14
testl %ebx, %ebx
je 0x3408
movq %r14, %rdi
movl $0x4, %esi
callq 0x21e0
testl %eax, %eax
je 0x3408
xorl %ecx, %ecx
jmp 0x341d
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x21d0
movl %eax, %r12d
cmpl $-0x1, %eax
setne %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
je 0x3cdc
leaq 0x47e0(%rsp), %rsi
movl $0xa1e8, %edx           # imm = 0xA1E8
movl %r12d, %edi
callq 0x2130
movq %rax, %rbx
movl %r12d, %edi
callq 0x2110
testl %eax, %eax
sets %al
testl %ebx, %ebx
setle %cl
orb %al, %cl
jne 0x3b8a
movq %rbx, 0x20(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x2a48(%rdi), %rax
movq %rax, 0x58(%rsp)
leaq 0x4448(%rdi), %rax
movq %rax, 0x60(%rsp)
leaq 0x2a58(%rdi), %rax
movq %rax, 0x50(%rsp)
leaq 0x2a5c(%rdi), %rax
movq %rax, 0x48(%rsp)
movl $0x4, %r9d
movb 0x47f8(%rsp), %al
sarb $0x7, %al
movsbq %al, %r13
movl $0x18, %eax
movq %r13, %rcx
shlq $0x8, %rcx
movzbl 0x47e0(%rsp,%rax), %r13d
orq %rcx, %r13
incq %rax
cmpq $0x1c, %rax
jne 0x34af
movb 0x47f4(%rsp), %al
sarb $0x7, %al
movsbq %al, %r11
movl $0x14, %eax
movq %r11, %rcx
shlq $0x8, %rcx
movzbl 0x47e0(%rsp,%rax), %r11d
orq %rcx, %r11
incq %rax
cmpq $0x18, %rax
jne 0x34de
movb 0x47fc(%rsp), %al
sarb $0x7, %al
movsbq %al, %rsi
movl $0x1c, %eax
movq %rsi, %rdx
shlq $0x8, %rsi
movzbl 0x47e0(%rsp,%rax), %ebp
orq %rbp, %rsi
incq %rax
cmpq $0x20, %rax
jne 0x350d
movl %esi, (%rdi)
movb 0x4800(%rsp), %al
sarb $0x7, %al
movsbq %al, %r12
movl $0x20, %eax
movq %r12, %rbx
shlq $0x8, %r12
movzbl 0x47e0(%rsp,%rax), %ecx
orq %rcx, %r12
incq %rax
cmpq $0x24, %rax
jne 0x353d
movq %rdx, 0x70(%rsp)
movl %r12d, 0x4(%rdi)
movb 0x4804(%rsp), %al
sarb $0x7, %al
movsbq %al, %r10
movl $0x24, %eax
movq %r10, %rdx
shlq $0x8, %r10
movzbl 0x47e0(%rsp,%rax), %r8d
orq %r8, %r10
incq %rax
cmpq $0x28, %rax
jne 0x3574
movq %r8, 0x38(%rsp)
movl %r10d, 0x8(%rdi)
movb 0x4808(%rsp), %al
sarb $0x7, %al
movsbq %al, %r15
movl $0x28, %eax
movq %r15, %r14
shlq $0x8, %r15
movzbl 0x47e0(%rsp,%rax), %r8d
orq %r8, %r15
incq %rax
cmpq $0x2c, %rax
jne 0x35ac
movl %r15d, 0xc(%rdi)
movl $0x2, %eax
cmpl $0x32, %esi
ja 0x3851
leal -0x101(%r10), %eax
cmpl $0xffffff00, %eax       # imm = 0xFFFFFF00
jb 0x384c
cmpl $0x4b0, %r12d           # imm = 0x4B0
movl $0x2, %eax
ja 0x3851
cmpl $0x32, %r15d
ja 0x3851
testl %r13d, %r13d
je 0x3616
cmpl %r13d, %r10d
jne 0x3851
testl %r11d, %r11d
je 0x3624
cmpl %r11d, %r10d
jne 0x3851
movslq 0x20(%rsp), %rdi
addq $-0x2c, %rdi
movq %rdi, (%rsp)
movl %r9d, %edi
orl $0x1, %edi
imull %r12d, %edi
movl %edi, 0x30(%rsp)
leal (%r10,%r10,2), %edi
movq %rdi, 0x18(%rsp)
movq %r9, 0x10(%rsp)
leal 0x4(%r9), %edi
imull %esi, %edi
addl %r11d, %edi
addl %r13d, %edi
addl 0x30(%rsp), %edi
movq 0x18(%rsp), %r9
leal (%rdi,%r9,2), %edi
addl %r15d, %edi
movslq %edi, %rdi
cmpq %rdi, (%rsp)
jge 0x3682
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r9
jmp 0x3851
movq %rdx, 0x28(%rsp)
leaq 0x480c(%rsp), %rdx
testl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r9
jle 0x373a
movl %r9d, %eax
movq %rax, 0x30(%rsp)
movl %ebx, %eax
shll $0x8, %eax
orq %rcx, %rax
movq %rax, 0x68(%rsp)
movq $0x0, 0x18(%rsp)
movq %rdx, (%rsp)
movb (%rdx), %dil
sarb $0x7, %dil
movsbq %dil, %rax
cmpl $0x4, %r9d
jne 0x36f3
xorl %r9d, %r9d
movq (%rsp), %rdi
shlq $0x8, %rax
movzbl (%rdi,%r9), %edx
orq %rdx, %rax
incq %r9
cmpq $0x4, %r9
jne 0x36dc
jmp 0x370f
xorl %r9d, %r9d
movq (%rsp), %rdi
shlq $0x8, %rax
movzbl (%rdi,%r9), %edx
orq %rdx, %rax
incq %r9
cmpq $0x8, %r9
jne 0x36fa
movq %rdi, %rdx
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %r9
movq %rax, 0x18(%rdi,%r9,8)
addq 0x30(%rsp), %rdx
incq %r9
movq %r9, 0x18(%rsp)
cmpq 0x68(%rsp), %r9
movq 0x10(%rsp), %r9
jne 0x36c0
movq %rdx, (%rsp)
testl %r12d, %r12d
jle 0x376f
shll $0x8, %ebx
orq %rcx, %rbx
xorl %ecx, %ecx
movq (%rsp), %rax
movzbl (%rax,%rcx), %edx
movb %dl, 0x2598(%rdi,%rcx)
cmpl %edx, %r10d
jle 0x384c
incq %rcx
cmpq %rcx, %rbx
jne 0x374b
addq %rcx, (%rsp)
testl %r10d, %r10d
movq 0x28(%rsp), %rcx
jle 0x381c
shll $0x8, %ecx
addq 0x38(%rsp), %rcx
movq %rcx, 0x18(%rsp)
xorl %ebx, %ebx
movq (%rsp), %rcx
movb (%rcx), %dl
sarb $0x7, %dl
movsbq %dl, %rdi
xorl %r9d, %r9d
movq %rdi, %rdx
shlq $0x8, %rdx
movzbl (%rcx,%r9), %edi
orq %rdx, %rdi
incq %r9
cmpq $0x4, %r9
jne 0x379c
leaq (%rbx,%rbx,2), %r9
movq 0x58(%rsp), %rax
movq %rdi, (%rax,%r9,8)
movzbl 0x4(%rcx), %edx
movl %edx, 0x8(%rax,%r9,8)
cmpl $0x1, %edx
ja 0x37f1
leaq (%rax,%r9,8), %rdx
movzbl 0x5(%rcx), %edi
addq $0x6, %rcx
movq %rcx, (%rsp)
movl %edi, 0xc(%rdx)
xorl %ecx, %ecx
cmpl %edi, %r15d
setge %al
setl %cl
addl %ecx, %ecx
jmp 0x3800
addq $0x5, %rcx
movq %rcx, (%rsp)
xorl %eax, %eax
movl $0x2, %ecx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r9
testb %al, %al
je 0x386f
incq %rbx
cmpq 0x18(%rsp), %rbx
jne 0x378c
testl %r15d, %r15d
jle 0x3873
shll $0x8, %r14d
orq %r8, %r14
xorl %ecx, %ecx
movq (%rsp), %r8
movb (%r8,%rcx), %dl
movb %dl, 0x4248(%rdi,%rcx)
incq %rcx
cmpq %rcx, %r14
jne 0x382e
movl %ecx, %eax
addq %rcx, %r8
movq %r8, (%rsp)
jmp 0x3875
movl $0x2, %eax
testl %eax, %eax
jne 0x3a8c
leal (%r9,%r9), %eax
cmpl $0x5, %r9d
movl %eax, %r9d
jb 0x349c
jmp 0x3a95
movl %ecx, %eax
jmp 0x3851
xorl %eax, %eax
movb $0x0, 0x4248(%rdi,%rax)
testl %esi, %esi
movq 0x70(%rsp), %rdx
jle 0x393c
movl %r9d, %ecx
shll $0x8, %edx
orq %rbp, %rdx
movq (%rsp), %rax
leaq (%rax,%rcx), %rsi
leaq 0x4(%rcx), %r8
xorl %ebx, %ebx
movq %rdx, %rbp
movb (%rax), %dl
sarb $0x7, %dl
movsbq %dl, %r14
xorl %edi, %edi
cmpl $0x4, %r9d
jne 0x38cb
shlq $0x8, %r14
movzbl (%rax,%rdi), %edx
orq %rdx, %r14
incq %rdi
cmpq $0x4, %rdi
jne 0x38b5
jmp 0x38df
shlq $0x8, %r14
movzbl (%rax,%rdi), %edx
orq %rdx, %r14
incq %rdi
cmpq $0x8, %rdi
jne 0x38cb
movq %rbx, %rdi
shlq $0x4, %rdi
addq 0x60(%rsp), %rdi
movq %r14, (%rdi)
movb (%rax,%rcx), %dl
addq %rcx, %rax
sarb $0x7, %dl
movsbq %dl, %r9
xorl %r14d, %r14d
movq %r9, %rdx
shlq $0x8, %rdx
movzbl (%rsi,%r14), %r9d
orq %rdx, %r9
incq %r14
cmpq $0x4, %r14
jne 0x38fe
movq %r9, 0x8(%rdi)
addq $0x4, %rax
incq %rbx
addq %r8, %rsi
movq %rbp, %rdx
cmpq %rbp, %rbx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r9
jne 0x38a1
jmp 0x3940
movq (%rsp), %rax
movq %rax, %rbx
testl %r10d, %r10d
jle 0x399c
movq 0x28(%rsp), %rcx
shll $0x8, %ecx
movq 0x38(%rsp), %r8
orq %r8, %rcx
movq 0x50(%rsp), %rdx
testl %r13d, %r13d
je 0x397d
movsbl (%rbx), %eax
incq %rbx
xorl %ebp, %ebp
cmpl $0x2, %eax
setb %sil
setae %bpl
movl %eax, (%rdx)
movl %ebp, %eax
addl %ebp, %eax
jmp 0x3988
movl $0x0, (%rdx)
xorl %eax, %eax
movb $0x1, %sil
testb %sil, %sil
je 0x3851
addq $0x18, %rdx
decq %rcx
jne 0x395d
jmp 0x39a1
movq 0x38(%rsp), %r8
testl %r10d, %r10d
jle 0x3a01
movq 0x28(%rsp), %rdx
shll $0x8, %edx
orq %r8, %rdx
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rsi
testl %r11d, %r11d
je 0x39e3
movq %rdx, %r8
movsbl (%rbx), %edx
incq %rbx
xorl %r10d, %r10d
cmpl $0x2, %edx
setb %cl
setae %r10b
movl %edx, (%rax)
movq %r8, %rdx
addl %r10d, %r10d
movl %r10d, %r8d
jmp 0x39ee
movl $0x0, (%rax)
xorl %r8d, %r8d
movb $0x1, %cl
testb %cl, %cl
je 0x3a7a
addq $0x18, %rax
decq %rdx
jne 0x39bb
jmp 0x3a06
movq 0x20(%rsp), %rsi
cmpl $0x3, %r12d
movl $0x2, %eax
cmovll %eax, %r12d
addl $-0x2, %r12d
xorl %eax, %eax
cmpq %rax, %r12
je 0x3a34
movq 0x18(%rdi,%rax,8), %rdx
leaq 0x1(%rax), %rcx
cmpq 0x20(%rdi,%rax,8), %rdx
movq %rcx, %rax
jle 0x3a19
movl %ecx, 0x4(%rdi)
cmpb $0x0, 0x47e4(%rsp)
je 0x3a82
leaq 0x47e0(%rsp), %rax
subl %ebx, %eax
addl %eax, %esi
testl %esi, %esi
jle 0x3a64
movl %esi, %eax
xorl %ecx, %ecx
movb (%rbx,%rcx), %dl
movb %dl, 0x47e0(%rsp,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x3a52
movq %rsi, 0x20(%rsp)
xorl %eax, %eax
cmpl $0x8, %r9d
sete %al
leal (%rax,%rax,2), %eax
jmp 0x3851
movl %r8d, %eax
jmp 0x3851
movl $0x3, %eax
jmp 0x3851
cmpl $0x3, %eax
jne 0x3b8a
cmpl $0x0, 0x44(%rsp)
movq 0x20(%rsp), %rax
je 0x3c30
cmpl $0x3, %eax
jl 0x3c30
cmpb $0xa, 0x47e0(%rsp)
jne 0x3c30
decl %eax
cmpb $0xa, 0x47e0(%rsp,%rax)
jne 0x3c30
cmpl $0xfe, 0x8(%rdi)
jg 0x3c30
movb $0x0, 0x47e0(%rsp,%rax)
leaq 0x47e1(%rsp), %rdi
leaq 0x78(%rsp), %rsi
xorl %edx, %edx
callq 0x3cee
movq 0x8(%rsp), %rdi
testl %eax, %eax
jne 0x3c30
cmpl $0x2, 0x80(%rsp)
jne 0x3c30
movl 0xc(%rdi), %ecx
movl 0x84(%rsp), %eax
leal (%rax,%rcx), %edx
cmpl $0x32, %edx
jg 0x3c30
xorl %edx, %edx
addl %ecx, 0x2acc(%rsp,%rdx)
addq $0x18, %rdx
cmpq $0x18, %rdx
je 0x3b28
testl %eax, %eax
jle 0x3b61
xorl %ecx, %ecx
movb 0x42c0(%rsp,%rcx), %dl
movslq 0xc(%rdi), %rsi
leal 0x1(%rsi), %r8d
movl %r8d, 0xc(%rdi)
movb %dl, 0x4248(%rdi,%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0x3b3f
movl 0x7c(%rsp), %eax
testl %eax, %eax
jle 0x3b94
movslq 0x4(%rdi), %rcx
movq 0x10(%rdi,%rcx,8), %rdx
xorl %ecx, %ecx
cmpq %rdx, 0x90(%rsp,%rcx,8)
jg 0x3b96
incq %rcx
cmpq %rcx, %rax
jne 0x3b74
movl %eax, %ecx
jmp 0x3b96
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3cdc
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x3bd4
movl %ecx, %ecx
movslq 0x4(%rdi), %rdx
cmpq $0x4af, %rdx            # imm = 0x4AF
jg 0x3bd4
movq 0x90(%rsp,%rcx,8), %rsi
movq %rsi, 0x18(%rdi,%rdx,8)
movb 0x2610(%rsp,%rcx), %sil
addb 0x8(%rdi), %sil
movb %sil, 0x2598(%rdi,%rdx)
incl 0x4(%rdi)
incq %rcx
cmpl %ecx, %eax
jg 0x3b9c
movslq 0x8(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rdi)
leaq (%rax,%rax,2), %rax
movq 0x2ad0(%rsp), %rcx
movq %rcx, 0x2a58(%rdi,%rax,8)
movups 0x2ac0(%rsp), %xmm0
movups %xmm0, 0x2a48(%rdi,%rax,8)
movslq 0x8(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rdi)
leaq (%rax,%rax,2), %rax
movq 0x2ae8(%rsp), %rcx
movq %rcx, 0x2a58(%rdi,%rax,8)
movups 0x2ad8(%rsp), %xmm0
movups %xmm0, 0x2a48(%rdi,%rax,8)
movslq 0x4(%rdi), %rbx
cmpq $0x2, %rbx
jl 0x3cda
movabsq $0x2f0605980, %r14      # imm = 0x2F0605980
movzbl 0x2598(%rdi), %ebp
leaq -0x1(%rbx), %r15
xorl %r12d, %r12d
movzbl 0x2599(%rdi,%r12), %esi
movl %ebp, %edx
callq 0x47d9
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0x3c7d
movq 0x20(%rdi,%r12,8), %rax
subq 0x18(%rdi), %rax
cmpq %r14, %rax
je 0x3c87
incq %r12
cmpq %r12, %r15
jne 0x3c56
jmp 0x3c8e
movl $0x1, 0x10(%rdi)
leal -0x2(%rbx), %r15d
movzbl 0x2597(%rbx,%rdi), %ebp
leal -0x1(%rbx), %r12d
movzbl 0x2598(%rdi,%r15), %edx
movl %ebp, %esi
callq 0x47d9
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0x3cc6
movq 0x10(%rdi,%rbx,8), %rax
subq 0x18(%rdi,%r15,8), %rax
cmpq %r14, %rax
je 0x3cd3
decq %r15
decl %r12d
testl %r12d, %r12d
jg 0x3c9e
jmp 0x3cda
movl $0x1, 0x14(%rdi)
xorl %eax, %eax
addq $0xe9c8, %rsp           # imm = 0xE9C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq