// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/wri.c
// Function: do_html_begin
static void do_html_begin(deark *c, lctx *d)
{
	dbuf *f;
	if(d->html_outf) return;
	d->html_outf = dbuf_create_output_file(c, "html", NULL, 0);
	dbuf_enable_wbuffer(d->html_outf);
	f = d->html_outf;
	if(c->write_bom && !c->ascii_html) dbuf_write_uchar_as_utf8(f, 0xfeff);
	dbuf_puts(f, "<!DOCTYPE html>\n");
	dbuf_puts(f, "<html>\n");
	dbuf_puts(f, "<head>\n");
	dbuf_printf(f, "<meta charset=\"%s\">\n", c->ascii_html?"US-ASCII":"UTF-8");
	dbuf_puts(f, "<title></title>\n");

	dbuf_puts(f, "<style type=\"text/css\">\n");
	dbuf_puts(f, " body { color: #000; background-color: #fff }\n");
	dbuf_puts(f, " p { margin-top: 0; margin-bottom: 0 }\n");
	dbuf_puts(f, " .c { color: #ccc }\n"); // Visible control characters

	// Replacement object
	dbuf_puts(f, " .r { padding: 0.5ex; color: #800; background-color: #eee;\n");
	dbuf_puts(f, "  font-style: italic; border: 0.34ex dotted #800 }\n");

	dbuf_puts(f, " .tc { text-align: center }\n");
	dbuf_puts(f, " .tr { text-align: right }\n");
	dbuf_puts(f, " .tj { text-align: justify }\n");
	dbuf_puts(f, "</style>\n");

	dbuf_puts(f, "</head>\n");
	dbuf_puts(f, "<body>\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x13c0c0
jmp 0x13c257
movq -0x8(%rbp), %rdi
leaq 0x9003a(%rip), %rsi     # 0x1cc105
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x166c60
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x167b90
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movzbl 0xcc(%rax), %eax
cmpl $0x0, %eax
je 0x13c125
movq -0x8(%rbp), %rax
cmpb $0x0, 0xce(%rax)
jne 0x13c125
movq -0x18(%rbp), %rdi
movl $0xfeff, %esi           # imm = 0xFEFF
callq 0x160cc0
movq -0x18(%rbp), %rdi
leaq 0x91193(%rip), %rsi     # 0x1cd2c3
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91194(%rip), %rsi     # 0x1cd2d4
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x9118c(%rip), %rsi     # 0x1cd2dc
callq 0x168da0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movzbl 0xce(%rax), %ecx
leaq 0x73a7e(%rip), %rdx     # 0x1afbe9
leaq 0x91187(%rip), %rax     # 0x1cd2f9
cmpl $0x0, %ecx
cmovneq %rax, %rdx
leaq 0x91164(%rip), %rsi     # 0x1cd2e4
movb $0x0, %al
callq 0x167f00
movq -0x18(%rbp), %rdi
leaq 0x91170(%rip), %rsi     # 0x1cd302
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91171(%rip), %rsi     # 0x1cd313
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x9117a(%rip), %rsi     # 0x1cd32c
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91199(%rip), %rsi     # 0x1cd35b
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x911b1(%rip), %rsi     # 0x1cd383
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x911b6(%rip), %rsi     # 0x1cd398
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x911e2(%rip), %rsi     # 0x1cd3d4
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91206(%rip), %rsi     # 0x1cd408
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91213(%rip), %rsi     # 0x1cd425
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x9121f(%rip), %rsi     # 0x1cd441
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x9122d(%rip), %rsi     # 0x1cd45f
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91227(%rip), %rsi     # 0x1cd469
callq 0x168da0
movq -0x18(%rbp), %rdi
leaq 0x91220(%rip), %rsi     # 0x1cd472
callq 0x168da0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)