// File: /workspace/github_c_makefile_star2_O2/lyda[P]tz/zic.c
// Function: addtype
static int
addtype(gmtoff, abbr, isdst, ttisstd, ttisgmt)
const long		gmtoff;
const char * const	abbr;
const int		isdst;
const int		ttisstd;
const int		ttisgmt;
{
	register int	i, j;

	if (isdst != TRUE && isdst != FALSE) {
		error(_("internal error - addtype called with bad isdst"));
		exit(EXIT_FAILURE);
	}
	if (ttisstd != TRUE && ttisstd != FALSE) {
		error(_("internal error - addtype called with bad ttisstd"));
		exit(EXIT_FAILURE);
	}
	if (ttisgmt != TRUE && ttisgmt != FALSE) {
		error(_("internal error - addtype called with bad ttisgmt"));
		exit(EXIT_FAILURE);
	}
	/*
	** See if there's already an entry for this zone type.
	** If so, just return its index.
	*/
	for (i = 0; i < typecnt; ++i) {
		if (gmtoff == gmtoffs[i] && isdst == isdsts[i] &&
			strcmp(abbr, &chars[abbrinds[i]]) == 0 &&
			ttisstd == ttisstds[i] &&
			ttisgmt == ttisgmts[i])
				return i;
	}
	/*
	** There isn't one; add a new one, unless there are already too
	** many.
	*/
	if (typecnt >= TZ_MAX_TYPES) {
		error(_("too many local time types"));
		exit(EXIT_FAILURE);
	}
	if (! (-1L - 2147483647L <= gmtoff && gmtoff <= 2147483647L)) {
		error(_("UTC offset out of range"));
		exit(EXIT_FAILURE);
	}
	gmtoffs[i] = gmtoff;
	isdsts[i] = isdst;
	ttisstds[i] = ttisstd;
	ttisgmts[i] = ttisgmt;

	for (j = 0; j < charcnt; ++j)
		if (strcmp(&chars[j], abbr) == 0)
			break;
	if (j == charcnt)
		newabbr(abbr);
	abbrinds[i] = j;
	++typecnt;
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0xc(%rsp)
cmpl $0x2, %edx
jae 0x64dd
cmpl $0x2, %ecx
jae 0x64e6
movl %ecx, 0x10(%rsp)
movq %rsi, (%rsp)
cmpl $0x1, 0xc(%rsp)
ja 0x64ef
movl %edx, %r13d
movq %rdi, %rbp
movl 0x7534(%rip), %eax      # 0xd708
xorl %ebx, %ebx
testl %eax, %eax
movl $0x0, %r15d
movl %eax, 0x8(%rsp)
cmovgl %eax, %r15d
leaq 0x7533(%rip), %r14      # 0xd720
leaq 0x7d2c(%rip), %r12      # 0xdf20
cmpq %rbx, %r15
je 0x6259
cmpq %rbp, (%r14)
jne 0x6250
movsbl (%rbx,%r12), %eax
cmpl %r13d, %eax
jne 0x6250
leaq 0x7e51(%rip), %rax      # 0xe060
movzbl (%rbx,%rax), %esi
leaq 0x7e06(%rip), %rax      # 0xe020
addq %rax, %rsi
movq (%rsp), %rdi
callq 0x2190
testl %eax, %eax
jne 0x6250
leaq 0x7f2f(%rip), %rax      # 0xe160
movsbl (%rbx,%rax), %eax
cmpl 0x10(%rsp), %eax
jne 0x6250
leaq 0x801e(%rip), %rax      # 0xe260
movsbl (%rbx,%rax), %eax
cmpl 0xc(%rsp), %eax
je 0x64d5
incq %rbx
addq $0x8, %r14
jmp 0x61f4
cmpl $0x100, 0x8(%rsp)       # imm = 0x100
jge 0x64f8
movslq %ebp, %rax
cmpq %rbp, %rax
movq (%rsp), %r14
jne 0x6501
leaq 0x74a2(%rip), %rax      # 0xd720
movq %rbp, (%rax,%r15,8)
movb %r13b, (%r15,%r12)
movl 0x10(%rsp), %eax
leaq 0x7ecf(%rip), %rcx      # 0xe160
movb %al, (%r15,%rcx)
movl 0xc(%rsp), %eax
leaq 0x7fc0(%rip), %rcx      # 0xe260
movb %al, (%r15,%rcx)
movl 0x7461(%rip), %r12d     # 0xd70c
xorl %ebx, %ebx
testl %r12d, %r12d
movl $0x0, %r13d
cmovgl %r12d, %r13d
leaq 0x7d5f(%rip), %rbp      # 0xe020
cmpq %rbx, %r13
je 0x62de
leaq (%rbx,%rbp), %rdi
movq %r14, %rsi
callq 0x2190
testl %eax, %eax
je 0x62db
incq %rbx
jmp 0x62c1
movl %ebx, %r13d
cmpl %r12d, %r13d
jne 0x6434
leaq 0x3915(%rip), %rsi      # 0x9c03
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
je 0x63fc
xorl %ebp, %ebp
movsbq (%r14,%rbp), %r14
testq %r14, %r14
js 0x6323
callq 0x22d0
movq (%rax), %rax
testb $0x4, 0x1(%rax,%r14,2)
je 0x6323
incq %rbp
movq (%rsp), %r14
jmp 0x6300
xorl %eax, %eax
testq %rbp, %rbp
leaq 0x3905(%rip), %rcx      # 0x9c34
cmoveq %rcx, %rax
cmpb $0x0, 0x6eb6(%rip)      # 0xd1f0
leaq 0x3924(%rip), %rcx      # 0x9c65
cmoveq %rax, %rcx
cmpq $0x4, %rbp
cmovlq %rax, %rcx
cmpq $0x7, %rbp
leaq 0x3940(%rip), %rbx      # 0x9c98
cmovlq %rcx, %rbx
movq (%rsp), %rax
leaq (%rax,%rbp), %rdx
testq %rbx, %rbx
je 0x645d
cmpb $0x0, (%rdx)
leaq 0x3951(%rip), %rdi      # 0x9cc8
cmoveq %rbx, %rdi
testq %rdi, %rdi
movq (%rsp), %r14
leaq 0x7c97(%rip), %rbp      # 0xe020
je 0x63fc
callq 0x8d51
movq %rax, %r12
movq %rax, %rdi
callq 0x5211
leaq 0x3959(%rip), %rsi      # 0x9cfb
movq %r12, %rdi
callq 0x8cd6
movq %rax, %r12
movq %rax, %rdi
callq 0x5211
movq %r12, %rdi
movq %r14, %rsi
callq 0x8cd6
movq %rax, %r12
movq %rax, %rdi
callq 0x5211
leaq 0x3569(%rip), %rsi      # 0x993b
movq %r12, %rdi
callq 0x8cd6
movq %rax, %r12
movq %rax, %rdi
callq 0x5211
movq %r12, %rdi
callq 0x51bf
movq %r12, %rdi
callq 0x8d5b
movl 0x7310(%rip), %r12d     # 0xd70c
movq %r14, %rdi
callq 0x20e0
leal (%rax,%r12), %ebx
incl %ebx
cmpl $0x33, %ebx
jge 0x650a
movslq %r12d, %rax
addq %rax, %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2080
movl %ebx, 0x72e2(%rip)      # 0xd70c
movl 0x72d8(%rip), %eax      # 0xd708
movl %eax, 0x8(%rsp)
leaq 0x7c25(%rip), %rax      # 0xe060
movb %r13b, (%r15,%rax)
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x72bd(%rip)      # 0xd708
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x2b, %r14b
je 0x6470
movzbl %r14b, %eax
cmpl $0x2d, %eax
jne 0x636d
movq (%rsp), %rax
leaq (%rax,%rbp), %rdx
incq %rdx
movsbq (%rdx), %r14
testq %r14, %r14
js 0x636d
movq %rdx, 0x10(%rsp)
callq 0x22d0
movq 0x10(%rsp), %rdx
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r14,2)
je 0x636d
movq (%rsp), %rax
leaq (%rax,%rbp), %rdx
addq $0x2, %rdx
cmpb $0x31, %r14b
jne 0x636d
addq %rbp, %rax
addq $0x3, %rax
movb -0x1(%rax), %cl
addb $-0x30, %cl
cmpb $0x5, %cl
cmovbq %rax, %rdx
jmp 0x636d
movl %ebx, %r15d
jmp 0x644b
leaq 0x365c(%rip), %rdi      # 0x9b40
jmp 0x6511
leaq 0x3682(%rip), %rdi      # 0x9b6f
jmp 0x6511
leaq 0x36aa(%rip), %rdi      # 0x9ba0
jmp 0x6511
leaq 0x36d2(%rip), %rdi      # 0x9bd1
jmp 0x6511
leaq 0x36e3(%rip), %rdi      # 0x9beb
jmp 0x6511
leaq 0x37ed(%rip), %rdi      # 0x9cfe
callq 0x5251
pushq $0x1
popq %rdi
callq 0x22a0