// File: /workspace/github_c_makefile_star2_O0/lyda[P]tz/zic.c
// Function: infile
static void
infile(name)
const char *	name;
{
	register FILE *			fp;
	register char **		fields;
	register char *			cp;
	register const struct lookup *	lp;
	register int			nfields;
	register int			wantcont;
	register int			num;
	char				buf[BUFSIZ];

	if (strcmp(name, "-") == 0) {
		name = _("standard input");
		fp = stdin;
	} else if ((fp = fopen(name, "r")) == NULL) {
		const char *e = strerror(errno);

		(void) fprintf(stderr, _("%s: Can't open %s: %s\n"),
			progname, name, e);
		exit(EXIT_FAILURE);
	}
	wantcont = FALSE;
	for (num = 1; ; ++num) {
		eat(name, num);
		if (fgets(buf, (int) sizeof buf, fp) != buf)
			break;
		cp = strchr(buf, '\n');
		if (cp == NULL) {
			error(_("line too long"));
			exit(EXIT_FAILURE);
		}
		*cp = '\0';
		fields = getfields(buf);
		nfields = 0;
		while (fields[nfields] != NULL) {
			static char	nada;

			if (strcmp(fields[nfields], "-") == 0)
				fields[nfields] = &nada;
			++nfields;
		}
		if (nfields == 0) {
			/* nothing to do */
		} else if (wantcont) {
			wantcont = inzcont(fields, nfields);
		} else {
			lp = byword(fields[0], line_codes);
			if (lp == NULL)
				error(_("input line of unknown type"));
			else switch ((int) (lp->l_value)) {
				case LC_RULE:
					inrule(fields, nfields);
					wantcont = FALSE;
					break;
				case LC_ZONE:
					wantcont = inzone(fields, nfields);
					break;
				case LC_LINK:
					inlink(fields, nfields);
					wantcont = FALSE;
					break;
				case LC_LEAP:
					if (name != leapsec)
						(void) fprintf(stderr,
_("%s: Leap line in non leap seconds file %s\n"),
							progname, name);
					else	inleap(fields, nfields);
					wantcont = FALSE;
					break;
				default:	/* "cannot happen" */
					(void) fprintf(stderr,
_("%s: panic: Invalid l_value %d\n"),
						progname, lp->l_value);
					exit(EXIT_FAILURE);
			}
		}
		ifree((char *) fields);
	}
	if (ferror(fp)) {
		(void) fprintf(stderr, _("%s: Error reading %s\n"),
			progname, filename);
		exit(EXIT_FAILURE);
	}
	if (fp != stdin && fclose(fp)) {
		const char *e = strerror(errno);

		(void) fprintf(stderr, _("%s: Error closing %s: %s\n"),
			progname, filename, e);
		exit(EXIT_FAILURE);
	}
	if (wantcont)
		error(_("expected continuation line not found"));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2060, %rsp           # imm = 0x2060
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xc0e2(%rip), %rsi      # 0xeafc
callq 0x2160
cmpl $0x0, %eax
jne 0x2a3f
leaq 0xbb59(%rip), %rax      # 0xe584
movq %rax, -0x8(%rbp)
movq 0xf592(%rip), %rax      # 0x11fc8
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x2aa2
movq -0x8(%rbp), %rdi
leaq 0xbd80(%rip), %rsi      # 0xe7ca
callq 0x2220
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x2aa0
callq 0x2050
movl (%rax), %edi
callq 0x2290
movq %rax, -0x2048(%rbp)
movq 0xf585(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xf733(%rip), %rdx      # 0x121b0
movq -0x8(%rbp), %rcx
movq -0x2048(%rbp), %r8
leaq 0xbb04(%rip), %rsi      # 0xe593
movb $0x0, %al
callq 0x2180
movl $0x1, %edi
callq 0x2270
jmp 0x2aa2
movl $0x0, -0x30(%rbp)
movl $0x1, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x3d60
leaq -0x2040(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x2000, %esi           # imm = 0x2000
callq 0x2140
leaq -0x2040(%rbp), %rcx
cmpq %rcx, %rax
je 0x2ae2
jmp 0x2cd4
leaq -0x2040(%rbp), %rdi
movl $0xa, %esi
callq 0x20f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2b14
leaq 0xbaa5(%rip), %rdi      # 0xe5aa
callq 0x4110
movl $0x1, %edi
callq 0x2270
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
leaq -0x2040(%rbp), %rdi
callq 0x46d0
movq %rax, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2b7c
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbfa8(%rip), %rsi      # 0xeafc
callq 0x2160
cmpl $0x0, %eax
jne 0x2b71
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
leaq 0xf6db(%rip), %rdx      # 0x12248
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2b32
cmpl $0x0, -0x2c(%rbp)
jne 0x2b87
jmp 0x2cbd
cmpl $0x0, -0x30(%rbp)
je 0x2ba1
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4910
movl %eax, -0x30(%rbp)
jmp 0x2cbb
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0xef61(%rip), %rsi      # 0x11b10
callq 0x4960
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2bd0
leaq 0xb9f2(%rip), %rdi      # 0xe5b8
callq 0x4110
jmp 0x2cb9
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x2058(%rbp)
subq $0x3, %rax
ja 0x2c87
movq -0x2058(%rbp), %rax
leaq 0xb4d2(%rip), %rcx      # 0xe0c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4a40
movl $0x0, -0x30(%rbp)
jmp 0x2cb7
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4be0
movl %eax, -0x30(%rbp)
jmp 0x2cb7
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4e60
movl $0x0, -0x30(%rbp)
jmp 0x2cb7
movq -0x8(%rbp), %rax
cmpq 0xf58d(%rip), %rax      # 0x121d8
je 0x2c72
movq 0xf3a4(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xf552(%rip), %rdx      # 0x121b0
movq -0x8(%rbp), %rcx
leaq 0xb96a(%rip), %rsi      # 0xe5d3
movb $0x0, %al
callq 0x2180
jmp 0x2c7e
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x4f90
movl $0x0, -0x30(%rbp)
jmp 0x2cb7
movq 0xf36a(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xf518(%rip), %rdx      # 0x121b0
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
leaq 0xb958(%rip), %rsi      # 0xe5fe
movb $0x0, %al
callq 0x2180
movl $0x1, %edi
callq 0x2270
jmp 0x2cb9
jmp 0x2cbb
jmp 0x2cbd
movq -0x18(%rbp), %rdi
callq 0xd160
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2ab0
movq -0x10(%rbp), %rdi
callq 0x20a0
cmpl $0x0, %eax
je 0x2d12
movq 0xf30f(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xf4bd(%rip), %rdx      # 0x121b0
movq 0xf50e(%rip), %rcx      # 0x12208
leaq 0xb91c(%rip), %rsi      # 0xe61d
movb $0x0, %al
callq 0x2180
movl $0x1, %edi
callq 0x2270
movq -0x10(%rbp), %rax
movq 0xf2ab(%rip), %rcx      # 0x11fc8
cmpq (%rcx), %rax
je 0x2d7a
movq -0x10(%rbp), %rdi
callq 0x20c0
cmpl $0x0, %eax
je 0x2d7a
callq 0x2050
movl (%rax), %edi
callq 0x2290
movq %rax, -0x2050(%rbp)
movq 0xf2ae(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movq 0xf45c(%rip), %rdx      # 0x121b0
movq 0xf4ad(%rip), %rcx      # 0x12208
movq -0x2050(%rbp), %r8
leaq 0xb8ca(%rip), %rsi      # 0xe633
movb $0x0, %al
callq 0x2180
movl $0x1, %edi
callq 0x2270
cmpl $0x0, -0x30(%rbp)
je 0x2d8c
leaq 0xb8c6(%rip), %rdi      # 0xe64d
callq 0x4110
addq $0x2060, %rsp           # imm = 0x2060
popq %rbp
retq
nopw %cs:(%rax,%rax)