// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_gph.c
// Function: printfeed
static void
printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
{
	char *fields[FieldLast];
	ssize_t linelen;
	unsigned int isnew;
	struct tm *tm;
	time_t parsedtime;

	if (f->name[0])
		fprintf(fpitems, "t%s\n\n", f->name);

	while ((linelen = getline(&line, &linesize, fpin)) > 0) {
		if (line[linelen - 1] == '\n')
			line[--linelen] = '\0';
		if (!parseline(line, fields))
			break;

		parsedtime = 0;
		if (strtotime(fields[FieldUnixTimestamp], &parsedtime))
			continue;
		if (!(tm = localtime(&parsedtime)))
			err(1, "localtime");

		isnew = (parsedtime >= comparetime) ? 1 : 0;
		totalnew += isnew;
		f->totalnew += isnew;
		f->total++;

		if (fields[FieldLink][0]) {
			fputs("[h|", fpitems);
			fprintf(fpitems, "%04d-%02d-%02d %02d:%02d ",
			        tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
			        tm->tm_hour, tm->tm_min);
			gphlink(fpitems, fields[FieldTitle], strlen(fields[FieldTitle]));
			fputs("|URL:", fpitems);
			gphlink(fpitems, fields[FieldLink], strlen(fields[FieldLink]));
			fputs("|server|port]\n", fpitems);
		} else {
			fprintf(fpitems, "%04d-%02d-%02d %02d:%02d %s\n",
			        tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
			        tm->tm_hour, tm->tm_min, fields[FieldTitle]);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
movq (%rdx), %rdx
cmpb $0x0, (%rdx)
je 0x169b
leaq 0x19ee(%rip), %rsi      # 0x307f
movq %r15, %rdi
xorl %eax, %eax
callq 0x1140
leaq 0x3a86(%rip), %rdi      # 0x5128
leaq 0x3a87(%rip), %rsi      # 0x5130
movq %r14, %rdx
callq 0x11c0
testq %rax, %rax
jle 0x184f
leaq 0x10(%rsp), %rbp
leaq 0x3a62(%rip), %r12      # 0x5128
leaq 0x3a63(%rip), %rbx      # 0x5130
movq 0x3a54(%rip), %rcx      # 0x5128
cmpb $0xa, -0x1(%rcx,%rax)
jne 0x16e0
movb $0x0, -0x1(%rcx,%rax)
movq 0x3a41(%rip), %rdi      # 0x5128
movq %rbp, %rsi
callq 0x1d8f
testq %rax, %rax
je 0x184f
movq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x1e14
testl %eax, %eax
jne 0x1838
movq %r12, %r13
movq %rbp, %r12
movq %rsp, %rdi
callq 0x1040
testq %rax, %rax
je 0x185e
movq %rax, %rbp
movq (%rsp), %rax
xorl %ecx, %ecx
cmpq 0x39e4(%rip), %rax      # 0x5120
setge %cl
addq %rcx, 0x39f2(%rip)      # 0x5138
movq 0x8(%rsp), %rax
addq %rcx, 0x8(%rax)
incq 0x10(%rax)
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x17fc
leaq 0x1927(%rip), %rdi      # 0x308f
movq %r15, %rsi
callq 0x10d0
movl 0x14(%rbp), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%rbp), %ecx
incl %ecx
movl 0xc(%rbp), %r8d
movl 0x4(%rbp), %r10d
movl 0x8(%rbp), %r9d
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x18fa(%rip), %rsi      # 0x3093
xorl %eax, %eax
pushq %r10
callq 0x1140
addq $0x10, %rsp
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x1090
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12ec
leaq 0x18e5(%rip), %rdi      # 0x30ad
movq %r15, %rsi
callq 0x10d0
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
callq 0x1090
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12ec
leaq 0x187e(%rip), %rdi      # 0x3070
movq %r15, %rsi
callq 0x10d0
jmp 0x1832
movl 0x14(%rbp), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%rbp), %ecx
incl %ecx
movl 0xc(%rbp), %r8d
movl 0x4(%rbp), %r10d
movl 0x8(%rbp), %r9d
movq %r15, %rdi
leaq 0x1892(%rip), %rsi      # 0x30b3
xorl %eax, %eax
pushq 0x18(%rsp)
pushq %r10
callq 0x1140
addq $0x10, %rsp
movq %r12, %rbp
movq %r13, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11c0
testq %rax, %rax
jg 0x16cd
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1820(%rip), %rsi      # 0x3085
movl $0x1, %edi
xorl %eax, %eax
callq 0x1190
nopl (%rax)