// File: /workspace/github_c_makefile_star2_O3/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 0x2d22(%rip), %rdi      # 0x4100
leaq 0x2d23(%rip), %rsi      # 0x4108
movq %rbp, %rdx
callq 0x11a0
testq %rax, %rax
jle 0x16f8
leaq 0x10(%rsp), %r15
movq 0x2bd6(%rip), %r13      # 0x3fd8
leaq 0xd8b(%rip), %r12       # 0x2194
leaq 0x2cf0(%rip), %rbx      # 0x4100
movq %r14, 0x8(%rsp)
movq 0x2ce4(%rip), %rdi      # 0x4100
cmpb $0xa, -0x1(%rdi,%rax)
jne 0x142f
movb $0x0, -0x1(%rdi,%rax)
movq 0x2cd1(%rip), %rdi      # 0x4100
movq %r15, %rsi
callq 0x1be1
testq %rax, %rax
je 0x16f8
movq $0x0, (%rsp)
movq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x1d03
testl %eax, %eax
jne 0x16dd
movq %r15, %rbx
movq %rbp, %r15
movq %rsp, %rdi
callq 0x1040
testq %rax, %rax
je 0x1707
movq %rax, %r14
movq (%r13), %rsi
leaq 0xc0d(%rip), %rdi       # 0x208f
callq 0x10c0
movq 0x8(%rsp), %rbp
cmpb $0x0, (%rbp)
je 0x14be
movq (%r13), %rsi
leaq 0xc03(%rip), %rdi       # 0x20a0
callq 0x10c0
movq (%r13), %rsi
movq %rbp, %rdi
callq 0x1d66
movq (%r13), %rsi
leaq 0xbe9(%rip), %rdi       # 0x20a2
callq 0x10c0
movq 0x18(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d66
movq (%r13), %rsi
leaq 0xbce(%rip), %rdi       # 0x20a5
callq 0x10c0
movq 0x20(%rsp), %rax
cmpb $0x0, (%rax)
je 0x1514
movq (%r13), %rsi
leaq 0xbbe(%rip), %rdi       # 0x20af
callq 0x10c0
movq 0x20(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d66
movq (%r13), %rsi
leaq 0xbbe(%rip), %rdi       # 0x20cd
callq 0x10c0
movq 0x48(%rsp), %rax
cmpb $0x0, (%rax)
movq %r15, %rbp
je 0x154f
movq (%r13), %rsi
leaq 0xba7(%rip), %rdi       # 0x20d3
callq 0x10c0
movq 0x48(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d66
movq (%r13), %rsi
leaq 0xb83(%rip), %rdi       # 0x20cd
callq 0x10c0
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 0xb77(%rip), %rsi       # 0x20f1
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x1130
addq $0x10, %rsp
movq 0x40(%rsp), %rax
cmpb $0x0, (%rax)
movq %rbx, %r15
je 0x15c4
movq (%r13), %rsi
leaq 0xb88(%rip), %rdi       # 0x2129
callq 0x10c0
movq 0x40(%rsp), %rdi
movq (%r13), %rsi
callq 0x1d66
movq (%r13), %rsi
leaq 0xb7a(%rip), %rdi       # 0x2139
callq 0x10c0
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
leaq 0xbd7(%rip), %rbx       # 0x21aa
je 0x16c6
movq 0x30(%rsp), %rdi
leaq 0xb66(%rip), %rsi       # 0x214b
callq 0x1100
testl %eax, %eax
movq (%r13), %rsi
leaq 0xb70(%rip), %rdi       # 0x2167
leaq 0xb52(%rip), %rax       # 0x2150
cmoveq %rax, %rdi
callq 0x10c0
movq 0x28(%rsp), %r14
movzbl (%r14), %eax
cmpl $0x3b, %eax
jg 0x1631
cmpl $0x25, %eax
jle 0x1649
cmpl $0x26, %eax
je 0x1657
cmpl $0x27, %eax
jne 0x1698
movq (%r13), %rsi
leaq 0xb6f(%rip), %rdi       # 0x219e
jmp 0x168d
cmpl $0x5c, %eax
je 0x1664
cmpl $0x3e, %eax
je 0x1682
cmpl $0x3c, %eax
jne 0x1698
movq (%r13), %rsi
movq %r12, %rdi
jmp 0x168d
cmpl $0x22, %eax
jne 0x1694
movq (%r13), %rsi
movq %rbx, %rdi
jmp 0x168d
movq (%r13), %rsi
leaq 0xb42(%rip), %rdi       # 0x21a4
jmp 0x168d
movzbl 0x1(%r14), %eax
incq %r14
cmpl $0x5c, %eax
je 0x16a4
cmpl $0x74, %eax
je 0x169d
cmpl $0x6e, %eax
jne 0x16ae
movl $0xa, %edi
jmp 0x16a9
movq (%r13), %rsi
leaq 0xb0c(%rip), %rdi       # 0x2199
callq 0x10c0
jmp 0x16ae
testl %eax, %eax
je 0x16b6
movsbl %al, %edi
jmp 0x16a9
movl $0x9, %edi
jmp 0x16a9
movl $0x5c, %edi
callq 0x1030
incq %r14
jmp 0x160c
movq (%r13), %rsi
leaq 0xabd(%rip), %rdi       # 0x217e
callq 0x10c0
movq (%r13), %rsi
leaq 0xab9(%rip), %rdi       # 0x218a
callq 0x10c0
leaq 0x2a23(%rip), %rbx      # 0x4100
movq %rbx, %rdi
leaq 0x2a21(%rip), %rsi      # 0x4108
movq %rbp, %rdx
callq 0x11a0
testq %rax, %rax
jg 0x1415
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x977(%rip), %rsi       # 0x2085
movl $0x1, %edi
xorl %eax, %eax
callq 0x1170
nop