// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_frames.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;

	/* menu if not unnamed */
	if (f->name[0]) {
		fputs("<h2 id=\"", fpitems);
		xmlencode(f->name, fpitems);
		fputs("\"><a href=\"#", fpitems);
		xmlencode(f->name, fpitems);
		fputs("\">", fpitems);
		xmlencode(f->name, fpitems);
		fputs("</a></h2>\n", fpitems);
	}

	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++;

		fprintf(fpitems, "%04d-%02d-%02d&nbsp;%02d:%02d ",
		        tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
		        tm->tm_hour, tm->tm_min);
		if (isnew)
			fputs("<b><u>", fpitems);
		if (fields[FieldLink][0]) {
			fputs("<a href=\"", fpitems);
			xmlencode(fields[FieldLink], fpitems);
			fputs("\">", fpitems);
			xmlencode(fields[FieldTitle], fpitems);
			fputs("</a>", fpitems);
		} else {
			xmlencode(fields[FieldTitle], fpitems);
		}
		if (isnew)
			fputs("</u></b>", fpitems);
		fputs("\n", fpitems);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %rax
cmpb $0x0, (%rax)
je 0x170b
leaq 0x1e01(%rip), %rdi      # 0x34b6
movq %r15, %rsi
callq 0x10c0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x1eef
leaq 0x1df0(%rip), %rdi      # 0x34bf
movq %r15, %rsi
callq 0x10c0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x1eef
leaq 0x1ba9(%rip), %rdi      # 0x3292
movq %r15, %rsi
callq 0x10c0
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x1eef
leaq 0x1dc9(%rip), %rdi      # 0x34cc
movq %r15, %rsi
callq 0x10c0
movq %rbx, 0x18(%rsp)
leaq 0x3a09(%rip), %rdi      # 0x5120
leaq 0x3a0a(%rip), %rsi      # 0x5128
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jle 0x18c8
leaq 0x20(%rsp), %r12
leaq 0x8(%rsp), %rbp
leaq 0x39e0(%rip), %rbx      # 0x5120
leaq 0x39e1(%rip), %r13      # 0x5128
movq %r14, 0x10(%rsp)
movq 0x39cd(%rip), %rcx      # 0x5120
cmpb $0xa, -0x1(%rcx,%rax)
jne 0x175f
movb $0x0, -0x1(%rcx,%rax)
movq 0x39ba(%rip), %rdi      # 0x5120
movq %r12, %rsi
callq 0x1e07
testq %rax, %rax
je 0x18c8
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e8c
testl %eax, %eax
jne 0x18b1
movq %rbx, %r14
movq %r12, %r13
movq %rbp, %rbx
movq %rbp, %rdi
callq 0x1030
testq %rax, %rax
je 0x18d7
movq 0x8(%rsp), %rbp
movq 0x3955(%rip), %r12      # 0x5110
xorl %ecx, %ecx
cmpq %r12, %rbp
setge %cl
addq %rcx, 0x394e(%rip)      # 0x5118
movq 0x18(%rsp), %rdx
addq %rcx, 0x8(%rdx)
incq 0x10(%rdx)
movl 0x14(%rax), %edx
movl $0x76c, %ecx            # imm = 0x76C
addl %ecx, %edx
movl 0x10(%rax), %ecx
incl %ecx
movl 0xc(%rax), %r8d
movl 0x4(%rax), %esi
movl 0x8(%rax), %r9d
movl %esi, (%rsp)
movq %r15, %rdi
leaq 0x1ce3(%rip), %rsi      # 0x34e1
xorl %eax, %eax
callq 0x1130
cmpq %r12, %rbp
jl 0x1819
leaq 0x1a84(%rip), %rdi      # 0x3295
movq %r15, %rsi
callq 0x10c0
movq 0x30(%rsp), %rax
cmpb $0x0, (%rax)
je 0x186c
leaq 0x1cd6(%rip), %rdi      # 0x3500
movq %r15, %rsi
callq 0x10c0
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x1eef
leaq 0x1a4c(%rip), %rdi      # 0x3292
movq %r15, %rsi
callq 0x10c0
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1eef
leaq 0x1ca8(%rip), %rdi      # 0x350a
movq %r15, %rsi
callq 0x10c0
jmp 0x1879
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1eef
cmpq %r12, %rbp
jl 0x188d
leaq 0x1a1e(%rip), %rdi      # 0x32a3
movq %r15, %rsi
callq 0x10c0
leaq 0x1bd5(%rip), %rdi      # 0x3469
movq %r15, %rsi
callq 0x10c0
movq %r13, %r12
movq %rbx, %rbp
movq %r14, %rbx
movq 0x10(%rsp), %r14
leaq 0x3877(%rip), %r13      # 0x5128
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x11b0
testq %rax, %rax
jg 0x174c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bf9(%rip), %rsi      # 0x34d7
movl $0x1, %edi
xorl %eax, %eax
callq 0x1180
nop