// File: /workspace/github_c_makefile_star2_O2/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 0x1654
leaq 0xa51(%rip), %rsi       # 0x209b
movq %r15, %rdi
xorl %eax, %eax
callq 0x1130
leaq 0x2ac5(%rip), %r12      # 0x4120
leaq 0x2ac6(%rip), %r13      # 0x4128
leaq 0x10(%rsp), %rbx
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jle 0x1805
movq 0x2a9b(%rip), %rdi      # 0x4120
cmpb $0xa, -0x1(%rdi,%rax)
jne 0x1698
movb $0x0, -0x1(%rdi,%rax)
movq 0x2a88(%rip), %rdi      # 0x4120
movq %rbx, %rsi
callq 0x1ccd
testq %rax, %rax
je 0x1805
andq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x1d29
testl %eax, %eax
jne 0x1667
movq %r13, %rbp
movq %r12, %r13
movq %rsp, %rdi
callq 0x1040
testq %rax, %rax
je 0x1814
movq %rax, %r12
movq (%rsp), %rax
xorl %ecx, %ecx
cmpq 0x2a32(%rip), %rax      # 0x4118
setge %cl
addq %rcx, 0x2a40(%rip)      # 0x4130
movq %rcx, %xmm0
shufpd $0x2, 0x912(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movq 0x8(%rsp), %rax
movdqu 0x8(%rax), %xmm1
paddq %xmm0, %xmm1
movdqu %xmm1, 0x8(%rax)
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x17bf
leaq 0x985(%rip), %rdi       # 0x20ab
movq %r15, %rsi
callq 0x10c0
movl 0x14(%r12), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%r12), %ecx
incl %ecx
movl 0xc(%r12), %r8d
movl 0x4(%r12), %r10d
movl 0x8(%r12), %r9d
subq $0x8, %rsp
movq %r15, %rdi
leaq 0x951(%rip), %rsi       # 0x20af
xorl %eax, %eax
pushq %r10
callq 0x1130
popq %rcx
popq %rdx
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x1080
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x12dc
leaq 0x93e(%rip), %rdi       # 0x20c9
movq %r15, %rsi
callq 0x10c0
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x1080
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x12dc
leaq 0x8d7(%rip), %rdi       # 0x208c
movq %r15, %rsi
callq 0x10c0
jmp 0x17fa
movl 0x14(%r12), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%r12), %ecx
incl %ecx
movl 0xc(%r12), %r8d
movl 0x4(%r12), %r10d
movl 0x8(%r12), %r9d
movq %r15, %rdi
leaq 0x8e4(%rip), %rsi       # 0x20cf
xorl %eax, %eax
pushq 0x18(%rsp)
pushq %r10
callq 0x1130
popq %rcx
popq %rdx
movq %r13, %r12
movq %rbp, %r13
jmp 0x1667
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x886(%rip), %rsi       # 0x20a1
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x1180
nopl (%rax)