// File: /workspace/github_c_makefile_star2_O1/dxwc[P]sfeed/sfeed_atom.c
// Function: printfeed
static void
printfeed(FILE *fp, const char *feedname)
{
	char *fields[FieldLast];
	struct tm *tm;
	time_t parsedtime;
	ssize_t linelen;

	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");

		fputs("<entry>\n\t<title>", stdout);
		if (feedname[0]) {
			fputs("[", stdout);
			xmlencode(feedname, stdout);
			fputs("] ", stdout);
		}
		xmlencode(fields[FieldTitle], stdout);
		fputs("</title>\n", stdout);
		if (fields[FieldLink][0]) {
			fputs("\t<link rel=\"alternate\" href=\"", stdout);
			xmlencode(fields[FieldLink], stdout);
			fputs("\" />\n", stdout);
		}
		if (fields[FieldEnclosure][0]) {
			fputs("\t<link rel=\"enclosure\" href=\"", stdout);
			xmlencode(fields[FieldEnclosure], stdout);
			fputs("\" />\n", stdout);
		}
		fprintf(stdout, "\t<published>%04d-%02d-%02dT%02d:%02d:%02dZ</published>\n",
		        tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
		        tm->tm_hour, tm->tm_min, tm->tm_sec);
		if (fields[FieldAuthor][0]) {
			fputs("\t<author><name>", stdout);
			xmlencode(fields[FieldAuthor], stdout);
			fputs("</name></author>\n", stdout);
		}
		if (fields[FieldContent][0]) {
			if (!strcmp(fields[FieldContentType], "html")) {
				fputs("\t<content type=\"html\">", stdout);
			} else {
				/* NOTE: an RSS/Atom viewer may or may not format
				   whitespace such as newlines.
				   Workaround: type="html" and <![CDATA[<pre></pre>]]> */
				fputs("\t<content type=\"text\">", stdout);
			}
			printcontent(fields[FieldContent]);
			fputs("</content>\n", stdout);
		}
		fputs("</entry>\n", stdout);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x2d1a(%rip), %rdi      # 0x4108
leaq 0x2d1b(%rip), %rsi      # 0x4110
movq %rbp, %rdx
callq 0x11b0
testq %rax, %rax
jle 0x1708
leaq 0x10(%rsp), %r15
movq 0x2bc6(%rip), %r13      # 0x3fd8
leaq 0xd7b(%rip), %r12       # 0x2194
leaq 0x2ce8(%rip), %rbx      # 0x4108
movq %r14, 0x8(%rsp)
movq 0x2cdc(%rip), %rcx      # 0x4108
cmpb $0xa, -0x1(%rcx,%rax)
jne 0x1438
movb $0x0, -0x1(%rcx,%rax)
movq 0x2cc9(%rip), %rdi      # 0x4108
movq %r15, %rsi
callq 0x1c47
testq %rax, %rax
je 0x1708
movq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x1ccc
testl %eax, %eax
jne 0x16ed
movq %r15, %rbx
movq %rbp, %r15
movq %rsp, %rdi
callq 0x1040
testq %rax, %rax
je 0x1717
movq %rax, %r14
movq (%r13), %rsi
leaq 0xbfd(%rip), %rdi       # 0x208f
callq 0x10d0
movq 0x8(%rsp), %rbp
cmpb $0x0, (%rbp)
je 0x14ce
movq (%r13), %rsi
leaq 0xbf3(%rip), %rdi       # 0x20a0
callq 0x10d0
movq (%r13), %rsi
movq %rbp, %rdi
callq 0x1d2f
movq (%r13), %rsi
leaq 0xbd9(%rip), %rdi       # 0x20a2
callq 0x10d0
movq 0x18(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d2f
movq (%r13), %rsi
leaq 0xbbe(%rip), %rdi       # 0x20a5
callq 0x10d0
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x1524
movq (%r13), %rsi
leaq 0xbae(%rip), %rdi       # 0x20af
callq 0x10d0
movq 0x20(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d2f
movq (%r13), %rsi
leaq 0xbae(%rip), %rdi       # 0x20cd
callq 0x10d0
movq 0x48(%rsp), %rax
cmpb $0x0, (%rax)
movq %r15, %rbp
je 0x155f
movq (%r13), %rsi
leaq 0xb97(%rip), %rdi       # 0x20d3
callq 0x10d0
movq 0x48(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d2f
movq (%r13), %rsi
leaq 0xb73(%rip), %rdi       # 0x20cd
callq 0x10d0
movq (%r13), %rdi
movl 0x14(%r14), %edx
movl $0x76c, %eax            # imm = 0x76C
addl %eax, %edx
movl 0x10(%r14), %ecx
incl %ecx
movl 0xc(%r14), %r8d
movl 0x8(%r14), %r9d
movl (%r14), %r10d
movl 0x4(%r14), %r11d
leaq 0xb67(%rip), %rsi       # 0x20f1
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x1140
addq $0x10, %rsp
movq 0x40(%rsp), %rax
cmpb $0x0, (%rax)
movq %rbx, %r15
je 0x15d4
movq (%r13), %rsi
leaq 0xb78(%rip), %rdi       # 0x2129
callq 0x10d0
movq 0x40(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d2f
movq (%r13), %rsi
leaq 0xb6a(%rip), %rdi       # 0x2139
callq 0x10d0
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
leaq 0xbc7(%rip), %rbx       # 0x21aa
je 0x16d6
movq 0x30(%rsp), %rdi
leaq 0xb56(%rip), %rsi       # 0x214b
callq 0x1110
testl %eax, %eax
movq (%r13), %rsi
leaq 0xb60(%rip), %rdi       # 0x2167
leaq 0xb42(%rip), %rax       # 0x2150
cmoveq %rax, %rdi
callq 0x10d0
movq 0x28(%rsp), %r14
movzbl (%r14), %eax
cmpl $0x3b, %eax
jg 0x1641
cmpl $0x25, %eax
jle 0x1659
cmpl $0x26, %eax
je 0x1667
cmpl $0x27, %eax
jne 0x16a8
movq (%r13), %rsi
leaq 0xb5f(%rip), %rdi       # 0x219e
jmp 0x169d
cmpl $0x5c, %eax
je 0x1674
cmpl $0x3e, %eax
je 0x1692
cmpl $0x3c, %eax
jne 0x16a8
movq (%r13), %rsi
movq %r12, %rdi
jmp 0x169d
cmpl $0x22, %eax
jne 0x16a4
movq (%r13), %rsi
movq %rbx, %rdi
jmp 0x169d
movq (%r13), %rsi
leaq 0xb32(%rip), %rdi       # 0x21a4
jmp 0x169d
movzbl 0x1(%r14), %eax
incq %r14
cmpl $0x5c, %eax
je 0x16b4
cmpl $0x74, %eax
je 0x16ad
cmpl $0x6e, %eax
jne 0x16be
movl $0xa, %edi
jmp 0x16b9
movq (%r13), %rsi
leaq 0xafc(%rip), %rdi       # 0x2199
callq 0x10d0
jmp 0x16be
testl %eax, %eax
je 0x16c6
movsbl %al, %edi
jmp 0x16b9
movl $0x9, %edi
jmp 0x16b9
movl $0x5c, %edi
callq 0x1030
incq %r14
jmp 0x161c
movq (%r13), %rsi
leaq 0xaad(%rip), %rdi       # 0x217e
callq 0x10d0
movq (%r13), %rsi
leaq 0xaa9(%rip), %rdi       # 0x218a
callq 0x10d0
leaq 0x2a1b(%rip), %rbx      # 0x4108
movq %rbx, %rdi
leaq 0x2a19(%rip), %rsi      # 0x4110
movq %rbp, %rdx
callq 0x11b0
testq %rax, %rax
jg 0x1425
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x967(%rip), %rsi       # 0x2085
movl $0x1, %edi
xorl %eax, %eax
callq 0x1180
nop