// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
cmpl $0x2, %edx
jae 0x6f1c
cmpl $0x2, %ecx
jae 0x6f21
cmpl $0x1, %r8d
ja 0x6f26
movq %rsi, %rbx
movl %ecx, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movl 0x7b09(%rip), %ebp      # 0xe718
leaq 0x7b1a(%rip), %r12      # 0xe730
leaq 0x8313(%rip), %rcx      # 0xef30
testl %ebp, %ebp
movq %rsi, 0x20(%rsp)
jle 0x6cc5
xorl %r14d, %r14d
movq %r12, %rbx
movq %rdi, 0x18(%rsp)
cmpq %rdi, (%rbx)
jne 0x6ca4
movsbl (%r14,%rcx), %eax
cmpl %edx, %eax
jne 0x6ca4
leaq 0x8426(%rip), %rax      # 0xf070
movzbl (%r14,%rax), %esi
leaq 0x83da(%rip), %rax      # 0xf030
addq %rax, %rsi
movq 0x20(%rsp), %rdi
movq %rcx, %r15
movq %rbp, %r13
movl %edx, %ebp
callq 0x21a0
movq 0x18(%rsp), %rdi
movl %ebp, %edx
movq %r13, %rbp
movq %r15, %rcx
testl %eax, %eax
jne 0x6ca4
leaq 0x84ed(%rip), %rax      # 0xf170
movsbl (%r14,%rax), %eax
cmpl 0x10(%rsp), %eax
jne 0x6ca4
leaq 0x85db(%rip), %rax      # 0xf270
movsbl (%r14,%rax), %eax
cmpl 0xc(%rsp), %eax
je 0x6ea5
incq %r14
addq $0x8, %rbx
cmpq %r14, %rbp
jne 0x6c35
movl %ebp, %r14d
cmpl $0x100, %ebp            # imm = 0x100
movq 0x20(%rsp), %rbx
jl 0x6cc8
callq 0x2799
xorl %r14d, %r14d
movslq %edi, %rax
cmpq %rdi, %rax
jne 0x6f2b
movl %r14d, %r15d
movq %rdi, (%r12,%r15,8)
movb %dl, (%r15,%rcx)
leaq 0x848a(%rip), %rax      # 0xf170
movl 0x10(%rsp), %ecx
movb %cl, (%r15,%rax)
leaq 0x857b(%rip), %rax      # 0xf270
movl 0xc(%rsp), %ecx
movb %cl, (%r15,%rax)
movl 0x7a18(%rip), %r12d     # 0xe71c
xorl %r13d, %r13d
testl %r12d, %r12d
jle 0x6d30
leaq 0x831d(%rip), %rax      # 0xf030
leaq (%rax,%r13), %rdi
movq %rbx, %rsi
callq 0x21a0
testl %eax, %eax
je 0x6d30
incq %r13
cmpq %r13, %r12
jne 0x6d0c
movl %r12d, %r13d
jmp 0x6d39
cmpl %r12d, %r13d
jne 0x6e92
leaq 0x3f13(%rip), %rsi      # 0xac53
movq %rbx, %rdi
callq 0x21a0
testl %eax, %eax
je 0x6e5a
movq %r15, 0x18(%rsp)
movb (%rbx), %r15b
testb %r15b, %r15b
js 0x6d81
callq 0x22e0
movq (%rax), %rax
movq %rbx, %rbp
movzbl %r15b, %ecx
testb $0x4, 0x1(%rax,%rcx,2)
je 0x6d84
movb 0x1(%rbp), %r15b
incq %rbp
testb %r15b, %r15b
jns 0x6d68
jmp 0x6d84
movq %rbx, %rbp
xorl %eax, %eax
movq %rbp, %rcx
subq %rbx, %rcx
leaq 0x3ef1(%rip), %rdx      # 0xac84
cmoveq %rdx, %rax
cmpq $0x4, %rcx
leaq 0x3f13(%rip), %rdx      # 0xacb5
cmovlq %rax, %rdx
cmpb $0x0, 0x7453(%rip)      # 0xe200
cmoveq %rax, %rdx
cmpq $0x7, %rcx
leaq 0x3f2c(%rip), %rcx      # 0xace8
cmovlq %rdx, %rcx
testq %rcx, %rcx
je 0x6eb7
movq %rbp, %rbx
cmpb $0x0, (%rbx)
leaq 0x3f42(%rip), %rdi      # 0xad18
cmoveq %rcx, %rdi
testq %rdi, %rdi
movq 0x20(%rsp), %rbx
movq 0x18(%rsp), %r15
je 0x6e5a
callq 0x9d64
movq %rax, %r12
movq %rax, %rdi
callq 0x5adf
leaq 0x3f4b(%rip), %rsi      # 0xad4b
movq %r12, %rdi
callq 0x9cc8
movq %rax, %r12
movq %rax, %rdi
callq 0x5adf
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9cc8
movq %rax, %r12
movq %rax, %rdi
callq 0x5adf
leaq 0x3b5b(%rip), %rsi      # 0xa98b
movq %r12, %rdi
callq 0x9cc8
movq %rax, %r12
movq %rax, %rdi
callq 0x5adf
movq %r12, %rdi
callq 0x5a8d
movq %r12, %rdi
callq 0x9d6e
movl 0x78c2(%rip), %r12d     # 0xe71c
movq %rbx, %rdi
callq 0x20e0
movq %rbx, %rsi
leal (%rax,%r12), %ebx
incl %ebx
cmpl $0x33, %ebx
jge 0x6f30
movslq %r12d, %rax
leaq 0x81b2(%rip), %rdi      # 0xf030
addq %rax, %rdi
callq 0x2080
movl %ebx, 0x7890(%rip)      # 0xe71c
movl 0x7886(%rip), %ebp      # 0xe718
leaq 0x81d7(%rip), %rax      # 0xf070
movb %r13b, (%r15,%rax)
incl %ebp
movl %ebp, 0x7873(%rip)      # 0xe718
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x2d, %r15b
je 0x6eca
movzbl %r15b, %eax
cmpl $0x2b, %eax
jne 0x6dc9
leaq 0x1(%rbp), %rbx
movsbq 0x1(%rbp), %r15
testq %r15, %r15
js 0x6dcc
movq %rcx, 0x10(%rsp)
callq 0x22e0
movq 0x10(%rsp), %rcx
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
je 0x6dcc
leaq 0x2(%rbp), %rbx
cmpb $0x31, %r15b
jne 0x6dcc
movb 0x2(%rbp), %al
addb $-0x30, %al
addq $0x3, %rbp
cmpb $0x5, %al
cmovbq %rbp, %rbx
jmp 0x6dcc
callq 0x27d8
callq 0x27c3
callq 0x27ae
callq 0x276f
callq 0x2784