// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x6d6c
cmpl $0x0, -0x1c(%rbp)
je 0x6d6c
leaq 0x7ef4(%rip), %rdi      # 0xec51
callq 0x4110
movl $0x1, %edi
callq 0x2270
cmpl $0x1, -0x20(%rbp)
je 0x6d8e
cmpl $0x0, -0x20(%rbp)
je 0x6d8e
leaq 0x7f01(%rip), %rdi      # 0xec80
callq 0x4110
movl $0x1, %edi
callq 0x2270
cmpl $0x1, -0x24(%rbp)
je 0x6db0
cmpl $0x0, -0x24(%rbp)
je 0x6db0
leaq 0x7f10(%rip), %rdi      # 0xecb1
callq 0x4110
movl $0x1, %edi
callq 0x2270
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0xb948(%rip), %eax      # 0x12708
jge 0x6e5f
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rdx
leaq 0xb94b(%rip), %rcx      # 0x12720
cmpq (%rcx,%rdx,8), %rax
jne 0x6e4f
movl -0x1c(%rbp), %eax
movslq -0x28(%rbp), %rdx
leaq 0xc137(%rip), %rcx      # 0x12f20
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x6e4f
movq -0x18(%rbp), %rdi
movslq -0x28(%rbp), %rcx
leaq 0xc260(%rip), %rax      # 0x13060
movzbl (%rax,%rcx), %eax
leaq 0xc215(%rip), %rsi      # 0x13020
addq %rax, %rsi
callq 0x2160
cmpl $0x0, %eax
jne 0x6e4f
movl -0x20(%rbp), %eax
movslq -0x28(%rbp), %rdx
leaq 0xc33a(%rip), %rcx      # 0x13160
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x6e4f
movl -0x24(%rbp), %eax
movslq -0x28(%rbp), %rdx
leaq 0xc424(%rip), %rcx      # 0x13260
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x6e4f
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6f73
jmp 0x6e51
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6db7
cmpl $0x100, 0xb89f(%rip)    # imm = 0x100
jl 0x6e81
leaq 0x7e70(%rip), %rdi      # 0xece2
callq 0x4110
movl $0x1, %edi
callq 0x2270
movq $-0x80000000, %rax      # imm = 0x80000000
cmpq -0x10(%rbp), %rax
jg 0x6e98
cmpq $0x7fffffff, -0x10(%rbp) # imm = 0x7FFFFFFF
jle 0x6eae
leaq 0x7e5d(%rip), %rdi      # 0xecfc
callq 0x4110
movl $0x1, %edi
callq 0x2270
movq -0x10(%rbp), %rdx
movslq -0x28(%rbp), %rcx
leaq 0xb863(%rip), %rax      # 0x12720
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
movb %al, %dl
movslq -0x28(%rbp), %rcx
leaq 0xc04f(%rip), %rax      # 0x12f20
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
movb %al, %dl
movslq -0x28(%rbp), %rcx
leaq 0xc27c(%rip), %rax      # 0x13160
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
movb %al, %dl
movslq -0x28(%rbp), %rcx
leaq 0xc369(%rip), %rax      # 0x13260
movb %dl, (%rax,%rcx)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0xb802(%rip), %eax      # 0x1270c
jge 0x6f37
movslq -0x2c(%rbp), %rax
leaq 0xc109(%rip), %rdi      # 0x13020
addq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x2160
cmpl $0x0, %eax
jne 0x6f2a
jmp 0x6f37
jmp 0x6f2c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6f01
movl -0x2c(%rbp), %eax
cmpl 0xb7cc(%rip), %eax      # 0x1270c
jne 0x6f4b
movq -0x18(%rbp), %rdi
callq 0x87d0
movl -0x2c(%rbp), %eax
movb %al, %dl
movslq -0x28(%rbp), %rcx
leaq 0xc105(%rip), %rax      # 0x13060
movb %dl, (%rax,%rcx)
movl 0xb7a4(%rip), %eax      # 0x12708
addl $0x1, %eax
movl %eax, 0xb79b(%rip)      # 0x12708
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)