// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdx
leaq 0x3ca2(%rip), %rdi      # 0x5110
leaq 0x3ca3(%rip), %rsi      # 0x5118
callq 0x11b0
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
jle 0x1755
movq 0x3c81(%rip), %rax      # 0x5110
movq -0x68(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x14bb
movq 0x3c69(%rip), %rax      # 0x5110
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x68(%rbp)
movb $0x0, -0x1(%rax,%rcx)
movq 0x3c4e(%rip), %rdi      # 0x5110
leaq -0x50(%rbp), %rsi
callq 0x21f0
cmpq $0x0, %rax
jne 0x14d6
jmp 0x1755
movq $0x0, -0x60(%rbp)
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x22d0
cmpl $0x0, %eax
je 0x14f5
jmp 0x1463
leaq -0x60(%rbp), %rdi
callq 0x1040
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x151b
movl $0x1, %edi
leaq 0x1c5d(%rip), %rsi      # 0x3171
movb $0x0, %al
callq 0x1180
movq 0x3ab6(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1c4f(%rip), %rdi      # 0x317b
callq 0x10d0
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1579
movq 0x3a97(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1c41(%rip), %rdi      # 0x318c
callq 0x10d0
movq -0x10(%rbp), %rdi
movq 0x3a7d(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2350
movq 0x3a6e(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1c1a(%rip), %rdi      # 0x318e
callq 0x10d0
movq -0x48(%rbp), %rdi
movq 0x3a54(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2350
movq 0x3a45(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1bf4(%rip), %rdi      # 0x3191
callq 0x10d0
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x15ea
movq 0x3a26(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1bdf(%rip), %rdi      # 0x319b
callq 0x10d0
movq -0x40(%rbp), %rdi
movq 0x3a0c(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2350
movq 0x39fd(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1bd4(%rip), %rdi      # 0x31b9
callq 0x10d0
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1632
movq 0x39de(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1bbb(%rip), %rdi      # 0x31bf
callq 0x10d0
movq -0x18(%rbp), %rdi
movq 0x39c4(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2350
movq 0x39b5(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b8c(%rip), %rdi      # 0x31b9
callq 0x10d0
movq 0x399f(%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), %r10d
movq -0x58(%rbp), %rax
movl (%rax), %eax
leaq 0x1b65(%rip), %rsi      # 0x31dd
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x1140
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x16cf
movq 0x3941(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b74(%rip), %rdi      # 0x3215
callq 0x10d0
movq -0x20(%rbp), %rdi
movq 0x3927(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
callq 0x2350
movq 0x3918(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b5b(%rip), %rdi      # 0x3225
callq 0x10d0
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0x173a
movq -0x30(%rbp), %rdi
leaq 0x1b54(%rip), %rsi      # 0x3237
callq 0x1110
cmpl $0x0, %eax
jne 0x1705
movq 0x38e4(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b3e(%rip), %rdi      # 0x323c
callq 0x10d0
jmp 0x171b
movq 0x38cc(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b3d(%rip), %rdi      # 0x3253
callq 0x10d0
movq -0x38(%rbp), %rdi
callq 0x1760
movq 0x38ad(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b35(%rip), %rdi      # 0x326a
callq 0x10d0
movq 0x3897(%rip), %rax      # 0x4fd8
movq (%rax), %rsi
leaq 0x1b2b(%rip), %rdi      # 0x3276
callq 0x10d0
jmp 0x1463
addq $0x80, %rsp
popq %rbp
retq
nop