// File: /workspace/github_c_makefile_star2_O0/lyda[P]tz/zic.c
// Function: leapadd
static void
leapadd(t, positive, rolling, count)
const zic_t	t;
const int	positive;
const int	rolling;
int		count;
{
	register int	i, j;

	if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
		error(_("too many leap seconds"));
		exit(EXIT_FAILURE);
	}
	for (i = 0; i < leapcnt; ++i)
		if (t <= trans[i]) {
			if (t == trans[i]) {
				error(_("repeated leap second moment"));
				exit(EXIT_FAILURE);
			}
			break;
		}
	do {
		for (j = leapcnt; j > i; --j) {
			trans[j] = trans[j - 1];
			corr[j] = corr[j - 1];
			roll[j] = roll[j - 1];
		}
		trans[i] = t;
		corr[i] = positive ? 1L : eitol(-count);
		roll[i] = rolling;
		++leapcnt;
	} while (positive && --count != 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl 0xbd59(%rip), %eax      # 0x123a4
movl %eax, -0x20(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x665c
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x6666
movl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6666
movl -0x20(%rbp), %eax
movl -0x24(%rbp), %ecx
addl %ecx, %eax
cmpl $0x32, %eax
jle 0x6689
leaq 0x84ee(%rip), %rdi      # 0xeb68
callq 0x4110
movl $0x1, %edi
callq 0x2270
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0xbd0b(%rip), %eax      # 0x123a4
jge 0x66ea
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0xbd06(%rip), %rcx      # 0x123b0
cmpq (%rcx,%rdx,8), %rax
jg 0x66dd
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0xbcf1(%rip), %rcx      # 0x123b0
cmpq (%rcx,%rdx,8), %rax
jne 0x66db
leaq 0x84b2(%rip), %rdi      # 0xeb7e
callq 0x4110
movl $0x1, %edi
callq 0x2270
jmp 0x66ea
jmp 0x66df
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6690
jmp 0x66ec
movl 0xbcb2(%rip), %eax      # 0x123a4
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x676f
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0xbca3(%rip), %rax      # 0x123b0
movq (%rax,%rcx,8), %rdx
movslq -0x1c(%rbp), %rcx
leaq 0xbc94(%rip), %rax      # 0x123b0
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0xbe10(%rip), %rax      # 0x12540
movq (%rax,%rcx,8), %rdx
movslq -0x1c(%rbp), %rcx
leaq 0xbe01(%rip), %rax      # 0x12540
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0xbf7d(%rip), %rax      # 0x126d0
movb (%rax,%rcx), %dl
movslq -0x1c(%rbp), %rcx
leaq 0xbf6f(%rip), %rax      # 0x126d0
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x66f5
movq -0x8(%rbp), %rdx
movslq -0x18(%rbp), %rcx
leaq 0xbc32(%rip), %rax      # 0x123b0
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0xc(%rbp)
je 0x6793
movl $0x1, %eax
movq %rax, -0x30(%rbp)
jmp 0x67a1
xorl %edi, %edi
subl -0x14(%rbp), %edi
callq 0x4660
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movslq -0x18(%rbp), %rcx
leaq 0xbd90(%rip), %rax      # 0x12540
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
movb %al, %dl
movslq -0x18(%rbp), %rcx
leaq 0xbf0c(%rip), %rax      # 0x126d0
movb %dl, (%rax,%rcx)
movl 0xbbd7(%rip), %eax      # 0x123a4
addl $0x1, %eax
movl %eax, 0xbbce(%rip)      # 0x123a4
xorl %eax, %eax
cmpl $0x0, -0xc(%rbp)
movb %al, -0x31(%rbp)
je 0x67f3
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x66ec
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)