// File: /workspace/github_c_makefile_star2_O3/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 0x168b
leaq 0x1a1a(%rip), %rsi      # 0x309b
movq %r15, %rdi
xorl %eax, %eax
callq 0x1130
leaq 0x3a8e(%rip), %rdi      # 0x5120
leaq 0x3a8f(%rip), %rsi      # 0x5128
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jle 0x1853
leaq 0x10(%rsp), %rbp
leaq 0x3a6a(%rip), %r12      # 0x5120
leaq 0x3a6b(%rip), %rbx      # 0x5128
movq 0x3a5c(%rip), %rdi      # 0x5120
cmpb $0xa, -0x1(%rdi,%rax)
jne 0x16d7
movb $0x0, -0x1(%rdi,%rax)
movq 0x3a49(%rip), %rdi      # 0x5120
movq %rbp, %rsi
callq 0x1d3d
testq %rax, %rax
je 0x1853
movq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x1e5f
testl %eax, %eax
jne 0x183c
movq %r12, %r13
movq %rbp, %r12
movq %rsp, %rdi
callq 0x1040
testq %rax, %rax
je 0x1862
movq %rax, %rbp
movq (%rsp), %rax
xorl %ecx, %ecx
cmpq 0x39ec(%rip), %rax      # 0x5118
setge %cl
addq %rcx, 0x39fa(%rip)      # 0x5130
movq %rcx, %xmm0
shufpd $0x2, 0x18cc(%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 0x1800
leaq 0x193f(%rip), %rdi      # 0x30ab
movq %r15, %rsi
callq 0x10c0
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 0x1912(%rip), %rsi      # 0x30af
xorl %eax, %eax
pushq %r10
callq 0x1130
addq $0x10, %rsp
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x1080
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12dc
leaq 0x18fd(%rip), %rdi      # 0x30c9
movq %r15, %rsi
callq 0x10c0
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
callq 0x1080
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12dc
leaq 0x1896(%rip), %rdi      # 0x308c
movq %r15, %rsi
callq 0x10c0
jmp 0x1836
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 0x18aa(%rip), %rsi      # 0x30cf
xorl %eax, %eax
pushq 0x18(%rsp)
pushq %r10
callq 0x1130
addq $0x10, %rsp
movq %r12, %rbp
movq %r13, %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jg 0x16bd
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1838(%rip), %rsi      # 0x30a1
movl $0x1, %edi
xorl %eax, %eax
callq 0x1180
nopl (%rax)