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

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

	while ((linelen = getline(&line, &linesize, fp)) > 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(stdout, "%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>", stdout);
		if (fields[FieldLink][0]) {
			fputs("<a href=\"", stdout);
			xmlencode(fields[FieldLink], stdout);
			fputs("\">", stdout);
			xmlencode(fields[FieldTitle], stdout);
			fputs("</a>", stdout);
		} else {
			xmlencode(fields[FieldTitle], stdout);
		}
		if (isnew)
			fputs("</u></b>", stdout);
		fputs("\n", stdout);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x182d
movq 0x383e(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1a80(%rip), %rdi      # 0x3224
callq 0x10c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x3821(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
movq 0x3812(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x19d1(%rip), %rdi      # 0x31a1
callq 0x10c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x37f5(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
movq 0x37e6(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x19c1(%rip), %rdi      # 0x31bd
callq 0x10c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq 0x37c9(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
movq 0x37ba(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1a05(%rip), %rdi      # 0x322d
callq 0x10c0
jmp 0x182f
movq -0x8(%rbp), %rdx
leaq 0x38f6(%rip), %rdi      # 0x5130
leaq 0x38f7(%rip), %rsi      # 0x5138
callq 0x11b0
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
jle 0x1a56
movq 0x38d5(%rip), %rax      # 0x5130
movq -0x70(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x1887
movq 0x38bd(%rip), %rax      # 0x5130
movq -0x70(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb $0x0, -0x1(%rax,%rcx)
movq 0x38a2(%rip), %rdi      # 0x5130
leaq -0x50(%rbp), %rsi
callq 0x23b0
cmpq $0x0, %rax
jne 0x18a2
jmp 0x1a56
movq $0x0, -0x60(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2490
cmpl $0x0, %eax
je 0x18c1
jmp 0x182f
leaq -0x60(%rbp), %rdi
callq 0x1030
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x18e7
movl $0x1, %edi
leaq 0x1958(%rip), %rsi      # 0x3238
movb $0x0, %al
callq 0x1180
movq -0x60(%rbp), %rdx
movq 0x3826(%rip), %rsi      # 0x5118
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovgel %ecx, %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
addq 0x381c(%rip), %rax      # 0x5128
movq %rax, 0x3815(%rip)      # 0x5128
movl -0x64(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x369d(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
movq -0x58(%rbp), %rax
movl 0x14(%rax), %edx
addl $0x76c, %edx            # imm = 0x76C
movq -0x58(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movq -0x58(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x58(%rbp), %rax
movl 0x8(%rax), %r9d
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x18cf(%rip), %rsi      # 0x3242
movl %eax, (%rsp)
movb $0x0, %al
callq 0x1130
cmpl $0x0, -0x64(%rbp)
je 0x1999
movq 0x364e(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x182c(%rip), %rdi      # 0x31c0
callq 0x10c0
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1a0c
movq 0x362f(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x18ae(%rip), %rdi      # 0x3261
callq 0x10c0
movq -0x40(%rbp), %rdi
movq 0x3615(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
movq 0x3606(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x17e1(%rip), %rdi      # 0x31bd
callq 0x10c0
movq -0x48(%rbp), %rdi
movq 0x35ec(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
movq 0x35dd(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1866(%rip), %rdi      # 0x326b
callq 0x10c0
jmp 0x1a1f
movq -0x48(%rbp), %rdi
movq 0x35c1(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2510
cmpl $0x0, -0x64(%rbp)
je 0x1a3b
movq 0x35ac(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1798(%rip), %rdi      # 0x31ce
callq 0x10c0
movq 0x3596(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x16b3(%rip), %rdi      # 0x30ff
callq 0x10c0
jmp 0x182f
addq $0x80, %rsp
popq %rbp
retq
nop