// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/htmshell.c
// Function: htmStartWithHead
void _htmStartWithHead(FILE *f, char *head, char *title, boolean printDocType, int dirDepth)
/* Write out bits of header that both stand-alone .htmls
 * and CGI returned .htmls need, including optional head info */
{
if (printDocType)
    {
//#define TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
#ifdef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n", f);
#else///ifndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    char *browserVersion;
    if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
        fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n", f);
    else
        fputs("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" "
              "\"http://www.w3.org/TR/html4/loose.dtd\">\n",f);
    // Strict would be nice since it fixes atleast one IE problem (use of :hover CSS pseudoclass)
#endif///ndef TOO_TIMID_FOR_CURRENT_HTML_STANDARDS
    }
fputs("<HTML>\n", f);
fputs("<HEAD>\n", f);
// CSP header
generateCspMetaHeader(f);

fputs(head, f);
htmlFprintf(f,"<TITLE>%s</TITLE>\n", title); 
if (endsWith(title,"Login - UCSC Genome Browser")) 
    fprintf(f,"\t<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;CHARSET=iso-8859-1\">\n");
fprintf(f, "\t<META http-equiv=\"Content-Script-Type\" content=\"text/javascript\">\n");
if (htmlStyle != NULL)
    fputs(htmlStyle, f);
if (htmlStyleSheet != NULL)
    fprintf(f,"<link href=\"%s\" rel=\"stylesheet\" type=\"text/css\">\n", htmlStyleSheet);
if (htmlStyleTheme != NULL)
    fputs(htmlStyleTheme, f);

fputs("</HEAD>\n\n",f);
printBodyTag(f);
htmlWarnBoxSetup(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testl %ecx, %ecx
je 0x42a2c
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3e04d
cmpl $0x2, %eax
jne 0x42a1d
movq 0x8(%rsp), %rax
cmpb $0x38, (%rax)
jge 0x42a1d
leaq 0x43856(%rip), %rdi     # 0x86271
jmp 0x42a24
leaq 0x43880(%rip), %rdi     # 0x862a4
movq %rbx, %rsi
callq 0x6810
leaq 0x438d9(%rip), %rdi     # 0x8630c
movq %rbx, %rsi
callq 0x6810
leaq 0x438d2(%rip), %rdi     # 0x86314
movq %rbx, %rsi
callq 0x6810
movq %rbx, %rdi
callq 0x429b8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6810
leaq 0x438b8(%rip), %rsi     # 0x8631c
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x42b1c
leaq 0x438b7(%rip), %rsi     # 0x8632f
movq %r14, %rdi
callq 0x1de0f
testl %eax, %eax
je 0x42a99
leaq 0x438c0(%rip), %rdi     # 0x8634b
pushq $0x49
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x6e70
leaq 0x438f5(%rip), %rdi     # 0x86395
pushq $0x43
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x6e70
movq 0x72233(%rip), %rdi     # 0xb4ce8
testq %rdi, %rdi
je 0x42ac2
movq %rbx, %rsi
callq 0x6810
movq 0x85b8f(%rip), %rdx     # 0xc8658
testq %rdx, %rdx
je 0x42adf
leaq 0x43904(%rip), %rsi     # 0x863d9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
movq 0x85b82(%rip), %rdi     # 0xc8668
testq %rdi, %rdi
je 0x42af3
movq %rbx, %rsi
callq 0x6810
leaq 0x439b2(%rip), %rdi     # 0x864ac
movq %rbx, %rsi
callq 0x6810
movq %rbx, %rdi
callq 0x42586
movq %rbx, %rdi
callq 0x4217d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq