// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x2, %edx
jae 0x6ce1
cmpl $0x2, %ecx
jae 0x6ce6
movq %rsi, (%rsp)
cmpl $0x1, %r8d
ja 0x6ceb
movl %edx, %r12d
movq %rdi, %r13
movslq 0x7d27(%rip), %r15      # 0xe718
leaq 0x7d38(%rip), %rbx      # 0xe730
leaq 0x8531(%rip), %rbp      # 0xef30
testq %r15, %r15
jle 0x6a8f
movl %ecx, 0x10(%rsp)
movl %r8d, 0x8(%rsp)
xorl %r14d, %r14d
cmpq %r13, (%rbx)
jne 0x6a6e
movsbl (%r14,%rbp), %eax
cmpl %r12d, %eax
jne 0x6a6e
leaq 0x8646(%rip), %rax      # 0xf070
movzbl (%r14,%rax), %esi
leaq 0x85fa(%rip), %rax      # 0xf030
addq %rax, %rsi
movq (%rsp), %rdi
callq 0x21a0
testl %eax, %eax
jne 0x6a6e
leaq 0x8723(%rip), %rax      # 0xf170
movsbl (%r14,%rax), %eax
cmpl 0x10(%rsp), %eax
jne 0x6a6e
leaq 0x8811(%rip), %rax      # 0xf270
movsbl (%r14,%rax), %eax
cmpl 0x8(%rsp), %eax
je 0x6c66
incq %r14
addq $0x8, %rbx
cmpq %r14, %r15
jne 0x6a14
movl %r15d, %r14d
movl 0x8(%rsp), %r8d
movl 0x10(%rsp), %ecx
leaq 0x7ca3(%rip), %rbx      # 0xe730
jmp 0x6a92
xorl %r14d, %r14d
cmpl $0x100, %r15d           # imm = 0x100
jge 0x6cf0
movslq %r13d, %rax
cmpq %r13, %rax
jne 0x6cf5
movl %r14d, %edx
movq %r13, (%rbx,%rdx,8)
movb %r12b, (%rdx,%rbp)
leaq 0x86b3(%rip), %rax      # 0xf170
movb %cl, (%rdx,%rax)
leaq 0x87a9(%rip), %rax      # 0xf270
movq %rdx, 0x10(%rsp)
movb %r8b, (%rdx,%rax)
movl 0x7c46(%rip), %ebx      # 0xe71c
leaq 0x8553(%rip), %r15      # 0xf030
xorl %r13d, %r13d
testl %ebx, %ebx
jle 0x6b05
movq (%rsp), %rbp
leaq (%r15,%r13), %rdi
movq %rbp, %rsi
callq 0x21a0
testl %eax, %eax
je 0x6b09
incq %r13
cmpq %r13, %rbx
jne 0x6ae8
movl %ebx, %r13d
jmp 0x6b09
movq (%rsp), %rbp
cmpl %ebx, %r13d
jne 0x6c50
leaq 0x40ce(%rip), %rsi      # 0xabe7
movq %rbp, %rdi
callq 0x21a0
testl %eax, %eax
je 0x6c1f
movq %rbp, %r12
movb (%rbp), %bpl
testb %bpl, %bpl
js 0x6b55
callq 0x22e0
movq (%rax), %rax
movzbl %bpl, %ecx
testb $0x4, 0x1(%rax,%rcx,2)
je 0x6b55
movb 0x1(%r12), %bpl
incq %r12
testb %bpl, %bpl
jns 0x6b3d
xorl %eax, %eax
movq %r12, %rcx
subq (%rsp), %rcx
leaq 0x40b3(%rip), %rdx      # 0xac18
cmoveq %rdx, %rax
cmpq $0x4, %rcx
leaq 0x40d5(%rip), %rdx      # 0xac49
cmovlq %rax, %rdx
cmpb $0x0, 0x7681(%rip)      # 0xe200
cmoveq %rax, %rdx
cmpq $0x7, %rcx
leaq 0x40ee(%rip), %rcx      # 0xac7c
cmovlq %rdx, %rcx
testq %rcx, %rcx
je 0x6c78
movq %r12, %rbx
cmpb $0x0, (%rbx)
leaq 0x4104(%rip), %rdi      # 0xacac
cmoveq %rcx, %rdi
testq %rdi, %rdi
movq (%rsp), %rbp
je 0x6c1f
callq 0x9c6b
movq %rax, %r12
movq %rax, %rdi
callq 0x58e3
leaq 0x4113(%rip), %rsi      # 0xacdf
movq %r12, %rdi
callq 0x9bf4
movq %rax, %r12
movq %rax, %rdi
callq 0x58e3
movq %r12, %rdi
movq %rbp, %rsi
callq 0x9bf4
movq %rax, %r12
movq %rax, %rdi
callq 0x58e3
leaq 0x3d1d(%rip), %rsi      # 0xa919
movq %r12, %rdi
callq 0x9bf4
movq %rax, %r12
movq %rax, %rdi
callq 0x58e3
movq %r12, %rdi
callq 0x5891
movq %r12, %rdi
callq 0x9c75
movq %rbp, %rdi
callq 0x20e0
movslq 0x7aee(%rip), %rcx      # 0xe71c
leal (%rax,%rcx), %ebx
incl %ebx
cmpl $0x33, %ebx
jge 0x6cfa
addq %rcx, %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2080
movl %ebx, 0x7acc(%rip)      # 0xe71c
leaq 0x8419(%rip), %rax      # 0xf070
movq 0x10(%rsp), %rcx
movb %r13b, (%rcx,%rax)
incl 0x7ab2(%rip)            # 0xe718
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x2d, %bpl
je 0x6c8b
movzbl %bpl, %eax
cmpl $0x2b, %eax
jne 0x6b9b
leaq 0x1(%r12), %rbx
movsbq 0x1(%r12), %rbp
testq %rbp, %rbp
js 0x6b9e
movq %rcx, 0x8(%rsp)
callq 0x22e0
movq 0x8(%rsp), %rcx
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbp,2)
je 0x6b9e
leaq 0x2(%r12), %rbx
cmpb $0x31, %bpl
jne 0x6b9e
movb 0x2(%r12), %al
addb $-0x30, %al
addq $0x3, %r12
cmpb $0x5, %al
cmovbq %r12, %rbx
jmp 0x6b9e
callq 0x27d8
callq 0x27c3
callq 0x27ae
callq 0x2799
callq 0x276f
callq 0x2784