// File: /workspace/github_c_makefile_star2_O0/lyda[P]tz/localtime.c
// Function: settzname
static void
settzname(void)
{
	register struct state * const	sp = lclptr;
	register int			i;

	tzname[0] = wildabbr;
	tzname[1] = wildabbr;
#ifdef USG_COMPAT
	daylight = 0;
	timezone = 0;
#endif /* defined USG_COMPAT */
#ifdef ALTZONE
	altzone = 0;
#endif /* defined ALTZONE */
#ifdef ALL_STATE
	if (sp == NULL) {
		tzname[0] = tzname[1] = gmt;
		return;
	}
#endif /* defined ALL_STATE */
	/*
	** And to get the latest zone names into tzname. . .
	*/
	for (i = 0; i < sp->timecnt; ++i) {
		register const struct ttinfo * const	ttisp =
							&sp->ttis[
								sp->types[i]];

		tzname[ttisp->tt_isdst] =
			&sp->chars[ttisp->tt_abbrind];
#ifdef USG_COMPAT
		if (ttisp->tt_isdst)
			daylight = 1;
		if (!ttisp->tt_isdst)
			timezone = -(ttisp->tt_gmtoff);
#endif /* defined USG_COMPAT */
#ifdef ALTZONE
		if (ttisp->tt_isdst)
			altzone = -(ttisp->tt_gmtoff);
#endif /* defined ALTZONE */
	}
	/*
	** Finally, scrub the abbreviations.
	** First, replace bogus characters.
	*/
	for (i = 0; i < sp->charcnt; ++i)
		if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL)
			sp->chars[i] = TZ_ABBR_ERR_CHAR;
	/*
	** Second, truncate long abbreviations.
	*/
	for (i = 0; i < sp->typecnt; ++i) {
		register const struct ttinfo * const	ttisp = &sp->ttis[i];
		register char *				cp = &sp->chars[ttisp->tt_abbrind];

		if (strlen(cp) > TZ_ABBR_MAX_LEN &&
			strcmp(cp, GRANDPARENTED) != 0)
				*(cp + TZ_ABBR_MAX_LEN) = '\0';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x5861(%rip), %rax      # 0x96b0
movq %rax, -0x8(%rbp)
leaq 0x52e6(%rip), %rax      # 0x9140
movq %rax, 0x52ef(%rip)      # 0x9150
leaq 0x52d8(%rip), %rax      # 0x9140
movq %rax, 0x52e9(%rip)      # 0x9158
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x5835(%rip), %eax      # 0x96b4
jge 0x3ee5
movslq -0xc(%rbp), %rcx
leaq 0x5824(%rip), %rax      # 0x96b0
movzbl 0x2598(%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x5813(%rip), %rax      # 0x96b0
addq $0x2a48, %rax           # imm = 0x2A48
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rax
leaq 0x57f3(%rip), %rdx      # 0x96b0
addq $0x4248, %rdx           # imm = 0x4248
addq %rax, %rdx
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq 0x527a(%rip), %rax      # 0x9150
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3e76
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x57c7(%rip), %eax      # 0x96bc
jge 0x3f3c
movslq -0xc(%rbp), %rcx
leaq 0x57ae(%rip), %rax      # 0x96b0
movsbl 0x4248(%rax,%rcx), %esi
leaq 0x3351(%rip), %rdi      # 0x7262
callq 0x10c0
cmpq $0x0, %rax
jne 0x3f2f
movslq -0xc(%rbp), %rcx
leaq 0x5789(%rip), %rax      # 0x96b0
movb $0x5f, 0x4248(%rax,%rcx)
jmp 0x3f31
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3eec
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x576c(%rip), %eax      # 0x96b8
jge 0x3fbf
movslq -0xc(%rbp), %rcx
leaq 0x5757(%rip), %rax      # 0x96b0
addq $0x2a48, %rax           # imm = 0x2A48
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0xc(%rax), %rcx
leaq 0x5737(%rip), %rax      # 0x96b0
addq $0x4248, %rax           # imm = 0x4248
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10a0
cmpq $0x10, %rax
jbe 0x3fb2
movq -0x28(%rbp), %rdi
leaq 0x3307(%rip), %rsi      # 0x72a7
callq 0x1110
cmpl $0x0, %eax
je 0x3fb2
movq -0x28(%rbp), %rax
movb $0x0, 0x10(%rax)
jmp 0x3fb4
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3f43
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)